From a809f406b97cdd699f49a977f031ae9c864fe5c3 Mon Sep 17 00:00:00 2001 From: Atish Patra Date: Mon, 26 Oct 2020 14:03:34 -0700 Subject: 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 Reviewed-by: Anup Patel --- lib/sbi/sbi_init.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) (limited to 'lib/sbi/sbi_init.c') 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; -- cgit v1.2.3