DynamicTablesPkg: Add alias for EArchCommonObjPciConfigSpaceInfo

Introduce EArchCommonObjMcfgPciConfigSpaceInfo as an alias for
EArchCommonObjPciConfigSpaceInfo.

The CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO object is utilized by both
the MCFG and ACPI SSDT PCIE generators. Assigning a unique configuration
object ID ensures the platform configuration driver supplies the correct data.

Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
This commit is contained in:
Abdul Lateef Attar
2025-07-07 10:08:20 +00:00
committed by pierregondois
parent a60334ad59
commit 7fe3609022
3 changed files with 27 additions and 5 deletions

View File

@@ -72,6 +72,7 @@ typedef enum ArchCommonObjectID {
EArchCommonObjMemoryCacheInfo, ///< 44 - Memory Cache Info
EArchCommonObjSpcrInfo, ///< 45 - Serial Terminal and Interrupt Info
EArchCommonObjTpm2DeviceInfo, ///< 46 - TPM2 Device Info
EArchCommonObjMcfgPciConfigSpaceInfo, ///< 47 - MCFG PCI Configuration Space Info
EArchCommonObjMax
} EARCH_COMMON_OBJECT_ID;

View File

@@ -2,6 +2,7 @@
MCFG Table Generator
Copyright (c) 2017 - 2019, ARM Limited. All rights reserved.
Copyright (C) 2025, Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
@@ -25,9 +26,9 @@
/** ARM standard MCFG Generator
Requirements:
The following Configuration Manager Object(s) are required by
this Generator:
- EArchCommonObjPciConfigSpaceInfo
This Generator requires the following Configuration Manager Object(s):
- EArchCommonObjMcfgPciConfigSpaceInfo (primary, preferred)
- EArchCommonObjPciConfigSpaceInfo (secondary, for backward compatibility)
*/
#pragma pack(1)
@@ -56,6 +57,14 @@ GET_OBJECT_LIST (
CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO
);
/** Retrieve the MCFG PCI Configuration Space Information.
*/
GET_OBJECT_LIST (
EObjNameSpaceArchCommon,
EArchCommonObjMcfgPciConfigSpaceInfo,
CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO
);
/** Add the PCI Enhanced Configuration Space Information to the MCFG Table.
@param [in] Mcfg Pointer to MCFG Table.
@@ -154,12 +163,22 @@ BuildMcfgTable (
}
*Table = NULL;
Status = GetEArchCommonObjPciConfigSpaceInfo (
Status = GetEArchCommonObjMcfgPciConfigSpaceInfo (
CfgMgrProtocol,
CM_NULL_TOKEN,
&PciConfigSpaceInfoList,
&ConfigurationSpaceCount
);
if (Status == EFI_NOT_FOUND) {
// Fallback to the older object if the new one is not found.
Status = GetEArchCommonObjPciConfigSpaceInfo (
CfgMgrProtocol,
CM_NULL_TOKEN,
&PciConfigSpaceInfoList,
&ConfigurationSpaceCount
);
}
if (EFI_ERROR (Status)) {
DEBUG ((
DEBUG_ERROR,

View File

@@ -184,7 +184,8 @@ STATIC CONST CM_OBJ_PARSER CmArmGenericWatchdogInfoParser[] = {
{ "Flags", 4, "0x%x", NULL }
};
/** A parser for EArchCommonObjPciConfigSpaceInfo.
/** A parser for EArchCommonObjPciConfigSpaceInfo or
EArchCommonObjMcfgPciConfigSpaceInfo.
*/
STATIC CONST CM_OBJ_PARSER CmArchCommonPciConfigSpaceInfoParser[] = {
{ "BaseAddress", 8, "0x%llx", NULL },
@@ -930,6 +931,7 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArchCommonNamespaceObjectParser[] = {
CM_PARSER_ADD_OBJECT (EArchCommonObjMemoryLatBwInfo, CmArchCommonMemoryLatBwInfo),
CM_PARSER_ADD_OBJECT (EArchCommonObjMemoryCacheInfo, CmArchCommonMemoryCacheInfo),
CM_PARSER_ADD_OBJECT (EArchCommonObjSpcrInfo, CmArchCommonObjSpcrInfoParser),
CM_PARSER_ADD_OBJECT (EArchCommonObjMcfgPciConfigSpaceInfo, CmArchCommonPciConfigSpaceInfoParser),
CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)
};