coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
heapmanager.c File Reference
#include <amdblocks/agesawrapper.h>
#include <amdblocks/BiosCallOuts.h>
#include <cbmem.h>
#include <string.h>
Include dependency graph for heapmanager.c:

Go to the source code of this file.

Functions

static voidagesa_heap_base (void)
 
static void EmptyHeap (int unused)
 
AGESA_STATUS agesa_GetTempHeapBase (uint32_t Func, uintptr_t Data, void *ConfigPtr)
 
AGESA_STATUS agesa_HeapRebase (uint32_t Func, uintptr_t Data, void *ConfigPtr)
 
static AGESA_STATUS FindAllocatedNode (uint32_t handle, BIOS_BUFFER_NODE **last_allocd_or_match)
 
static void ConcatenateNodes (BIOS_BUFFER_NODE *FirstNodePtr, BIOS_BUFFER_NODE *SecondNodePtr)
 
AGESA_STATUS agesa_AllocateBuffer (uint32_t Func, uintptr_t Data, void *ConfigPtr)
 
AGESA_STATUS agesa_DeallocateBuffer (uint32_t Func, uintptr_t Data, void *ConfigPtr)
 
AGESA_STATUS agesa_LocateBuffer (uint32_t Func, uintptr_t Data, void *ConfigPtr)
 

Function Documentation

◆ agesa_AllocateBuffer()

◆ agesa_DeallocateBuffer()

◆ agesa_GetTempHeapBase()

AGESA_STATUS agesa_GetTempHeapBase ( uint32_t  Func,
uintptr_t  Data,
void ConfigPtr 
)

Definition at line 34 of file heapmanager.c.

References AGESA_SUCCESS.

◆ agesa_heap_base()

static void* agesa_heap_base ( void  )
static

Definition at line 8 of file heapmanager.c.

References BIOS_HEAP_SIZE, cbmem_add(), and CBMEM_ID_RESUME_SCRATCH.

Referenced by agesa_AllocateBuffer(), agesa_DeallocateBuffer(), agesa_HeapRebase(), EmptyHeap(), and FindAllocatedNode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agesa_HeapRebase()

AGESA_STATUS agesa_HeapRebase ( uint32_t  Func,
uintptr_t  Data,
void ConfigPtr 
)

Definition at line 58 of file heapmanager.c.

References agesa_heap_base(), and AGESA_SUCCESS.

Here is the call graph for this function:

◆ agesa_LocateBuffer()

AGESA_STATUS agesa_LocateBuffer ( uint32_t  Func,
uintptr_t  Data,
void ConfigPtr 
)

Definition at line 422 of file heapmanager.c.

References AGESA_SUCCESS, _BIOS_BUFFER_NODE::BufferSize, and FindAllocatedNode().

Here is the call graph for this function:

◆ ConcatenateNodes()

static void ConcatenateNodes ( BIOS_BUFFER_NODE FirstNodePtr,
BIOS_BUFFER_NODE SecondNodePtr 
)
static

Definition at line 119 of file heapmanager.c.

References _BIOS_BUFFER_NODE::BufferSize, memset(), and _BIOS_BUFFER_NODE::NextNodeOffset.

Referenced by agesa_DeallocateBuffer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EmptyHeap()

static void EmptyHeap ( int  unused)
static

Definition at line 13 of file heapmanager.c.

References agesa_heap_base(), BIOS_HEAP_SIZE, and memset().

Here is the call graph for this function:

◆ FindAllocatedNode()

static AGESA_STATUS FindAllocatedNode ( uint32_t  handle,
BIOS_BUFFER_NODE **  last_allocd_or_match 
)
static

Definition at line 82 of file heapmanager.c.

References agesa_heap_base(), AGESA_SUCCESS, _BIOS_BUFFER_NODE::BufferHandle, _BIOS_BUFFER_NODE::NextNodeOffset, and _BIOS_HEAP_MANAGER::StartOfAllocatedNodes.

Referenced by agesa_AllocateBuffer(), and agesa_LocateBuffer().

Here is the call graph for this function:
Here is the caller graph for this function: