Files
nub-os/src/arch/x86_64/mem/pmm.h
nub31 0ccb483047 ...
2025-09-06 17:31:14 +02:00

19 lines
448 B
C

#pragma once
#include "std.h"
#include "x86_64/multiboot.h"
// Fixed at 2mb for now
#define PAGE_SIZE MiB(2)
// Defines the theoretical max memory the kernel can allocate, not the actual memory of the system
// The value must be a multible of 8
#define MAX_MEMORY GiB(64)
void pmm_init(multiboot_info_t* info);
// Allocate a 2mb physical page
u64 pmm_alloc();
// Free the 2mb physical page at the specified address
void pmm_free(u64 address);