L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
dma_space.h
Go to the documentation of this file.
1
5/*
6 * (c) 2014 Alexander Warg <alexander.warg@kernkonzept.com>
7 *
8 * License: see LICENSE.spdx (in this directory or the directories above)
9 */
10#pragma once
11
17
18#include <l4/sys/compiler.h>
19#include <l4/sys/types.h>
20#include <l4/re/c/dataspace.h>
21
23
34
43
50
53
60L4_CV long
62 l4re_ds_offset_t offset,
63 l4_size_t * size, unsigned long attrs,
66
67
74L4_CV long
76 l4_size_t size, unsigned long attrs,
78
85L4_CV long
87 unsigned long attr) L4_NOTHROW;
88
95L4_CV long
97
98
L4 compiler related defines.
Data space C interface.
l4_uint64_t l4re_dma_space_dma_addr_t
Data type for DMA addresses.
Definition dma_space.h:52
l4re_dma_space_direction
Direction of the DMA transfers.
Definition dma_space.h:28
@ L4RE_DMA_SPACE_BIDIRECTIONAL
device reads and writes to the memory
Definition dma_space.h:29
@ L4RE_DMA_SPACE_NONE
device is coherently connected
Definition dma_space.h:32
@ L4RE_DMA_SPACE_TO_DEVICE
device reads the memory
Definition dma_space.h:30
@ L4RE_DMA_SPACE_FROM_DEVICE
device writes to the memory
Definition dma_space.h:31
l4re_dma_space_space_attribs
Attributes assigned to the DMA space when associated with a specific device.
Definition dma_space.h:39
@ L4RE_DMA_SPACE_PHYS_SPACE
The DMA space has no DMA task assigned and uses the CPUs physical memory.
Definition dma_space.h:41
@ L4RE_DMA_SPACE_COHERENT
The device is connected coherently with the cache.
Definition dma_space.h:40
long l4re_dma_space_disassociate(l4re_dma_space_t dma)
Disassociate the (kernel) DMA space 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:49
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_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_BEGIN_DECLS typedef l4_cap_idx_t l4re_ds_t
Dataspace type.
Definition dataspace.h:29
unsigned int l4_size_t
Unsigned size type.
Definition l4int.h:24
unsigned long long l4_uint64_t
Unsigned 64bit value.
Definition l4int.h:31
unsigned long l4_cap_idx_t
Capability selector type.
Definition types.h:336
#define L4_CV
Define calling convention.
Definition linkage.h:33
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition compiler.h:161
#define L4_BEGIN_DECLS
Start section with C types and functions.
Definition compiler.h:165
#define L4_END_DECLS
End section with C types and functions.
Definition compiler.h:166
Common L4 ABI Data Types.