coreboot/src
Julius Werner 984d03c492 console: Add loglevel marker codes to stored consoles
In order to provide the same loglevel prefixes and highlighting that
were recently introduced for "interactive" consoles (e.g. UART) to
"stored" consoles (e.g. CBMEM) but minimize the amont of extra storage
space wasted on this info, this patch will write a 1-byte control
character marker indicating the loglevel to the start of every line
logged in those consoles. The `cbmem` utility will then interpret those
markers and translate them back into loglevel prefixes and escape
sequences as needed.

Since coreboot and userspace log readers aren't always in sync,
occasionally an older reader may come across these markers and not know
how to interpret them... but that should usually be fine, as the range
chosen contains non-printable ASCII characters that normally have no
effect on the terminal. At worst the outdated reader would display one
garbled character at the start of every line which isn't that bad.
(Older versions of the `cbmem` utility will translate non-printable
characters into `?` question marks.)

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I86073f48aaf1e0a58e97676fb80e2475ec418ffc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61308
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-02-07 23:28:37 +00:00
..
acpi src: Remove unused <stdbool> 2022-01-19 15:15:50 +00:00
arch arch/riscv: Fix some SMP related headers 2022-01-19 19:29:42 +00:00
commonlib console: Add loglevel marker codes to stored consoles 2022-02-07 23:28:37 +00:00
console console: Add loglevel marker codes to stored consoles 2022-02-07 23:28:37 +00:00
cpu cpu/x86/Makefile.inc: Build smi_trigger on !HAVE_SMI_HANDLER 2022-02-07 13:47:04 +00:00
device src: Add missing 'void' in function definition 2022-01-26 23:57:12 +00:00
drivers drivers/wwan/fm: Add Fibocom 5G WWAN ACPI support 2022-02-07 14:10:59 +00:00
ec src/ec: Get rid of unnecessary blank line {before,after} brace 2022-02-04 20:16:42 +00:00
include console: Add loglevel prefix to interactive consoles 2022-02-07 14:11:44 +00:00
lib console: Add loglevel marker codes to stored consoles 2022-02-07 23:28:37 +00:00
mainboard mb/google/brya: Add 5G WWAN ACPI support for Brya and Redrix 2022-02-07 14:11:17 +00:00
northbridge nb/amd/pi/00730F01/iommu: call pci_dev_set_resources directly 2022-02-05 19:00:14 +00:00
security console/cbmem_console: Rename cbmem_dump_console 2022-01-13 15:25:43 +00:00
soc soc/amd/cezanne: Add the fw SPL to fw.cfg 2022-02-07 18:38:49 +00:00
southbridge cpu/x86/smm: Add SMM_LEGACY_ASEG 2022-02-01 20:35:02 +00:00
superio superio/smsc/lpc47n207/early_serial.c: Fix indent for 'if' statement 2022-01-31 13:56:59 +00:00
vendorcode vc/amd/cezanne: Add support to map UARTs 2022-02-07 14:07:41 +00:00
Kconfig