![]() |
L4Re Operating System Framework
Interface and Usage Documentation
|
C++ interface of the initial environment that is provided to an L4 task. More...
#include <env>
Public Types | |
typedef l4re_env_cap_entry_t | Cap_entry |
C++ type for an entry in the initial objects array. |
Public Member Functions | |
L4::Cap< Parent > | parent () const noexcept |
Object-capability to the parent. | |
L4::Cap< Mem_alloc > | mem_alloc () const noexcept |
Object-capability to the memory allocator. | |
L4::Cap< L4::Factory > | user_factory () const noexcept |
Object-capability to the user-level object factory. | |
L4::Cap< Rm > | rm () const noexcept |
Object-capability to the region map. | |
L4::Cap< Log > | log () const noexcept |
Object-capability to the logging service. | |
L4::Cap< L4::Thread > | main_thread () const noexcept |
Object-capability of the first user thread. | |
L4::Cap< L4::Task > | task () const noexcept |
Object-capability of the user task. | |
L4::Cap< L4::Factory > | factory () const noexcept |
Object-capability to the factory object available to the task. | |
l4_cap_idx_t | first_free_cap () const noexcept |
First available capability selector. | |
l4_fpage_t | utcb_area () const noexcept |
UTCB area of the task. | |
l4_addr_t | first_free_utcb () const noexcept |
First free UTCB. | |
Cap_entry const * | initial_caps () const noexcept |
Get a pointer to the first entry in the initial objects array. | |
Cap_entry const * | get (char const *name, unsigned l) const noexcept |
Get the Cap_entry for the object named name. | |
template<typename T> | |
L4::Cap< T > | get_cap (char const *name, unsigned l) const noexcept |
Get the capability selector for the object named name. | |
template<typename T> | |
L4::Cap< T > | get_cap (char const *name) const noexcept |
Get the capability selector for the object named name. | |
void | parent (L4::Cap< Parent > const &c) noexcept |
Set parent object-capability. | |
void | mem_alloc (L4::Cap< Mem_alloc > const &c) noexcept |
Set memory allocator object-capability. | |
void | rm (L4::Cap< Rm > const &c) noexcept |
Set region map object-capability. | |
void | log (L4::Cap< Log > const &c) noexcept |
Set log object-capability. | |
void | main_thread (L4::Cap< L4::Thread > const &c) noexcept |
Set object-capability of first user thread. | |
void | factory (L4::Cap< L4::Factory > const &c) noexcept |
Set factory object-capability. | |
void | first_free_cap (l4_cap_idx_t c) noexcept |
Set first available capability selector. | |
void | utcb_area (l4_fpage_t utcbs) noexcept |
Set UTCB area of the task. | |
void | first_free_utcb (l4_addr_t u) noexcept |
Set first free UTCB. | |
L4::Cap< L4::Scheduler > | scheduler () const noexcept |
Get the scheduler capability for the task. | |
void | scheduler (L4::Cap< L4::Scheduler > const &c) noexcept |
Set the scheduler capability. | |
L4::Cap< Itas > | itas () const noexcept |
Object-capability to the ITAS services. | |
void | itas (L4::Cap< Itas > const &c) noexcept |
Set the ITAS capability. | |
L4::Cap< Dbg_events > | dbg_events () const noexcept |
Object-capability to a debugger events service. | |
void | dbg_events (L4::Cap< Dbg_events > const &dbg_events) noexcept |
Set the dbg_events capability. | |
void | initial_caps (Cap_entry *first) noexcept |
Set the pointer to the first Cap_entry in the initial objects array. |
Static Public Member Functions | |
static Env const * | env () noexcept |
Returns the initial environment for the current task. |
C++ interface of the initial environment that is provided to an L4 task.
The initial environment is provided to each L4 task that is started by an L4Re conform loader, such as the Moe root task. The initial environment provides access to a set of initial capabilities and some additional information about the available resources, such as free UTCBs (see Virtual Registers ) and available entries in capability table (provided by the micro kernel).
Each of the initial capabilities is stored at a fixed index in the task's capability table and the L4 runtime environment provides convenience functions to retrieve the capabilities. See the table below for an comprehensive overview.
Name | Object Type | Convenience Function |
---|---|---|
parent | L4Re::Parent | L4Re::Env::parent() |
user_factory | L4::Factory | L4Re::Env::user_factory() |
log | L4Re::Log | L4Re::Env::log() |
main_thread | L4::Thread | L4Re::Env::main_thread() |
rm | L4Re::Rm | L4Re::Env::rm() |
factory | L4::Factory | L4Re::Env::factory() |
task | L4::Task | L4Re::Env::task() |
scheduler | L4::Scheduler | L4Re::Env::scheduler() |
itas | L4Re::Itas | L4Re::Env::itas() |
Additional information found in the initial environment is:
For an explanation of the default task capabilites see l4_default_caps_t.
For the C interface refer to Initial Environment.
|
inlinenoexcept |
Object-capability to a debugger events service.
This capability can be invalid.
Definition at line 310 of file env.
Referenced by dbg_events().
|
inlinenoexcept |
Set the dbg_events capability.
dbg_events | is the capability to be set for the debug events service. |
Note that the capability can be invalid.
Definition at line 320 of file env.
References dbg_events().
|
inlinestaticnoexcept |
Returns the initial environment for the current task.
A typical use of this function is L4Re::Env::env()-><member>()
Definition at line 96 of file env.
Referenced by L4virtio::Svr::Dev_config::Dev_config(), L4virtio::Driver::Device::driver_connect(), L4vcpu::Vcpu::ext_alloc(), L4Re::Util::Event_t< Default_event_payload >::init(), L4Re::Util::Event_t< Default_event_payload >::init_poll(), L4Re::Util::kumem_alloc(), L4virtio::Driver::Block_device::setup_device(), and L4virtio::Driver::Virtio_net_device::setup_device().
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Get the Cap_entry for the object named name.
name | is the name of the object. |
l | is the length of the name, thus name might not be zero terminated. |
Definition at line 185 of file env.
References l4re_env_get_cap_l().
Referenced by get_cap().
|
inlinenoexcept |
Get the capability selector for the object named name.
name | is the name of the object (zero terminated). |
Definition at line 212 of file env.
References get_cap().
|
inlinenoexcept |
Get the capability selector for the object named name.
name | is the name of the object. |
l | is the length of the name, thus name might not be zero terminated. |
Definition at line 197 of file env.
References get(), and L4_ENOENT.
Referenced by get_cap().
|
inlinenoexcept |
|
inlinenoexcept |
Object-capability to the ITAS services.
Attention: this capability might be invalid, depending on the system configuration. Regular applications must not use it directly as it is an implementation detail of the L4Re libc that is subject to change without notice!
|
inlinenoexcept |
|
inlinenoexcept |
Object-capability to the memory allocator.
Object-capability to the region map.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |