forked from Mirrors/opensbi
		
	lib: Handle failure of sbi_hartid_to_scratch() API
The sbi_hartid_to_scratch() API can fail for non-existent HARTs so all uses of sbi_hartid_to_scratch() API should check return value. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
		@@ -17,6 +17,7 @@
 | 
			
		||||
#define SBI_HART_STOPPING	1
 | 
			
		||||
#define SBI_HART_STARTING	2
 | 
			
		||||
#define SBI_HART_STARTED	3
 | 
			
		||||
#define SBI_HART_UNKNOWN	4
 | 
			
		||||
 | 
			
		||||
int sbi_hsm_init(struct sbi_scratch *scratch, u32 hartid, bool cold_boot);
 | 
			
		||||
void __noreturn sbi_hsm_exit(struct sbi_scratch *scratch);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user