Skip to contentSkip to conversation

ARM: omap3: Set SPL stack size to 8KB, image to 54KB.

PATCH New Tom Rini 4 participants 11 messages May 8, 2012 – May 9, 2012

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/2 ARM: omap3: Set SPL stack size to 8KB, image to 54KB.

With older toolchains it is possible to not fit entirely into the 45KB that we had assigned to SPL. Adjust to allow for 8KB of stack (which should be more than required) and 54KB of text/data.

Cc Vaibhav Hiremath <[email protected]>
Cc Nagendra T S <[email protected]>
Cc Thomas Weber <[email protected]>
Cc Ilya Yanok <[email protected]>
Cc Steve Sakoman <[email protected]>
Cc Stefano Babic <[email protected]>
---
 doc/SPL/README.omap3               |    4 ++--
 include/configs/am3517_crane.h     |    2 +-
 include/configs/am3517_evm.h       |    2 +-
 include/configs/devkit8000.h       |    2 +-
 include/configs/mcx.h              |    2 +-
 include/configs/omap3_beagle.h     |    2 +-
 include/configs/omap3_evm_common.h |    2 +-
 include/configs/omap3_overo.h      |    2 +-
 include/configs/tam3517-common.h   |    2 +-
 include/configs/tricorder.h        |    2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)
doc/SPL/README.omap3 +2 -2
index cc5d5c0..a543e65 100644
@@ -34,14 +34,14 @@ DDR1: 0x80000000 - 0xBFFFFFFF
 
 Option 1 (SPL only):
 0x40200800 - 0x4020BBFF: Area for SPL text, data and rodata
-0x4020BC00 - 0x4020FFFC: Area for the SPL stack.
+0x4020E000 - 0x4020FFFC: Area for the SPL stack.
 0x80000000 - 0x8007FFFF: Area for the SPL BSS.
 0x80100000: CONFIG_SYS_TEXT_BASE of U-Boot
 0x80208000 - 0x80307FFF: malloc() pool available to SPL.
 
 Option 2 (SPL or X-Loader):
 0x40200800 - 0x4020BBFF: Area for SPL text, data and rodata
-0x4020BC00 - 0x4020FFFC: Area for the SPL stack.
+0x4020E000 - 0x4020FFFC: Area for the SPL stack.
 0x80008000: CONFIG_SYS_TEXT_BASE of U-Boot
 0x87000000 - 0x8707FFFF: Area for the SPL BSS.
 0x87080000 - 0x870FFFFF: malloc() pool available to SPL.
include/configs/am3517_crane.h +1 -1
index b0dd2f0..9843eae 100644
@@ -326,7 +326,7 @@
 #define CONFIG_SPL
 #define CONFIG_SPL_NAND_SIMPLE
 #define CONFIG_SPL_TEXT_BASE		0x40200800
-#define CONFIG_SPL_MAX_SIZE		(45 * 1024)
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SPL_BSS_START_ADDR	0x80000000
include/configs/am3517_evm.h +1 -1
index b5f75d1..49e665d 100644
@@ -326,7 +326,7 @@
 #define CONFIG_SPL
 #define CONFIG_SPL_NAND_SIMPLE
 #define CONFIG_SPL_TEXT_BASE		0x40200800
-#define CONFIG_SPL_MAX_SIZE		(45 * 1024)
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SPL_BSS_START_ADDR	0x80000000
include/configs/devkit8000.h +1 -1
index eb7c376..248a5b2 100644
@@ -324,7 +324,7 @@
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
 
 #define CONFIG_SPL_TEXT_BASE		0x40200000 /*CONFIG_SYS_SRAM_START*/
-#define CONFIG_SPL_MAX_SIZE		0xB400  /* 45 K */
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SPL_BSS_START_ADDR       0x80000500 /* leave space for bootargs*/
include/configs/mcx.h +1 -1
index 1315c3c..fd6a435 100644
@@ -327,7 +327,7 @@
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
 
 #define CONFIG_SPL_TEXT_BASE		0x40200000 /*CONFIG_SYS_SRAM_START*/
-#define CONFIG_SPL_MAX_SIZE		(45 << 10)
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 /* move malloc and bss high to prevent clashing with the main image */
include/configs/omap3_beagle.h +1 -1
index ddeb414..6bdc2c3 100644
@@ -399,7 +399,7 @@
 #define CONFIG_SPL
 #define CONFIG_SPL_NAND_SIMPLE
 #define CONFIG_SPL_TEXT_BASE		0x40200800
-#define CONFIG_SPL_MAX_SIZE		(45 * 1024)
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SPL_BSS_START_ADDR	0x80000000
include/configs/omap3_evm_common.h +1 -1
index 4910dda..47ebbef 100644
@@ -282,7 +282,7 @@
 /* Defines for SPL */
 #define CONFIG_SPL
 #define CONFIG_SPL_TEXT_BASE		0x40200800
-#define CONFIG_SPL_MAX_SIZE		(45 * 1024)	/* 45 KB */
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SPL_BSS_START_ADDR	0x80000000
include/configs/omap3_overo.h +1 -1
index 64adc74..b0d144f 100644
@@ -303,7 +303,7 @@
 #define CONFIG_SPL
 #define CONFIG_SPL_NAND_SIMPLE
 #define CONFIG_SPL_TEXT_BASE		0x40200800
-#define CONFIG_SPL_MAX_SIZE		(45 * 1024)
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 /* move malloc and bss high to prevent clashing with the main image */
include/configs/tam3517-common.h +1 -1
index 4c4321d..de10f4f 100644
@@ -258,7 +258,7 @@
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
 
 #define CONFIG_SPL_TEXT_BASE		0x40200000 /*CONFIG_SYS_SRAM_START*/
-#define CONFIG_SPL_MAX_SIZE		(45 << 10)	/* 45 K */
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SYS_SPL_MALLOC_START	0x8f000000
include/configs/tricorder.h +1 -1
index 801a24f..ab911aa 100644
@@ -293,7 +293,7 @@
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
 
 #define CONFIG_SPL_TEXT_BASE		0x40200000 /*CONFIG_SYS_SRAM_START*/
-#define CONFIG_SPL_MAX_SIZE		0xB400  /* 45 K */
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SPL_BSS_START_ADDR	0x80000000 /*CONFIG_SYS_SDRAM_BASE*/
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 2/2 ARM: omap3: Add CONFIG_SPL_BOARD_INIT for CONFIG_SPL_MMC_SUPPORT

As originally reported against beagleboard we currently have the following error message reported in SPL:

U-Boot SPL 2012.04-00020-gb8310b9-dirty (Apr 25 2012 - 18:49:57) Texas Instruments Revision detection unimplemented OMAP SD/MMC: 0
timed out in wait_for_bb: I2C_STAT=1000
reading u-boot.img
....

The reason for above message is that when booting from MMC, I2C needs to be initialized to talk with the TWL4030. On OMAP3 I2C is only initalized in SPL if CONFIG_SPL_BOARD_INIT is set.

Cc Thomas Weber <[email protected]>
Cc Steve Sakoman <[email protected]>

Original patch for Beagleboard is:

Extended to cover all other boards:

---
 include/configs/omap3_beagle.h     |    1 +
 include/configs/omap3_evm_common.h |    1 +
 include/configs/omap3_overo.h      |    1 +
 include/configs/tricorder.h        |    1 +
 4 files changed, 4 insertions(+)
include/configs/omap3_beagle.h +1 -0
index 6bdc2c3..b891ee4 100644
@@ -410,6 +410,7 @@
 #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION	1
 #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME	"u-boot.img"
 
+#define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT
include/configs/omap3_evm_common.h +1 -0
index 47ebbef..7b21a5c 100644
@@ -288,6 +288,7 @@
 #define CONFIG_SPL_BSS_START_ADDR	0x80000000
 #define CONFIG_SPL_BSS_MAX_SIZE		0x80000		/* 512 KB */
 
+#define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT
include/configs/omap3_overo.h +1 -0
index b0d144f..a0a7a1c 100644
@@ -317,6 +317,7 @@
 #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION	1
 #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME	"u-boot.img"
 
+#define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT
include/configs/tricorder.h +1 -0
index ab911aa..9955fca 100644
@@ -278,6 +278,7 @@
 #define CONFIG_SPL
 #define CONFIG_SPL_NAND_SIMPLE
 
+#define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SPL_I2C_SUPPORT
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/2 ARM: omap3: Add CONFIG_SPL_BOARD_INIT for CONFIG_SPL_MMC_SUPPORT

Hello Tom & Peter,

Quoted 10 lines · Tom Rini

As originally reported against beagleboard we currently have the following error message reported in SPL:

U-Boot SPL 2012.04-00020-gb8310b9-dirty (Apr 25 2012 - 18:49:57) Texas Instruments Revision detection unimplemented OMAP SD/MMC: 0
timed out in wait_for_bb: I2C_STAT=1000
reading u-boot.img
....

Quoted 3 lines

The reason for above message is that when booting from MMC, I2C needs to be initialized to talk with the TWL4030. On OMAP3 I2C is only initalized in SPL if CONFIG_SPL_BOARD_INIT is set.

On Tricorder there is no such message. I thought the I2C to TWL4030 is initialized by the ROM code.
And why can the SPL read the u-boot.img in the next step?

Thomas

Quoted 63 lines
Cc Thomas Weber<[email protected]>
Cc Steve Sakoman<[email protected]>

Original patch for Beagleboard is:

Extended to cover all other boards:

---
  include/configs/omap3_beagle.h     |    1 +
  include/configs/omap3_evm_common.h |    1 +
  include/configs/omap3_overo.h      |    1 +
  include/configs/tricorder.h        |    1 +
  4 files changed, 4 insertions(+)
include/configs/omap3_beagle.h +1 -0
index 6bdc2c3..b891ee4 100644
@@ -410,6 +410,7 @@
  #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION	1
  #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME	"u-boot.img"
 
+#define CONFIG_SPL_BOARD_INIT
  #define CONFIG_SPL_LIBCOMMON_SUPPORT
  #define CONFIG_SPL_LIBDISK_SUPPORT
  #define CONFIG_SPL_I2C_SUPPORT
include/configs/omap3_evm_common.h +1 -0
index 47ebbef..7b21a5c 100644
@@ -288,6 +288,7 @@
  #define CONFIG_SPL_BSS_START_ADDR	0x80000000
  #define CONFIG_SPL_BSS_MAX_SIZE		0x80000		/* 512 KB */
 
+#define CONFIG_SPL_BOARD_INIT
  #define CONFIG_SPL_LIBCOMMON_SUPPORT
  #define CONFIG_SPL_LIBDISK_SUPPORT
  #define CONFIG_SPL_I2C_SUPPORT
include/configs/omap3_overo.h +1 -0
index b0d144f..a0a7a1c 100644
@@ -317,6 +317,7 @@
  #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION	1
  #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME	"u-boot.img"
 
+#define CONFIG_SPL_BOARD_INIT
  #define CONFIG_SPL_LIBCOMMON_SUPPORT
  #define CONFIG_SPL_LIBDISK_SUPPORT
  #define CONFIG_SPL_I2C_SUPPORT
include/configs/tricorder.h +1 -0
index ab911aa..9955fca 100644
@@ -278,6 +278,7 @@
  #define CONFIG_SPL
  #define CONFIG_SPL_NAND_SIMPLE
 
+#define CONFIG_SPL_BOARD_INIT
  #define CONFIG_SPL_LIBCOMMON_SUPPORT
  #define CONFIG_SPL_LIBDISK_SUPPORT
  #define CONFIG_SPL_I2C_SUPPORT
author
#3 lore raw

PATCH 2/2 ARM: omap3: Add CONFIG_SPL_BOARD_INIT for CONFIG_SPL_MMC_SUPPORT

Quoted 13 lines · Thomas Weber

Hello Tom & Peter,

Quoted 10 lines · Tom Rini

As originally reported against beagleboard we currently have the following error message reported in SPL:

U-Boot SPL 2012.04-00020-gb8310b9-dirty (Apr 25 2012 - 18:49:57) Texas Instruments Revision detection unimplemented OMAP SD/MMC: 0
timed out in wait_for_bb: I2C_STAT=1000
reading u-boot.img
....

Quoted 6 lines
Quoted 3 lines

The reason for above message is that when booting from MMC, I2C needs to be initialized to talk with the TWL4030. On OMAP3 I2C is only initalized in SPL if CONFIG_SPL_BOARD_INIT is set.

On Tricorder there is no such message. I thought the I2C to TWL4030 is initialized by the ROM code.
And why can the SPL read the u-boot.img in the next step?

Things must be setup to a certain extent or we couldn't have been loaded by ROM, yes. Since am35x parts are a different family from the omap3 boards, I'll double check what the am3517 evm I have says here as well.
For correctness however, we currently are turning on the i2c support
in SPL and then not using it. So something should be changed :)

Signature · 1 line
Tom
author
#4 lore raw

PATCH 2/2 ARM: omap3: Add CONFIG_SPL_BOARD_INIT for CONFIG_SPL_MMC_SUPPORT

In reply to Thomas Weber
Quoted 13 lines · Thomas Weber

Hello Tom & Peter,

Quoted 10 lines · Tom Rini

As originally reported against beagleboard we currently have the following error message reported in SPL:

U-Boot SPL 2012.04-00020-gb8310b9-dirty (Apr 25 2012 - 18:49:57) Texas Instruments Revision detection unimplemented OMAP SD/MMC: 0
timed out in wait_for_bb: I2C_STAT=1000
reading u-boot.img
....

Quoted 6 lines
Quoted 3 lines

The reason for above message is that when booting from MMC, I2C needs to be initialized to talk with the TWL4030. On OMAP3 I2C is only initalized in SPL if CONFIG_SPL_BOARD_INIT is set.

On Tricorder there is no such message. I thought the I2C to TWL4030 is initialized by the ROM code.
And why can the SPL read the u-boot.img in the next step?

I think we need this still, on correctness grounds. We include the i2c code (and twl4030 code) to have the MMC driver link and behave as in full U-Boot. I don't see this timed out message on my am3517 evm nor my "omap3evm" with an am37x SOM (iirc anyhow). I do see it on cold power on, on my beagle however, but not warm (which might be why I missed this before).

Signature · 1 line
Tom
#5 lore raw

PATCH 1/2 ARM: omap3: Set SPL stack size to 8KB, image to 54KB.

In reply to Tom Rini
Quoted 4 lines · Tom

With older toolchains it is possible to not fit entirely into the 45KB that we had assigned to SPL. Adjust to allow for 8KB of stack (which should be more than required) and 54KB of text/data.

Tom,

Can you provide more details on why 45Kb is not sufficient for SPL? You may have done some memory analysis on this; can you share that here? Also, do we know how much ROM code is using out of 64KB of RAM?

Thanks,
Vaibhav

Quoted 162 lines
Cc Vaibhav Hiremath <[email protected]>
Cc Nagendra T S <[email protected]>
Cc Thomas Weber <[email protected]>
Cc Ilya Yanok <[email protected]>
Cc Steve Sakoman <[email protected]>
Cc Stefano Babic <[email protected]>
---
 doc/SPL/README.omap3               |    4 ++--
 include/configs/am3517_crane.h     |    2 +-
 include/configs/am3517_evm.h       |    2 +-
 include/configs/devkit8000.h       |    2 +-
 include/configs/mcx.h              |    2 +-
 include/configs/omap3_beagle.h     |    2 +-
 include/configs/omap3_evm_common.h |    2 +-
 include/configs/omap3_overo.h      |    2 +-
 include/configs/tam3517-common.h   |    2 +-
 include/configs/tricorder.h        |    2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)
doc/SPL/README.omap3 +2 -2
index cc5d5c0..a543e65 100644
@@ -34,14 +34,14 @@ DDR1: 0x80000000 - 0xBFFFFFFF
 
 Option 1 (SPL only):
 0x40200800 - 0x4020BBFF: Area for SPL text, data and rodata
-0x4020BC00 - 0x4020FFFC: Area for the SPL stack.
+0x4020E000 - 0x4020FFFC: Area for the SPL stack.
 0x80000000 - 0x8007FFFF: Area for the SPL BSS.
 0x80100000: CONFIG_SYS_TEXT_BASE of U-Boot
 0x80208000 - 0x80307FFF: malloc() pool available to SPL.
 
 Option 2 (SPL or X-Loader):
 0x40200800 - 0x4020BBFF: Area for SPL text, data and rodata
-0x4020BC00 - 0x4020FFFC: Area for the SPL stack.
+0x4020E000 - 0x4020FFFC: Area for the SPL stack.
 0x80008000: CONFIG_SYS_TEXT_BASE of U-Boot
 0x87000000 - 0x8707FFFF: Area for the SPL BSS.
 0x87080000 - 0x870FFFFF: malloc() pool available to SPL.
include/configs/am3517_crane.h +1 -1
index b0dd2f0..9843eae 100644
@@ -326,7 +326,7 @@
 #define CONFIG_SPL
 #define CONFIG_SPL_NAND_SIMPLE
 #define CONFIG_SPL_TEXT_BASE		0x40200800
-#define CONFIG_SPL_MAX_SIZE		(45 * 1024)
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SPL_BSS_START_ADDR	0x80000000
include/configs/am3517_evm.h +1 -1
index b5f75d1..49e665d 100644
@@ -326,7 +326,7 @@
 #define CONFIG_SPL
 #define CONFIG_SPL_NAND_SIMPLE
 #define CONFIG_SPL_TEXT_BASE		0x40200800
-#define CONFIG_SPL_MAX_SIZE		(45 * 1024)
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SPL_BSS_START_ADDR	0x80000000
include/configs/devkit8000.h +1 -1
index eb7c376..248a5b2 100644
@@ -324,7 +324,7 @@
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
 
 #define CONFIG_SPL_TEXT_BASE		0x40200000 /*CONFIG_SYS_SRAM_START*/
-#define CONFIG_SPL_MAX_SIZE		0xB400  /* 45 K */
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SPL_BSS_START_ADDR       0x80000500 /* leave space for bootargs*/
include/configs/mcx.h +1 -1
index 1315c3c..fd6a435 100644
@@ -327,7 +327,7 @@
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
 
 #define CONFIG_SPL_TEXT_BASE		0x40200000 /*CONFIG_SYS_SRAM_START*/
-#define CONFIG_SPL_MAX_SIZE		(45 << 10)
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 /* move malloc and bss high to prevent clashing with the main image */
include/configs/omap3_beagle.h +1 -1
index ddeb414..6bdc2c3 100644
@@ -399,7 +399,7 @@
 #define CONFIG_SPL
 #define CONFIG_SPL_NAND_SIMPLE
 #define CONFIG_SPL_TEXT_BASE		0x40200800
-#define CONFIG_SPL_MAX_SIZE		(45 * 1024)
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SPL_BSS_START_ADDR	0x80000000
include/configs/omap3_evm_common.h +1 -1
index 4910dda..47ebbef 100644
@@ -282,7 +282,7 @@
 /* Defines for SPL */
 #define CONFIG_SPL
 #define CONFIG_SPL_TEXT_BASE		0x40200800
-#define CONFIG_SPL_MAX_SIZE		(45 * 1024)	/* 45 KB */
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SPL_BSS_START_ADDR	0x80000000
include/configs/omap3_overo.h +1 -1
index 64adc74..b0d144f 100644
@@ -303,7 +303,7 @@
 #define CONFIG_SPL
 #define CONFIG_SPL_NAND_SIMPLE
 #define CONFIG_SPL_TEXT_BASE		0x40200800
-#define CONFIG_SPL_MAX_SIZE		(45 * 1024)
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 /* move malloc and bss high to prevent clashing with the main image */
include/configs/tam3517-common.h +1 -1
index 4c4321d..de10f4f 100644
@@ -258,7 +258,7 @@
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
 
 #define CONFIG_SPL_TEXT_BASE		0x40200000 /*CONFIG_SYS_SRAM_START*/
-#define CONFIG_SPL_MAX_SIZE		(45 << 10)	/* 45 K */
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SYS_SPL_MALLOC_START	0x8f000000
include/configs/tricorder.h +1 -1
index 801a24f..ab911aa 100644
@@ -293,7 +293,7 @@
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
 
 #define CONFIG_SPL_TEXT_BASE		0x40200000 /*CONFIG_SYS_SRAM_START*/
-#define CONFIG_SPL_MAX_SIZE		0xB400  /* 45 K */
+#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SPL_BSS_START_ADDR	0x80000000 /*CONFIG_SYS_SDRAM_BASE*/
Signature · 1 line
1.7.9.5
author
#6 lore raw

PATCH 1/2 ARM: omap3: Set SPL stack size to 8KB, image to 54KB.

Quoted 9 lines · Vaibhav
Quoted 4 lines · Tom

With older toolchains it is possible to not fit entirely into the 45KB that we had assigned to SPL. Adjust to allow for 8KB of stack (which should be more than required) and 54KB of text/data.

Tom,

Can you provide more details on why 45Kb is not sufficient for SPL?

A combination of toolchains and enabled options will break this limit (for example, beagle is size-broken once we enable i2c to whack the twl4030 with ELDK4.2). Rather than giving just one more KB to fix the problem today, but run into it tomorrow, I'm pushing towards the biggest split we can use.

Quoted 2 lines

You may have done some memory analysis on this; can you share that here? Also, do we know how much ROM code is using out of 64KB of RAM?

We know that ROM loads us to 0x40200800 and we're allowed from there to the end of SRAM to do as we please. This is just adjusting the split SPL makes into text+data and stack.

Signature · 1 line
Tom
#7 lore raw

PATCH 1/2 ARM: omap3: Set SPL stack size to 8KB, image to 54KB.

Quoted 9 lines · Tom
Quoted 8 lines · Vaibhav
Quoted 4 lines · Tom

With older toolchains it is possible to not fit entirely into the 45KB that we had assigned to SPL. Adjust to allow for 8KB of stack (which should be more than required) and 54KB of text/data.

Tom,

Quoted 8 lines
Quoted 1 line

Can you provide more details on why 45Kb is not sufficient for SPL?

A combination of toolchains and enabled options will break this limit (for example, beagle is size-broken once we enable i2c to whack the twl4030 with ELDK4.2). Rather than giving just one more KB to fix the problem today, but run into it tomorrow, I'm pushing towards the biggest split we can use.

Exactly, I understand the need here. Can you please update the commit description with above details, the original patch commit description only talks about toolchain, but it is not only the toolchain, right?

Else looks ok to me.

Thanks,
Vaibhav

Quoted 10 lines
Quoted 2 lines

You may have done some memory analysis on this; can you share that here? Also, do we know how much ROM code is using out of 64KB of RAM?

We know that ROM loads us to 0x40200800 and we're allowed from there to the end of SRAM to do as we please. This is just adjusting the split SPL makes into text+data and stack.

Signature · 1 line
Tom
#8 lore raw

PATCH 1/2 ARM: omap3: Set SPL stack size to 8KB, image to 54KB.

In reply to Tom Rini

Hi Tom,
[snip]

Quoted 3 lines

?Option 1 (SPL only):
?0x40200800 - 0x4020BBFF: Area for SPL text, data and rodata

You wanted to change the above comment to
0x40200800 - 0x4020DFFC as well ?

Quoted 6 lines

-0x4020BC00 - 0x4020FFFC: Area for the SPL stack. +0x4020E000 - 0x4020FFFC: Area for the SPL stack. ?0x80000000 - 0x8007FFFF: Area for the SPL BSS. ?0x80100000: CONFIG_SYS_TEXT_BASE of U-Boot ?0x80208000 - 0x80307FFF: malloc() pool available to SPL.

Quoted 7 lines

?Option 2 (SPL or X-Loader):
?0x40200800 - 0x4020BBFF: Area for SPL text, data and rodata -0x4020BC00 - 0x4020FFFC: Area for the SPL stack. +0x4020E000 - 0x4020FFFC: Area for the SPL stack. ?0x80008000: CONFIG_SYS_TEXT_BASE of U-Boot ?0x87000000 - 0x8707FFFF: Area for the SPL BSS. ?0x87080000 - 0x870FFFFF: malloc() pool available to SPL.

Thanks,
Sricharan

author
#9 lore raw

PATCH 1/2 ARM: omap3: Set SPL stack size to 8KB, image to 54KB.

Quoted 8 lines · Sricharan

Hi Tom,
[snip]

Quoted 3 lines

Option 1 (SPL only):
0x40200800 - 0x4020BBFF: Area for SPL text, data and rodata

You wanted to change the above comment to
0x40200800 - 0x4020DFFC as well ?

Ah yes, thanks for catching that.

Signature · 1 line
Tom
#10 lore raw

PATCH 1/2 ARM: omap3: Set SPL stack size to 8KB, image to 54KB.

In reply to Tom Rini
Quoted 4 lines · Tom Rini

With older toolchains it is possible to not fit entirely into the 45KB that we had assigned to SPL. Adjust to allow for 8KB of stack (which should be more than required) and 54KB of text/data.

Quoted 8 lines
Cc Vaibhav Hiremath <[email protected]>
Cc Nagendra T S <[email protected]>
Cc Thomas Weber <[email protected]>
Cc Ilya Yanok <[email protected]>
Cc Steve Sakoman <[email protected]>
Cc Stefano Babic <[email protected]>

---

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================