coreboot/src/include/console
Raul E Rangel c5160986cf cpu/x86/smm,lib/cbmem_console: Enable CBMEMC when using DEBUG_SMI
This change will allow the SMI handler to write to the cbmem console
buffer. Normally SMIs can only be debugged using some kind of serial
port (UART). By storing the SMI logs into cbmem we can debug SMIs using
`cbmem -1`. Now that these logs are available to the OS we could also
verify there were no errors in the SMI handler.

Since SMM can write to all of DRAM, we can't trust any pointers
provided by cbmem after the OS has booted. For this reason we store the
cbmem console pointer as part of the SMM runtime parameters. The cbmem
console is implemented as a circular buffer so it will never write
outside of this area.

BUG=b:221231786
TEST=Boot non-serial FW with DEBUG_SMI and verified SMI messages are
visible when running `cbmem -1`. Perform a suspend/resume cycle and
verify new SMI events are written to the cbmem console log.

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Ia1e310a12ca2f54210ccfaee58807cb808cfff79
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62355
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2022-03-09 14:26:26 +00:00
..
cbmem_console.h cpu/x86/smm,lib/cbmem_console: Enable CBMEMC when using DEBUG_SMI 2022-03-09 14:26:26 +00:00
console.h console: Add compile-time fast path when only CBMEM console is used 2022-02-07 23:28:46 +00:00
debug.h soc/intel/xeon_sp: Move function debug macros 2020-10-29 16:44:19 +00:00
flash.h src/include: Drop unneeded empty lines 2020-09-14 07:09:41 +00:00
ne2k.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
qemu_debugcon.h console/qemu_debugcon: Support additional stages 2019-03-23 07:05:28 +00:00
spi.h src: Rename EM100Pro-specific SPI console Kconfig option 2020-10-13 08:40:52 +00:00
spkmodem.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
streams.h console: Add loglevel prefix to interactive consoles 2022-02-07 14:11:44 +00:00
system76_ec.h ec/system76: Add console support 2020-09-07 21:46:34 +00:00
uart.h console: Override uart base address 2020-11-09 07:46:10 +00:00
usb.h include/console/usb.h: Drop dead code 2020-07-09 23:51:09 +00:00
vtxprintf.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00