diff options
Diffstat (limited to 'src/vendorcode/amd/pi/00670F00/Proc/Fch')
3 files changed, 8 insertions, 99 deletions
diff --git a/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchCommonCfg.h b/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchCommonCfg.h index 46fa1a9bdb4c..cc080c768072 100644 --- a/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchCommonCfg.h +++ b/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchCommonCfg.h @@ -165,7 +165,7 @@ typedef struct _CODEC_ENTRY { /// typedef struct _CODEC_TBL_LIST { UINT32 CodecId; /// CodecID - Codec ID - CODEC_ENTRY* CodecTablePtr; /// CodecTablePtr - Codec table pointer + const CODEC_ENTRY* CodecTablePtr; /// CodecTablePtr - Codec table pointer } CODEC_TBL_LIST; /// @@ -234,12 +234,12 @@ typedef struct { /// /// AZOEMTBL - Azalia Controller OEM Codec Table Pointer /// - CODEC_TBL_LIST *AzaliaOemCodecTablePtr; /// AzaliaOemCodecTablePtr - Oem Azalia Codec Table Pointer + const CODEC_TBL_LIST *AzaliaOemCodecTablePtr; /// AzaliaOemCodecTablePtr - Oem Azalia Codec Table Pointer /// /// AZOEMFPTBL - Azalia Controller Front Panel OEM Table Pointer /// - VOID *AzaliaOemFpCodecTablePtr; /// AzaliaOemFpCodecTablePtr - Oem Front Panel Codec Table Pointer + const VOID *AzaliaOemFpCodecTablePtr; /// AzaliaOemFpCodecTablePtr - Oem Front Panel Codec Table Pointer } FCH_AZALIA; /// @@ -1475,15 +1475,15 @@ typedef struct _FCH_RESET_DATA_BLOCK { BOOLEAN FchOscout1ClkContinous; ///< FCH OSCOUT1_CLK Continous UINT8 LpcClockDriveStrength; ///< Lpc Clock Drive Strength FCH_PT Promontory; ///< Promontory structure - VOID* EarlyOemGpioTable; /// Pointer of Early OEM GPIO table + const VOID* EarlyOemGpioTable; /// Pointer of Early OEM GPIO table // VOID* OemSpiDeviceTable; /// Pointer of OEM Spi Device table } FCH_RESET_DATA_BLOCK; /// Private: FCH_DATA_BLOCK typedef struct _FCH_DATA_BLOCK { - FCH_RUNTIME FchRunTime; ///< FCH Run Time Parameters AMD_CONFIG_PARAMS *StdHeader; ///< Header structure + FCH_RUNTIME FchRunTime; ///< FCH Run Time Parameters FCH_ACPI HwAcpi; ///< ACPI structure FCH_AB Ab; ///< AB structure @@ -1505,7 +1505,7 @@ typedef struct _FCH_DATA_BLOCK { FCH_MISC Misc; ///< MISC structure FCH_IOMUX IoMux; ///< MISC structure FCH_PT Promontory; ///< Promontory structure - VOID* PostOemGpioTable; /// Pointer of Post OEM GPIO table + const VOID* PostOemGpioTable; /// Pointer of Post OEM GPIO table } FCH_DATA_BLOCK; #pragma pack (pop) diff --git a/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchLib.c b/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchLib.c index 5836e5c1763c..031027eedf8b 100644 --- a/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchLib.c +++ b/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchLib.c @@ -375,7 +375,7 @@ RwAlink ( WriteAlink ((FCH_AX_INDXP_REG38 | AccessType), Index & 0x1FFFFFFF, StdHeader); Index = FCH_AX_DATAP_REG3C | AccessType; } - WriteAlink (Index, ReadAlink (Index, StdHeader) & AndMask | OrMask, StdHeader); + WriteAlink (Index, (ReadAlink (Index, StdHeader) & AndMask) | OrMask, StdHeader); } @@ -669,4 +669,4 @@ ClearAllSmiStatus ( for ( Index = 0; Index < 20; Index++ ) { ACPIMMIO8 (0xfed80280 + Index) |= 0; } -}
\ No newline at end of file +} diff --git a/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchPeLib.c b/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchPeLib.c index 9cd0e295574b..c833a9f2a65c 100644 --- a/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchPeLib.c +++ b/src/vendorcode/amd/pi/00670F00/Proc/Fch/Common/FchPeLib.c @@ -579,94 +579,3 @@ FchGetScratchFuse ( return TempData64; } - -/*---------------------------------------------------------------------------------------*/ -/** - * Allocates space for a new buffer in the heap - * - * - * @param[in] Handle Buffer handle - * @param[in] Length Buffer length - * @param[in] StdHeader Standard configuration header - * - * @retval NULL Buffer allocation fail - * - */ - -VOID * -FchAllocateHeapBuffer ( - IN UINT32 Handle, - IN UINTN Length, - IN AMD_CONFIG_PARAMS *StdHeader - ) -{ - AGESA_STATUS Status; - ALLOCATE_HEAP_PARAMS AllocHeapParams; - - AllocHeapParams.RequestedBufferSize = (UINT32) Length; - AllocHeapParams.BufferHandle = Handle; - AllocHeapParams.Persist = HEAP_SYSTEM_MEM; - Status = HeapAllocateBuffer (&AllocHeapParams, StdHeader); - if (Status != AGESA_SUCCESS) { - return NULL; - } - return AllocHeapParams.BufferPtr; -} - - -/*---------------------------------------------------------------------------------------*/ -/** - * Allocates space for a new buffer in the heap and clear it - * - * - * @param[in] Handle Buffer handle - * @param[in] Length Buffer length - * @param[in] StdHeader Standard configuration header - * - * @retval NULL Buffer allocation fail - * - */ - -VOID * -FchAllocateHeapBufferAndClear ( - IN UINT32 Handle, - IN UINTN Length, - IN AMD_CONFIG_PARAMS *StdHeader - ) -{ - VOID *Buffer; - Buffer = FchAllocateHeapBuffer (Handle, Length, StdHeader); - if (Buffer != NULL) { - LibAmdMemFill (Buffer, 0x00, Length, StdHeader); - } - return Buffer; -} - -/*---------------------------------------------------------------------------------------*/ -/** - * Locates a previously allocated buffer on the heap. - * - * - * @param[in] Handle Buffer handle - * @param[in] StdHeader Standard configuration header - * - * @retval NULL Buffer handle not found - * - */ - -VOID * -MemLocateHeapBuffer ( - IN UINT32 Handle, - IN AMD_CONFIG_PARAMS *StdHeader - ) -{ - AGESA_STATUS Status; - LOCATE_HEAP_PTR LocHeapParams; - LocHeapParams.BufferHandle = Handle; - Status = HeapLocateBuffer (&LocHeapParams, StdHeader); - if (Status != AGESA_SUCCESS) { - return NULL; - } - return LocHeapParams.BufferPtr; -} - |