[efi] Provide DMA operations for EFI PCI devices

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2020-11-04 15:23:14 +00:00
parent dda03c884d
commit 38a54bd3b1
3 changed files with 242 additions and 0 deletions

View File

@@ -32,6 +32,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
struct dma_mapping {
/** Device-side address */
physaddr_t addr;
/** Platform mapping token */
void *token;
};
/** A DMA-capable device */

View File

@@ -12,6 +12,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <stdint.h>
#include <ipxe/device.h>
#include <ipxe/tables.h>
#include <ipxe/dma.h>
#include <ipxe/pci_io.h>
/** PCI vendor ID */
@@ -187,6 +188,8 @@ struct pci_class_id {
struct pci_device {
/** Generic device */
struct device dev;
/** DMA device */
struct dma_device dma;
/** Memory base
*
* This is the physical address of the first valid memory BAR.