aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-12-03 17:08:44 +0100
committerFelix Morgner <felix.morgner@ost.ch>2025-12-03 17:08:50 +0100
commit9907cb6c0108b89b846fee52de56a9c335caaedc (patch)
treed85283c552e33f1876071976a6364484705a2805
parenta08847ded5fba25859e7a3ad06ae3fed342d4d6a (diff)
downloadteachos-9907cb6c0108b89b846fee52de56a9c335caaedc.tar.xz
teachos-9907cb6c0108b89b846fee52de56a9c335caaedc.zip
x86_64/memory: fix return in scoped_mapping::map
Previously, scoped_mapping::map returned the start address of the frame. Unfortunately, the initial mapping performed in the bootstrap code maps physical memory starting at 0x0000'0000'0000'0000, which means no fault was triggered. The map function now correctly return the start address of the scoped_mapping's page, which must alway work by definition.
-rw-r--r--arch/x86_64/src/memory/scoped_mapping.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86_64/src/memory/scoped_mapping.cpp b/arch/x86_64/src/memory/scoped_mapping.cpp
index 191a7ad..5446b2a 100644
--- a/arch/x86_64/src/memory/scoped_mapping.cpp
+++ b/arch/x86_64/src/memory/scoped_mapping.cpp
@@ -91,7 +91,7 @@ namespace teachos::memory::x86_64
m_mapped = true;
- return static_cast<std::byte *>(frame.start_address());
+ return static_cast<std::byte *>(m_page.start_address());
}
auto scoped_mapping::unmap() -> void