summaryrefslogtreecommitdiff
path: root/src/mainboard/tyan/s8226
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-05-02 14:13:37 +0300
committerPatrick Georgi <patrick@georgi-clan.de>2014-05-05 08:53:50 +0200
commit088fd67a38c7030ef0e6434472d64a3607c29100 (patch)
tree3add215d2b0d6feb54db25d93f59043dc5c9bfc8 /src/mainboard/tyan/s8226
parent8ef30253e3f117275306a1f977fd42e0470f4f5a (diff)
AGESA: Implement EmptyHeap()
Heap allocation begins with BIOS_HEAP_MANAGER, no need to clear the fields individually. Change-Id: Ia1af84bd09d1edf8f72223752557d44a96dec6e1 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/5659 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/mainboard/tyan/s8226')
-rw-r--r--src/mainboard/tyan/s8226/agesawrapper.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/mainboard/tyan/s8226/agesawrapper.c b/src/mainboard/tyan/s8226/agesawrapper.c
index 4cd8267b03..33a4a6af11 100644
--- a/src/mainboard/tyan/s8226/agesawrapper.c
+++ b/src/mainboard/tyan/s8226/agesawrapper.c
@@ -296,11 +296,8 @@ UINT32 agesawrapper_amdinitearly(VOID)
UINT32 agesawrapper_amdinitpost(VOID)
{
AGESA_STATUS status;
- UINT16 i;
- UINT32 *HeadPtr;
AMD_INTERFACE_PARAMS AmdParamStruct;
AMD_POST_PARAMS *PostParams;
- BIOS_HEAP_MANAGER *BiosManagerPtr;
UINT32 TscRateInMhz;
CPU_SPECIFIC_SERVICES *FamilySpecificServices;
@@ -328,15 +325,7 @@ UINT32 agesawrapper_amdinitpost(VOID)
AmdReleaseStruct(&AmdParamStruct);
/* Initialize heap space */
- BiosManagerPtr = (BIOS_HEAP_MANAGER *)GetHeapBase(&AmdParamStruct.StdHeader);
-
- HeadPtr = (UINT32 *) ((UINT8 *) BiosManagerPtr + sizeof(BIOS_HEAP_MANAGER));
- for (i = 0; i < ((BIOS_HEAP_SIZE/4) - (sizeof(BIOS_HEAP_MANAGER)/4)); i++) {
- *HeadPtr = 0x00000000;
- HeadPtr++;
- }
- BiosManagerPtr->StartOfAllocatedNodes = 0;
- BiosManagerPtr->StartOfFreedNodes = 0;
+ EmptyHeap();
GetCpuServicesOfCurrentCore ((CONST CPU_SPECIFIC_SERVICES **)&FamilySpecificServices, &AmdParamStruct.StdHeader);
FamilySpecificServices->GetTscRate (FamilySpecificServices, &TscRateInMhz, &AmdParamStruct.StdHeader);