From 04f7df5604361fb2b8bd968e57cd035883e89b18 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Tue, 4 Nov 2014 13:30:14 +0100 Subject: [PATCH] microblaze: Support stack protection feature Ensure that stack didn't rewrite important part of u-boot. Signed-off-by: Michal Simek --- arch/microblaze/cpu/start.S | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S index f46603142d8..d5a470a3d51 100644 --- a/arch/microblaze/cpu/start.S +++ b/arch/microblaze/cpu/start.S @@ -23,11 +23,17 @@ _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 -- 2.47.3