metal-cos/sys/amd64/xmem.c
2014-06-30 15:52:35 -07:00

75 lines
847 B
C

#include <stdbool.h>
#include <stdint.h>
#include <kconfig.h>
#include <kassert.h>
#include "amd64.h"
#include "amd64op.h"
#include "mp.h"
#define MAX_XMEM_REGIONS 1024
typedef struct XMem
{
bool inUse;
uint64_t base;
uint64_t maxLength;
uint64_t length;
};
XMem regions[MAX_XMEM_REGIONS];
void
XMem_Init()
{
kprintf("Initializing XMEM ... ");
kprintf("Done!\n");
}
XMem *
XMem_New()
{
return NULL;
}
void
XMem_Destroy(XMem *xmem)
{
}
uint64_t
XMem_GetBase(XMem *xmem)
{
return xmem->base;
}
uint64_t
XMem_GetLength(XMem *xmem)
{
return xmem->length;
}
bool
XMem_Allocate(XMem *xmem, uint64_t length)
{
}
bool
XMem_Shrink(XMem *xmem, uint64_t length)
{
}
bool
XMem_Map(XMem *xmem, uint64_t phys, uint64_t off, uint64_t length)
{
}
void
XMem_Unmap(XMem *xmem, uint64_t off, uint64_t length)
{
}