[coreboot-gerrit] Change in coreboot[master]: elog: Print timestamp when logging event

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


Hello Aaron Durbin,

I'd like you to do a code review.  Please visit

    https://review.coreboot.org/19305

to review the following change.


Change subject: elog: Print timestamp when logging event
......................................................................

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.

Change-Id: I750dd18aa2c43c95b8c1fbb8f404c1e3a77bec73
Signed-off-by: Julius Werner <jwerner at chromium.org>
---
M src/drivers/elog/elog.c
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/19305/1

diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c
index 0f72e7c..27b6e29 100644
--- a/src/drivers/elog/elog.c
+++ b/src/drivers/elog/elog.c
@@ -881,8 +881,15 @@
 
 	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)

-- 
To view, visit https://review.coreboot.org/19305
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I750dd18aa2c43c95b8c1fbb8f404c1e3a77bec73
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Julius Werner <jwerner at chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin at chromium.org>



More information about the coreboot-gerrit mailing list