diff options
author | Danny Holman <dholman@gymli.org> | 2024-02-24 14:44:38 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2024-02-24 14:44:38 -0600 |
commit | 2ce0f8af51dae9e7d591ff5fd038f89d6ca9dbbe (patch) | |
tree | 314f6105fc2996923070ed7f82c3acc8d5b2b20c /arch/i386/include/kernel/paging.h | |
parent | 5d06824289868c5a345fbcfa8ed4d1e63af84fdb (diff) |
arch: i386: cleanup everything and reorganize
Clean up everything in the i386 arch directory. This code has been in
dire need of refactoring for a long while. All the inline assembly
functions and the data structures related to the architecture should be
placed into their own header file. Now the scheduler can access
registers and ISRs without having to deal with arch-specific code.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'arch/i386/include/kernel/paging.h')
-rw-r--r-- | arch/i386/include/kernel/paging.h | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/arch/i386/include/kernel/paging.h b/arch/i386/include/kernel/paging.h index bb79d09..7f820e8 100644 --- a/arch/i386/include/kernel/paging.h +++ b/arch/i386/include/kernel/paging.h @@ -1,7 +1,7 @@ #ifndef I386_PAGING_H #define I386_PAGING_H -#include <kernel/isr.h> +#include <kernel/asm.h> #include <kernel/multiboot.h> #include <kernel/data/list.h> #include <stdint.h> @@ -25,21 +25,11 @@ #define PAGE_SIZE 4096 -#define DMA_BITMAP_SZ 128 -#define BDY_BITMAP_SZ 32640 - -struct pfa_buddy { - uintptr_t start; - uintptr_t *bitmap; - uint8_t size; - struct list_head list; -}; - -void load_page_dir(uintptr_t pd_addr); -void enable_paging(void); +uint32_t* init_page_table(uint32_t flags); +void enable_paging(uintptr_t pd_addr); void paging_init(void); -void page_fault_handler(struct isr_frame *frame); +void page_fault_handler(struct regs *regs); uint32_t get_vaddr(uintptr_t paddr); |