L4Re – L4 Runtime Environment
dma_space.h
Go to the documentation of this file.
1 
5 /*
6  * (c) 2014 Alexander Warg <alexander.warg@kernkonzept.com>
7  *
8  * This file is part of TUD:OS and distributed under the terms of the
9  * GNU General Public License 2.
10  * Please see the COPYING-GPL-2 file for details.
11  *
12  * As a special exception, you may use this file as part of a free software
13  * library without restriction. Specifically, if other files instantiate
14  * templates or use macros or inline functions from this file, or you compile
15  * this file and link it with other files to produce an executable, this
16  * file does not by itself cause the resulting executable to be covered by
17  * the GNU General Public License. This exception does not however
18  * invalidate any other reasons why the executable file might be covered by
19  * the GNU General Public License.
20  */
21 #pragma once
22 
29 #include <l4/sys/types.h>
30 #include <l4/re/c/dataspace.h>
31 
33 
38 {
43 };
44 
49 {
52 };
53 
60 
63 
69 L4_CV long
71  l4re_ds_offset_t offset,
72  l4_size_t * size, unsigned long attrs,
73  enum l4re_dma_space_direction dir,
75 
76 
82 L4_CV long
84  l4_size_t size, unsigned long attrs,
86 
92 L4_CV long
94  unsigned long attr) L4_NOTHROW;
95 
101 L4_CV long
103 
104 
unsigned int l4_size_t
Unsigned size type.
Definition: l4int.h:35
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition: compiler.h:186
#define EXTERN_C_BEGIN
Start section with C types and functions.
Definition: compiler.h:190
#define EXTERN_C_END
End section with C types and functions.
Definition: compiler.h:191
Data space C interface.
l4_uint64_t l4re_dma_space_dma_addr_t
Data type for DMA addresses.
Definition: dma_space.h:62
l4re_dma_space_direction
Direction of the DMA transfers.
Definition: dma_space.h:38
@ L4RE_DMA_SPACE_BIDIRECTIONAL
device reads and writes to the memory
Definition: dma_space.h:39
@ L4RE_DMA_SPACE_NONE
device is coherently connected
Definition: dma_space.h:42
@ L4RE_DMA_SPACE_TO_DEVICE
device reads the memory
Definition: dma_space.h:40
@ L4RE_DMA_SPACE_FROM_DEVICE
device writes to the memory
Definition: dma_space.h:41
l4re_dma_space_space_attribs
Attributes assigned to the DMA space when associated with a specific device.
Definition: dma_space.h:49
@ L4RE_DMA_SPACE_PHYS_SPACE
The DMA space has no DMA task assigned and uses the CPUs physical memory.
Definition: dma_space.h:51
@ L4RE_DMA_SPACE_COHERENT
The device is connected coherently with the cache.
Definition: dma_space.h:50
long l4re_dma_space_disassociate(l4re_dma_space_t dma)
Disassociate the DMA task from this Dma_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.
l4_cap_idx_t l4re_dma_space_t
DMA space capability type.
Definition: dma_space.h:59
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.
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.
l4_cap_idx_t l4re_ds_t
Dataspace type.
Definition: dataspace.h:39
unsigned long long l4_uint64_t
Unsigned 64bit value.
Definition: l4int.h:42
unsigned long l4_cap_idx_t
L4 Capability selector Type.
Definition: types.h:342
#define L4_CV
Define calling convention.
Definition: linkage.h:44
Common L4 ABI Data Types.