PROTOCOLS
Admin
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
Provides methods to request that the system be transitioned into a supported power state.
Note (see fxbug.dev/58348): These methods do not return until after the state transition has been completed. In most cases (e.g. Reboot), a successful transition means that the caller does not actually observe the completion because the system will be rebooted before the call is completed. The implication is that using a synchronous FIDL client with these methods will result in a blocked thread for the duration of the call, or even for the remainder of the component's life (in the case of Reboot). Therefore, if a synchronous FIDL client is to be used with this protocol then care should be taken to avoid handling any shutdown-induced callbacks on the same thread that was used to initiate the transition. Example callbacks include fuchsia.process.lifecycle/Lifecycle.Stop and fuchsia.hardware.power.statecontrol/RebootMethodsWatcher.OnReboot. Alternatively, the caller could choose to use an asynchronous FIDL client with this protocol to avoid blocking their calling thread.
Mexec
Performs a kernel mexec.
It is expected that the ZBI items specified by
zx_system_mexec_payload_get()
have not yet been appended to the
provided data ZBI.
Request
Name | Type |
---|---|
kernel_zbi |
handle<vmo>
|
data_zbi |
handle<vmo>
|
Response
Name | Type |
---|---|
result |
Admin_Mexec_Result
|
PowerFullyOn
Asks the device to enter a fully on state.
Request
<EMPTY>
Response
Name | Type |
---|---|
result |
Admin_PowerFullyOn_Result
|
Poweroff
Asks all devices to enter a powered off state.
Request
<EMPTY>
Response
Name | Type |
---|---|
result |
Admin_Poweroff_Result
|
Reboot
Asks the device to reboot.
Request
Name | Type |
---|---|
reason |
RebootReason
|
Response
Name | Type |
---|---|
result |
Admin_Reboot_Result
|
RebootToBootloader
Asks the device to reboot into the bootloader.
Request
<EMPTY>
Response
Name | Type |
---|---|
result |
Admin_RebootToBootloader_Result
|
RebootToRecovery
Asks the device to reboot into the recovery partition.
Request
<EMPTY>
Response
Name | Type |
---|---|
result |
Admin_RebootToRecovery_Result
|
SuspendToRam
Request
<EMPTY>
Response
Name | Type |
---|---|
result |
Admin_SuspendToRam_Result
|
RebootMethodsWatcher
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
Allows components to be notified when Reboot related methods are called. Watchers will be given 'MAX_REBOOT_WATCHER_RESPONSE_TIME_SECONDS' to return before the system power state is changed. The channel will be used once to send a notification to the watcher. Once the watcher responds or the timeout expires, the channel will be closed by the client of RebootMethodsWatcher.
OnReboot
Request
Name | Type |
---|---|
reason |
RebootReason
|
Response
<EMPTY>
RebootMethodsWatcherRegister
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
Allows components to register a callback that will be executed when a Reboot method is called. The main purpose of this protocol is to be able to track reboot reasons. Consider relying on Component Framework's orderly shutdown if you're looking at using this protocol.
Register
Register a watcher to be notified when a Reboot method is called. The Register channel will be used at most once to notify the watcher of an impending reboot and allow it the chance to respond.
Watchers can unregister by closing the underlying channel.
Request
Name | Type |
---|---|
watcher |
RebootMethodsWatcher
|
STRUCTS
Admin_Mexec_Response
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
<EMPTY>
Admin_PowerFullyOn_Response
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
<EMPTY>
Admin_Poweroff_Response
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
<EMPTY>
Admin_RebootToBootloader_Response
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
<EMPTY>
Admin_RebootToRecovery_Response
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
<EMPTY>
Admin_Reboot_Response
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
<EMPTY>
Admin_SuspendToRam_Response
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
<EMPTY>
ENUMS
RebootReason strict
Type: uint32
Defined in fuchsia.hardware.power.statecontrol/reboot_reason.fidl
Why the system reboots.
Name | Value | Description |
---|---|---|
USER_REQUEST |
1 |
|
SYSTEM_UPDATE |
2 |
A new system update has been downloaded. |
RETRY_SYSTEM_UPDATE |
8 |
Applying the system update has failed. |
HIGH_TEMPERATURE |
3 |
|
FACTORY_DATA_RESET |
6 |
|
SESSION_FAILURE |
4 |
Sessionmgr has failed. |
SYSMGR_FAILURE |
5 |
sysmgr crashed. |
CRITICAL_COMPONENT_FAILURE |
7 |
A critical system component has failed. |
ZBI_SWAP |
9 |
A boot partition change was effected. |
OUT_OF_MEMORY |
10 |
The system hit a critical low threshold of available memory. |
SystemPowerState strict
Type: uint8
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
Name | Value | Description |
---|---|---|
FULLY_ON |
1 |
|
REBOOT |
2 |
|
REBOOT_BOOTLOADER |
3 |
|
REBOOT_RECOVERY |
4 |
|
POWEROFF |
5 |
|
MEXEC |
6 |
|
SUSPEND_RAM |
7 |
|
REBOOT_KERNEL_INITIATED |
8 |
UNIONS
Admin_Mexec_Result strict
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Admin_Mexec_Response
|
|
2 |
err |
zx/status
|
Admin_PowerFullyOn_Result strict
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Admin_PowerFullyOn_Response
|
|
2 |
err |
zx/status
|
Admin_Poweroff_Result strict
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Admin_Poweroff_Response
|
|
2 |
err |
zx/status
|
Admin_RebootToBootloader_Result strict
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Admin_RebootToBootloader_Response
|
|
2 |
err |
zx/status
|
Admin_RebootToRecovery_Result strict
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Admin_RebootToRecovery_Response
|
|
2 |
err |
zx/status
|
Admin_Reboot_Result strict
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Admin_Reboot_Response
|
|
2 |
err |
zx/status
|
Admin_SuspendToRam_Result strict
Defined in fuchsia.hardware.power.statecontrol/admin.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Admin_SuspendToRam_Response
|
|
2 |
err |
zx/status
|
CONSTANTS
Name | Value | Type | Description |
---|---|---|---|
MAX_REBOOT_WATCHER_RESPONSE_TIME_SECONDS |
5
|
uint32 |
The maxium number of seconds the server will wait for responses from all RebootMethodsWatchers before changing the system power state. |
MAX_SYSTEM_POWER_STATES |
8
|
uint32 |