Eric Lai has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63628 )
Change subject: lib: Treat dimm addr_map 0 as not exist ......................................................................
lib: Treat dimm addr_map 0 as not exist
Treat dimm addr_map 0 as not exist. addr_map default is 0, we don't set it if there no HW exist.
BUG=b:213964936 BRANCH=firmware-brya-14505.B TEST=emerge-brya coreboot chromeos-bootimage The MRC training does not be performed again after rebooting.
Signed-off-by: Eric Lai eric_lai@quanta.corp-partner.google.com Change-Id: I2ada0109eb0805174cb85d4ce373e2a3ab7dbcac --- M src/lib/spd_cache.c 1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/63628/1
diff --git a/src/lib/spd_cache.c b/src/lib/spd_cache.c index 44830a8..3814e3c 100644 --- a/src/lib/spd_cache.c +++ b/src/lib/spd_cache.c @@ -155,6 +155,10 @@ bool dimm_changed = false; /* Check if the dimm is the same with last system boot. */ for (i = 0; i < SC_SPD_NUMS && !dimm_changed; i++) { + if (blk->addr_map[i] == 0) { + printk(BIOS_NOTICE, "SPD_CACHE: DIMM%d is not exist\n", i); + continue; + } /* Return true if any error happened here. */ if (get_spd_sn(blk->addr_map[i], &sn) == CB_ERR) return true;