diff options
| author | Michael Brown | 2020-11-25 16:52:00 +0100 |
|---|---|---|
| committer | Michael Brown | 2020-11-25 17:15:55 +0100 |
| commit | cf12a41703a8b2292e5d2d7528c2733c37869681 (patch) | |
| tree | 72e60b6240cdd10816b7dce5fcc98822ae94e957 /src/core/string.c | |
| parent | [intelxl] Configure DMA mask as 64-bit (diff) | |
| download | ipxe-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 'src/core/string.c')
0 files changed, 0 insertions, 0 deletions
