summaryrefslogtreecommitdiff
path: root/src/northbridge/amd/agesa/family15tn
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge/amd/agesa/family15tn')
-rw-r--r--src/northbridge/amd/agesa/family15tn/fam15tn_callouts.c7
-rw-r--r--src/northbridge/amd/agesa/family15tn/fam15tn_callouts.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/northbridge/amd/agesa/family15tn/fam15tn_callouts.c b/src/northbridge/amd/agesa/family15tn/fam15tn_callouts.c
index 2bc3b37ba6..5f14e82a56 100644
--- a/src/northbridge/amd/agesa/family15tn/fam15tn_callouts.c
+++ b/src/northbridge/amd/agesa/family15tn/fam15tn_callouts.c
@@ -28,6 +28,7 @@
#include "fam15tn_callouts.h"
#include <cbmem.h>
#include <arch/acpi.h>
+#include <string.h>
#define AGESA_RUNTIME_SIZE 4096
@@ -66,6 +67,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 fam15tn_AllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
{
UINT32 AvailableHeapSize;
diff --git a/src/northbridge/amd/agesa/family15tn/fam15tn_callouts.h b/src/northbridge/amd/agesa/family15tn/fam15tn_callouts.h
index 2392570a8b..0070e6f570 100644
--- a/src/northbridge/amd/agesa/family15tn/fam15tn_callouts.h
+++ b/src/northbridge/amd/agesa/family15tn/fam15tn_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 fam15tn_AllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
AGESA_STATUS fam15tn_DeallocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr);