diff options
Diffstat (limited to 'src/kernel/mem/paging.h')
-rw-r--r-- | src/kernel/mem/paging.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/kernel/mem/paging.h b/src/kernel/mem/paging.h index 2d5713f..f91fe37 100644 --- a/src/kernel/mem/paging.h +++ b/src/kernel/mem/paging.h @@ -18,32 +18,32 @@ struct page { }; struct page_table { - struct page pages[1024]; + page pages[1024]; }; struct segment_map; struct page_directory { - struct page_table *tables[1024]; //Virtual addresses of page tables + page_table *tables[1024]; //Virtual addresses of page tables uint32_t *tablesPhysical; //Pointer to the virtual address of the page directory (contain phys addr of pt) uint32_t physicalAddr; //Physical address of info above - struct segment_map *mappedSegs; + segment_map *mappedSegs; }; -extern struct page_directory *kernel_pagedir, *current_pagedir; +extern page_directory *kernel_pagedir, *current_pagedir; uint32_t frame_alloc(); void frame_free(uint32_t id); void paging_init(size_t totalRam); void paging_cleanup(); -void pagedir_switch(struct page_directory *pd); -struct page_directory *pagedir_new(); //Creates a brand new empty page directory for a process, with kernel pages -void pagedir_delete(struct page_directory *pagedir); -struct page *pagedir_getPage(struct page_directory *pd, uint32_t address, int make); -void page_map(struct page *page, uint32_t frame, uint32_t user, uint32_t rw); -void page_unmap(struct page *page); -void page_unmapFree(struct page *page); - -uint32_t paging_fault(struct registers *regs); //returns a boolean : 1 if unhandled, 0 if ok +void pagedir_switch(page_directory *pd); +page_directory *pagedir_new(); //Creates a brand new empty page directory for a process, with kernel pages +void pagedir_delete(page_directory *pagedir); +page *pagedir_getPage(page_directory *pd, uint32_t address, int make); +void page_map(page *page, uint32_t frame, uint32_t user, uint32_t rw); +void page_unmap(page *page); +void page_unmapFree(page *page); + +uint32_t paging_fault(registers *regs); //returns a boolean : 1 if unhandled, 0 if ok #endif |