intel sandy/ivy: Improve DIMM replacement detection
When MRC cache is available, first read only the SPD unique
identifier bytes required to detect possible DIMM replacement.
As this is 11 vs 256 bytes with slow SMBus operations, we save
about 70ms for every installed DIMM on normal boot path.
In the DIMM replacement case this adds some 10ms per installed DIMM
as some SPD gets read twice, but we are on slow RAM training boot path
anyways.
Change-Id: I294a56e7b7562c3dea322c644b21a15abb033870
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17491
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
diff --git a/src/mainboard/google/butterfly/romstage.c b/src/mainboard/google/butterfly/romstage.c
index 050d5b0..70916d5 100644
--- a/src/mainboard/google/butterfly/romstage.c
+++ b/src/mainboard/google/butterfly/romstage.c
@@ -125,9 +125,9 @@
{ 0, 0, -1 }, /* P13: Empty */
};
-void mainboard_get_spd(spd_raw_data *spd) {
- read_spd(&spd[0], 0x50);
- read_spd(&spd[2], 0x52);
+void mainboard_get_spd(spd_raw_data *spd, bool id_only) {
+ read_spd(&spd[0], 0x50, id_only);
+ read_spd(&spd[2], 0x52, id_only);
}
void mainboard_early_init(int s3resume) {
diff --git a/src/mainboard/google/link/romstage.c b/src/mainboard/google/link/romstage.c
index 8142845..733aa30 100644
--- a/src/mainboard/google/link/romstage.c
+++ b/src/mainboard/google/link/romstage.c
@@ -209,7 +209,7 @@
{ 0, 0, -1 }, /* P13: Empty */
};
-void mainboard_get_spd(spd_raw_data *spd) {
+void mainboard_get_spd(spd_raw_data *spd, bool id_only) {
memcpy(&spd[0], locate_spd(), 128);
}
diff --git a/src/mainboard/google/parrot/romstage.c b/src/mainboard/google/parrot/romstage.c
index 135cc76..d9f2f8f 100644
--- a/src/mainboard/google/parrot/romstage.c
+++ b/src/mainboard/google/parrot/romstage.c
@@ -179,9 +179,9 @@
{ 0, 0, -1 }, /* P13: Empty */
};
-void mainboard_get_spd(spd_raw_data *spd) {
- read_spd(&spd[0], 0x50);
- read_spd(&spd[2], 0x52);
+void mainboard_get_spd(spd_raw_data *spd, bool id_only) {
+ read_spd(&spd[0], 0x50, id_only);
+ read_spd(&spd[2], 0x52, id_only);
}
void mainboard_config_superio(void)
diff --git a/src/mainboard/google/stout/romstage.c b/src/mainboard/google/stout/romstage.c
index e486451..d054b39 100644
--- a/src/mainboard/google/stout/romstage.c
+++ b/src/mainboard/google/stout/romstage.c
@@ -139,10 +139,10 @@
}
}
-void mainboard_get_spd(spd_raw_data *spd)
+void mainboard_get_spd(spd_raw_data *spd, bool id_only)
{
- read_spd(&spd[0], 0x50);
- read_spd(&spd[2], 0x52);
+ read_spd(&spd[0], 0x50, id_only);
+ read_spd(&spd[2], 0x52, id_only);
}
void mainboard_fill_pei_data(struct pei_data *pei_data)