![]() |
L4Re Operating System Framework
Interface and Usage Documentation
|
Send item or return item. More...
#include <ipc_types>
Public Types | |
enum | Map_type { Map = L4_MAP_ITEM_MAP , Grant = L4_MAP_ITEM_GRANT } |
*(Defined for send items only.)* Kind of mapping. More... | |
enum | Cacheopt { None = 0 , Cached = L4_FPAGE_CACHEABLE << 4 , Buffered = L4_FPAGE_BUFFERABLE << 4 , Uncached = L4_FPAGE_UNCACHEABLE << 4 } |
*(Defined for memory send items only.)* Caching options, see l4_fpage_cacheability_opt_t. More... | |
enum | Continue { Single = 0 , Last = 0 , More = L4_ITEM_CONT , Compound = L4_ITEM_CONT } |
Specify if the following item is associated with the same receive item as this one, see L4_ITEM_CONT. More... | |
![]() | |
enum | Type { Special = L4_FPAGE_SPECIAL << 4 , Memory = L4_FPAGE_MEMORY << 4 , Io = L4_FPAGE_IO << 4 , Obj = L4_FPAGE_OBJ << 4 } |
Type of mapping object, see L4_fpage_type. More... | |
Public Member Functions | |
Snd_fpage (l4_umword_t base=0, l4_umword_t data=0) noexcept | |
Construct from raw values. | |
Snd_fpage (l4_fpage_t const &fp, l4_addr_t snd_base=0, Map_type map_type=Map, Cacheopt cache=None, Continue cont=Last) noexcept | |
Construct a send item for the memory space. | |
Snd_fpage (L4::Cap< void > cap, unsigned rights, Map_type map_type=Map) noexcept | |
Construct a send item for the object space. | |
unsigned | order () const noexcept |
*(Defined only if send item or if local_id_received() is true.)* Get log₂ size. | |
unsigned | snd_order () const noexcept |
*(Defined only if send item or if local_id_received() is true.)* Get log₂ size. | |
unsigned | rcv_order () const noexcept |
*(Defined for return items only.)* Get log₂ size. | |
l4_addr_t | base () const noexcept |
*(Defined only if send item or if local_id_received() is true.)* Get the start of the item (i.e., the start of its flexpage). | |
l4_addr_t | snd_base () const noexcept |
Get the position in receive window for the case that this item has a different size than the corresponding receive item. | |
void | snd_base (l4_addr_t b) noexcept |
Set the position in receive window for the case that this item has a different size than the corresponding receive item. | |
bool | is_valid () const noexcept |
Check if the capability is valid. | |
bool | cap_received () const noexcept |
*(Defined for return items only.)* Check if at least one object capability has been mapped for this item. | |
bool | id_received () const noexcept |
*(Defined for return items only.)* Check if an IPC gate label has been received instead of a mapping. | |
bool | local_id_received () const noexcept |
*(Defined for return items only.)* Check if a raw object flexpage has been received instead of a mapping. | |
bool | is_compound () const noexcept |
Check if the item has the compound bit set, see Continue. | |
![]() | |
Gen_fpage (l4_umword_t base, l4_umword_t data) noexcept | |
Construct from raw values. | |
l4_umword_t | data () const noexcept |
Return the raw flexpage descriptor. | |
l4_umword_t | base_x () const noexcept |
Return the raw base descriptor. | |
Static Public Member Functions | |
static Snd_fpage | obj (l4_cap_idx_t base, int order, unsigned char rights, l4_addr_t snd_base=0, Map_type map_type=Map, Continue cont=Last) noexcept |
Construct a send item for the object space. | |
static Snd_fpage | mem (l4_addr_t base, int order, unsigned char rights, l4_addr_t snd_base=0, Map_type map_type=Map, Cacheopt cache=None, Continue cont=Last) noexcept |
Construct a send item for the memory space. | |
static Snd_fpage | io (unsigned long base, int order, unsigned char rights, l4_addr_t snd_base=0, Map_type map_type=Map, Continue cont=Last) noexcept |
Construct a send item for the I/O port space. | |
Send item or return item.
This class represents a typed message item in the message registers of the UTCB. If it is provided by the sender, then it is a send item. If it is provided by the kernel during IPC, it is a return item.
Note that some members are dedicated for send items only or return items only.
*(Defined for memory send items only.)* Caching options, see l4_fpage_cacheability_opt_t.
Specify if the following item is associated with the same receive item as this one, see L4_ITEM_CONT.
Enumerator | |
---|---|
Single | Inverse of Compound. |
Last | Inverse of More. |
More | Alias for Compound. |
Compound | Denote that the following item shall be put into the same receive item as this one. |
*(Defined for send items only.)* Kind of mapping.
Enumerator | |
---|---|
Map | Flag as usual map operation. |
Grant | Flag as grant instead of map operation. This means, the sender delegates access to the receiver and the kernel removes the rights from the sender (basically a move operation). The mapping in the receiver gets the new parent of any child mappings of the mapping of the sender. Rights revocation via send item/flexpage is not guaranteed to be applied to descendant mappings in case of grant. See Spaces and Mappings for more details on map/grant.
|
|
inlinenoexcept |
Construct a send item for the memory space.
fp | Memory flexpage defining which range and kind of capabilities shall be sent (see l4_fpage()). |
snd_base | Position in receive window in case it has a different size than fp . |
map_type | See Map_type. |
cache | See Cacheopt. |
cont | See Continue. |
|
inlinenoexcept |
Construct a send item for the object space.
cap | Capability to be sent. |
rights | Permissions to be transferred. See L4_cap_fpage_rights and L4_obj_fpage_ctl. |
map_type | See Map_type. |
|
inlinenoexcept |
*(Defined for return items only.)* Check if at least one object capability has been mapped for this item.
The capabilities themselves can then be retrieved from the cap slots that have been provided in the receive operation.
true
and the receive window covers more than one capability slot, then it is not possible to determine which slots actually got capabilities mapped from the sender.false
.
|
inlinenoexcept |
*(Defined for return items only.)* Check if an IPC gate label has been received instead of a mapping.
If the L4_RCV_ITEM_LOCAL_ID flag has been set by the receiver, the conditions for local_id_received() do not apply, the sender sent an IPC gate capability, and the receiving thread is in the same task as the thread that is attached to the IPC gate, then no mapping is done for this item and only the bitwise OR (|
) of the label of the IPC gate and the special and write permission (L4_CAP_FPAGE_S and L4_CAP_FPAGE_W) that would have been mapped is received.
The bitwise OR of the label and the permissions can be retrieved with Gen_fpage::data().
|
inlinestaticnoexcept |
Construct a send item for the I/O port space.
base | Start of flexpage (see l4_iofpage()). |
order | Log₂ size of flexpage (see l4_iofpage()). |
rights | Permissions of flexpage (see L4_fpage_rights). |
snd_base | Position in receive window in case it has a different size than 1 << order . |
map_type | See Map_type. |
cont | See Continue. |
Definition at line 445 of file ipc_types.
References base(), l4_fpage_set_rights(), l4_iofpage(), None, order(), and snd_base().
|
inlinenoexcept |
|
inlinenoexcept |
*(Defined for return items only.)* Check if a raw object flexpage has been received instead of a mapping.
If the L4_RCV_ITEM_LOCAL_ID flag has been set by the receiver, and sender and receiver are in the same task, then no mapping is done for this item and only the raw flexpage (l4_fpage_t) is received.
This function checks if this is the case and if it is an object flexpage.
The flexpage can be retrieved with Gen_fpage::data().
false
.
|
inlinestaticnoexcept |
Construct a send item for the memory space.
base | Start of flexpage (see l4_fpage()). |
order | Log₂ size of flexpage (see l4_fpage()). |
rights | Permissions of flexpage (see l4_fpage()). |
snd_base | Position in receive window in case it has a different size than 1 << order . |
map_type | See Map_type. |
cache | See Cacheopt. |
cont | See Continue. |
Definition at line 424 of file ipc_types.
References base(), l4_fpage(), order(), and snd_base().
|
inlinestaticnoexcept |
Construct a send item for the object space.
base | Start of flexpage (see l4_obj_fpage()). |
order | Log₂ size of flexpage (see l4_obj_fpage()). |
rights | Permissions of flexpage (see l4_obj_fpage()). |
snd_base | Position in receive window in case it has a different size than 1 << order . |
map_type | See Map_type. |
cont | See Continue. |
Definition at line 402 of file ipc_types.
References base(), l4_obj_fpage(), None, order(), and snd_base().