2024-09-18 11:14:06 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2024-09-19 11:04:35 -04:00
|
|
|
#define PRESENT (1 << 0)
|
|
|
|
#define RW (1 << 1)
|
|
|
|
#define SUPERVISOR (0 << 2)
|
|
|
|
#define ACCESSED (1 << 4)
|
|
|
|
#define INIT_FLAGS (PRESENT | RW | SUPERVISOR)
|
|
|
|
#define PAGE_SIZE 4096
|
2024-09-18 11:14:06 -04:00
|
|
|
|
|
|
|
void init_memory(void);
|
2024-09-19 11:39:14 -04:00
|
|
|
void *kalloc_frame(uint32_t nb_frames);
|
|
|
|
void kfree_frame(void *frame, uint32_t nb_frames);
|