diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-10-26 09:20:53 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-10-26 09:20:53 +0000 |
| commit | e56964da2dd54e598d3a7fca20fc0071f32026a4 (patch) | |
| tree | bdee9ba7b49701955e321653c63e44e124d50ab6 | |
| parent | 878751001c3de6e7fb24c6212957cd5d753a62d1 (diff) | |
| download | teachos-e56964da2dd54e598d3a7fca20fc0071f32026a4.tar.xz teachos-e56964da2dd54e598d3a7fca20fc0071f32026a4.zip | |
Adjust to toolchain updates
| -rw-r--r-- | .vscode/tasks.json | 4 | ||||
| -rw-r--r-- | arch/x86_64/include/arch/boot/pointers.hpp | 2 | ||||
| -rw-r--r-- | arch/x86_64/include/arch/memory/paging/page_table.hpp | 4 | ||||
| -rw-r--r-- | arch/x86_64/src/memory/paging/page_mapper.cpp | 3 | ||||
| -rw-r--r-- | arch/x86_64/src/memory/paging/page_table.cpp | 5 |
5 files changed, 9 insertions, 9 deletions
diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 83b2248..70c8159 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -9,6 +9,8 @@ "-S", "-s", "-m", + "-display", + "curses", "32M", "-cdrom", "${workspaceFolder}/build/teachos-${input:build_type}.iso" @@ -37,6 +39,8 @@ "type": "shell", "args": [ "-m", + "-display", + "curses", "32M", "-cdrom", "${workspaceFolder}/build/teachos-${input:build_type}.iso" diff --git a/arch/x86_64/include/arch/boot/pointers.hpp b/arch/x86_64/include/arch/boot/pointers.hpp index 2c42605..37840b6 100644 --- a/arch/x86_64/include/arch/boot/pointers.hpp +++ b/arch/x86_64/include/arch/boot/pointers.hpp @@ -9,8 +9,6 @@ namespace teachos::arch::boot { extern "C" size_t const multiboot_information_pointer; extern "C" memory::paging::page_table * page_map_level_4; - extern "C" memory::paging::page_table * page_map_level_3; - extern "C" memory::paging::page_table * page_map_level_2; } // namespace teachos::arch::boot #endif diff --git a/arch/x86_64/include/arch/memory/paging/page_table.hpp b/arch/x86_64/include/arch/memory/paging/page_table.hpp index 5a072d0..291ea8d 100644 --- a/arch/x86_64/include/arch/memory/paging/page_table.hpp +++ b/arch/x86_64/include/arch/memory/paging/page_table.hpp @@ -47,9 +47,9 @@ namespace teachos::arch::memory::paging page_table_handle(page_table * handle, level handle_level); /** - * @brief Initializes one page table level 3 entry. + * @brief Initializes one page table level 4 entry. */ - void initialize_page_table(); + void initialize_page_tables(); /** * @brief Set every entry of the page to unused. diff --git a/arch/x86_64/src/memory/paging/page_mapper.cpp b/arch/x86_64/src/memory/paging/page_mapper.cpp index dff9ae4..75d6759 100644 --- a/arch/x86_64/src/memory/paging/page_mapper.cpp +++ b/arch/x86_64/src/memory/paging/page_mapper.cpp @@ -8,8 +8,7 @@ namespace teachos::arch::memory::paging auto create_or_get() -> page_table_handle { static auto initialized = false; - // TODO: As soon as linker error is fixed in toolchain make handle static and return that. - page_table_handle active_handle{boot::page_map_level_4, page_table_handle::LEVEL4}; + static page_table_handle active_handle{boot::page_map_level_4, page_table_handle::LEVEL4}; if (!initialized) { diff --git a/arch/x86_64/src/memory/paging/page_table.cpp b/arch/x86_64/src/memory/paging/page_table.cpp index b5315a0..808fbbc 100644 --- a/arch/x86_64/src/memory/paging/page_table.cpp +++ b/arch/x86_64/src/memory/paging/page_table.cpp @@ -103,12 +103,11 @@ namespace teachos::arch::memory::paging exception_handling::assert(handle, "[Page Table] Attempted to pass nullptr as handle to page table handle method"); } - auto page_table_handle::initialize_page_table() -> void + auto page_table_handle::initialize_page_tables() -> void { exception_handling::assert(handle_level == page_table_handle::LEVEL4, "[Page Table] Attempted to initialize a page table of level 3 or lower"); - - auto level_3_page_table = boot::page_map_level_3; + // std::construct_at(reinterpret_cast<page_table *>(_end_of_image)); } auto page_table_handle::zero_entries() -> void { handle->zero_entries(); } |
