diff options
Diffstat (limited to 'arch/x86_64/include')
| -rw-r--r-- | arch/x86_64/include/arch/memory/cpu/tlb.hpp | 2 | ||||
| -rw-r--r-- | arch/x86_64/include/arch/memory/paging/active_page_table.hpp | 6 | ||||
| -rw-r--r-- | arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/arch/x86_64/include/arch/memory/cpu/tlb.hpp b/arch/x86_64/include/arch/memory/cpu/tlb.hpp index dc7ec61..21f09e5 100644 --- a/arch/x86_64/include/arch/memory/cpu/tlb.hpp +++ b/arch/x86_64/include/arch/memory/cpu/tlb.hpp @@ -5,8 +5,6 @@ namespace teachos::arch::memory::cpu { - paging::virtual_address constexpr PAGE_TABLE_LEVEL_4_ADDRESS = 0xffffffff'fffff000; - /** * @brief Invalidates any translation lookaside buffer (TLB) entry for the page table the given address is cotained * in. See https://www.felixcloutier.com/x86/invlpg for more information on the used x86 instruction. diff --git a/arch/x86_64/include/arch/memory/paging/active_page_table.hpp b/arch/x86_64/include/arch/memory/paging/active_page_table.hpp index 09fbc76..567a806 100644 --- a/arch/x86_64/include/arch/memory/paging/active_page_table.hpp +++ b/arch/x86_64/include/arch/memory/paging/active_page_table.hpp @@ -164,8 +164,10 @@ namespace teachos::arch::memory::paging break; } } - - cpu::tlb_flush(page.start_address()); + // TODO: Flushing only specifc page does not work and cause temporary_page.map_table_frame to return an invalid + // page table (Memory inside buffer shows nothing) + // cpu::tlb_flush(page.start_address()); + cpu::tlb_flush_all(); } private: diff --git a/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp b/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp index 0786ec1..c91c5f0 100644 --- a/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp +++ b/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp @@ -76,8 +76,6 @@ namespace teachos::arch::memory::paging auto const backup = allocator::physical_frame::containing_address(cpu::read_cr3_register()); auto page_table_level4 = temporary_page.map_table_frame(backup, active_table); - // TODO: Page Table Level 4 is invalid, all entries point to non-existent memory :( - active_table[511].set_entry(inactive_table.page_table_level_4_frame, entry::PRESENT | entry::WRITABLE); cpu::tlb_flush_all(); map_elf_kernel_sections(active_table); |
