Attention is currently required from: Jérémy Compostella.

Simon Glass uploaded patch set #3 to this change.

View Change

Post-build control of serial

Use the new 'coreboot Control Block' (CCB) to control console output,
including the very first bootblock banner.

This involves moving console_init() later in a few cases, so that CBMEM
is available. Otherwise the postcar and ramstage will output a banner
even when the console is silent.

Provide a feature in cbfstool to enable and disable the console output.

This adds only around 100 bytes to the bootblock size on x86 machines,
so is small enough to be enabled in most cases.

BUG=none
BRANCH=none
TEST=make (to build coreboot)
$ cbfstool build/coreboot.rom ccb-get -n console
console=loud

First try this to see that the bootblock outputs its banner:

$ qemu-system-i386 -bios build/coreboot.rom -nographic |head -5

[NOTE ] coreboot-4.21 Fri Nov 17 12:09:01 UTC 2023 x86_32
bootblock starting (log level: 7)...
...

Now set it to silent and try again, to see that the bootblock output is
suppressed, so that the first output shown is the romstage:

$ cbfstool build/coreboot.rom ccb-get -n console -V silent
console=silent

$ qemu-system-i386 -bios build/coreboot.rom -nographic
(no output)

Change-Id: Ibd867950f117cc6b3dbc582505f3983a0dd714fb
Signed-off-by: Simon Glass <sjg@chromium.org>
---
M Documentation/util/cbfstool/ccb.md
M src/arch/x86/postcar.c
M src/commonlib/include/commonlib/ccb.h
M src/console/Kconfig
M src/console/console.c
M src/console/init.c
M src/include/console/console.h
M src/include/console/streams.h
M src/lib/hardwaremain.c
M util/cbfstool/cbfstool.c
10 files changed, 117 insertions(+), 15 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/79594/3

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

Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ibd867950f117cc6b3dbc582505f3983a0dd714fb
Gerrit-Change-Number: 79594
Gerrit-PatchSet: 3
Gerrit-Owner: Simon Glass <sjg@chromium.org>
Gerrit-Reviewer: Jérémy Compostella <jeremy.compostella@intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Attention: Jérémy Compostella <jeremy.compostella@intel.com>