summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonathan Zhang <jonzhang@fb.com>2020-06-01 15:39:59 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-06-07 21:51:32 +0000
commit4b6b2609e5d8096370c91b413d87a2e1fd0cc2f3 (patch)
treeff58b9c283e296c1580c1a449caba3b47bd8d205 /src
parenta3e228ce15e01d4951582db163915ec575b938a5 (diff)
downloadcoreboot-4b6b2609e5d8096370c91b413d87a2e1fd0cc2f3.tar.xz
drivers/mrc_cache: generate debug messages for MRC cache update
When MRC cached data update is performed, messages are written to event log, which is flash based. For system that does not have flash based event log, the messages are lost. Added corresponding BIOS_DEBUG messages. Signed-off-by: Jonathan Zhang <jonzhang@fb.com> Change-Id: I1ef4794151fea7213c8317ddc898b0e37da280b5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/41981 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Michael Niewöhner Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/mrc_cache/mrc_cache.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/drivers/mrc_cache/mrc_cache.c b/src/drivers/mrc_cache/mrc_cache.c
index 4e6e91cd80..3a005db357 100644
--- a/src/drivers/mrc_cache/mrc_cache.c
+++ b/src/drivers/mrc_cache/mrc_cache.c
@@ -397,6 +397,7 @@ static void update_mrc_cache_by_type(int type)
return;
if (!mrc_cache_needs_update(&latest_rdev, to_be_updated)) {
+ printk(BIOS_DEBUG, "MRC: '%s' does not need update.\n", cr->name);
log_event_cache_update(cr->elog_slot, ALREADY_UPTODATE);
return;
}
@@ -405,10 +406,13 @@ static void update_mrc_cache_by_type(int type)
if (region_file_update_data(&cache_file,
cbmem_entry_start(to_be_updated),
- cbmem_entry_size(to_be_updated)) < 0)
+ cbmem_entry_size(to_be_updated)) < 0) {
+ printk(BIOS_DEBUG, "MRC: failed to update '%s'.\n", cr->name);
log_event_cache_update(cr->elog_slot, UPDATE_FAILURE);
- else
+ } else {
+ printk(BIOS_DEBUG, "MRC: updated '%s'.\n", cr->name);
log_event_cache_update(cr->elog_slot, UPDATE_SUCCESS);
+ }
}
/* Read flash status register to determine if write protect is active */