2019-02-09 12:52:45 -06:00
|
|
|
#ifndef PAGING_H
|
|
|
|
#define PAGING_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "paging_helpers.h"
|
|
|
|
|
2019-03-11 09:32:55 -05:00
|
|
|
#define NUM_KERN_DIRS 2
|
2019-02-09 12:52:45 -06:00
|
|
|
|
2019-03-11 09:32:55 -05:00
|
|
|
void map_pages(void* virt_addr_ptr,void* phys_addr_ptr,int num_pages,char usr,char wr);
|
|
|
|
void* alloc_pages(int num_pages);
|
|
|
|
void alloc_pages_virt(int num_pages,void* addr);
|
2019-02-09 13:05:13 -06:00
|
|
|
void paging_init();
|
2019-03-17 12:37:37 -05:00
|
|
|
void* new_address_space();
|
|
|
|
void load_address_space(uint32_t cr3);
|
2019-05-04 10:42:17 -05:00
|
|
|
void* virt_to_phys(void* virt_addr);
|
2019-05-04 10:52:38 -05:00
|
|
|
uint32_t find_free_pages(int num_pages);
|
|
|
|
|
2019-02-09 12:52:45 -06:00
|
|
|
#endif
|