diff --git a/DynamicTablesPkg/Include/X64NameSpaceObjects.h b/DynamicTablesPkg/Include/X64NameSpaceObjects.h index f07d6d465549..f7bb22dc1226 100644 --- a/DynamicTablesPkg/Include/X64NameSpaceObjects.h +++ b/DynamicTablesPkg/Include/X64NameSpaceObjects.h @@ -15,7 +15,10 @@ #ifndef X64_NAMESPACE_OBJECTS_H_ #define X64_NAMESPACE_OBJECTS_H_ -#include +#include +#include + +#pragma pack(1) /** The LOCAL_APIC_MODE enum describes the Local APIC mode in the X64 Namespace @@ -262,4 +265,5 @@ typedef struct CmX64LocalApicX2ApicNmiInfo { UINT8 LocalApicLint; } CM_X64_LOCAL_APIC_X2APIC_NMI_INFO; +#pragma pack() #endif // X64_NAMESPACE_OBJECTS_H_ diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c index 7721e44564f0..abb5f7dc0b8d 100755 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c @@ -682,7 +682,7 @@ STATIC CONST CM_OBJ_PARSER CmArchCommonTpm2InterfaceInfo[] = { STATIC CONST CM_OBJ_PARSER CmArchCommonSpmiInterfaceInfoParser[] = { { "InterfaceType", sizeof (UINT8), "0x%x", NULL }, { "BaseAddress", sizeof (EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE), - NULL, NULL, AcpiGenericAddressParser } + NULL, NULL, AcpiGenericAddressParser, ARRAY_SIZE (AcpiGenericAddressParser) }, }; /** A parser for EArchCommonObjSpmiInterruptDeviceInfo. @@ -887,9 +887,9 @@ STATIC CONST CM_OBJ_PARSER CmX64ObjHpetInfoParser[] = { /** A parser for EX64ObjMadtInfo. */ STATIC CONST CM_OBJ_PARSER CmX64ObjMadtInfoParser[] = { - { "LocalApicAddress", 4, "0x%x", NULL }, - { "Flags", 4, "0x%x", NULL }, - { "ApicMode", 1, "0x%x", NULL } + { "LocalApicAddress", 4, "0x%x", NULL }, + { "Flags", 4, "0x%x", NULL }, + { "ApicMode", sizeof (LOCAL_APIC_MODE), "0x%x", NULL } }; /** A parser for CmArchCommonLocalApicX2ApicInfoParser.