27 lines
573 B
C
27 lines
573 B
C
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
|
|
#include <kernel/paging.h>
|
|
#include <kernel/tty.h>
|
|
|
|
struct x86_Page_Directory {
|
|
uint32_t address : 20;
|
|
uint8_t available_1 : 4;
|
|
bool page_Size: 1;
|
|
bool available_2: 1;
|
|
bool accesed: 1;
|
|
bool cache_disable: 1;
|
|
bool write_through: 1;
|
|
bool user_supervisor: 1;
|
|
bool read_write: 1;
|
|
bool present: 1;
|
|
|
|
} __attribute__((packed));
|
|
|
|
struct x86_Page_Directory page_directory[1024] __attribute__((aligned(4096)));
|
|
|
|
void setup_paging() {
|
|
size_t size = sizeof(page_directory[0]);
|
|
}
|