mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-10-04 02:20:43 +09:00
avr32: Move stack_end to arch_global_data
Move this field into arch_global_data and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
035cbe99cd
commit
1c865d5897
@ -112,11 +112,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->stack_end - CONFIG_STACKSIZE)
|
if (regs->sp < (gd->arch.stack_end - CONFIG_STACKSIZE)
|
||||||
|| regs->sp >= gd->stack_end)
|
|| regs->sp >= gd->arch.stack_end)
|
||||||
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->stack_end);
|
dump_mem("\nStack: ", regs->sp, gd->arch.stack_end);
|
||||||
|
|
||||||
panic("Unhandled exception\n");
|
panic("Unhandled exception\n");
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
/* Architecture-specific global data */
|
/* Architecture-specific global data */
|
||||||
struct arch_global_data {
|
struct arch_global_data {
|
||||||
|
unsigned long stack_end; /* highest stack address */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -38,7 +39,6 @@ typedef struct global_data {
|
|||||||
bd_t *bd;
|
bd_t *bd;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned int baudrate;
|
unsigned int baudrate;
|
||||||
unsigned long stack_end; /* highest stack address */
|
|
||||||
unsigned long have_console; /* serial_init() was called */
|
unsigned long have_console; /* serial_init() was called */
|
||||||
#ifdef CONFIG_PRE_CONSOLE_BUFFER
|
#ifdef CONFIG_PRE_CONSOLE_BUFFER
|
||||||
unsigned long precon_buf_idx; /* Pre-Console buffer index */
|
unsigned long precon_buf_idx; /* Pre-Console buffer index */
|
||||||
|
@ -231,7 +231,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->stack_end = addr;
|
gd->arch.stack_end = addr;
|
||||||
*(--new_sp) = 0;
|
*(--new_sp) = 0;
|
||||||
*(--new_sp) = 0;
|
*(--new_sp) = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user