[U-Boot-Users] What is u-boot relocation address?

Hi all,
What does CFG_LOAD_ADDR mean and how it differs from TEXT_BASE in config.mk?

On 10/16/06, Vladimir Farcaller Pouzanov farcaller@gmail.com wrote:
Hi all,
What does CFG_LOAD_ADDR mean and how it differs from TEXT_BASE in config.mk?
find . -type f -print -exec grep CFG_LOAD_ADDR {} /dev/null ;
and a bit of work with a text editor will show you that CFG_LOAD_ADDR is used as a default argument to commands that load something into memory, like loadb, tftp, etc. This is usually somewhere in DRAM.
TEXT_BASE is the starting address that u-boot is built for usually in FLASH. Later u-boot moves itself up to the top of available memory.

Andrew Dyer wrote:
TEXT_BASE is the starting address that u-boot is built for usually in FLASH. Later u-boot moves itself up to the top of available memory.
Is it ok that TEXT_BASE of 0x0 leads to crash? Also U-boot seems to follow TEXT_BASE value after relocation:
TEXT_BASE = 0xA1000000: U-Boot code: A1000000 -> A1016290 BSS: -> A1018948
TEXT_BASE = 0xA1700000: U-Boot code: A1700000 -> A1716290 BSS: -> A1718948

Vladimir "Farcaller" Pouzanov wrote:
Is it ok that TEXT_BASE of 0x0 leads to crash? Also U-boot seems to follow TEXT_BASE value after relocation:
Now I'm completely confused...
CFG_MONITOR_BASE is u-boot startting location before relocation? CFG_FLASH_BASE is the same? TEXT_BASE is... hm... (same as both constants above) 0x0? Doesn't work. And shouldn't work: adr r0, _start /* r0 <- current position of code */ ldr r1, _TEXT_BASE /* test if we run from flash or RAM */ cmp r0, r1 /* don't reloc during debug */ beq stack_setup _start == 0 so is _TEXT_BASE, result = no relocation and crash....
Please help :(

Vladimir "Farcaller" Pouzanov wrote:
Vladimir "Farcaller" Pouzanov wrote:
Is it ok that TEXT_BASE of 0x0 leads to crash? Also U-boot seems to follow TEXT_BASE value after relocation:
Seems that I've provided not enough information, so let's start from..hm.. beginning.
I'm trying to run u-boot on Palm Tungsten T3 handheld, PXA261 (ARM, same as PXA250+16Mb flash). It works ok when executed from native OS (TEXT_BASE=0xA1000000, u-boot.lds SECTION starts from 0xA1000000, u-boot is copied to 0xA1000000). But I have problems from running it as native bootloader from flash (0x0). I'm not sure how I should set all that configuration defines. It seems to boot if u-boot.lds SECTION starts from 0x00000000 (TEXT_BASE still the same), but there are random crashes in 'loady' and u-boot seems to freeze after ~30 sec. of serial inactivity.

In message eh0ei6$nhc$1@sea.gmane.org you wrote:
Vladimir "Farcaller" Pouzanov wrote:
Vladimir "Farcaller" Pouzanov wrote:
Is it ok that TEXT_BASE of 0x0 leads to crash? Also U-boot seems to follow TEXT_BASE value after relocation:
Seems that I've provided not enough information, so let's start from..hm.. beginning.
I'm trying to run u-boot on Palm Tungsten T3 handheld, PXA261 (ARM, same as
On ARM, TEXT_BASE must point to (initialized) RAM. If you set it to 0 (= ROM), then crashes must be expected.
Best regards,
Wolfgang Denk

Wolfgang Denk wrote:
On ARM, TEXT_BASE must point to (initialized) RAM. If you set it to 0 (= ROM), then crashes must be expected.
Thanks for writing all that configuration settings values.
Can you give me any hint where I could start looking for 30sec. bug (random crashes in 'loady' and u-boot seems to freeze after ~30 sec. of serial inactivity)? I'm sure that my board init sequence is correct.
mtest works correctly, so SDRAM seems to be configured correctly.

In message eh0ars$6hk$1@sea.gmane.org you wrote:
Now I'm completely confused...
Then I recommend to read the source code.
CFG_MONITOR_BASE is u-boot startting location before relocation?
No, it's the start address of the U-Boot image in flash.
CFG_FLASH_BASE is the same?
This may be, but is not always the case. Both are unrelated. But the following should always be true: CFG_FLASH_BASE <= CFG_MONITOR_BASE <= CFG_FLASH_BASE + sizeof(your flash memory) - sizeof(u-boot image)
TEXT_BASE is... hm... (same as both constants above) 0x0? Doesn't work. And
No, TEXT_BASE is something different. What exactly it is depends on which architecture you're talking about.
Best regards,
Wolfgang Denk

In message eh09f4$vh1$1@sea.gmane.org you wrote:
Is it ok that TEXT_BASE of 0x0 leads to crash? Also U-boot seems to follow TEXT_BASE value after relocation:
Which architecture are you talking about?
Best regards,
Wolfgang Denk

Wolfgang Denk wrote:
In message eh09f4$vh1$1@sea.gmane.org you wrote: Which architecture are you talking about?
PXA261 (arm)

In message eh05db$cnv$1@sea.gmane.org you wrote:
What does CFG_LOAD_ADDR mean and how it differs from TEXT_BASE in config.mk?
CFG_LOAD_ADDR is the default setting for the load_addr variable, i. e. the default load address.
And it has absolutely nothing to do with TEXT_BASE - they are completely unrelated.
Best regards,
Wolfgang Denk
participants (3)
-
Andrew Dyer
-
Vladimir "Farcaller" Pouzanov
-
Wolfgang Denk