L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
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 * This file is part of TUD:OS and distributed under the terms of the
10 * GNU General Public License 2.
11 * Please see the COPYING-GPL-2 file for details.
12 *
13 * As a special exception, you may use this file as part of a free software
14 * library without restriction. Specifically, if other files instantiate
15 * templates or use macros or inline functions from this file, or you compile
16 * this file and link it with other files to produce an executable, this
17 * file does not by itself cause the resulting executable to be covered by
18 * the GNU General Public License. This exception does not however
19 * invalidate any other reasons why the executable file might be covered by
20 * the GNU General Public License.
21 */
22
23#pragma once
24
25#include <l4/sys/types.h>
26#include <l4/sys/l4int.h>
27#include <l4/sys/capability>
28#include <l4/re/dataspace>
29#include <l4/re/protocols.h>
30#include <l4/sys/cxx/types>
31#include <l4/sys/cxx/ipc_types>
32#include <l4/sys/cxx/ipc_iface>
33
34namespace L4Re
35{
36
63class Dma_space :
64 public L4::Kobject_0t< Dma_space,
65 L4RE_PROTO_DMA_SPACE,
66 L4::Type_info::Demand_t<1> >
67{
68public:
71
82
88 {
100 No_sync
101 };
102
109
131
134
171 long, map, (L4::Ipc::Cap<L4Re::Dataspace> src,
172 L4Re::Dataspace::Offset offset,
174 Attributes attrs, Direction dir,
175 Dma_addr *dma_addr));
176
190 long, unmap, (Dma_addr dma_addr,
191 l4_size_t size, Attributes attrs, Direction dir));
192
216 Space_attribs attr),
218
230 long, disassociate, (),
232
234};
235
236}
L4::Cap related definitions.
Managed DMA Address Space.
Definition dma_space:67
long disassociate()
Disassociate the (kernel) DMA space from this Dma_space.
Attribute
Attributes used for the memory region during the transfer.
Definition dma_space:88
@ No_sync
Do not sync the memory hierarchy.
Definition dma_space:100
Space_attrib
Attributes assigned to the DMA space when associated with a specific device.
Definition dma_space:116
@ Phys_space
The DMA space has no DMA task assigned and uses the CPUs physical memory.
Definition dma_space:129
@ Coherent
The device is connected coherently with the cache.
Definition dma_space:123
L4::Types::Flags< Attribute > Attributes
Attributes for DMA mappings.
Definition dma_space:108
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:70
Direction
Direction of the DMA transfers.
Definition dma_space:76
@ Bidirectional
device reads and writes to the memory
Definition dma_space:77
@ To_device
device reads the memory
Definition dma_space:78
@ None
device is coherently connected to the memory
Definition dma_space:80
@ From_device
device writes to the memory
Definition dma_space:79
L4::Types::Flags< Space_attrib > Space_attribs
Attributes used when configuring the DMA space.
Definition dma_space:133
Capability type for RPC interfaces (see L4::Cap<T>).
Definition ipc_types:563
Template for defining typical Flags bitmaps.
Definition types:64
Dataspace interface.
unsigned int l4_size_t
Unsigned size type.
Definition l4int.h:35
unsigned long long l4_uint64_t
Unsigned 64bit value.
Definition l4int.h:42
Interface Definition Language.
#define L4_INLINE_RPC(res, name, args, attr...)
Define an inline RPC call (type and callable).
Definition ipc_iface:469
Common L4 ABI Data Types.
L4Re C++ Interfaces.
Definition l4re.dox:17
L4Re Protocol Constants (C version)
RPC attribute for an RPC call with required rights.
Definition ipc_iface:258
Mark an argument as in-out argument.
Definition ipc_types:53
Attribute for defining an optional RPC argument.
Definition ipc_types:148
Standard list of RPCs of an interface.
Definition __typeinfo.h:439