diff options
author | Marvin Borner | 2020-05-16 00:42:04 +0200 |
---|---|---|
committer | Marvin Borner | 2020-05-16 00:42:04 +0200 |
commit | ffb7cb87593a5de58f7c5183020576dac9d50fc4 (patch) | |
tree | b4d89fdbf7d5ed39e55f8e708ee87da17b957518 /src/kernel/memory/paging.h | |
parent | 916c21af52dc2230d689e1075457c4c29b4b262c (diff) |
Non-dynamic working approach
Diffstat (limited to 'src/kernel/memory/paging.h')
-rw-r--r-- | src/kernel/memory/paging.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/kernel/memory/paging.h b/src/kernel/memory/paging.h index bf82cf5..8857381 100644 --- a/src/kernel/memory/paging.h +++ b/src/kernel/memory/paging.h @@ -23,23 +23,16 @@ #define PT_GLOBAL 1 << 8 #define PT_USED 1 << 9 -struct page_table { - u32 pages[1024] __attribute__((aligned(4096))); -}; - -struct page_directory { - struct page_table *tables[1024] __attribute__((aligned(4096))); -}; - -struct page_directory *paging_kernel_directory __attribute__((aligned(4096))); +u32 *current_page_directory; +u32 kernel_page_directory[1024] __attribute__((aligned(4096))); int paging_enabled; void paging_install(u32 multiboot_address); void paging_enable(); void paging_disable(); -struct page_directory *paging_make_directory(int user); -void paging_switch_directory(struct page_directory *dir); +u32 *paging_make_directory(int user); +void paging_switch_directory(u32 *dir); void paging_map(u32 phy, u32 virt, u16 flags); u32 paging_get_phys(u32 virt); @@ -58,4 +51,4 @@ void paging_set_user(u32 virt, u32 count); u32 paging_find_pages(u32 count); u32 paging_alloc_pages(u32 count); -#endif
\ No newline at end of file +#endif |