From 35382a6eeb6634c291ffb67a3c4fa7a4601a7328 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 2 Apr 2014 17:57:05 -0700 Subject: cbmem console: Locate the preram console with a symbol instead of a section. On non-x86 systems, the location of the preram CBMEM console may not be in a predictable place relative to other things in the linker script. That makes it difficult to work with as its own section because the linker will complain if you try to move backwards as it lays out memory. If the console header is treated as an actual blob of memory which has to be put in the image, we'd have to predict where to put it so that it isn't before something with a lower address or after something with a higher address. Symbols, on the other hand, can be defined arbitrarily. Change-Id: I3257b981eee0c15bb997a9f2c55a03494c6ec6f0 Signed-off-by: Gabe Black Reviewed-on: https://chromium-review.googlesource.com/193164 Reviewed-by: Tom Warren Reviewed-by: Aaron Durbin Commit-Queue: Gabe Black Tested-by: Gabe Black (cherry picked from commit a492761c27076bcac080013d509ae4aafd6dc3e3) Signed-off-by: Isaac Christensen Reviewed-on: http://review.coreboot.org/7013 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/lib/cbmem_console.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/cbmem_console.c b/src/lib/cbmem_console.c index 9d5419a185..b5b75f3ee6 100644 --- a/src/lib/cbmem_console.c +++ b/src/lib/cbmem_console.c @@ -44,7 +44,7 @@ static struct cbmem_console *cbmem_console_p CAR_GLOBAL; * the area are defined in the config. */ -static struct cbmem_console car_cbmem_console CAR_CBMEM; +extern struct cbmem_console preram_cbmem_console; #else @@ -86,7 +86,8 @@ static inline void init_console_ptr(void *storage, u32 total_space) void cbmemc_init(void) { #ifdef __PRE_RAM__ - init_console_ptr(&car_cbmem_console, CONFIG_CONSOLE_CAR_BUFFER_SIZE); + init_console_ptr(&preram_cbmem_console, + CONFIG_CONSOLE_PRERAM_BUFFER_SIZE); #else /* * Initializing before CBMEM is available, use static buffer to store -- cgit v1.2.3