aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/intel/x4x/x4x.h
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2017-09-25 09:40:54 +0200
committerPatrick Georgi <pgeorgi@google.com>2018-04-17 10:39:45 +0000
commitadc571a54c484bc5a4bb7785db8eda1be153eed9 (patch)
tree383e4a655a22bdcfa7012cacf01daccc63f219fe /src/northbridge/intel/x4x/x4x.h
parent0cdaad36eb033eec831ad1eecec785ce89950ca7 (diff)
nb/intel/x4x: Use SPI flash to cache raminit results
Stores information obtained from decoding dimms and receive enable results for future use. Depreciates using rtc nvram to store receive enable settings. A notable change is that receive enable results are always reused, not just on a resume from S3. This requires cbmem to be initialized a bit earlier, right after the raminit finished to be able to add the sysinfo struct to cbmem which gets cached to the SPI flash in ramstage. TESTED on Intel DG43GT with W25Q128.V. With 4 ddr2 dimms time in raminit goes from 133,857ms (using i2c block read to fetch SPD) to 21,071ms for cached results. Change-Id: I042dc5c52615d40781d9ef7ecd657ad0bf3ed08f Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/21677 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/northbridge/intel/x4x/x4x.h')
-rw-r--r--src/northbridge/intel/x4x/x4x.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/northbridge/intel/x4x/x4x.h b/src/northbridge/intel/x4x/x4x.h
index cbb1853fab..70c6525bba 100644
--- a/src/northbridge/intel/x4x/x4x.h
+++ b/src/northbridge/intel/x4x/x4x.h
@@ -279,6 +279,15 @@ struct dimminfo {
unsigned int ranks;
unsigned int rows;
unsigned int cols;
+ u16 spd_crc;
+};
+
+struct rcven_timings {
+ u8 min_common_coarse;
+ u8 coarse_offset[8];
+ u8 medium[8];
+ u8 tap[8];
+ u8 pi[8];
};
/* The setup is up to two DIMMs per channel */
@@ -293,6 +302,7 @@ struct sysinfo {
struct timings selected_timings;
struct dimminfo dimms[4];
u8 spd_map[4];
+ struct rcven_timings rcven_t[TOTAL_CHANNELS];
};
#define BOOT_PATH_NORMAL 0
#define BOOT_PATH_WARM_RESET 1
@@ -331,8 +341,8 @@ u32 decode_igd_memory_size(u32 gms);
u32 decode_igd_gtt_size(u32 gsm);
u8 decode_pciebar(u32 *const base, u32 *const len);
void sdram_initialize(int boot_path, const u8 *spd_map);
-void raminit_ddr2(struct sysinfo *);
-void rcven(const struct sysinfo *);
+void raminit_ddr2(struct sysinfo *s, int fast_boot);
+void rcven(struct sysinfo *s);
u32 fsb2mhz(u32 speed);
u32 ddr2mhz(u32 speed);