[coreboot-gerrit] Change in coreboot[master]: Turn CBMEM console into a ring buffer that can persist acros...

Julius Werner (Code Review) gerrit at coreboot.org
Sat Apr 15 08:34:13 CEST 2017


Hello Aaron Durbin, build bot (Jenkins),

I'd like you to reexamine a change.  Please visit

    https://review.coreboot.org/18301

to look at the new patch set (#5).

Change subject: Turn CBMEM console into a ring buffer that can persist across reboots
......................................................................

Turn CBMEM console into a ring buffer that can persist across reboots

This patch allows the CBMEM console to persist across reboots, which
should greatly help post factum debugging of issues involving multiple
reboots. In order to prevent the console from filling up, it will
instead operate as a ring buffer that continues to evict the oldest
lines once full. (This means that if even a single boot doesn't fit into
the buffer, we will now drop the oldest lines whereas previous code
would've dropped the newest lines instead.)

The console control structure is modified in a sorta
backwards-compatible way, so that new readers can continue to work with
old console buffers and vice versa. When an old reader reads a new
buffer that has already once overflowed (i.e. is operating in true ring
buffer mode) it will print lines out of order, but it will at least
still print out the whole console content and not do any illegal memory
accesses (assuming it correctly implemented cursor overflow as it was
already possible before this patch).

BUG=chromium:651966
TEST=Rebooted and confirmed output repeatedly on a Kevin and a Falco.
Also confirmed correct behavior across suspend/resume for the latter.

Change-Id: Ifcbf59d58e1ad20995b98d111c4647281fbb45ff
Signed-off-by: Julius Werner <jwerner at chromium.org>
---
M payloads/coreinfo/bootlog_module.c
M payloads/libpayload/drivers/cbmem_console.c
M src/lib/cbmem_console.c
M util/cbmem/cbmem.c
4 files changed, 150 insertions(+), 182 deletions(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/18301/5
-- 
To view, visit https://review.coreboot.org/18301
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifcbf59d58e1ad20995b98d111c4647281fbb45ff
Gerrit-PatchSet: 5
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Julius Werner <jwerner at chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin at chromium.org>
Gerrit-Reviewer: Alexander Couzens <lynxis at fe80.eu>
Gerrit-Reviewer: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Julius Werner <jwerner at chromium.org>
Gerrit-Reviewer: Kevin O'Connor <kevin at koconnor.net>
Gerrit-Reviewer: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Philippe Mathieu-Daudé <philippe.mathieu.daude at gmail.com>
Gerrit-Reviewer: build bot (Jenkins)



More information about the coreboot-gerrit mailing list