Commit graph

1870 commits

Author SHA1 Message Date
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
Bipin Ravi
959256766e Merge "fix(cpus): workaround for Cortex-A710 2216384" into integration 2022-09-13 20:59:43 +02: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
Akram Ahmad
11d448c934 fix(errata): workaround for Cortex-A510 erratum 2347730
Cortex-A510 erratum 2347730 is a Cat B erratum that affects
revisions r0p0, r0p1, r0p2, r0p3, r1p0 and r1p1. It is
fixed in r1p2. The workaround is to set CPUACTLR_EL1[17]
to 1, which will disable specific microarchitectural clock
gating behaviour.

SDEN can be found here:
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: I115386284c2d91bd61515142f971e2e72de43e68
2022-08-30 20:38:27 +01:00
Raghu Krishnamurthy
7c2fe62f13 fix(bl31): allow use of EHF with S-EL2 SPMC
Currently, when SPMC at S-EL2 is used, we cannot use the RAS framework
to handle Group 0 interrupts. This is required on platforms where first
level of triaging needs to occur at EL3, before forwarding RAS handling
to a secure partition running atop an SPMC (hafnium).
The RAS framework depends on EHF and EHF registers for Group 0
interrupts to be trapped to EL3 when execution is both in secure world
and normal world. However, an FF-A compliant SPMC requires secure
interrupts to be trapped by the SPMC when execution is in S-EL0/S-EL1.
Consequently, the SPMC (hafnium) is incompatible with EHF, since it is
not re-entrant, and a Group 0 interrupt trapped to EL3 when execution is
in secure world, cannot be forwarded to an SP running atop SPMC.
This patch changes EHF to only register for Group 0 interrupts to be
trapped to EL3 when execution is in normal world and also makes it a
valid routing model to do so, when EL3_EXCEPTION_HANDLING is set (when
enabling the RAS framework).

Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
Change-Id: I72d4cf4d8ecc549a832d1c36055fbe95866747fe
2022-08-30 08:29:25 -07:00
Madhukar Pappireddy
00460e7dfa Merge "docs(marvell): document UART image downloading" into integration 2022-08-30 16:31:10 +02:00
Bipin Ravi
748749a870 Merge "fix(errata): workaround for Cortex-A510 erratum 2371937" into integration 2022-08-24 23:46:02 +02:00
Bipin Ravi
ac2605e69a Merge "fix(errata): workaround for Cortex-A78C erratum 2395411" into integration 2022-08-24 23:37:52 +02:00
Akram Ahmad
4b6f0026ea fix(errata): workaround for Cortex-A78C erratum 2395411
Cortex-A78C erratum 2395411 is a Cat B erratum that affects
revisions r0p1 and r0p2, and is currently open. The workaround
is to set CPUACTLR2_EL1[40] to 1, which will disable folding
of demand requests into older prefetches with L2 miss requests
outstanding.

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

Signed-off-by: Akram Ahmad <Akram.Ahmad@arm.com>
Change-Id: I4f0fb278ac20a2eb4dd7e4efd1b1246dd85e48c4
2022-08-24 19:46:13 +01:00
Akram Ahmad
a67c1b1b2b fix(errata): workaround for Cortex-A510 erratum 2371937
Cortex-A510 erratum 2371937 is a Cat B erratum that applies
to revisions r0p0, r0p1, r0p2, r0p3, r1p0, and r1p1. It is
fixed in r1p2. The workaround is to set the ATOM field of
CPUECTLR_EL1 (bits [40:38]) to 0b010, which will force all
cacheable atomic operations to be executed near.

SDEN can be found here:
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: Ia219a609a3397e39631de65831ecff8a3cd1227e
2022-08-24 16:35:25 +02:00
Akram Ahmad
3280e5e655 fix(errata): workaround for Cortex-A710 erratum 2147715
Cortex-A710 erratum 2147715 is a Cat B erratum that applies
to revision r2p0 of the CPU, and is fixed in r2p1. The work-
around is to set CPUACTLR_EL1[22]=1. Setting this will cause
the CFP instruction to invalidate all branch predictor resources
regardless of the context.

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

Signed-off-by: Akram Ahmad <Akram.Ahmad@arm.com>
Change-Id: I94771bc1fc9b65a0c17d75200ec2b1df8a3279c6
2022-08-22 20:30:36 +02:00
Bipin Ravi
3a41658864 Merge "feat(rng-trap): add EL3 support for FEAT_RNG_TRAP" into integration 2022-08-18 22:24:41 +02:00
Juan Pablo Conde
ff86e0b4e6 feat(rng-trap): add EL3 support for FEAT_RNG_TRAP
FEAT_RNG_TRAP introduces support for EL3 trapping of reads of the
RNDR and RNDRRS registers, which is enabled by setting the
SCR_EL3.TRNDR bit. This patch adds a new build flag
ENABLE_FEAT_RNG_TRAP that enables the feature.
This feature is supported only in AArch64 state from Armv8.5 onwards.

Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
Change-Id: Ia9f17aef3444d3822bf03809036a1f668c9f2d89
2022-08-18 15:53:54 -04:00
Akram Ahmad
e6602d4b15 fix(errata): workaround for Neoverse-N2 erratum 2376738
Neoverse-N2 erratum 2376738 is a Cat B erratum that applies
to revision r0p0 of the CPU. It is fixed in r0p1. 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/SDEN1982442/latest

Signed-off-by: Akram Ahmad <Akram.Ahmad@arm.com>
Change-Id: I4ad4434f9b7210244e67046d9657d218857dced5
2022-08-17 11:11:26 +02:00
Pali Rohár
b48cd784f7 docs(marvell): document UART image downloading
For A3K there are two different tools for booting Armada37x0 platform
over UART, one from Marvell and second from CZ.NIC. For A8K there is
just one my own mvebu64boot tool.

Add documentation how to build these tools and how to download TF-A
image over UART to boot TF-A without flashing it to non-volatile
storage.

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: Ifa03584010a9c40496a34e6d5b9f3b78cb2cc89b
2022-08-12 18:36:10 +02:00
Madhukar Pappireddy
6a5022278b Merge "fix(errata): workaround for Neoverse-V1 erratum 1618635" into integration 2022-08-11 22:51:42 +02:00
Olivier Deprez
1631f9c75c Merge "feat(sve): support full SVE vector length" into integration 2022-08-09 15:25:57 +02:00
Arthur She
89e4cea14a docs(juno): fix broken link
The URL of the Juno Getting Started Guide has been changed.
Fix the broken link.

Signed-off-by: Arthur She <arthur.she@linaro.org>
Change-Id: I55697f2f1f787c32d1ea7dfcf9eda619906cdb5d
2022-08-08 09:27:59 +02:00
Juan Pablo Conde
14a6fed5ac fix(errata): workaround for Neoverse-V1 erratum 1618635
Neoverse-V1 erratum 1618635 is a Cat B erratum that applies to
revision r0p0. It is fixed in r1p0.
The workaround is done through the instruction patching
mechanism, which is performed by a write sequence of
IMPLEMENTATION DEFINED registers.

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

Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
Change-Id: I53e406735cd3a2a930fdc72ebce3bbed97100168
2022-08-05 15:56:30 -04:00
Madhukar Pappireddy
09acc421e3 Merge "feat(tc): introduce TC2 platform" into integration 2022-07-25 15:09:29 +02:00
Joanna Farley
a31903437a Merge "docs(maintainers): switch emails from Xilinx to AMD" into integration 2022-07-25 13:39:57 +02:00
Michal Simek
094b84636c docs(maintainers): switch emails from Xilinx to AMD
Switch emails from Xilinx to AMD after acquisition.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I5d126dc49e53f2735bb7e103f8f883a9474206fc
2022-07-25 10:26:35 +02:00
Rupinderjit Singh
eebd2c3f61 feat(tc): introduce TC2 platform
Added a platform support to use tc2 specific CPU cores.

Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Change-Id: Ib76d440e358e9bd1cf80aec5b8591f7a6e47ecbd
2022-07-22 21:13:21 +01:00
Manish Pandey
3f9d5c24cf Merge "fix(doc): document missing RMM-EL3 runtime services" into integration 2022-07-22 10:51:41 +02:00
Madhukar Pappireddy
c1d7585d2d Merge "fix(errata): workaround for Cortex-X2 erratum 2371105" into integration 2022-07-21 21:32:22 +02:00
Bipin Ravi
bc0f84de40 fix(errata): workaround for Cortex-X2 erratum 2371105
Cortex-X2 erratum 2371105 is a cat B erratum that applies to
revisions r0p0 - r2p0 and is fixed in r2p1. The workaround is to
set bit[40] of CPUACTLR2_EL1 to disable folding of demand requests
into older prefetches with L2 miss requests outstanding.

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

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: Ib4f0caac36e1ecf049871acdea45526b394b7bad
2022-07-21 14:26:59 -05:00
Lauren Wehrmeister
486ebd681d Merge "fix(errata): workaround for Cortex A78C erratum 2242638" into integration 2022-07-21 20:31:34 +02:00
Javier Almansa Sobrino
e50fedbc86 fix(doc): document missing RMM-EL3 runtime services
This patch adds documentation for the missing RMM-EL3
runtime services:

* RMM_RMI_REQ_COMPLETE
* RMM_GTSI_DELEGATE
* RMM_GTSI_UNDELEGATE

This patch also fixes a couple of minor bugs on return codes
for delegate/undelegate internal APIs.

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: Ic721005e7851e838eebaee7865ba78fadc3309e4
2022-07-21 12:36:45 +01:00
Madhukar Pappireddy
6be1aa7e9d Merge "fix(errata): workaround for Cortex-A710 erratum 2371105" into integration 2022-07-20 14:38:01 +02:00
Bipin Ravi
3220f05ef9 fix(errata): workaround for Cortex-A710 erratum 2371105
Cortex-A710 erratum 2371105 is a cat B erratum that applies to
revisions r0p0 - r2p0 and is fixed in r2p1. The workaround is to
set bit[40] of CPUACTLR2_EL1 to disable folding of demand requests
into older prefetches with L2 miss requests outstanding.

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

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I342b095b66f808bd6c066c20c581df5341bb7c2c
2022-07-19 12:52:18 -05:00
Bipin Ravi
6979f47fec fix(errata): workaround for Cortex A78C erratum 2242638
Cortex A78C erratum 2242638 is a Cat B erratum which applies to
revisions r0p1, r0p2 and is still open. The workaround is to apply
a CPU implementation specific specific patch sequence.

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

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I35d385245a04a39b87be71c1a42312f75e1152e5
2022-07-19 09:12:07 -05:00
Manish V Badarkhe
645557cde7 Merge "docs(security): update info on use of OpenSSL 3.0" into integration 2022-07-18 10:22:45 +02:00
Juan Pablo Conde
8caf10acab docs(security): update info on use of OpenSSL 3.0
OpenSSL 3.0 is a pre-requisite since v2.7 and can be installed
on the operating system by updating the previous version.
However, this may not be convenient for everyone, as some may
want to keep their previous versions of OpenSSL.

This update on the docs shows that there is an alternative to
install OpenSSL on the system by using a local build of
OpenSSL 3.0 and pointing both the build and run commands to
that build.

Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
Change-Id: Ib9ad9ee5c333f7b04e2747ae02433aa66e6397f3
2022-07-15 18:09:18 -04:00
Sandrine Bailleux
e905f23620 Merge "docs: re-parent BL2 platform hooks for measured boot" into integration 2022-07-15 07:26:10 +02:00
laurenw-arm
8008babd58 fix(errata): workaround for Cortex-A78C 2132064
Cortex-A78C erratum 2132064 is a cat B erratum that applies to revisions
r0p1 and r0p2 and is still open.

This patch implements workaround option 2 that places the data
prefetcher in the most conservative mode to greatly reduce prefetches
by writing the following bits to the value indicated:
ecltr[7:6], PF_MODE = 2'b11

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

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Ica2561c1e257643c2482085447ef852fa62a1eb2
2022-07-13 12:54:39 -05:00
Sandrine Bailleux
a0915ba436 docs: re-parent BL2 platform hooks for measured boot
bl2_plat_mboot_init/finish() functions documentation was incorrectly
hooked up to BL2U-specific section.

Change-Id: I758cb8142e992b0c85ee36d5671fc9ecd5bde29b
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2022-07-13 10:07:54 +02:00
Manish V Badarkhe
5726fb77b8 Merge "docs(prerequisites): fix "Build Host" title" into integration 2022-07-11 11:33:30 +02:00
Sandrine Bailleux
4a1bcd5071 docs(prerequisites): fix "Build Host" title
Add an empty line just before the "Build Host" title.

Without this, the title is not properly recognized, it does not get
added to the table of contents and the underlining characters appear
as dashes, as can be seen here:

https://trustedfirmware-a.readthedocs.io/en/v2.7/getting_started/prerequisites.html#prerequisites

Change-Id: Ia89cf3de0588495cbe64b0247dc860619f5ea6a8
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2022-07-11 10:57:23 +02:00
Bipin Ravi
994e1cfd6d Merge "fix(cpus): workaround for Neoverse-N2 erratum 2388450" into integration 2022-07-08 19:25:50 +02:00
Mark Brown
bebcf27f1c feat(sve): support full SVE vector length
Currently the SVE code hard codes a maximum vector length of 512 bits
when configuring SVE rather than the architecture supported maximum.
While this is fine for current physical implementations the architecture
allows for vector lengths up to 2048 bits and emulated implementations
generally allow any length up to this maximum.

Since there may be system specific reasons to limit the maximum vector
length make the limit configurable, defaulting to the architecture
maximum. The default should be suitable for most implementations since
the hardware will limit the actual vector length selected to what is
physically supported in the system.

Signed-off-by: Mark Brown <broonie@kernel.org>
Change-Id: I22c32c98a81c0cf9562411189d8a610a5b61ca12
2022-07-08 17:17:11 +01:00
Daniel Boulby
884d515625 fix(cpus): workaround for Neoverse-N2 erratum 2388450
Neoverse-N2 erratum 2388450 is a cat B erratum that applies to
revision r0p0 and is fixed in r0p1. The workaround is to set
bit[40] of CPUACTLR2_EL1 to disable folding of demand requests into
older prefetches with L2 miss requests outstanding.

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

Change-Id: I6dd949c79cea8dbad322e569aa5de86cf8cf9639
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2022-07-07 15:05:15 +01:00
Javier Almansa Sobrino
7e06575b77 docs(rmmd): add myself as RMMD and RME owner
Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I93f5e622e37f3156bd5326b7d3a3d0d7f73b2c2e
2022-07-05 17:43:34 +01:00
Soby Mathew
717daadce0 Merge changes from topic "jas/rmm-el3-ifc" into integration
* changes:
  docs(rmmd): document EL3-RMM Interfaces
  feat(rmmd): add support to create a boot manifest
  fix(rme): use RMM shared buffer for attest SMCs
  feat(rmmd): add support for RMM Boot interface
2022-07-05 12:03:49 +02:00