[1/1] lib: sbi: Add debug print when sbi_pmu_init fails
Tan En De
ende.tan at starfivetech.com
Thu Apr 13 22:13:11 PDT 2023
Since sbi_pmu_init is called after sbi_console_init,
the sbi_printf can be called when sbi_pmu_init fails.
Signed-off-by: Tan En De <ende.tan at starfivetech.com>
---
lib/sbi/sbi_init.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/sbi/sbi_init.c b/lib/sbi/sbi_init.c
index a031336..5db8e7f 100644
--- a/lib/sbi/sbi_init.c
+++ b/lib/sbi/sbi_init.c
@@ -290,8 +290,11 @@ static void __noreturn init_coldboot(struct sbi_scratch *scratch, u32 hartid)
sbi_hart_hang();
rc = sbi_pmu_init(scratch, true);
- if (rc)
+ if (rc) {
+ sbi_printf("%s: pmu init failed (error %d)\n",
+ __func__, rc);
sbi_hart_hang();
+ }
sbi_boot_print_banner(scratch);
--
2.34.1
More information about the opensbi
mailing list