aboutsummaryrefslogtreecommitdiff
path: root/src/lib/cbmem_console.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2017-05-16 13:54:18 -0700
committerJulius Werner <jwerner@chromium.org>2017-05-18 19:49:43 +0200
commitd906bb68c3be218046d257c6870c9636e0e198cf (patch)
treee798a73a4a6690cf253f7f6530c5a7c75da1ce8d /src/lib/cbmem_console.c
parent57e15e609e090ac7ec02b570d653b64cf12e4f88 (diff)
cbmem_console: Improve 'cbmem -1' behavior for truncated pre-CBMEM logs
The 'cbmem -1' flag that cuts off console output before the last boot will ignore content from earlier stages if it was truncated due to lack of pre-CBMEM console space. This patch makes the "log truncated" message more specific and adds it as an additional cut-off marker to 'cbmem -1' to counteract that problem. Also raise the log level of the coreboot banner one step to BIOS_NOTICE to make it more likely to be included in the output for 'cbmem -1' to find. (I believe NOTICE is reasonable but I wouldn't want to go as far as WARN which should be reserved for actual problems. Of course this is not ideal, but then again, our whole log-level system really isn't... it would be better if we could make it always print a banner to the CBMEM console without affecting the UART at the same time, but that would require a larger amount of work.) Change-Id: I58288593dfa757e14f4a9da4ffa7e27b0b66feb9 Reported-by: https://ticket.coreboot.org/issues/117 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/19720 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/lib/cbmem_console.c')
-rw-r--r--src/lib/cbmem_console.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/cbmem_console.c b/src/lib/cbmem_console.c
index eb0cc93ee4..b0008b1d9c 100644
--- a/src/lib/cbmem_console.c
+++ b/src/lib/cbmem_console.c
@@ -156,8 +156,8 @@ static void copy_console_buffer(struct cbmem_console *src_cons_p)
return;
if (src_cons_p->cursor & OVERFLOW) {
- const char overflow_warning[] = "\n*** Pre-CBMEM console "
- "overflowed, log truncated ***\n";
+ const char overflow_warning[] = "\n*** Pre-CBMEM " ENV_STRING
+ " console overflowed, log truncated! ***\n";
for (c = 0; c < sizeof(overflow_warning) - 1; c++)
cbmemc_tx_byte(overflow_warning[c]);
for (c = src_cons_p->cursor & CURSOR_MASK;