Files
OpenCellular/include
Simon Glass 3439e70a90 Convert panic() to C code
Move the implementation of panic into C code. Only a very small part
needs to be in assembler, and the reset is easier to maintain as C.

As part of this, define panic_putc() and panic_puts() which directly
wite to the UART.

To make things more convenience for the future, add a simple printf()
implementation in the panic path. This is not reliant on the uart
buffering system being in a happy state. However, we do call the
emergency flush so that our panic message will appear after previous
output rather that surpressing it (which would be extremely confusing).

Code/data size for panic.o grows by about 200 bytes, but this is mostly
due to the increased flexibility.

   text	   data	    bss	    dec	    hex	filename
    292	    272	      0	    564	    234	old panic.S
    692	      3	     48	    743	    2e7	new panic.c

BUG=chrome-os-partner:10146
TEST=manual:
build and boot on snow:
> rw 0x06000000

=== EXCEPTION: 03 ====== xPSR: 01000000 ===========
r0 :0000000b r1 :00000047 r2 :06000000 r3 :200013dd
r4 :00000000 r5 :080052cc r6 :200013d0 r7 :00000002
r8 :00000000 r9 :200013de r10:00000000 r11:00000000
r12:00000000 sp :200009a0 lr :08002a5d pc :08003962

Rebooting...

Change-Id: If3e3f572e0f32af780b6ebda235b1b3cde4de5e4
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/24503
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2012-06-08 17:55:40 -07:00
..
2012-04-19 13:08:58 -07:00
2012-04-19 11:08:28 -07:00
2012-04-19 11:08:28 -07:00
2012-04-24 09:59:31 -07:00
2011-12-07 19:10:02 +00:00
2012-04-10 14:09:40 -07:00
2012-05-15 18:34:50 -07:00
2012-05-17 12:22:39 -07:00
2012-05-31 15:03:17 -07:00
2012-01-11 11:37:55 -08:00
2012-06-07 09:59:55 -07:00
2011-12-07 19:10:02 +00:00
2012-06-08 17:55:40 -07:00
2012-04-19 13:08:58 -07:00
2012-04-19 11:08:28 -07:00
2011-12-07 19:10:02 +00:00
2011-12-07 19:10:02 +00:00
2012-05-30 13:12:34 -07:00
2012-04-06 09:06:53 -07:00
2012-05-22 14:22:13 -07:00
2012-04-24 17:46:54 -07:00