Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/68012 )
Change subject: mrc_cache: Update metadata signature ......................................................................
mrc_cache: Update metadata signature
CB:67670 recently changed the format of the MRC metadata header, but left the signature the same. That kinda defeats the purpose of having a signature which is to make a data structure recognizable (because now the same signature can refer to two different structures that cannot be otherwise distinguished). While we don't know of any use case where anything other than coreboot currently parses this data structure (other than a ChromeOS-internal utility that's about to be removed), it's probably better to still switch to a different signature for the new header format just to stay on the safe side (e.g. if we ever need to start parsing this somewhere else in the future).
CB:67670 only landed a week ago so hopefully the old signature + new format variant hasn't had much time to escape into the wild yet.
Signed-off-by: Julius Werner jwerner@chromium.org Change-Id: Ic08b23862720db832a08dc4c6818894492f43cc3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68012 Reviewed-by: Reka Norman rekanorman@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/drivers/mrc_cache/mrc_cache.c 1 file changed, 29 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Reka Norman: Looks good to me, approved
diff --git a/src/drivers/mrc_cache/mrc_cache.c b/src/drivers/mrc_cache/mrc_cache.c index 2800c90..fd3853f 100644 --- a/src/drivers/mrc_cache/mrc_cache.c +++ b/src/drivers/mrc_cache/mrc_cache.c @@ -22,7 +22,8 @@ #define RECOVERY_MRC_CACHE "RECOVERY_MRC_CACHE" #define UNIFIED_MRC_CACHE "UNIFIED_MRC_CACHE"
-#define MRC_DATA_SIGNATURE (('M'<<0)|('R'<<8)|('C'<<16)|('D'<<24)) +/* Signature "MRCD" was used for older header format before CB:67670. */ +#define MRC_DATA_SIGNATURE (('M'<<0)|('R'<<8)|('C'<<16)|('d'<<24))
struct mrc_metadata { uint32_t signature;