Werner Zeh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37303 )
Change subject: soc/intel/broadwell_de: Re-read SPD on CRC error ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37303/1/src/soc/intel/fsp_broadwell... File src/soc/intel/fsp_broadwell_de/romstage/memory.c:
https://review.coreboot.org/c/coreboot/+/37303/1/src/soc/intel/fsp_broadwell... PS1, Line 63: while (res == SPD_STATUS_CRC_ERROR && tries++ < MAX_SPD_READ_TRIES) { : printk(BIOS_ERR, : "SPD CRC error on channel %d slot %d, retrying..\n", : channel, slot); : get_spd_smbus(&blk); : res = spd_decode_ddr4(&dimm, spd_data); : } : if (res == SPD_STATUS_OK) { How about using a do{}while loop here? In this case you would just need a single call to spd_decode_ddr4(&dimm, spd_data). Something like the following maybe?
tries = MAX_SPD_READ_TRIES;
do { get_spd_smbus(&blk); res = spd_decode_ddr4(&dimm, spd_data); if (res == SPD_STATUS_CRC_ERROR) printk(ERROR...); } while (res != SPD_STATUS_OK && tries--);