Skip to content

Commit 1d594b4

Browse files
committed
imx95_a55: guard the stage 1 console on DEBUG_UART and widen the fault dump
1 parent 5df9e95 commit 1d594b4

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎hal/imx95_a55_stage1.c‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,11 @@ static int stage1_read(void *ctx, uint32_t off, uint32_t len, void *buf)
490490
* instruction and the faulting address. */
491491
void imx95_stage1_fault(uint64_t esr, uint64_t elr, uint64_t far)
492492
{
493-
wolfBoot_printf("stage1: exception ESR=0x%x%x ELR=0x%x%x FAR=0x%x%x\n",
493+
/* Two halves, because the small printf may lack long long. The low word
494+
* needs the width or its leading zeros are dropped and the halves run
495+
* together, which misreports the register exactly when it matters. */
496+
wolfBoot_printf("stage1: exception ESR=0x%08x%08x ELR=0x%08x%08x "
497+
"FAR=0x%08x%08x\n",
494498
(unsigned)(esr >> 32), (unsigned)esr,
495499
(unsigned)(elr >> 32), (unsigned)elr,
496500
(unsigned)(far >> 32), (unsigned)far);
@@ -582,8 +586,10 @@ static int stage1_boot(void)
582586
/* Nothing can be reported: this is what the console runs on. */
583587
return -1;
584588
}
589+
#if defined(DEBUG_UART)
585590
uart_init();
586591
wolfBoot_printf("\nwolfBoot stage 1: NXP i.MX95 Cortex-A55\n");
592+
#endif
587593

588594
if (imx95_stage1_platform_init() != 0)
589595
return -1;

0 commit comments

Comments
 (0)