From c9a1266d219a83882735a3a8304f3824e0219cdb Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Mon, 15 Jan 2024 15:44:20 -0500 Subject: redo application paging and system calls, rename mercury to hilbert --- include/mercury/kernel/paging.hpp | 46 --------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 include/mercury/kernel/paging.hpp (limited to 'include/mercury/kernel/paging.hpp') diff --git a/include/mercury/kernel/paging.hpp b/include/mercury/kernel/paging.hpp deleted file mode 100644 index f6d400a..0000000 --- a/include/mercury/kernel/paging.hpp +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef MERCURY_KERNEL_PAGING_HPP -#define MERCURY_KERNEL_PAGING_HPP - -#include - -//in paging.asm -extern "C" [[noreturn]] void switch_to_kernel_p4(void (*and_then_jump_to)()); - -namespace mercury::kernel::paging { - - void mark_all_pram_used(); - void mark_all_vram_free(); - - void mark_pram_region_free(uint64_t start_addr, uint64_t end_addr); - void mark_vram_region_used(uint64_t start_addr, uint64_t end_addr); - - uint64_t find_unmapped_vram_region(uint64_t page_count); - - uint64_t encode_pte( - uint64_t addr, bool user, bool write, bool execute, bool ps); - - void init_kernel_page_tables(uint64_t kernel_offset); - - void map_kernel_stacks(); - - void map_kernel_page( - uint64_t paddr, uint64_t vaddr, bool write, bool execute); - - void unmap_kernel_page(uint64_t vaddr); - - //maps writable and not executable - void *map_new_kernel_pages(uint64_t count); - - //maps writable and not executable - void map_new_kernel_page(uint64_t &vaddr_out, uint64_t &paddr_out); - - uint64_t get_used_vram_page_count(); - uint64_t get_free_pram_page_count(); - - extern uint64_t kernel_p4e; - - uint64_t take_2mib_pram_page(); - -} - -#endif -- cgit v1.2.3