DynamicTablesPkg: Move Pci Interrupt Map Info to Arch Common

Move Pci Interrupt Map Info object from Arm Namespace to the
Arch Common namespace.

Correspondingly also update the following modules to reflect the
changes introduced by the move:
 - SSDT PCIe library
 - ConfigurationManagerObjectParser
 - Dynamic Plat Repo TokenFixer map
 - FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.

Cc: Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Yeo Reum Yun <YeoReum.Yun@arm.com>
Cc: AbdulLateef Attar <AbdulLateef.Attar@amd.com>
Cc: Jeshua Smith <jeshuas@nvidia.com>
Cc: Jeff Brasen <jbrasen@nvidia.com>
Cc: Girish Mahadevan <gmahadevan@nvidia.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
This commit is contained in:
Sami Mujawar 2024-03-08 12:06:59 +00:00 committed by mergify[bot]
parent 4333f5c316
commit 11dcf74d42
8 changed files with 96 additions and 97 deletions

View File

@ -30,6 +30,7 @@ typedef enum ArchCommonObjectID {
EArchCommonObjCmRef, ///< 7 - CM Object Reference
EArchCommonObjPciConfigSpaceInfo, ///< 8 - PCI Configuration Space Info
EArchCommonObjPciAddressMapInfo, ///< 9 - Pci Address Map Info
EArchCommonObjPciInterruptMapInfo, ///< 10 - Pci Interrupt Map Info
EArchCommonObjMax
} EARCH_COMMON_OBJECT_ID;
@ -185,6 +186,43 @@ typedef struct CmArchCommonGenericInterrupt {
UINT32 Flags;
} CM_ARCH_COMMON_GENERIC_INTERRUPT;
/** A structure that describes a PCI Interrupt Map.
The legacy PCI interrupts used by PCI devices are described by this object.
Cf Devicetree Specification - Release v0.3
s2.4.3 "Interrupt Nexus Properties"
ID: EArchCommonObjPciInterruptMapInfo
*/
typedef struct CmArchCommonPciInterruptMapInfo {
/// Pci Bus.
/// Value on 8 bits (max 255).
UINT8 PciBus;
/// Pci Device.
/// Value on 5 bits (max 31).
UINT8 PciDevice;
/** PCI interrupt
ACPI bindings are used:
Cf. ACPI 6.4, s6.2.13 _PRT (PCI Routing Table):
"0-INTA, 1-INTB, 2-INTC, 3-INTD"
Device-tree bindings are shifted by 1:
"INTA=1, INTB=2, INTC=3, INTD=4"
*/
UINT8 PciInterrupt;
/** Interrupt controller interrupt.
Cf Devicetree Specification - Release v0.3
s2.4.3 "Interrupt Nexus Properties": "parent interrupt specifier"
*/
CM_ARCH_COMMON_GENERIC_INTERRUPT IntcInterrupt;
} CM_ARCH_COMMON_PCI_INTERRUPT_MAP_INFO;
#pragma pack()
#endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_

View File

@ -56,18 +56,17 @@ typedef enum ArmObjectID {
EArmObjGenericInitiatorAffinityInfo, ///< 25 - Generic Initiator Affinity
EArmObjCmn600Info, ///< 26 - CMN-600 Info
EArmObjLpiInfo, ///< 27 - Lpi Info
EArmObjPciInterruptMapInfo, ///< 28 - Pci Interrupt Map Info
EArmObjRmr, ///< 29 - Reserved Memory Range Node
EArmObjMemoryRangeDescriptor, ///< 30 - Memory Range Descriptor
EArmObjCpcInfo, ///< 31 - Continuous Performance Control Info
EArmObjPccSubspaceType0Info, ///< 32 - Pcc Subspace Type 0 Info
EArmObjPccSubspaceType1Info, ///< 33 - Pcc Subspace Type 2 Info
EArmObjPccSubspaceType2Info, ///< 34 - Pcc Subspace Type 2 Info
EArmObjPccSubspaceType3Info, ///< 35 - Pcc Subspace Type 3 Info
EArmObjPccSubspaceType4Info, ///< 36 - Pcc Subspace Type 4 Info
EArmObjPccSubspaceType5Info, ///< 37 - Pcc Subspace Type 5 Info
EArmObjEtInfo, ///< 38 - Embedded Trace Extension/Module Info
EArmObjPsdInfo, ///< 39 - P-State Dependency (PSD) Info
EArmObjRmr, ///< 28 - Reserved Memory Range Node
EArmObjMemoryRangeDescriptor, ///< 29 - Memory Range Descriptor
EArmObjCpcInfo, ///< 30 - Continuous Performance Control Info
EArmObjPccSubspaceType0Info, ///< 31 - Pcc Subspace Type 0 Info
EArmObjPccSubspaceType1Info, ///< 32 - Pcc Subspace Type 2 Info
EArmObjPccSubspaceType2Info, ///< 33 - Pcc Subspace Type 2 Info
EArmObjPccSubspaceType3Info, ///< 34 - Pcc Subspace Type 3 Info
EArmObjPccSubspaceType4Info, ///< 35 - Pcc Subspace Type 4 Info
EArmObjPccSubspaceType5Info, ///< 36 - Pcc Subspace Type 5 Info
EArmObjEtInfo, ///< 37 - Embedded Trace Extension/Module Info
EArmObjPsdInfo, ///< 38 - P-State Dependency (PSD) Info
EArmObjMax
} EARM_OBJECT_ID;
@ -885,43 +884,6 @@ typedef struct CmArmLpiInfo {
CHAR8 StateName[16];
} CM_ARM_LPI_INFO;
/** A structure that describes a PCI Interrupt Map.
The legacy PCI interrupts used by PCI devices are described by this object.
Cf Devicetree Specification - Release v0.3
s2.4.3 "Interrupt Nexus Properties"
ID: EArmObjPciInterruptMapInfo
*/
typedef struct CmArmPciInterruptMapInfo {
/// Pci Bus.
/// Value on 8 bits (max 255).
UINT8 PciBus;
/// Pci Device.
/// Value on 5 bits (max 31).
UINT8 PciDevice;
/** PCI interrupt
ACPI bindings are used:
Cf. ACPI 6.4, s6.2.13 _PRT (PCI Routing Table):
"0-INTA, 1-INTB, 2-INTC, 3-INTD"
Device-tree bindings are shifted by 1:
"INTA=1, INTB=2, INTC=3, INTD=4"
*/
UINT8 PciInterrupt;
/** Interrupt controller interrupt.
Cf Devicetree Specification - Release v0.3
s2.4.3 "Interrupt Nexus Properties": "parent interrupt specifier"
*/
CM_ARCH_COMMON_GENERIC_INTERRUPT IntcInterrupt;
} CM_ARM_PCI_INTERRUPT_MAP_INFO;
/** A structure that describes the
RMR node for the Platform.

View File

@ -45,7 +45,7 @@ Requirements:
- EArchCommonObjCmRef
- EArchCommonObjPciConfigSpaceInfo
- EArchCommonObjPciAddressMapInfo
- EArmObjPciInterruptMapInfo
- EArchCommonObjPciInterruptMapInfo
*/
/** This macro expands to a function that retrieves the cross-CM-object-
@ -79,9 +79,9 @@ GET_OBJECT_LIST (
Interrupt Mapping Information from the Configuration Manager.
*/
GET_OBJECT_LIST (
EObjNameSpaceArm,
EArmObjPciInterruptMapInfo,
CM_ARM_PCI_INTERRUPT_MAP_INFO
EObjNameSpaceArchCommon,
EArchCommonObjPciInterruptMapInfo,
CM_ARCH_COMMON_PCI_INTERRUPT_MAP_INFO
);
/** Initialize the MappingTable.
@ -310,12 +310,12 @@ GeneratePrt (
IN OUT AML_OBJECT_NODE_HANDLE PciNode
)
{
EFI_STATUS Status;
INT32 Index;
AML_OBJECT_NODE_HANDLE PrtNode;
CM_ARCH_COMMON_OBJ_REF *RefInfo;
UINT32 RefCount;
CM_ARM_PCI_INTERRUPT_MAP_INFO *IrqMapInfo;
EFI_STATUS Status;
INT32 Index;
AML_OBJECT_NODE_HANDLE PrtNode;
CM_ARCH_COMMON_OBJ_REF *RefInfo;
UINT32 RefCount;
CM_ARCH_COMMON_PCI_INTERRUPT_MAP_INFO *IrqMapInfo;
ASSERT (Generator != NULL);
ASSERT (CfgMgrProtocol != NULL);
@ -325,7 +325,7 @@ GeneratePrt (
PrtNode = NULL;
// Get the array of CM_ARCH_COMMON_OBJ_REF referencing the
// CM_ARM_PCI_INTERRUPT_MAP_INFO objects.
// CM_ARCH_COMMON_PCI_INTERRUPT_MAP_INFO objects.
Status = GetEArchCommonObjCmRef (
CfgMgrProtocol,
PciInfo->InterruptMapToken,
@ -352,8 +352,8 @@ GeneratePrt (
}
for (Index = 0; Index < RefCount; Index++) {
// Get CM_ARM_PCI_INTERRUPT_MAP_INFO structures one by one.
Status = GetEArmObjPciInterruptMapInfo (
// Get CM_ARCH_COMMON_PCI_INTERRUPT_MAP_INFO structures one by one.
Status = GetEArchCommonObjPciInterruptMapInfo (
CfgMgrProtocol,
RefInfo[Index].ReferenceToken,
&IrqMapInfo,

View File

@ -171,18 +171,17 @@ CM_OBJECT_TOKEN_FIXER TokenFixer[EArmObjMax] = {
NULL, ///< 25 - Generic Initiator Affinity
NULL, ///< 26 - CMN-600 Info
NULL, ///< 27 - Lpi Info
NULL, ///< 28 - Pci Interrupt Map Info
NULL, ///< 29 - Reserved Memory Range Node
NULL, ///< 30 - Memory Range Descriptor
NULL, ///< 31 - Continuous Performance Control Info
NULL, ///< 32 - Pcc Subspace Type 0 Info
NULL, ///< 28 - Reserved Memory Range Node
NULL, ///< 29 - Memory Range Descriptor
NULL, ///< 30 - Continuous Performance Control Info
NULL, ///< 31 - Pcc Subspace Type 0 Info
NULL, ///< 32 - Pcc Subspace Type 2 Info
NULL, ///< 33 - Pcc Subspace Type 2 Info
NULL, ///< 34 - Pcc Subspace Type 2 Info
NULL, ///< 35 - Pcc Subspace Type 3 Info
NULL, ///< 36 - Pcc Subspace Type 4 Info
NULL, ///< 37 - Pcc Subspace Type 5 Info
NULL, ///< 38 - Embedded Trace Extension/Module Info
NULL ///< 39 - P-State Dependency (PSD) Info
NULL, ///< 34 - Pcc Subspace Type 3 Info
NULL, ///< 35 - Pcc Subspace Type 4 Info
NULL, ///< 36 - Pcc Subspace Type 5 Info
NULL, ///< 37 - Embedded Trace Extension/Module Info
NULL ///< 38 - P-State Dependency (PSD) Info
};
/** CmObj token fixer.

View File

@ -449,9 +449,9 @@ STATIC CONST CM_OBJ_PARSER CmArchCommonPciAddressMapInfoParser[] = {
{ "AddressSize", 8, "0x%llx", NULL },
};
/** A parser for EArmObjPciInterruptMapInfo.
/** A parser for EArchCommonObjPciInterruptMapInfo.
*/
STATIC CONST CM_OBJ_PARSER CmPciInterruptMapInfoParser[] = {
STATIC CONST CM_OBJ_PARSER CmArchCommonPciInterruptMapInfoParser[] = {
{ "PciBus", 1, "0x%x", NULL },
{ "PciDevice", 1, "0x%x", NULL },
{ "PciInterrupt", 1, "0x%x", NULL },
@ -680,6 +680,7 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArchCommonNamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT (EArchCommonObjCmRef, CmArchCommonObjRefParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjPciConfigSpaceInfo, CmArchCommonPciConfigSpaceInfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjPciAddressMapInfo, CmArchCommonPciAddressMapInfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjPciInterruptMapInfo, CmArchCommonPciInterruptMapInfoParser),
CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)
};
@ -714,7 +715,6 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT (EArmObjGenericInitiatorAffinityInfo,CmArmGenericInitiatorAffinityInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjCmn600Info, CmArmCmn600InfoParser),
CM_PARSER_ADD_OBJECT (EArmObjLpiInfo, CmArmLpiInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjPciInterruptMapInfo, CmPciInterruptMapInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjRmr, CmArmRmrInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjMemoryRangeDescriptor, CmArmMemoryRangeDescriptorInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjCpcInfo, CmArmCpcInfoParser),

View File

@ -311,8 +311,8 @@ ParseIrqMap (
UINT32 PciAddressAttr;
CM_ARM_PCI_INTERRUPT_MAP_INFO *PciInterruptMapInfo;
UINT32 BufferSize;
CM_ARCH_COMMON_PCI_INTERRUPT_MAP_INFO *PciInterruptMapInfo;
UINT32 BufferSize;
Data = fdt_getprop (Fdt, HostPciNode, "interrupt-map", &DataSize);
if ((Data == NULL) || (DataSize <= 0)) {
@ -455,9 +455,9 @@ ParseIrqMap (
} // for
PciInfo->Mapping[PciMappingTableInterrupt].ObjectId =
CREATE_CM_ARM_OBJECT_ID (EArmObjPciInterruptMapInfo);
CREATE_CM_ARCH_COMMON_OBJECT_ID (EArchCommonObjPciInterruptMapInfo);
PciInfo->Mapping[PciMappingTableInterrupt].Size =
sizeof (CM_ARM_PCI_INTERRUPT_MAP_INFO) * IrqMapCount;
sizeof (CM_ARCH_COMMON_PCI_INTERRUPT_MAP_INFO) * IrqMapCount;
PciInfo->Mapping[PciMappingTableInterrupt].Data = PciInterruptMapInfo;
PciInfo->Mapping[PciMappingTableInterrupt].Count = IrqMapCount;
@ -581,7 +581,7 @@ PciNodeParser (
CmObj of the following types are concerned:
- EArchCommonObjPciConfigSpaceInfo
- EArchCommonObjPciAddressMapInfo
- EArmObjPciInterruptMapInfo
- EArchCommonObjPciInterruptMapInfo
@param [in] FdtParserHandle A handle to the parser instance.
@param [in] PciTableInfo PCI_PARSER_TABLE structure containing the
@ -701,12 +701,12 @@ FreeParserTable (
UINT64 AddressSize; // {Populated}
} CM_ARCH_COMMON_PCI_ADDRESS_MAP_INFO;
typedef struct CmArmPciInterruptMapInfo {
typedef struct CmArchCommonPciInterruptMapInfo {
UINT8 PciBus; // {Populated}
UINT8 PciDevice; // {Populated}
UINT8 PciInterrupt; // {Populated}
CM_ARCH_COMMON_GENERIC_INTERRUPT IntcInterrupt; // {Populated}
} CM_ARM_PCI_INTERRUPT_MAP_INFO;
} CM_ARCH_COMMON_PCI_INTERRUPT_MAP_INFO;
A parser parses a Device Tree to populate a specific CmObj type. None,
one or many CmObj can be created by the parser.

View File

@ -109,12 +109,12 @@ typedef struct PciParserTable {
UINT64 AddressSize; // {Populated}
} CM_ARCH_COMMON_PCI_ADDRESS_MAP_INFO;
typedef struct CmArmPciInterruptMapInfo {
typedef struct CmArchCommonPciInterruptMapInfo {
UINT8 PciBus; // {Populated}
UINT8 PciDevice; // {Populated}
UINT8 PciInterrupt; // {Populated}
CM_ARCH_COMMON_GENERIC_INTERRUPT IntcInterrupt; // {Populated}
} CM_ARM_PCI_INTERRUPT_MAP_INFO;
} CM_ARCH_COMMON_PCI_INTERRUPT_MAP_INFO;
A parser parses a Device Tree to populate a specific CmObj type. None,
one or many CmObj can be created by the parser.

View File

@ -468,18 +468,17 @@ The CM_OBJECT_ID type is used to identify the Configuration Manager
| 25 | Generic Initiator Affinity Info | Move to Arch Common NS |
| 26 | CMN 600 Info | |
| 27 | Low Power Idle State Info | Move to Arch Common NS |
| 28 | PCI Interrupt Map Info | Move to Arch Common NS |
| 29 | Reserved Memory Range Node | |
| 30 | Memory Range Descriptor | |
| 31 | Continuous Performance Control Info | Move to Arch Common NS |
| 32 | Pcc Subspace Type 0 Info | Move to Arch Common NS |
| 33 | Pcc Subspace Type 1 Info | Move to Arch Common NS |
| 34 | Pcc Subspace Type 2 Info | Move to Arch Common NS |
| 35 | Pcc Subspace Type 3 Info | Move to Arch Common NS |
| 36 | Pcc Subspace Type 4 Info | Move to Arch Common NS |
| 37 | Pcc Subspace Type 5 Info | Move to Arch Common NS |
| 38 | Embedded Trace Extension/Module Info | |
| 39 | P-State Dependency (PSD) Info | Move to Arch Common NS |
| 28 | Reserved Memory Range Node | |
| 29 | Memory Range Descriptor | |
| 30 | Continuous Performance Control Info | Move to Arch Common NS |
| 31 | Pcc Subspace Type 0 Info | Move to Arch Common NS |
| 32 | Pcc Subspace Type 1 Info | Move to Arch Common NS |
| 33 | Pcc Subspace Type 2 Info | Move to Arch Common NS |
| 34 | Pcc Subspace Type 3 Info | Move to Arch Common NS |
| 35 | Pcc Subspace Type 4 Info | Move to Arch Common NS |
| 36 | Pcc Subspace Type 5 Info | Move to Arch Common NS |
| 37 | Embedded Trace Extension/Module Info | |
| 38 | P-State Dependency (PSD) Info | Move to Arch Common NS |
| `*` | All other values are reserved. | |
#### Object ID's in the Arch Common Namespace:
@ -496,4 +495,5 @@ The CM_OBJECT_ID type is used to identify the Configuration Manager
| 7 | CM Object Reference | |
| 8 | PCI Configuration Space Info | |
| 9 | PCI Address Map Info | |
| 10 | PCI Interrupt Map Info | |
| `*` | All other values are reserved. | |