L4Re Operating System Framework
Interface and Usage Documentation
|
Dataspace server class. More...
#include <dataspace_svr>
Public Member Functions | |
int | map (Dataspace::Offset offset, Dataspace::Map_addr local_addr, Dataspace::Flags flags, Dataspace::Map_addr min_addr, Dataspace::Map_addr max_addr, L4::Ipc::Snd_fpage &memory) |
Map a region of the dataspace. | |
virtual int | map_hook (Dataspace::Offset offs, unsigned order, Dataspace::Flags flags, Dataspace::Map_addr *base, unsigned *send_order) |
A hook that is called for acquiring the data to be mapped. | |
virtual void | take () noexcept |
Take a reference to this dataspace. | |
virtual unsigned long | release () noexcept |
Release a reference to this dataspace. | |
virtual long | copy (l4_addr_t dst_offs, l4_umword_t src_id, l4_addr_t src_offs, unsigned long size) noexcept |
Copy from src dataspace to this destination dataspace. | |
virtual long | clear (unsigned long offs, unsigned long size) const noexcept |
Clear a region in the dataspace. | |
virtual long | allocate (l4_addr_t offset, l4_size_t size, unsigned access) noexcept |
Allocate a region within a dataspace. | |
virtual unsigned long | page_shift () const noexcept |
Define the size of the flexpage to map. | |
virtual bool | is_static () const noexcept |
Return whether the dataspace is static. | |
virtual long | map_info (l4_addr_t &start_addr, l4_addr_t &end_addr) noexcept |
Return mapping information for no-MMU systems. | |
Dataspace server class.
The default implementation of the interface provides a continuous dataspace with contiguous pages.
Definition at line 40 of file dataspace_svr.
|
inlinevirtualnoexcept |
Allocate a region within a dataspace.
offset | Offset in the dataspace, in bytes. |
size | Size of the range, in bytes. |
access | Access mode with which the memory backing the dataspace region should be allocated. |
0 | Success |
<0 | Error |
Definition at line 235 of file dataspace_svr.
References L4_ENODEV.
|
inlinevirtualnoexcept |
Clear a region in the dataspace.
offs | Start of the region |
size | Size of the region |
0 | Success |
<0 | Error |
Definition at line 203 of file dataspace_svr.
References L4_ERANGE.
|
inlinevirtualnoexcept |
Copy from src dataspace to this destination dataspace.
dst_offs | Offset into the destination dataspace |
src_id | Local id of the source dataspace |
src_offs | Offset into the source dataspace |
size | Number of bytes to copy |
>=0 | Number of bytes copied |
<0 | An error occured. The error code may depend on the implementation. |
Definition at line 186 of file dataspace_svr.
References L4_ENODEV.
|
inlinevirtualnoexcept |
Return whether the dataspace is static.
Definition at line 255 of file dataspace_svr.
|
inline |
Map a region of the dataspace.
offset | Offset to start within data space | |
local_addr | Local address to map to. | |
flags | Dataspace flags, see L4Re::Dataspace::F::Flags. | |
min_addr | Defines start of receive window. | |
max_addr | Defines end of receive window. | |
[out] | memory | Send fpage to map |
0 | Success |
<0 | Error |
Definition at line 68 of file dataspace_svr.
References L4_EOK, L4_ERANGE, l4_fpage(), L4_PAGESHIFT, l4_round_page(), l4_trunc_page(), l4_trunc_size(), and map_hook().
|
inlinevirtual |
A hook that is called for acquiring the data to be mapped.
offs | Offset in dataspace to supply |
order | Log2-size of data to supply |
flags | Flags for the mapping |
base | Start address of the flexpage to be mapped |
send_order | Order (log2 of size) of the flexpage to be mapped |
<0 | Error and the map request will be aborted with that error. |
>=0 | Success |
Definition at line 147 of file dataspace_svr.
Referenced by map().
|
inlinevirtualnoexcept |
Return mapping information for no-MMU systems.
The method is only called on no-MMU systems. It should return the address of the underlying backing buffer so that the caller might map the dataspace.
The default implementation always returns an error because the derived class must provide the required information.
Definition at line 270 of file dataspace_svr.
References L4_EPERM.
|
inlinevirtualnoexcept |
Define the size of the flexpage to map.
Definition at line 247 of file dataspace_svr.
References L4_LOG2_PAGESIZE.
|
inlinevirtualnoexcept |
Release a reference to this dataspace.
Default does nothing and returns always zero.
Definition at line 171 of file dataspace_svr.
|
inlinevirtualnoexcept |
Take a reference to this dataspace.
Default does nothing.
Definition at line 161 of file dataspace_svr.