26 lines
520 B
C
26 lines
520 B
C
#pragma once
|
|
#include <Types.h>
|
|
#include "../Common/bootinfo.h"
|
|
|
|
enum {
|
|
kVMPageSize = 4096,
|
|
kVMBlocksPerByte = 8,
|
|
kVMMaxReservedRegions = 128,
|
|
};
|
|
|
|
typedef struct {
|
|
UInt64 base;
|
|
Size size;
|
|
} VMMemoryRegion;
|
|
|
|
|
|
typedef struct {
|
|
VMMemoryRegion totalRAM;
|
|
VMMemoryRegion reserved[kVMMaxReservedRegions];
|
|
UInt32 reservedCount;
|
|
VMMemoryRegion UART;
|
|
} VMBootMemoryMap;
|
|
|
|
void PMMInitialize(VMBootMemoryMap* bootMap, Bootinfo* info);
|
|
Pointer PMMAllocatePage();
|
|
void PMMFreePage(Address address); |