public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Aneesh V <aneesh@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 8/9] omap4+: streamline CONFIG_SYS_TEXT_BASE and other SDRAM addresses
Date: Tue, 22 Nov 2011 15:09:04 +0530	[thread overview]
Message-ID: <1321954745-18112-9-git-send-email-aneesh@ti.com> (raw)
In-Reply-To: <1321954745-18112-1-git-send-email-aneesh@ti.com>

Change the CONFIG_SYS_TEXT_BASE and the addresses of SDRAM
buffers used by SPL(heap and BSS) keeping in mind the
following requirements:

1. Make sure that SPL's heap and BSS doesn't come in the way
of Linux kernel, which is typically loaded at 0x80008000. This
will be important when SPL directly loads kernel.

2. Align the CONFIG_SYS_TEXT_BASE between TI internal
U-Boot and mainline U-Boot. This avoids a lot of confusion
and allows for the inter-operability of x-loader, SPL,
internal U-Boot, mainline U-Boot etc. The internal U-Boot's
address can not be changed to that of mainline U-Boot
as internal U-Boot doesn't have relocation and 0x80100000
used by mainline U-Boot will clash with kernel

3. Assume only a minimum amount of memory that may be available
on any practical OMAP4/5 board in future too. We are assuming
a minimum of 128 MB of memory

Signed-off-by: Aneesh V <aneesh@ti.com>
---
 include/configs/omap4_common.h |   17 ++++++++++-------
 include/configs/omap5_evm.h    |   19 +++++++++++--------
 2 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h
index 613aef2..a989721 100644
--- a/include/configs/omap4_common.h
+++ b/include/configs/omap4_common.h
@@ -255,18 +255,21 @@
 #define CONFIG_SPL_MAX_SIZE		(38 * 1024)
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
-#define CONFIG_SPL_BSS_START_ADDR	0x80000000
-#define CONFIG_SPL_BSS_MAX_SIZE		0x80000		/* 512 KB */
 /*
- * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
  * 64 bytes before this address should be set aside for u-boot.img's
- * header. That is 0x800FFFC0--0x80100000 should not be used for any
+ * header. That is 80E7FFC0--0x80E80000 should not be used for any
  * other needs.
  */
-#define CONFIG_SYS_TEXT_BASE		0x80100000
-#define CONFIG_SYS_SPL_MALLOC_START	0x80200000
-#define CONFIG_SYS_SPL_MALLOC_SIZE	0x100000	/* 1 MB */
+#define CONFIG_SYS_TEXT_BASE		0x80E80000
 
+/*
+ * BSS and malloc area 64MB into memory to allow enough
+ * space for the kernel at the beginning of memory
+ */
+#define CONFIG_SPL_BSS_START_ADDR	0x84000000
+#define CONFIG_SPL_BSS_MAX_SIZE		0x100000	/* 1 MB */
+#define CONFIG_SYS_SPL_MALLOC_START	0x84100000
+#define CONFIG_SYS_SPL_MALLOC_SIZE	0x100000	/* 1 MB */
 
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x200 /* 256 KB */
diff --git a/include/configs/omap5_evm.h b/include/configs/omap5_evm.h
index b763f01..d3d5263 100644
--- a/include/configs/omap5_evm.h
+++ b/include/configs/omap5_evm.h
@@ -254,9 +254,6 @@
 #define CONFIG_SPL_MAX_SIZE		0x1E000	/* 120K */
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
-#define CONFIG_SPL_BSS_START_ADDR	0x80000000
-#define CONFIG_SPL_BSS_MAX_SIZE		0x80000		/* 512 KB */
-
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x200 /* 256 KB */
 #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION	1
@@ -272,13 +269,19 @@
 #define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/armv7/omap-common/u-boot-spl.lds"
 
 /*
- * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
  * 64 bytes before this address should be set aside for u-boot.img's
- * header. That is 0x800FFFC0--0x80100000 should not be used for any
+ * header. That is 80E7FFC0--0x80E80000 should not be used for any
  * other needs.
  */
-#define CONFIG_SYS_TEXT_BASE		0x80100000
-#define CONFIG_SYS_SPL_MALLOC_START     0x80200000
-#define CONFIG_SYS_SPL_MALLOC_SIZE      0x100000        /* 1 MB */
+#define CONFIG_SYS_TEXT_BASE		0x80E80000
+
+/*
+ * BSS and malloc area 64MB into memory to allow enough
+ * space for the kernel at the beginning of memory
+ */
+#define CONFIG_SPL_BSS_START_ADDR	0x84000000
+#define CONFIG_SPL_BSS_MAX_SIZE		0x100000	/* 1 MB */
+#define CONFIG_SYS_SPL_MALLOC_START	0x84100000
+#define CONFIG_SYS_SPL_MALLOC_SIZE	0x100000	/* 1 MB */
 
 #endif /* __CONFIG_H */
-- 
1.7.1

  parent reply	other threads:[~2011-11-22  9:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22  9:38 [U-Boot] [PATCH 0/9] omap: miscellaneous fixes and improvements Aneesh V
2011-11-22  9:38 ` [U-Boot] [PATCH 1/9] omap: Improve PLL parameter calculation tool Aneesh V
2011-11-22  9:38 ` [U-Boot] [PATCH 2/9] omap4: ttyO2 instead of ttyS2 in default bootargs Aneesh V
2011-11-22  9:38 ` [U-Boot] [PATCH 3/9] omap: fix cache line size for omap3/omap4 boards Aneesh V
2011-11-22 15:58   ` Tom Rini
2011-11-23  5:00     ` Aneesh V
2011-11-29 21:15       ` Tom Rini
2011-11-22  9:39 ` [U-Boot] [PATCH 4/9] omap4460: fix TPS initialization Aneesh V
2011-11-22  9:39 ` [U-Boot] [PATCH 5/9] omap: remove I2C from SPL Aneesh V
2011-11-22 15:52   ` Tom Rini
2011-11-23  7:34     ` Aneesh V
2011-11-23 15:05       ` Tom Rini
2011-11-22  9:39 ` [U-Boot] [PATCH 6/9] omap4: emif: fix error in driver Aneesh V
2011-11-22  9:39 ` [U-Boot] [PATCH 7/9] omap4460: add ES1.1 identification Aneesh V
2011-11-22  9:39 ` Aneesh V [this message]
2011-11-22  9:39 ` [U-Boot] [PATCH 9/9] omap4: fix IO setting Aneesh V

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1321954745-18112-9-git-send-email-aneesh@ti.com \
    --to=aneesh@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox