
Hi Stephen,
On Tue, Mar 20, 2012 at 5:34 PM, Stephen Warren swarren@wwwdotorg.org wrote:
On 03/20/2012 05:22 PM, Simon Glass wrote:
On Tue, Mar 20, 2012 at 3:26 PM, Graeme Russ graeme.russ@gmail.com wrote:
...
OK, so what about in panic(): - If gd->have_console is not set: o call the board specific setup_panic_uarts() o call print_pre_console_buffer() passing panic_putc() o call panic_putc() for all characters in str[] - If gd->have_console is set: o call putc() for all characters in str[]
setup_panic_uarts() and panic_putc() are overriden in the board files
I think this is where we got to last time.
The act of calling this pre-console panic function is destructive - it may hang the board and output data to UARTs.
Why would it hang? Well, I assume you're talking about hanging before actually emitting the panic text, rather than looping afterwards as a deliberate choice. I'd consider an accidental hang that prevented the message being seen as a bug.
No I would hope it would output the data first. I was merely pointing out that the board function may decide to hang rather than return (although I feel it is safe to return since it is being called from panic() anyway).
Regards, Simon