L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
L4::Platform_control Class Reference

L4 C++ interface for controlling platform-wide properties, see Platform Control C API for the C interface. More...

#include <platform_control>

+ Inheritance diagram for L4::Platform_control:
+ Collaboration diagram for L4::Platform_control:

Public Member Functions

l4_msgtag_t system_suspend (l4_umword_t extras)
 Enter suspend to RAM.
 
l4_msgtag_t system_shutdown (l4_umword_t reboot)
 Shutdown/Reboot the system.
 
l4_msgtag_t cpu_allow_shutdown (l4_umword_t phys_id, l4_umword_t enable)
 Allow CPU shutdown.
 
l4_msgtag_t cpu_enable (l4_umword_t phys_id)
 Enable an offline CPU.
 
l4_msgtag_t cpu_disable (l4_umword_t phys_id)
 Disable an online CPU.
 
- 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.
 

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 Base::__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< Classc () const noexcept
 Get the capability to ourselves.
 
- Protected Member Functions inherited from L4::Kobject
l4_cap_idx_t cap () const noexcept
 Return capability selector.
 
- Static Protected Member Functions inherited from L4::Kobject_t< Platform_control, Kobject, L4_PROTO_PLATFORM_CTL >
static void __check_protocols__ () noexcept
 Helper to check for protocol conflicts.
 

Detailed Description

L4 C++ interface for controlling platform-wide properties, see Platform Control C API for the C interface.

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 47 of file platform_control.

Member Function Documentation

◆ cpu_allow_shutdown()

l4_msgtag_t L4::Platform_control::cpu_allow_shutdown ( l4_umword_t  phys_id,
l4_umword_t  enable 
)

Allow CPU shutdown.

Parameters
phys_idPhysical CPU id of CPU (e.g. local APIC id) to disable.
enableAllow shutdown when 1, disallow when 0.

Sets or unsets a hint that a CPU that is not currently used may be powered down.

◆ cpu_disable()

l4_msgtag_t L4::Platform_control::cpu_disable ( l4_umword_t  phys_id)

Disable an online CPU.

Parameters
phys_idPhysical CPU id of CPU (e.g. local APIC id) to disable.
Returns
System call message tag

This function is currently only supported on the ARM EXYNOS platform.

◆ cpu_enable()

l4_msgtag_t L4::Platform_control::cpu_enable ( l4_umword_t  phys_id)

Enable an offline CPU.

Parameters
phys_idPhysical CPU id of CPU (e.g. local APIC id) to enable.
Returns
System call message tag

This function is currently only supported on the ARM EXYNOS platform.

◆ system_shutdown()

l4_msgtag_t L4::Platform_control::system_shutdown ( l4_umword_t  reboot)

Shutdown/Reboot the system.

Parameters
reboot1 for reboot, 0 for power off

◆ system_suspend()

l4_msgtag_t L4::Platform_control::system_suspend ( l4_umword_t  extras)

Enter suspend to RAM.

Precondition
Must only be invoked on the boot CPU. Furthermore it must be ensured that the invoking thread is not migrated to a different CPU during the suspend.
Parameters
extrasSome extra platform-specific information needed to enter suspend to RAM. On x86 platforms and when using the Platform_control object provided by Fiasco, the value defines the sleep state. The sleep states are defined in the ACPI table. Other platforms as well as Io's Platform_control object don't make use of this value at the moment.

The documentation for this class was generated from the following file: