lib: sbi: Extend sbi_system_reset() for domains
The sbi_system_reset() should issue platform system reset only if domain of current HART is allowed to do system reset. This patch extends sbi_system_reset() as-per above. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
parent
530e95bd63
commit
3e200370ee
|
@ -37,9 +37,10 @@ void __noreturn sbi_system_reset(u32 platform_reset_type)
|
||||||
/* Stop current HART */
|
/* Stop current HART */
|
||||||
sbi_hsm_hart_stop(scratch, FALSE);
|
sbi_hsm_hart_stop(scratch, FALSE);
|
||||||
|
|
||||||
/* Platform specific reset */
|
/* Platform specific reset if domain allowed system reset */
|
||||||
sbi_platform_system_reset(sbi_platform_ptr(scratch),
|
if (dom->system_reset_allowed)
|
||||||
platform_reset_type);
|
sbi_platform_system_reset(sbi_platform_ptr(scratch),
|
||||||
|
platform_reset_type);
|
||||||
|
|
||||||
/* If platform specific reset did not work then do sbi_exit() */
|
/* If platform specific reset did not work then do sbi_exit() */
|
||||||
sbi_exit(scratch);
|
sbi_exit(scratch);
|
||||||
|
|
Loading…
Reference in New Issue