forked from Bananymous/banan-os
Kernel: Add vaddr/paddr conversion functions to DMARegion
This commit is contained in:
parent
ab8b77406d
commit
790064d248
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue