aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-11-11 10:10:08 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-11-11 10:10:08 +0000
commit325d540236476b50af78e5781e3afead9e910359 (patch)
treee3629ffee442d5beeeaceb866c995f1734c424a3 /arch/x86_64/src
parent0a299adbb31605cc3018a5f37132113acd19bf4a (diff)
downloadteachos-325d540236476b50af78e5781e3afead9e910359.tar.xz
teachos-325d540236476b50af78e5781e3afead9e910359.zip
Add todos to section that cause the crash
Diffstat (limited to 'arch/x86_64/src')
-rw-r--r--arch/x86_64/src/memory/paging/inactive_page_table.cpp1
-rw-r--r--arch/x86_64/src/memory/paging/page_entry.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86_64/src/memory/paging/inactive_page_table.cpp b/arch/x86_64/src/memory/paging/inactive_page_table.cpp
index 4e0610e..d2eecb8 100644
--- a/arch/x86_64/src/memory/paging/inactive_page_table.cpp
+++ b/arch/x86_64/src/memory/paging/inactive_page_table.cpp
@@ -12,6 +12,7 @@ namespace teachos::arch::memory::paging
temporary_page & temporary_page)
: page_table_level_4_frame{frame}
{
+ // TODO: Here the exact same mapping code
auto table = temporary_page.map_table_frame(page_table_level_4_frame, active_page_table);
table.zero_entries();
table[511].set_entry(page_table_level_4_frame, entry::PRESENT | entry::WRITABLE);
diff --git a/arch/x86_64/src/memory/paging/page_entry.cpp b/arch/x86_64/src/memory/paging/page_entry.cpp
index 5aa0982..ba3deb3 100644
--- a/arch/x86_64/src/memory/paging/page_entry.cpp
+++ b/arch/x86_64/src/memory/paging/page_entry.cpp
@@ -51,6 +51,7 @@ namespace teachos::arch::memory::paging
{
exception_handling::assert((frame.start_address() & ~PHYSICAL_ADDRESS_MASK) == 0,
"[Paging Entry] Start address is not aligned with page");
+ // TODO: Crash when trying to write invalid value at 0xffffff8657f5d5f0
flags = frame.start_address() | additional_flags.to_ulong();
}