forked from Mirrors/opensbi
		
	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>
This commit is contained in:
		@@ -39,6 +39,7 @@ extern struct sbi_ecall_extension ecall_time;
 | 
			
		||||
extern struct sbi_ecall_extension ecall_rfence;
 | 
			
		||||
extern struct sbi_ecall_extension ecall_ipi;
 | 
			
		||||
extern struct sbi_ecall_extension ecall_vendor;
 | 
			
		||||
extern struct sbi_ecall_extension ecall_hsm;
 | 
			
		||||
 | 
			
		||||
u16 sbi_ecall_version_major(void);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user