diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-09-23 19:19:01 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-10-21 09:31:34 +0300 |
commit | c347408a39eb66c9705ccc0cbd4537149fda938f (patch) | |
tree | 429ba4624a35a0b92004e1bc527de4f73b59614d /lib/sbi/sbi_init.c | |
parent | c10c30b485e286b7ebe3f63897616107fb05ddce (diff) | |
download | opensbi-c347408a39eb66c9705ccc0cbd4537149fda938f.tar.xz |
lib: sbi: Display domain details in boot prints
We extend boot prints to display details of each domain. In the
process, we remove sbi_hart_pmp_dump() because it shows redundant
information which domain details already show.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_init.c')
-rw-r--r-- | lib/sbi/sbi_init.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/lib/sbi/sbi_init.c b/lib/sbi/sbi_init.c index 406cb3f..5151d36 100644 --- a/lib/sbi/sbi_init.c +++ b/lib/sbi/sbi_init.c @@ -39,6 +39,7 @@ static void sbi_boot_prints(struct sbi_scratch *scratch, u32 hartid) { int xlen; char str[128]; + const struct sbi_domain *dom = sbi_domain_thishart_ptr(); const struct sbi_platform *plat = sbi_platform_ptr(scratch); #ifdef OPENSBI_VERSION_GIT @@ -64,27 +65,29 @@ static void sbi_boot_prints(struct sbi_scratch *scratch, u32 hartid) sbi_printf("Platform HART Count : %u\n", sbi_platform_hart_count(plat)); - /* Boot HART details */ - sbi_printf("Boot HART ID : %u\n", hartid); - misa_string(xlen, str, sizeof(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)); - /* Firmware details */ sbi_printf("Firmware Base : 0x%lx\n", scratch->fw_start); sbi_printf("Firmware Size : %d KB\n", (u32)(scratch->fw_size / 1024)); - /* Generic details */ + /* SBI details */ sbi_printf("Runtime SBI Version : %d.%d\n", sbi_ecall_version_major(), sbi_ecall_version_minor()); sbi_printf("\n"); - sbi_hart_delegation_dump(scratch); - sbi_hart_pmp_dump(scratch); + /* Domain details */ + sbi_domain_dump_all(""); + + /* Boot HART details */ + 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_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 ", " "); } static spinlock_t coldboot_lock = SPIN_LOCK_INITIALIZER; |