aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/memory/paging
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-28 12:45:46 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-28 12:45:46 +0000
commitefcb913196ccf0386a557e8c1053c430e5896179 (patch)
tree3c5eaab7b093cb8f3a659a72151e6d138b718444 /arch/x86_64/src/memory/paging
parent58680f7d84ca5771be31c0037e8caf5791d79b3c (diff)
downloadteachos-efcb913196ccf0386a557e8c1053c430e5896179.tar.xz
teachos-efcb913196ccf0386a557e8c1053c430e5896179.zip
Convert bitset to uint64_t instead of uint64_t to bitset
Diffstat (limited to 'arch/x86_64/src/memory/paging')
-rw-r--r--arch/x86_64/src/memory/paging/page_entry.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/src/memory/paging/page_entry.cpp b/arch/x86_64/src/memory/paging/page_entry.cpp
index c3e9614..dbf23e2 100644
--- a/arch/x86_64/src/memory/paging/page_entry.cpp
+++ b/arch/x86_64/src/memory/paging/page_entry.cpp
@@ -23,7 +23,7 @@ namespace teachos::arch::memory::paging
{
if (contains_flags(PRESENT))
{
- return allocator::physical_frame::containing_address(flags.to_ullong() & PHYSICAL_ADDRESS_MASK);
+ return allocator::physical_frame::containing_address(flags.to_ulong() & PHYSICAL_ADDRESS_MASK);
}
return std::nullopt;
}
@@ -34,6 +34,6 @@ namespace teachos::arch::memory::paging
{
exception_handling::assert((frame.start_address() & ~PHYSICAL_ADDRESS_MASK) == 0,
"[Paging Entry] Start address is not aligned with page");
- flags = std::bitset<64U>{frame.start_address()} | additional_flags;
+ flags = frame.start_address() | additional_flags.to_ulong();
}
} // namespace teachos::arch::memory::paging