Attention is currently required from: Nico Huber, Jonathan Zhang, Paul Menzel, Christian Walter, Rocky Phagura, Angel Pons, Arthur Heymans, Kyösti Mälkki, Deomid "rojer" Ryabkov.

Johnny Lin uploaded patch set #11 to the change originally created by Deomid "rojer" Ryabkov.

View Change

Add console deinit API, use in SMM handler

SMM handler should return shared hardware to the state it was at the time
of the SMI call. When CONFIG_DEBUG_SMI is enabled SMM handler performs
console hardware initialization that may interfere with OS.

Specifically, this has been observed with SMM handler output to UART
on an OCP Delta Lake server: uart8250_init disables interrupts because it
uses polling but the Linux kernel (5.6) uses interrupts. As a result, SMI
call leaves interrupts disabled and causes OS console I/O issues.

For 8250, we save all the registers we touch in init and restore them in
deinit. Other deinit functions are provided as stubs only due to lack of
hardware for testing but should probably be looked into as well.

Signed-off-by: Deomid "rojer" Ryabkov <rojer9@fb.com>
Change-Id: Ia5e51f385f83cb998c244ca1d1ffc10339d3a714
---
M src/console/console.c
M src/console/init.c
M src/cpu/x86/smm/smm_module_handler.c
M src/drivers/uart/pl011.c
M src/drivers/uart/sifive.c
M src/drivers/uart/uart8250io.c
M src/drivers/uart/uart8250mem.c
M src/include/console/cbmem_console.h
M src/include/console/console.h
M src/include/console/flash.h
M src/include/console/ne2k.h
M src/include/console/qemu_debugcon.h
M src/include/console/spi.h
M src/include/console/spkmodem.h
M src/include/console/streams.h
M src/include/console/system76_ec.h
M src/include/console/uart.h
M src/include/console/usb.h
18 files changed, 126 insertions(+), 2 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/56386/11

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia5e51f385f83cb998c244ca1d1ffc10339d3a714
Gerrit-Change-Number: 56386
Gerrit-PatchSet: 11
Gerrit-Owner: Deomid "rojer" Ryabkov <rojer9@fb.com>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Christian Walter <christian.walter@9elements.com>
Gerrit-Reviewer: Johnny Lin <Johnny_Lin@wiwynn.com>
Gerrit-Reviewer: Jonathan Zhang <jonzhang@fb.com>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Rocky Phagura
Gerrit-Reviewer: Rocky Phagura <rphagura@fb.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-Attention: Nico Huber <nico.h@gmx.de>
Gerrit-Attention: Jonathan Zhang <jonzhang@fb.com>
Gerrit-Attention: Paul Menzel <paulepanter@mailbox.org>
Gerrit-Attention: Christian Walter <christian.walter@9elements.com>
Gerrit-Attention: Rocky Phagura <rphagura@fb.com>
Gerrit-Attention: Rocky Phagura
Gerrit-Attention: Angel Pons <th3fanbus@gmail.com>
Gerrit-Attention: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Attention: Kyösti Mälkki <kyosti.malkki@gmail.com>
Gerrit-Attention: Deomid "rojer" Ryabkov <rojer9@fb.com>
Gerrit-MessageType: newpatchset