arm: Put exception_stack into BSS

"Hey guys, I have this awesome idea! How about we put a huge array
filled with 0xa5 into the data segment of our uncompressed romstage
for no particular reason? Give our SPI driver something to do so it
doesn't get too bored, you know?"

Guess it pays off to just hexdump our image and sanity-check it top to
bottom every once in a while...

Also reduces the size because 8K is crazy just to print a bunch of
registers (256 bytes ought to be enough for anybody).

BUG=None
TEST=Triggered an exception, still works as expected (and verified
romstage load size on Nyan is notably smaller now).

Change-Id: Icec0a711a1b5140d2ebcd98338ec638a4b6262fa
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/176762
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Ronald Minnich <rminnich@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
Julius Werner 2013-11-13 12:49:45 -08:00 committed by chrome-internal-fetch
commit 61c360a1c3
4 changed files with 10 additions and 8 deletions

View file

@ -34,6 +34,8 @@
void exception_test(void);
static int test_abort;
uint8_t exception_stack[0x100] __attribute__((aligned(8)));
extern void *exception_stack_end;
void exception_undefined_instruction(uint32_t *);
void exception_software_interrupt(uint32_t *);
@ -167,6 +169,7 @@ void exception_init(void)
extern uint32_t exception_table[];
set_vbar((uintptr_t)exception_table);
exception_stack_end = exception_stack + sizeof(exception_stack);
test_abort = 1;
exception_test();

View file

@ -27,11 +27,9 @@
* SUCH DAMAGE.
*/
exception_stack:
.align 5
.skip 0x2000, 0xa5
.global exception_stack_end
exception_stack_end:
.word exception_stack_end
.word 0
exception_handler:
.word 0

View file

@ -35,6 +35,8 @@
void exception_test(void);
static int test_abort;
uint8_t exception_stack[0x100] __attribute__((aligned(8)));
extern void *exception_stack_end;
void exception_undefined_instruction(uint32_t *);
void exception_software_interrupt(uint32_t *);
@ -168,6 +170,7 @@ void exception_init(void)
extern uint32_t exception_table[];
set_vbar((uintptr_t)exception_table);
exception_stack_end = exception_stack + sizeof(exception_stack);
test_abort = 1;
printk(BIOS_ERR, "Testing exceptions\n");

View file

@ -27,11 +27,9 @@
* SUCH DAMAGE.
*/
exception_stack:
.align 5
.skip 0x2000, 0xa5
.global exception_stack_end
exception_stack_end:
.word exception_stack_end
.word 0
exception_handler:
.word 0