Commit graph

2182 commits

Author SHA1 Message Date
Harrison Mutai
d9d5eb138d feat(memmap): add tabular memory use data
Add support for tabulating static memory consumption data from ELF
binaries. This relies on static symbols, defined in the linker files,
that provide information about the memory ranges.

Change-Id: Ie19cd2b80a7b591607640feeb84c63266963ea4d
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-05-12 14:38:22 +01:00
Harrison Mutai
af5b49e992 refactor: improve readability of symbol table
Make the symbol table produced by the memory mapping script more
readable. Add a generic interface for interacting with ELF binaries.
This interface enables us to get symbols that provide some insights into
TF-A's memory usage.

Change-Id: I6646f817a1d38d6184b837b78039b7465a533c5c
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-05-12 14:38:22 +01:00
Harrison Mutai
b1af2676f2 docs(psci): expound runtime instrumentation docs
Change-Id: I3c30b44d4196c30fd07373282150e543959fce1a
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-05-11 12:11:43 +01:00
Joanna Farley
a18e975f00 Merge "docs: update release and code freeze dates" into integration 2023-05-10 15:16:40 +02:00
Manish Pandey
269f3daefb Merge changes from topic "mp/feat_ras" into integration
* changes:
  refactor(cpufeat): enable FEAT_RAS for FEAT_STATE_CHECKED
  refactor(ras): replace RAS_EXTENSION with FEAT_RAS
2023-05-09 21:48:45 +02:00
Madhukar Pappireddy
fdf9d768ea Merge changes from topic "srm/Errata_ABI_El3" into integration
* changes:
  docs(errata_abi): document the errata abi changes
  feat(fvp): enable errata management interface
  fix(cpus): workaround platforms non-arm interconnect
  refactor(errata_abi): factor in non-arm interconnect
  feat(errata_abi): errata management firmware interface
2023-05-09 21:15:54 +02:00
Manish V Badarkhe
c214ced421 Merge changes from topic "bk/context_refactor" into integration
* changes:
  fix(gicv3): restore scr_el3 after changing it
  refactor(cm): make SVE and SME build dependencies logical
2023-05-09 18:15:01 +02:00
Madhukar Pappireddy
315f4f8a84 Merge "docs: update TZC secured DRAM map for FVP and Juno" into integration 2023-05-09 17:14:41 +02:00
Manish Pandey
a26ecc1718 Merge changes I06b35f11,If80573d6 into integration
* changes:
  docs: remove plat_convert_pk() interface from release doc
  chore(io): remove io_dummy driver
2023-05-09 16:51:38 +02: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
Jayanth Dodderi Chidanand
9e2e777a2b docs(build): update GCC to 12.2.Rel1 version
Updating toolchain to the latest production release version
12.2.Rel1 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: Ib603cf7417e6878683a1100d5f55311188e36e8e
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2023-05-09 11:01:38 +02:00
Manish V Badarkhe
a52c52518b docs: update TZC secured DRAM map for FVP and Juno
Updated the documentation to include missing details about the
TZC secured DRAM mapping for the FVP and Juno platforms.

Change-Id: I10e59b9f9686fa2fef97f89864ebc272b10e5c0b
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-05-08 16:16:07 +02:00
Sona Mathew
e5d9b6f0bf docs(errata_abi): document the errata abi changes
Updated errata ABI feature enable flag and the errata non-arm
interconnect based flag, the default values for when the
feature is not enabled.

Change-Id: Ieb2144a1bc38f4ed684fda8280842a18964ba148
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-05-05 13:24:59 -05:00
Sona Mathew
ab062f0510 fix(cpus): workaround platforms non-arm interconnect
The workarounds for these below mentioned errata are not implemented
in EL3, but the flags can be enabled/disabled at a platform level
based on arm/non-arm interconnect IP. The ABI helps assist the Kernel
in the process of mitigation for the following errata:

Cortex-A715:   erratum 2701951
Neoverse V2:   erratum 2719103
Cortex-A710:   erratum 2701952
Cortex-X2:     erratum 2701952
Neoverse N2:   erratum 2728475
Neoverse V1:   erratum 2701953
Cortex-A78:    erratum 2712571
Cortex-A78AE:  erratum 2712574
Cortex-A78C:   erratum 2712575

EL3 provides an appropriate return value via errata ABI when the
kernel makes an SMC call using the EM_CPU_ERRATUM_FEATURES FID with the
appropriate erratum ID.

Change-Id: I35bd69d812dba37410dd8bc2bbde20d4955b0850
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-05-05 13:23:10 -05:00
Harrison Mutai
3fb7d622ff docs: update release and code freeze dates
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Change-Id: If782bd337d10213cb74503f4ea54ed304d6e4c34
2023-05-05 14:59:05 +01:00
Boyan Karatotev
0d1229473e refactor(cm): make SVE and SME build dependencies logical
Currently, enabling SME forces SVE off. However, the SME enablement
requires SVE to be enabled, which is reflected in code. This is the
opposite of what the build flags require.

Further, the few platforms that enable SME also explicitly enable SVE.
Their platform.mk runs after the defaults.mk file so this override never
materializes. As a result, the override is only present on the
commandline.

Change it to something sensible where if SME is on then code can rely on
SVE being on too. Do this with a check in the Makefile as it is the more
widely used pattern. This maintains all valid use cases but subtly
changes corner cases no one uses at the moment to require a slightly
different combination of flags.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: If7ca3972ebc3c321e554533d7bc81af49c2472be
2023-05-05 13:16:18 +01:00
Madhukar Pappireddy
e603983d37 Merge changes from topic "allwinner_t507" into integration
* changes:
  feat(allwinner): add support for Allwinner T507 SoC
  feat(allwinner): add function to detect H616 die variant
  feat(allwinner): add extra CPU control registers
  refactor(allwinner): consolidate sunxi_cfg.h files
2023-05-04 15:19:50 +02:00
Olivier Deprez
17f9732da5 Merge changes from topic "mp/group0_support" into integration
* changes:
  docs(spm): support for handling Group0 interrupts
  feat(spmd): introduce platform handler for Group0 interrupt
  feat(spmd): add support for FFA_EL3_INTR_HANDLE_32 ABI
  feat(spmd): register handler for group0 interrupt from NWd
2023-05-03 18:15:40 +02:00
Manish Pandey
f50107d3df Merge changes I9d06e0ee,I6980e84f into integration
* changes:
  feat(tegra): implement 'pwr_domain_off_early' handler
  feat(psci): introduce 'pwr_domain_off_early' hook
2023-05-03 15:10:45 +02:00
Manish Pandey
d494b0eff5 Merge "feat(el3-runtime): handle traps for IMPDEF registers accesses" into integration 2023-05-02 16:51:14 +02:00
Manish V Badarkhe
fda676d3d2 Merge "build: deprecate Arm rde1edge" into integration 2023-05-02 14:31:01 +02:00
Sandrine Bailleux
e23d442d17 Merge "docs(measured-boot): update the build command" into integration 2023-05-02 09:16:01 +02: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
Varun Wadekar
0ed3be6fc2 feat(el3-runtime): handle traps for IMPDEF registers accesses
This patch introduces support to handle traps from lower ELs for
IMPDEF system register accesses. The actual support is left to the
platforms to implement.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I623d5c432b4ce4328b68f238c15b1c83df97c1e5
2023-04-30 11:04:59 +01:00
Sandrine Bailleux
3db998e531 docs: remove plat_convert_pk() interface from release doc
The code was already removed as part of commit 4ac5b3949d
"refactor(auth): replace plat_convert_pk". The present commit just
removes it from the release documentation.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: I06b35f110c844267d69a865df55dd451ed2f08cd
2023-04-28 16:07:24 +02:00
Manish Pandey
76b225d41d Merge "docs(juno): refer to SCP v2.12.0" into integration 2023-04-28 15:58:05 +02:00
Sandrine Bailleux
63e0b86538 chore(io): remove io_dummy driver
In accordance with [1], delete the io_dummy driver code in preparation
for the v2.9 release.

[1] https://trustedfirmware-a.readthedocs.io/en/latest/about/release-information.html

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: If80573d6f889624ef06b099fd267ee85f3a6331e
2023-04-28 15:45:43 +02:00
Manish V Badarkhe
a49bb6f838 Merge "docs: fix a typo in the glossary" into integration 2023-04-28 12:08:09 +02:00
Manish Pandey
1ff41ba333 Merge "feat(sme): enable SME2 functionality for NS world" into integration 2023-04-28 11:57:25 +02:00
Jayanth Dodderi Chidanand
03d3c0d729 feat(sme): enable SME2 functionality for NS world
FEAT_SME2 is an extension of FEAT_SME and an optional feature
from v9.2. Its an extension of SME, wherein it not only
processes matrix operations efficiently, but also provides
outer-product instructions to accelerate matrix operations.
It affords instructions for multi-vector operations.
Further, it adds an 512 bit architectural register ZT0.

This patch implements all the changes introduced with FEAT_SME2
to ensure that the instructions are allowed to access ZT0
register from Non-secure lower exception levels.

Additionally, it adds support to ensure FEAT_SME2 is aligned
with the existing FEATURE DETECTION mechanism, and documented.

Change-Id: Iee0f61943304a9cfc3db8f986047b1321d0a6463
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2023-04-27 16:02:27 +01:00
Sandrine Bailleux
6fc9c1cdb9 docs: fix a typo in the glossary
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: I4c76fde5e487ab4b2495f1ea692ae07f8be81d57
2023-04-27 13:29:56 +02:00
Manish V Badarkhe
bb5b2632e1 docs(measured-boot): update the build command
As per recent changes to OPTEE's fvp.mk file, both options
"MEASURED_BOOT" and "MEASURED_BOOT_FTPM" are required for the fTPM
application to be built.

Change-Id: I621113c3fbd47e9f5be015ea65e9b8d0f218e4e8
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-04-27 07:28:41 +01:00
Mikhail Kalashnikov
018c1d878f feat(allwinner): add support for Allwinner T507 SoC
The Allwinner T507 SoC is using the same die as the H616, but in a
different package. On top of this, there is at least one different die
revision out there, which uses a different CPU cluster control block.
The same die revision has been spotted in some, but not all, H313 SoCs.

Apart from that IP block, the rest of the SoC seems the same, so we can
support them using the existing H616 port. The die revision can be
auto-detected, so there is no extra build option or knowledge needed.

Provide the deviating CPU power up/down sequence for the die variant.
The new IP block uses per-core instead of per-cluster registers, but
follows the same pattern otherwise.

Since the CPU ops code is shared among all Allwinner SoCs, we need to
dummy-define the new register names for the older SoCs. The actual new
code is guarded by a predicate function, that is hard coded to return
true on the other SoCs. Since this is a static inline function in a
header file, the compiler will optimise away the unneeded branch there,
so the generated code for the other SoCs stays the same.

Change-Id: Ib5ade99d34b4ccb161ccde0e34f280ca6bd16ecd
Signed-off-by: Mikhail Kalashnikov <iuncuim@gmail.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-04-26 17:45:29 +01:00
Joanna Farley
1982a6ac62 Merge "docs: patch Poetry build instructions" into integration 2023-04-26 16:45:02 +02:00
Sandrine Bailleux
00cdd81ea7 Merge changes from topics "sb/deprecate-cryptocell", "sb/deprecation-policy" into integration
* changes:
  docs: deprecate CryptoCell-712/713 drivers
  docs: split deprecated interfaces and drivers
  docs: extend deprecation policy
2023-04-26 13:39:28 +02:00
Chris Kay
7cff6565bc docs(juno): refer to SCP v2.12.0
Change-Id: I2844fb569abcc403525982162484dc0aa7e5a9d6
Signed-off-by: Chris Kay <chris.kay@arm.com>
2023-04-26 12:07:50 +01:00
Manish Pandey
44fcbb4a12 Merge "docs(juno): update SCP downloads link" into integration 2023-04-26 12:59:41 +02:00
Varun Wadekar
6cf4ae979a feat(psci): introduce 'pwr_domain_off_early' hook
This patch introduces the 'pwr_domain_off_early'  hook for
platforms wanting to perform housekeeping steps before the
PSCI framework starts the CPU power off sequence. Platforms
might also want to use ths opportunity to ensure that the
CPU off sequence can proceed.

The PSCI framework expects a return code of PSCI_E_DENIED,
if the platform wants to halt the CPU off sequence.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I6980e84fc4d6cb80537a178d0d3d26fb28a13853
2023-04-26 09:53:10 +01:00
Harrison Mutai
95f4abed84 docs: patch Poetry build instructions
Some parts of the documentation referring to Poetry provides incorrect
build instructions and has some minor formatting errors. Reformat the
bits that require formatting, and fix the build instructions. These
were originally part of the patch stack that added Poetry support but
were accidentally reverted prior to merge.

Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Change-Id: I336d3a7bbe99f75262430ae436f8ebc2cb050d2c
2023-04-25 16:18:10 +01:00
Sandrine Bailleux
100f56d873 Merge "docs(threat-model): add a notes related to the Measured Boot" into integration 2023-04-25 08:58:50 +02:00
Bipin Ravi
760fbfc490 Merge "feat(gcs): support guarded control stack" into integration 2023-04-25 07:50:22 +02:00
Bipin Ravi
833cbe577e Merge "docs(maintainers): make Jimmy Brisson a code owner" into integration 2023-04-24 21:49:39 +02:00
Sandrine Bailleux
7c7e7b621a Merge changes from topic "mb/trusted-boot-update" into integration
* changes:
  refactor(auth)!: unify REGISTER_CRYPTO_LIB
  refactor(auth): replace plat_convert_pk
  docs(auth): add auth_decrypt in CM chapter
  feat(auth): compare platform and certificate ROTPK for authentication
  docs(auth): add 'calc_hash' function's details in CM
2023-04-24 15:46:26 +02:00
Sandrine Bailleux
47c8dcfde7 docs: deprecate CryptoCell-712/713 drivers
We plan to deprecate the CryptoCell-712 and CryptoCell-713 drivers in
TF-A release v2.9 and eventually remove the code from the tree in
release 3.0.

The only upstream platforms which use these drivers today are the Arm
Ltd developpment platforms, such as Juno.

Write this information down into the "Release Processes" document.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: Ib064292733a271ecbff0dde315911017e2c4da7e
2023-04-24 15:09:31 +02:00
Sandrine Bailleux
1dc77d43ef docs: split deprecated interfaces and drivers
Having a dedicated section for deprecated interfaces, and another one
for deprecated drivers, sounds cleaner.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: Iaf65e9f4dabff89b9e86c17062656edd8c344016
2023-04-24 13:45:53 +02:00
Sandrine Bailleux
47801a6985 docs: extend deprecation policy
Our process documentation already mentions that if a platform is no
longer maintained, it is best to deprecate it to keep the project's
source tree clean and healthy.

The same argument stands for drivers or library interfaces so extend
this policy to those.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: Ieb235d6a1fb089343e0e1e3e5f36067552f2f8f0
2023-04-24 13:45:44 +02:00
Sandrine Bailleux
8f55cde216 docs: add a note about downstream platforms
Clarify that downstream platforms generally do not affect code
deprecation / removal decisions.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: I44b979c4e67ee03537852769e96544e19137bda3
2023-04-24 13:45:06 +02:00
Chris Kay
26ad4a87e0 docs(juno): update SCP downloads link
Change-Id: Ibe2a1d2ec019333876a4f82b70fde0a10d667f7c
Signed-off-by: Chris Kay <chris.kay@arm.com>
2023-04-21 14:25:05 +02:00
Yann Gautier
4ac5b3949d refactor(auth): replace plat_convert_pk
Following discussions in the reviews of the patch that introduced
plat_convert_pk() function [1], it was decided to deprecate it to
avoid weak function declaration.
A new optional function pointer convert_pk is added to crypto_lib_desc_t.
A new function crypto_mod_convert_pk() will either call
crypto_lib_desc.convert_pk() if it is defined, or do the same
as what was done by the weak function otherwise.

[1] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/17174

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I9358867f8bfd5e96b5ee238c066877da368e43c6
2023-04-21 09:46:01 +01:00
Yann Gautier
0ca7b32623 docs(auth): add auth_decrypt in CM chapter
The call to REGISTER_CRYPTO_LIB requires auth_decrypt function to be
provided. Add its prototype and update REGISTER_CRYPTO_LIB call.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: Id1f2a54867ffe5dec36e0bf22490d01858891585
2023-04-21 09:46:01 +01:00