diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-11-11 14:16:18 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-11-11 14:16:18 +0000 |
| commit | 0ca0c40c197c214288ad2ed1179ae9ae28c50194 (patch) | |
| tree | df2127d7e6a39de96c70c2458140dee75ae3c49e /arch/x86_64/include | |
| parent | 0f3c5c2bc02d7aa48f8edbe42a67dd91821032b7 (diff) | |
| download | teachos-0ca0c40c197c214288ad2ed1179ae9ae28c50194.tar.xz teachos-0ca0c40c197c214288ad2ed1179ae9ae28c50194.zip | |
Improve calculation of kernel end and start address.
Diffstat (limited to 'arch/x86_64/include')
| -rw-r--r-- | arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 10fad0c..f01bd37 100644 --- a/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp +++ b/arch/x86_64/include/arch/memory/paging/kernel_mapper.hpp @@ -38,7 +38,7 @@ namespace teachos::arch::memory::paging * inactive page table, that is not used by the CPU to ensure we are not changign memory that we are using. Because * remapping active kernel memory in the kernel wouldn't work. */ - auto remap_kernel() -> void + auto remap_kernel() -> active_page_table & { temporary_page temporary_page{virtual_page{0xCAFEBABE}, allocator}; auto & active_table = active_page_table::create_or_get(); @@ -51,6 +51,7 @@ namespace teachos::arch::memory::paging auto const old_level_4_page = virtual_page::containing_address(old_table.page_table_level_4_frame.start_address()); active_table.unmap_page(allocator, old_level_4_page); + return active_table; } private: |
