diff options
| author | Tan En De <ende.tan@starfivetech.com> | 2023-04-14 13:13:11 +0800 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2023-04-20 14:19:44 +0530 |
| commit | 791953030836d39687688a8e7f1a3e708892cfa1 (patch) | |
| tree | 115b7e73f279e9504516dfc2f676268dd518b780 | |
| parent | f5dfd991396891d87d7780be45f887bc9ed13099 (diff) | |
| download | opensbi-791953030836d39687688a8e7f1a3e708892cfa1.tar.gz opensbi-791953030836d39687688a8e7f1a3e708892cfa1.zip | |
lib: sbi: Add debug print when sbi_pmu_init fails
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@starfivetech.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
| -rw-r--r-- | lib/sbi/sbi_init.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sbi/sbi_init.c b/lib/sbi/sbi_init.c index a0313367..5db8e7f6 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); |
