summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@chromium.org>2012-06-05 15:13:21 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-07-24 19:52:53 +0200
commit3a8cad3c146265ec614ac8623cf6db94d0ab2ed3 (patch)
tree4f74ba002749238b321a4ed99fa36e86d6423e86
parent3f6a4d71647ebd7484c1c40be4c909d3c183e4fa (diff)
downloadcoreboot-staging-3a8cad3c146265ec614ac8623cf6db94d0ab2ed3.zip
coreboot-staging-3a8cad3c146265ec614ac8623cf6db94d0ab2ed3.tar.gz
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@chromium.org> Reviewed-on: http://review.coreboot.org/1271 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
-rw-r--r--src/lib/lzma.c5
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
+#endif
+ /* in pre-ram, it must go on the stack */
unsigned char scratchpad[15980];
memcpy(properties, src, LZMA_PROPERTIES_SIZE);
OpenPOWER on IntegriCloud