diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-05-02 14:13:37 +0300 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2014-05-05 08:53:50 +0200 |
commit | 088fd67a38c7030ef0e6434472d64a3607c29100 (patch) | |
tree | 3add215d2b0d6feb54db25d93f59043dc5c9bfc8 /src/northbridge/amd/agesa/family16kb | |
parent | 8ef30253e3f117275306a1f977fd42e0470f4f5a (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/northbridge/amd/agesa/family16kb')
-rw-r--r-- | src/northbridge/amd/agesa/family16kb/fam16kb_callouts.c | 7 | ||||
-rw-r--r-- | src/northbridge/amd/agesa/family16kb/fam16kb_callouts.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/northbridge/amd/agesa/family16kb/fam16kb_callouts.c b/src/northbridge/amd/agesa/family16kb/fam16kb_callouts.c index 8cc300c977..7dada18d10 100644 --- a/src/northbridge/amd/agesa/family16kb/fam16kb_callouts.c +++ b/src/northbridge/amd/agesa/family16kb/fam16kb_callouts.c @@ -28,6 +28,7 @@ #include "fam16kb_callouts.h" #include <cbmem.h> #include <arch/acpi.h> +#include <string.h> UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader) { @@ -44,6 +45,12 @@ UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader) return heap; } +void EmptyHeap(void) +{ + void *BiosManagerPtr = (void *) GetHeapBase(NULL); + memset(BiosManagerPtr, 0, BIOS_HEAP_SIZE); +} + AGESA_STATUS fam16kb_AllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr) { UINT32 AvailableHeapSize; diff --git a/src/northbridge/amd/agesa/family16kb/fam16kb_callouts.h b/src/northbridge/amd/agesa/family16kb/fam16kb_callouts.h index 3d4e9792dd..57dd5546e6 100644 --- a/src/northbridge/amd/agesa/family16kb/fam16kb_callouts.h +++ b/src/northbridge/amd/agesa/family16kb/fam16kb_callouts.h @@ -40,6 +40,7 @@ typedef struct _BIOS_BUFFER_NODE { } BIOS_BUFFER_NODE; UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader); +void EmptyHeap(void); AGESA_STATUS fam16kb_AllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr); AGESA_STATUS fam16kb_DeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr); |