summaryrefslogtreecommitdiff
path: root/src/lib/cbmem_console.c
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2013-09-09 11:22:18 -0700
committerKyösti Mälkki <kyosti.malkki@gmail.com>2013-11-30 20:47:06 +0100
commit19d06b2f891a47bdaa02a5b8e60cef85313aae83 (patch)
tree8452b0ece5dcea8cf33d70c3c1e80311ae2bf967 /src/lib/cbmem_console.c
parenta3c5ba3ca71c6c6a72a4ab1ef244d3b4acfb83a9 (diff)
downloadcoreboot-19d06b2f891a47bdaa02a5b8e60cef85313aae83.tar.xz
cbmem console: reduce temporary buffer size for dynamic CBMEM
When using dynamic CBMEM the CBMEM area is initialized before entering ram stage, and so we need a way smaller temporary buffer for the CBMEM console during early bits of ram stage. In practice around 256 bytes are needed, but keep the buffer at 1k so we make sure we don't run out. TEST=Boot tested on pit BRANCH=none BUG=none Change-Id: I462810b7bafbcc57f8e5f9b1d1f38cfdf85fa630 Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: https://chromium-review.googlesource.com/168575 Reviewed-by: Aaron Durbin <adurbin@chromium.org> [km: cherry-pick 7fd1bbc0 from chromium git] Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/4293 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martin.roth@se-eng.com>
Diffstat (limited to 'src/lib/cbmem_console.c')
-rw-r--r--src/lib/cbmem_console.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/cbmem_console.c b/src/lib/cbmem_console.c
index ac1d8bbd7e..fec11f7564 100644
--- a/src/lib/cbmem_console.c
+++ b/src/lib/cbmem_console.c
@@ -53,7 +53,13 @@ static struct cbmem_console car_cbmem_console CAR_CBMEM;
* to be concatenated with the CBMEM console buffer contents accumulated
* during the ROM stage, once CBMEM becomes available at RAM stage.
*/
-static u8 static_console[40000];
+
+#if CONFIG_DYNAMIC_CBMEM
+#define STATIC_CONSOLE_SIZE 1024
+#else
+#define STATIC_CONSOLE_SIZE 40000
+#endif
+static u8 static_console[STATIC_CONSOLE_SIZE];
#endif
static inline struct cbmem_console *current_console(void)