From 1f64fef919fc5739df6c3395a9abd256dc88cb24 Mon Sep 17 00:00:00 2001 From: Anup Patel Date: Tue, 11 Feb 2025 21:06:23 +0530 Subject: lib: sbi: Fix non-root domain startup Currently, the sbi_sse_init() in cold boot path is called after sbi_domain_finalize() so boot HART of non-root domains will start before SSE cold boot init which can cause warm boot of such HARTs to crash in sbi_sse_init(). To address the above issue, factor-out the non-root domain startup from sbi_domain_finalize() function as a separate sbi_domain_startup() function which can be called after sbi_sse_init() in cold boot path. Fixes: 93f7d819fdeb ("lib: sbi: sse: allow adding new events") Signed-off-by: Anup Patel --- include/sbi/sbi_domain.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/sbi/sbi_domain.h b/include/sbi/sbi_domain.h index 8a2b123d..e9cff0b1 100644 --- a/include/sbi/sbi_domain.h +++ b/include/sbi/sbi_domain.h @@ -307,8 +307,11 @@ int sbi_domain_register(struct sbi_domain *dom, int sbi_domain_root_add_memrange(unsigned long addr, unsigned long size, unsigned long align, unsigned long region_flags); -/** Finalize domain tables and startup non-root domains */ -int sbi_domain_finalize(struct sbi_scratch *scratch, u32 cold_hartid); +/** Startup non-root domains */ +int sbi_domain_startup(struct sbi_scratch *scratch, u32 cold_hartid); + +/** Finalize domain tables */ +int sbi_domain_finalize(struct sbi_scratch *scratch); /** Initialize domains */ int sbi_domain_init(struct sbi_scratch *scratch, u32 cold_hartid); -- cgit v1.3.1