L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
L4 Namespace Reference

L4 low-level kernel interface. More...

Namespaces

namespace  Ipc
 IPC related functionality.
 
namespace  Ipc_svr
 Helper classes for L4::Server instantiation.
 
namespace  Typeid
 Definition of interface data-type helpers.
 
namespace  Types
 L4 basic type helpers for C++.
 

Data Structures

class  Alloc_list
 A simple list-based allocator. More...
 
class  Arm_smccc
 Wrapper for function calls that follow the ARM SMC/HVC calling convention. More...
 
class  Base_exception
 Base class for all exceptions, thrown by the L4Re framework. More...
 
class  Basic_registry
 This registry returns the corresponding server object based on the label of an Ipc_gate. More...
 
class  Bounds_error
 Access out of bounds. More...
 
class  Cap
 C++ interface for capabilities. More...
 
class  Cap_base
 Base class for all kinds of capabilities. More...
 
class  Com_error
 Error conditions during IPC. More...
 
class  Debugger
 C++ kernel debugger API. More...
 
class  Element_already_exists
 Exception for duplicate element insertions. More...
 
class  Element_not_found
 Exception for a failed lookup (element not found). More...
 
struct  Epiface
 Base class for interface implementations. More...
 
struct  Epiface_t
 Epiface implementation for Kobject-based interface implementations. More...
 
struct  Epiface_t0
 Epiface mixin for generic Kobject-based interfaces. More...
 
class  Exception
 Exception interface. More...
 
class  Exception_tracer
 Back-trace support for exceptions. More...
 
class  Factory
 C++ Factory interface, see Factory for the C interface. More...
 
class  Icu
 C++ Icu interface, see Interrupt controller for the C interface. More...
 
class  Invalid_capability
 Indicates that an invalid object was invoked. More...
 
class  Io_pager
 Io_pager interface. More...
 
class  Iommu
 Interface for IO-MMUs used for DMA remapping. More...
 
class  IOModifier
 Modifier class for the IO stream. More...
 
class  Ipc_gate
 The C++ IPC gate interface, see IPC-Gate API for the C interface. More...
 
class  Irq
 C++ Irq interface, see IRQs for the C interface. More...
 
class  Irq_eoi
 Interface for sending an unmask message to an object. More...
 
struct  Irq_handler_object
 Server object base class for handling IRQ messages. More...
 
struct  Irq_mux
 IRQ multiplexer for shared IRQs. More...
 
struct  Irqep_t
 Epiface implementation for interrupt handlers. More...
 
class  Kobject
 Base class for all kinds of kernel objects and remote objects, referenced by capabilities. More...
 
class  Kobject_2t
 Helper class to create an L4Re interface class that is derived from two base classes (see L4::Kobject_t). More...
 
struct  Kobject_3t
 Helper class to create an L4Re interface class that is derived from three base classes (see L4::Kobject_t). More...
 
struct  Kobject_demand
 Get the combined server-side resource requirements for all type T... More...
 
class  Kobject_t
 Helper class to create an L4Re interface class that is derived from a single base class. More...
 
struct  Kobject_typeid
 Meta object for handling access to type information of Kobjects. More...
 
struct  Kobject_typeid< void >
 Minimalistic ID for void interface. More...
 
struct  Kobject_x
 Generic Kobject inheritance template. More...
 
class  Meta
 Meta interface that shall be implemented by each L4Re object and gives access to the dynamic type information for L4Re objects. More...
 
class  Out_of_memory
 Exception signalling insufficient memory. More...
 
class  Pager
 Pager interface including the Io_pager interface. More...
 
class  Platform_control
 L4 C++ interface for controlling platform-wide properties, see Platform Control C API for the C interface. More...
 
class  Poll_timeout_counter
 Evaluate an expression for a maximum number of times. More...
 
class  Poll_timeout_kipclock
 A polling timeout based on the L4Re clock. More...
 
struct  Proto_t
 Data type for defining protocol numbers. More...
 
class  Rcv_endpoint
 Interface for kernel objects that allow to receive IPC from them. More...
 
class  Registry_iface
 Abstract interface for object registries. More...
 
class  Runtime_error
 Exception for an abstract runtime error. More...
 
class  Scheduler
 C++ interface of the Scheduler kernel object, see Scheduler for the C interface. More...
 
struct  Semaphore
 C++ Kernel-provided semaphore interface, see Kernel-provided semaphore for the C interface. More...
 
class  Server
 Basic server loop for handling client requests. More...
 
class  Server_object
 Abstract server object to be used with L4::Server and L4::Basic_registry. More...
 
struct  Server_object_t
 Base class (template) for server implementing server objects. More...
 
struct  Server_object_x
 Helper class to implement p_dispatch based server objects. More...
 
class  Smart_cap
 Smart capability class. More...
 
class  String
 A null-terminated string container class. More...
 
class  Task
 C++ interface of the Task kernel object, see Task for the C interface. More...
 
class  Thread
 C++ L4 kernel thread interface, see Thread for the C interface. More...
 
struct  Triggerable
 Interface that allows an object to be triggered by some source. More...
 
struct  Type_info
 Dynamic Type Information for L4Re Interfaces. More...
 
class  Uart
 Uart driver abstraction. More...
 
class  Unknown_error
 Exception for an unknown condition. More...
 
class  Vcon
 C++ L4 Vcon interface, see Virtual Console for the C interface. More...
 
class  Vm
 Virtual machine host address space. More...
 

Typedefs

typedef int Opcode
 Data type for RPC opcodes.
 

Enumerations

enum  { PROTO_ANY = 0 , PROTO_EMPTY = -19 }
 

Functions

template<typename T >
Type_info const * kobject_typeid () noexcept
 Get the L4::Type_info for the L4Re interface given in T.
 
template<typename T , typename F >
Cap< T > cap_dynamic_cast (Cap< F > const &c) noexcept
 dynamic_cast for capabilities.
 
template<typename T , typename F >
Cap< T > cap_cast (Cap< F > const &c) noexcept
 static_cast for capabilities.
 
template<typename T , typename F >
Cap< T > cap_reinterpret_cast (Cap< F > const &c) noexcept
 reinterpret_cast for capabilities.
 
template<typename T >
constexpr T trunc_order (T val, unsigned char order)
 Round a value down so the given number of lsb is zero.
 
template<typename T >
constexpr T round_order (T val, unsigned char order)
 Round a value up so the given number of lsb is zero.
 
template<typename T , typename F , typename SMART >
Smart_cap< T, SMART > cap_cast (Smart_cap< F, SMART > const &c) noexcept
 static_cast for (smart) capabilities.
 
template<typename T , typename F , typename SMART >
Smart_cap< T, SMART > cap_reinterpret_cast (Smart_cap< F, SMART > const &c) noexcept
 reinterpret_cast for (smart) capabilities.
 
void throw_ipc_exception (L4::Cap< void > const &o, l4_msgtag_t const &err, l4_utcb_t *utcb)
 Throw an L4 IPC error as exception.
 
void throw_ipc_exception (void const *o, l4_msgtag_t const &err, l4_utcb_t *utcb)
 Throw an L4 IPC error as exception.
 

Variables

IOModifier const hex
 Modifies the stream to print numbers as hexadecimal values.
 
IOModifier const dec
 Modifies the stream to print numbers as decimal values.
 
BasicOStream cout
 Standard output stream.
 
BasicOStream cerr
 Standard error stream.
 

Detailed Description

L4 low-level kernel interface.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PROTO_ANY 

Default protocol used by Kobject_t and Kobject_x.

PROTO_EMPTY 

Empty protocol for empty APIs.

Definition at line 55 of file __typeinfo.h.

Function Documentation

◆ cap_cast() [1/2]

template<typename T , typename F >
Cap< T > L4::cap_cast ( Cap< F > const &  c)
inlinenoexcept

static_cast for capabilities.

Template Parameters
TThe target type of the capability
FThe source type (and is usually implicitly set)
Parameters
cThe source capability that shall be casted
Returns
A capability typed to the interface T.

The use of this cast operator is similar to the static_cast<>() for C++ pointers. It does the same type checking and adjustments like C++ does on pointers.

Example code:

L4::Cap<L4::Kobject> obj = ... ;
L4::Cap<L4::Icu> icu = L4::cap_cast<L4::Icu>(obj);

Definition at line 382 of file capability.h.

◆ cap_cast() [2/2]

template<typename T , typename F , typename SMART >
Smart_cap< T, SMART > L4::cap_cast ( Smart_cap< F, SMART > const &  c)
inlinenoexcept

static_cast for (smart) capabilities.

Template Parameters
TType to cast the capability to.
F(implicit) Type of the passed capability.
SMART(implicit) Class implementing the Smart_cap interface.
Parameters
cCapability to be casted.
Returns
A smart capability with new type T.

Definition at line 203 of file smart_capability.

◆ cap_dynamic_cast()

template<typename T , typename F >
Cap< T > L4::cap_dynamic_cast ( Cap< F > const &  c)
inlinenoexcept

dynamic_cast for capabilities.

Template Parameters
TThe target type of the capability.
FThe source type (is usually implicitly set).
Parameters
cThe source capability that shall be casted.
Return values
Cap<T>Capability of target interface T.
L4_INVALID_CAPc does not support the target interface T or the L4::Meta interface.

The use of this cast operator is similar to the dynamic_cast<>() for C++ pointers. It also induces overhead, because it uses the meta interface (L4::Meta) to do runtime type checking.

Example code:

L4::Cap<L4::Kobject> obj = ... ;
L4::Cap<L4::Icu> icu = L4::cap_dynamic_cast<L4::Icu>(obj);

Definition at line 125 of file capability.

References l4_error().

+ Here is the call graph for this function:

◆ cap_reinterpret_cast() [1/2]

template<typename T , typename F >
Cap< T > L4::cap_reinterpret_cast ( Cap< F > const &  c)
inlinenoexcept

reinterpret_cast for capabilities.

Template Parameters
TThe target type of the capability
FThe source type (and is usually implicitly set)
Parameters
cThe source capability that shall be casted
Returns
A capability typed to the interface T.

The use of this cast operator is similar to the reinterpret_cast<>() for C++ pointers. It does not do any type checking or type adjustment.

Example code:

L4::Cap<L4::Kobject> obj = ... ;
L4::Cap<L4::Icu> icu = L4::cap_reinterpret_cast<L4::Icu>(obj);

Definition at line 413 of file capability.h.

◆ cap_reinterpret_cast() [2/2]

template<typename T , typename F , typename SMART >
Smart_cap< T, SMART > L4::cap_reinterpret_cast ( Smart_cap< F, SMART > const &  c)
inlinenoexcept

reinterpret_cast for (smart) capabilities.

Template Parameters
TType to cast the capability to.
F(implicit) Type of the passed capability.
SMART(implicit) Class implementing the Smart_cap interface.
Parameters
cCapability to be casted.
Returns
A smart capability with new type T.

Definition at line 222 of file smart_capability.

◆ round_order()

template<typename T >
constexpr T L4::round_order ( val,
unsigned char  order 
)
constexpr

Round a value up so the given number of lsb is zero.

Template Parameters
TThe type of the value (shall be some integral type.
Parameters
valThe value to rund up to the next multiple of 2^order.
orderorder (2^order) to round up to.
Returns
val rounded up to the next 2^order.

Definition at line 32 of file consts.

Referenced by L4Re::Dataspace::map_region().

+ Here is the caller graph for this function:

◆ throw_ipc_exception() [1/2]

void L4::throw_ipc_exception ( L4::Cap< void > const &  o,
l4_msgtag_t const &  err,
l4_utcb_t utcb 
)
inline

Throw an L4 IPC error as exception.

Parameters
oThe client side object, for which the IPC was invoked.
errThe IPC result code (error code).
utcbUTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb.

Definition at line 41 of file ipc_helper.

References l4_msgtag_t::has_error().

Referenced by throw_ipc_exception().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ throw_ipc_exception() [2/2]

void L4::throw_ipc_exception ( void const *  o,
l4_msgtag_t const &  err,
l4_utcb_t utcb 
)
inline

Throw an L4 IPC error as exception.

Parameters
oThe client side object, for which the IPC was invoked.
errThe IPC result code (error code).
utcbUTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb.

Definition at line 58 of file ipc_helper.

References throw_ipc_exception().

+ Here is the call graph for this function:

◆ trunc_order()

template<typename T >
constexpr T L4::trunc_order ( val,
unsigned char  order 
)
constexpr

Round a value down so the given number of lsb is zero.

Template Parameters
TThe type of the value (shall be some integral type.
Parameters
valThe value where the given lsb shall be masked.
orderthe number of least significant bits (lsb) to mask.
Returns
val with order lsb masked to zero.

Definition at line 18 of file consts.

Referenced by L4Re::Dataspace::map_region().

+ Here is the caller graph for this function: