[coreboot-gerrit] New patch to review for coreboot: fcc42f5 cbmem_console: fix it for x86
Aaron Durbin (adurbin@chromium.org)
gerrit at coreboot.org
Mon Apr 20 22:27:54 CEST 2015
Aaron Durbin (adurbin at chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9851
-gerrit
commit fcc42f5129026e9f87da0af7b0f9b82b26f90d47
Author: Aaron Durbin <adurbin at chromium.org>
Date: Mon Apr 20 15:24:19 2015 -0500
cbmem_console: fix it for x86
The Kconfig options pertaining cbmem console in the preram
environment no longer make sense with the linker script
changes. Remove them and their usage within cbmem_console.
Change-Id: Ibf61645ca2331e4851e748e4e7aa5059e1192ed7
Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
src/console/Kconfig | 5 -----
src/cpu/amd/model_10xxx/Kconfig | 5 -----
src/include/console/cbmem_console.h | 4 ++--
src/lib/cbmem_console.c | 10 +++-------
4 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/src/console/Kconfig b/src/console/Kconfig
index 09cfb39..2807039 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -184,11 +184,6 @@ config CONSOLE_CBMEM_BUFFER_SIZE
value (128K or 0x20000 bytes) is large enough to accommodate
even the BIOS_SPEW level.
-config CONSOLE_PRERAM_BUFFER_BASE
- hex
- default 0xabadbeef if !CACHE_AS_RAM || LATE_CBMEM_INIT
- default 0x0
-
endif
config CONSOLE_QEMU_DEBUGCON
diff --git a/src/cpu/amd/model_10xxx/Kconfig b/src/cpu/amd/model_10xxx/Kconfig
index a0d5cb4..cd69cae 100644
--- a/src/cpu/amd/model_10xxx/Kconfig
+++ b/src/cpu/amd/model_10xxx/Kconfig
@@ -72,9 +72,4 @@ config UDELAY_LAPIC_FIXED_FSB
int
default 200
-config CONSOLE_PRERAM_BUFFER_SIZE
- hex
- default 0x0 if CONSOLE_PRERAM_BUFFER_BASE = 0xabadbeef
- default 0x8000
-
endif # CPU_AMD_MODEL_10XXX
diff --git a/src/include/console/cbmem_console.h b/src/include/console/cbmem_console.h
index 81bc10f..f29982a 100644
--- a/src/include/console/cbmem_console.h
+++ b/src/include/console/cbmem_console.h
@@ -32,8 +32,8 @@ static inline void cbmemc_reinit(void) {}
#endif
#define __CBMEM_CONSOLE_ENABLE__ CONFIG_CONSOLE_CBMEM && \
- (ENV_RAMSTAGE || (CONFIG_CONSOLE_PRERAM_BUFFER_SIZE && \
- ((ENV_BOOTBLOCK && CONFIG_BOOTBLOCK_CONSOLE) || ENV_ROMSTAGE)))
+ (ENV_RAMSTAGE || ENV_ROMSTAGE || \
+ (ENV_BOOTBLOCK && CONFIG_BOOTBLOCK_CONSOLE))
#if __CBMEM_CONSOLE_ENABLE__
static inline void __cbmemc_init(void) { cbmemc_init(); }
diff --git a/src/lib/cbmem_console.c b/src/lib/cbmem_console.c
index 770c1d2..34c415a 100644
--- a/src/lib/cbmem_console.c
+++ b/src/lib/cbmem_console.c
@@ -209,20 +209,16 @@ static void copy_console_buffer(struct cbmem_console *old_cons_p,
void cbmemc_reinit(void)
{
- struct cbmem_console *cbm_cons_p = NULL;
+ struct cbmem_console *cbm_cons_p;
int flags = CBMEMC_APPEND;
- if (ENV_ROMSTAGE && (CONFIG_CONSOLE_PRERAM_BUFFER_SIZE == 0))
- return;
+ if (!ENV_RAMSTAGE && _preram_cbmem_console_size == 0)
+ flags = CBMEMC_RESET;
/* If CBMEM entry already existed, old contents is not altered. */
cbm_cons_p = cbmem_add(CBMEM_ID_CONSOLE,
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE);
- /* Clear old contents of CBMEM buffer. */
- if (ENV_ROMSTAGE || (CONFIG_CONSOLE_PRERAM_BUFFER_SIZE == 0))
- flags |= CBMEMC_RESET;
-
init_console_ptr(cbm_cons_p,
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE, flags);
}
More information about the coreboot-gerrit
mailing list