diff mbox series

[05/10] dmicheck: modify the memory type range check for type 17

Message ID 20230309090018.32029-5-ivan.hu@canonical.com
State Accepted
Headers show
Series [01/10] dmicheck: fix the extended bios ROM size bit check of type 0 | expand

Commit Message

ivanhu March 9, 2023, 9 a.m. UTC
Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 src/dmi/dmicheck/dmicheck.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 4ce492fd..836f7cdb 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -1651,7 +1651,8 @@  static void dmicheck_entry(fwts_framework *fw,
 			dmi_min_max_uint8_check(fw, table, addr, "Form Factor", hdr, 0xe, 0x1, 0x10);
 			dmi_str_check(fw, table, addr, "Locator", hdr, 0x10);
 			dmi_str_check(fw, table, addr, "Bank Locator", hdr, 0x11);
-			dmi_min_max_uint8_check(fw, table, addr, "Memory Type", hdr, 0x12, 0x1, 0x23);
+			fwts_dmi_value_range t17_ranges[] = {{0x1, 0x14}, {0x18, 0x23}};
+			dmi_ranges_uint8_check(fw, table, addr, "Memory Type", hdr, 0x12, t17_ranges);
 			if (hdr->length < 0x1b)
 				break;
 			dmi_str_check(fw, table, addr, "Manufacturer", hdr, 0x17);