19 lines
448 B
C
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); |