summaryrefslogtreecommitdiffstats
path: root/cpu
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-05 18:01:54 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-05 18:01:54 +0200
commit31e28addea7be2014b706b024a1d415588bd8433 (patch)
tree56617cf5582b34e871556c9386abff40db8c18f5 /cpu
parentb9d6d30be8bda6a9e7db71a4b0e13d99e2f5cf59 (diff)
downloadbarebox-31e28addea7be2014b706b024a1d415588bd8433.tar.gz
barebox-31e28addea7be2014b706b024a1d415588bd8433.tar.xz
svn_rev_444
make larger malloc sizes possible
Diffstat (limited to 'cpu')
-rw-r--r--cpu/arm920t/start.S15
1 files changed, 9 insertions, 6 deletions
diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S
index 318a99400f..596f0b4672 100644
--- a/cpu/arm920t/start.S
+++ b/cpu/arm920t/start.S
@@ -79,6 +79,12 @@ _TEXT_BASE:
_armboot_start:
.word _start
+_MALLOC_START:
+ .word _start - CFG_MALLOC_LEN
+
+_STACK_START:
+ .word _start - CFG_MALLOC_LEN - CONFIG_STACKSIZE
+
/*
* These are defined in the board-specific linker script.
*/
@@ -181,8 +187,7 @@ copy_loop:
/* Set up the stack */
stack_setup:
- ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */
- sub r0, r0, #CFG_MALLOC_LEN /* malloc area */
+ ldr r0, _MALLOC_START /* upper 128 KiB: relocated uboot */
#ifdef CONFIG_USE_IRQ
sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
#endif
@@ -290,8 +295,7 @@ cpu_init_crit:
.macro bad_save_user_regs
sub sp, sp, #S_FRAME_SIZE
stmia sp, {r0 - r12} @ Calling r0-r12
- ldr r2, _armboot_start
- sub r2, r2, #(CONFIG_STACKSIZE+CFG_MALLOC_LEN)
+ ldr r2, _STACK_START
sub r2, r2, #(8) @ set base 2 words into abort stack
ldmia r2, {r2 - r3} @ get pc, cpsr
add r0, sp, #S_FRAME_SIZE @ restore sp_SVC
@@ -323,8 +327,7 @@ cpu_init_crit:
.endm
.macro get_bad_stack
- ldr r13, _armboot_start @ setup our mode stack
- sub r13, r13, #(CONFIG_STACKSIZE+CFG_MALLOC_LEN)
+ ldr r2, _STACK_START
sub r13, r13, #(8) @ reserved a couple spots in abort stack
str lr, [r13] @ save caller lr / spsr