diff options
author | Atish Patra <atish.patra@wdc.com> | 2020-10-27 00:03:34 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-10-26 20:29:09 +0300 |
commit | a809f406b97cdd699f49a977f031ae9c864fe5c3 (patch) | |
tree | 2122d92f5509f5e0a0e23571e7602e698b655a71 /lib | |
parent | bf21632860b4e9974967765b747d1d4b7df346bb (diff) | |
download | opensbi-a809f406b97cdd699f49a977f031ae9c864fe5c3.tar.xz |
lib: sbi: Improve boot time print with additional PMP information
We know about pmp granularity and number of bits supported by PMP.
Show those information in the boot time info print
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sbi/sbi_init.c | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/lib/sbi/sbi_init.c b/lib/sbi/sbi_init.c index 5151d36..15ae9da 100644 --- a/lib/sbi/sbi_init.c +++ b/lib/sbi/sbi_init.c @@ -59,35 +59,44 @@ static void sbi_boot_prints(struct sbi_scratch *scratch, u32 hartid) } /* Platform details */ - sbi_printf("Platform Name : %s\n", sbi_platform_name(plat)); + sbi_printf("Platform Name : %s\n", + sbi_platform_name(plat)); sbi_platform_get_features_str(plat, str, sizeof(str)); - sbi_printf("Platform Features : %s\n", str); - sbi_printf("Platform HART Count : %u\n", + sbi_printf("Platform Features : %s\n", str); + sbi_printf("Platform HART Count : %u\n", sbi_platform_hart_count(plat)); /* Firmware details */ - sbi_printf("Firmware Base : 0x%lx\n", scratch->fw_start); - sbi_printf("Firmware Size : %d KB\n", + sbi_printf("Firmware Base : 0x%lx\n", scratch->fw_start); + sbi_printf("Firmware Size : %d KB\n", (u32)(scratch->fw_size / 1024)); /* SBI details */ - sbi_printf("Runtime SBI Version : %d.%d\n", + sbi_printf("Runtime SBI Version : %d.%d\n", sbi_ecall_version_major(), sbi_ecall_version_minor()); sbi_printf("\n"); /* Domain details */ - sbi_domain_dump_all(""); + sbi_domain_dump_all(" "); /* Boot HART details */ - sbi_printf("Boot HART ID : %u\n", hartid); - sbi_printf("Boot HART Domain : %s\n", dom->name); + sbi_printf("Boot HART ID : %u\n", hartid); + sbi_printf("Boot HART Domain : %s\n", dom->name); misa_string(xlen, str, sizeof(str)); - sbi_printf("Boot HART ISA : %s\n", str); + sbi_printf("Boot HART ISA : %s\n", str); sbi_hart_get_features_str(scratch, str, sizeof(str)); - sbi_printf("Boot HART Features : %s\n", str); - sbi_printf("Boot HART PMP Count : %d\n", sbi_hart_pmp_count(scratch)); - sbi_printf("Boot HART MHPM Count: %d\n", sbi_hart_mhpm_count(scratch)); - sbi_hart_delegation_dump(scratch, "Boot HART ", " "); + sbi_printf("Boot HART Features : %s\n", str); + sbi_printf("Boot HART PMP Count : %d\n", + sbi_hart_pmp_count(scratch)); + sbi_printf("Boot HART PMP Granularity : %lu\n", + sbi_hart_pmp_granularity(scratch)); + sbi_printf("Boot HART PMP Address Bits: %d\n", + sbi_hart_pmp_addrbits(scratch)); + sbi_printf("Boot HART MHPM Count : %d\n", + sbi_hart_mhpm_count(scratch)); + sbi_printf("Boot HART MHPM Count : %d\n", + sbi_hart_mhpm_count(scratch)); + sbi_hart_delegation_dump(scratch, "Boot HART ", " "); } static spinlock_t coldboot_lock = SPIN_LOCK_INITIALIZER; |