[coreboot] New patch to review for coreboot: 6503114 Shrink the stack sizes we need in coreboot

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Mon Jul 23 23:20:37 CEST 2012

Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1271


commit 6503114554ab8585d0b296d06d9520d16e1df658
Author: Ronald G. Minnich <rminnich at chromium.org>
Date:   Tue Jun 5 15:13:21 2012 -0700

    Shrink the stack sizes we need in coreboot
    We accomplish this goal by getting rid of the huge auto array in the
    ram stage. This will in turn let us reduce CONFIG_STACK_SIZE.
    We have to leave it on the stack in CAR as that's the simple way to
    keep it private. It does not matter then as there is only one core
    that is active.
    Change-Id: Ie37a057ccae088b7f3bb4aab6de2713e64d96df6
    Signed-off-by: Ronald G. Minnich <rminnich at chromium.org>
 src/lib/lzma.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/lib/lzma.c b/src/lib/lzma.c
index bc38f35..f0b88c1 100644
--- a/src/lib/lzma.c
+++ b/src/lib/lzma.c
@@ -23,6 +23,11 @@ unsigned long ulzma(unsigned char * src, unsigned char * dst)
 	int res;
 	CLzmaDecoderState state;
 	SizeT mallocneeds;
+#if !defined(__PRE_RAM__)
+	/* in ramstage, this can go in BSS */
+	static
+	/* in pre-ram, it must go on the stack */
 	unsigned char scratchpad[15980];
 	memcpy(properties, src, LZMA_PROPERTIES_SIZE);

More information about the coreboot mailing list