From c4b4ff3b1fb7960621a245df0627339db9db7037 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Thu, 11 May 2017 10:36:29 -0400 Subject: console/flashsconsole: Add spi flash console for debugging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/19849 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Julius Werner Reviewed-by: Philippe Mathieu-Daudé --- util/cbfstool/default-x86.fmd | 1 + util/cbfstool/default.fmd | 1 + 2 files changed, 2 insertions(+) (limited to 'util/cbfstool') diff --git a/util/cbfstool/default-x86.fmd b/util/cbfstool/default-x86.fmd index f344ab2086..1b6cfc8ba6 100644 --- a/util/cbfstool/default-x86.fmd +++ b/util/cbfstool/default-x86.fmd @@ -10,6 +10,7 @@ FLASH@##ROM_BASE## ##ROM_SIZE## { BIOS@##BIOS_BASE## ##BIOS_SIZE## { FMAP@##FMAP_BASE## ##FMAP_SIZE## + ##CONSOLE_ENTRY## COREBOOT(CBFS)@##CBFS_BASE## ##CBFS_SIZE## } } diff --git a/util/cbfstool/default.fmd b/util/cbfstool/default.fmd index 32ddfa4074..50b9bf0bd1 100644 --- a/util/cbfstool/default.fmd +++ b/util/cbfstool/default.fmd @@ -13,6 +13,7 @@ FLASH@##ROM_BASE## ##ROM_SIZE## { BIOS@##BIOS_BASE## ##BIOS_SIZE## { BOOTBLOCK 128K FMAP@##FMAP_BASE## ##FMAP_SIZE## + ##CONSOLE_ENTRY## COREBOOT(CBFS)@##CBFS_BASE## ##CBFS_SIZE## } } -- cgit v1.2.3