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>
This commit is contained in:
parent
822d43a6d9
commit
da931af1b5
|
|
@ -23,11 +23,15 @@ _start:
|
||||||
|
|
||||||
mts rmsr, r0 /* disable cache */
|
mts rmsr, r0 /* disable cache */
|
||||||
|
|
||||||
|
addi r8, r0, __end
|
||||||
|
mts rslr, r8
|
||||||
#if defined(CONFIG_SPL_BUILD)
|
#if defined(CONFIG_SPL_BUILD)
|
||||||
addi r1, r0, CONFIG_SPL_STACK_ADDR
|
addi r1, r0, CONFIG_SPL_STACK_ADDR
|
||||||
|
mts rshr, r1
|
||||||
addi r1, r1, -4 /* Decrement SP to top of memory */
|
addi r1, r1, -4 /* Decrement SP to top of memory */
|
||||||
#else
|
#else
|
||||||
addi r1, r0, CONFIG_SYS_INIT_SP_OFFSET
|
addi r1, r0, CONFIG_SYS_INIT_SP_OFFSET
|
||||||
|
mts rshr, r1
|
||||||
addi r1, r1, -4 /* Decrement SP to top of memory */
|
addi r1, r1, -4 /* Decrement SP to top of memory */
|
||||||
|
|
||||||
/* Find-out if u-boot is running on BIG/LITTLE endian platform
|
/* Find-out if u-boot is running on BIG/LITTLE endian platform
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue