From ed6c4a85d16223805969192ef360b360698f2a2a Mon Sep 17 00:00:00 2001 From: David Given Date: Thu, 6 Jun 2013 00:05:48 +0100 Subject: [PATCH] Change the size of the SRAM area to 128kB (to reflect reality). --HG-- branch : dtrg-videocore --- plat/rpi/README | 6 +++--- plat/rpi/libsys/brk.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plat/rpi/README b/plat/rpi/README index 166d2148b..f8836724c 100644 --- a/plat/rpi/README +++ b/plat/rpi/README @@ -11,7 +11,7 @@ you're running in bare-metal mode, you can hook stdin/stdout up to the mini UART. (Obviously, in kernel mode you can't.) Important note! The malloc heap expects your program to be loaded into a -chunk of memory that's 256kB large. You must make sure that this is the case, +chunk of memory that's 128kB large. You must make sure that this is the case, or Bad Stuff will happen. Output binaries are fully PIC and can be loaded anywhere (this is one of the @@ -57,10 +57,10 @@ variable. It's a structure that is initialised with the data that's passed in from mailbox.c (currently four pointers and two integers). If you want to use malloc() and friends, you'll need to hack mailbox.c so -that the buffer containing the code is at least 256kB, or you're likely to +that the buffer containing the code is at least 128kB, or you're likely to corrupt the VideoCore's workspace and crash it. David Given -2013-05-26 +2013-06-06 diff --git a/plat/rpi/libsys/brk.c b/plat/rpi/libsys/brk.c index 2c44347d4..36c7d4a6f 100644 --- a/plat/rpi/libsys/brk.c +++ b/plat/rpi/libsys/brk.c @@ -19,7 +19,7 @@ static char* current = _end; /* Top of heap: we assume that the block of memory the binary is loaded in * is 256kB long. Because user pointers are always relative to the beginning * of the block, this makes the end address easy to calculate. */ -static char* max = (char*) (256*1024); +static char* max = (char*) (128*1024); int brk(void* newend) { -- 2.34.1