[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

On Mon, Jul 28, 2003 at 10:24:53AM +0200, Nemec, Bernhard wrote:
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.
I've noticed that as well when I started porting u-boot to some PXA boards. My -ptx patches (see www.pengutronix.de) contain a fix to for the memory layout but Wolfgang has rejected the patch until the whole mess of the different initialisation strategies between ARM and PPC is resolved. As I didn't have time to do some work in this area yet things are still the way they are...
Robert

In message 20030728090022.GQ28983@pengutronix.de you wrote:
I've noticed that as well when I started porting u-boot to some PXA boards. My -ptx patches (see www.pengutronix.de) contain a fix to for the memory layout but Wolfgang has rejected the patch until the whole mess of the different initialisation strategies between ARM and PPC is
I will happily accept a patch that fixes this for _all_ ARM boards.
Best regards,
Wolfgang Denk

Dear Bernhard,
in message 5FDDBF5436E7D61181BB0030482198AB0FE762@nts-hoe32.jaeger-toennies.de you wrote:
1 - _armboot_real_end has the value 0x0BADC0DE, which is not in RAM, but in FLASH range of the PXA.
Read twice: 0x0BADC0DE == BAD CODE.
Think what this might mean.
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.
The ARM support in U-Boot results from a merge of the ARMBoot project, which, when it was forked from the PPCBoot project, did a lot of things differently. Not all of these problems have been cleaned up yet.
Best regards,
Wolfgang Denk
participants (3)
-
Nemec, Bernhard
-
Robert Schwebel
-
Wolfgang Denk