summaryrefslogtreecommitdiff
path: root/src/console/Kconfig
diff options
context:
space:
mode:
authorYouness Alaoui <youness.alaoui@puri.sm>2017-05-11 10:36:29 -0400
committerMartin Roth <martinroth@google.com>2017-06-04 18:44:56 +0200
commitc4b4ff3b1fb7960621a245df0627339db9db7037 (patch)
tree1c170d160ff76c896b97c44339f1f886e64cc5d0 /src/console/Kconfig
parentcadd7c7ed31e7901c56e6d0dc7a0aba7e34c776d (diff)
console/flashsconsole: Add spi flash console for debugging
If CONSOLE_SPI_FLASH config is enabled, we write the cbmem messages to the 'CONSOLE' area in FMAP which allows us to grab the log when we read the flash. This is useful when you don't have usb debugging, and UART lines are hard to find. Since a failure to boot would require a hardware flasher anyways, we can get the log at the same time. This feature should only be used when no alternative is found and only when we can't boot the system, because excessive writes to the flash is not recommended. This has been tested on purism/librem13 v2 and librem 15 v3 which run Intel Skylake hardware. It has not been tested on other archs or with a driver other than the fast_spi. Change-Id: I74a297b94f6881d8c27cbe5168f161d8331c3df3 Signed-off-by: Youness Alaoui <youness.alaoui@puri.sm> Reviewed-on: https://review.coreboot.org/19849 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
Diffstat (limited to 'src/console/Kconfig')
-rw-r--r--src/console/Kconfig31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/console/Kconfig b/src/console/Kconfig
index caf91ab252..c0e4a8c8b0 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -233,6 +233,37 @@ config CONSOLE_CBMEM_DUMP_TO_UART
endif
+config CONSOLE_SPI_FLASH
+ bool "SPI Flash console output"
+ default n
+ select BOOT_DEVICE_SPI_FLASH_RW_NOMMAP_EARLY if !COMMON_CBFS_SPI_WRAPPER
+ help
+ Send coreboot debug output to the SPI Flash in the FMAP CONSOLE area
+
+ This option can cause premature wear on the SPI flash and should not
+ be used as a normal means of debugging. It is only to be enabled and
+ used when porting a new motherboard which has no other console
+ available (no UART, no POST, no cbmem access(non bootable)). Since
+ a non bootable machine will require the use of an external SPI Flash
+ programmer, the developer can grab the console log at the same time.
+
+ The flash console will not be erased on reboot, so once it is full,
+ the flashconsole driver will stop writing to it. This is to avoid
+ wear on the flash, and to avoid erasing sectors (which may freeze
+ the SPI controller on skylake).
+
+ The 'CONSOLE' area can be extracted from the FMAP with :
+ cbfstool rom.bin read -r CONSOLE -f console.log
+
+config CONSOLE_SPI_FLASH_BUFFER_SIZE
+ hex "Room allocated for console output in FMAP"
+ default 0x20000
+ depends on CONSOLE_SPI_FLASH
+ help
+ Space allocated for console output storage in FMAP. The default
+ value (128K or 0x20000 bytes) is large enough to accommodate
+ even the BIOS_SPEW level.
+
config CONSOLE_QEMU_DEBUGCON
bool "QEMU debug console output"
depends on BOARD_EMULATION_QEMU_X86