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/sb700 | |
parent | 0793afe913a78990b1f4b3fff037eae5365f1078 (diff) |
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/sb700')
-rw-r--r-- | src/vendorcode/amd/cimx/sb700/DISPATCHER.c | 56 | ||||
-rw-r--r-- | src/vendorcode/amd/cimx/sb700/SBDEF.h | 2 | ||||
-rw-r--r-- | src/vendorcode/amd/cimx/sb700/SBMAIN.c | 4 |
3 files changed, 1 insertions, 61 deletions
diff --git a/src/vendorcode/amd/cimx/sb700/DISPATCHER.c b/src/vendorcode/amd/cimx/sb700/DISPATCHER.c index af0d45d7c0..920539d571 100644 --- a/src/vendorcode/amd/cimx/sb700/DISPATCHER.c +++ b/src/vendorcode/amd/cimx/sb700/DISPATCHER.c @@ -33,38 +33,17 @@ void DispatcherEntry(void *pConfig){ -#ifdef B1_IMAGE - void *pB2ImagePtr = NULL; - CIM_IMAGE_ENTRY pB2ImageEntry; -#endif - //#if CIM_DEBUG // InitSerialOut(); //#endif TRACE((DMSG_SB_TRACE, "CIM - SB700 Entry\n")); -#ifdef B1_IMAGE - if ((UINT32)(((STDCFG*)pConfig)->pB2ImageBase) != 0xffffffff){ - if (((STDCFG*)pConfig)->pB2ImageBase) - pB2ImagePtr = CheckImage('007S',(void*)((STDCFG*)pConfig)->pB2ImageBase); - if (pB2ImagePtr == NULL) - pB2ImagePtr = LocateImage('007S'); - if (pB2ImagePtr!=NULL){ - TRACE((DMSG_SB_TRACE, "CIM - SB700 Redirect to B2 Image\n")); - ((STDCFG*)pConfig)->pImageBase = (UINT32)pB2ImagePtr; - pB2ImageEntry = (CIM_IMAGE_ENTRY)(*((UINT32*)pB2ImagePtr+1) + (UINT32)pB2ImagePtr); - (*pB2ImageEntry)(pConfig); - return; - } - } -#endif saveConfigPointer(pConfig); if (((STDCFG*)pConfig)->Func == SB_POWERON_INIT) sbPowerOnInit((AMDSBCFG*)pConfig); -#ifndef B1_IMAGE if (((STDCFG*)pConfig)->Func == SB_BEFORE_PCI_INIT) sbBeforePciInit((AMDSBCFG*)pConfig); if (((STDCFG*)pConfig)->Func == SB_AFTER_PCI_INIT) @@ -81,43 +60,10 @@ void DispatcherEntry(void *pConfig){ } if (((STDCFG*)pConfig)->Func == SB_SMM_ACPION) sbSmmAcpiOn((AMDSBCFG*)pConfig); -#endif - TRACE((DMSG_SB_TRACE, "CIMx - SB Exit\n")); -} - - -void* LocateImage(UINT32 Signature){ - void *Result; - UINT8 *ImagePtr = (UINT8*)(0xffffffff - (IMAGE_ALIGN-1)); - while ((UINTN)ImagePtr>=(0xfffffff - (NUM_IMAGE_LOCATION*IMAGE_ALIGN -1))){ - Result = CheckImage(Signature,(void*)ImagePtr); - if (Result != NULL) - return Result; - ImagePtr -= IMAGE_ALIGN; - } - return NULL; -} - -void* CheckImage(UINT32 Signature, void* ImagePtr){ - UINT8 *TempImagePtr; - UINT8 Sum = 0; - UINT32 i; -// if ((*((UINT32*)ImagePtr) == 'ITA$' && ((CIMFILEHEADER*)ImagePtr)->ModuleLogo == Signature)){ - if ((*((UINT32*)ImagePtr) == Int32FromChar ('$', 'A', 'T', 'I')) && (((CIMFILEHEADER*)ImagePtr)->ModuleLogo == Signature)){ - //GetImage Image size - TempImagePtr = (UINT8*)ImagePtr; - for (i=0;i<(((CIMFILEHEADER*)ImagePtr)->ImageSize);i++){ - Sum += *TempImagePtr; - TempImagePtr++; - } - if (Sum == 0) - return ImagePtr; - } - return NULL; + TRACE((DMSG_SB_TRACE, "CIMx - SB Exit\n")); } - UINT32 GetPciebase(){ AMDSBCFG* Result; Result = getConfigPointer(); diff --git a/src/vendorcode/amd/cimx/sb700/SBDEF.h b/src/vendorcode/amd/cimx/sb700/SBDEF.h index 184584b808..5ffd34e7da 100644 --- a/src/vendorcode/amd/cimx/sb700/SBDEF.h +++ b/src/vendorcode/amd/cimx/sb700/SBDEF.h @@ -59,8 +59,6 @@ UINT32 IsFamily10(void); UINT64 ReadMSR(UINT32 Address); void WriteMSR(UINT32 Address,UINT64 Value); void RWMSR(UINT32 Address, UINT64 Mask, UINT64 Value); -void* LocateImage(UINT32 Signature); -void* CheckImage( UINT32 Signature, void* ImagePtr); void Stall(UINT32 uSec); void Reset(void); CIM_STATUS RWSMBUSBlock(UINT8 Controller, UINT8 Address, UINT8 Offset, UINT8 BufferSize, UINT8* BufferPrt); diff --git a/src/vendorcode/amd/cimx/sb700/SBMAIN.c b/src/vendorcode/amd/cimx/sb700/SBMAIN.c index 7468eb2d4c..45f08df7de 100644 --- a/src/vendorcode/amd/cimx/sb700/SBMAIN.c +++ b/src/vendorcode/amd/cimx/sb700/SBMAIN.c @@ -31,8 +31,6 @@ #include "Platform.h" -#ifndef B1_IMAGE - BUILDPARAM DfltStaticOptions={ BIOS_SIZE, // BIOS Size LEGACY_FREE, // Legacy Free Option @@ -285,5 +283,3 @@ UINT32 CallBackToOEM(UINT32 Func, UINTN Data,AMDSBCFG* pConfig){ TRACE((DMSG_SB_TRACE,"SB Hook Status [%x]\n",Result)); return Result; } - -#endif |