Expand description
§Arm Power State Coordination Interface (PSCI) library
This crate aims to offer functions and user-friendly types for parsing and constructing arguments of Arm Power State Coordination Interface (PSCI) calls. This functionality can be beneficial for both firmware and OS components.
However, doing the actual SMC
/HVC
/ERET
calls, or implementing power management logic is beyond
the scope of this crate.
§Implemented features
- Handling all PSCI 1.3 mandatory and optional functions
- Handling both 32-bit and 64-bit call formats
- Dedicated types for common PSCI call arguments
- Unit tests
§Limitations
- The implementation does not handle pre-1.0 format suspend power state (see 5.4.2.1 Original format)
§License
The project is MIT and Apache-2.0 dual licensed, see LICENSE-APACHE
and LICENSE-MIT
.
§Maintainers
arm-psci is a trustedfirmware.org maintained project. All contributions are ultimately merged by the maintainers listed below.
- Bálint Dobszay balint.dobszay@arm.com balint-dobszay-arm
- Imre Kis imre.kis@arm.com imre-kis-arm
- Sandrine Afsa sandrine.afsa@arm.com sandrine-bailleux-arm
§Contributing
Please follow the directions of the Trusted Firmware Processes.
Contributions are handled through review.trustedfirmware.org.
§Reporting Security Issues
Please follow the directions of the Trusted Firmware Security Center.
Copyright 2025 Arm Limited and/or its affiliates open-source-office@arm.com
§Specification
This implementation is based on Arm Power State Coordination Interface Platform Design Document Version 1.3 issue F.b. (DEN0022).
The type descriptions below refer to sections of this particular version of the specification.
Structs§
- Feature
Flags CpuSuspend - Table 11 Return values if a function is implemented / CPU_SUSPEND
- Feature
Flags System Off2 - Table 11 Return values if a function is implemented / SYSTEM_OFF2
- Mpidr
- The type contains the affinity fields of the MPIDR register. For AArch32 callers this contains Affinity 0, 1, 2 fields and for AAarch64 callers it has Affinity 0, 1, 2, 3 fields.
- Version
- Structure for describing PSCI major and minor version.
Enums§
- Affinity
Info - 5.1.5 AFFINITY_INFO return value
- Architectural
Reset Type - 5.1.12 SYSTEM_RESET2 architectural reset type
- Cookie
- Additional off/reset parameter
- Entry
Point - Entry point descriptor
- Error
- Internal error type of the PSCI module
- Error
Code - Error codes See Table 5 Return error codes
- Function
- Enum for representing PSCI requests and their arguments.
- Function
Id - 5.1 Function prototypes
- HwState
- 5.1.18 NODE_HW_STATE return value
- MemProtect
Range - 5.1.14 MEM_PROTECT_CHECK_RANGE memory range descriptor
- Migrate
Info Type - 5.1.8 MIGRATE_INFO_UP_CPU return value
- Power
State - Table 8 power_state parameter bit fields in Extended StateID format.
- Psci
Feature - 5.1.15 PSCI_FEATURES psci_func_id field
- Reset
Type - 5.1.12 SYSTEM_RESET2 reset type
- Return
Code - Composite type for capturing success and error return codes. See Table 5 Return error codes
- Suspend
Mode - 5.1.20 PSCI_SET_SUSPEND_MODE mode field
- System
Off2 Type - 5.1.10 SYSTEM_OFF2 type field