Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am in uboot and was wondering, how could I tell what RAM address range is being used by uboot.

uboot needs memory to run so it might be using some of the RAM. I want to avoid modifying those RAM addresses.

How do I know which region of memory is uboot loaded?

share|improve this question
add comment

1 Answer

The DULG DebuggingUBoot page has this to say (the "relocation" it speaks of is copying itself from flash to RAM).

For debugging U-Boot after relocation we need to know the address to which U-Boot relocates itself to. When no exotic features like PRAM are used, this address usually is - CONFIG_SYS_MONITOR_LEN. In our example with 16MB RAM and CONFIG_SYS_MONITOR_LEN = 192KB this yields the address 0x1000000 - 0x30000 = 0xFD0000.

Further reading of the text seems to indicate it's dependent on the processor or board and that you may have to check the U-Boot source to know for sure.

Regarding the Guruplug:

On the RAM side, u-Boot has the first 8 megabytes reserved. The rest is free. Some developer’s will load kernels and filesystems at 0×800000 for programming to flash. Another common spot is at the 100 megabyte boundary (or offset 0×640000).

Depending on your version of U-Boot commands may be available to put a string somewhere in free RAM and then hunt the rest of RAM for that string, revealing the approximate location of U-Boot in memory.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.