wip: change memory to have access to page_tables and allocate these dynamically
This commit is contained in:
@ -13,7 +13,10 @@
|
||||
#define PD_SIZE 1024
|
||||
#define PAGE_MASK 0xFFFFF000
|
||||
#define HEAP_END 0xC0000000
|
||||
#define HEAP_START ((uint32_t) & _kernel_end - HEAP_END)
|
||||
#define PT_START 256
|
||||
|
||||
extern uint32_t _kernel_end;
|
||||
extern uint32_t boot_page_directory;
|
||||
extern uint32_t *page_directory;
|
||||
extern uint32_t page_table_default[1024];
|
||||
@ -22,5 +25,7 @@ uint32_t *virt_to_phys(uint32_t *virt_addr);
|
||||
void init_memory(void);
|
||||
void *alloc_frames(size_t size);
|
||||
int free_frames(void *frame_ptr, size_t size);
|
||||
void *alloc_pages(size_t size, uint32_t **frame_ptr);
|
||||
void *alloc_pages(size_t size);
|
||||
int free_pages(void *page_ptr, size_t size);
|
||||
void init_page_table(uint32_t page_table[1024], uint16_t start);
|
||||
int16_t create_page_table(uint16_t pd_index);
|
||||
|
Reference in New Issue
Block a user