Skip to contentSkip to conversation

tegra2: Change CONFIG_SYS_TEXT_BASE to 0x00108000.

PATCH New Thierry Reding 4 participants 7 messages Nov 15, 2011 – Nov 16, 2011 Tegra architecture support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tegra2: Change CONFIG_SYS_TEXT_BASE to 0x00108000.

NVIDIA's flashing tools assume that the bootloader is loaded at address 0x00108000. Instead of requiring non-standard builds of those tools which allow a load address of 0x00E08000, this commit just switches all Tegra2 boards to use the standard load address.

Note that to successfully boot a standalone U-Boot with this load address, U-Boot needs to be built with USE_PRIVATE_LIBGCC=yes.

---
 include/configs/tegra2-common.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/tegra2-common.h +1 -1
index 9c3b9fa..bcdfe61 100644
@@ -153,7 +153,7 @@
 #define PHYS_SDRAM_1		TEGRA2_SDRC_CS0
 #define PHYS_SDRAM_1_SIZE	0x20000000	/* 512M */
 
-#define CONFIG_SYS_TEXT_BASE	0x00E08000
+#define CONFIG_SYS_TEXT_BASE	0x00108000
 #define CONFIG_SYS_SDRAM_BASE	PHYS_SDRAM_1
 
 #define CONFIG_SYS_INIT_RAM_ADDR	CONFIG_STACKBASE
Signature · 1 line
1.7.7.3
#1 lore raw

PATCH 1/1 tegra2: Change CONFIG_SYS_TEXT_BASE to 0x00108000.

Thierry Reding wrote at Tuesday, November 15, 2011 12:19 AM:

Quoted 7 lines

NVIDIA's flashing tools assume that the bootloader is loaded at address 0x00108000. Instead of requiring non-standard builds of those tools which allow a load address of 0x00E08000, this commit just switches all Tegra2 boards to use the standard load address.

Note that to successfully boot a standalone U-Boot with this load address, U-Boot needs to be built with USE_PRIVATE_LIBGCC=yes.

Isn't that true irrespective of TEXT_BASE? That's certainly been my experience.

Signature · 1 line
nvpublic
#2 lore raw

PATCH 1/1 tegra2: Change CONFIG_SYS_TEXT_BASE to 0x00108000.

Yes, USE_PRIVATE_LIBGCC=yes is needed for any U-Boot Tegra build, regardless. It has to do with lib functions executing on the ARM7TDMI (AVP) IIRC.

Tom

-----Original Message-----
From: Stephen Warren
Sent: Tuesday, November 15, 2011 11:03 AM
To: Thierry Reding; u-boot at lists.denx.de
Cc: Tom Warren
Subject: RE: [U-Boot] [PATCH] tegra2: Change CONFIG_SYS_TEXT_BASE to 0x00108000.

Thierry Reding wrote at Tuesday, November 15, 2011 12:19 AM:

Quoted 8 lines

NVIDIA's flashing tools assume that the bootloader is loaded at address 0x00108000. Instead of requiring non-standard builds of those tools which allow a load address of 0x00E08000, this commit just switches all
Tegra2 boards to use the standard load address.

Note that to successfully boot a standalone U-Boot with this load address, U-Boot needs to be built with USE_PRIVATE_LIBGCC=yes.

Isn't that true irrespective of TEXT_BASE? That's certainly been my experience.

--
nvpublic

#6 lore raw

PATCH 1/1 tegra2: Change CONFIG_SYS_TEXT_BASE to 0x00108000.

In reply to Thierry Reding

Hi Thierry.

Quoted 7 lines · Thierry Reding

NVIDIA's flashing tools assume that the bootloader is loaded at address 0x00108000. Instead of requiring non-standard builds of those tools which allow a load address of 0x00E08000, this commit just switches all Tegra2 boards to use the standard load address.

Note that to successfully boot a standalone U-Boot with this load address, U-Boot needs to be built with USE_PRIVATE_LIBGCC=yes.

Would you please remove this comment? As mentioned by others on this thread it isn't affected by your change. Anyway:

Quoted 23 lines

---
?include/configs/tegra2-common.h | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)

include/configs/tegra2-common.h +0 -0
index 9c3b9fa..bcdfe61 100644
@@ -153,7 +153,7 @@

?#define PHYS_SDRAM_1 ? ? ? ? ? TEGRA2_SDRC_CS0 ?#define PHYS_SDRAM_1_SIZE ? ? ?0x20000000 ? ? ?/* 512M */

include/configs/tegra2-common.h +1 -1
-#define CONFIG_SYS_TEXT_BASE ? 0x00E08000
+#define CONFIG_SYS_TEXT_BASE ? 0x00108000

?#define CONFIG_SYS_SDRAM_BASE ?PHYS_SDRAM_1

?#define CONFIG_SYS_INIT_RAM_ADDR ? ? ? CONFIG_STACKBASE --
1.7.7.3

#3 lore raw

PATCH 1/1 tegra2: Change CONFIG_SYS_TEXT_BASE to 0x00108000.

In reply to Stephen Warren
Quoted 11 lines · Stephen Warren

Thierry Reding wrote at Tuesday, November 15, 2011 12:19 AM:

Quoted 7 lines

NVIDIA's flashing tools assume that the bootloader is loaded at address 0x00108000. Instead of requiring non-standard builds of those tools which allow a load address of 0x00E08000, this commit just switches all Tegra2 boards to use the standard load address.

Note that to successfully boot a standalone U-Boot with this load address, U-Boot needs to be built with USE_PRIVATE_LIBGCC=yes.

Isn't that true irrespective of TEXT_BASE? That's certainly been my experience.

Yes, but the emphasis is on "standalone" since you can run mainline U-Boot as second stage for quickboot/fastboot and 0x00E08000 as load address without building with USE_PRIVATE_LIBGCC=yes. The reason for including this in the commit message was that it isn't documented anywhere else and I wanted to avoid a situation where this question needs to be answered over and over.

Perhaps the commit message is not the best place, but I would still like to have this documented somewhere. Any suggestions?

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111116/aff4d788/attachment.pgp

#4 lore raw

PATCH 1/1 tegra2: Change CONFIG_SYS_TEXT_BASE to 0x00108000.

Thierry Reding wrote at Tuesday, November 15, 2011 11:49 PM:

Quoted 12 lines

* PGP Signed by an unknown key

Quoted 9 lines · Stephen Warren

Thierry Reding wrote at Tuesday, November 15, 2011 12:19 AM:

Quoted 7 lines

NVIDIA's flashing tools assume that the bootloader is loaded at address 0x00108000. Instead of requiring non-standard builds of those tools which allow a load address of 0x00E08000, this commit just switches all Tegra2 boards to use the standard load address.

Note that to successfully boot a standalone U-Boot with this load address, U-Boot needs to be built with USE_PRIVATE_LIBGCC=yes.

Quoted 6 lines
Quoted 2 lines

Isn't that true irrespective of TEXT_BASE? That's certainly been my experience.

Yes, but the emphasis is on "standalone" since you can run mainline U-Boot as second stage for quickboot/fastboot and 0x00E08000 as load address without building with USE_PRIVATE_LIBGCC=yes.

OK. I think it's more just "standalone U-Boot" that "standalone U-Boot with this load address" then. I think the difference is that when running as a second stage under fastboot, U-Boot might get loaded on the A9 rather than the AVP, so the ARM ISA of the AVP doesn't come into play, and Tom Warren said he thought that USE_PRIVATE_LIBGCC=yes was only needed due to the AVP's ARM ISA difference.

Quoted 6 lines

The reason for including this in the
commit message was that it isn't documented anywhere else and I wanted to avoid a situation where this question needs to be answered over and over.

Perhaps the commit message is not the best place, but I would still like to have this documented somewhere. Any suggestions?

Can this option be selected by include/configs/tegra2-common.h? I suspect not since it's more of a make variable. Perhaps it can be forced on by a Tegra-specific makefile such as arch/arm/cpu/armv7/tegra2/config.mk or arch/arm/cpu/armv7/tegra2/Makefile? Then it wouldn't need to be documented; it'd be automatic.

Signature · 1 line
nvpublic
#5 lore raw

PATCH 1/1 tegra2: Change CONFIG_SYS_TEXT_BASE to 0x00108000.

Quoted 31 lines · Stephen Warren

Thierry Reding wrote at Tuesday, November 15, 2011 11:49 PM:

Quoted 12 lines

* PGP Signed by an unknown key

Quoted 9 lines · Stephen Warren

Thierry Reding wrote at Tuesday, November 15, 2011 12:19 AM:

Quoted 7 lines

NVIDIA's flashing tools assume that the bootloader is loaded at address 0x00108000. Instead of requiring non-standard builds of those tools which allow a load address of 0x00E08000, this commit just switches all Tegra2 boards to use the standard load address.

Note that to successfully boot a standalone U-Boot with this load address, U-Boot needs to be built with USE_PRIVATE_LIBGCC=yes.

Quoted 6 lines
Quoted 2 lines

Isn't that true irrespective of TEXT_BASE? That's certainly been my experience.

Yes, but the emphasis is on "standalone" since you can run mainline U-Boot as second stage for quickboot/fastboot and 0x00E08000 as load address without building with USE_PRIVATE_LIBGCC=yes.

OK. I think it's more just "standalone U-Boot" that "standalone U-Boot with this load address" then. I think the difference is that when running as a second stage under fastboot, U-Boot might get loaded on the A9 rather than the AVP, so the ARM ISA of the AVP doesn't come into play, and Tom Warren said he thought that USE_PRIVATE_LIBGCC=yes was only needed due to the AVP's ARM ISA difference.

Quoted 4 lines

The reason for including this in the
commit message was that it isn't documented anywhere else and I wanted to avoid a situation where this question needs to be answered over and over.

Quoted 8 lines
Quoted 2 lines

Perhaps the commit message is not the best place, but I would still like to have this documented somewhere. Any suggestions?

Can this option be selected by include/configs/tegra2-common.h? I suspect not since it's more of a make variable. Perhaps it can be forced on by a Tegra-specific makefile such as arch/arm/cpu/armv7/tegra2/config.mk or arch/arm/cpu/armv7/tegra2/Makefile? Then it wouldn't need to be documented; it'd be automatic.

Yes it can: arch/arm/cpu/armv7/tegra2/config.mk is included by the build system. The build output looks okay but I'll double-check if the resulting u-boot.bin actually boots in the morning when I have access to the hardware. I'll add both the CONFIG_SYS_TEXT_BASE (with the comment omitted) and this patch to a series and resend.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111116/47959631/attachment.pgp