diff options
| author | Anup Patel <[email protected]> | 2020-09-19 17:23:46 +0530 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2020-10-20 14:03:40 +0530 |
| commit | 3e200370eeda75917a0711d8995391bbbaf58b97 (patch) | |
| tree | 5812e41d7a62b94db7836b607e90fa1d91de738e | |
| parent | 530e95bd63f60337140ffa55de335e9acc3811b4 (diff) | |
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 <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
| -rw-r--r-- | lib/sbi/sbi_system.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/sbi/sbi_system.c b/lib/sbi/sbi_system.c index a938003f..96290b30 100644 --- a/lib/sbi/sbi_system.c +++ b/lib/sbi/sbi_system.c @@ -37,9 +37,10 @@ void __noreturn sbi_system_reset(u32 platform_reset_type) /* Stop current HART */ sbi_hsm_hart_stop(scratch, FALSE); - /* Platform specific reset */ - sbi_platform_system_reset(sbi_platform_ptr(scratch), - platform_reset_type); + /* Platform specific reset if domain allowed system reset */ + if (dom->system_reset_allowed) + sbi_platform_system_reset(sbi_platform_ptr(scratch), + platform_reset_type); /* If platform specific reset did not work then do sbi_exit() */ sbi_exit(scratch); |
