]> git.ameliathe1st.gay Git - voyage-au-centre-des-fichiers.git/commitdiff
Fixed mmap_print syscall, to work with the new processes data structures
authorAmelia Coutard <eliottulio.coutard@gmail.com>
Sat, 11 Mar 2023 01:11:37 +0000 (02:11 +0100)
committerAmelia Coutard <eliottulio.coutard@gmail.com>
Sat, 11 Mar 2023 01:11:37 +0000 (02:11 +0100)
kernel/src/ring3.cpp

index 3e20646aaccd9b94ce421ef2afd0008702b6d26e..aed5e3a953c57b93851998d1aa29d8831e1c7c45 100644 (file)
@@ -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<os::paging::page> 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<os::paging::page> 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:");