Skip to contentSkip to conversation

i.MX28: Fix initial stack pointer position

PATCH New Marek Vasut 2 participants 2 messages Apr 2, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i.MX28: Fix initial stack pointer position

The patch:

m28evk: Use GENERATED_GBL_DATA_SIZE
commit 1084606c972ea5f1d89f69bdbd978b867d0ee521

introduced usage of GENERATED_GBL_DATA_SIZE and calculation of initial stack pointer position defived from that. Due to a small typo, the SP position moved to 0x21f80, which is past the SRAM area. This didn't manifest on the real hardware as the SRAM repeats there (address bits in the CPU being ignored).

Though this was caught in QEMU, where it crashed the emulator.

Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>
---
 include/configs/m28evk.h  |    2 +-
 include/configs/mx28evk.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

NOTE: I'll get a Tested-by on M28EVK ASAP, probably on wednesday.

include/configs/m28evk.h +1 -1
index 9de4521..8526dd4 100644
@@ -96,7 +96,7 @@
 #define	CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
 /* Point initial SP in SRAM so SPL can use it too. */
 
-#define CONFIG_SYS_INIT_RAM_ADDR	0x00002000
+#define CONFIG_SYS_INIT_RAM_ADDR	0x00000000
 #define CONFIG_SYS_INIT_RAM_SIZE	(128 * 1024)
 
 #define CONFIG_SYS_INIT_SP_OFFSET \
include/configs/mx28evk.h +1 -1
index 705fdab..02f3366 100644
@@ -81,7 +81,7 @@
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
 /* Point initial SP in SRAM so SPL can use it too. */
 
-#define CONFIG_SYS_INIT_RAM_ADDR	0x00002000
+#define CONFIG_SYS_INIT_RAM_ADDR	0x00000000
 #define CONFIG_SYS_INIT_RAM_SIZE	(128 * 1024)
 
 #define CONFIG_SYS_INIT_SP_OFFSET \
Signature · 1 line
1.7.9.1
#1 lore raw

PATCH 1/1 i.MX28: Fix initial stack pointer position

Quoted 10 lines · Marek Vasut

The patch:

?m28evk: Use GENERATED_GBL_DATA_SIZE
?commit 1084606c972ea5f1d89f69bdbd978b867d0ee521

introduced usage of GENERATED_GBL_DATA_SIZE and calculation of initial stack pointer position defived from that. Due to a small typo, the SP position moved to 0x21f80, which is past the SRAM area. This didn't manifest on the real hardware as the SRAM repeats there (address bits in the CPU being ignored).

Quoted 5 lines

Though this was caught in QEMU, where it crashed the emulator.

Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>