mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
DynamicTablesPkg: Correct parser for X64 architecture objects
- Add array size to CmArchCommonSpmiInterfaceInfoParser to correctly parse the SPMI interface object. - Use the size of enum values instead of fixed sizes. - Apply #pragma pack to the X64 object structure to ensure the total size of the structure matches the parser's combined individual field sizes without padding. Cc: Sami Mujawar <Sami.Mujawar@arm.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
This commit is contained in:
parent
cf8241facc
commit
95972f966e
@ -15,7 +15,10 @@
|
||||
#ifndef X64_NAMESPACE_OBJECTS_H_
|
||||
#define X64_NAMESPACE_OBJECTS_H_
|
||||
|
||||
#include <IndustryStandard/Acpi.h>
|
||||
#include <AcpiObjects.h>
|
||||
#include <StandardNameSpaceObjects.h>
|
||||
|
||||
#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_
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user