51 public L4::Kobject_0t< Dma_space,
53 L4::Type_info::Demand_t<1> >
137 friend void enum_bitops_enable(
Attribute);
191 L4Re::Dataspace::Offset offset,
196 static_cast<void>(dir);
261 L4Re::Dataspace::Offset offset,
268 return map_t::call(
c(), src, offset, size, align, attrs, dma_addr, dma_max);
273 L4Re::Dataspace::Offset offset,
329 static_cast<void>(attrs);
330 static_cast<void>(dir);
331 return unmap(dma_addr, size);
361 return unmap_t::call(
c(), dma_addr, size, flags);
376 public L4::Kobject_0t< Dma_space_mgr, L4::PROTO_ANY,
377 L4::Type_info::Demand_t<2> >
381 using Dma_size = Dma_space::Dma_size;
545 Dma_addr max_addr = -1,
549 return block_area_t::call(
c(), dma_space, addr, size, max_addr, flags,
559 unsigned char align));
597 block_area_t, set_limits_t> Rpcs;
L4::Cap related definitions.
A privileged interface to manage Dma_space associations for the clients.
l4_ret_t set_limits(L4::Ipc::Cap< Dma_space > dma_space, Dma_addr min_addr, Dma_addr max_addr)
Set lower and upper bound of DMA addresses.
Block_flag
Attributes used when blocking an area.
@ Search_addr
Search suitable address.
l4_ret_t disassociate(L4::Ipc::Cap< Dma_space > dma_space)
Disassociate the (kernel) DMA space from this Dma_space.
Space_attrib
Attributes assigned to the DMA space when associated with a specific device.
@ Identity_map
Request identity mappings.
L4::Types::Flags_t< Space_attrib, unsigned > Space_attribs
Attributes used when associating the DMA space.
l4_ret_t associate_phys(L4::Ipc::Cap< Dma_space > dma_space, Space_attribs attr)
Register a Dma_space to use for DMA.
l4_ret_t block_area(L4::Ipc::Cap< Dma_space > dma_space, L4::Ipc::In_out< Dma_addr * > addr, Dma_size size, Dma_addr max_addr=-1, Block_flags flags=Block_flags(), unsigned char align=L4_SUPERPAGESHIFT)
Block an area in a Dma_space.
L4::Types::Flags_t< Block_flag, unsigned > Block_flags
Attributes used when blocking an area.
l4_ret_t associate(L4::Ipc::Cap< Dma_space > dma_space, L4::Ipc::Cap< L4::Task > dma_task, Space_attribs attr)
Associate a (kernel) DMA space for a device to a Dma_space.
Managed DMA Address Space.
l4_ret_t map(L4::Ipc::Cap< L4Re::Dataspace > src, L4Re::Dataspace::Offset offset, Dma_size *size, Dma_addr *dma_addr, Dma_addr dma_max=-1, Attributes attrs=Search_addr, unsigned char align=L4_SUPERPAGESHIFT)
Map the given part of this data space into the DMA address space.
l4_ret_t unmap(Dma_addr dma_addr, Dma_size size, Unmap_flags flags=Unmap_flags())
Unmap the given part of this data space from the DMA address space.
L4::Types::Flags_t< Attribute, unsigned > Attributes
Attributes for DMA mappings.
l4_ret_t unmap(Dma_addr dma_addr, Dma_size size, Attributes attrs, Direction dir)
Unmap the given part of this data space from the DMA address space.
L4::Types::Flags_t< Unmap_flag, unsigned > Unmap_flags
Flags for Dma_space::unmap().
Unmap_flag
Flags used by Dma_space::unmap().
@ Cancel_reservation
Cancel a prior Attribute::Reserve claim instead of unmapping a dataspace mapping.
Attribute
Attributes used for the memory region.
@ Reserve
Reserve a region instead of mapping pages.
@ Replace
Replace mappings.
@ Search_addr
Search for suitable address.
@ Partial_map
Truncate mapping if it does not fit.
l4_uint64_t Dma_addr
Data type for DMA addresses.
Direction
Direction of the DMA transfers.
@ Bidirectional
device reads and writes to the memory
@ To_device
device reads the memory
@ None
device is coherently connected to the memory
@ From_device
device writes to the memory
l4_ret_t map(L4::Ipc::Cap< L4Re::Dataspace > src, L4Re::Dataspace::Offset offset, l4_size_t *size, Attributes attrs, Direction dir, Dma_addr *dma_addr)
Map the given part of this data space into the DMA address space.
Capability type for RPC interfaces (see L4::Cap<T>).
L4::Cap< Class > c() const noexcept
unsigned int l4_size_t
Unsigned size type.
unsigned long long l4_uint64_t
Unsigned 64bit value.
#define L4_SUPERPAGESHIFT
Size of a large page, log2-based.
Interface Definition Language.
#define L4_INLINE_RPC(res, name, args, attr...)
Define an inline RPC call (type and callable).
#define L4_RPC_NF(res, name, args...)
Define an RPC call type (the type only, no callable).
Fixed sized integer types, generic version.
Common L4 ABI Data Types.
l4_int16_t l4_ret_t
Return value of an IPC call as well as an RPC call.
L4Re Protocol Constants (C version).
Mark an argument as in-out argument.
Attribute for defining an optional RPC argument.
Standard list of RPCs of an interface.
Template type to define a flags type with bitwise operations.