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>
This commit is contained in:
Pierre Gondois
2021-12-09 10:25:03 +01:00
committed by mergify[bot]
parent 69ddfee1c3
commit ce306e48eb
2 changed files with 112 additions and 8 deletions

View File

@ -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 },
};