From 5c88c6f2d797b7fbcbf844a79356fcc833eb5338 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Sat, 1 Sep 2012 14:00:23 -0700 Subject: elog: add extended management engine event We are seeing ME disabled and ME error events on some devices and this extended info can help with debug. Also fix a potential issue where if the log does manage to get completely full it will never try to shrink it because the only call to shrink the log happens after a successful event write. Add a check at elog init time to shrink the log size. Change-Id: Ib81dc231f6a004b341900374e6c07962cc292031 Signed-off-by: Duncan Laurie Reviewed-on: http://review.coreboot.org/1739 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/drivers/elog/elog.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/drivers') diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c index 7be443a375..748adafcf3 100644 --- a/src/drivers/elog/elog.c +++ b/src/drivers/elog/elog.c @@ -803,6 +803,10 @@ int elog_init(void) elog_add_event_word(ELOG_TYPE_LOG_CLEAR, elog_get_flash()->total_size); + /* Shrink the log if we are getting too full */ + if (elog_get_mem()->next_event_offset >= CONFIG_ELOG_FULL_THRESHOLD) + elog_shrink(); + #if CONFIG_ELOG_BOOT_COUNT && !defined(__SMM__) /* Log boot count event except in S3 resume */ if (acpi_slp_type != 3) -- cgit v1.2.3