mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
avr32: use generic gd->start_addr_sp
Before avr32 had an extra storage for stack end to have a nice stack printout on exception. Remove this extra storage and use generic gd->start_addr_sp instead. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
This commit is contained in:
parent
186678600a
commit
4db896236c
3 changed files with 4 additions and 5 deletions
|
|
@ -96,11 +96,11 @@ void do_unknown_exception(unsigned int ecr, struct pt_regs *regs)
|
||||||
printf("CPU Mode: %s\n", cpu_modes[mode]);
|
printf("CPU Mode: %s\n", cpu_modes[mode]);
|
||||||
|
|
||||||
/* Avoid exception loops */
|
/* Avoid exception loops */
|
||||||
if (regs->sp < (gd->arch.stack_end - CONFIG_STACKSIZE)
|
if (regs->sp < (gd->start_addr_sp - CONFIG_STACKSIZE) ||
|
||||||
|| regs->sp >= gd->arch.stack_end)
|
regs->sp >= gd->start_addr_sp)
|
||||||
printf("\nStack pointer seems bogus, won't do stack dump\n");
|
printf("\nStack pointer seems bogus, won't do stack dump\n");
|
||||||
else
|
else
|
||||||
dump_mem("\nStack: ", regs->sp, gd->arch.stack_end);
|
dump_mem("\nStack: ", regs->sp, gd->start_addr_sp);
|
||||||
|
|
||||||
panic("Unhandled exception\n");
|
panic("Unhandled exception\n");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
/* Architecture-specific global data */
|
/* Architecture-specific global data */
|
||||||
struct arch_global_data {
|
struct arch_global_data {
|
||||||
unsigned long stack_end; /* highest stack address */
|
|
||||||
unsigned long cpu_hz; /* cpu core clock frequency */
|
unsigned long cpu_hz; /* cpu core clock frequency */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ void board_init_f(ulong board_type)
|
||||||
|
|
||||||
/* And finally, a new, bigger stack. */
|
/* And finally, a new, bigger stack. */
|
||||||
new_sp = (unsigned long *)addr;
|
new_sp = (unsigned long *)addr;
|
||||||
gd->arch.stack_end = addr;
|
gd->start_addr_sp = addr;
|
||||||
*(--new_sp) = 0;
|
*(--new_sp) = 0;
|
||||||
*(--new_sp) = 0;
|
*(--new_sp) = 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue