microblaze: Disable stack protection from bootloader
authorMichal Simek <michal.simek@xilinx.com>
Fri, 23 Aug 2013 05:16:50 +0000 (07:16 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 27 Jan 2014 10:26:32 +0000 (11:26 +0100)
Microblaze without MMU can use stack protection in bootloader
and kernel should clear this setting ASAP.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/microblaze/kernel/head.S

index 817b7eec95b6de981edb751b8d13bd7cb657abd8..b7fb0438458ca8960bd0a730ec9c0da520112136 100644 (file)
@@ -64,6 +64,10 @@ real_start:
 #endif
 
        mts     rmsr, r0
+/* Disable stack protection from bootloader */
+       mts     rslr, r0
+       addi    r8, r0, 0xFFFFFFF
+       mts     rshr, r8
 /*
  * According to Xilinx, msrclr instruction behaves like 'mfs rX,rpc'
  * if the msrclr instruction is not enabled. We use this to detect