42_KFS/headers/memory.h

14 lines
287 B
C
Raw Normal View History

#pragma once
#include <stdint.h>
#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
void init_memory(void);
uintptr_t kalloc_frame(uint32_t nb_frames);