Commit graph

156 commits

Author SHA1 Message Date
Arvind Ram Prakash
24a4a0a5ec fix(gic600): workaround for Part 1 of GIC600 erratum 2384374
GIC600 erratum 2384374 is a Category B erratum. Part 1 is fixed
in this patch, and the Part 1 failure mode is described as
'If the packet to be sent is a SET packet, then a higher priority SET
may not be sent when it should be until an unblocking event occurs.'

This is handled by calling gicv3_apply_errata_wa_2384374() in the
ehf_deactivate_priority() path, so that when EHF restores the priority
to the original priority, the interrupt packet buffered
in the GIC can be sent.

gicv3_apply_errata_wa_2384374() is the workaround for
the Part 2 of erratum 2384374 which flush packets from the GIC buffer
and is being used in this patch.

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

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I4bb6dcf86c94125cbc574e0dc5119abe43e84731
2024-03-06 14:16:35 -06:00
Sughosh Ganu
e106a78ef0 feat(fwu): update the URL links for the FWU specification
Update the links for accessing the FWU Multi Bank update specification
to point to the latest revision of the specification.

Change-Id: I25f35556a94ca81ca0a7463aebfcbc2d84595e8f
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2024-03-01 14:19:56 +05:30
Manish Pandey
3e95bea5ec docs(sdei): provide security guidelines when using SDEI
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: Ic27bdc88186f6805adee2f452503856e213a4710
2024-02-15 15:37:00 +00:00
J-Alves
e0afd1471c docs: change FVP argument in RME configuration
In RME documentation use "bp.secure_memory=0" to disable TZC,
and avoid conflicts with SPM in 4-world configuration.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I532bca8ab3bd3e6d4f18b5aa7e848c533e016f39
2024-02-06 11:00:54 +00:00
Rohit Mathew
341df6af6e feat(arm): move GPT setup to common BL source
As of now, GPT setup is being handled from BL2 for plat/arm platforms.
However, for platforms having a separate entity to load firmware images,
it is possible for BL31 to setup the GPT. In order to address this
concern, move the GPT setup implementation from arm_bl2_setup.c file to
arm_common.c. Additionally, rename the API from arm_bl2_gpt_setup to
arm_gpt_setup to make it boot stage agnostic.

Signed-off-by: Rohit Mathew <Rohit.Mathew@arm.com>
Change-Id: I35d17a179c8746945c69db37fd23d763a7774ddc
2024-01-25 10:45:22 +00:00
Rohit Mathew
86e4859a05 feat(arm): retrieve GPT related data from platform
For RME-enabled platforms, initializing L0 and L1 tables and enabling
GPC checks is necessary. For systems using BL2 to load firmware images,
the GPT initialization has to be done in BL2 prior to the image load.
The common Arm platform code currently implements this in the
"arm_bl2_plat_gpt_setup" function, relying on the FVP platform's
specifications (PAS definitions, GPCCR_PPS, and GPCCR_PGS).

Different Arm platforms may have distinct PAS definitions, GPCCR_PPS,
GPCCR_PGS, L0/L1 base, and size. To accommodate these variations,
introduce the "plat_arm_get_gpt_info" API. Platforms must implement
this API to provide the necessary data for GPT setup on RME-enabled
platforms. It is essential to note that these additions are relevant to
platforms under the plat/arm hierarchy that will reuse the
"arm_bl2_plat_gpt_setup" function.

As a result of these new additions, migrate data related to the FVP
platform to its source and header files.

Signed-off-by: Rohit Mathew <Rohit.Mathew@arm.com>
Change-Id: I4f4c8894c1cda0adc1f83e7439eb372e923f6147
2024-01-25 10:45:22 +00:00
Govindraj Raja
0a33adc058 refactor(mte): deprecate CTX_INCLUDE_MTE_REGS
Currently CTX_INCLUDE_MTE_REGS is used for dual purpose,
to enable allocation tags register and to context save and restore
them and also to check if mte feature is available.

To make it more meaningful, remove CTX_INCLUDE_MTE_REGS
and introduce FEAT_MTE. This would enable allocation tags register
when FEAT_MTE is enabled and also supported from platform.

Also arch features can be conditionally enabled disabled based on
arch version from `make_helpers/arch_features.mk`

Change-Id: Ibdd2d43874634ad7ddff93c7edad6044ae1631ed
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-01-23 11:58:55 -06:00
laurenw-arm
0de9a12c89 docs(fconf): update bindings for multi-RoT CoTs
Update CoT binding documentation to add the signing-key property
as optional in root-certificates and add rot_keys node

Change-Id: I1d1fbc0394275520cfa43213d5b7006e51990fdd
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2024-01-18 13:53:27 -06:00
Javier Almansa Sobrino
ca99680ce9 docs: fix errata in RMM-EL3 Communication Interface documentation
Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I6d6b7ff084cc731470e873cfdf37beeec0d3635a
2023-11-30 17:00:06 +02:00
Joanna Farley
d1cfbc25c5 Merge changes from topic "od/hf-doc-migration" into integration
* changes:
  docs(spm-mm): remove reference to SEL2 SPMC
  docs: remove SEL2 SPMC threat model
  docs: remove unused SPM related diagrams
2023-11-14 09:52:12 +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
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
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
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
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
Shruti Gupta
b175287075 docs(rme): update tftf build command
Deprecate pack_realm build command for TFTF.
To build Realm payload tests use ENABLE_REALM_PAYLOAD_TESTS=1.
This new command line for TFTF is effective from SHA 9945bef6b
in tf-a-tests repo.

Signed-off-by: Shruti Gupta <shruti.gupta@arm.com>
Change-Id: Iee9ac9b2b367aac50677fac95631e7e4818cdf3a
2023-08-02 13:31:10 +01:00
Sandrine Bailleux
1b4d99878c Merge "fix(doc): match boot-order size to implementation" into integration 2023-06-08 08:30:40 +02:00
Soby Mathew
b709f12db3 Merge "feat(rme): save PAuth context when RME is enabled" into integration 2023-05-24 14:23:38 +02:00
Shruti Gupta
13cc1aa70a feat(rme): save PAuth context when RME is enabled
This patch enables CTX_INCLUDE_PAUTH_REGS for RME builds.
The RMM-EL3 specification is also updated to reflect the changes
and also version of the same is bumped from 0.1 to 0.2.

Signed-off-by: Shruti Gupta <shruti.gupta@arm.com>
Change-Id: I2e96a592d2b75abaee24294240c1727c5ceba420
2023-05-24 10:56:40 +01:00
Olivier Deprez
6a6fdd16d0 Merge "docs: fix rendering for code blocks in SPM" into integration 2023-05-23 16:01:02 +02:00
J-Alves
433f6d2b41 docs(spm): memory region nodes definition
Update the documentation related with memory region nodes
of SP's FF-A manifest, to relate to changes from patches [1].

[1] https://review.trustedfirmware.org/q/topic:%22ja%252Fmem_region_fix%22+(status:open%20OR%20status:merged)

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I16595ec581b0ad9d2c20fca8dab64b6fd9ad001a
2023-05-19 09:37:16 +01:00
Kathleen Capella
fd1479d919 fix(doc): match boot-order size to implementation
Docs had boot-order field as being u32 but code uses uint16_t.
FF-A specification does not specify a required size.

Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Change-Id: Ia4c3fc66b9e733ea1417d34c2601bce1f81c4d32
2023-05-17 16:25:31 -04:00
J-Alves
cc63ff9762 docs(spm): add memory sharing documentation
Add documentation that explains implementation specific
relevant information from the update done to FF-A v1.1
memory sharing in Hafnium.

Change-Id: Ifc3c6b86c0545d53331207b017b990427ee84f2d
Signed-off-by: J-Alves <joao.alves@arm.com>
2023-05-12 09:32:21 +01:00
Manish Pandey
9202d51990 refactor(ras): replace RAS_EXTENSION with FEAT_RAS
The current usage of RAS_EXTENSION in TF-A codebase is to cater for two
things in TF-A :
1. Pull in necessary framework and platform hooks for Firmware first
   handling(FFH) of RAS errors.
2. Manage the FEAT_RAS extension when switching the worlds.

FFH means that all the EAs from NS are trapped in EL3 first and signaled
to NS world later after the first handling is done in firmware. There is
an alternate way of handling RAS errors viz Kernel First handling(KFH).
Tying FEAT_RAS to RAS_EXTENSION build flag was not correct as the
feature is needed for proper handling KFH in as well.

This patch breaks down the RAS_EXTENSION flag into a flag to denote the
CPU architecture `ENABLE_FEAT_RAS` which is used in context management
during world switch and another flag `RAS_FFH_SUPPORT` to pull in
required framework and platform hooks for FFH.

Proper support for KFH will be added in future patches.

BREAKING CHANGE: The previous RAS_EXTENSION is now deprecated. The
equivalent functionality can be achieved by the following
2 options:
 - ENABLE_FEAT_RAS
 - RAS_FFH_SUPPORT

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I1abb9ab6622b8f1b15712b12f17612804d48a6ec
2023-05-09 13:19:22 +01:00
Madhukar Pappireddy
e601729119 docs(spm): support for handling Group0 interrupts
Please refer the doc update.

Change-Id: Ib79fae1296bc28fa9bd0cd79609d6153bb57519b
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2023-05-01 13:29:48 -05:00
Nicola Mazzucato
b2836dfef6 docs: fix rendering for code blocks in SPM
Two sample build command code blocks are not correctly
rendered by the documentation generator.

Fix that by adding newlines.

Signed-off-by: Nicola Mazzucato <nicola.mazzucato@arm.com>
Change-Id: I1bb075ea4fc8e3230307548e40daecf2a79bae8d
2023-05-01 10:22:05 +01:00
Manish V Badarkhe
1cf3e2f0a8 feat(fvp): add Event Log maximum size property in DT
Updated the code to get and set the 'tpm_event_log_max_size' property
in the event_log.dtsi.

In this change, the maximum Event Log buffer size allocated by BL1 is
passed to BL2, rather than both relying on the maximum Event Log buffer
size macro.

Change-Id: I7aa6256390872171e362b6f166f3f7335aa6e425
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-04-18 17:13:17 +02:00
Andre Przywara
d23acc9e4f refactor(amu): unify ENABLE_AMU and ENABLE_FEAT_AMUv1
So far we have the ENABLE_AMU build option to include AMU register
handling code for enabling and context switch. There is also an
ENABLE_FEAT_AMUv1 option, solely to protect the HAFGRTR_EL2 system
register handling. The latter needs some alignment with the new feature
scheme, but it conceptually overlaps with the ENABLE_AMU option.

Since there is no real need for two separate options, unify both into a
new ENABLE_FEAT_AMU name in a first step. This is mostly just renaming at
this point, a subsequent patch will make use of the new feature handling
scheme.

Change-Id: I97d8a55bdee2ed1e1509fa9f2b09fd0bdd82736e
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-03-27 19:36:00 +01:00
Madhukar Pappireddy
48fb931536 Merge "docs(spm): add other-s-interrupts-action field to sp manifest" into integration 2023-03-06 15:09:27 +01:00
Madhukar Pappireddy
83a6798708 Merge "docs: add interrupts-target field to sp manifest" into integration 2023-02-22 17:46:22 +01:00
Sandrine Bailleux
af4fee04b9 Merge changes from topic "mb/tos-fw-config-load-refactor" into integration
* changes:
  feat(spmd): map SPMC manifest region as EL3_PAS
  feat(fvp): update device tree with load addresses of TOS_FW config
  refactor(fvp): rename the DTB info structure member
  feat(fconf): rename 'ns-load-address' to 'secondary-load-address'
2023-02-10 10:05:12 +01:00
Manish V Badarkhe
05e5503021 feat(fconf): rename 'ns-load-address' to 'secondary-load-address'
The 'ns-load-address' property has been renamed to 'secondary-load-
address' in order to make it more generic. It can be used to copy
the configuration to any location, be it root, secure, or non-secure.

Change-Id: I122508e155ccd99082296be3f6b8db2f908be221
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-02-07 11:26:38 +00:00
Raghu Krishnamurthy
9b5a360f82 docs: add interrupts-target field to sp manifest
In order to support the ability to target a SPI interrupt to a
particular core, an impdef field "interrupts-target" has been added to
associate and interrupt id with an mpidr. The field is optional and if
not provided, existing SPMC behavior of routing to boot strap core is
maintained.

Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
Change-Id: I78ccfb45cd9b411cca4b36ff940064fc9dcd1622
2023-02-05 06:37:53 -08:00
Joanna Farley
8b47f87a5f Merge "feat(optee): add loading OP-TEE image via an SMC" into integration 2023-02-03 00:42:17 +01:00
Soby Mathew
e3df3ffa11 Merge changes I1b092bc1,Ifc2461b4,I5176caa5 into integration
* changes:
  docs(rme): update RMM-EL3 Boot Manifest structure description
  feat(rme): read DRAM information from FVP DTB
  feat(rme): set DRAM information in Boot Manifest platform data
2023-02-01 17:03:22 +01:00
Jeffrey Kardatzke
05c69cf75e feat(optee): add loading OP-TEE image via an SMC
This adds the ability to load the OP-TEE image via an SMC called from
non-secure userspace rather than loading it during boot. This should
only be utilized on platforms that can ensure security is maintained up
until the point the SMC is invoked as it breaks the normal barrier
between the secure and non-secure world.

Signed-off-by: Jeffrey Kardatzke <jkardatzke@google.com>
Change-Id: I21cfa9699617c493fa4190f01d1cbb714e7449cc
2023-01-31 10:38:16 -08:00
AlexeiFedorov
1db295cf4b docs(rme): update RMM-EL3 Boot Manifest structure description
This patch updates description of RMM-EL3 Boot Manifest
structure and its corresponding diagram and tables with DRAM
layout data.

Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
Change-Id: I1b092bc1ad5f1c7909d25c1a0dc89c2b210ada27
2023-01-31 16:56:04 +01:00
Madhukar Pappireddy
ae1d9d9046 docs(spm): add other-s-interrupts-action field to sp manifest
Also, the `run-time-model` field is removed from SP manifest binding
as it is not supported by Hafnium(SPMC).

Change-Id: Id8a91b2608791667e6285b3c5b879ec84612149d
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2023-01-26 08:56:29 -06:00
Soby Mathew
d9c976b088 docs(rme): improve OOB instruction for RME
This patch reworks the existing OOB instructions for RME enabled
TF-A.

Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: Icaeaf48c7061feaad4b1bb92388954694705e45c
2023-01-26 15:59:06 +02:00
Alexei Fedorov
a0f256b033 Merge "fix(rmmd): add missing padding to RMM Boot Manifest and initialize it" into integration 2022-12-08 14:53:50 +01:00
Javier Almansa Sobrino
dc0ca64e4b fix(rmmd): add missing padding to RMM Boot Manifest and initialize it
This patch also:
     * Enforces the check of RES0 fields on EL3-RMM boot interface
       and manifest
     * Fixes a couple of nits on the EL3-RMM Boot Interface
       documentation.

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: Idb9e38f9fcda2ba0655646a1e2c4fdbabd5cdc40
2022-12-07 18:54:28 +00:00
Soby Mathew
b8dbfacc44 Merge "feat(rmm): add support for the 2nd DRAM bank" into integration 2022-12-07 06:03:38 +01:00
AlexeiFedorov
346cfe2b46 feat(rmm): add support for the 2nd DRAM bank
This patch adds support for RMM granules allocation
in FVP 2nd DRAM 2GB bank at 0x880000000 base address.
For ENABLE_RME = 1 case it also removes "mem=1G"
Linux kernel command line option in fvp-base-psci-common.dsti
to allow memory layout discovery from the FVP device tree.
FVP parameter 'bp.dram_size' - size of main memory in gigabytes
documented in docs/components/realm-management-extension.rst
is changed from 2 to 4.

Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
Change-Id: I174da4416ad5a8d41bf0ac89f356dba7c0cd3fe7
2022-12-06 12:29:43 +00:00
Govindraj Raja
f1910cc178 build: restrict usage of CTX_INCLUDE_EL2_REGS
CTX_INCLUDE_EL2_REGS is used to save/restore EL2 registers and
it should be only used when there is SPMD or RME enabled.

Make CTX_INCLUDE_EL2_REGS an internal macro and remove
from documentation.

Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
Change-Id: I6a70edfd88163423ff0482de094601cf794246d6
2022-12-01 12:04:40 +02:00
Olivier Deprez
02fd5a1763 Merge changes I97687f18,I91d5718b into integration
* changes:
  docs(spm): interrupt handling guidance FF-A v1.1 EAC0
  docs(spm): partition runtime model and schedule modes
2022-11-17 11:14:05 +01:00
Olivier Deprez
8fca0cdbee Merge changes from topic "ja/spm_doc" into integration
* changes:
  docs(spm): ff-a v1.1 indirect message
  docs(spm): s-el0 partition support update
2022-11-17 10:04:49 +01:00
Madhukar Pappireddy
06afdd1e7a docs(spm): interrupt handling guidance FF-A v1.1 EAC0
This patch documents the actions taken by Hafnium SPMC in response
to non-secure and secure interrupts.

Change-Id: I97687f188ca97aeb255e3e5b55d44ddf5d66b6e0
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2022-11-16 14:28:37 -06:00
Madhukar Pappireddy
03997f187c docs(spm): partition runtime model and schedule modes
This patch documents the support for partition runtime models, call
chains and schedule modes in Hafnium SPMC.

Change-Id: I91d5718bb2c21d475499e402f6f27076930336cb
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2022-11-16 13:34:32 -06:00
J-Alves
53e3b385f0 docs(spm): ff-a v1.1 indirect message
Update secure partition manager documentation to include
FF-A v1.1 indirect messaging implementation.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: Ifbca45347f775080ef98ac896d31650204318ba4
2022-11-16 15:29:45 +00:00
Manish V Badarkhe
71061819aa Merge changes If90a18ee,I02e88f8c,Iea447fb5,Ie0570481,Ieeb14cfc into integration
* changes:
  docs: add top level section numbering
  docs(build): clarify getting started section
  docs(build): clarify docs building instructions
  fix(docs): prevent a sphinx warning
  fix(docs): prevent a virtual environment from failing a build
2022-11-16 16:18:54 +01:00