Kernel: Make VirtualAddress::page_base() work with 64-bit addresses

This commit is contained in:
Gunnar Beutner 2021-07-17 01:43:38 +02:00 committed by Andreas Kling
parent 679ae6af81
commit c878054682
Notes: sideshowbarker 2024-07-18 08:48:48 +09:00

View File

@ -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 };