summaryrefslogtreecommitdiff
path: root/arch/microblaze/cpu/start.S
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2014-11-04 13:30:14 +0100
committerMichal Simek <michal.simek@xilinx.com>2015-01-21 10:33:07 +0100
commitda931af1b5eaae36dd9e3fb2eaf6b62201ed3a43 (patch)
tree51c53fc91a0076fc41505f8673cec6c54a779e8f /arch/microblaze/cpu/start.S
parent822d43a6d90223db043d1610895c8e8b82e5ba5b (diff)
microblaze: Support stack protection feature
Ensure that stack didn't rewrite important part of u-boot. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/microblaze/cpu/start.S')
-rw-r--r--arch/microblaze/cpu/start.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S
index f46603142d..84c29e5409 100644
--- a/arch/microblaze/cpu/start.S
+++ b/arch/microblaze/cpu/start.S
@@ -23,11 +23,15 @@ _start:
mts rmsr, r0 /* disable cache */
+ addi r8, r0, __end
+ mts rslr, r8
#if defined(CONFIG_SPL_BUILD)
addi r1, r0, CONFIG_SPL_STACK_ADDR
+ mts rshr, r1
addi r1, r1, -4 /* Decrement SP to top of memory */
#else
addi r1, r0, CONFIG_SYS_INIT_SP_OFFSET
+ mts rshr, r1
addi r1, r1, -4 /* Decrement SP to top of memory */
/* Find-out if u-boot is running on BIG/LITTLE endian platform