[PATCH] dmicheck: Don't check firmware version on anything but NVDIMM devices

Mario Limonciello mario.limonciello at amd.com
Fri Feb 2 20:12:15 UTC 2024


The firmware version offset is only valid for NVDIMM.

Link: https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.7.0.pdf
Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
---
 src/dmi/dmicheck/dmicheck.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index b7cca5e4..49d33ce3 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -1678,7 +1678,15 @@ static void dmicheck_entry(fwts_framework *fw,
 			dmi_min_max_uint8_check(fw, table, addr, "Memory Technology", hdr, 0x28, 0x1, 0x7);
 			dmi_reserved_bits_check(fw, table, addr, "Memory Operating Mode Cap", hdr, sizeof(uint16_t), 0x29, 0, 0);
 			dmi_reserved_bits_check(fw, table, addr, "Memory Operating Mode Cap", hdr, sizeof(uint16_t), 0x29, 6, 15);
-			dmi_str_check(fw, table, addr, "Firmware Version", hdr, 0x2b);
+			switch(hdr->data[0x28]) {
+			case 0x04:
+			case 0x05:
+			case 0x06:
+				dmi_str_check(fw, table, addr, "Firmware Version", hdr, 0x2b);
+				break;
+			default:
+				break;
+			}
 			if (hdr->length < 0x54)
 				break;
 			dmi_reserved_bits_check(fw, table, addr, "Extended Speed", hdr, sizeof(uint32_t), 0x54, 31, 31);
-- 
2.34.1




More information about the fwts-devel mailing list