diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86_64/include/arch/memory/page_table.hpp | 6 | ||||
| -rw-r--r-- | arch/x86_64/kapi/memory.cpp | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86_64/include/arch/memory/page_table.hpp b/arch/x86_64/include/arch/memory/page_table.hpp index 3cbb0af..c75ccaf 100644 --- a/arch/x86_64/include/arch/memory/page_table.hpp +++ b/arch/x86_64/include/arch/memory/page_table.hpp @@ -174,7 +174,7 @@ namespace arch::memory result |= mapper_flags::writable; } - if ((flags & table_flags::disable_cache) != table_flags::empty) + if ((flags & (table_flags::disable_cache | table_flags::write_through)) != table_flags::empty) { result |= mapper_flags::uncached; } @@ -211,7 +211,7 @@ namespace arch::memory if ((flags & mapper_flags::uncached) != mapper_flags::empty) { - result |= table_flags::disable_cache; + result |= (table_flags::disable_cache | table_flags::write_through); } if ((flags & mapper_flags::supervisor_only) == mapper_flags::empty) @@ -229,4 +229,4 @@ namespace arch::memory } // namespace arch::memory -#endif
\ No newline at end of file +#endif diff --git a/arch/x86_64/kapi/memory.cpp b/arch/x86_64/kapi/memory.cpp index 5f12e5c..853639c 100644 --- a/arch/x86_64/kapi/memory.cpp +++ b/arch/x86_64/kapi/memory.cpp @@ -245,6 +245,7 @@ namespace kapi::memory [](auto const & region) { return region.base + region.size_in_B; })); init_pmm(frame::containing(physical_address{highest_byte}).number() + 1, handoff_to_kernel_pmm); + init_mmio(mmio_base, 1_GiB / page::size); kstd::println("[x86_64:MEM] Releasing bootstrap memory allocators."); region_based_allocator.reset(); |
