summaryrefslogtreecommitdiff
path: root/src/mainboard/asrock
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/asrock')
-rw-r--r--src/mainboard/asrock/e350m1/agesawrapper.c13
-rw-r--r--src/mainboard/asrock/imb-a180/agesawrapper.c14
2 files changed, 2 insertions, 25 deletions
diff --git a/src/mainboard/asrock/e350m1/agesawrapper.c b/src/mainboard/asrock/e350m1/agesawrapper.c
index 2ad068d135..6e47880fbb 100644
--- a/src/mainboard/asrock/e350m1/agesawrapper.c
+++ b/src/mainboard/asrock/e350m1/agesawrapper.c
@@ -239,10 +239,7 @@ agesawrapper_amdinitpost (
)
{
AGESA_STATUS status;
- UINT16 i;
- UINT32 *HeadPtr;
AMD_INTERFACE_PARAMS AmdParamStruct;
- BIOS_HEAP_MANAGER *BiosManagerPtr;
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
@@ -259,15 +256,7 @@ agesawrapper_amdinitpost (
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();
return (UINT32)status;
}
diff --git a/src/mainboard/asrock/imb-a180/agesawrapper.c b/src/mainboard/asrock/imb-a180/agesawrapper.c
index 7fbe37eea4..4e9e77ba8d 100644
--- a/src/mainboard/asrock/imb-a180/agesawrapper.c
+++ b/src/mainboard/asrock/imb-a180/agesawrapper.c
@@ -252,11 +252,8 @@ agesawrapper_amdinitpost (
)
{
AGESA_STATUS status;
- UINT16 i;
- UINT32 *HeadPtr;
AMD_INTERFACE_PARAMS AmdParamStruct;
AMD_POST_PARAMS *PostParams;
- BIOS_HEAP_MANAGER *BiosManagerPtr;
LibAmdMemFill (&AmdParamStruct,
0,
@@ -276,16 +273,7 @@ agesawrapper_amdinitpost (
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(PostParams->StdHeader.HeapStatus);
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();
return (UINT32)status;
}