From: Amelia Coutard Date: Sat, 11 Mar 2023 01:11:37 +0000 (+0100) Subject: Fixed mmap_print syscall, to work with the new processes data structures X-Git-Url: https://git.ameliathe1st.gay/?a=commitdiff_plain;h=332373f40265a571827156f7fcfd3a63c86bf4e9;p=voyage-au-centre-des-fichiers.git Fixed mmap_print syscall, to work with the new processes data structures --- diff --git a/kernel/src/ring3.cpp b/kernel/src/ring3.cpp index 3e20646..aed5e3a 100644 --- a/kernel/src/ring3.cpp +++ b/kernel/src/ring3.cpp @@ -43,9 +43,9 @@ extern "C" void os::syscall_println(char v) { os::printc('\n'); } -extern "C" os::paging::PML4T PML4T; extern "C" void os::syscall_print_low_mmap() { - os::paging::on_all_pages(PML4T, [](os::paging::page* vaddr, os::phys_ptr paddr, std::size_t page_size_in_bytes) { + os::paging::on_all_pages(*get_process(current_pid).PML4T, + [](os::paging::page* vaddr, os::phys_ptr paddr, std::size_t page_size_in_bytes) { if (std::size_t(vaddr) < 128ul * 1024 * 1024 * 1024 * 1024) { // Lower half: if (std::size_t(vaddr) < 0x10'0000'0000) { os::print("segments:");