summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/amd/agesa/family12/fam12_callouts.c7
-rw-r--r--src/northbridge/amd/agesa/family12/fam12_callouts.h1
-rw-r--r--src/northbridge/amd/agesa/family14/fam14_callouts.c7
-rwxr-xr-xsrc/northbridge/amd/agesa/family14/fam14_callouts.h1
-rw-r--r--src/northbridge/amd/agesa/family15/fam15_callouts.c7
-rw-r--r--src/northbridge/amd/agesa/family15/fam15_callouts.h1
-rw-r--r--src/northbridge/amd/agesa/family15tn/fam15tn_callouts.c7
-rw-r--r--src/northbridge/amd/agesa/family15tn/fam15tn_callouts.h1
-rw-r--r--src/northbridge/amd/agesa/family16kb/fam16kb_callouts.c7
-rw-r--r--src/northbridge/amd/agesa/family16kb/fam16kb_callouts.h1
10 files changed, 40 insertions, 0 deletions
diff --git a/src/northbridge/amd/agesa/family12/fam12_callouts.c b/src/northbridge/amd/agesa/family12/fam12_callouts.c
index 491f3ce47b..1d55e9584b 100644
--- a/src/northbridge/amd/agesa/family12/fam12_callouts.c
+++ b/src/northbridge/amd/agesa/family12/fam12_callouts.c
@@ -27,6 +27,7 @@
#include "Hudson-2.h"
#include <cbmem.h>
#include <arch/acpi.h>
+#include <string.h>
UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader)
{
@@ -43,6 +44,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 BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
{
UINT32 AvailableHeapSize;
diff --git a/src/northbridge/amd/agesa/family12/fam12_callouts.h b/src/northbridge/amd/agesa/family12/fam12_callouts.h
index 387ff303ef..057234239f 100644
--- a/src/northbridge/amd/agesa/family12/fam12_callouts.h
+++ b/src/northbridge/amd/agesa/family12/fam12_callouts.h
@@ -39,6 +39,7 @@ typedef struct _BIOS_BUFFER_NODE {
} BIOS_BUFFER_NODE;
UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader);
+void EmptyHeap(void);
/* REQUIRED CALLOUTS
* AGESA ADVANCED CALLOUTS - CPU
diff --git a/src/northbridge/amd/agesa/family14/fam14_callouts.c b/src/northbridge/amd/agesa/family14/fam14_callouts.c
index 6a9830dd1e..301f145c29 100644
--- a/src/northbridge/amd/agesa/family14/fam14_callouts.c
+++ b/src/northbridge/amd/agesa/family14/fam14_callouts.c
@@ -25,6 +25,7 @@
#include "dimmSpd.h"
#include <cbmem.h>
#include <arch/acpi.h>
+#include <string.h>
UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader)
{
@@ -41,6 +42,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 BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
{
UINT32 AvailableHeapSize;
diff --git a/src/northbridge/amd/agesa/family14/fam14_callouts.h b/src/northbridge/amd/agesa/family14/fam14_callouts.h
index a1297f752b..1f23cef37f 100755
--- a/src/northbridge/amd/agesa/family14/fam14_callouts.h
+++ b/src/northbridge/amd/agesa/family14/fam14_callouts.h
@@ -40,6 +40,7 @@ typedef struct _BIOS_BUFFER_NODE {
} BIOS_BUFFER_NODE;
UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader);
+void EmptyHeap(void);
/* REQUIRED CALLOUTS
* AGESA ADVANCED CALLOUTS - CPU
diff --git a/src/northbridge/amd/agesa/family15/fam15_callouts.c b/src/northbridge/amd/agesa/family15/fam15_callouts.c
index 8f4722029f..fe7c3ed7c9 100644
--- a/src/northbridge/amd/agesa/family15/fam15_callouts.c
+++ b/src/northbridge/amd/agesa/family15/fam15_callouts.c
@@ -27,6 +27,7 @@
#include <arch/io.h>
#include <arch/acpi.h>
#include <cbmem.h>
+#include <string.h>
UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader)
{
@@ -43,6 +44,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 BiosAllocateBuffer (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
{
UINT32 AvailableHeapSize;
diff --git a/src/northbridge/amd/agesa/family15/fam15_callouts.h b/src/northbridge/amd/agesa/family15/fam15_callouts.h
index e5109f4ee0..a43c65092a 100644
--- a/src/northbridge/amd/agesa/family15/fam15_callouts.h
+++ b/src/northbridge/amd/agesa/family15/fam15_callouts.h
@@ -40,6 +40,7 @@ typedef struct _BIOS_BUFFER_NODE {
} BIOS_BUFFER_NODE;
UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader);
+void EmptyHeap(void);
/* REQUIRED CALLOUTS
* AGESA ADVANCED CALLOUTS - CPU
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);
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);