From 7fd1bbc0ecbe28233b8be433d650f1e6fa2900bc Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Mon, 9 Sep 2013 11:22:18 -0700 Subject: [PATCH] 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 Reviewed-on: https://chromium-review.googlesource.com/168575 Reviewed-by: Aaron Durbin --- src/lib/cbmem_console.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/cbmem_console.c b/src/lib/cbmem_console.c index 45ab1ff22f..8076425088 100644 --- a/src/lib/cbmem_console.c +++ b/src/lib/cbmem_console.c @@ -64,7 +64,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)