From 9907cb6c0108b89b846fee52de56a9c335caaedc Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 3 Dec 2025 17:08:44 +0100 Subject: 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. --- arch/x86_64/src/memory/scoped_mapping.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') 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(frame.start_address()); + return static_cast(m_page.start_address()); } auto scoped_mapping::unmap() -> void -- cgit v1.2.3