AArch64 has support for PSCI. This is especially useful for SMP because PSCI is used to power on the secordary cores. When the PSCI driver was introduced in Zephyr it was designed to rely on a very PSCI-centric subsystem / interface. There are two kinds of problems with this choice: 1. PSCI is only defined for the non-secure world and it is designed to boot CPU cores into non-secure state (that means that PSCI is only supposed to work if Zephyr is running in non-secure state) 2. There can be other ways or standards used to start / stop a core different from PSCI This patch is trying to fix the original wrong assumption by making the interface / subsystem a generic one, called 'pm_cpu_ops', and using PSCI only as an actual driver that is a user of this new interface / subsystem. For now the new subsystem is only exposing two methods: cpu_on and cpu_off, others will probably follow according to the needs. Signed-off-by: Carlo Caione <ccaione@baylibre.com>
36 lines
968 B
Plaintext
36 lines
968 B
Plaintext
# CPU power management driver configuration options
|
|
|
|
# Copyright (c) 2021 Carlo Caione <ccaione@baylibre.com>
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
menuconfig PM_CPU_OPS
|
|
bool "CPU power management drivers"
|
|
help
|
|
Enable CPU power management drivers configuration
|
|
|
|
if PM_CPU_OPS
|
|
|
|
module = PM_CPU_OPS
|
|
module-str = pm_cpu_ops
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
|
|
DT_COMPAT_ARM_PSCI := arm,psci-0.2
|
|
|
|
config PM_CPU_OPS_HAS_DRIVER
|
|
bool
|
|
|
|
config PM_CPU_OPS_PSCI
|
|
bool "Support for the ARM Power State Coordination Interface (PSCI)"
|
|
depends on ARMV8_A
|
|
depends on HAS_ARM_SMCCC
|
|
select PM_CPU_OPS_HAS_DRIVER
|
|
default $(dt_compat_enabled,$(DT_COMPAT_ARM_PSCI))
|
|
help
|
|
Say Y here if you want Zephyr to communicate with system firmware
|
|
implementing the PSCI specification for CPU-centric power
|
|
management operations described in ARM document number ARM DEN
|
|
0022A ("Power State Coordination Interface System Software on
|
|
ARM processors").
|
|
|
|
endif
|