Kernel: Make VirtualAddress::page_base() work with 64-bit addresses
This commit is contained in:
parent
679ae6af81
commit
c878054682
Notes:
sideshowbarker
2024-07-18 08:48:48 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/c8780546823 Pull-request: https://github.com/SerenityOS/serenity/pull/8795 Reviewed-by: https://github.com/Hendiadyoin1
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ public:
|
|||
[[nodiscard]] u8* as_ptr() { return reinterpret_cast<u8*>(m_address); }
|
||||
[[nodiscard]] const u8* as_ptr() const { return reinterpret_cast<const u8*>(m_address); }
|
||||
|
||||
[[nodiscard]] VirtualAddress page_base() const { return VirtualAddress(m_address & 0xfffff000); }
|
||||
[[nodiscard]] VirtualAddress page_base() const { return VirtualAddress(m_address & ~(FlatPtr)0xfffu); }
|
||||
|
||||
private:
|
||||
FlatPtr m_address { 0 };
|
||||
|
|
Loading…
Add table
Reference in a new issue