I recently dabbled in u-boot and kept track of a few points I found
confusing. I fixed them up to the best of my ability and created some
patches for consideration.
>From 9802439149594948e3862b9609ca0e68ab793ecc Mon Sep 17 00:00:00 2001
From: Christopher Harvey <char...@matrox.com>
Date: Wed, 15 Jun 2011 16:27:07 -0400
Subject: [PATCH 1/3] Added documentation for CONFIG_SYS_TEXT_BASE for ARM.
---
README | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/README b/README
index 8bb9c8d..f5c59e1 100644
--- a/README
+++ b/README
@@ -2356,6 +2356,15 @@ Configuration Settings:
- CONFIG_SYS_SDRAM_BASE:
Physical start address of SDRAM. _Must_ be 0 here.
+- CONFIG_SYS_TEXT_BASE:
+ - ARM:
+ Is the address of the u-boot code that is loaded in memory.
+ This value can be in ROM space since u-boot can run from
+ within ROM. CONFIG_SYS_TEXT_BASE is simply called _TEXT_BASE
+ in some files, like arch/arm/lib/board.c.
+ This value has nothing to do with the relocation destination
+ in RAM. See doc/README.arm-relocation for more info.
+
- CONFIG_SYS_MBIO_BASE:
Physical start address of Motherboard I/O (if using a
Cogent motherboard)
--
1.7.0.4
>From 538859500db132eea21ace170bfea291501aba09 Mon Sep 17 00:00:00 2001
From: Christopher Harvey <char...@matrox.com>
Date: Wed, 15 Jun 2011 16:28:08 -0400
Subject: [PATCH 2/3] Added extra documentation about how the relocation address to RAM is picked for ARM.
---
doc/README.arm-relocation | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/doc/README.arm-relocation b/doc/README.arm-relocation
index 5a9a2fb..954627d 100644
--- a/doc/README.arm-relocation
+++ b/doc/README.arm-relocation
@@ -22,7 +22,7 @@ At cpu level: modify linker file and add a relocation and fixup loop
At board level:
dram_init(): bd pointer is now at this point not accessible, so only
- detect the real dramsize, and store it in gd->ram_size. Bst detected
+ detect the real dramsize, and store it in gd->ram_size. Best detected
with get_ram_size().
TODO: move also dram initialization there on boards where it is possible.
@@ -38,6 +38,13 @@ At lib level:
Boards which are not fixed to support relocation will be REMOVED!
+The code that picks the location in RAM for ARM can be found in the
+arch/arm/lib/board.c file under the board_init_f function.
+The postfix _f means executed from flash, and _r means from RAM.
+The new location is picked with respect to the highest RAM address, and the
+exact final value depends heavily on compile time options. The source is the
+best documentation here.
+
-----------------------------------------------------------------------------
For boards which boot from nand_spl, it is possible to save one copy
--
1.7.0.4
>From b6d2012af7730a57272be223eaa2ccc3eeec011c Mon Sep 17 00:00:00 2001
From: Christopher Harvey <char...@matrox.com>
Date: Wed, 15 Jun 2011 16:47:05 -0400
Subject: [PATCH 3/3] Removed unused define, CONFIG_ARMV7.
---
include/configs/am3517_crane.h | 2 +-
include/configs/am3517_evm.h | 2 +-
include/configs/ca9x4_ct_vxp.h | 2 +-
include/configs/cm_t35.h | 2 +-
include/configs/devkit8000.h | 2 +-
include/configs/dig297.h | 2 +-
include/configs/igep0020.h | 2 +-
include/configs/igep0030.h | 2 +-
include/configs/omap3_beagle.h | 2 +-
include/configs/omap3_evm.h | 2 +-
include/configs/omap3_overo.h | 2 +-
include/configs/omap3_pandora.h | 2 +-
include/configs/omap3_sdp3430.h | 2 +-
include/configs/omap3_zoom1.h | 2 +-
include/configs/omap3_zoom2.h | 2 +-
include/configs/omap4_panda.h | 2 +-
include/configs/omap4_sdp4430.h | 2 +-
include/configs/s5p_goni.h | 2 +-
include/configs/s5pc210_universal.h | 2 +-
include/configs/smdkc100.h | 2 +-
include/configs/smdkv310.h | 2 +-
21 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index 09cb951..b809053 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -28,7 +28,7 @@
/*
* High Level Configuration Options
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3_AM3517CRANE 1 /* working with CRANEBOARD */
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index 80ad342..db026c4 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -28,7 +28,7 @@
/*
* High Level Configuration Options
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3_AM3517EVM 1 /* working with AM3517EVM */
diff --git a/include/configs/ca9x4_ct_vxp.h b/include/configs/ca9x4_ct_vxp.h
index 7f83249..fd92137 100644
--- a/include/configs/ca9x4_ct_vxp.h
+++ b/include/configs/ca9x4_ct_vxp.h
@@ -33,7 +33,7 @@
#define CONFIG_SYS_TEXT_BASE 0x60800000
/* High Level Configuration Options */
-#define CONFIG_ARMV7 1
+
#define CONFIG_SYS_MEMTEST_START 0x60000000
#define CONFIG_SYS_MEMTEST_END 0x20000000
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index 93a1b26..b4cec35 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -36,7 +36,7 @@
/*
* High Level Configuration Options
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3430 1 /* which is in a 3430 */
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index 125c690..f97a4ed 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -32,7 +32,7 @@
#define __CONFIG_H
/* High Level Configuration Options */
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3430 1 /* which is in a 3430 */
diff --git a/include/configs/dig297.h b/include/configs/dig297.h
index 7aeb24e..ee0c6be 100644
--- a/include/configs/dig297.h
+++ b/include/configs/dig297.h
@@ -35,7 +35,7 @@
/*
* High Level Configuration Options
*/
-#define CONFIG_ARMV7 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP /* in a TI OMAP core */
#define CONFIG_OMAP34XX /* which is a 34XX */
#define CONFIG_OMAP3430 /* which is in a 3430 */
diff --git a/include/configs/igep0020.h b/include/configs/igep0020.h
index 5af9bec..1c36bc2 100644
--- a/include/configs/igep0020.h
+++ b/include/configs/igep0020.h
@@ -25,7 +25,7 @@
/*
* High Level Configuration Options
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3430 1 /* which is in a 3430 */
diff --git a/include/configs/igep0030.h b/include/configs/igep0030.h
index 92144af..8594b87 100644
--- a/include/configs/igep0030.h
+++ b/include/configs/igep0030.h
@@ -25,7 +25,7 @@
/*
* High Level Configuration Options
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3430 1 /* which is in a 3430 */
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 9fd80ed..aa602e4 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -31,7 +31,7 @@
/*
* High Level Configuration Options
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3430 1 /* which is in a 3430 */
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index 13a4fbf..d07c63e 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -36,7 +36,7 @@
/*
* High Level Configuration Options
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3430 1 /* which is in a 3430 */
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index 242b317..127ff47 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -23,7 +23,7 @@
/*
* High Level Configuration Options
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3430 1 /* which is in a 3430 */
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index 39c87a8..e8caa8c 100644
--- a/include/configs/omap3_pandora.h
+++ b/include/configs/omap3_pandora.h
@@ -26,7 +26,7 @@
/*
* High Level Configuration Options
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3430 1 /* which is in a 3430 */
diff --git a/include/configs/omap3_sdp3430.h b/include/configs/omap3_sdp3430.h
index 55bbcd4..2a1a13d 100644
--- a/include/configs/omap3_sdp3430.h
+++ b/include/configs/omap3_sdp3430.h
@@ -36,7 +36,7 @@
/*
* High Level Configuration Options
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3430 1 /* which is in a 3430 */
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h
index 9183849..beac7b0 100644
--- a/include/configs/omap3_zoom1.h
+++ b/include/configs/omap3_zoom1.h
@@ -32,7 +32,7 @@
/*
* High Level Configuration Options
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3430 1 /* which is in a 3430 */
diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h
index 3573edf..214c13b 100644
--- a/include/configs/omap3_zoom2.h
+++ b/include/configs/omap3_zoom2.h
@@ -33,7 +33,7 @@
/*
* High Level Configuration Options
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3430 1 /* which is in a 3430 */
diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h
index b4e7f41..d26f903 100644
--- a/include/configs/omap4_panda.h
+++ b/include/configs/omap4_panda.h
@@ -30,7 +30,7 @@
/*
* High Level Configuration Options
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP44XX 1 /* which is a 44XX */
#define CONFIG_OMAP4430 1 /* which is in a 4430 */
diff --git a/include/configs/omap4_sdp4430.h b/include/configs/omap4_sdp4430.h
index 584a52b..dee32bc 100644
--- a/include/configs/omap4_sdp4430.h
+++ b/include/configs/omap4_sdp4430.h
@@ -31,7 +31,7 @@
/*
* High Level Configuration Options
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP44XX 1 /* which is a 44XX */
#define CONFIG_OMAP4430 1 /* which is in a 4430 */
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index d648ce8..5309d57 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -28,7 +28,7 @@
#define __CONFIG_H
/* High Level Configuration Options */
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_SAMSUNG 1 /* in a SAMSUNG core */
#define CONFIG_S5P 1 /* which is in a S5P Family */
#define CONFIG_S5PC110 1 /* which is in a S5PC110 */
diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h
index 5915984..b410f97 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -30,7 +30,7 @@
* High Level Configuration Options
* (easy to change)
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_SAMSUNG 1 /* in a SAMSUNG core */
#define CONFIG_S5P 1 /* which is in a S5P Family */
#define CONFIG_S5PC210 1 /* which is in a S5PC210 */
diff --git a/include/configs/smdkc100.h b/include/configs/smdkc100.h
index 70e23b5..b2f8a00 100644
--- a/include/configs/smdkc100.h
+++ b/include/configs/smdkc100.h
@@ -32,7 +32,7 @@
* High Level Configuration Options
* (easy to change)
*/
-#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */
+
#define CONFIG_SAMSUNG 1 /* in a SAMSUNG core */
#define CONFIG_S5P 1 /* which is in a S5P Family */
#define CONFIG_S5PC100 1 /* which is in a S5PC100 */
diff --git a/include/configs/smdkv310.h b/include/configs/smdkv310.h
index a7f5850..5d0806f 100644
--- a/include/configs/smdkv310.h
+++ b/include/configs/smdkv310.h
@@ -26,7 +26,7 @@
#define __CONFIG_H
/* High Level Configuration Options */
-#define CONFIG_ARMV7 1 /*This is an ARM V7 CPU core */
+
#define CONFIG_SAMSUNG 1 /* in a SAMSUNG core */
#define CONFIG_S5P 1 /* S5P Family */
#define CONFIG_S5PC210 1 /* which is in a S5PC210 SoC */
--
1.7.0.4
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot