diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-10-15 08:45:29 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-10-15 08:45:29 +0000 |
| commit | 11f9c91e602bd0231e6bc402418dedf445e47402 (patch) | |
| tree | b86125270e9d18bc63b1cdb7c711c82d1b714e6f /arch/x86_64/src/memory/paging.cpp | |
| parent | 03d3dec4807d6adcfc5e21bd13992014900b4eac (diff) | |
| download | teachos-11f9c91e602bd0231e6bc402418dedf445e47402.tar.xz teachos-11f9c91e602bd0231e6bc402418dedf445e47402.zip | |
Adding enum flags
Diffstat (limited to 'arch/x86_64/src/memory/paging.cpp')
| -rw-r--r-- | arch/x86_64/src/memory/paging.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86_64/src/memory/paging.cpp b/arch/x86_64/src/memory/paging.cpp index 58a2b99..6fef339 100644 --- a/arch/x86_64/src/memory/paging.cpp +++ b/arch/x86_64/src/memory/paging.cpp @@ -31,15 +31,15 @@ namespace teachos::arch::memory return value; } - auto entry::set(physical_frame frame) -> void + auto entry::contains_flags(std::bitset<64U> b) const -> bool { return (flags & b) == b; } + + auto entry::set_address(physical_frame frame) -> void { arch::exception_handling::assert((frame.start_address() & ~0x000fffff'fffff000) == 0, "Start address is not aligned with Page"); flags = std::bitset<64U>(frame.start_address()) | flags; } - auto entry::contains_flags(std::bitset<64U> b) const -> bool { return (flags & b) == b; } - auto page_table::zero_entries() -> void { auto begin = &entries[0]; @@ -50,5 +50,4 @@ namespace teachos::arch::memory entry->set_unused(); } } - } // namespace teachos::arch::memory |
