UPSTREAM: elog: Print timestamp when logging event
We're already reading the RTC whenever we file an event, we might as
well print out the value at that time. Having a few RTC timestamps in
the firmware log makes it easier to correlate that part of the log to a
particular boot once we start having multiple boots in the log.
BUG=none
BRANCH=none
TEST=none
Change-Id: I5b4ce266c5317ddad0f15a7ea7f1de1d3931940a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 4d9fafa3a9
Original-Change-Id: I750dd18aa2c43c95b8c1fbb8f404c1e3a77bec73
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19305
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/481283
This commit is contained in:
parent
d34abed9d6
commit
ae8b5e7c0b
1 changed files with 8 additions and 1 deletions
|
|
@ -881,8 +881,15 @@ int elog_add_event_raw(u8 event_type, void *data, u8 data_size)
|
|||
|
||||
elog_mirror_increment_last_write(event_size);
|
||||
|
||||
printk(BIOS_INFO, "ELOG: Event(%X) added with size %d\n",
|
||||
printk(BIOS_INFO, "ELOG: Event(%X) added with size %d ",
|
||||
event_type, event_size);
|
||||
if (event->day != 0) {
|
||||
printk(BIOS_INFO, "at 20%02x-%02x-%02x %02x:%02x:%02x UTC\n",
|
||||
event->year, event->month, event->day,
|
||||
event->hour, event->minute, event->second);
|
||||
} else {
|
||||
printk(BIOS_INFO, "(timestamp unavailable)\n");
|
||||
}
|
||||
|
||||
/* Shrink the log if we are getting too full */
|
||||
if (elog_shrink() < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue