Some DynamicTables objects have been moved from the Arm namespace to a new Arch Common namespace. Reflect this change by renaming/moving the relevant object.
This patch modifies the ConfigurationManager of the following platforms: - Juno - FVP for the following Arch Common object Id: - EArchCommonObjPciConfigSpaceInfo Cc: Sami Mujawar <sami.muja...@arm.com> Cc: Pierre Gondois <pierre.gond...@arm.com> Cc: Yeo Reum Yun <yeoreum....@arm.com> Cc: AbdulLateef Attar <abdullateef.at...@amd.com> Cc: Jeshua Smith <jesh...@nvidia.com> Cc: Jeff Brasen <jbra...@nvidia.com> Cc: Girish Mahadevan <gmahade...@nvidia.com> Cc: Leif Lindholm <quic_llind...@quicinc.com> Cc: Meenakshi Aggarwal <meenakshi.aggar...@nxp.com> Signed-off-by: Pierre Gondois <pierre.gond...@arm.com> --- .../ConfigurationManager.c | 30 +++++++++--------- .../ConfigurationManager.h | 2 +- .../ConfigurationManager.c | 31 +++++++++++-------- .../ConfigurationManager.h | 2 +- 4 files changed, 35 insertions(+), 30 deletions(-) diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c index 65506f0514a8..e33aa6578fd1 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c @@ -1688,6 +1688,21 @@ GetArchCommonNameSpaceObject ( ); break; + case EArchCommonObjPciConfigSpaceInfo: + if (PlatformRepo->JunoRevision != JUNO_REVISION_R0) { + Status = HandleCmObject ( + CmObjectId, + &PlatformRepo->PciConfigInfo, + sizeof (PlatformRepo->PciConfigInfo), + 1, + CmObject + ); + } else { + // No PCIe on Juno R0. + Status = EFI_NOT_FOUND; + } + break; + default: { Status = EFI_NOT_FOUND; DEBUG (( @@ -1856,21 +1871,6 @@ GetArmNameSpaceObject ( ); break; - case EArmObjPciConfigSpaceInfo: - if (PlatformRepo->JunoRevision != JUNO_REVISION_R0) { - Status = HandleCmObject ( - CmObjectId, - &PlatformRepo->PciConfigInfo, - sizeof (PlatformRepo->PciConfigInfo), - 1, - CmObject - ); - } else { - // No PCIe on Juno R0. - Status = EFI_NOT_FOUND; - } - break; - case EArmObjLpiInfo: Status = HandleCmObjectRefByToken ( This, diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h index e3a50edcc0b3..8bd79ca387d4 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h @@ -256,7 +256,7 @@ typedef struct PlatformRepositoryInfo { CM_ARCH_COMMON_SERIAL_PORT_INFO DbgSerialPort; /// PCI configuration space information - CM_ARM_PCI_CONFIG_SPACE_INFO PciConfigInfo; + CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO PciConfigInfo; // PCI address-range mapping references CM_ARCH_COMMON_OBJ_REF PciAddressMapRef[PCI_ADDRESS_MAP_COUNT]; diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c index 0fb3e99d2ab1..fed1fdbd5a52 100644 --- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c @@ -754,6 +754,7 @@ GetArchCommonNameSpaceObject ( { EFI_STATUS Status; EDKII_PLATFORM_REPOSITORY_INFO * PlatformRepo; + UINTN PciConfigSpaceCount; if ((This == NULL) || (CmObject == NULL)) { ASSERT (This != NULL); @@ -764,6 +765,13 @@ GetArchCommonNameSpaceObject ( Status = EFI_NOT_FOUND; PlatformRepo = This->PlatRepoInfo; + if ((PlatformRepo->SysId & ARM_FVP_SYS_ID_REV_MASK) == + ARM_FVP_BASE_REVC_REV) { + PciConfigSpaceCount = 1; + } else { + PciConfigSpaceCount = 0; + } + switch (GET_CM_OBJECT_ID (CmObjectId)) { case EArchCommonObjPowerManagementProfileInfo: Status = HandleCmObject ( @@ -807,6 +815,16 @@ GetArchCommonNameSpaceObject ( break; #endif + case EArchCommonObjPciConfigSpaceInfo: + Status = HandleCmObject ( + CmObjectId, + &PlatformRepo->PciConfigInfo, + sizeof (PlatformRepo->PciConfigInfo), + PciConfigSpaceCount, + CmObject + ); + break; + default: { Status = EFI_NOT_FOUND; DEBUG (( @@ -851,7 +869,6 @@ GetArmNameSpaceObject ( UINTN ItsIdentifierArrayCount; UINTN RootComplexCount; UINTN DeviceIdMappingArrayCount; - UINTN PciConfigSpaceCount; if ((This == NULL) || (CmObject == NULL)) { ASSERT (This != NULL); @@ -869,14 +886,12 @@ GetArmNameSpaceObject ( ItsIdentifierArrayCount = ARRAY_SIZE (PlatformRepo->ItsIdentifierArray); RootComplexCount = 1; DeviceIdMappingArrayCount = ARRAY_SIZE (PlatformRepo->DeviceIdMapping); - PciConfigSpaceCount = 1; } else { Smmuv3Count = 0; ItsGroupCount = 0; ItsIdentifierArrayCount = 0; RootComplexCount = 0; DeviceIdMappingArrayCount = 0; - PciConfigSpaceCount = 0; } switch (GET_CM_OBJECT_ID (CmObjectId)) { @@ -1029,16 +1044,6 @@ GetArmNameSpaceObject ( ); break; - case EArmObjPciConfigSpaceInfo: - Status = HandleCmObject ( - CmObjectId, - &PlatformRepo->PciConfigInfo, - sizeof (PlatformRepo->PciConfigInfo), - PciConfigSpaceCount, - CmObject - ); - break; - case EArmObjEtInfo: if (Token == (CM_OBJECT_TOKEN)&PlatformRepo->EtInfo) { Status = HandleCmObject ( diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h index ad71e8ef5376..e251eed16425 100644 --- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h @@ -169,7 +169,7 @@ typedef struct PlatformRepositoryInfo { CM_ARM_ID_MAPPING DeviceIdMapping[2]; /// PCI configuration space information - CM_ARM_PCI_CONFIG_SPACE_INFO PciConfigInfo; + CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO PciConfigInfo; CM_ARM_ET_INFO EtInfo; -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117007): https://edk2.groups.io/g/devel/message/117007 Mute This Topic: https://groups.io/mt/105069941/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-