Understanding Linux load address for U-Boot process

Ivo Slanina picture Ivo Slanina · Jan 24, 2015 · Viewed 23.2k times · Source

I'm trying to understand embedded Linux principles and can't figure out addresses at u-boot output.

For example, I have UDOO board based on i.MX6 quad processor and I got following output from U-Boot:

U-Boot 2013.10-rc3 (Jan 20 2014 - 13:33:34)

CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
Reset cause: POR
Board: UDOO
DRAM:  1 GiB
MMC:   FSL_SDHC: 0
No panel detected: default to LDB-WVGA
Display: LDB-WVGA (800x480)
In:    serial
Out:   serial
Err:   serial
Net:   using phy at 6
FEC [PRIME]
Warning: FEC MAC addresses don't match:
Address in SROM is         00:c0:08:88:a5:e6
Address in environment is  00:c0:08:88:9c:ce

Hit any key to stop autoboot:  0 
Booting from mmc ...
4788388 bytes read in 303 ms (15.1 MiB/s)
## Booting kernel from Legacy Image at 12000000 ...
   Image Name:   Linux-3.0.35
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4788324 Bytes = 4.6 MiB
   Load Address: 10008000
   Entry Point:  10008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

I don't understand the value of Load address 0x10008000. According to documentation for this particular processor, at address zone 0x10000000 - 0xffffffff is mapped main memory. But what is 0x8000 offset? I can't figure out reason for this value.

I also don't understand address 0x12000000, where the kernel image is loaded from. Is there mapped memory region for SD card?

Please, can you give me some explanation for these addresses or even better, some references to resources about this topic. My goal is to learn how to port u-boot and Linux kernel to another boards.

Thank you!

Answer

GeekyJ picture GeekyJ · Oct 27, 2015

If you check the environment variables of the u-boot, you will find that kernel image is copied from boot device to the RAM location(Here, 12000000) through command like fatload.

Now, This is not the LOADADDRESS. You give LOADADDRESS to command line while compiling the kernel, This address is mostly at 32K offset from start of the RAM in Physical address space of the processor.

Your RAM is mapped at 10000000 and kernel LOADADDRESS is 10008000(32K offset). bootm command uncompress the kernel image from 12000000 to 10008000 address and then calls the kernel entry point.