[PATCH 06/10] dmicheck: add some bit 0 reserved checks for type 17

Ivan Hu ivan.hu at canonical.com
Thu Mar 9 09:00:14 UTC 2023


Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
---
 src/dmi/dmicheck/dmicheck.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 836f7cdb..f2f8cb55 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -1653,6 +1653,7 @@ static void dmicheck_entry(fwts_framework *fw,
 			dmi_str_check(fw, table, addr, "Bank Locator", hdr, 0x11);
 			fwts_dmi_value_range t17_ranges[] = {{0x1, 0x14}, {0x18, 0x23}};
 			dmi_ranges_uint8_check(fw, table, addr, "Memory Type", hdr, 0x12, t17_ranges);
+			dmi_reserved_bits_check(fw, table, addr, "Type Detail", hdr, sizeof(uint16_t), 0x13, 0, 0);
 			if (hdr->length < 0x1b)
 				break;
 			dmi_str_check(fw, table, addr, "Manufacturer", hdr, 0x17);
@@ -1662,12 +1663,13 @@ static void dmicheck_entry(fwts_framework *fw,
 			if (hdr->length < 0x1c)
 				break;
 			dmi_reserved_bits_check(fw, table, addr, "Attributes", hdr, sizeof(uint8_t), 0x1b, 4, 7);
-			if (hdr->length < 0x20)
+			if (hdr->length < 0x22)
 				break;
 			dmi_reserved_bits_check(fw, table, addr, "Extended Size", hdr, sizeof(uint32_t), 0x1c, 31, 31);
 			if (hdr->length < 0x4c)
 				break;
 			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);
 			if (hdr->length < 0x54)
-- 
2.34.1




More information about the fwts-devel mailing list