|
L4Re - L4 Runtime Environment
|
L4 C++ interface for controlling platform-wide properties. More...
Inheritance diagram for L4::Platform_control:
Collaboration diagram for L4::Platform_control:Public Types | |
| enum | Opcode { Suspend = L4_PLATFORM_CTL_SYS_SUSPEND_OP, Shutdown = L4_PLATFORM_CTL_SYS_SHUTDOWN_OP, Cpu_enable = L4_PLATFORM_CTL_CPU_ENABLE_OP, Cpu_disable = L4_PLATFORM_CTL_CPU_DISABLE_OP } |
| Opcodes for platform-control object. More... | |
Public Member Functions | |
| l4_msgtag_t | system_suspend (l4_umword_t extras) |
| Enter suspend to RAM. More... | |
| l4_msgtag_t | system_shutdown (l4_umword_t reboot) |
| Shutdown/Reboot the system. More... | |
| l4_msgtag_t | cpu_enable (l4_umword_t phys_id) |
| Enable an offline CPU. More... | |
| l4_msgtag_t | cpu_disable (l4_umword_t phys_id) |
| Disable an online CPU. More... | |
Public Member Functions inherited from L4::Kobject | |
| l4_msgtag_t | dec_refcnt (l4_mword_t diff, l4_utcb_t *utcb=l4_utcb()) |
| Decrement the in kernel reference counter for the object. More... | |
Additional Inherited Members | |
Protected Types inherited from L4::Kobject_t< Platform_control, Kobject, L4_PROTO_PLATFORM_CTL > | |
| typedef Platform_control | Class |
| The target interface type (inheriting from Kobject_t) | |
| typedef Typeid::Iface< PROTO, Platform_control > | __Iface |
| The interface description for the derived class. | |
| typedef Typeid::Merge_list< Typeid::Iface_list< __Iface >, typename Kobject ::__Iface_list > | __Iface_list |
| The list of all RPC interfaces provided directly or through inheritance. | |
Protected Member Functions inherited from L4::Kobject_t< Platform_control, Kobject, L4_PROTO_PLATFORM_CTL > | |
| L4::Cap< Class > | c () const |
| Get the capability to ourselves. | |
Protected Member Functions inherited from L4::Kobject | |
| l4_cap_idx_t | cap () const throw () |
| Return capability selector. More... | |
Static Protected Member Functions inherited from L4::Kobject_t< Platform_control, Kobject, L4_PROTO_PLATFORM_CTL > | |
| static void | __check_protocols__ () |
| Helper to check for protocol conflicts. | |
L4 C++ interface for controlling platform-wide properties.
Add
#include <l4/sys/platform_control>
to your code to use the platform control functions. The API allows a client to suspend, reboot or shutdown the system.
For the C interface refer to the Platform Control C API.
Definition at line 46 of file platform_control.
Opcodes for platform-control object.
| Enumerator | |
|---|---|
| Suspend | Opcode for suspend to RAM. |
| Shutdown | Opcode for shutdown / reboot. |
| Cpu_enable | Opcode to enable a CPU. |
| Cpu_disable | Opcode to disable a CPU. |
Definition at line 51 of file platform_control.
| l4_msgtag_t L4::Platform_control::cpu_disable | ( | l4_umword_t | phys_id | ) |
Disable an online CPU.
| phys_id | Physical CPU id of CPU (e.g. local APIC id) to disable. |
| l4_msgtag_t L4::Platform_control::cpu_enable | ( | l4_umword_t | phys_id | ) |
Enable an offline CPU.
| phys_id | Physical CPU id of CPU (e.g. local APIC id) to enable. |
| l4_msgtag_t L4::Platform_control::system_shutdown | ( | l4_umword_t | reboot | ) |
Shutdown/Reboot the system.
| reboot | 1 for reboot, 0 for power off |
| l4_msgtag_t L4::Platform_control::system_suspend | ( | l4_umword_t | extras | ) |
Enter suspend to RAM.
| extras | some extra platform-specific information needed to enter suspend to RAM. |