arm-trusted-firmware/include
Andre Przywara f240728b76 qemu: Move and generalise FDT PSCI fixup
The QEMU platform port scans its device tree to advertise PSCI as the
CPU enable method. It does this by scanning *every* node in the DT and
check whether its compatible string starts with "arm,cortex-a". Then it
sets the enable-method to PSCI, if it doesn't already have one.

Other platforms might want to use this functionality as well, so let's
move it out of the QEMU platform directory and make it more robust by
fixing some shortcomings:
- A compatible string starting with a certain prefix is not a good way
to find the CPU nodes. For instance a "arm,cortex-a72-pmu" node will
match as well and is in turn favoured with an enable-method.
- If the DT already has an enable-method, we won't change this to PSCI.

Those two issues will for instance fail on the Raspberry Pi 4 DT.
To fix those problems, we adjust the scanning method:
The DT spec says that all CPU nodes are subnodes of the mandatory
/cpus node, which is a subnode of the root node. Also each CPU node has
to have a device_type = "cpu" property. So we find the /cpus node, then
scan for a subnode with the proper device_type, forcing the
enable-method to "psci".
We have to restart this search after a property has been patched, as the
node offsets might have changed meanwhile.

This allows this routine to be reused for the Raspberry Pi 4 later.

Change-Id: I00cae16cc923d9f8bb96a9b2a2933b9a79b06139
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2019-09-13 16:54:21 +01:00
..
arch Invalidate dcache build option for bl2 entry at EL3 2019-09-12 12:36:31 +00:00
bl1 Replace __ASSEMBLY__ with compiler-builtin __ASSEMBLER__ 2019-08-01 13:14:12 -07:00
bl2 BL2_AT_EL3: Enable pointer authentication support 2019-02-27 11:58:09 +00:00
bl2u Standardise header guards across codebase 2018-11-08 10:20:19 +00:00
bl31 Replace __ASSEMBLY__ with compiler-builtin __ASSEMBLER__ 2019-08-01 13:14:12 -07:00
bl32 Replace __ASSEMBLY__ with compiler-builtin __ASSEMBLER__ 2019-08-01 13:14:12 -07:00
common qemu: Move and generalise FDT PSCI fixup 2019-09-13 16:54:21 +01:00
drivers rpi3: Move rng driver to drivers 2019-09-13 16:54:21 +01:00
dt-bindings stm32mp1: update device tree files 2019-01-18 15:45:08 +01:00
export mediatek: mt8183: pass platform parameters 2019-09-10 11:25:29 +08:00
lib Merge changes I08cf22df,I535ee414,Ie84cfc96,I8c35ce4e,If7649764, ... into integration 2019-09-13 11:51:49 +00:00
plat AArch64: Align crash reporting output 2019-08-15 14:23:27 +00:00
services Replace __ASSEMBLY__ with compiler-builtin __ASSEMBLER__ 2019-08-01 13:14:12 -07:00
tools_share Sanitise includes across codebase 2019-01-04 10:43:17 +00:00