diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2016-04-18 14:34:18 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2016-04-20 15:31:18 +0200 |
commit | 318e2ac974e4f02e75fcfe9772b90de3dbe01327 (patch) | |
tree | d9331813d71a457f99e4bae87e83cbf476b1184d /src/vendorcode/amd/cimx/sb900 | |
parent | 0793afe913a78990b1f4b3fff037eae5365f1078 (diff) | |
download | coreboot-318e2ac974e4f02e75fcfe9772b90de3dbe01327.tar.xz |
AMD CIMX: Drop unused code
We never define B1_IMAGE or B2_IMAGE. These are about building
CIMx as separate binary modules, while coreboot builds these into
same romstage or ramstage module.
Change-Id: I9cfa3f0bff8332aff4b661d56d0e7b340a992992
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/14393
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Kerry Sheh <shekairui@gmail.com>
Diffstat (limited to 'src/vendorcode/amd/cimx/sb900')
-rw-r--r-- | src/vendorcode/amd/cimx/sb900/Dispatcher.c | 90 | ||||
-rw-r--r-- | src/vendorcode/amd/cimx/sb900/SbMain.c | 4 |
2 files changed, 0 insertions, 94 deletions
diff --git a/src/vendorcode/amd/cimx/sb900/Dispatcher.c b/src/vendorcode/amd/cimx/sb900/Dispatcher.c index 49523134c1..ac1b517e64 100644 --- a/src/vendorcode/amd/cimx/sb900/Dispatcher.c +++ b/src/vendorcode/amd/cimx/sb900/Dispatcher.c @@ -60,8 +60,6 @@ // VOID saveConfigPointer (IN AMDSBCFG* pConfig); -VOID* VerifyImage (IN UINT64 Signature, IN VOID* ImagePtr); -VOID* LocateImage (IN UINT64 Signature); /*---------------------------------------------------------------------------------------- * T Y P E D E F S A N D S T R U C T U R E S @@ -89,12 +87,6 @@ AmdSbDispatcher ( AGESA_STATUS Status; UINT64 tdValue; -#ifdef B1_IMAGE - VOID *pAltImagePtr; - CIM_IMAGE_ENTRY AltImageEntry; - - pAltImagePtr = NULL; -#endif Status = AGESA_UNSUPPORTED; tdValue = 0x313141324E4448ull; @@ -106,29 +98,12 @@ AmdSbDispatcher ( Status = AGESA_UNSUPPORTED; TRACE ((DMSG_SB_TRACE, "CIM - Hudson-2 Entry\n")); -#ifdef B1_IMAGE - if ((UINT32) (UINTN) (((AMD_CONFIG_PARAMS*)pConfig)->AltImageBasePtr) != 0xffffffff ) { - if ( ((AMD_CONFIG_PARAMS*)pConfig)->AltImageBasePtr ) { - pAltImagePtr = VerifyImage ( tdValue, (VOID*) (UINTN) ((AMD_CONFIG_PARAMS*)pConfig)->AltImageBasePtr); - } - if ( pAltImagePtr == NULL ) { - pAltImagePtr = LocateImage ( tdValue ); - } - if ( pAltImagePtr != NULL ) { - ((AMD_CONFIG_PARAMS*)pConfig)->ImageBasePtr = (UINT32) (UINTN) pAltImagePtr; - AltImageEntry = (CIM_IMAGE_ENTRY) (UINTN) ((UINT32) (UINTN) pAltImagePtr + (UINT32) (((AMD_IMAGE_HEADER*) (UINTN) pAltImagePtr)->EntryPointAddress)); - (*AltImageEntry) (pConfig); - return Status; - } - } -#endif saveConfigPointer (pConfig); if ( ((AMD_CONFIG_PARAMS*)pConfig)->Func == SB_POWERON_INIT ) { sbPowerOnInit ((AMDSBCFG*) pConfig); } -#ifndef B1_IMAGE if ( ((AMD_CONFIG_PARAMS*)pConfig)->Func == SB_BEFORE_PCI_INIT ) { sbBeforePciInit ((AMDSBCFG*)pConfig); } @@ -164,76 +139,11 @@ AmdSbDispatcher ( if ( ((AMD_CONFIG_PARAMS*)pConfig)->Func == SB_EC_FANCONTROL ) { sbECfancontrolservice ((AMDSBCFG*)pConfig); } -#endif TRACE ((DMSG_SB_TRACE, "CIMx - SB Exit\n")); return Status; } /** - * LocateImage - Locate Southbridge CIMx module - * - * - * - * @param[in] Signature Southbridge CIMx image signature. - * - */ -VOID* -LocateImage ( - IN UINT64 Signature - ) -{ - VOID *Result; - UINT32 ImagePtr; - ImagePtr = 0xffffffff - (IMAGE_ALIGN - 1); - - while ( ImagePtr >= (0xfffffff - (NUM_IMAGE_LOCATION * IMAGE_ALIGN - 1)) ) { -#ifdef x64 - 12346789 -#else - Result = VerifyImage (Signature, (VOID*) (intptr_t) ImagePtr); -#endif - if ( Result != NULL ) { - return Result; - } - ImagePtr -= IMAGE_ALIGN; - } - return NULL; -} - -/** - * VerifyImage - Verify Southbridge CIMx module - * - * - * @param[in] Signature Southbridge CIMx image signature. - * @param[in] ImagePtr Southbridge CIMx image address. - * - */ -VOID* -VerifyImage ( - IN UINT64 Signature, - IN VOID* ImagePtr - ) -{ - UINT16 *TempImagePtr; - UINT16 Sum; - UINT32 i; - Sum = 0; -// if ( (*((UINT32*)ImagePtr) == 'DMA$' && ((CIMFILEHEADER*)ImagePtr)->CreatorID == Signature) ) { - if ( (*((UINT32*)ImagePtr) == Int32FromChar('D', 'M', 'A', '$') && ((CIMFILEHEADER*)ImagePtr)->CreatorID == Signature) ) { - //GetImage Image size - TempImagePtr = (UINT16*)ImagePtr; - for ( i = 0; i < (((CIMFILEHEADER*)ImagePtr)->ImageSize); i += 2 ) { - Sum = Sum + *TempImagePtr; - TempImagePtr++; - } - if ( Sum == 0 ) { - return ImagePtr; - } - } - return NULL; -} - -/** * saveConfigPointer - Verify Southbridge CIMx module * * diff --git a/src/vendorcode/amd/cimx/sb900/SbMain.c b/src/vendorcode/amd/cimx/sb900/SbMain.c index 7c9dbbdff6..dc39a944db 100644 --- a/src/vendorcode/amd/cimx/sb900/SbMain.c +++ b/src/vendorcode/amd/cimx/sb900/SbMain.c @@ -44,8 +44,6 @@ #include "cbtypes.h" #include "AmdSbLib.h" -#ifndef B1_IMAGE - /*----------------------------------------------------------------------------------------*/ /** * sbBeforePciInit - Config Southbridge before PCI emulation @@ -263,8 +261,6 @@ sbSmmAcpiOn ( //RWMEM (0x20, AccWidthUint32, 0, 0); } -#endif - /*----------------------------------------------------------------------------------------*/ /** * Call Back routine. |