summaryrefslogtreecommitdiff
path: root/src/vendorcode/amd/cimx/sb800
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2016-04-18 14:34:18 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2016-04-20 15:31:18 +0200
commit318e2ac974e4f02e75fcfe9772b90de3dbe01327 (patch)
treed9331813d71a457f99e4bae87e83cbf476b1184d /src/vendorcode/amd/cimx/sb800
parent0793afe913a78990b1f4b3fff037eae5365f1078 (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/sb800')
-rw-r--r--src/vendorcode/amd/cimx/sb800/DISPATCHER.c87
-rw-r--r--src/vendorcode/amd/cimx/sb800/SBMAIN.c4
2 files changed, 0 insertions, 91 deletions
diff --git a/src/vendorcode/amd/cimx/sb800/DISPATCHER.c b/src/vendorcode/amd/cimx/sb800/DISPATCHER.c
index 8b35047aaf..1c86c5810a 100644
--- a/src/vendorcode/amd/cimx/sb800/DISPATCHER.c
+++ b/src/vendorcode/amd/cimx/sb800/DISPATCHER.c
@@ -62,8 +62,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
@@ -90,42 +88,17 @@ AmdSbDispatcher (
{
AGESA_STATUS Status;
-#ifdef B1_IMAGE
- VOID *pAltImagePtr;
- CIM_IMAGE_ENTRY AltImageEntry;
-#endif
-
UINT64 tdValue;
tdValue = 0x32314130384253ULL;
-#ifdef B1_IMAGE
- pAltImagePtr = NULL;
-#endif
Status = AGESA_UNSUPPORTED;
-#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);
}
@@ -161,70 +134,10 @@ AmdSbDispatcher (
if ( ((AMD_CONFIG_PARAMS*)pConfig)->Func == SB_EC_FANCONTROL ) {
sbECfancontrolservice((AMDSBCFG*)pConfig);
}
-#endif
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)) ) {
- Result = VerifyImage (Signature, (VOID*)(UINTN)ImagePtr);
- 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) == Int32FromChar('$', 'A', 'M', 'D') && ((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/sb800/SBMAIN.c b/src/vendorcode/amd/cimx/sb800/SBMAIN.c
index a494d3033b..0e10a2a57c 100644
--- a/src/vendorcode/amd/cimx/sb800/SBMAIN.c
+++ b/src/vendorcode/amd/cimx/sb800/SBMAIN.c
@@ -46,8 +46,6 @@
#include "SBPLATFORM.h"
#include "cbtypes.h"
-#ifndef B1_IMAGE
-
/*----------------------------------------------------------------------------------------*/
/**
* sbBeforePciInit - Config Southbridge before PCI emulation
@@ -228,8 +226,6 @@ sbSmmAcpiOn (
RWMEM (ACPI_MMIO_BASE + SMI_BASE + SB_SMI_REGAC, AccWidthUint8, ~(BIT6 + BIT7), 0);
}
-#endif
-
/*----------------------------------------------------------------------------------------*/
/**
* Call Back routine.