nb/intel/sandybridge: Add warning to saved structs

When changing any of the structures that are cached in non-volatile
storage, it is necessary to bump MRC_CACHE_VERSION so that the old
information is not misinterpreted.

Change-Id: Idefbc38b3a8198b1b5909e775b3c289db689fc0c
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39756
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Angel Pons 2020-03-22 12:23:35 +01:00 committed by Patrick Georgi
parent 2b5c1e73a5
commit 5c1baf5bec
2 changed files with 8 additions and 2 deletions

View File

@ -33,8 +33,6 @@
#include "raminit_common.h"
#include "sandybridge.h"
#define MRC_CACHE_VERSION 1
/* FIXME: no ECC support */
/* FIXME: no support for 3-channel chipsets */

View File

@ -41,15 +41,22 @@
performant and even 1 seems to be enough in practice. */
#define NUM_PATTERNS 4
/*
* WARNING: Do not forget to increase MRC_CACHE_VERSION when the saved data is changed!
*/
#define MRC_CACHE_VERSION 1
typedef struct odtmap_st {
u16 rttwr;
u16 rttnom;
} odtmap;
/* WARNING: Do not forget to increase MRC_CACHE_VERSION when this struct is changed! */
typedef struct dimm_info_st {
dimm_attr dimm[NUM_CHANNELS][NUM_SLOTS];
} dimm_info;
/* WARNING: Do not forget to increase MRC_CACHE_VERSION when this struct is changed! */
struct ram_rank_timings {
/* ROUNDT_LAT register: One byte per slotrank */
u8 roundtrip_latency;
@ -72,6 +79,7 @@ struct ram_rank_timings {
} lanes[NUM_LANES];
};
/* WARNING: Do not forget to increase MRC_CACHE_VERSION when this struct is changed! */
typedef struct ramctr_timing_st {
u16 spd_crc[NUM_CHANNELS][NUM_SLOTS];
int sandybridge;