mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
lib: sbi: Improve the alignment of boot-time prints
Addition of "Experimental SBI Extensions" to the boot-time prints disturbs the alignment of other prints so adjust all boot-time prints accordingly. Signed-off-by: Anup Patel <apatel@ventanamicro.com>
This commit is contained in:
@@ -83,56 +83,56 @@ static void sbi_boot_print_general(struct sbi_scratch *scratch)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* Platform details */
|
/* Platform details */
|
||||||
sbi_printf("Platform Name : %s\n",
|
sbi_printf("Platform Name : %s\n",
|
||||||
sbi_platform_name(plat));
|
sbi_platform_name(plat));
|
||||||
sbi_platform_get_features_str(plat, str, sizeof(str));
|
sbi_platform_get_features_str(plat, str, sizeof(str));
|
||||||
sbi_printf("Platform Features : %s\n", str);
|
sbi_printf("Platform Features : %s\n", str);
|
||||||
sbi_printf("Platform HART Count : %u\n",
|
sbi_printf("Platform HART Count : %u\n",
|
||||||
sbi_platform_hart_count(plat));
|
sbi_platform_hart_count(plat));
|
||||||
idev = sbi_ipi_get_device();
|
idev = sbi_ipi_get_device();
|
||||||
sbi_printf("Platform IPI Device : %s\n",
|
sbi_printf("Platform IPI Device : %s\n",
|
||||||
(idev) ? idev->name : "---");
|
(idev) ? idev->name : "---");
|
||||||
tdev = sbi_timer_get_device();
|
tdev = sbi_timer_get_device();
|
||||||
sbi_printf("Platform Timer Device : %s @ %luHz\n",
|
sbi_printf("Platform Timer Device : %s @ %luHz\n",
|
||||||
(tdev) ? tdev->name : "---",
|
(tdev) ? tdev->name : "---",
|
||||||
(tdev) ? tdev->timer_freq : 0);
|
(tdev) ? tdev->timer_freq : 0);
|
||||||
cdev = sbi_console_get_device();
|
cdev = sbi_console_get_device();
|
||||||
sbi_printf("Platform Console Device : %s\n",
|
sbi_printf("Platform Console Device : %s\n",
|
||||||
(cdev) ? cdev->name : "---");
|
(cdev) ? cdev->name : "---");
|
||||||
hdev = sbi_hsm_get_device();
|
hdev = sbi_hsm_get_device();
|
||||||
sbi_printf("Platform HSM Device : %s\n",
|
sbi_printf("Platform HSM Device : %s\n",
|
||||||
(hdev) ? hdev->name : "---");
|
(hdev) ? hdev->name : "---");
|
||||||
pdev = sbi_pmu_get_device();
|
pdev = sbi_pmu_get_device();
|
||||||
sbi_printf("Platform PMU Device : %s\n",
|
sbi_printf("Platform PMU Device : %s\n",
|
||||||
(pdev) ? pdev->name : "---");
|
(pdev) ? pdev->name : "---");
|
||||||
srdev = sbi_system_reset_get_device(SBI_SRST_RESET_TYPE_COLD_REBOOT, 0);
|
srdev = sbi_system_reset_get_device(SBI_SRST_RESET_TYPE_COLD_REBOOT, 0);
|
||||||
sbi_printf("Platform Reboot Device : %s\n",
|
sbi_printf("Platform Reboot Device : %s\n",
|
||||||
(srdev) ? srdev->name : "---");
|
(srdev) ? srdev->name : "---");
|
||||||
srdev = sbi_system_reset_get_device(SBI_SRST_RESET_TYPE_SHUTDOWN, 0);
|
srdev = sbi_system_reset_get_device(SBI_SRST_RESET_TYPE_SHUTDOWN, 0);
|
||||||
sbi_printf("Platform Shutdown Device : %s\n",
|
sbi_printf("Platform Shutdown Device : %s\n",
|
||||||
(srdev) ? srdev->name : "---");
|
(srdev) ? srdev->name : "---");
|
||||||
susp_dev = sbi_system_suspend_get_device();
|
susp_dev = sbi_system_suspend_get_device();
|
||||||
sbi_printf("Platform Suspend Device : %s\n",
|
sbi_printf("Platform Suspend Device : %s\n",
|
||||||
(susp_dev) ? susp_dev->name : "---");
|
(susp_dev) ? susp_dev->name : "---");
|
||||||
cppc_dev = sbi_cppc_get_device();
|
cppc_dev = sbi_cppc_get_device();
|
||||||
sbi_printf("Platform CPPC Device : %s\n",
|
sbi_printf("Platform CPPC Device : %s\n",
|
||||||
(cppc_dev) ? cppc_dev->name : "---");
|
(cppc_dev) ? cppc_dev->name : "---");
|
||||||
|
|
||||||
/* Firmware details */
|
/* Firmware details */
|
||||||
sbi_printf("Firmware Base : 0x%lx\n", scratch->fw_start);
|
sbi_printf("Firmware Base : 0x%lx\n", scratch->fw_start);
|
||||||
sbi_printf("Firmware Size : %d KB\n",
|
sbi_printf("Firmware Size : %d KB\n",
|
||||||
(u32)(scratch->fw_size / 1024));
|
(u32)(scratch->fw_size / 1024));
|
||||||
sbi_printf("Firmware RW Offset : 0x%lx\n", scratch->fw_rw_offset);
|
sbi_printf("Firmware RW Offset : 0x%lx\n", scratch->fw_rw_offset);
|
||||||
sbi_printf("Firmware RW Size : %d KB\n",
|
sbi_printf("Firmware RW Size : %d KB\n",
|
||||||
(u32)((scratch->fw_size - scratch->fw_rw_offset) / 1024));
|
(u32)((scratch->fw_size - scratch->fw_rw_offset) / 1024));
|
||||||
sbi_printf("Firmware Heap Offset : 0x%lx\n", scratch->fw_heap_offset);
|
sbi_printf("Firmware Heap Offset : 0x%lx\n", scratch->fw_heap_offset);
|
||||||
sbi_printf("Firmware Heap Size : "
|
sbi_printf("Firmware Heap Size : "
|
||||||
"%d KB (total), %d KB (reserved), %d KB (used), %d KB (free)\n",
|
"%d KB (total), %d KB (reserved), %d KB (used), %d KB (free)\n",
|
||||||
(u32)(scratch->fw_heap_size / 1024),
|
(u32)(scratch->fw_heap_size / 1024),
|
||||||
(u32)(sbi_heap_reserved_space() / 1024),
|
(u32)(sbi_heap_reserved_space() / 1024),
|
||||||
(u32)(sbi_heap_used_space() / 1024),
|
(u32)(sbi_heap_used_space() / 1024),
|
||||||
(u32)(sbi_heap_free_space() / 1024));
|
(u32)(sbi_heap_free_space() / 1024));
|
||||||
sbi_printf("Firmware Scratch Size : "
|
sbi_printf("Firmware Scratch Size : "
|
||||||
"%d B (total), %d B (used), %d B (free)\n",
|
"%d B (total), %d B (used), %d B (free)\n",
|
||||||
SBI_SCRATCH_SIZE,
|
SBI_SCRATCH_SIZE,
|
||||||
(u32)sbi_scratch_used_space(),
|
(u32)sbi_scratch_used_space(),
|
||||||
@@ -154,7 +154,7 @@ static void sbi_boot_print_domains(struct sbi_scratch *scratch)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* Domain details */
|
/* Domain details */
|
||||||
sbi_domain_dump_all(" ");
|
sbi_domain_dump_all(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sbi_boot_print_hart(struct sbi_scratch *scratch, u32 hartid)
|
static void sbi_boot_print_hart(struct sbi_scratch *scratch, u32 hartid)
|
||||||
@@ -174,26 +174,26 @@ static void sbi_boot_print_hart(struct sbi_scratch *scratch, u32 hartid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Boot HART details */
|
/* Boot HART details */
|
||||||
sbi_printf("Boot HART ID : %u\n", hartid);
|
sbi_printf("Boot HART ID : %u\n", hartid);
|
||||||
sbi_printf("Boot HART Domain : %s\n", dom->name);
|
sbi_printf("Boot HART Domain : %s\n", dom->name);
|
||||||
sbi_hart_get_priv_version_str(scratch, str, sizeof(str));
|
sbi_hart_get_priv_version_str(scratch, str, sizeof(str));
|
||||||
sbi_printf("Boot HART Priv Version : %s\n", str);
|
sbi_printf("Boot HART Priv Version : %s\n", str);
|
||||||
misa_string(xlen, str, sizeof(str));
|
misa_string(xlen, str, sizeof(str));
|
||||||
sbi_printf("Boot HART Base ISA : %s\n", str);
|
sbi_printf("Boot HART Base ISA : %s\n", str);
|
||||||
sbi_hart_get_extensions_str(scratch, str, sizeof(str));
|
sbi_hart_get_extensions_str(scratch, str, sizeof(str));
|
||||||
sbi_printf("Boot HART ISA Extensions : %s\n", str);
|
sbi_printf("Boot HART ISA Extensions : %s\n", str);
|
||||||
sbi_printf("Boot HART PMP Count : %d\n",
|
sbi_printf("Boot HART PMP Count : %d\n",
|
||||||
sbi_hart_pmp_count(scratch));
|
sbi_hart_pmp_count(scratch));
|
||||||
sbi_printf("Boot HART PMP Granularity : %u bits\n",
|
sbi_printf("Boot HART PMP Granularity : %u bits\n",
|
||||||
sbi_hart_pmp_log2gran(scratch));
|
sbi_hart_pmp_log2gran(scratch));
|
||||||
sbi_printf("Boot HART PMP Address Bits: %d\n",
|
sbi_printf("Boot HART PMP Address Bits : %d\n",
|
||||||
sbi_hart_pmp_addrbits(scratch));
|
sbi_hart_pmp_addrbits(scratch));
|
||||||
sbi_printf("Boot HART MHPM Info : %lu (0x%08x)\n",
|
sbi_printf("Boot HART MHPM Info : %lu (0x%08x)\n",
|
||||||
sbi_popcount(sbi_hart_mhpm_mask(scratch)),
|
sbi_popcount(sbi_hart_mhpm_mask(scratch)),
|
||||||
sbi_hart_mhpm_mask(scratch));
|
sbi_hart_mhpm_mask(scratch));
|
||||||
sbi_printf("Boot HART Debug Triggers : %d triggers\n",
|
sbi_printf("Boot HART Debug Triggers : %d triggers\n",
|
||||||
sbi_dbtr_get_total_triggers());
|
sbi_dbtr_get_total_triggers());
|
||||||
sbi_hart_delegation_dump(scratch, "Boot HART ", " ");
|
sbi_hart_delegation_dump(scratch, "Boot HART ", " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned long coldboot_done;
|
static unsigned long coldboot_done;
|
||||||
|
Reference in New Issue
Block a user