summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorMichael Brown2020-11-25 16:52:00 +0100
committerMichael Brown2020-11-25 17:15:55 +0100
commitcf12a41703a8b2292e5d2d7528c2733c37869681 (patch)
tree72e60b6240cdd10816b7dce5fcc98822ae94e957 /contrib
parent[intelxl] Configure DMA mask as 64-bit (diff)
downloadipxe-cf12a41703a8b2292e5d2d7528c2733c37869681.tar.gz
ipxe-cf12a41703a8b2292e5d2d7528c2733c37869681.tar.xz
ipxe-cf12a41703a8b2292e5d2d7528c2733c37869681.zip
[dma] Modify DMA API to simplify calculation of medial addresses
Redefine the value stored within a DMA mapping to be the offset between physical addresses and DMA addresses within the mapped region. Provide a dma() wrapper function to calculate the DMA address for any pointer within a mapped region, thereby simplifying the use cases when a device needs to be given addresses other than the region start address. On a platform using the "flat" DMA implementation the DMA offset for any mapped region is always zero, with the result that dma_map() can be optimised away completely and dma() reduces to a straightforward call to virt_to_phys(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions