Desmond
Desmond

Reputation: 31

Relationship between U-boot CONFIG_SYS_TEXT_BASE and SDRAM

At present, my understanding of u-boot is as follows

  1. ROM Code load SPL
  2. SPL initialize RAM, and load u-boot to CONFIG_SYS_TEXT_BASE RAM address
  3. u-boot relocates itself
  4. Boot the kernel

I check my u-boot configuration, CONFIG_SYS_TEXT_BASE is 0x80000000, but I am curious, my RAM size is only 1G, and it still can work fine.

1G is equal to 0x40000000, less than 0x80000000

So, I want to know if I have a misunderstanding about CONFIG_SYS_TEXT_BASE or my concept is wrong?

Upvotes: 1

Views: 4557

Answers (1)

artless-noise-bye-due2AI
artless-noise-bye-due2AI

Reputation: 22395

I check my u-boot configuration, CONFIG_SYS_TEXT_BASE is 0x80000000, but I am curious, my RAM size is only 1G, and it still can work fine.

1G is equal to 0x40000000, less than 0x80000000

So, I want to know if I have a misunderstanding about CONFIG_SYS_TEXT_BASE or my concept is wrong?

Your understanding of CONFIG_SYS_TEXT_BASE is correct. What is wrong is that the RAM size is related to the RAM physical start address. The RAM starts at 0x80000000 and ends at 0xC0000000 (1G later). So 0xC0000000-0x80000000 = 0x40000000 = 1G.

You would have an issue if your ram was at 0xD0000000 an was 1G big or something like that. Normally people would not build such a system.

Upvotes: 1

Related Questions