Files
ksOS/Kernel/Include/VM/PMM.h
T
karina 7fcb50587e feat: GICv2 and timer
fix: TimerReset in GIC.c now uses kTimerFrequency
2026-04-29 08:49:37 +04:00

32 lines
604 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 GICD;
VMMemoryRegion GICC;
} GICRegion;
typedef struct {
VMMemoryRegion totalRAM;
VMMemoryRegion reserved[kVMMaxReservedRegions];
UInt32 reservedCount;
VMMemoryRegion UART;
GICRegion GIC;
} VMBootMemoryMap;
void PMMInitialize(VMBootMemoryMap* bootMap);
Pointer PMMAllocatePage();
void PMMFreePage(Address address);