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 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 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 36 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_id | Physical CPU id of CPU (e.g. local APIC id) to disable.
  enable | Allow shutdown when 1, disallow when 0.

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

References L4_PLATFORM_CTL_CPU_ENABLE_OP.

Referenced by system_shutdown().

Here is the caller graph for this function:

## cpu_disable()

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

Disable an online CPU.

Parameters

  phys_id | Physical 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.

References cpu_disable().

Referenced by cpu_disable().

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

## cpu_enable()

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

Enable an offline CPU.

Parameters

  phys_id | Physical 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.

References cpu_enable(), and L4_PLATFORM_CTL_CPU_DISABLE_OP.

Referenced by cpu_enable().

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

## system_shutdown()

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

Shutdown/Reboot the system.

Parameters

  reboot | 1 for reboot, 0 for power off

References cpu_allow_shutdown(), L4_PLATFORM_CTL_CPU_ALLOW_SHUTDOWN_OP, and system_shutdown().

Referenced by system_shutdown().

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

## 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

  extras | Some 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.

References L4_PLATFORM_CTL_SYS_SHUTDOWN_OP, and system_suspend().

Referenced by system_suspend().

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

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

- l4/sys/platform_control