diff --git a/kernel/include/kernel/Memory/DMARegion.h b/kernel/include/kernel/Memory/DMARegion.h index bf6b58eb..0f97c64d 100644 --- a/kernel/include/kernel/Memory/DMARegion.h +++ b/kernel/include/kernel/Memory/DMARegion.h @@ -15,6 +15,9 @@ namespace Kernel vaddr_t vaddr() const { return m_vaddr; } paddr_t paddr() const { return m_paddr; } + paddr_t vaddr_to_paddr(vaddr_t vaddr) const { return vaddr - m_vaddr + m_paddr; } + vaddr_t paddr_to_vaddr(paddr_t paddr) const { return paddr - m_paddr + m_vaddr; } + private: DMARegion(size_t size, vaddr_t vaddr, paddr_t paddr);