From f56004a77314d4b4d68bfaf496fd7c6013ba7a27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matteo=20Gm=C3=BCr?= Date: Wed, 16 Oct 2024 11:52:01 +0000 Subject: Adjust types --- arch/x86_64/src/boot/boot.s | 2 +- arch/x86_64/src/memory/paging.cpp | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'arch/x86_64/src') diff --git a/arch/x86_64/src/boot/boot.s b/arch/x86_64/src/boot/boot.s index 29ac58d..e3d9c37 100644 --- a/arch/x86_64/src/boot/boot.s +++ b/arch/x86_64/src/boot/boot.s @@ -268,7 +268,7 @@ enable_paging: mov $page_map_level_4, %eax or 0b11, %eax // TODO: WHY THIS THROW ERROR? - mov %eax, [$page_map_level_4 + 511 * 8] + //mov %eax, [$page_map_level_4 + 511 * 8] /* Enable Physical Address Extension */ mov %cr4, %eax diff --git a/arch/x86_64/src/memory/paging.cpp b/arch/x86_64/src/memory/paging.cpp index 61d9d0f..2f78da8 100644 --- a/arch/x86_64/src/memory/paging.cpp +++ b/arch/x86_64/src/memory/paging.cpp @@ -60,19 +60,17 @@ namespace teachos::arch::memory std::size_t table_address = reinterpret_cast(this); return (table_address << 9) | (index << 12); } - else - { - return std::nullopt; - } + // TODO: Implement behaviour for huge pages currently not done + return std::nullopt; } - auto page_table::next_table(size_t index) const -> std::optional + auto page_table::next_table(std::size_t index) const -> std::optional { auto address = next_table_address(index); if (address.has_value()) { - return reinterpret_cast(*address); + return reinterpret_cast(*address); } return std::nullopt; -- cgit v1.2.3