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:
committed by
pierregondois
parent
a60334ad59
commit
7fe3609022
@@ -72,6 +72,7 @@ typedef enum ArchCommonObjectID {
|
|||||||
EArchCommonObjMemoryCacheInfo, ///< 44 - Memory Cache Info
|
EArchCommonObjMemoryCacheInfo, ///< 44 - Memory Cache Info
|
||||||
EArchCommonObjSpcrInfo, ///< 45 - Serial Terminal and Interrupt Info
|
EArchCommonObjSpcrInfo, ///< 45 - Serial Terminal and Interrupt Info
|
||||||
EArchCommonObjTpm2DeviceInfo, ///< 46 - TPM2 Device Info
|
EArchCommonObjTpm2DeviceInfo, ///< 46 - TPM2 Device Info
|
||||||
|
EArchCommonObjMcfgPciConfigSpaceInfo, ///< 47 - MCFG PCI Configuration Space Info
|
||||||
EArchCommonObjMax
|
EArchCommonObjMax
|
||||||
} EARCH_COMMON_OBJECT_ID;
|
} EARCH_COMMON_OBJECT_ID;
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
MCFG Table Generator
|
MCFG Table Generator
|
||||||
|
|
||||||
Copyright (c) 2017 - 2019, ARM Limited. All rights reserved.
|
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
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
@par Reference(s):
|
@par Reference(s):
|
||||||
@@ -25,9 +26,9 @@
|
|||||||
/** ARM standard MCFG Generator
|
/** ARM standard MCFG Generator
|
||||||
|
|
||||||
Requirements:
|
Requirements:
|
||||||
The following Configuration Manager Object(s) are required by
|
This Generator requires the following Configuration Manager Object(s):
|
||||||
this Generator:
|
- EArchCommonObjMcfgPciConfigSpaceInfo (primary, preferred)
|
||||||
- EArchCommonObjPciConfigSpaceInfo
|
- EArchCommonObjPciConfigSpaceInfo (secondary, for backward compatibility)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
@@ -56,6 +57,14 @@ GET_OBJECT_LIST (
|
|||||||
CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO
|
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.
|
/** Add the PCI Enhanced Configuration Space Information to the MCFG Table.
|
||||||
|
|
||||||
@param [in] Mcfg Pointer to MCFG Table.
|
@param [in] Mcfg Pointer to MCFG Table.
|
||||||
@@ -154,12 +163,22 @@ BuildMcfgTable (
|
|||||||
}
|
}
|
||||||
|
|
||||||
*Table = NULL;
|
*Table = NULL;
|
||||||
|
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 (
|
Status = GetEArchCommonObjPciConfigSpaceInfo (
|
||||||
CfgMgrProtocol,
|
CfgMgrProtocol,
|
||||||
CM_NULL_TOKEN,
|
CM_NULL_TOKEN,
|
||||||
&PciConfigSpaceInfoList,
|
&PciConfigSpaceInfoList,
|
||||||
&ConfigurationSpaceCount
|
&ConfigurationSpaceCount
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((
|
DEBUG ((
|
||||||
DEBUG_ERROR,
|
DEBUG_ERROR,
|
||||||
|
|||||||
@@ -184,7 +184,8 @@ STATIC CONST CM_OBJ_PARSER CmArmGenericWatchdogInfoParser[] = {
|
|||||||
{ "Flags", 4, "0x%x", NULL }
|
{ "Flags", 4, "0x%x", NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
/** A parser for EArchCommonObjPciConfigSpaceInfo.
|
/** A parser for EArchCommonObjPciConfigSpaceInfo or
|
||||||
|
EArchCommonObjMcfgPciConfigSpaceInfo.
|
||||||
*/
|
*/
|
||||||
STATIC CONST CM_OBJ_PARSER CmArchCommonPciConfigSpaceInfoParser[] = {
|
STATIC CONST CM_OBJ_PARSER CmArchCommonPciConfigSpaceInfoParser[] = {
|
||||||
{ "BaseAddress", 8, "0x%llx", NULL },
|
{ "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 (EArchCommonObjMemoryLatBwInfo, CmArchCommonMemoryLatBwInfo),
|
||||||
CM_PARSER_ADD_OBJECT (EArchCommonObjMemoryCacheInfo, CmArchCommonMemoryCacheInfo),
|
CM_PARSER_ADD_OBJECT (EArchCommonObjMemoryCacheInfo, CmArchCommonMemoryCacheInfo),
|
||||||
CM_PARSER_ADD_OBJECT (EArchCommonObjSpcrInfo, CmArchCommonObjSpcrInfoParser),
|
CM_PARSER_ADD_OBJECT (EArchCommonObjSpcrInfo, CmArchCommonObjSpcrInfoParser),
|
||||||
|
CM_PARSER_ADD_OBJECT (EArchCommonObjMcfgPciConfigSpaceInfo, CmArchCommonPciConfigSpaceInfoParser),
|
||||||
CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)
|
CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user