diff --git a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h index 464c595ac4..7638b93056 100644 --- a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h @@ -262,16 +262,22 @@ typedef struct CmArchCommonPciInterruptMapInfo { */ typedef struct CmArchCommonMemoryAffinityInfo { /// The proximity domain to which the "range of memory" belongs. - UINT32 ProximityDomain; + UINT32 ProximityDomain; /// Base Address - UINT64 BaseAddress; + UINT64 BaseAddress; /// Length - UINT64 Length; + UINT64 Length; /// Flags - UINT32 Flags; + UINT32 Flags; + + /** Optional field: Reference Token to the ProximityDomain this object + belongs to. If set to CM_NULL_TOKEN, the following field is used: + CM_ARCH_COMMON_MEMORY_AFFINITY_INFO.ProximityDomain + */ + CM_OBJECT_TOKEN ProximityDomainToken; } CM_ARCH_COMMON_MEMORY_AFFINITY_INFO; /** A structure that describes the ACPI Device Handle (Type 0) in the @@ -322,6 +328,12 @@ typedef struct CmArchCommonGenericInitiatorAffinityInfo { /// Reference Token for the Device Handle CM_OBJECT_TOKEN DeviceHandleToken; + + /** Optional field: Reference Token to the ProximityDomain this object + belongs to. If set to CM_NULL_TOKEN, the following field is used: + CM_ARCH_COMMON_GENERIC_INITIATOR_AFFINITY_INFO.ProximityDomain + */ + CM_OBJECT_TOKEN ProximityDomainToken; } CM_ARCH_COMMON_GENERIC_INITIATOR_AFFINITY_INFO; /** A structure that describes the Lpi information. diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h index 958c3dc93c..e4f9d96300 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -190,6 +190,18 @@ typedef struct CmArmGicCInfo { i.e. a token referencing a CM_ARCH_COMMON_PSD_INFO object. */ CM_OBJECT_TOKEN PsdToken; + + /** Optional field: Reference Token to the ProximityDomain this object + belongs to. If set to CM_NULL_TOKEN, the following field is used: + CM_ARM_GICC_INFO.ProximityDomain + */ + CM_OBJECT_TOKEN ProximityDomainToken; + + /** Optional field: Reference Token to the ClockDomain this object belongs to. + belongs to. If set to CM_NULL_TOKEN, the following field is used: + CM_ARM_GICC_INFO.ClockDomain + */ + CM_OBJECT_TOKEN ClockDomainToken; } CM_ARM_GICC_INFO; /** A structure that describes the @@ -261,16 +273,22 @@ typedef struct CmArmGicRedistInfo { */ typedef struct CmArmGicItsInfo { /// The GIC ITS ID - UINT32 GicItsId; + UINT32 GicItsId; /// The physical address for the Interrupt Translation Service - UINT64 PhysicalBaseAddress; + UINT64 PhysicalBaseAddress; /** The proximity domain to which the logical processor belongs. This field is used to populate the GIC ITS affinity structure in the SRAT table. */ - UINT32 ProximityDomain; + UINT32 ProximityDomain; + + /** Optional field: Reference Token to the ProximityDomain this object + belongs to. If this field is used, the following field is ignored: + CM_ARM_GIC_ITS_INFO.ProximityDomain + */ + CM_OBJECT_TOKEN ProximityDomainToken; } CM_ARM_GIC_ITS_INFO; /** A structure that describes the @@ -559,6 +577,12 @@ typedef struct CmArmSmmuV3Node { /// Unique identifier for this node. UINT32 Identifier; + + /** Optional field: Reference Token to the ProximityDomain this object + belongs to. If set to CM_NULL_TOKEN, the following field is used: + CM_ARM_SMMUV3_NODE.ProximityDomain + */ + CM_OBJECT_TOKEN ProximityDomainToken; } CM_ARM_SMMUV3_NODE; /** A structure that describes the diff --git a/DynamicTablesPkg/Include/X64NameSpaceObjects.h b/DynamicTablesPkg/Include/X64NameSpaceObjects.h index 1e10e3f28d..d47716a0d4 100644 --- a/DynamicTablesPkg/Include/X64NameSpaceObjects.h +++ b/DynamicTablesPkg/Include/X64NameSpaceObjects.h @@ -333,6 +333,18 @@ typedef struct CmX64LocalApicX2ApicAffinityInfo { UINT32 ProximityDomain; UINT32 Flags; UINT32 ClockDomain; + + /** Optional field: Reference Token to the ProximityDomain this object + belongs to. If set to CM_NULL_TOKEN, the following field is used: + CM_X64_LOCAL_APIC_X2APIC_AFFINITY_INFO.ProximityDomain + */ + CM_OBJECT_TOKEN ProximityDomainToken; + + /** Optional field: Reference Token to the ProximityDomain this object + belongs to. If set to CM_NULL_TOKEN, the following field is used: + CM_X64_LOCAL_APIC_X2APIC_AFFINITY_INFO.ClockDomain + */ + CM_OBJECT_TOKEN ClockDomainToken; } CM_X64_LOCAL_APIC_X2APIC_AFFINITY_INFO; #pragma pack() diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c index 008ab1d080..551f7f8c86 100644 --- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c +++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c @@ -86,6 +86,8 @@ STATIC CONST CM_OBJ_PARSER CmArmGicCInfoParser[] = { { "TRBEInterrupt", 2, "0x%x", NULL }, { "EtToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, { "PsdToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, + { "ProximityDomainToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, + { "ClockDomainToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, }; /** A parser for EArmObjGicDInfo. @@ -116,9 +118,10 @@ STATIC CONST CM_OBJ_PARSER CmArmGicRedistInfoParser[] = { /** A parser for EArmObjGicItsInfo. */ STATIC CONST CM_OBJ_PARSER CmArmGicItsInfoParser[] = { - { "GicItsId", 4, "0x%x", NULL }, - { "PhysicalBaseAddress", 8, "0x%llx", NULL }, - { "ProximityDomain", 4, "0x%x", NULL } + { "GicItsId", 4, "0x%x", NULL }, + { "PhysicalBaseAddress", 8, "0x%llx", NULL }, + { "ProximityDomain", 4, "0x%x", NULL }, + { "ProximityDomainToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, }; /** A parser for EArchCommonObjConsolePortInfo, @@ -283,6 +286,7 @@ STATIC CONST CM_OBJ_PARSER CmArmSmmuV3NodeParser[] = { { "ProximityDomain", 4, "0x%x", NULL }, { "DeviceIdMappingIndex", 4, "0x%x", NULL }, { "Identifier", 4, "0x%x", NULL }, + { "ProximityDomainToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, }; /** A parser for EArmObjPmcg. @@ -358,10 +362,11 @@ STATIC CONST CM_OBJ_PARSER CmArchCommonObjRefParser[] = { /** A parser for EArchCommonObjMemoryAffinityInfo. */ STATIC CONST CM_OBJ_PARSER CmArchCommonMemoryAffinityInfoParser[] = { - { "ProximityDomain", 4, "0x%x", NULL }, - { "BaseAddress", 8, "0x%llx", NULL }, - { "Length", 8, "0x%llx", NULL }, - { "Flags", 4, "0x%x", NULL } + { "ProximityDomain", 4, "0x%x", NULL }, + { "BaseAddress", 8, "0x%llx", NULL }, + { "Length", 8, "0x%llx", NULL }, + { "Flags", 4, "0x%x", NULL }, + { "ProximityDomainToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, }; /** A parser for EArchCommonObjDeviceHandleAcpi. @@ -383,10 +388,11 @@ STATIC CONST CM_OBJ_PARSER CmArchCommonDeviceHandlePciParser[] = { /** A parser for EArchCommonObjGenericInitiatorAffinityInfo. */ STATIC CONST CM_OBJ_PARSER CmArchCommonGenericInitiatorAffinityInfoParser[] = { - { "ProximityDomain", 4, "0x%x", NULL }, - { "Flags", 4, "0x%x", NULL }, - { "DeviceHandleType", 1, "0x%x", NULL }, - { "DeviceHandleToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL } + { "ProximityDomain", 4, "0x%x", NULL }, + { "Flags", 4, "0x%x", NULL }, + { "DeviceHandleType", 1, "0x%x", NULL }, + { "DeviceHandleToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, + { "ProximityDomainToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, }; /** A parser for EArmObjCmn600Info. @@ -1081,11 +1087,13 @@ STATIC CONST CM_OBJ_PARSER CmX64ObjFacsInfoParser[] = { /** A parser for CmX64LocalApicX2ApicAffinityInfo. */ STATIC CONST CM_OBJ_PARSER CmX64LocalApicX2ApicAffinityInfo[] = { - { "ApicMode", sizeof (LOCAL_APIC_MODE), "0x%x", NULL }, - { "ApicId", 4, "0x%x", NULL }, - { "ProximityDomain", 4, "0x%x", NULL }, - { "Flags", 4, "0x%x", NULL }, - { "ClockDomain", 4, "0x%x", NULL } + { "ApicMode", sizeof (LOCAL_APIC_MODE), "0x%x", NULL }, + { "ApicId", 4, "0x%x", NULL }, + { "ProximityDomain", 4, "0x%x", NULL }, + { "Flags", 4, "0x%x", NULL }, + { "ClockDomain", 4, "0x%x", NULL }, + { "ProximityDomainToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, + { "ClockDomainToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL }, }; /** A parser for X64 namespace objects.