Commit graph

1960 commits

Author SHA1 Message Date
Boyan Karatotev
7954412694 fix(cpus): workaround for Cortex-X3 erratum 2313909
Cortex-X3 erratum 2313909 is a Cat B erratum that applies to revisions
r0p0 and r1p0, and is fixed in r1p1. The workaround is to set
CPUACTLR2_EL1[36] to 1 before the power down sequence that sets
CORE_PWRDN_EN. This allows the cpu to retry the power down and prevents
the deadlock. TF-A never clears this bit even if it wakes up from the
wfi in the sequence since it is not expected to do anything but retry to
power down after and the bit is cleared on reset.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN2055130/latest

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I5935b4bcd1e6712477c0d6eab2acc96d7964a35d
2022-10-27 13:46:52 +01:00
Boyan Karatotev
43438ad1ad fix(cpus): workaround for Neoverse-N2 erratum 2326639
Neoverse-N2 erratum 2326639 is a Cat B erratum that applies to revision
r0p0 and is fixed in r0p1. The workaround is to set CPUACTLR2_EL1[36] to
1 before the power down sequence that sets CORE_PWRDN_EN. This allows
the cpu to retry the power down and prevents the deadlock. TF-A never
clears this bit even if it wakes up from the wfi in the sequence since
it is not expected to do anything but retry to power down after and the
bit is cleared on reset.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN1982442/latest/

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I9a325c5b9b498798e5efd5c79a4a6d5bed97c619
2022-10-27 13:46:52 +01:00
Boyan Karatotev
028c4e42d8 fix(rpi3): tighten platform pwr_domain_pwr_down_wfi behaviour
Platforms which implement pwr_domain_pwr_down_wfi differ substantially
in behaviour. However, different cpus require similar sequences to power
down. This patch tightens the behaviour of these platforms to end on a
wfi loop after performing platform power down. This is required so that
platforms behave more consistently on power down, in cases where the wfi
can fall through.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ie29bd3a5e654780bacb4e07a6d123ac6d2467c1f
2022-10-27 13:46:02 +01:00
Shruti Gupta
20155112c5 docs(spm): add threat model for el3 spmc
Threat model for EL3 SPMC.
The mitigations are based on the guidance
provided in FF-A v1.1 EAC0 spec.

Signed-off-by: Shruti Gupta <shruti.gupta@arm.com>
Change-Id: I7f4c9370b6eefe6d1a7d1afac27e8b3a7b476072
2022-10-27 11:40:02 +01:00
Shruti Gupta
4090ac33f4 docs(spm): add design documentation
Add documentation how to build EL3 SPMC,
briefly describes all FF-A interfaces,
SP boot flow, SP Manifest, Power Management,
Boot Info Protocol, Runtime model and state
transition and Interrupt Handling.

Signed-off-by: Shruti Gupta <shruti.gupta@arm.com>
Change-Id: I630df1d50a4621b344a09e462563eacc90109de4
2022-10-27 11:39:53 +01:00
Boyan Karatotev
cf58b2d41c chore: rename Makalu ELP to Cortex-X3
The Cortex-X3 cpu port was developed before its public release when it
was known as Makalu ELP. Now that it's released we can use the official
product name.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Iebb90cf2f77330ed848a3d61c5f6928942189c5a
2022-10-27 09:41:00 +01:00
Sandrine Bailleux
4e5d262345 Merge changes from topic "imx8m-hab-support" into integration
* changes:
  docs(imx8m): update for high assurance boot
  feat(imx8m): add support for high assurance boot
  feat(imx8mp): add hab and map required memory blocks
  feat(imx8mn): add hab and map required memory blocks
  feat(imx8mm): add hab and map required memory blocks
2022-10-21 09:35:32 +02:00
Manish V Badarkhe
07dc8ba93b build: deprecate Arm rdn1edge and sgi575 FVP platforms
Arm has decided to deprecate the sgi575 and rdn1edge platforms.
The development of software and fast models for these platforms
has been discontinued. rdn1edge platform has been superseded by the
rdn2 platform, which is already supported in TF-A and CI work is
underway for this platform.

Change-Id: If2228fb73549b244c3a5b0e5746617b3f24fe771
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2022-10-20 19:57:31 +01:00
Madhukar Pappireddy
712a32d9ff Merge "fix(cpus): workaround for Cortex-A510 erratum 2666669" into integration 2022-10-20 15:03:13 +02:00
Joanna Farley
4e7983b71d Merge "feat(ethos-n)!: add support for SMMU streams" into integration 2022-10-20 11:04:48 +02:00
Andrey Zhizhikin
de7e9b562a docs(imx8m): update for high assurance boot
Add a section into documentation listing the support for High Assurance
Boot (HABv4), note on the DRAM mapping, and reference to the external
documentation.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Change-Id: Iaca97f4ac2595e35de2664a880394519f96eca07
2022-10-19 15:55:15 +02:00
Daniel Boulby
81f4abb8ec docs(prerequisites): upgrade to Mbed TLS 2.28.1
In anticpation of the next Trusted Firmware release update the to newest
2.x Mbed TLS library [1].

Note that the Mbed TLS project published version 3.x some time ago.
However, as this is a major release with API breakages, upgrading to
this one might require some more involved changes in TF-A, which we are
not ready to do. We shall upgrade to Mbed TLS 3.x after the v2.8 release
of TF-A.

[1] https://github.com/Mbed-TLS/mbedtls/tree/v2.28.1

Change-Id: I7594ad062a693d2ecc3b1705e944dce2c3c43bb2
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2022-10-19 11:53:56 +01:00
Mikael Olsson
60c4394357 docs(maintainers): add NPU driver owners
Code owners have been added for the Arm(R) Ethos(TM)-N NPU driver.

Change-Id: I0bda0d95151cdff5cd3a793c6c0e9ef6a9a5f50b
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
2022-10-17 11:04:14 +02:00
Akram Ahmad
afb5d069a6 fix(cpus): workaround for Cortex-A510 erratum 2666669
Cortex-A510 erratum 2666669 applies to revisions r1p1 and lower,
and is fixed in r1p2. The errata is mitigated by setting
IMP_CPUACTLR_EL1[38] to 1.

SDEN documentation:
https://developer.arm.com/documentation/SDEN1873351/latest
https://developer.arm.com/documentation/SDEN1873361/latest

Signed-off-by: Akram Ahmad <Akram.Ahmad@arm.com>
Change-Id: Ief27e4a155e43e75f05f2710d0c7bd5da2dec43f
2022-10-13 16:19:50 -05:00
Manish V Badarkhe
53e4c160ae Merge changes from topic "fvp_dts_rework" into integration
* changes:
  fix(fvp_ve): fdts: Fix vexpress,config-bus subnode names
  fix(fvp): fdts: Fix idle-states entry method
  fix(fvp): fdts: fix memtimer subframe addressing
  feat(fvp): fdts: update rtsm_ve DT files from the Linux kernel
  refactor(fvp): fdts: consolidate GICv2 base FVP DT files
  refactor(fvp): fdts: consolidate GICv3 base FVP DT files
  feat(fvp): dts: drop 32-bit .dts files
  refactor(fvp): fdts: merge motherboard .dtsi files
  refactor(fvp_ve): fdts: prepare Cortex-A5 and A7 model DTs
  fix(fvp): fdts: unify and fix PSCI nodes
2022-10-11 19:33:35 +02:00
Andre Przywara
b92033075a feat(fvp): dts: drop 32-bit .dts files
Conceptually the DT is a hardware description, as such it's independent
from the instruction set that a DT client uses. So having separate DTs
for aarch32 and aarch64 does not make sense and is not needed.

Probably due to historic reasons (a Linux bug fixed in 2016 with Linux
commit ba6dea4f7ced, in Linux v4.8) the CPU reg property was using a
different size between aarch64 and aarch32, even though the size of it
is solely governed by the parent's #address-cells property.

Consolidate this to be always 2, and always use two cells to describe
the CPU's MPIDR register.

This removes the last difference of the -aarch32 versions of the FVP
DT files, so just remove all of them. The respective versions without
that suffix can now be used with AArch32 DT clients as well.

Also remove the respective part in the documentation.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Change-Id: I45d3a2cbba8e04595a741e1cf41900377952673e
2022-10-11 16:09:35 +01:00
Bipin Ravi
a2506c319f Merge "revert(cpus): "Revert workaround for A77 erratum 1800714"" into integration 2022-10-11 17:01:17 +02:00
Boyan Karatotev
08e2fdbd3b revert(cpus): "Revert workaround for A77 erratum 1800714"
Reinstate the workaround introduced in commit
9bbc03a6e0. The cited change to the SDEN
could not be found and there are no known problems with the workaround.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Iec9938f173e7565024aca798f224df339de90806
2022-10-11 09:34:05 +01:00
Tamas Ban
1bc78557c3 docs: add PLAT_RSS_COMMS_PAYLOAD_MAX_SIZE to porting-guide.rst
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I79761347919a0dfa86a29b5424f1d34fc4ab91cb
2022-10-07 11:32:48 +02:00
Manish V Badarkhe
50a43b0f64 docs(drtm): steps to run DRTM implementation
Documented steps to run DRTM implementation.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I30dd8c1088a54a8906389c2584d922862610dae0
2022-10-06 14:02:25 +01:00
Lucian Paul-Trifu
b3b227ff20 docs(drtm): add platform APIs for DRTM
Documented platform APIs for DRTM

Signed-off-by: Lucian Paul-Trifu <lucian.paultrifu@gmail.com>
Signed-off-by: Manish V Badarkhe <manish.badarkhe@arm.com>
Change-Id: I22749c26bbe7b3271705dd3db07e8597fce6225b
2022-10-06 14:02:25 +01:00
Mikael Olsson
b139f1cf97 feat(ethos-n)!: add support for SMMU streams
The Arm(R) Ethos(TM)-N NPU driver now supports configuring the SMMU
streams that the NPU shall use and will therefore no longer delegate
access to these registers to the non-secure world. In order for the
driver to support this, the device tree parsing has been updated to
support parsing the allocators used by the NPU and what SMMU stream that
is associated with each allocator.

To keep track of what NPU device each allocator is associated with, the
resulting config from the device tree parsing will now group the NPU
cores and allocators into their respective NPU device.

The SMC API has been changed to allow the caller to specify what
allocator the NPU shall be configured to use and the API version has
been bumped to indicate this change.

Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Change-Id: I6ac43819133138614e3f55a014e93466fe3d5277
2022-10-04 15:15:04 +02:00
Joel Goddard
bd063a73a8 refactor(cpu): use the updated IP name for Demeter CPU
Neoverse Demeter CPU has been renamed to Neoverse V2 CPU.
Correspondingly, update the CPU library, file names and other
references to use the updated IP name.

Signed-off-by: Joel Goddard <joel.goddard@arm.com>
Change-Id: Ia4bf45bf47807c06f4c966861230faea420d088f
2022-10-03 15:31:40 +05:30
Manish Pandey
e8f4ec1ab0 Merge changes from topic "st_uart_updates" into integration
* changes:
  feat(stm32mp1): add early console in SP_min
  feat(st): properly manage early console
  feat(st-uart): manage STM32MP_RECONFIGURE_CONSOLE
  docs(st): introduce STM32MP_RECONFIGURE_CONSOLE
  feat(st): add trace for early console
  fix(stm32mp1): enable crash console in FIQ handler
  feat(st-uart): add initialization with the device tree
  refactor(stm32mp1): move DT_UART_COMPAT in include file
  feat(stm32mp1): configure the serial boot load address
  fix(stm32mp1): update the FIP load address for serial boot
  refactor(st): configure baudrate for UART programmer
  refactor(st-uart): compute the over sampling dynamically
2022-10-03 11:58:07 +02:00
Manish Pandey
2c16b802cb Merge "fix(ras): trap "RAS error record" accesses only for NS" into integration 2022-09-30 14:14:26 +02:00
Manish V Badarkhe
ea7aee20c1 Merge "fix(rmmd): return X4 output value" into integration 2022-09-29 10:25:57 +02:00
Manish Pandey
00e8f79c15 fix(ras): trap "RAS error record" accesses only for NS
RAS_TRAP_LOWER_EL_ERR_ACCESS was used to prevent access to RAS error
record registers (RAS ERR* & RAS ERX*) from lower EL's in any security
state. To give more fine grain control per world basis re-purpose this
macro to RAS_TRAP_NS_ERR_REC_ACCESS, which will enable the trap only
if Error record registers are accessed from NS.
This will also help in future scenarios when RAS handling(in Firmware
first handling paradigm)can be offloaded to a secure partition.

This is first patch in series to refactor RAS framework in TF-A.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ifa7f60bc8c82c9960adf029001bc36c443016d5d
2022-09-28 17:10:57 +01:00
AlexeiFedorov
8e51cccaef fix(rmmd): return X4 output value
Return values contained in 'smc_result' structure
are shifted down by one register:
X1 written by RMM is returned to NS in X0 and
X5 is returned in X4.

Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
Change-Id: I92907ac3ff3bac8554643ae7c198a4a758c38cb3
2022-09-28 15:11:03 +02:00
Manish V Badarkhe
14ec900a42 Merge "docs(maintainers): add myself as TC code owner" into integration 2022-09-27 11:42:46 +02:00
Anders Dellien
8fecda3c8a docs(maintainers): add myself as TC code owner
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Change-Id: Ic67334bf1a979cb7b7355d0dcca7eb94752c4611
2022-09-27 09:47:54 +01:00
Sandrine Bailleux
d8d0ea9a7f Merge "docs(fwu): update firmware update design" into integration 2022-09-26 11:02:51 +02:00
Yann Gautier
156709ddde docs(st): introduce STM32MP_RECONFIGURE_CONSOLE
This flag will be used in BL32, to reconfigure UART parameters for
the early or crash console. By default, it is zero, as UART is
already configured in BL2.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I7b28ff489479ab04a2fade027933524cdd36e959
2022-09-23 15:17:43 +02:00
Patrick Delaunay
4b2f23e55f feat(stm32mp1): configure the serial boot load address
For product with 128MB DDR size, the OP-TEE is located at the end
of the DDR and the FIP can't be loaded at the default location
because it overlap the OP-TEE final location. So the default value
for DWL_BUFFER_BASE is invalid.

To avoid this conflict the serial boot load address = DWL_BUFFER_BASE
can be modified with a configuration flags.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: Ie27b87c10c57fea5d4c6200ce4f624e775b9a080
2022-09-23 15:17:43 +02:00
Michal Simek
def661b6ef docs(maintainers): update xilinx record to cover docs
Recently new Xilinx Versal NET platform has been merged but documentation
cover only zynqmp. Fix the fragment to cover all Xilinx documentation.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I10f8f865ca8d46518135adb80ba0ba4470534529
2022-09-22 08:53:45 +02:00
Joanna Farley
cdbea24097 Merge "docs(build): update GCC to 11.3.Rel1 version" into integration 2022-09-21 18:43:02 +02:00
Michal Simek
4efdc48896 feat(versal-net): add documentation for Versal NET SoC
Add description for Versal NET SoC.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Akshay Belsare <Akshay.Belsare@amd.com>
Change-Id: Idcbb893c6b9e46512308c53ba2a0bee48a022b0a
2022-09-19 15:01:51 +02:00
Joanna Farley
b86cbe10d2 Merge changes from topic "provencore-spd" into integration
* changes:
  feat(zynqmp): add support for ProvenCore
  feat(services): add a SPD for ProvenCore
  feat(gic): add APIs to raise NS and S-EL1 SGIs
2022-09-16 10:52:37 +02:00
Manish V Badarkhe
eb3d4015a3 docs(fwu): update firmware update design
Refactored legacy firmware design and added details about PSA
firmware updates.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I9c123b3f62580d4271dbaff0a728b6412fae7890
2022-09-16 09:12:00 +01:00
Florian Lugou
b0980e5843 feat(services): add a SPD for ProvenCore
Adds a dispatcher for ProvenCore based on the test secure payload
dispatcher.

Signed-off-by: Florian Lugou <florian.lugou@provenrun.com>
Change-Id: I978afc3af6a6f65791655685a7bc80070673c9f3
2022-09-15 22:26:57 +02:00
Pranav Madhu
158ed580bd feat(plat/arm/css): add per-cpu power down support for warm reset
Add a new function to setup a SGI interrupt that will be used to trigger
a request for per-cpu power down when executing the PSCI SYSTEM_RESET
request. This will be used on CSS platform that require all the CPUs to
execute the CPU specific power down sequence to complete a warm reboot
sequence in which only the CPUs are power cycled.

Change-Id: I80da0f6c3cd0c5c442c82239ba1e1f773821a7f5
Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
2022-09-15 18:09:56 +05:30
Bipin Ravi
959256766e Merge "fix(cpus): workaround for Cortex-A710 2216384" into integration 2022-09-13 20:59:43 +02:00
Jayanth Dodderi Chidanand
49154435ca docs(build): update GCC to 11.3.Rel1 version
This toolchain provides multiple cross compilers and is publicly
available on https://developer.arm.com/

We build TF-A in CI using:
AArch32 bare-metal target (arm-none-eabi)
AArch64 ELF bare-metal target (aarch64-none-elf)

Change-Id: I94e13f6c1ebe3a4a58ca6c79c1605bd300b372d3
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2022-09-13 17:46:41 +01:00
Joanna Farley
1790036de3 Merge "docs(porting-guide): correct typo of "bits" to "bytes"" into integration 2022-09-13 09:37:39 +02:00
Max Yu
5c60b8c8ce docs(porting-guide): correct typo of "bits" to "bytes"
The CACHE_WRITEBACK_GRANULE is documented to be in bits, but
specifying the value in bits broke a build. Further investigation
suggests that the value should in fact be in bytes. See
https://github.com/ARM-software/arm-trusted-firmware/blob/master/include/arch/aarch64/
smccc_helpers.h#L101
and
https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Common-Type-Attributes.html

Change-Id: I9a2b2fbe18d5a58a8f9aeb2726a0623f3484c88e
Signed-off-by: Max Yu <maxlyu@google.com>
2022-09-12 22:35:14 +02:00
Akram Ahmad
5d3c1f5890 fix(cpus): workaround for Cortex-A78C erratum 2376749
Cortex-A78C erratum 2376749 is a Cat B erratum that applies
to revisions r0p1 and r0p2 of the A78C and is currently open.
The workaround is to set CPUACTLR2_EL1[0] to 1 to force
PLDW/PFRM ST to behave like PLD/PRFM LD and not cause
invalidations to other PE caches.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN2004089/latest

Signed-off-by: Akram Ahmad <Akram.Ahmad@arm.com>
Change-Id: I3b29f4b7f167bf499d5d11ffef91a94861bd1383
2022-09-08 13:25:42 +02:00
Jayanth Dodderi Chidanand
b781fcf139 fix(cpus): workaround for Cortex-A710 2216384
Cortex-A710 erratum 2216384 is a Cat B erratum that applies to revisions
r0p0, r1p0, and r2p0, and is fixed in r2p1. The workaround is to set
CPUACTLR5_EL1[17] to 1 and applying an instruction patching sequence.
Setting this bit, along with these instructions will prevent the
deadlock, and thereby avoids the reset of the processor.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN1775101/latest

Change-Id: I2821591c23f854c12111288ad1fd1aef45db6add
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2022-09-06 22:43:04 +01:00
Manish Pandey
945f0ad996 Merge "fix(errata): workaround for Cortex-A510 erratum 2347730" into integration 2022-09-06 14:49:53 +02:00
Manish Pandey
04f28f895f Merge changes from topic "mt8188" into integration
* changes:
  feat(mt8188): add pinctrl support
  feat(mt8188): add RTC support
  feat(mt8188): add pmic and pwrap support
  refator(mediatek): move pmic.[c|h] to common folder
  refator(mediatek): move common definitions of pmic wrap to common folder
  feat(mt8188): add IOMMU enable control in SiP service
  feat(mt8188): add display port control in SiP service
  fix(mediatek): use uppercase for definition
  feat(mediatek): move dp drivers to common folder
  feat(mediatek): move mtk_cirq.c drivers to cirq folder
  feat(mt8188): initialize GIC
  feat(mt8188): initialize systimer
  feat(mt8188): initialize platform for MediaTek MT8188
  refator(mediatek): remove unused files
  refator(mediatek): move drivers folder in common to plat/mediatek
  feat(mediatek): support coreboot BL31 loading
2022-09-05 15:54:11 +02:00
Rex-BC Chen
de310e1e5f feat(mt8188): initialize platform for MediaTek MT8188
- Add basic platform setup.
- Add MT8188 documentation at docs/plat/.
- Add generic CPU helper functions.
- Add basic register address.
- Add mtk_pm.c in lib/pm

TEST=build pass
BUG=b:236331724

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I5f8617c42ffba2c9d3a16f3980cb75fda5624031
2022-09-05 13:52:20 +08:00
Olivier Deprez
9a5dec6695 Merge "fix(bl31): allow use of EHF with S-EL2 SPMC" into integration 2022-09-02 11:06:52 +02:00