Loading...
Searching...
No Matches
Platform Control C API
Base API » Kernel Objects

C interface for controlling platform-wide properties, see L4::Platform_control for the C++ interface. More...

Collaboration diagram for Platform Control C API:

## Functions

l4_msgtag_t | l4_platform_ctl_set_task_asid (l4_cap_idx_t pfc, l4_cap_idx_t task, l4_umword_t asid) L4_NOTHROW
| Set ASID of task.
l4_msgtag_t | l4_platform_ctl_system_suspend (l4_cap_idx_t pfc, l4_umword_t extras) L4_NOTHROW
| Enter suspend to RAM.
l4_msgtag_t | l4_platform_ctl_system_shutdown (l4_cap_idx_t pfc, l4_umword_t reboot) L4_NOTHROW
| Shutdown or reboot the system.
l4_msgtag_t | l4_platform_ctl_cpu_allow_shutdown (l4_cap_idx_t pfc, l4_umword_t phys_id, l4_umword_t enable) L4_NOTHROW
| Allow a CPU to be shut down.
l4_msgtag_t | l4_platform_ctl_cpu_enable (l4_cap_idx_t pfc, l4_umword_t phys_id) L4_NOTHROW
| Enable an offline CPU.
l4_msgtag_t | l4_platform_ctl_cpu_disable (l4_cap_idx_t pfc, l4_umword_t phys_id) L4_NOTHROW
| Disable an online CPU.

## Detailed Description

C interface for controlling platform-wide properties, see L4::Platform_control for the C++ interface.

Include File
  #include <l4/sys/platform_control.h>

The API allows a client to suspend, reboot or shutdown the system.

For the C++ interface refer to L4::Platform_control

## Function Documentation

## l4_platform_ctl_cpu_allow_shutdown()

l4_msgtag_t l4_platform_ctl_cpu_allow_shutdown | ( | l4_cap_idx_t | pfc,
|  | l4_umword_t | phys_id,
|  | l4_umword_t | enable )

inline

Allow a CPU to be shut down.

Parameters

  pfc | Capability selector for the platform-control object.
  phys_id | Physical CPU id of CPU (e.g. local APIC id) to enable.
  enable | Allow shutdown when 1, disallow when 0.

Returns
  Syscall return tag

Definition at line 242 of file platform_control.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function:

## l4_platform_ctl_cpu_disable()

l4_msgtag_t l4_platform_ctl_cpu_disable | ( | l4_cap_idx_t | pfc,
|  | l4_umword_t | phys_id )

inline

Disable an online CPU.

Parameters

  pfc | Capability to the platform control object.
  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.

Definition at line 281 of file platform_control.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function:

## l4_platform_ctl_cpu_enable()

l4_msgtag_t l4_platform_ctl_cpu_enable | ( | l4_cap_idx_t | pfc,
|  | l4_umword_t | phys_id )

inline

Enable an offline CPU.

Parameters

  pfc | Capability to the platform control object.
  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.

Definition at line 274 of file platform_control.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function:

## l4_platform_ctl_set_task_asid()

l4_msgtag_t l4_platform_ctl_set_task_asid | ( | l4_cap_idx_t | pfc,
|  | l4_cap_idx_t | task,
|  | l4_umword_t | asid )

inline

Set ASID of task.

On Cortex-R52 platforms, it might be necessary to control the VMID of a task or virtual machine explicitly. The IOMPU on such platforms will use it for further access control of device memory accesses. A privileged component can use this call to control the value.

The caller must have write permissions to the destination task.

Parameters

  pfc | Capability selector for the platform-control object.
  task | Capability selector of destination task
  asid | New ASID value

Returns
  Syscall return tag

Definition at line 62 of file __platform_control-arm.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function:

## l4_platform_ctl_system_shutdown()

l4_msgtag_t l4_platform_ctl_system_shutdown | ( | l4_cap_idx_t | pfc,
|  | l4_umword_t | reboot )

inline

Shutdown or reboot the system.

Parameters

  pfc | Capability selector for the platform-control object.
  reboot | Shutdown when 0, or reboot when 1.

Returns
  Syscall return tag

Definition at line 221 of file platform_control.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function:

## l4_platform_ctl_system_suspend()

l4_msgtag_t l4_platform_ctl_system_suspend | ( | l4_cap_idx_t | pfc,
|  | l4_umword_t | extras )

inline

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

  pfc | Capability selector for the platform-control object.
  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.

Returns
  Syscall return tag

Definition at line 214 of file platform_control.h.

References L4_NOTHROW, and l4_utcb().

Here is the call graph for this function: