L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
18#include <l4/sys/types.h>
19#include <l4/re/c/dataspace.h>
20
22
33
42
49
52
59L4_CV long
61 l4re_ds_offset_t offset,
62 l4_size_t * size, unsigned long attrs,
65
66
73L4_CV long
75 l4_size_t size, unsigned long attrs,
77
84L4_CV long
86 unsigned long attr) L4_NOTHROW;
87
94L4_CV long
96
97
Data space C interface.
l4_uint64_t l4re_dma_space_dma_addr_t
Data type for DMA addresses.
Definition dma_space.h:51
l4re_dma_space_direction
Direction of the DMA transfers.
Definition dma_space.h:27
@ L4RE_DMA_SPACE_BIDIRECTIONAL
device reads and writes to the memory
Definition dma_space.h:28
@ L4RE_DMA_SPACE_NONE
device is coherently connected
Definition dma_space.h:31
@ L4RE_DMA_SPACE_TO_DEVICE
device reads the memory
Definition dma_space.h:29
@ L4RE_DMA_SPACE_FROM_DEVICE
device writes to the memory
Definition dma_space.h:30
l4re_dma_space_space_attribs
Attributes assigned to the DMA space when associated with a specific device.
Definition dma_space.h:38
@ L4RE_DMA_SPACE_PHYS_SPACE
The DMA space has no DMA task assigned and uses the CPUs physical memory.
Definition dma_space.h:40
@ L4RE_DMA_SPACE_COHERENT
The device is connected coherently with the cache.
Definition dma_space.h:39
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:48
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_cap_idx_t l4re_ds_t
Dataspace type.
Definition dataspace.h:28
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:335
#define __END_DECLS
End section with C types and functions.
Definition compiler.h:167
#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:159
#define __BEGIN_DECLS
Start section with C types and functions.
Definition compiler.h:164
Common L4 ABI Data Types.