L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
Platform Control C API

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
pfcCapability selector for the platform-control object.
phys_idPhysical CPU id of CPU (e.g. local APIC id) to enable.
enableAllow shutdown when 1, disallow when 0.
Returns
Syscall return tag

Definition at line 253 of file platform_control.h.

References 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
pfcCapability to the platform control object.
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.

Definition at line 292 of file platform_control.h.

References 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
pfcCapability to the platform control object.
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.

Definition at line 285 of file platform_control.h.

References 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
pfcCapability selector for the platform-control object.
taskCapability selector of destination task
asidNew ASID value
Returns
Syscall return tag

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

References 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
pfcCapability selector for the platform-control object.
rebootShutdown when 0, or reboot when 1.
Returns
Syscall return tag

Definition at line 232 of file platform_control.h.

References 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
pfcCapability selector for the platform-control object.
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.
Returns
Syscall return tag

Definition at line 225 of file platform_control.h.

References l4_utcb().

+ Here is the call graph for this function: