diff mbox series

dmicheck: add more types for version length test.

Message ID 20241106052635.1722525-1-ivan.hu@canonical.com
State Accepted
Headers show
Series dmicheck: add more types for version length test. | expand

Commit Message

Ivan Hu Nov. 6, 2024, 5:26 a.m. UTC
Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 src/dmi/dmicheck/dmicheck.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
diff mbox series

Patch

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 4db70fce..1e0f3d86 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -291,6 +291,23 @@  static const fwts_dmi_used_by_kernel dmi_used_by_kernel_table[] = {
 
 static const fwts_dmi_type_length type_info[] = {
 	/* type, max_version, min_version, length */
+	{ 1, 0x201, 0x200, 0x8 },
+	{ 1, 0x204, 0x201, 0x19 },	
+	{ 1, MAX_VERSION, 0x204, 0x1b },
+	{ 4, 0x203, 0x200, 0x1a },
+	{ 4, 0x205, 0x203, 0x23 },	
+	{ 4, 0x206, 0x205, 0x28 },
+	{ 4, 0x300, 0x206, 0x2a },
+	{ 4, 0x306, 0x300, 0x30 },
+	{ 4, 0x308, 0x306, 0x33 },
+	{ 4, MAX_VERSION, 0x308, 0x34 },
+	{ 7, 0x201, 0x200, 0x0f },
+	{ 7, 0x301, 0x201, 0x13 },	
+	{ 7, MAX_VERSION, 0x301, 0x1b },
+	{ 8, MAX_VERSION, 0x200, 0x9 },
+	{ 11, MAX_VERSION, 0x200, 0x5 },
+	{ 12, MAX_VERSION, 0x200, 0x5 },
+	{ 13, MAX_VERSION, 0x200, 0x16 },
 	{ 15, 0x201, 0x200, 0x14 },
 	{ 16, 0x207, 0x201, 0xf },
 	{ 16, MAX_VERSION, 0x207, 0x17 },
@@ -302,10 +319,24 @@  static const fwts_dmi_type_length type_info[] = {
 	{ 17, 0x303, 0x302, 0x54 },
 	{ 17, 0x307, 0x303, 0x5c },
 	{ 17, MAX_VERSION, 0x307, 0x64 },
+	{ 18, MAX_VERSION, 0x201, 0x17 },
 	{ 19, 0x207, 0x201, 0xf },
 	{ 19, MAX_VERSION, 0x207, 0x1f },
 	{ 20, 0x207, 0x201, 0x13 },
 	{ 20, MAX_VERSION, 0x207, 0x23 },
+	{ 21, MAX_VERSION, 0x201, 0x7 },
+	{ 22, MAX_VERSION, 0x201, 0x1a },
+	{ 23, MAX_VERSION, 0x201, 0xd },
+	{ 24, MAX_VERSION, 0x201, 0x5 },
+	{ 25, MAX_VERSION, 0x201, 0x9 },
+	{ 30, MAX_VERSION, 0x201, 0x6 },
+	{ 33, MAX_VERSION, 0x201, 0x1f },
+	{ 34, MAX_VERSION, 0x201, 0xb },
+	{ 35, MAX_VERSION, 0x201, 0xb },
+	{ 36, MAX_VERSION, 0x201, 0x10 },
+	{ 41, MAX_VERSION, 0x201, 0xb },
+	{ 43, MAX_VERSION, 0x201, 0x1f },
+	{ 46, MAX_VERSION, 0x201, 0x9 },
 	{ 0, 0, 0, 0 } /* terminator */
 };