Commit graph

2455 commits

Author SHA1 Message Date
Prasad Kummari
7b7c535064 docs(versal): add TSP build documentation
Add information about Versal platform for TSP and provide
the build commands.

Change-Id: I7106ab477a881c58e1c45863bd6854d188982282
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
2023-11-02 07:29:34 +01:00
Manish Pandey
42604d2d3c docs(ras): update RAS documentation
Add details about RAS error handling philosophies and its implementation
It also updates the tests introduced to verify them.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Iedc8c1e713dad05baadd58e5752df36fa00121a7
2023-11-01 17:46:47 +00:00
Manish Pandey
9f9bfd7a0b docs(el3-runtime): update BL31 exception vector handling
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ieae66bafe1cdd253edebecddea156551144a1cc9
2023-11-01 17:46:46 +00:00
Manish Pandey
f87e54f73c fix(ras): remove RAS_FFH_SUPPORT and introduce FFH_SUPPORT
This patch removes RAS_FFH_SUPPORT macro which is the combination of
ENABLE_FEAT_RAS and HANDLE_EA_EL3_FIRST_NS. Instead introduce an
internal macro FFH_SUPPORT which gets enabled when platforms wants
to enable lower EL EA handling at EL3. The internal macro FFH_SUPPORT
will be automatically enabled if HANDLE_EA_EL3_FIRST_NS is enabled.
FFH_SUPPORT along with ENABLE_FEAT_RAS will be used in source files
to provide equivalent check which was provided by RAS_FFH_SUPPORT
earlier. In generic code we needed a macro which could abstract both
HANDLE_EA_EL3_FIRST_NS and RAS_FFH_SUPPORT macros that had limitations.
Former was tied up with NS world only while the latter was tied to RAS
feature.

This is to allow Secure/Realm world to have their own FFH macros
in future.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ie5692ccbf462f5dcc3f005a5beea5aa35124ac73
2023-11-01 17:45:56 +00:00
Manish Pandey
970a4a8d8c fix(ras): restrict ENABLE_FEAT_RAS to have only two states
As part of migrating RAS extension to feature detection mechanism, the
macro ENABLE_FEAT_RAS was allowed to have dynamic detection (FEAT_STATE
2). Considering this feature does impact execution of EL3 and we need
to know at compile time about the presence of this feature. Do not use
dynamic detection part of feature detection mechanism.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I23858f641f81fbd81b6b17504eb4a2cc65c1a752
2023-11-01 11:11:38 +00:00
Olivier Deprez
d5be802752 docs(spm-mm): remove reference to SEL2 SPMC
As the SEL2 SPMC design doc is migrated to Hafnium tree, remove the
reference to this implementation from TF-A's SPM-MM doc.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I1609c7d1d098420412dffc7b1309cc9c11502f8a
2023-10-31 11:19:41 +01:00
Olivier Deprez
6c33e8712e docs: remove SEL2 SPMC threat model
The SEL2/Hafnium SPMC implementation threat model is now hosted at [1].

[1] https://hafnium.readthedocs.io/en/latest/threat_model_spm.html

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I83d3f21ef0ee9364529c7b80de9872034ff92b09
2023-10-31 11:19:41 +01:00
Olivier Deprez
0fd975acad docs: remove unused SPM related diagrams
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Ia60c4aa6a0aa0da5765d295e658964e6faa5960a
2023-10-31 11:19:41 +01:00
Lauren Wehrmeister
48b92c604f Merge changes from topic "mb/psa-crypto-ecdsa" into integration
* changes:
  docs: mark PSA_CRYPTO as an experimental feature
  feat(fvp): increase BL1 RW area for PSA_CRYPTO implementation
  feat(mbedtls-psa): mbedTLS PSA Crypto with ECDSA
2023-10-30 16:20:24 +01:00
Lauren Wehrmeister
113273aac4 Merge changes from topic "sm/err_errata" into integration
* changes:
  fix(cpus): fix the rev-var of Neoverse-V1
  fix(errata-abi): update the Neoverse-N2 errata ABI struct
  fix(errata-abi): update the neoverse-N1 errata ABI struct
  fix(cpus): fix the rev-var of Cortex-X2
  fix(errata-abi): update the Cortex-A78C errata ABI struct
  fix(cpus): update the rev-var for Cortex-A78AE
  fix(errata-abi): update the Cortex-A76 errata ABI struct
  fix(cpus): fix the rev-var for Cortex-A710
2023-10-26 21:03:06 +02:00
Manish V Badarkhe
4c02c99bd1 docs: deletion of a few deprecated platforms not yet confirmed
Updated the 'Deprecated Platforms' table to reflect that the
deletion of sgi575 and rdn1Edge is still unconfirmed.

Change-Id: Ie8e8af55a735f624f5ee604d75bb497d870620cd
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-10-26 16:37:29 +02:00
Manish V Badarkhe
98ea2d814c docs: mark PSA_CRYPTO as an experimental feature
Updated the documentation to mark PSA_CRYPTO as an experimental
feature.

Change-Id: I894b687d6727fe7f80df54e6b08937e171f459b6
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-10-26 09:34:51 +01:00
Arvind Ram Prakash
edebefbcbc fix(mpam): refine MPAM initialization and enablement process
Restricts MPAM to only NS world and enables trap to EL3 for access of
MPAM registers from lower ELs of Secure and Realm world.

This patch removes MPAM enablement from global context and adds it to
EL3 State context which enables/disables MPAM during world switches.
Renamed ENABLE_MPAM_FOR_LOWER_ELS to ENABLE_FEAT_MPAM and
removed mpam_init_el3() as RESET behaviour is trapping.

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I131f9dba5df236a71959b2d425ee11af7f3c38c4
2023-10-25 09:04:29 -05:00
Manish Pandey
17e0a8c5db Merge changes from topic "st_remove_shm" into integration
* changes:
  docs(stm32mp15): mark STM32MP15_OPTEE_RSV_SHM deprecated
  feat(stm32mp15): disable OP-TEE shared memory
2023-10-25 09:44:27 +02:00
Sona Mathew
6e86475d55 fix(cpus): workaround for Cortex-A510 erratum 2080326
Cortex-A510 erratum 2080326 is a Cat B erratum that applies
to all revisions <= r0p2 and is fixed in r0p3.
The workaround sequence helps perform a DSB after each TLBI
instruction and can be applied only for version r0p2 and has
minimal performance impact.
The workaround is not applicable for versions < r0p2.

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

Change-Id: Ib9bce8b711c25a79f7b2f891ae6f8b366fc80ddd
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-10-24 14:35:21 -05:00
Sona Mathew
ab2b56df26 fix(cpus): fix the rev-var of Neoverse-V1
Update the revision and variant information in the
errata ABI file, neoverse_v1.S file for erratum ID - 2294912
to match the revision and variant in the latest SDEN.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-1401781/latest

Change-Id: I38a0f53c3515860ba442b5c0872c8ab051fdda6f
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-10-24 14:15:17 -05:00
Sona Mathew
8ae66d624e fix(cpus): fix the rev-var of Cortex-X2
Update the revision and variant information in the
errata ABI file, cortex_X2.S file for erratum ID - 2058056
to match the revision and variant in the latest SDEN.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-1775100/latest

Change-Id: I28ee39949d977c53d6f5243100f0c29bc3c0428c
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-10-24 14:15:17 -05:00
Sona Mathew
c814619a36 fix(cpus): update the rev-var for Cortex-A78AE
Update the revision and variant information in the
cortex_a78_ae.s and errata ABI file for erratum ID - 2376748
based on the latest SDEN.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-1707912/latest

Change-Id: I082aac41adf717b0d5d59046a8933a3f5a3de94f
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-10-24 14:09:54 -05:00
Sona Mathew
2bf7939a7b fix(cpus): fix the rev-var for Cortex-A710
Update the revision and variant information in the
errata ABI file, cortex_A710.S file for erratum ID - 2058056
and erratum ID - 2055002 to match the revision and variant
in the latest SDEN.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-1775101/latest

Change-Id: Ie010dae90dabf8670f588a06f9a606cf41e22afa
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-10-24 14:09:54 -05:00
Manish Pandey
bf41b992ae Merge "docs(maintainers): remove Jorge Ramirez-Ortiz from rcar3 maintainers" into integration 2023-10-20 15:58:21 +02:00
Yann Gautier
12e683a680 docs(stm32mp15): mark STM32MP15_OPTEE_RSV_SHM deprecated
TF-A is no more in charge of configuring OP-TEE shared memory.
Set the STM32MP15_OPTEE_RSV_SHM flag as deprecated (as well as the code
depending on it).

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I863d9a1e45e0bfc2f45d9bd84b90d626738934ab
2023-10-19 17:58:11 +02:00
Manish Pandey
d17c73241f docs: add code-owners for Firmare Handoff Library
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I2c64e7582a744f54b54085d3a1d7ac91e269ce3d
2023-10-18 13:31:42 +01:00
Sandrine Bailleux
542ff7653e docs(maintainers): remove Jorge Ramirez-Ortiz from rcar3 maintainers
On behalf of Jorge himself.

Change-Id: I2dca445a240f7bc16c02365e936b064f6a246d89
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2023-10-18 08:27:49 +02:00
laurenw-arm
6adeeb4728 docs(cert-create): add key size options for ecdsa
Adding the possible key sizes for the ecdsa key algorithm.

Change-Id: I58947bc749fed911766a1462a0c2ba520b8f7c69
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2023-10-13 09:59:25 -05:00
Nishant Sharma
801cd3c84a feat(el3-spmc): add a flag to enable support to load SEL0 SP
Introduce a build flag for enabling the support for loading SEL0 SP in
EL3 SPMC.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: I1d63ae4d0d8374a732113565be90d58861506e39
2023-10-12 10:35:57 +01:00
Sandrine Bailleux
85bebe18da refactor(console): disable getc() by default
The ability to read a character from the console constitutes an attack
vector into TF-A, as it gives attackers a means to inject arbitrary
data into TF-A. It is dangerous to keep that feature enabled if not
strictly necessary, especially in production firmware builds.

Thus, we need a way to disable this feature. Moreover, when it is
disabled, all related code should be eliminated from the firmware
binaries, such that no remnant/dead getc() code remains in memory,
which could otherwise be used as a gadget as part of a bigger security
attack.

This patch disables getc() feature by default. For legitimate getc()
use cases [1], it can be explicitly enabled by building TF-A with
ENABLE_CONSOLE_GETC=1.

The following changes are introduced when getc() is disabled:

- The multi-console framework no longer provides the console_getc()
  function.

- If the console driver selected by the platform attempts to register
  a getc() callback into the multi-console framework then TF-A will
  now fail to build.

  If registered through the assembly function finish_console_register():
  - On AArch64, you'll get:
      Error: undefined symbol CONSOLE_T_GETC used as an immediate value.
  - On AArch32, you'll get:
      Error: internal_relocation (type: OFFSET_IMM) not fixed up

  If registered through the C function console_register(), this requires
  populating a struct console with a getc field, which will trigger:
    error: 'console_t' {aka 'struct console'} has no member named 'getc'

- All console drivers which previously registered a getc() callback
  have been modified to do so only when ENABLE_CONSOLE_GETC=1.

[1] Example of such use cases would be:
    - Firmware recovery: retrieving a golden BL2 image over the console in
      order to repair a broken firmware on a bricked board.
    - Factory CLI tool: Drive some soak tests through the console.

Discussed on TF-A mailing list here:
https://lists.trustedfirmware.org/archives/list/tf-a@lists.trustedfirmware.org/thread/YS7F6RCNTWBTEOBLAXIRTXWIOYINVRW7/

Change-Id: Icb412304cd23dbdd7662df7cf8992267b7975cc5
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
2023-10-11 08:40:14 +02:00
Jayanth Dodderi Chidanand
8cf07ab36e docs(build): update GCC to 12.3.Rel1 version
Updating toolchain to the latest production release version
12.3.Rel1 publicly available on:
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

We build TF-A in CI using x86_64 Linux hosted cross toolchains:
---------------------------------------------------------------
* AArch32 bare-metal target (arm-none-eabi)
* AArch64 bare-metal target (aarch64-none-elf)

Change-Id: Ifcabb7fb9d8e13b87e164c3c1be8c8d32c31b49a
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2023-10-09 13:36:18 +01:00
Lauren Wehrmeister
56ddb3f092 Merge changes from topic "mb/psa-crypto-support" into integration
* changes:
  feat(mbedtls-psa): use PSA crypto API during signature verification
  feat(mbedtls-psa): use PSA crypto API during hash calculation
  feat(mbedtls-psa): use PSA crypto API for hash verification
  feat(mbedtls-psa): initialise mbedtls psa crypto
  feat(mbedtls-psa): register an ad-hoc PSA crypto driver
  feat(mbedtls-psa): introduce PSA_CRYPTO build option
  docs(changelog): add scope for MbedTLS PSA Crypto
2023-10-05 20:41:17 +02:00
Bipin Ravi
7a8b6f64f9 Merge "fix(cpus): workaround for Cortex-X3 erratum 2070301" into integration 2023-10-05 19:26:18 +02:00
Sandrine Bailleux
74306b2ac8 fix(docs): remove out-dated information about CI review comments
- Fix the name of the user account under which the CI bot posts
   review comments.

 - The CI has now transitioned to trustedfirmware.org so CI results
   are publically accessible.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: I53dd93e200c9e119b5df6bbaf2644485cde57ce5
2023-10-05 11:28:34 +02:00
Sona Mathew
2454316c2a fix(cpus): workaround for Cortex-X3 erratum 2070301
Cortex-X3 erratum 2070301 is a Cat B erratum that applies to all
revisions <= r1p2 and is still open.
The workaround is to write the value 4'b1001 to the PF_MODE bits
in the IMP_CPUECTLR2_EL1 register. This places the data prefetcher
in the most conservative mode instead of disabling it.

SDEN documentation:
https://developer.arm.com/documentation/2055130/latest

Change-Id: I337c4c7bb9221715aaf973a55d0154e1c7555768
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-10-04 13:45:16 -05:00
Manish V Badarkhe
5782b890d2 feat(mbedtls-psa): introduce PSA_CRYPTO build option
This is a preparatory patch to provide MbedTLS PSA Crypto
API support, with below changes -

1. Added a build macro PSA_CRYPTO to enable the MbedTLS PSA
   Crypto API support in the subsequent patches.
2. Compile necessary PSA crypto files from MbedTLS source code
   when PSA_CRYPTO=1.

Also, marked PSA_CRYPTO as an experimental feature.

Change-Id: I45188f56c5c98b169b2e21e365150b1825c6c450
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-10-04 08:51:40 +01:00
Soby Mathew
920aa8d4d2 Merge "feat(rmmd): enable SME for RMM" into integration 2023-10-03 14:29:17 +02:00
Arunachalam Ganapathy
f92eb7e261 feat(rmmd): enable SME for RMM
This patch enables Scalable Matrix Extension (SME) for RMM. RMM will
save/restore required registers that are shared with SVE/FPU register
state so that Realm can use FPU or SVE.

The Relevant RMM support can be found here :
https://github.com/TF-RMM/tf-rmm/commit/0ccd7ae58b00

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I3bbdb840e7736dec00b71c85fcec3d5719413ffd
2023-10-02 16:55:36 +01:00
Manish Pandey
a1377a89a7 Merge changes from topic "rm/handoff" into integration
* changes:
  feat(qemu): implement firmware handoff on qemu
  feat(handoff): introduce firmware handoff library
2023-10-02 15:50:28 +02:00
Madhukar Pappireddy
b990719ba0 Merge "fix(docs): add missing line in the fiptool command for stm32mp1" into integration 2023-09-29 18:21:16 +02:00
Olivier Deprez
d3fcc3f079 Merge "docs: update TF-A v2.10 release information" into integration 2023-09-29 16:05:40 +02:00
Lionel Debieve
d526d00a13 fix(docs): add missing line in the fiptool command for stm32mp1
Add the missing trusted key certificate in the fiptool
command line.

Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
Change-Id: Ife95b0261f04b7fd07a9b01488f9e5be9b87e841
2023-09-29 14:13:20 +01:00
Olivier Deprez
2226b4533c docs: update TF-A v2.10 release information
Update version and release schedule for the upcoming TF-A
release v2.10.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I505fbb034a74ce1cc6bc20efdd26803e6fb8c0c1
2023-09-29 10:18:37 +02:00
Manish V Badarkhe
f80323da12 Merge "refactor(ast2700): adopt RESET_TO_BL31 boot flow" into integration 2023-09-29 08:56:50 +02:00
Chia-Wei Wang
564e073cd5 refactor(ast2700): adopt RESET_TO_BL31 boot flow
Revise the AST2700 boot flow to the RESET_TO_BL31 scheme.
The execution of BL1/2 can be saved from ARM CA35 while most
low level platform initialization are moved to a preceding MCU.

This patch updates the build configuration and also adds
the SMP mailbox setup code to hold secondary cores until
they are being waken up.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Change-Id: I7e0aa6416b92b97036153db1d9a26baaa41b7b18
2023-09-28 10:23:06 +08:00
Madhukar Pappireddy
1f6bb41dd9 refactor(el3-runtime): plat_ic_has_interrupt_type returns bool
Rather than returning 0 or 1, the above function returns bool false
or true. No functional change.

Change-Id: Iea904ffc368568208fa8203e0d2e0cdaa500b1e0
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2023-09-25 17:09:15 -05:00
Sandrine Bailleux
9c44778818 Merge changes If9672598,I219c49d3 into integration
* changes:
  feat(cert-create): add pkcs11 engine support
  fix(cert-create): key: Avoid having a temporary value for pkey in key_load
2023-09-25 17:00:52 +02:00
Lauren Wehrmeister
fcfa15d41c Merge changes from topic "errata" into integration
* changes:
  fix(cpus): workaround for Neoverse V2 erratum 2743011
  fix(cpus): workaround for Neoverse V2 erratum 2779510
  fix(cpus): workaround for Neoverse V2 erratum 2719105
  fix(cpus): workaround for Neoverse V2 erratum 2331132
2023-09-22 20:22:19 +02:00
Raymond Mao
3ba2c15147 feat(handoff): introduce firmware handoff library
Add transfer list APIs and firmware handoff build option.

Change-Id: I68a0ace22c7e50fcdacd101eb76b271d7b76d8ff
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
2023-09-22 10:56:51 +01:00
Robin van der Gracht
616b3ce27d feat(cert-create): add pkcs11 engine support
Add pkcs11 engine support which allows using keys that are securely
stored on a HSM or TPM. To use this feature the user has to supply
an RFC 7512 compliant PKCS11 URI to a key instead of a file as an
argument to one of the key options. This change is fully backwards
compatible.

This change makes use of the openssl engine API which is deprecated
since openssl 3.0 and will most likely be removed in version 4. So
pkcs11 support will have to be updated to the openssl provider API
in the near future.

Signed-off-by: Robin van der Gracht <robin@protonic.nl>
Change-Id: If96725988ca62c5613ec59123943bf15922f5d1f
2023-09-21 13:27:25 +02:00
Joanna Farley
455cd0d3b5 Merge "chore: remove MULTI_CONSOLE_API references" into integration 2023-09-19 14:48:43 +02:00
Bipin Ravi
58dd153cc8 fix(cpus): workaround for Neoverse V2 erratum 2743011
Neoverse V2 erratum 2743011 is a Cat B erratum that applies to
all revisions <= r0p1 and is fixed in r0p2. The workaround is to
set CPUACTLR5_EL1[56:55] to 2'b01.

SDEN documentation:
https://developer.arm.com/documentation/SDEN2332927/latest

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I0e06ca723a1cce51fb027b7160f3dd06a4c93e64
2023-09-18 19:54:41 -05:00
Bipin Ravi
ff342643bc fix(cpus): workaround for Neoverse V2 erratum 2779510
Neoverse V2 erratum 2779510 is a Cat B erratum that applies to
all revisions <= r0p1 and is fixed in r0p2. The workaround is to
set bit[47] of CPUACTLR3_EL1 which might have a small impact on
power and negligible impact on performance.

SDEN documentation:
https://developer.arm.com/documentation/SDEN2332927/latest

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I6d937747bdcbf2913a64c4037f99918cbc466e80
2023-09-18 19:35:16 -05:00
Bipin Ravi
b01140256b fix(cpus): workaround for Neoverse V2 erratum 2719105
Neoverse V2 erratum 2719105 is a Cat B erratum that applies to all
revisions <= r0p1 and is fixed in r0p2.

The erratum is avoided by setting CPUACTLR2_EL1[0] to 1 to force
PLDW/PFRM ST to behave like PLD/PRFM LD and not cause invalidations
to other PE caches. There might be a small performance degradation
to this workaround for certain workloads that share data.

SDEN documentation:
https://developer.arm.com/documentation/SDEN2332927/latest

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: Id026edcb7ee1ca93371ce0001d18f5a8282c49ba
2023-09-18 17:43:51 -05:00