summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Libraries/LibBareMetal/Memory/PhysicalAddress.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibBareMetal/Memory/PhysicalAddress.h b/Libraries/LibBareMetal/Memory/PhysicalAddress.h
index 4b51a4fd18..02594b3389 100644
--- a/Libraries/LibBareMetal/Memory/PhysicalAddress.h
+++ b/Libraries/LibBareMetal/Memory/PhysicalAddress.h
@@ -48,6 +48,7 @@ public:
const u8* as_ptr() const { return reinterpret_cast<const u8*>(m_address); }
PhysicalAddress page_base() const { return PhysicalAddress(m_address & 0xfffff000); }
+ PhysicalAddress offset_in_page() const { return PhysicalAddress(m_address & 0xfff); }
bool operator==(const PhysicalAddress& other) const { return m_address == other.m_address; }
bool operator!=(const PhysicalAddress& other) const { return m_address != other.m_address; }