[U-Boot-Users] Re: [PATCH][CFT] bring ARM memory layout in line with the documented behaviour
Wolfgang Denk
wd at denx.de
Thu Sep 18 13:00:39 CEST 2003
Dear Anders,
in message <fc.004c4e48001cba02004c4e48001cba02.1cba71 at rea.de> you wrote:
>
> here's a fairly lengthy patch against 0.4.8 that brings the memory
> layout of all supported ARM CPUs in line with the documentation.
> This has the positive side-effect of allowing U-Boot to actually run on
> PXA CPUs (the stock PXA implementation didn't set the start-address of
> the malloc pool at all!)
>
> The memory layout now more or less conforms to the standard as defined
> in the README (the absolute addresses are board-specific, of course).
>
> Since the stack and malloc-heap are now located below the U-Boot code,
> the TEXT_BASE of the supported ARM boards can be increased accordingly
> (for most (but not all) boards, the patch already does this).
This is actually the biggest "problem" with the existing ARM code (as
inherited from ARMBoot): with the orginal philosophy of PPCBoot,
TEXT_BASE should not play ANY role here.
The way I would like to soo this implemented, and as it _is_
implemented in PPCBoot (and in U-Boot for PowerPC) is as follows:
TEXT_BASE determines the start address in FLASH memory which is used
before relocation.
The RAM initialization code is, among other things, responsible to
determine the size of the RAM, and the relocation address is then
calculated DYNAMICALLY dependend on the RAM size found. This allows
that boards with different RAM sizes will always provide maximum free
RAM under U-Boot.
> Memory layout example based on my PXA255 (TEXT_BASE = 0xA07E0000):
>
> 0xA079FF74 Monitor Stack (growing downwards)
> 0xA079FF80 Board Info Data and permanent copy of Global Data
> 0xA07A0000 Malloc Arena
> 0xA07E0000 RAM copy of Monitor Code
> ... optional: Frame Buffer
> 0xA07FFFFF [End of RAM]
I still see references to _armboot_start, _armboot_end_data, and
_armboot_end - which role do these play now? Can we get rid of them?
How are they (should they be) set in your memory map above?
> Since I only have access to PXA-based HW, I was only able to verify
> that U-Boot still *builds* for all supported ARMs; I have to rely on
> your help to see if it also *runs* correctly.
I think some more code should be changed like the allocation of
display memory (see CONFIG_VFD in "lib_arm/board.c") - this should be
done like we do for PowerPC, too.
Any test results / comments from the other board maintainers?
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
Politics: A strife of interests masquerading as a contest of
principles. The conduct of public affairs for private advantage.
- Ambrose Bierce
More information about the U-Boot
mailing list