From 95cd78840f0891e60f5ebecc8a8eb4fbaf3c2ebf Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Sun, 12 Jan 2025 01:17:36 -0600 Subject: PROJECT RESTRUCTURING Move the entire kernel into its own directory. Create new directories for system commands, libraries and other required essentials for a complete Unix-like operating system. Signed-off-by: Danny Holman --- arch/i386/include/kernel/paging.h | 46 --------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 arch/i386/include/kernel/paging.h (limited to 'arch/i386/include/kernel/paging.h') diff --git a/arch/i386/include/kernel/paging.h b/arch/i386/include/kernel/paging.h deleted file mode 100644 index d8bb8f3..0000000 --- a/arch/i386/include/kernel/paging.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef I386_PAGING_H -#define I386_PAGING_H - -#include -#include -#include - -#define PAGE_SIZE 4096 - -#define PD_PRES 0x0001 -#define PD_RW 0x0002 -#define PD_USR 0x0004 -#define PD_PWT 0x0008 -#define PD_PCD 0x0010 -#define PD_ACC 0x0020 -#define PD_DIRTY 0x0040 -#define PD_PS 0x0080 -#define PD_GLOB 0x0100 -#define PD_PAT 0x1000 - -#define ERR_PRESENT 0x1 -#define ERR_RW 0x2 -#define ERR_USER 0x4 -#define ERR_RESERVED 0x8 -#define ERR_INST 0x10 - -#define PGROUNDUP(size) (((size)+PAGE_SIZE-1) & ~(PAGE_SIZE-1)) -#define PGROUNDDN(size) (((size)) & ~(PAGE_SIZE-1)) - -#define GET_PADDR(x) (((uint32_t)(x)) - 0xC0000000) -#define GET_VADDR(x) (((uint32_t)(x)) + 0xC0000000) - -#define GET_PDX(x) ((uintptr_t)(x) >> 22) -#define GET_PTX(x) (((uintptr_t)(x) >> 12) & 0x03FF) - -uintptr_t get_physaddr(void *vaddr); - -void paging_init(void); - -uintptr_t init_page_directory(void); -void map_page(uintptr_t paddr, uintptr_t vaddr, uint32_t flags); -void unmap_page(uintptr_t vaddr); - -void page_fault_handler(struct isr_frame *frame); - -#endif -- cgit v1.2.3