spd_cache debug: Log invalid CRC checksum
"SPD has a invalid or zero-valued CRC" is not a very useful message, so show the actual and expected values. Change-Id: I31a1cdacc82240c699627769d490b94f5d378e86 Signed-off-by: Tobias Diedrich <ranma+coreboot@tdiedrich.de> Reviewed-on: http://review.coreboot.org/7393 Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
parent
bf3a3f2040
commit
992066a427
|
@ -52,7 +52,8 @@ int read_spd_from_cbfs(u8 *buf, int idx)
|
||||||
if (((buf[SPD_CRC_LO] == 0) && (buf[SPD_CRC_HI] == 0))
|
if (((buf[SPD_CRC_LO] == 0) && (buf[SPD_CRC_HI] == 0))
|
||||||
|| (buf[SPD_CRC_LO] != (crc & 0xff))
|
|| (buf[SPD_CRC_LO] != (crc & 0xff))
|
||||||
|| (buf[SPD_CRC_HI] != (crc >> 8))) {
|
|| (buf[SPD_CRC_HI] != (crc >> 8))) {
|
||||||
printk(BIOS_WARNING, "SPD has a invalid or zero-valued CRC\n");
|
printk(BIOS_WARNING, "SPD CRC %02x%02x is invalid, should be %04x\n",
|
||||||
|
buf[SPD_CRC_HI], buf[SPD_CRC_LO], crc);
|
||||||
buf[SPD_CRC_LO] = crc & 0xff;
|
buf[SPD_CRC_LO] = crc & 0xff;
|
||||||
buf[SPD_CRC_HI] = crc >> 8;
|
buf[SPD_CRC_HI] = crc >> 8;
|
||||||
u16 i;
|
u16 i;
|
||||||
|
|
|
@ -64,7 +64,8 @@ AGESA_STATUS common_ReadCbfsSpd (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
|
||||||
if (((info->Buffer[SPD_CRC_LO] == 0) && (info->Buffer[SPD_CRC_HI] == 0))
|
if (((info->Buffer[SPD_CRC_LO] == 0) && (info->Buffer[SPD_CRC_HI] == 0))
|
||||||
|| (info->Buffer[SPD_CRC_LO] != (crc & 0xff))
|
|| (info->Buffer[SPD_CRC_LO] != (crc & 0xff))
|
||||||
|| (info->Buffer[SPD_CRC_HI] != (crc >> 8))) {
|
|| (info->Buffer[SPD_CRC_HI] != (crc >> 8))) {
|
||||||
printk(BIOS_WARNING, "SPD has a invalid or zero-valued CRC\n");
|
printk(BIOS_WARNING, "SPD CRC %02x%02x is invalid, should be %04x\n",
|
||||||
|
info->Buffer[SPD_CRC_HI], info->Buffer[SPD_CRC_LO], crc);
|
||||||
info->Buffer[SPD_CRC_LO] = crc & 0xff;
|
info->Buffer[SPD_CRC_LO] = crc & 0xff;
|
||||||
info->Buffer[SPD_CRC_HI] = crc >> 8;
|
info->Buffer[SPD_CRC_HI] = crc >> 8;
|
||||||
u16 i;
|
u16 i;
|
||||||
|
|
Loading…
Reference in New Issue