From: "PierreGondois" <pierre.gondois@arm.com>
To: devel@edk2.groups.io
Cc: Pierre Gondois <pierre.gondois@arm.com>
Subject: [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 06/14] Platform/ARM: Morello,N1Sdp: Move Pci Config Space info to Arch Common
Date: Mon, 10 Jun 2024 11:33:57 +0200 [thread overview]
Message-ID: <20240610093405.1980592-7-Pierre.Gondois@arm.com> (raw)
In-Reply-To: <20240610093405.1980592-1-Pierre.Gondois@arm.com>
From: Pierre Gondois <pierre.gondois@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.gondois@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/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-06-10 9:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 9:33 [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 00/14] Platform: N1Sdp,Morello,NXP: Move DynamicTablesPkg obj to Arch Common PierreGondois
2024-06-10 9:33 ` [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 01/14] Platform/ARM: Morello,N1Sdp: Add Arch Common objects handler PierreGondois
2024-06-10 9:33 ` [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 02/14] Platform/ARM: Morello,N1Sdp: Move Power Mgmt Profile info to Arch Common PierreGondois
2024-06-10 9:33 ` [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 03/14] Platform/ARM: Morello,N1Sdp: Move Serial Port " PierreGondois
2024-06-10 9:33 ` [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 04/14] Platform/ARM: Morello,N1Sdp: Move Fixed Feat Flags " PierreGondois
2024-06-10 9:33 ` [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 05/14] Platform/ARM: Morello,N1Sdp: Move CmRef " PierreGondois
2024-06-10 9:33 ` PierreGondois [this message]
2024-06-10 9:33 ` [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 07/14] Platform/ARM: Morello,N1Sdp: Rename GicCToken PierreGondois
2024-06-10 9:33 ` [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 08/14] Platform/ARM: Morello,N1Sdp: Move Proc Hierarchy info to Arch Common PierreGondois
2024-06-10 9:34 ` [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 09/14] Platform/ARM: Morello,N1Sdp: Move Cache " PierreGondois
2024-06-10 9:34 ` [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 10/14] Platform/ARM: N1Sdp: Move Memory Affinity " PierreGondois
2024-06-10 9:34 ` [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 11/14] Platform/NXP: Add Arch Common objects handler PierreGondois
2024-06-11 13:33 ` Sami Mujawar
2024-06-10 9:34 ` [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 12/14] Platform/NXP: Move Power Mgmt Profile info to Arch Common PierreGondois
2024-06-10 9:34 ` [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 13/14] Platform/NXP: Move Serial Port " PierreGondois
2024-06-10 9:34 ` [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 14/14] Platform/NXP: Move Pci Config Space " PierreGondois
2024-06-11 13:29 ` [edk2-devel] [platforms/devel-dynamictables-reorg PATCH 00/14] Platform: N1Sdp,Morello,NXP: Move DynamicTablesPkg obj " Sami Mujawar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240610093405.1980592-7-Pierre.Gondois@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox