AGESA: Allow const PcieComplexList for OemCustomize
It's already implemented like this with binaryPI API header. That implementation is essentially the same with 'const' qualifier just being ignored in the build process for PI blob. For open-source AGESA build, work around -Werror=discarded-qualifier using a simple but ugly cast. Change-Id: Ib84eb9aa40f1f4442f7aeaa8c15f6f1cbc6ca295 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/21630 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marc Jones <marc@marcjonesconsulting.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
e52738b428
commit
e66e39059e
|
@ -1021,7 +1021,7 @@ typedef struct {
|
|||
|
||||
/// GNB configuration info
|
||||
typedef struct {
|
||||
IN PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL.
|
||||
IN const PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL.
|
||||
* Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST
|
||||
* Example of topology definition for single socket system:
|
||||
* @code
|
||||
|
|
|
@ -133,7 +133,14 @@ PcieConfigurationInit (
|
|||
PCIe_COMPLEX_DESCRIPTOR *PcieComplexList;
|
||||
AGESA_STATUS Status;
|
||||
EarlyParamsPtr = (AMD_EARLY_PARAMS *) StdHeader;
|
||||
PcieComplexList = PcieConfigProcessUserConfig (EarlyParamsPtr->GnbConfig.PcieComplexList, StdHeader);
|
||||
|
||||
/* FIXME: Intentionally discard qualifier const of
|
||||
* GnbConfig.PcieComplexList here.
|
||||
*/
|
||||
PcieComplexList = PcieConfigProcessUserConfig (
|
||||
(PCIe_COMPLEX_DESCRIPTOR *)EarlyParamsPtr->GnbConfig.PcieComplexList,
|
||||
StdHeader);
|
||||
|
||||
if (PcieComplexList == NULL) {
|
||||
return AGESA_FATAL;
|
||||
}
|
||||
|
|
|
@ -876,7 +876,7 @@ typedef struct {
|
|||
|
||||
/// GNB configuration info
|
||||
typedef struct {
|
||||
IN PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL.
|
||||
IN const PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL.
|
||||
* Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST
|
||||
* Example of topology definition for single socket system:
|
||||
* @code
|
||||
|
|
|
@ -123,7 +123,7 @@ PcieConfigurationInit (
|
|||
|
||||
IDS_HDT_CONSOLE (GNB_TRACE, "PcieConfigurationInit Enter\n");
|
||||
EarlyParamsPtr = (AMD_EARLY_PARAMS *) StdHeader;
|
||||
ComplexList = EarlyParamsPtr->GnbConfig.PcieComplexList;
|
||||
ComplexList = (PCIe_COMPLEX_DESCRIPTOR *)EarlyParamsPtr->GnbConfig.PcieComplexList;
|
||||
AgesaStatus = AGESA_SUCCESS;
|
||||
ComplexesDataLength = 0;
|
||||
NumberOfSockets = GnbGetNumberOfSockets (StdHeader);
|
||||
|
@ -381,4 +381,4 @@ PcieConfigDebugDump (
|
|||
SiliconList = PcieLibGetNextDescriptor (SiliconList);
|
||||
}
|
||||
IDS_HDT_CONSOLE (PCIE_MISC, "<-------------- PCIe Config End------------------>\n");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1144,7 +1144,7 @@ typedef struct {
|
|||
|
||||
/// GNB configuration info
|
||||
typedef struct {
|
||||
IN PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL.
|
||||
IN const PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL.
|
||||
* Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST
|
||||
* Example of topology definition for single socket system:
|
||||
* @code
|
||||
|
|
|
@ -1243,7 +1243,7 @@ typedef struct {
|
|||
|
||||
/// GNB configuration info
|
||||
typedef struct {
|
||||
IN PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL.
|
||||
IN const PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL.
|
||||
* Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST
|
||||
* Example of topology definition for single socket system:
|
||||
* @code
|
||||
|
|
|
@ -215,7 +215,14 @@ PcieConfigurationMap (
|
|||
IDS_HDT_CONSOLE (GNB_TRACE, "PcieConfigurationMap Enter\n");
|
||||
AgesaStatus = AGESA_SUCCESS;
|
||||
EarlyParamsPtr = (AMD_EARLY_PARAMS *) StdHeader;
|
||||
PcieComplexList = PcieConfigProcessUserConfig (EarlyParamsPtr->GnbConfig.PcieComplexList, StdHeader);
|
||||
|
||||
/* FIXME: Intentionally discard qualifier const of
|
||||
* GnbConfig.PcieComplexList here.
|
||||
*/
|
||||
PcieComplexList = PcieConfigProcessUserConfig (
|
||||
(PCIe_COMPLEX_DESCRIPTOR *)EarlyParamsPtr->GnbConfig.PcieComplexList,
|
||||
StdHeader);
|
||||
|
||||
GNB_DEBUG_CODE (
|
||||
if (PcieComplexList != NULL) {
|
||||
PcieUserConfigConfigDump (PcieComplexList);
|
||||
|
|
|
@ -1276,7 +1276,7 @@ typedef struct {
|
|||
|
||||
/// GNB configuration info
|
||||
typedef struct {
|
||||
IN PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL.
|
||||
IN const PCIe_COMPLEX_DESCRIPTOR *PcieComplexList; /**< Pointer to array of structures describe PCIe topology on each processor package or NULL.
|
||||
* Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST
|
||||
* Example of topology definition for single socket system:
|
||||
* @code
|
||||
|
|
|
@ -214,7 +214,14 @@ PcieConfigurationMap (
|
|||
IDS_HDT_CONSOLE (GNB_TRACE, "PcieConfigurationMap Enter\n");
|
||||
AgesaStatus = AGESA_SUCCESS;
|
||||
EarlyParamsPtr = (AMD_EARLY_PARAMS *) StdHeader;
|
||||
PcieComplexList = PcieConfigProcessUserConfig (EarlyParamsPtr->GnbConfig.PcieComplexList, StdHeader);
|
||||
|
||||
/* FIXME: Intentionally discard qualifier const of
|
||||
* GnbConfig.PcieComplexList here.
|
||||
*/
|
||||
PcieComplexList = PcieConfigProcessUserConfig (
|
||||
(PCIe_COMPLEX_DESCRIPTOR *)EarlyParamsPtr->GnbConfig.PcieComplexList,
|
||||
StdHeader);
|
||||
|
||||
GNB_DEBUG_CODE (
|
||||
if (PcieComplexList != NULL) {
|
||||
PcieUserConfigConfigDump (PcieComplexList);
|
||||
|
|
Loading…
Reference in New Issue