mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
lib: sbi: Allow platform to influence cold boot HART selection
We add an optional cold_boot_allowed() platform callback which allows platform support to decide which HARTs can do cold boot initialization. If this platform callback is not available then any HART can do cold boot initialization. Signed-off-by: Anup Patel <apatel@ventanamicro.com>
This commit is contained in:
@@ -498,8 +498,11 @@ void __noreturn sbi_init(struct sbi_scratch *scratch)
|
||||
* HARTs which satisfy above condition.
|
||||
*/
|
||||
|
||||
if (next_mode_supported && atomic_xchg(&coldboot_lottery, 1) == 0)
|
||||
coldboot = true;
|
||||
if (sbi_platform_cold_boot_allowed(plat, hartid)) {
|
||||
if (next_mode_supported &&
|
||||
atomic_xchg(&coldboot_lottery, 1) == 0)
|
||||
coldboot = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Do platform specific nascent (very early) initialization so
|
||||
|
Reference in New Issue
Block a user