summaryrefslogtreecommitdiffstats
path: root/arch/nios2/cpu/start.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/nios2/cpu/start.S')
-rw-r--r--arch/nios2/cpu/start.S5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/nios2/cpu/start.S b/arch/nios2/cpu/start.S
index 8758e7e847..54787c53ca 100644
--- a/arch/nios2/cpu/start.S
+++ b/arch/nios2/cpu/start.S
@@ -81,6 +81,7 @@ _cur: movhi r5, %hi(_cur - _start)
mov r8, r4
movhi r5, %hi(_start)
ori r5, r5, %lo(_start) /* r5 <- linked _start */
+ mov sp, r5 /* initial stack below u-boot code */
beq r4, r5, 3f
movhi r6, %hi(CONFIG_SYS_MONITOR_LEN)
@@ -100,8 +101,6 @@ _cur: movhi r5, %hi(_cur - _start)
_reloc:
/* STACK INIT -- zero top two words for call back chain. */
- movhi sp, %hi(CONFIG_SYS_INIT_SP)
- ori sp, sp, %lo(CONFIG_SYS_INIT_SP)
addi sp, sp, -8
stw r0, 0(sp)
stw r0, 4(sp)
@@ -159,7 +158,7 @@ relocate_code:
ori r6, r6, %lo(__bss_end)
beq r5, r6, 5f
-4: stwio r0, 0(r5)
+4: stw r0, 0(r5)
addi r5, r5, 4
bne r5, r6, 4b
5:
OpenPOWER on IntegriCloud