summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSami Mujawar <sami.mujawar@arm.com>2024-03-08 12:14:54 +0000
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-07-29 13:44:55 +0000
commit4333f5c31630c316c13a6a4539613052a45266a5 (patch)
tree756f0983e493624c6319db9125bac800d2d9a233
parent83b01dc5ccea79ff28eb53fea971eebfb436ecb6 (diff)
downloadedk2-4333f5c31630c316c13a6a4539613052a45266a5.tar.gz
edk2-4333f5c31630c316c13a6a4539613052a45266a5.tar.bz2
edk2-4333f5c31630c316c13a6a4539613052a45266a5.zip
DynamicTablesPkg: Move CM_ARM_GENERIC_INTERRUPT struct to Arch Common
The CM_ARM_GENERIC_INTERRUPT struct describes a standard interrupt and is generic. Therefore move it to the Arch Common namespace header file and rename it as CM_ARCH_COMMON_GENERIC_INTERRUPT. Correspondingly also update the following modules to reflect the changes introduced by the move: - SSDT CMN600 generator - ConfigurationManagerObjectParser - 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>
-rw-r--r--DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h15
-rw-r--r--DynamicTablesPkg/Include/ArmNameSpaceObjects.h55
-rw-r--r--DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c16
-rw-r--r--DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c36
-rw-r--r--DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.c8
-rw-r--r--DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.h8
6 files changed, 69 insertions, 69 deletions
diff --git a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
index bbc5d7dc55..c5639e0508 100644
--- a/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
@@ -170,6 +170,21 @@ typedef struct CmArchCommonPciAddressMapInfo {
UINT64 AddressSize;
} CM_ARCH_COMMON_PCI_ADDRESS_MAP_INFO;
+/** A structure that describes the
+ Generic Interrupts.
+*/
+typedef struct CmArchCommonGenericInterrupt {
+ /// Interrupt number
+ UINT32 Interrupt;
+
+ /// Flags
+ /// BIT0: 0: Interrupt is Level triggered
+ /// 1: Interrupt is Edge triggered
+ /// BIT1: 0: Interrupt is Active high
+ /// 1: Interrupt is Active low
+ UINT32 Flags;
+} CM_ARCH_COMMON_GENERIC_INTERRUPT;
+
#pragma pack()
#endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_
diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
index 5b318bbb10..60ec34a7b3 100644
--- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h
@@ -632,21 +632,6 @@ typedef struct CmArmIdMapping {
UINT32 Flags;
} CM_ARM_ID_MAPPING;
-/** A structure that describes the Arm
- Generic Interrupts.
-*/
-typedef struct CmArmGenericInterrupt {
- /// Interrupt number
- UINT32 Interrupt;
-
- /// Flags
- /// BIT0: 0: Interrupt is Level triggered
- /// 1: Interrupt is Edge triggered
- /// BIT1: 0: Interrupt is Active high
- /// 1: Interrupt is Active low
- UINT32 Flags;
-} CM_ARM_GENERIC_INTERRUPT;
-
/** A structure that describes the SMMU interrupts for the Platform.
Interrupt Interrupt number.
@@ -654,7 +639,7 @@ typedef struct CmArmGenericInterrupt {
ID: EArmObjSmmuInterruptArray
*/
-typedef CM_ARM_GENERIC_INTERRUPT CM_ARM_SMMU_INTERRUPT;
+typedef CM_ARCH_COMMON_GENERIC_INTERRUPT CM_ARM_SMMU_INTERRUPT;
/** A structure that describes the AML Extended Interrupts.
@@ -664,7 +649,7 @@ typedef CM_ARM_GENERIC_INTERRUPT CM_ARM_SMMU_INTERRUPT;
resource descriptor.
See EFI_ACPI_EXTENDED_INTERRUPT_FLAG_xxx in Acpi10.h
*/
-typedef CM_ARM_GENERIC_INTERRUPT CM_ARM_EXTENDED_INTERRUPT;
+typedef CM_ARCH_COMMON_GENERIC_INTERRUPT CM_ARM_EXTENDED_INTERRUPT;
/** A structure that describes the Processor Hierarchy Node (Type 0) in PPTT
@@ -927,14 +912,14 @@ typedef struct CmArmPciInterruptMapInfo {
Device-tree bindings are shifted by 1:
"INTA=1, INTB=2, INTC=3, INTD=4"
*/
- UINT8 PciInterrupt;
+ UINT8 PciInterrupt;
/** Interrupt controller interrupt.
Cf Devicetree Specification - Release v0.3
s2.4.3 "Interrupt Nexus Properties": "parent interrupt specifier"
*/
- CM_ARM_GENERIC_INTERRUPT IntcInterrupt;
+ CM_ARCH_COMMON_GENERIC_INTERRUPT IntcInterrupt;
} CM_ARM_PCI_INTERRUPT_MAP_INFO;
/** A structure that describes the
@@ -1085,10 +1070,10 @@ typedef struct CmArmPccSubspaceType1Info {
The Subspace of Type0 contains information that can be re-used
in other Subspace types.
*/
- PCC_SUBSPACE_GENERIC_INFO GenericPccInfo;
+ PCC_SUBSPACE_GENERIC_INFO GenericPccInfo;
/// Platform Interrupt.
- CM_ARM_GENERIC_INTERRUPT PlatIrq;
+ CM_ARCH_COMMON_GENERIC_INTERRUPT PlatIrq;
} CM_ARM_PCC_SUBSPACE_TYPE1_INFO;
/** A structure that describes a
@@ -1102,13 +1087,13 @@ typedef struct CmArmPccSubspaceType2Info {
The Subspace of Type0 contains information that can be re-used
in other Subspace types.
*/
- PCC_SUBSPACE_GENERIC_INFO GenericPccInfo;
+ PCC_SUBSPACE_GENERIC_INFO GenericPccInfo;
/// Platform Interrupt.
- CM_ARM_GENERIC_INTERRUPT PlatIrq;
+ CM_ARCH_COMMON_GENERIC_INTERRUPT PlatIrq;
/// Platform Interrupt Register.
- PCC_MAILBOX_REGISTER_INFO PlatIrqAckReg;
+ PCC_MAILBOX_REGISTER_INFO PlatIrqAckReg;
} CM_ARM_PCC_SUBSPACE_TYPE2_INFO;
/** A structure that describes a
@@ -1122,24 +1107,24 @@ typedef struct CmArmPccSubspaceType3Info {
The Subspace of Type0 contains information that can be re-used
in other Subspace types.
*/
- PCC_SUBSPACE_GENERIC_INFO GenericPccInfo;
+ PCC_SUBSPACE_GENERIC_INFO GenericPccInfo;
/// Platform Interrupt.
- CM_ARM_GENERIC_INTERRUPT PlatIrq;
+ CM_ARCH_COMMON_GENERIC_INTERRUPT PlatIrq;
/// Platform Interrupt Register.
- PCC_MAILBOX_REGISTER_INFO PlatIrqAckReg;
+ PCC_MAILBOX_REGISTER_INFO PlatIrqAckReg;
/// Command Complete Check Register.
/// The WriteMask field is not used.
- PCC_MAILBOX_REGISTER_INFO CmdCompleteCheckReg;
+ PCC_MAILBOX_REGISTER_INFO CmdCompleteCheckReg;
/// Command Complete Update Register.
- PCC_MAILBOX_REGISTER_INFO CmdCompleteUpdateReg;
+ PCC_MAILBOX_REGISTER_INFO CmdCompleteUpdateReg;
/// Error Status Register.
/// The WriteMask field is not used.
- PCC_MAILBOX_REGISTER_INFO ErrorStatusReg;
+ PCC_MAILBOX_REGISTER_INFO ErrorStatusReg;
} CM_ARM_PCC_SUBSPACE_TYPE3_INFO;
/** A structure that describes a
@@ -1163,21 +1148,21 @@ typedef struct CmArmPccSubspaceType5Info {
MaximumPeriodicAccessRate doesn't need to be populated for
this structure.
*/
- PCC_SUBSPACE_GENERIC_INFO GenericPccInfo;
+ PCC_SUBSPACE_GENERIC_INFO GenericPccInfo;
/// Version.
- UINT16 Version;
+ UINT16 Version;
/// Platform Interrupt.
- CM_ARM_GENERIC_INTERRUPT PlatIrq;
+ CM_ARCH_COMMON_GENERIC_INTERRUPT PlatIrq;
/// Command Complete Check Register.
/// The WriteMask field is not used.
- PCC_MAILBOX_REGISTER_INFO CmdCompleteCheckReg;
+ PCC_MAILBOX_REGISTER_INFO CmdCompleteCheckReg;
/// Error Status Register.
/// The WriteMask field is not used.
- PCC_MAILBOX_REGISTER_INFO ErrorStatusReg;
+ PCC_MAILBOX_REGISTER_INFO ErrorStatusReg;
} CM_ARM_PCC_SUBSPACE_TYPE5_INFO;
/** An enum describing the Arm Embedded Trace device type.
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c
index 6118df0549..3585a53a9d 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c
@@ -65,10 +65,10 @@ ValidateCmn600Info (
IN CONST UINT32 Cmn600Count
)
{
- UINT32 Index;
- UINT32 DtcIndex;
- CONST CM_ARM_CMN_600_INFO *Cmn600Info;
- CONST CM_ARM_GENERIC_INTERRUPT *DtcInterrupt;
+ UINT32 Index;
+ UINT32 DtcIndex;
+ CONST CM_ARM_CMN_600_INFO *Cmn600Info;
+ CONST CM_ARCH_COMMON_GENERIC_INTERRUPT *DtcInterrupt;
if ((Cmn600InfoList == NULL) ||
(Cmn600Count == 0))
@@ -231,10 +231,10 @@ FixupCmn600Info (
OUT EFI_ACPI_DESCRIPTION_HEADER **Table
)
{
- EFI_STATUS Status;
- EFI_STATUS Status1;
- UINT8 Index;
- CONST CM_ARM_GENERIC_INTERRUPT *DtcInt;
+ EFI_STATUS Status;
+ EFI_STATUS Status1;
+ UINT8 Index;
+ CONST CM_ARCH_COMMON_GENERIC_INTERRUPT *DtcInt;
EFI_ACPI_DESCRIPTION_HEADER *SsdtCmn600Template;
AML_ROOT_NODE_HANDLE RootNodeHandle;
diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
index 2d0e628766..1fd1edb8eb 100644
--- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
+++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
@@ -317,7 +317,7 @@ STATIC CONST CM_OBJ_PARSER CmArmIdMappingParser[] = {
/** A parser for EArmObjSmmuInterruptArray.
*/
-STATIC CONST CM_OBJ_PARSER CmArmGenericInterruptParser[] = {
+STATIC CONST CM_OBJ_PARSER CmArchCommonGenericInterruptParser[] = {
{ "Interrupt", 4, "0x%x", NULL },
{ "Flags", 4, "0x%x", NULL }
};
@@ -452,12 +452,12 @@ STATIC CONST CM_OBJ_PARSER CmArchCommonPciAddressMapInfoParser[] = {
/** A parser for EArmObjPciInterruptMapInfo.
*/
STATIC CONST CM_OBJ_PARSER CmPciInterruptMapInfoParser[] = {
- { "PciBus", 1, "0x%x", NULL },
- { "PciDevice", 1, "0x%x", NULL },
- { "PciInterrupt", 1, "0x%x", NULL },
- { "IntcInterrupt", sizeof (CM_ARM_GENERIC_INTERRUPT),
- NULL, NULL, CmArmGenericInterruptParser,
- ARRAY_SIZE (CmArmGenericInterruptParser) },
+ { "PciBus", 1, "0x%x", NULL },
+ { "PciDevice", 1, "0x%x", NULL },
+ { "PciInterrupt", 1, "0x%x", NULL },
+ { "IntcInterrupt", sizeof (CM_ARCH_COMMON_GENERIC_INTERRUPT),
+ NULL, NULL, CmArchCommonGenericInterruptParser,
+ ARRAY_SIZE (CmArchCommonGenericInterruptParser) },
};
/** A parser for EArmObjRmr.
@@ -595,9 +595,9 @@ STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType1InfoParser[] = {
{ "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO),
NULL, NULL, CmArmPccSubspaceType0InfoParser,
ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) },
- { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT),
- NULL, NULL, CmArmGenericInterruptParser,
- ARRAY_SIZE (CmArmGenericInterruptParser) },
+ { "PlatIrq", sizeof (CM_ARCH_COMMON_GENERIC_INTERRUPT),
+ NULL, NULL, CmArchCommonGenericInterruptParser,
+ ARRAY_SIZE (CmArchCommonGenericInterruptParser) },
};
/** A parser for EArmObjPccSubspaceType2Info.
@@ -606,8 +606,8 @@ STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType2InfoParser[] = {
{ "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO),
NULL, NULL, CmArmPccSubspaceType0InfoParser,
ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) },
- { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), NULL,NULL,
- CmArmGenericInterruptParser, ARRAY_SIZE (CmArmGenericInterruptParser) },
+ { "PlatIrq", sizeof (CM_ARCH_COMMON_GENERIC_INTERRUPT),NULL,NULL,
+ CmArchCommonGenericInterruptParser, ARRAY_SIZE (CmArchCommonGenericInterruptParser) },
{ "PlatIrqAckReg", sizeof (PCC_MAILBOX_REGISTER_INFO),
NULL, NULL, CmArmMailboxRegisterInfoParser,
ARRAY_SIZE (CmArmMailboxRegisterInfoParser) },
@@ -619,8 +619,8 @@ STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType34InfoParser[] = {
{ "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO),
NULL, NULL, CmArmPccSubspaceType0InfoParser,
ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) },
- { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), NULL,NULL,
- CmArmGenericInterruptParser, ARRAY_SIZE (CmArmGenericInterruptParser) },
+ { "PlatIrq", sizeof (CM_ARCH_COMMON_GENERIC_INTERRUPT),NULL,NULL,
+ CmArchCommonGenericInterruptParser, ARRAY_SIZE (CmArchCommonGenericInterruptParser) },
{ "PlatIrqAckReg", sizeof (PCC_MAILBOX_REGISTER_INFO),
NULL, NULL, CmArmMailboxRegisterInfoParser,
ARRAY_SIZE (CmArmMailboxRegisterInfoParser) },
@@ -641,9 +641,9 @@ STATIC CONST CM_OBJ_PARSER CmArmPccSubspaceType5InfoParser[] = {
{ "GenericPccInfo", sizeof (PCC_SUBSPACE_GENERIC_INFO),
NULL, NULL, CmArmPccSubspaceType0InfoParser,
ARRAY_SIZE (CmArmPccSubspaceType0InfoParser) },
- { "Version", 2, "0x%x",NULL },
- { "PlatIrq", sizeof (CM_ARM_GENERIC_INTERRUPT), NULL, NULL,
- CmArmGenericInterruptParser, ARRAY_SIZE (CmArmGenericInterruptParser) },
+ { "Version", 2, "0x%x",NULL },
+ { "PlatIrq", sizeof (CM_ARCH_COMMON_GENERIC_INTERRUPT),NULL, NULL,
+ CmArchCommonGenericInterruptParser, ARRAY_SIZE (CmArchCommonGenericInterruptParser) },
{ "CmdCompleteCheckReg", sizeof (PCC_MAILBOX_REGISTER_INFO),
NULL, NULL, CmArmMailboxRegisterInfoParser,
ARRAY_SIZE (CmArmMailboxRegisterInfoParser) },
@@ -705,7 +705,7 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT (EArmObjPmcg, CmArmPmcgNodeParser),
CM_PARSER_ADD_OBJECT (EArmObjGicItsIdentifierArray, CmArmGicItsIdentifierParser),
CM_PARSER_ADD_OBJECT (EArmObjIdMappingArray, CmArmIdMappingParser),
- CM_PARSER_ADD_OBJECT (EArmObjSmmuInterruptArray, CmArmGenericInterruptParser),
+ CM_PARSER_ADD_OBJECT (EArmObjSmmuInterruptArray, CmArchCommonGenericInterruptParser),
CM_PARSER_ADD_OBJECT (EArmObjProcHierarchyInfo, CmArmProcHierarchyInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjCacheInfo, CmArmCacheInfoParser),
CM_PARSER_ADD_OBJECT (EArmObjMemoryAffinityInfo, CmArmMemoryAffinityInfoParser),
diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.c b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.c
index aef0f27a15..b20d265a83 100644
--- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.c
+++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.c
@@ -702,10 +702,10 @@ FreeParserTable (
} CM_ARCH_COMMON_PCI_ADDRESS_MAP_INFO;
typedef struct CmArmPciInterruptMapInfo {
- UINT8 PciBus; // {Populated}
- UINT8 PciDevice; // {Populated}
- UINT8 PciInterrupt; // {Populated}
- CM_ARM_GENERIC_INTERRUPT IntcInterrupt; // {Populated}
+ UINT8 PciBus; // {Populated}
+ UINT8 PciDevice; // {Populated}
+ UINT8 PciInterrupt; // {Populated}
+ CM_ARCH_COMMON_GENERIC_INTERRUPT IntcInterrupt; // {Populated}
} CM_ARM_PCI_INTERRUPT_MAP_INFO;
A parser parses a Device Tree to populate a specific CmObj type. None,
diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.h b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.h
index ba7090fd7e..33457cd6e9 100644
--- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.h
+++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.h
@@ -110,10 +110,10 @@ typedef struct PciParserTable {
} CM_ARCH_COMMON_PCI_ADDRESS_MAP_INFO;
typedef struct CmArmPciInterruptMapInfo {
- UINT8 PciBus; // {Populated}
- UINT8 PciDevice; // {Populated}
- UINT8 PciInterrupt; // {Populated}
- CM_ARM_GENERIC_INTERRUPT IntcInterrupt; // {Populated}
+ UINT8 PciBus; // {Populated}
+ UINT8 PciDevice; // {Populated}
+ UINT8 PciInterrupt; // {Populated}
+ CM_ARCH_COMMON_GENERIC_INTERRUPT IntcInterrupt; // {Populated}
} CM_ARM_PCI_INTERRUPT_MAP_INFO;
A parser parses a Device Tree to populate a specific CmObj type. None,