CBMEM console: Fix and enhance pre-RAM support
Use the value of CONSOLE_PRERAM_BUFFER_SIZE to determine if we can do CBMEM console in bootblock and romstage. Kconfig forces it to zero if _BASE is unset or we cannot do CAR migration on x86. Add CBMEM console to bootblock, except for x86. Only one of bootblock and romstage clears the pre-RAM buffer. To start with empty console log on S3 wakeup, ramstage now clears previous contents of CBMEM buffer if there was no pre-RAM buffer. Unify Kconfig variable naming. TODO: ARM configurations do not define PRERAM_BUFFER_BASE values. Change-Id: I70d82da629529dbfd7bc9491223abd703cbc0115 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/7862 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
@@ -175,8 +175,9 @@ config CONSOLE_CBMEM
|
||||
Enable this to save the console output in a CBMEM buffer. This would
|
||||
allow to see coreboot console output from Linux space.
|
||||
|
||||
if CONSOLE_CBMEM
|
||||
|
||||
config CONSOLE_CBMEM_BUFFER_SIZE
|
||||
depends on CONSOLE_CBMEM
|
||||
hex "Room allocated for console output in CBMEM"
|
||||
default 0x20000
|
||||
help
|
||||
@@ -184,9 +185,14 @@ 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 || BROKEN_CAR_MIGRATE
|
||||
default 0x0
|
||||
|
||||
config CONSOLE_PRERAM_BUFFER_SIZE
|
||||
depends on CONSOLE_CBMEM
|
||||
hex "Room allocated for console output before RAM is initialized"
|
||||
hex
|
||||
default 0x0 if CONSOLE_PRERAM_BUFFER_BASE = 0xabadbeef
|
||||
default 0xc00
|
||||
help
|
||||
Console is used before RAM is initialized. This is the room reserved
|
||||
@@ -194,6 +200,8 @@ config CONSOLE_PRERAM_BUFFER_SIZE
|
||||
can be saved in a CBMEM buffer. 3K bytes should be enough even for
|
||||
the BIOS_SPEW level.
|
||||
|
||||
endif
|
||||
|
||||
config CONSOLE_QEMU_DEBUGCON
|
||||
bool "QEMU debug console output"
|
||||
depends on BOARD_EMULATION_QEMU_X86
|
||||
|
Reference in New Issue
Block a user