[U-Boot] [PATCH] [RFC] Early serial debug console

Peter Tyser ptyser at xes-inc.com
Fri Aug 15 23:16:41 CEST 2008


The following 3 patches enable a basic serial console while U-Boot is still
executing out of flash.  When enabled, the user is dropped to the debug
console when an error occurs in a function in the init_sequence[].  The
user can also drop to a debug console by pressing ctrl-c during bootup.
Many commands do not work since interrupts aren't enabled (no sleeping),
the bss segment hasn't been zeroed out, and the data section can't be
written to.  The i2c and memory commands were updated to work while
executing from flash to aide in programming SPD's and debugging
SDRAM issues.

The code has been tested on an mpc8548 and mpc8572 SBC.  An example session
is pasted below where the SPD has been corrupted.

These patches assume that the previous 2 patches sent out ("mod_i2c_mem()
bugfix" and "Replace references to extern console_buffer with a function call"
have been applied.

Does anyone have suggestions/comments?  Any chance this feature could make
it into mainline U-Boot?

Thanks for any criticism/comments,
Peter



Sample output with corrupted SPD:

U-Boot 1.3.4-00113-g8b3bc07 (Aug 15 2008 - 14:26:37)

CPU:   8572E, Version: 1.0, (0x80e80010)
Core:  E500, Version: 3.0, (0x80210030)
Clock Configuration:
       CPU0:1500 MHz, CPU1:1500 MHz, CCB: 600 MHz,
       DDR: 300 MHz (600 MT/s data rate) (Synchronous), LBC:  75 MHz
L1:    D-cache 32 kB enabled
       I-cache 32 kB enabled
Board: X-ES XPedite5370 3U VPX SBC
I2C:   ready
DRAM:  DDR: No DIMMs found.
*** failed ***
ERROR: init function at fff894bc failed
(debug) => imm 54 200.2
00000200: 00 ? 80
00000201: 00 ? 8
00000202: 00 ? 8
00000203: 0e ? .
(debug) => reset

U-Boot 1.3.4-00113-g8b3bc07 (Aug 15 2008 - 14:26:37)

SPD fixed, board boots...



More information about the U-Boot mailing list