iPXE
Data Fields
dma_operations Struct Reference

DMA operations. More...

#include <dma.h>

Data Fields

int(* map )(struct dma_device *dma, struct dma_mapping *map, physaddr_t addr, size_t len, int flags)
 Map buffer for DMA. More...
 
void(* unmap )(struct dma_device *dma, struct dma_mapping *map)
 Unmap buffer. More...
 
void *(* alloc )(struct dma_device *dma, struct dma_mapping *map, size_t len, size_t align)
 Allocate and map DMA-coherent buffer. More...
 
void(* free )(struct dma_device *dma, struct dma_mapping *map, void *addr, size_t len)
 Unmap and free DMA-coherent buffer. More...
 
userptr_t(* umalloc )(struct dma_device *dma, struct dma_mapping *map, size_t len, size_t align)
 Allocate and map DMA-coherent buffer from external (user) memory. More...
 
void(* ufree )(struct dma_device *dma, struct dma_mapping *map, userptr_t addr, size_t len)
 Unmap and free DMA-coherent buffer from external (user) memory. More...
 
void(* set_mask )(struct dma_device *dma, physaddr_t mask)
 Set addressable space mask. More...
 

Detailed Description

DMA operations.

Definition at line 59 of file dma.h.

Field Documentation

◆ map

int( * dma_operations::map) (struct dma_device *dma, struct dma_mapping *map, physaddr_t addr, size_t len, int flags)

Map buffer for DMA.

Parameters
dmaDMA device
mapDMA mapping to fill in
addrBuffer address
lenLength of buffer
flagsMapping flags
Return values
rcReturn status code

Definition at line 70 of file dma.h.

◆ unmap

void( * dma_operations::unmap) (struct dma_device *dma, struct dma_mapping *map)

Unmap buffer.

Parameters
dmaDMA device
mapDMA mapping

Definition at line 78 of file dma.h.

◆ alloc

void*( * dma_operations::alloc) (struct dma_device *dma, struct dma_mapping *map, size_t len, size_t align)

Allocate and map DMA-coherent buffer.

Parameters
dmaDMA device
mapDMA mapping to fill in
lenLength of buffer
alignPhysical alignment
Return values
addrBuffer address, or NULL on error

Definition at line 88 of file dma.h.

◆ free

void( * dma_operations::free) (struct dma_device *dma, struct dma_mapping *map, void *addr, size_t len)

Unmap and free DMA-coherent buffer.

Parameters
dmaDMA device
mapDMA mapping
addrBuffer address
lenLength of buffer

Definition at line 98 of file dma.h.

◆ umalloc

userptr_t( * dma_operations::umalloc) (struct dma_device *dma, struct dma_mapping *map, size_t len, size_t align)

Allocate and map DMA-coherent buffer from external (user) memory.

Parameters
dmaDMA device
mapDMA mapping to fill in
lenLength of buffer
alignPhysical alignment
Return values
addrBuffer address, or NULL on error

Definition at line 109 of file dma.h.

◆ ufree

void( * dma_operations::ufree) (struct dma_device *dma, struct dma_mapping *map, userptr_t addr, size_t len)

Unmap and free DMA-coherent buffer from external (user) memory.

Parameters
dmaDMA device
mapDMA mapping
addrBuffer address
lenLength of buffer

Definition at line 120 of file dma.h.

◆ set_mask

void( * dma_operations::set_mask) (struct dma_device *dma, physaddr_t mask)

Set addressable space mask.

Parameters
dmaDMA device
maskAddressable space mask

Definition at line 128 of file dma.h.


The documentation for this struct was generated from the following file: