Attention is currently required from: Arthur Heymans, Nico Huber, Martin Roth, Tim Wawrzynczak, Julius Werner, Rob Barnes, Karthik Ramasubramanian.

Raul Rangel uploaded patch set #4 to this change.

View Change

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
---
M src/cpu/x86/smm/smm_module_handler.c
M src/cpu/x86/smm/smm_module_loader.c
M src/include/console/cbmem_console.h
M src/include/cpu/x86/smm.h
M src/lib/Makefile.inc
M src/lib/cbmem_console.c
6 files changed, 36 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/62355/4

To view, visit change 62355. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia1e310a12ca2f54210ccfaee58807cb808cfff79
Gerrit-Change-Number: 62355
Gerrit-PatchSet: 4
Gerrit-Owner: Raul Rangel <rrangel@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur.heymans@9elements.com>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub@google.com>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Rob Barnes <robbarnes@google.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-Attention: Arthur Heymans <arthur.heymans@9elements.com>
Gerrit-Attention: Nico Huber <nico.h@gmx.de>
Gerrit-Attention: Martin Roth <martinroth@google.com>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak@chromium.org>
Gerrit-Attention: Julius Werner <jwerner@chromium.org>
Gerrit-Attention: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Attention: Rob Barnes <robbarnes@google.com>
Gerrit-Attention: Karthik Ramasubramanian <kramasub@google.com>
Gerrit-MessageType: newpatchset