L4Re - L4 Runtime Environment
dma_space.h File Reference

DMA space C interface. More...

#include <l4/sys/types.h>
#include <l4/re/c/dataspace.h>
+ Include dependency graph for dma_space.h:

Go to the source code of this file.

Typedefs

typedef l4_cap_idx_t l4re_dma_space_t
 DMA space capability type. More...
 
typedef l4_uint64_t l4re_dma_space_dma_addr_t
 Data type for DMA addresses. More...
 

Enumerations

enum  l4re_dma_space_direction { L4RE_DMA_SPACE_BIDIRECTIONAL, L4RE_DMA_SPACE_TO_DEVICE, L4RE_DMA_SPACE_FROM_DEVICE, L4RE_DMA_SPACE_NONE }
 Direction of the DMA transfers. More...
 
enum  l4re_dma_space_space_attribs { L4RE_DMA_SPACE_COHERENT = 1 << 0, L4RE_DMA_SPACE_PHYS_SPACE = 1 << 1 }
 Attributes assigned to the DMA space when associated with a specific device. More...
 

Functions

long l4re_dma_space_map (l4re_dma_space_t dma, l4re_ds_t src, l4_addr_t offset, l4_size_t *size, unsigned long attrs, enum l4re_dma_space_direction dir, l4re_dma_space_dma_addr_t *dma_addr) L4_NOTHROW
 Map the given part of this data space into the DMA address space. More...
 
long l4re_dma_space_unmap (l4re_dma_space_t dma, l4re_dma_space_dma_addr_t dma_addr, l4_size_t size, unsigned long attrs, enum l4re_dma_space_direction dir) L4_NOTHROW
 Unmap the given part of this data space from the DMA address space. More...
 
long l4re_dma_space_associate (l4re_dma_space_t dma, l4_cap_idx_t dma_task, unsigned long attr) L4_NOTHROW
 Associate a DMA task for a device to this Dma_space. More...
 
long l4re_dma_space_disassociate (l4re_dma_space_t dma)
 Disassociate the DMA task from this Dma_space. More...
 

Detailed Description

DMA space C interface.

Definition in file dma_space.h.

Typedef Documentation

◆ l4re_dma_space_dma_addr_t

Data type for DMA addresses.

Definition at line 62 of file dma_space.h.

Enumeration Type Documentation

◆ l4re_dma_space_direction

Direction of the DMA transfers.

Enumerator
L4RE_DMA_SPACE_BIDIRECTIONAL 

device reads and writes to the memory

L4RE_DMA_SPACE_TO_DEVICE 

device reads the memory

L4RE_DMA_SPACE_FROM_DEVICE 

device writes to the memory

L4RE_DMA_SPACE_NONE 

device is coherently connected

Definition at line 37 of file dma_space.h.

◆ l4re_dma_space_space_attribs

Attributes assigned to the DMA space when associated with a specific device.

See also
Space_attribs
Enumerator
L4RE_DMA_SPACE_COHERENT 
L4RE_DMA_SPACE_PHYS_SPACE 

Definition at line 48 of file dma_space.h.