aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/memory/paging
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-11-09 16:25:11 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-11-09 16:25:11 +0000
commit4c030cbaee174a9f7f42d4f5ca7ddf6debbbe048 (patch)
treec022b72aa6baedf40e0a654126b7be4d4ddb8368 /arch/x86_64/src/memory/paging
parent022e2555c233c13f990026ea86d164f56a9cd7be (diff)
downloadteachos-4c030cbaee174a9f7f42d4f5ca7ddf6debbbe048.tar.xz
teachos-4c030cbaee174a9f7f42d4f5ca7ddf6debbbe048.zip
Fix flush all method and move crash.
Diffstat (limited to 'arch/x86_64/src/memory/paging')
-rw-r--r--arch/x86_64/src/memory/paging/active_page_table.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86_64/src/memory/paging/active_page_table.cpp b/arch/x86_64/src/memory/paging/active_page_table.cpp
index 3f62419..0113869 100644
--- a/arch/x86_64/src/memory/paging/active_page_table.cpp
+++ b/arch/x86_64/src/memory/paging/active_page_table.cpp
@@ -2,9 +2,14 @@
namespace teachos::arch::memory::paging
{
+ namespace
+ {
+ paging::virtual_address constexpr PAGE_TABLE_LEVEL_4_ADDRESS = 0xffffffff'fffff000;
+ }
+
auto active_page_table::create_or_get() -> active_page_table &
{
- static page_table_handle active_handle{reinterpret_cast<page_table *>(cpu::PAGE_TABLE_LEVEL_4_ADDRESS),
+ static page_table_handle active_handle{reinterpret_cast<page_table *>(PAGE_TABLE_LEVEL_4_ADDRESS),
page_table_handle::LEVEL4};
static active_page_table active_page{active_handle};
return active_page;