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>
This commit is contained in:
committed by
Patrick Georgi
parent
8ef30253e3
commit
088fd67a38
@@ -392,10 +392,7 @@ agesawrapper_amdinitpost (
|
||||
)
|
||||
{
|
||||
AGESA_STATUS status;
|
||||
UINT16 i;
|
||||
UINT32 *HeadPtr;
|
||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
||||
BIOS_HEAP_MANAGER *BiosManagerPtr;
|
||||
|
||||
LibAmdMemFill (&AmdParamStruct,
|
||||
0,
|
||||
@@ -419,16 +416,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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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,8 @@ agesawrapper_amdinitpost (
|
||||
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(PostParams->StdHeader.HeapStatus);
|
||||
AmdReleaseStruct (&AmdParamStruct);
|
||||
/* Initialize heap space */
|
||||
BiosManagerPtr = (BIOS_HEAP_MANAGER *)GetHeapBase(&AmdParamStruct.StdHeader);
|
||||
EmptyHeap();
|
||||
|
||||
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;
|
||||
|
||||
return (UINT32)status;
|
||||
}
|
||||
|
@@ -228,10 +228,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));
|
||||
|
||||
@@ -248,15 +245,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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -250,11 +250,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,
|
||||
@@ -274,16 +271,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;
|
||||
}
|
||||
|
@@ -368,10 +368,7 @@ agesawrapper_amdinitpost (
|
||||
)
|
||||
{
|
||||
AGESA_STATUS status;
|
||||
UINT16 i;
|
||||
UINT32 *HeadPtr;
|
||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
||||
BIOS_HEAP_MANAGER *BiosManagerPtr;
|
||||
|
||||
LibAmdMemFill (&AmdParamStruct,
|
||||
0,
|
||||
@@ -391,16 +388,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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -243,11 +243,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,
|
||||
@@ -267,16 +264,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;
|
||||
}
|
||||
|
@@ -229,10 +229,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));
|
||||
|
||||
@@ -249,15 +246,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;
|
||||
}
|
||||
|
@@ -234,11 +234,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,
|
||||
@@ -258,16 +255,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;
|
||||
}
|
||||
|
@@ -182,10 +182,7 @@ AGESA_STATUS agesawrapper_amdinitearly(void)
|
||||
AGESA_STATUS agesawrapper_amdinitpost(void)
|
||||
{
|
||||
AGESA_STATUS status;
|
||||
uint16_t i;
|
||||
uint32_t *HeadPtr;
|
||||
AMD_INTERFACE_PARAMS AmdParamStruct;
|
||||
BIOS_HEAP_MANAGER *BiosManagerPtr;
|
||||
|
||||
memset(&AmdParamStruct, 0, sizeof(AMD_INTERFACE_PARAMS));
|
||||
|
||||
@@ -202,15 +199,7 @@ AGESA_STATUS agesawrapper_amdinitpost(void)
|
||||
AmdReleaseStruct (&AmdParamStruct);
|
||||
|
||||
/* Initialize heap space */
|
||||
BiosManagerPtr = (BIOS_HEAP_MANAGER *)GetHeapBase(&AmdParamStruct.StdHeader);
|
||||
|
||||
HeadPtr = (uint32_t *) ((uint8_t *) 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 status;
|
||||
}
|
||||
|
@@ -228,10 +228,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));
|
||||
|
||||
@@ -248,15 +245,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;
|
||||
}
|
||||
|
@@ -228,10 +228,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));
|
||||
|
||||
@@ -248,15 +245,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;
|
||||
}
|
||||
|
@@ -286,11 +286,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;
|
||||
|
||||
@@ -318,15 +315,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);
|
||||
|
@@ -286,11 +286,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;
|
||||
|
||||
@@ -318,15 +315,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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user