]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[dma] Define a DMA API to allow for non-flat device address spaces
authorMichael Brown <mcb30@ipxe.org>
Wed, 4 Nov 2020 15:18:49 +0000 (15:18 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 5 Nov 2020 20:03:50 +0000 (20:03 +0000)
commitdda03c884d70d18546bb2d02f92acb4c4da28fc8
tree775637d2c67340a945df274ff5da3d88353d43c8
parentbe1c87b72237f633c4f4b05bcb133acf2967d788
[dma] Define a DMA API to allow for non-flat device address spaces

iPXE currently assumes that DMA-capable devices can directly address
physical memory using host addresses.  This assumption fails when
using an IOMMU.

Define an internal DMA API with two implementations: a "flat"
implementation for use in legacy BIOS or other environments in which
flat physical addressing is guaranteed to be used and all allocated
physical addresses are guaranteed to be within a 32-bit address space,
and an "operations-based" implementation for use in UEFI or other
environments in which DMA mapping may require bus-specific handling.

The purpose of the fully inlined "flat" implementation is to allow the
trivial identity DMA mappings to be optimised out at build time,
thereby avoiding an increase in code size for legacy BIOS builds.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/config/defaults/efi.h
src/config/defaults/linux.h
src/config/defaults/pcbios.h
src/core/dma.c [new file with mode: 0644]
src/include/ipxe/dma.h [new file with mode: 0644]
src/include/ipxe/errfile.h