aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common/mrc_cache.h
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-12-09 15:04:49 -0600
committerAaron Durbin <adurbin@chromium.org>2015-12-11 00:20:02 +0100
commitbc6e7c0905d6490ba54aee264b8dcaa09ed50ea3 (patch)
tree415e1d21f91bc01ed36333a6cf2db8edd901a854 /src/soc/intel/common/mrc_cache.h
parenta606598150320f87d1780b6443ccb960fa4bd21e (diff)
mrc_cache: add version field
In order to allow for updateable memory init code on intel x86 platforms one needs to ensure the saved mrc data matches the code consuming the data. To that end add a version field to the saved data structure. BUG=chrome-os-partner:46050 BRANCH=None TEST=Built and booted on glados. Suspended and resumed. Also verified version mismatch path. Change-Id: Ie86db1750af5d9bff6446999b0d04b60612f8d29 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/12700 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/soc/intel/common/mrc_cache.h')
-rw-r--r--src/soc/intel/common/mrc_cache.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/soc/intel/common/mrc_cache.h b/src/soc/intel/common/mrc_cache.h
index 9af3ef10c5..25d9316aec 100644
--- a/src/soc/intel/common/mrc_cache.h
+++ b/src/soc/intel/common/mrc_cache.h
@@ -24,14 +24,18 @@ struct mrc_saved_data {
uint32_t signature;
uint32_t size;
uint32_t checksum;
- uint32_t reserved;
+ uint32_t version;
uint8_t data[0];
} __attribute__((packed));
/* Locate the most recently saved MRC data. */
int mrc_cache_get_current(const struct mrc_saved_data **cache);
+int mrc_cache_get_current_with_version(const struct mrc_saved_data **cache,
+ uint32_t version);
/* Stash the resulting MRC data to be saved in non-volatile storage later. */
int mrc_cache_stash_data(void *data, size_t size);
+int mrc_cache_stash_data_with_version(void *data, size_t size,
+ uint32_t version);
#endif /* _COMMON_MRC_CACHE_H_ */