[coreboot-gerrit] New patch to review for coreboot: soc/intel/common: Store MRC data in next available slot in the cache
Furquan Shaikh (furquan@google.com)
gerrit at coreboot.org
Wed Jul 27 17:55:34 CEST 2016
Furquan Shaikh (furquan at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15915
-gerrit
commit ea8685431470cad7599d39bfcedad347366fe4b9
Author: Furquan Shaikh <furquan at google.com>
Date: Wed Jul 27 08:04:54 2016 -0700
soc/intel/common: Store MRC data in next available slot in the cache
Currently, coreboot performs an erase of the entire MRC cache region on
flash if there is a version mismatch for the MRC data. Instead of doing
that, store the new MRC data in the next available slot, if there is
enough space available in the cache region.
BUG=chrome-os-partner:55699
Change-Id: Ib24a94f0a47c79941ed9f60095360ae3aad5540b
Signed-off-by: Furquan Shaikh <furquan at google.com>
---
src/soc/intel/common/mrc_cache.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/soc/intel/common/mrc_cache.c b/src/soc/intel/common/mrc_cache.c
index 4ad4158..cf819cf 100644
--- a/src/soc/intel/common/mrc_cache.c
+++ b/src/soc/intel/common/mrc_cache.c
@@ -135,6 +135,13 @@ static int __mrc_cache_get_current(const struct mrc_data_region *region,
slot++;
}
+ /*
+ * Update pointer to the most recently saved MRC data before returning
+ * any error. This ensures that the caller can use next available slot
+ * if required.
+ */
+ *cache = verified_cache;
+
if (verified_cache == NULL)
return -1;
@@ -144,7 +151,6 @@ static int __mrc_cache_get_current(const struct mrc_data_region *region,
return -1;
}
- *cache = verified_cache;
printk(BIOS_DEBUG, "MRC cache slot %d @ %p\n", slot-1, verified_cache);
return 0;
More information about the coreboot-gerrit
mailing list