summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/amd/pi/BiosCallOuts.h24
-rw-r--r--src/northbridge/amd/pi/agesawrapper.h8
-rw-r--r--src/northbridge/amd/pi/def_callouts.c6
3 files changed, 13 insertions, 25 deletions
diff --git a/src/northbridge/amd/pi/BiosCallOuts.h b/src/northbridge/amd/pi/BiosCallOuts.h
index 754cc1faf9..238557823e 100644
--- a/src/northbridge/amd/pi/BiosCallOuts.h
+++ b/src/northbridge/amd/pi/BiosCallOuts.h
@@ -20,29 +20,6 @@
#include "Porting.h"
#include "AGESA.h"
-#define BIOS_HEAP_START_ADDRESS 0x010000000
-#define BIOS_HEAP_SIZE 0x30000
-#define BSP_STACK_BASE_ADDR 0x30000
-
-typedef struct _BIOS_HEAP_MANAGER {
- UINT32 StartOfAllocatedNodes;
- UINT32 StartOfFreedNodes;
-} BIOS_HEAP_MANAGER;
-
-typedef struct _BIOS_BUFFER_NODE {
- UINT32 BufferHandle;
- UINT32 BufferSize;
- UINT32 NextNodeOffset;
-} BIOS_BUFFER_NODE;
-
-UINT32 GetHeapBase(AMD_CONFIG_PARAMS *StdHeader);
-void EmptyHeap(void);
-
-
-AGESA_STATUS agesa_AllocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr);
-AGESA_STATUS agesa_DeallocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr);
-AGESA_STATUS agesa_LocateBuffer (UINT32 Func, UINTN Data, VOID *ConfigPtr);
-
AGESA_STATUS agesa_NoopUnsupported (UINT32 Func, UINTN Data, VOID *ConfigPtr);
AGESA_STATUS agesa_NoopSuccess (UINT32 Func, UINTN Data, VOID *ConfigPtr);
AGESA_STATUS agesa_EmptyIdsInitData (UINT32 Func, UINTN Data, VOID *ConfigPtr);
@@ -53,6 +30,7 @@ AGESA_STATUS agesa_GfxGetVbiosImage(UINT32 Func, UINTN FchData, VOID *ConfigPrt)
AGESA_STATUS agesa_ReadSpd (UINT32 Func, UINTN Data, VOID *ConfigPtr);
AGESA_STATUS agesa_ReadSpd_from_cbfs(UINT32 Func, UINTN Data, VOID *ConfigPtr);
+AGESA_STATUS HeapManagerCallout (UINT32 Func, UINTN Data, VOID *ConfigPtr);
AGESA_STATUS GetBiosCallout (UINT32 Func, UINTN Data, VOID *ConfigPtr);
typedef struct {
diff --git a/src/northbridge/amd/pi/agesawrapper.h b/src/northbridge/amd/pi/agesawrapper.h
index e2a3324b3a..a6a05bb8b1 100644
--- a/src/northbridge/amd/pi/agesawrapper.h
+++ b/src/northbridge/amd/pi/agesawrapper.h
@@ -49,10 +49,14 @@ AGESA_STATUS agesawrapper_fchs3earlyrestore(void);
AGESA_STATUS agesawrapper_fchs3laterestore(void);
VOID OemCustomizeInitEarly (IN OUT AMD_EARLY_PARAMS *InitEarly);
-VOID amd_initcpuio(void);
-VOID amd_initmmio(void);
const void *agesawrapper_locate_module (const CHAR8 name[8]);
void OemPostParams(AMD_POST_PARAMS *PostParams);
+/* TBD: use agesa_helper.h: */
+void amd_initcpuio(void);
+void amd_initmmio(void);
+void *GetHeapBase(void);
+void EmptyHeap(void);
+
#endif /* _AGESAWRAPPER_H_ */
diff --git a/src/northbridge/amd/pi/def_callouts.c b/src/northbridge/amd/pi/def_callouts.c
index cddf8d5a88..00982e7cfd 100644
--- a/src/northbridge/amd/pi/def_callouts.c
+++ b/src/northbridge/amd/pi/def_callouts.c
@@ -26,8 +26,14 @@
AGESA_STATUS GetBiosCallout (UINT32 Func, UINTN Data, VOID *ConfigPtr)
{
+ AGESA_STATUS status;
UINTN i;
+ /* One HeapManager serves them all. */
+ status = HeapManagerCallout(Func, Data, ConfigPtr);
+ if (status != AGESA_UNSUPPORTED)
+ return status;
+
for (i = 0; i < BiosCalloutsLen; i++) {
if (BiosCallouts[i].CalloutName == Func)
break;