diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-11-13 17:57:23 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-11-22 14:20:36 +0100 |
| commit | 700123106b48f23fd083cfbc0f8a6d9d7364c1cb (patch) | |
| tree | d2344acc0780527437a5932105f124356783619a | |
| parent | 9a1f24148e2b61ef1f9d54c0285aba7213b14a0c (diff) | |
| download | kernel-700123106b48f23fd083cfbc0f8a6d9d7364c1cb.tar.xz kernel-700123106b48f23fd083cfbc0f8a6d9d7364c1cb.zip | |
x86_64/memory: flush TLB on page unmap
| -rw-r--r-- | arch/x86_64/arch/memory/higher_half_mapper.cpp | 2 | ||||
| -rw-r--r-- | arch/x86_64/arch/memory/mmu.hpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86_64/arch/memory/higher_half_mapper.cpp b/arch/x86_64/arch/memory/higher_half_mapper.cpp index 9019e25b..ee11d50a 100644 --- a/arch/x86_64/arch/memory/higher_half_mapper.cpp +++ b/arch/x86_64/arch/memory/higher_half_mapper.cpp @@ -1,5 +1,6 @@ #include <arch/memory/higher_half_mapper.hpp> +#include <arch/memory/mmu.hpp> #include <arch/memory/page_table.hpp> #include <arch/memory/page_utilities.hpp> @@ -99,6 +100,7 @@ namespace arch::memory } } + tlb_flush(page.start_address()); return unmapped_frame; } diff --git a/arch/x86_64/arch/memory/mmu.hpp b/arch/x86_64/arch/memory/mmu.hpp index 9bd95b43..934aa63f 100644 --- a/arch/x86_64/arch/memory/mmu.hpp +++ b/arch/x86_64/arch/memory/mmu.hpp @@ -7,7 +7,7 @@ namespace arch::memory { //! Invalidate a translation lookaside buffer (TLB) entry for a given address //! - //! @param address The physical address for which to flush the TLB entries + //! @param address The linear address for which to flush the TLB entries auto tlb_flush(kapi::memory::linear_address address) -> void; //! Invalidate all translation lookaside buffer (TLB) entries |
