<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>heap location (PXA)</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Hi,</FONT>
</P>

<P><FONT SIZE=2>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.</FONT></P>

<P><FONT SIZE=2>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.</FONT></P>

<P><FONT SIZE=2>1 - _armboot_real_end has the value 0x0BADC0DE, which is not in RAM, but in FLASH range of the PXA.</FONT>
</P>

<P><FONT SIZE=2>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.</FONT></P>

<P><FONT SIZE=2>Therefore I would propose to change</FONT>
</P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mem_malloc_init (_armboot_real_end);</FONT>
<BR><FONT SIZE=2>to</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mem_malloc_init ( _armboot_start - CFG_MALLOC_LEN );</FONT>
</P>

<P><FONT SIZE=2>in start_armboot().</FONT>
</P>

<P><FONT SIZE=2>I'm interested in any thoughts on the subject.</FONT>
</P>

<P><FONT SIZE=2>Thanks,</FONT>
<BR><FONT SIZE=2>Bernhard</FONT>
</P>

</BODY>
</HTML>