summaryrefslogtreecommitdiffstats
path: root/DynamicTablesPkg/Library/Common
diff options
context:
space:
mode:
authorPierre Gondois <Pierre.Gondois@arm.com>2021-12-09 10:25:03 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-13 12:48:42 +0000
commitce306e48eb72ce24f7cde791d756e1f6a5b0fdb5 (patch)
tree1e5cfe73239cba2b455f80f4187e1a94390e20d5 /DynamicTablesPkg/Library/Common
parent69ddfee1c378650645fce5970ccb6577d43c4076 (diff)
downloadedk2-ce306e48eb72ce24f7cde791d756e1f6a5b0fdb5.tar.gz
edk2-ce306e48eb72ce24f7cde791d756e1f6a5b0fdb5.tar.bz2
edk2-ce306e48eb72ce24f7cde791d756e1f6a5b0fdb5.zip
DynamicTablesPkg: Add Pci related objects
Introduce the following CmObj in the ArmNameSpaceObjects: - CM_ARM_PCI_ADDRESS_MAP_INFO - CM_ARM_PCI_INTERRUPT_MAP_INFO These objects allow to describe address range mapping of Pci busses and interrupt mapping of Pci devices. To: Sami Mujawar <sami.mujawar@arm.com> To: Alexei Fedorov <Alexei.Fedorov@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Diffstat (limited to 'DynamicTablesPkg/Library/Common')
-rw-r--r--DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
index 52405fcea7..84a35e8314 100644
--- a/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
+++ b/DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
@@ -149,10 +149,12 @@ STATIC CONST CM_OBJ_PARSER CmArmGenericWatchdogInfoParser[] = {
/** A parser for EArmObjPciConfigSpaceInfo.
*/
STATIC CONST CM_OBJ_PARSER CmArmPciConfigSpaceInfoParser[] = {
- { "BaseAddress", 8, "0x%llx", NULL },
- { "PciSegmentGroupNumber", 2, "0x%x", NULL },
- { "StartBusNumber", 1, "0x%x", NULL },
- { "EndBusNumber", 1, "0x%x", NULL }
+ { "BaseAddress", 8, "0x%llx", NULL },
+ { "PciSegmentGroupNumber", 2, "0x%x", NULL },
+ { "StartBusNumber", 1, "0x%x", NULL },
+ { "EndBusNumber", 1, "0x%x", NULL },
+ { "AddressMapToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
+ { "InterruptMapToken", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
};
/** A parser for EArmObjHypervisorVendorIdentity.
@@ -401,6 +403,26 @@ STATIC CONST CM_OBJ_PARSER CmArmLpiInfoParser[] = {
{ "StateName", 16, "0x%a", NULL },
};
+/** A parser for EArmObjPciAddressMapInfo.
+*/
+STATIC CONST CM_OBJ_PARSER CmArmPciAddressMapInfoParser[] = {
+ { "SpaceCode", 1, "%d", NULL },
+ { "PciAddress", 8, "0x%llx", NULL },
+ { "CpuAddress", 8, "0x%llx", NULL },
+ { "AddressSize", 8, "0x%llx", NULL },
+};
+
+/** 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) },
+};
+
/** A parser for Arm namespace objects.
*/
STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] = {
@@ -475,6 +497,10 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArmNamespaceObjectParser[] = {
ARRAY_SIZE (CmArmCmn600InfoParser) },
{ "EArmObjLpiInfo", CmArmLpiInfoParser,
ARRAY_SIZE (CmArmLpiInfoParser) },
+ { "EArmObjPciAddressMapInfo", CmArmPciAddressMapInfoParser,
+ ARRAY_SIZE (CmArmPciAddressMapInfoParser) },
+ { "EArmObjPciInterruptMapInfo", CmPciInterruptMapInfoParser,
+ ARRAY_SIZE (CmPciInterruptMapInfoParser) },
{ "EArmObjMax", NULL, 0 },
};