arm-trusted-firmware/plat
Oliver Swede 7ee4db6e47 plat/arm/board/arm_fpga: Add PSCI implementation for FPGA images
This adds a basic PSCI implementation allow secondary CPUs to be
released from an initial state and continue through to the warm boot
entrypoint.

Each secondary CPU is kept in a holding pen, whereby it polls the value
representing its hold state, by reading this from an array that acts as
a table for all the PEs. The hold states are initially set to 0 for all
cores to indicate that the executing core should continue polling.
To prevent the secondary CPUs from interfering with the platform's
initialization, they are only updated by the primary CPU once the cold
boot sequence has completed and fpga_pwr_domain_on(mpidr) is called.
The polling target CPU will then read 1 (which indicates that it should
branch to the warm reset entrypoint) and then jump to that address
rather than continue polling.

In addition to the initial polling behaviour of the secondary CPUs
before their warm boot reset sequence, they are also placed in a
low-power wfe() state at the end of each poll; accordingly, the PSCI
fpga_pwr_domain_on(mpidr) function also signals an event to all cores
(after updating the target CPU's hold entry) to wake them from this
state, allowing any secondary CPUs that are still polling to check
their hold state again.
This method is in accordance with both the PSCI and Linux kernel
recommendations, as the lessened overhead reduces the energy
consumption associated with the busy-loop.

The table of hold entries is implemented by a global array as shared SRAM
(which is used by other platforms in similar implementations) is not
available on the FPGA images.

Signed-off-by: Oliver Swede <oli.swede@arm.com>
Change-Id: I65cfd1892f8be1dfcb285f0e1e94e7a9870cdf5a
2020-03-26 20:40:48 +00:00
..
allwinner Merge "allwinner: Implement PSCI system suspend using SCPI" into integration 2020-02-26 09:11:37 +00:00
amlogic meson: Use generic console_t data structure 2020-02-25 09:34:38 +00:00
arm plat/arm/board/arm_fpga: Add PSCI implementation for FPGA images 2020-03-26 20:40:48 +00:00
common Implement SMCCC_ARCH_SOC_ID SMC call 2020-03-17 10:14:35 +00:00
hisilicon hikey960: Enable system power off callback 2020-03-02 22:34:21 +08:00
imx Merge "TF-A GICv3 driver: Separate GICD and GICR accessor functions" into integration 2020-03-11 15:38:45 +00:00
intel/soc Merge "intel: Enable EMAC PHY in Intel FPGA platform" into integration 2020-02-28 10:51:49 +00:00
layerscape LS 16550: Use generic console_t data structure 2020-02-25 09:34:38 +00:00
marvell TF-A GICv3 driver: Separate GICD and GICR accessor functions 2020-03-10 09:40:19 +00:00
mediatek Merge "TF-A GICv3 driver: Separate GICD and GICR accessor functions" into integration 2020-03-11 15:38:45 +00:00
nvidia/tegra Tegra210: Remove "unsupported func ID" error msg 2020-03-11 13:40:07 -07:00
qemu TF-A GICv3 driver: Separate GICD and GICR accessor functions 2020-03-10 09:40:19 +00:00
renesas/rcar rcar: Use generic console_t data structure 2020-02-25 09:34:38 +00:00
rockchip TF-A GICv3 driver: Separate GICD and GICR accessor functions 2020-03-10 09:40:19 +00:00
rpi rpi: console: Autodetect Mini-UART vs. PL011 configuration 2020-03-17 13:44:55 +00:00
socionext TF-A GICv3 driver: Separate GICD and GICR accessor functions 2020-03-10 09:40:19 +00:00
st Merge changes from topic "stm32mp1-multi-image" into integration 2020-03-11 10:03:17 +00:00
ti/k3 TF-A GICv3 driver: Separate GICD and GICR accessor functions 2020-03-10 09:40:19 +00:00
xilinx TF-A GICv3 driver: Separate GICD and GICR accessor functions 2020-03-10 09:40:19 +00:00