[U-Boot-Users] heap location (PXA)
Woodruff, Richard
r-woodruff2 at ti.com
Tue Jul 29 19:17:31 CEST 2003
Hello,
The memory map for ARM is not as documented in the u-boot README (which is
still fairly powerpc centric in several spots). I can't say that it has
really bothered me one way or the other as what is there is functional.
BOTH the stack and heap are currently located above the relocated text area
(as is the board info structure).
- armboot_real_end's value of deadcode is really only a place holder until
the variable is initialized after relocation in cpu.c.
Fixing the memory map to match would be nice from a consistency standpoint,
but I'm not sure if there is any great functional gain from it. If there is
I'd like to hear about it also, and then perhaps then would it be worth the
effort to switch it. The main gain in the "overall" scheme which is used on
PPC seems to be its selective relocation allowing for a very small dynamic
memory footprint, not so much in its arrangement. Of coarse small is all
relative to what you have, but these days it seems to be less a concern on
32bit systems.
The map I use looks something like.
--------------------------- 0x11f6df84
|
| Heap for malloc
|- Environment
|- nand struct
--------------------------- 0x11f3DF84, malloc_start
| - abort stack 3 words
| - u-boot globals (r8)
| Stack
|
--------------------------- 0x11f1df84, _armboot_end
|
| Text
|
|
|--------------------------- 0x11f00000,
Regards,
Richard W.
-----Original Message-----
From: Nemec, Bernhard [mailto:Bernhard.Nemec at jaeger-toennies.com]
Sent: Monday, July 28, 2003 3:25 AM
To: u-boot-users at lists.sourceforge.net
Subject: [U-Boot-Users] heap location (PXA)
Hi,
I'm porting u-boot 0.4.0 to a custom PXA255 board similar to the CSB226, of
which I used the configuration as a starting point.
What I'm confused about ATM is _armboot_real_end, which is used for heap
initialisation with mem_malloc_init() in lib_arm/board.c.
1 - _armboot_real_end has the value 0x0BADC0DE, which is not in RAM, but in
FLASH range of the PXA.
2 - the heap is supposed to be located *below* u-boot, not above, since
u-boot itself gets relocated to the upper end of RAM.
Therefore I would propose to change
mem_malloc_init (_armboot_real_end);
to
mem_malloc_init ( _armboot_start - CFG_MALLOC_LEN );
in start_armboot().
I'm interested in any thoughts on the subject.
Thanks,
Bernhard
More information about the U-Boot
mailing list