Skip to content

Commit db5a794

Browse files
atishp04palmer-dabbelt
authored andcommitted
RISC-V: Add SBI HSM extension definitions
SBI specification defines HSM extension that allows to start/stop a hart by a supervisor anytime. The specification is available at https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc Add those definitions here. Signed-off-by: Atish Patra <[email protected]> Reviewed-by: Anup Patel <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent f90b43c commit db5a794

File tree

1 file changed

+14
-0
lines changed
  • arch/riscv/include/asm

1 file changed

+14
-0
lines changed

arch/riscv/include/asm/sbi.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ enum sbi_ext_id {
2626
SBI_EXT_TIME = 0x54494D45,
2727
SBI_EXT_IPI = 0x735049,
2828
SBI_EXT_RFENCE = 0x52464E43,
29+
SBI_EXT_HSM = 0x48534D,
2930
};
3031

3132
enum sbi_ext_base_fid {
@@ -56,6 +57,19 @@ enum sbi_ext_rfence_fid {
5657
SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID,
5758
};
5859

60+
enum sbi_ext_hsm_fid {
61+
SBI_EXT_HSM_HART_START = 0,
62+
SBI_EXT_HSM_HART_STOP,
63+
SBI_EXT_HSM_HART_STATUS,
64+
};
65+
66+
enum sbi_hsm_hart_status {
67+
SBI_HSM_HART_STATUS_STARTED = 0,
68+
SBI_HSM_HART_STATUS_STOPPED,
69+
SBI_HSM_HART_STATUS_START_PENDING,
70+
SBI_HSM_HART_STATUS_STOP_PENDING,
71+
};
72+
5973
#define SBI_SPEC_VERSION_DEFAULT 0x1
6074
#define SBI_SPEC_VERSION_MAJOR_SHIFT 24
6175
#define SBI_SPEC_VERSION_MAJOR_MASK 0x7f

0 commit comments

Comments
 (0)