diff options
author | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2006-11-20 15:53:10 +0100 |
---|---|---|
committer | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-04-14 15:20:27 +0200 |
commit | 1f4f2121c2685182eb87fa9a9b799d1917387a1c (patch) | |
tree | 0382acf54d9e4c1eb039bd97cd4dc37004a5aa96 /cpu/at32ap/exception.c | |
parent | df548d3c3e2bbc40258713167859ffc2ce99a900 (diff) | |
download | u-boot-imx-1f4f2121c2685182eb87fa9a9b799d1917387a1c.zip u-boot-imx-1f4f2121c2685182eb87fa9a9b799d1917387a1c.tar.gz u-boot-imx-1f4f2121c2685182eb87fa9a9b799d1917387a1c.tar.bz2 |
AVR32: Relocate u-boot to SDRAM
Relocate the u-boot image into SDRAM like everyone else does. This
means that we can handle much larger .data and .bss than we used to.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'cpu/at32ap/exception.c')
-rw-r--r-- | cpu/at32ap/exception.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cpu/at32ap/exception.c b/cpu/at32ap/exception.c index 4123c44..0672685 100644 --- a/cpu/at32ap/exception.c +++ b/cpu/at32ap/exception.c @@ -24,6 +24,8 @@ #include <asm/sysreg.h> #include <asm/ptrace.h> +DECLARE_GLOBAL_DATA_PTR; + static const char * const cpu_modes[8] = { "Application", "Supervisor", "Interrupt level 0", "Interrupt level 1", "Interrupt level 2", "Interrupt level 3", "Exception", "NMI" @@ -109,11 +111,10 @@ void do_unknown_exception(unsigned int ecr, struct pt_regs *regs) printf("CPU Mode: %s\n", cpu_modes[mode]); /* Avoid exception loops */ - if (regs->sp >= CFG_INIT_SP_ADDR - || regs->sp < (CFG_INIT_SP_ADDR - CONFIG_STACKSIZE)) + if (regs->sp < CFG_SDRAM_BASE || regs->sp >= gd->stack_end) printf("\nStack pointer seems bogus, won't do stack dump\n"); else - dump_mem("\nStack: ", regs->sp, CFG_INIT_SP_ADDR); + dump_mem("\nStack: ", regs->sp, gd->stack_end); panic("Unhandled exception\n"); } |