[U-Boot] memory corruption on nios2 due to overlap of gbl data and malloc

Mike Frysinger vapier at gentoo.org
Wed Feb 29 20:04:25 CET 2012


On Tuesday 28 February 2012 18:32:57 Graeme Russ wrote:
> And this is why I dislike the implementation - You have to do all sorts of
> weird calucations to put things in the right place when, in fact, the
> location of gd and bd in memory is totally irrelavent.

right, that's why i minimized the pain for Blackfin users -- this is all 
handled in the arch's config-pre.h header.  board porters only need to declare 
the size of regions they care about (monitor and heap sizes).

> Ow, ouch! - And that padding makes things more fun - The memory layout is
> 
> U-Boot | gd | pad | bd | pad | heap

fwiw, i documented the Blackfin memory layout:
http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:memory-layout
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120229/481c9218/attachment.pgp>


More information about the U-Boot mailing list