[U-Boot-Users] what is wrong when calloc return bogus?
Wolfgang Denk
wd at denx.de
Fri Aug 15 22:39:17 CEST 2003
In message <FD2AC9A020DDD51194710008C7089B200BEE22B9 at dlee17.itg.ti.com> you wrote:
> This has come up a couple times recently. I'll agree that from a consistency
> standpoint it would be nice if this were same for all architectures, and it
> will probably end up this way, but is it really "broken", what is not
> currently functioning, other than a proper mapping from the documentation to
> reality.
The design idea of U-Boot is that you boot from flash, initialize
RAM, measure the size of available RAM, and then use RAm in a top
down way. If we exclude more exotic features like pRAM, log buffer,
or frame buffer memory that shall be reused by the Linux kernel this
means copy U-Boot code, data and bss to the end of RAM, below it you
place the malloc arena, and below that the stack (growing downward).
This is easy to implement, and provides maximum flexibility even in
cases where the memory size of a board is unknown at compile time.
Also, it allows the aforementioned "exotic" features like passing
information from U-Boot (like POST results) in a syslog compatible
way to Linux, or initializing a framebuffer in U-Boot (with a splash
screen for example) and keep this image steady until the Linux
application start, or pRAM, where data can be stored which will not
be changed by a warmboot.
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
Technology is dominated by those who manage what they do not under-
stand.
More information about the U-Boot
mailing list