Smbios: add struct layout check

This commit is contained in:
李通洲
2024-05-10 22:46:10 +08:00
parent 08a940bfd4
commit fef3100fd7
7 changed files with 29 additions and 13 deletions
+4 -1
View File
@@ -48,7 +48,10 @@ typedef struct FFSmbiosProcessorInfo
// 3.6+
uint16_t ThreadEnabled; // varies
} FFSmbiosProcessorInfo;
} __attribute__((__packed__)) FFSmbiosProcessorInfo;
static_assert(offsetof(FFSmbiosProcessorInfo, ThreadEnabled) == 0x30,
"FFSmbiosProcessorInfo: Wrong struct alignment");
#if defined(__x86_64__) || defined(__i386__)