mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-03-15 19:31:32 +00:00
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>
This commit is contained in:
parent
f5dfd99139
commit
7919530308
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue