From: Pierre Gondois <pierre.gond...@arm.com>

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:
- Morello
- N1Sdp
for the following Arch Common object Id:
- EArchCommonObjPciConfigSpaceInfo

Signed-off-by: Pierre Gondois <pierre.gond...@arm.com>
---
 .../ConfigurationManagerFvp.c                 | 20 ++++++-------
 .../ConfigurationManagerFvp.h                 |  2 +-
 .../ConfigurationManager.c                    | 30 +++++++++++--------
 .../ConfigurationManager.h                    |  2 +-
 4 files changed, 29 insertions(+), 25 deletions(-)

diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.c
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.c
index 32cf5e830fed..8d0973ddd8ed 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.c
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.c
@@ -463,6 +463,16 @@ GetArchCommonNameSpaceObjectPlat (
   PlatformRepo = This->PlatRepoInfo->FvpPlatRepoInfo;
 
   switch (GET_CM_OBJECT_ID (CmObjectId)) {
+    case EArchCommonObjPciConfigSpaceInfo:
+      Status = HandleCmObject (
+                 CmObjectId,
+                 PlatformRepo->PciConfigInfo,
+                 sizeof (PlatformRepo->PciConfigInfo),
+                 1,
+                 CmObject
+                 );
+      break;
+
       default:
         break;
   }
@@ -573,16 +583,6 @@ GetArmNameSpaceObjectPlat (
                  );
       break;
 
-    case EArmObjPciConfigSpaceInfo:
-      Status = HandleCmObject (
-                 CmObjectId,
-                 PlatformRepo->PciConfigInfo,
-                 sizeof (PlatformRepo->PciConfigInfo),
-                 1,
-                 CmObject
-                 );
-      break;
-
     default: {
       break;
     }
diff --git 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.h
 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.h
index 4628b7a879aa..744b6095c16c 100644
--- 
a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.h
+++ 
b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.h
@@ -56,7 +56,7 @@ typedef struct FvpPlatformRepositoryInfo {
   CM_ARM_ID_MAPPING                     DeviceIdMapping[2][2];
 
   /// PCI configuration space information
-  CM_ARM_PCI_CONFIG_SPACE_INFO          PciConfigInfo[1];
+  CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO  PciConfigInfo[1];
 
 } EDKII_FVP_PLATFORM_REPOSITORY_INFO;
 
diff --git 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index 85d5ccfbe85c..5713bb578029 100644
--- 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -1702,6 +1702,7 @@ GetArchCommonNameSpaceObject (
 {
   EFI_STATUS                        Status;
   EDKII_PLATFORM_REPOSITORY_INFO  * PlatformRepo;
+  UINT32                            PciConfigInfoCount;
 
   if ((This == NULL) || (CmObject == NULL)) {
     ASSERT (This != NULL);
@@ -1712,6 +1713,12 @@ GetArchCommonNameSpaceObject (
   Status = EFI_NOT_FOUND;
   PlatformRepo = This->PlatRepoInfo;
 
+  if (PlatformRepo->PlatInfo->MultichipMode == 1) {
+    PciConfigInfoCount = Root_pcie_max;
+  } else {
+    PciConfigInfoCount = Root_pcie_master_chip_max;
+  }
+
   switch (GET_CM_OBJECT_ID (CmObjectId)) {
     case EArchCommonObjPowerManagementProfileInfo:
       Status = HandleCmObject (
@@ -1763,6 +1770,16 @@ GetArchCommonNameSpaceObject (
                  );
       break;
 
+    case EArchCommonObjPciConfigSpaceInfo:
+      Status = HandleCmObject (
+                 CmObjectId,
+                 PlatformRepo->PciConfigInfo,
+                 sizeof (PlatformRepo->PciConfigInfo),
+                 PciConfigInfoCount,
+                 CmObject
+                 );
+      break;
+
       default: {
       Status = EFI_NOT_FOUND;
       DEBUG ((
@@ -1811,7 +1828,6 @@ GetArmNameSpaceObject (
   UINT32                            SmmuV3InfoCount;
   UINT32                            DeviceIdMappingCount;
   UINT32                            RootComplexInfoCount;
-  UINT32                            PciConfigInfoCount;
 
   if ((This == NULL) || (CmObject == NULL)) {
     ASSERT (This != NULL);
@@ -1833,7 +1849,6 @@ GetArmNameSpaceObject (
     SmmuV3InfoCount = Smmuv3info_max;
     DeviceIdMappingCount = Devicemapping_max;
     RootComplexInfoCount = Root_pcie_max;
-    PciConfigInfoCount = Root_pcie_max;
   } else {
     GicRedistCount = 1;
     GicCpuCount = PLAT_CPU_COUNT;
@@ -1844,7 +1859,6 @@ GetArmNameSpaceObject (
     SmmuV3InfoCount = Smmuv3info_master_chip_max;
     DeviceIdMappingCount = Devicemapping_master_chip_max;
     RootComplexInfoCount = Root_pcie_master_chip_max;
-    PciConfigInfoCount = Root_pcie_master_chip_max;
   }
 
   switch (GET_CM_OBJECT_ID (CmObjectId)) {
@@ -2023,16 +2037,6 @@ GetArmNameSpaceObject (
                  );
       break;
 
-    case EArmObjPciConfigSpaceInfo:
-      Status = HandleCmObject (
-                 CmObjectId,
-                 PlatformRepo->PciConfigInfo,
-                 sizeof (PlatformRepo->PciConfigInfo),
-                 PciConfigInfoCount,
-                 CmObject
-                 );
-      break;
-
     case EArmObjMemoryAffinityInfo:
       Status = HandleCmObject (
                  CmObjectId,
diff --git 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
index faf6d47ed5f5..93ec3c42565b 100644
--- 
a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
+++ 
b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h
@@ -297,7 +297,7 @@ typedef struct PlatformRepositoryInfo {
   CM_ARM_ID_MAPPING                     DeviceIdMapping[Devicemapping_max][2];
 
   /// PCI configuration space information
-  CM_ARM_PCI_CONFIG_SPACE_INFO          PciConfigInfo[Root_pcie_max];
+  CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO  PciConfigInfo[Root_pcie_max];
 
   /// Memory Affinity Info
   CM_ARM_MEMORY_AFFINITY_INFO           MemAffInfo[DDR_REGION_COUNT];
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119526): https://edk2.groups.io/g/devel/message/119526
Mute This Topic: https://groups.io/mt/106589344/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to