diff options
author | Julius Werner <jwerner@chromium.org> | 2022-09-29 17:19:11 -0700 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-10-01 00:45:25 +0000 |
commit | 36d7f82d98ff9127f38c2517d03b90107514bf33 (patch) | |
tree | f6337ffa82215cf8c9ed7b643f64e464363240ac | |
parent | cdf99a9b3e2550d2be9dd7c2940ac081ac8eb8e8 (diff) |
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>
-rw-r--r-- | src/drivers/mrc_cache/mrc_cache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/mrc_cache/mrc_cache.c b/src/drivers/mrc_cache/mrc_cache.c index 2800c90b63..fd3853fc0c 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; |