diff options
author | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2014-11-09 11:43:59 +1100 |
---|---|---|
committer | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2014-11-10 08:01:21 +0100 |
commit | 3e570d4ca5c6eb11b6ece8c5c11b3f464129860b (patch) | |
tree | 467f526ba4adacae53d1a67f3648c4506927393f /src/vendorcode/amd/agesa | |
parent | c32b4a40d2356d2dd151f8420a181c28691ba34d (diff) | |
download | coreboot-3e570d4ca5c6eb11b6ece8c5c11b3f464129860b.tar.xz |
AGESA f14: Add "const" modifiers
Apply commit 283ba78415 to f14 (literally, plus one adaptation).
Change-Id: Ieea47470e5852ec8a46596ce23a2d18444618624
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/7361
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/vendorcode/amd/agesa')
6 files changed, 65 insertions, 66 deletions
diff --git a/src/vendorcode/amd/agesa/f14/AGESA.h b/src/vendorcode/amd/agesa/f14/AGESA.h index ba526a7e1f..a8ede95e7f 100644 --- a/src/vendorcode/amd/agesa/f14/AGESA.h +++ b/src/vendorcode/amd/agesa/f14/AGESA.h @@ -689,8 +689,8 @@ typedef struct { * @li @b Bit31 - last descriptor in topology */ IN UINT32 SocketId; ///< Socket Id - IN PCIe_PORT_DESCRIPTOR *PciePortList; ///< Pointer to array of PCIe port descriptors or NULL (Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST). - IN PCIe_DDI_DESCRIPTOR *DdiLinkList; ///< Pointer to array DDI link descriptors (Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST). + IN CONST PCIe_PORT_DESCRIPTOR *PciePortList; ///< Pointer to array of PCIe port descriptors or NULL (Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST). + IN CONST PCIe_DDI_DESCRIPTOR *DdiLinkList; ///< Pointer to array DDI link descriptors (Last element of array must be terminated with DESCRIPTOR_TERMINATE_LIST). IN VOID *Reserved; ///< Reserved for future use } PCIe_COMPLEX_DESCRIPTOR; diff --git a/src/vendorcode/amd/agesa/f14/Legacy/Proc/Dispatcher.c b/src/vendorcode/amd/agesa/f14/Legacy/Proc/Dispatcher.c index 577f3845eb..68d9e6fcd9 100644 --- a/src/vendorcode/amd/agesa/f14/Legacy/Proc/Dispatcher.c +++ b/src/vendorcode/amd/agesa/f14/Legacy/Proc/Dispatcher.c @@ -87,7 +87,7 @@ AmdAgesaDispatcher ( DISPATCH_TABLE *Entry; UINT32 ImageStart; UINT32 ImageEnd; - AMD_IMAGE_HEADER* AltImagePtr; + CONST AMD_IMAGE_HEADER* AltImagePtr; Status = AGESA_UNSUPPORTED; ImageEntry = NULL; diff --git a/src/vendorcode/amd/agesa/f14/Lib/amdlib.c b/src/vendorcode/amd/agesa/f14/Lib/amdlib.c index c1fa494642..963aa7e2e1 100644 --- a/src/vendorcode/amd/agesa/f14/Lib/amdlib.c +++ b/src/vendorcode/amd/agesa/f14/Lib/amdlib.c @@ -90,8 +90,8 @@ VOID STATIC LibAmdGetDataFromPtr ( IN ACCESS_WIDTH AccessWidth, - IN VOID *Data, - IN VOID *DataMask, + IN CONST VOID *Data, + IN CONST VOID *DataMask, OUT UINT32 *TemData, OUT UINT32 *TempDataMask ); @@ -508,7 +508,7 @@ VOID LibAmdIoWrite ( IN ACCESS_WIDTH AccessWidth, IN UINT16 IoAddress, - IN VOID *Value, + IN CONST VOID *Value, IN OUT AMD_CONFIG_PARAMS *StdHeader ) { @@ -546,8 +546,8 @@ VOID LibAmdIoRMW ( IN ACCESS_WIDTH AccessWidth, IN UINT16 IoAddress, - IN VOID *Data, - IN VOID *DataMask, + IN CONST VOID *Data, + IN CONST VOID *DataMask, IN OUT AMD_CONFIG_PARAMS *StdHeader ) { @@ -578,8 +578,8 @@ VOID LibAmdIoPoll ( IN ACCESS_WIDTH AccessWidth, IN UINT16 IoAddress, - IN VOID *Data, - IN VOID *DataMask, + IN CONST VOID *Data, + IN CONST VOID *DataMask, IN UINT64 Delay, IN OUT AMD_CONFIG_PARAMS *StdHeader ) @@ -645,7 +645,7 @@ VOID LibAmdMemWrite ( IN ACCESS_WIDTH AccessWidth, IN UINT64 MemAddress, - IN VOID *Value, + IN CONST VOID *Value, IN OUT AMD_CONFIG_PARAMS *StdHeader ) { @@ -683,8 +683,8 @@ VOID LibAmdMemRMW ( IN ACCESS_WIDTH AccessWidth, IN UINT64 MemAddress, - IN VOID *Data, - IN VOID *DataMask, + IN CONST VOID *Data, + IN CONST VOID *DataMask, IN OUT AMD_CONFIG_PARAMS *StdHeader ) { @@ -715,8 +715,8 @@ VOID LibAmdMemPoll ( IN ACCESS_WIDTH AccessWidth, IN UINT64 MemAddress, - IN VOID *Data, - IN VOID *DataMask, + IN CONST VOID *Data, + IN CONST VOID *DataMask, IN UINT64 Delay, IN OUT AMD_CONFIG_PARAMS *StdHeader ) @@ -794,7 +794,7 @@ VOID LibAmdPciWrite ( IN ACCESS_WIDTH AccessWidth, IN PCI_ADDR PciAddress, - IN VOID *Value, + IN CONST VOID *Value, IN OUT AMD_CONFIG_PARAMS *StdHeader ) { @@ -844,8 +844,8 @@ VOID LibAmdPciRMW ( IN ACCESS_WIDTH AccessWidth, IN PCI_ADDR PciAddress, - IN VOID *Data, - IN VOID *DataMask, + IN CONST VOID *Data, + IN CONST VOID *DataMask, IN OUT AMD_CONFIG_PARAMS *StdHeader ) { @@ -876,8 +876,8 @@ VOID LibAmdPciPoll ( IN ACCESS_WIDTH AccessWidth, IN PCI_ADDR PciAddress, - IN VOID *Data, - IN VOID *DataMask, + IN CONST VOID *Data, + IN CONST VOID *DataMask, IN UINT64 Delay, IN OUT AMD_CONFIG_PARAMS *StdHeader ) @@ -976,7 +976,7 @@ LibAmdPciWriteBits ( IN PCI_ADDR Address, IN UINT8 Highbit, IN UINT8 Lowbit, - IN UINT32 *Value, + IN CONST UINT32 *Value, IN AMD_CONFIG_PARAMS *StdHeader ) { @@ -1112,13 +1112,13 @@ LibAmdMemFill ( VOID LibAmdMemCopy ( IN VOID *Destination, - IN VOID *Source, + IN CONST VOID *Source, IN UINTN CopyLength, IN OUT AMD_CONFIG_PARAMS *StdHeader ) { UINT8 *Dest; - UINT8 *SourcePtr; + CONST UINT8 *SourcePtr; ASSERT (StdHeader != NULL); Dest = Destination; SourcePtr = Source; @@ -1138,7 +1138,7 @@ LibAmdMemCopy ( */ BOOLEAN LibAmdVerifyImageChecksum ( - IN VOID *ImagePtr + IN CONST VOID *ImagePtr ) { // Assume ImagePtr points to the binary start ($AMD) @@ -1175,19 +1175,19 @@ LibAmdVerifyImageChecksum ( * @retval NULL if image not found * @retval pointer to image header */ -VOID * +CONST VOID * LibAmdLocateImage ( - IN VOID *StartAddress, - IN VOID *EndAddress, + IN CONST VOID *StartAddress, + IN CONST VOID *EndAddress, IN UINT32 Alignment, - IN CHAR8 ModuleSignature[8] + IN CONST CHAR8 ModuleSignature[8] ) { - UINT8 *CurrentPtr; + CONST UINT8 *CurrentPtr; AMD_MODULE_HEADER *ModuleHeaderPtr; - UINT64 *SearchStr; - UINT64 *InputStr; + CONST UINT64 *SearchStr; + CONST UINT64 *InputStr; CurrentPtr = StartAddress; InputStr = (UINT64 *)ModuleSignature; @@ -1252,8 +1252,8 @@ VOID STATIC LibAmdGetDataFromPtr ( IN ACCESS_WIDTH AccessWidth, - IN VOID *Data, - IN VOID *DataMask, + IN CONST VOID *Data, + IN CONST VOID *DataMask, OUT UINT32 *TemData, OUT UINT32 *TempDataMask ) diff --git a/src/vendorcode/amd/agesa/f14/Lib/amdlib.h b/src/vendorcode/amd/agesa/f14/Lib/amdlib.h index d31811f82c..17b2be933f 100644 --- a/src/vendorcode/amd/agesa/f14/Lib/amdlib.h +++ b/src/vendorcode/amd/agesa/f14/Lib/amdlib.h @@ -187,7 +187,7 @@ VOID LibAmdIoWrite ( IN ACCESS_WIDTH AccessWidth, IN UINT16 IoAddress, - IN VOID *Value, + IN CONST VOID *Value, IN OUT AMD_CONFIG_PARAMS *StdHeader ); @@ -195,8 +195,8 @@ VOID LibAmdIoRMW ( IN ACCESS_WIDTH AccessWidth, IN UINT16 IoAddress, - IN VOID *Data, - IN VOID *DataMask, + IN CONST VOID *Data, + IN CONST VOID *DataMask, IN OUT AMD_CONFIG_PARAMS *StdHeader ); @@ -204,8 +204,8 @@ VOID LibAmdIoPoll ( IN ACCESS_WIDTH AccessWidth, IN UINT16 IoAddress, - IN VOID *Data, - IN VOID *DataMask, + IN CONST VOID *Data, + IN CONST VOID *DataMask, IN UINT64 Delay, IN OUT AMD_CONFIG_PARAMS *StdHeader ); @@ -223,7 +223,7 @@ VOID LibAmdMemWrite ( IN ACCESS_WIDTH AccessWidth, IN UINT64 MemAddress, - IN VOID *Value, + IN CONST VOID *Value, IN OUT AMD_CONFIG_PARAMS *StdHeader ); @@ -231,8 +231,8 @@ VOID LibAmdMemRMW ( IN ACCESS_WIDTH AccessWidth, IN UINT64 MemAddress, - IN VOID *Data, - IN VOID *DataMask, + IN CONST VOID *Data, + IN CONST VOID *DataMask, IN OUT AMD_CONFIG_PARAMS *StdHeader ); @@ -240,8 +240,8 @@ VOID LibAmdMemPoll ( IN ACCESS_WIDTH AccessWidth, IN UINT64 MemAddress, - IN VOID *Data, - IN VOID *DataMask, + IN CONST VOID *Data, + IN CONST VOID *DataMask, IN UINT64 Delay, IN OUT AMD_CONFIG_PARAMS *StdHeader ); @@ -259,7 +259,7 @@ VOID LibAmdPciWrite ( IN ACCESS_WIDTH AccessWidth, IN PCI_ADDR PciAddress, - IN VOID *Value, + IN CONST VOID *Value, IN OUT AMD_CONFIG_PARAMS *StdHeader ); @@ -267,8 +267,8 @@ VOID LibAmdPciRMW ( IN ACCESS_WIDTH AccessWidth, IN PCI_ADDR PciAddress, - IN VOID *Data, - IN VOID *DataMask, + IN CONST VOID *Data, + IN CONST VOID *DataMask, IN OUT AMD_CONFIG_PARAMS *StdHeader ); @@ -276,8 +276,8 @@ VOID LibAmdPciPoll ( IN ACCESS_WIDTH AccessWidth, IN PCI_ADDR PciAddress, - IN VOID *Data, - IN VOID *DataMask, + IN CONST VOID *Data, + IN CONST VOID *DataMask, IN UINT64 Delay, IN OUT AMD_CONFIG_PARAMS *StdHeader ); @@ -296,7 +296,7 @@ LibAmdPciWriteBits ( IN PCI_ADDR Address, IN UINT8 Highbit, IN UINT8 Lowbit, - IN UINT32 *Value, + IN CONST UINT32 *Value, IN AMD_CONFIG_PARAMS *StdHeader ); @@ -326,17 +326,17 @@ LibAmdMemFill ( VOID LibAmdMemCopy ( IN VOID *Destination, - IN VOID *Source, + IN CONST VOID *Source, IN UINTN CopyLength, IN OUT AMD_CONFIG_PARAMS *StdHeader ); -VOID * +CONST VOID * LibAmdLocateImage ( - IN VOID *StartAddress, - IN VOID *EndAddress, + IN CONST VOID *StartAddress, + IN CONST VOID *EndAddress, IN UINT32 Alignment, - IN CHAR8 ModuleSignature[8] + IN CONST CHAR8 ModuleSignature[8] ); UINT32 @@ -346,7 +346,7 @@ LibAmdGetPackageType ( BOOLEAN LibAmdVerifyImageChecksum ( - IN VOID *ImagePtr + IN CONST VOID *ImagePtr ); UINT8 diff --git a/src/vendorcode/amd/agesa/f14/Proc/GNB/Modules/GnbPcieConfig/PcieInputParser.c b/src/vendorcode/amd/agesa/f14/Proc/GNB/Modules/GnbPcieConfig/PcieInputParser.c index 468a80e55e..53d0705cfb 100644 --- a/src/vendorcode/amd/agesa/f14/Proc/GNB/Modules/GnbPcieConfig/PcieInputParser.c +++ b/src/vendorcode/amd/agesa/f14/Proc/GNB/Modules/GnbPcieConfig/PcieInputParser.c @@ -73,12 +73,12 @@ */ UINTN PcieInputParserGetLengthOfPcieEnginesList ( - IN PCIe_COMPLEX_DESCRIPTOR *Complex + IN CONST PCIe_COMPLEX_DESCRIPTOR *Complex ); UINTN PcieInputParserGetLengthOfDdiEnginesList ( - IN PCIe_COMPLEX_DESCRIPTOR *Complex + IN CONST PCIe_COMPLEX_DESCRIPTOR *Complex ); @@ -94,7 +94,7 @@ PcieInputParserGetLengthOfDdiEnginesList ( */ UINTN PcieInputParserGetNumberOfComplexes ( - IN PCIe_COMPLEX_DESCRIPTOR *ComplexList + IN CONST PCIe_COMPLEX_DESCRIPTOR *ComplexList ) { UINTN Result; @@ -117,11 +117,11 @@ PcieInputParserGetNumberOfComplexes ( */ UINTN PcieInputParserGetLengthOfPcieEnginesList ( - IN PCIe_COMPLEX_DESCRIPTOR *Complex + IN CONST PCIe_COMPLEX_DESCRIPTOR *Complex ) { UINTN Result; - PCIe_PORT_DESCRIPTOR *PciePortList; + CONST PCIe_PORT_DESCRIPTOR *PciePortList; Result = 0; PciePortList = Complex->PciePortList; while (PciePortList != NULL) { @@ -142,11 +142,11 @@ PcieInputParserGetLengthOfPcieEnginesList ( */ UINTN PcieInputParserGetLengthOfDdiEnginesList ( - IN PCIe_COMPLEX_DESCRIPTOR *Complex + IN CONST PCIe_COMPLEX_DESCRIPTOR *Complex ) { UINTN Result; - PCIe_DDI_DESCRIPTOR *DdiLinkList; + CONST PCIe_DDI_DESCRIPTOR *DdiLinkList; Result = 0; DdiLinkList = Complex->DdiLinkList; while (DdiLinkList != NULL) { @@ -168,7 +168,7 @@ PcieInputParserGetLengthOfDdiEnginesList ( */ UINTN PcieInputParserGetNumberOfEngines ( - IN PCIe_COMPLEX_DESCRIPTOR *Complex + IN CONST PCIe_COMPLEX_DESCRIPTOR *Complex ) { UINTN Result; diff --git a/src/vendorcode/amd/agesa/f14/Proc/GNB/Modules/GnbPcieConfig/PcieInputParser.h b/src/vendorcode/amd/agesa/f14/Proc/GNB/Modules/GnbPcieConfig/PcieInputParser.h index 9890755262..3358ddf0eb 100644 --- a/src/vendorcode/amd/agesa/f14/Proc/GNB/Modules/GnbPcieConfig/PcieInputParser.h +++ b/src/vendorcode/amd/agesa/f14/Proc/GNB/Modules/GnbPcieConfig/PcieInputParser.h @@ -49,12 +49,12 @@ UINTN PcieInputParserGetNumberOfComplexes ( - IN PCIe_COMPLEX_DESCRIPTOR *ComplexList + IN CONST PCIe_COMPLEX_DESCRIPTOR *ComplexList ); UINTN PcieInputParserGetNumberOfEngines ( - IN PCIe_COMPLEX_DESCRIPTOR *Complex + IN CONST PCIe_COMPLEX_DESCRIPTOR *Complex ); @@ -72,4 +72,3 @@ PcieInputParserGetEngineDescriptor ( #endif - |