summaryrefslogtreecommitdiff
path: root/include/sbi/sbi_ecall_interface.h
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2020-02-12 04:32:39 +0300
committerAnup Patel <anup@brainfault.org>2020-02-24 15:43:23 +0300
commite3f69fc1e934ce7815d9cde2d13dd2038a2894a6 (patch)
tree12a3d9846f29bcda30c622efa2368d70d51752f3 /include/sbi/sbi_ecall_interface.h
parent5b4824082ff8826f77d6bc670e16068d0744ff7f (diff)
downloadopensbi-e3f69fc1e934ce7815d9cde2d13dd2038a2894a6.tar.xz
lib: Implement Hart State Management (HSM) SBI extension
This patch adds support HSM extension. The specification is available at https://github.com/riscv/riscv-sbi-doc. It allows to implement hart hotplug and fixed ordered hart booting in supervisor. Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'include/sbi/sbi_ecall_interface.h')
-rw-r--r--include/sbi/sbi_ecall_interface.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sbi/sbi_ecall_interface.h b/include/sbi/sbi_ecall_interface.h
index ba88e8b..727a545 100644
--- a/include/sbi/sbi_ecall_interface.h
+++ b/include/sbi/sbi_ecall_interface.h
@@ -26,6 +26,7 @@
#define SBI_EXT_TIME 0x54494D45
#define SBI_EXT_IPI 0x735049
#define SBI_EXT_RFENCE 0x52464E43
+#define SBI_EXT_HSM 0x48534D
/* SBI function IDs for BASE extension*/
#define SBI_EXT_BASE_GET_SPEC_VERSION 0x0
@@ -51,6 +52,11 @@
#define SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA 0x5
#define SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID 0x6
+/* SBI function IDs for HSM extension */
+#define SBI_EXT_HSM_HART_START 0x0
+#define SBI_EXT_HSM_HART_STOP 0x1
+#define SBI_EXT_HSM_HART_GET_STATUS 0x2
+
#define SBI_HSM_HART_STATUS_STARTED 0x0
#define SBI_HSM_HART_STATUS_STOPPED 0x1
#define SBI_HSM_HART_STATUS_START_PENDING 0x2