public class DirectMemoryRegion
extends java.lang.Object
Constructor and Description |
---|
DirectMemoryRegion(long start,
long size)
Creates a DMA memory definition.
|
Modifier and Type | Method and Description |
---|---|
long |
physicalAddressOf(long address)
Translates a DMA space address into a physical address.
|
long |
regionAddressOf(long address)
Translates a physical address into a DMA region address.
|
public DirectMemoryRegion(long start, long size) throws StaticIllegalArgumentException
start
- The DMA address space in the physical address
space of the main processor.size
- The number of bytes in the DMA address space.StaticIllegalArgumentException
- when
start
is less than zero or start + size
is
larger than the physical memory of the system.public long regionAddressOf(long address) throws StaticIllegalArgumentException
address
- The address to translate.StaticIllegalArgumentException
- when the
result is outside the DMA space.public long physicalAddressOf(long address) throws StaticIllegalArgumentException
address
- The address to translate.StaticIllegalArgumentException
- when the
input is outside the DMA space.