L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
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.
 
typedef l4_uint64_t l4re_dma_space_dma_addr_t
 Data type for DMA addresses.
 

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, l4re_ds_offset_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.
 
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.
 
long l4re_dma_space_associate (l4re_dma_space_t dma, l4_cap_idx_t dma_task, unsigned long attr) L4_NOTHROW
 Associate a (kernel) DMA space for a device to this Dma_space.
 
long l4re_dma_space_disassociate (l4re_dma_space_t dma)
 Disassociate the (kernel) DMA space from this Dma_space.
 

Detailed Description

DMA space C interface.

Definition in 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 

The device is connected coherently with the cache.

This means that the map() and unmap() do not need to sync CPU caches before and after DMA.

L4RE_DMA_SPACE_PHYS_SPACE 

The DMA space has no DMA task assigned and uses the CPUs physical memory.

Definition at line 48 of file dma_space.h.