L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
dma_space
Go to the documentation of this file.
1// -*- Mode: C++ -*-
2// vim:ft=cpp
6/*
7 * (c) 2014 Alexander Warg <alexander.warg@kernkonzept.com>
8 *
9 * License: see LICENSE.spdx (in this directory or the directories above)
10 */
11
12#pragma once
13
14#include <l4/sys/types.h>
15#include <l4/sys/l4int.h>
16#include <l4/sys/capability>
17#include <l4/re/dataspace>
18#include <l4/re/protocols.h>
19#include <l4/sys/cxx/types>
20#include <l4/sys/cxx/ipc_types>
21#include <l4/sys/cxx/ipc_iface>
22
23namespace L4Re
24{
25
52class Dma_space :
53 public L4::Kobject_0t< Dma_space,
54 L4RE_PROTO_DMA_SPACE,
55 L4::Type_info::Demand_t<1> >
56{
57public:
60
71
77 {
90 };
91
98
120
123
160 long, map, (L4::Ipc::Cap<L4Re::Dataspace> src,
161 L4Re::Dataspace::Offset offset,
163 Attributes attrs, Direction dir,
164 Dma_addr *dma_addr));
165
179 long, unmap, (Dma_addr dma_addr,
180 l4_size_t size, Attributes attrs, Direction dir));
181
205 Space_attribs attr),
207
219 long, disassociate, (),
221
223};
224
225}
L4::Cap related definitions.
Managed DMA Address Space.
Definition dma_space:56
long disassociate()
Disassociate the (kernel) DMA space from this Dma_space.
Attribute
Attributes used for the memory region during the transfer.
Definition dma_space:77
@ No_sync
Do not sync the memory hierarchy.
Definition dma_space:89
Space_attrib
Attributes assigned to the DMA space when associated with a specific device.
Definition dma_space:105
@ Phys_space
The DMA space has no DMA task assigned and uses the CPUs physical memory.
Definition dma_space:118
@ Coherent
The device is connected coherently with the cache.
Definition dma_space:112
L4::Types::Flags< Attribute > Attributes
Attributes for DMA mappings.
Definition dma_space:97
long associate(L4::Ipc::Opt< L4::Ipc::Cap< L4::Task > > dma_task, Space_attribs attr)
Associate a (kernel) DMA space for a device to this Dma_space.
long unmap(Dma_addr dma_addr, l4_size_t size, Attributes attrs, Direction dir)
Unmap the given part of this data space from the DMA address space.
l4_uint64_t Dma_addr
Data type for DMA addresses.
Definition dma_space:59
Direction
Direction of the DMA transfers.
Definition dma_space:65
@ Bidirectional
device reads and writes to the memory
Definition dma_space:66
@ To_device
device reads the memory
Definition dma_space:67
@ None
device is coherently connected to the memory
Definition dma_space:69
@ From_device
device writes to the memory
Definition dma_space:68
L4::Types::Flags< Space_attrib > Space_attribs
Attributes used when configuring the DMA space.
Definition dma_space:122
Capability type for RPC interfaces (see L4::Cap<T>).
Definition ipc_types:699
Template for defining typical Flags bitmaps.
Definition types:53
Dataspace interface.
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
Interface Definition Language.
#define L4_INLINE_RPC(res, name, args, attr...)
Define an inline RPC call (type and callable).
Definition ipc_iface:476
Common L4 ABI Data Types.
L4Re C++ Interfaces.
Definition cmd_control:14
L4Re Protocol Constants (C version)
RPC attribute for an RPC call with required rights.
Definition ipc_iface:265
Mark an argument as in-out argument.
Definition ipc_types:42
Attribute for defining an optional RPC argument.
Definition ipc_types:137
Standard list of RPCs of an interface.
Definition __typeinfo.h:428