Commit graph

2810 commits

Author SHA1 Message Date
Mark Dykes
31826ba221 Merge "fix(cpus): workaround for Cortex-A720 erratum 2792132" into integration 2024-08-21 16:41:19 +02:00
Manish V Badarkhe
4b6e4e618e Merge changes from topic "mp/simd_ctxt_mgmt" into integration
* changes:
  feat(fvp): allow SIMD context to be put in TZC DRAM
  docs(simd): introduce CTX_INCLUDE_SVE_REGS build flag
  feat(fvp): add Cactus partition manifest for EL3 SPMC
  chore(simd): remove unused macros and utilities for FP
  feat(el3-spmc): support simd context management upon world switch
  feat(trusty): switch to simd_ctx_save/restore apis
  feat(pncd): switch to simd_ctx_save/restore apis
  feat(spm-mm): switch to simd_ctx_save/restore APIs
  feat(simd): add rules to rationalize simd ctxt mgmt
  feat(simd): introduce simd context helper APIs
  feat(simd): add routines to save, restore sve state
  feat(simd): add sve state to simd ctxt struct
  feat(simd): add data struct for simd ctxt management
2024-08-20 22:30:06 +02:00
Arvind Ram Prakash
b1bde25ed9 fix(cpus): workaround for Cortex-A720 erratum 2792132
Cortex-A720 erratum 2792132 is a Cat B erratum that is present
in revision r0p0, r0p1 and is fixed in r0p2.

The workaround is to set bit[26] of the CPUACTLR2_EL1 to 1.

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

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I8d11fe65a2ab5f79244cc3395d0645f77256304c
2024-08-19 15:19:08 -05:00
Madhukar Pappireddy
50fba2db86 docs(simd): introduce CTX_INCLUDE_SVE_REGS build flag
This patch documents the support for the newly introduced
CTX_INCLUDE_SVE_REGS build flag. Since this build flag is influenced
by other build flags, the relevant sections have been updated with
proper guidance.

This patch also documents the SEPARATE_SIMD_SECTION build flag.

Change-Id: I07852c4a65239c6a9c6de18a95c61aac429bec1c
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2024-08-19 11:12:06 -05:00
Manish V Badarkhe
553b70c3ef Merge changes from topic "ar/asymmetricSupport" into integration
* changes:
  feat(tc): enable trbe errata flags for Cortex-A520 and X4
  feat(cm): asymmetric feature support for trbe
  refactor(errata-abi): move EXTRACT_PARTNUM to arch.h
  feat(cpus): workaround for Cortex-A520(2938996) and Cortex-X4(2726228)
  feat(tc): make SPE feature asymmetric
  feat(cm): handle asymmetry for SPE feature
  feat(cm): support for asymmetric feature among cores
  feat(cpufeat): add new feature state for asymmetric features
2024-08-19 11:56:49 +02:00
Arvind Ram Prakash
4a97ff5111 feat(cpus): workaround for Cortex-A520(2938996) and Cortex-X4(2726228)
This patch implements errata functions for two errata, both of them
disable TRBE as a workaround. This patch doesn't have functions
that disable TRBE but only implemented helper functions that are
used to detect cores affected by Errata 2938996(Cortex-A520) & 2726228(Cortex-X4)

Cortex-X4 SDEN documentation:
    https://developer.arm.com/documentation/SDEN2432808/latest

Cortex-A520 SDEN Documentation:
    https://developer.arm.com/documentation/SDEN-2444153/latest

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I8f886a1c21698f546a0996c719cc27dc0a23633a
2024-08-17 09:37:55 +01:00
Manish Pandey
43d1d951dd feat(cpufeat): add new feature state for asymmetric features
Introduce a new feature state CHECK_ASYMMETRIC to cater for the features
which are asymmetric across cores. This state is useful for platforms
which has architectural asymmetric cores (A feature is only present in
one type of core e.g. big).
This state is similar to FEAT_STATE_CHECK (dynamic detection) except
that feature state is also checked on each core during warmboot path and
override the context (just for asymmetric features) which was setup by
core executing CPU_ON call.

Only Non-secure context will be re-checked as secure and realm context
is created on same core.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ic78a0b6ca996e0d7881c43da1a6a0c422f528ef3
2024-08-17 09:35:13 +01:00
Manish V Badarkhe
2d4f264ba5 Merge changes from topic "romlib-fixes" into integration
* changes:
  fix(romlib): wrap indirectly included functions
  fix(arm): remove duplicate jumptable entry
2024-08-17 10:09:06 +02:00
Mark Dykes
abeb8ad6c1 Merge "fix(cpus): workaround for Cortex-A720 erratum 2844092" into integration 2024-08-17 00:18:54 +02:00
Mark Dykes
28e4ec1b39 Merge "fix(cpus): workaround for Cortex-X4 erratum 2816013" into integration 2024-08-17 00:18:02 +02:00
Manish Pandey
a0c7bee6e6 Merge "docs(maintainers): update Corstone-1000 maintainers" into integration 2024-08-16 18:01:58 +02:00
Manish Pandey
4c720e1246 Merge "feat(docs): add RMM option in build-options.rst" into integration 2024-08-16 18:00:06 +02:00
Jimmy Brisson
d95d56bd2b fix(romlib): wrap indirectly included functions
The problem that this resolves is a bit involved; the following
must be met at the same time for some function <to_be_wrapped>:

 * to_be_wrapped must be specified as part of the romlib
 * to_be_wrapped must _not_ be referenced by any translation unit
   in TF-A
 * to_be_wrapped must be referenced by a translation unit in a
   dependent library, mbedtls for example.

Under these circumstances, to_be_wrapped will not be wrapped, and
will instead reference its original definition while simultaneously
residing in romlib.

This is a side effect of two issues with romlib prior to this patch:

 1 to_be_wrapped is expected to wrap by duplicating its definition.
    This causes any condition that links against both the base and
    wrapper functions to be a link error (duplicate symbol definition).
 2 to_be_wrapped is in its own translation unit
    This causes the wrappers to be used by TF-A in an as needed.

The duplicate function definitions can be worked around using the
linker's `--wrap` flag, which redirects all references to a symbol
to resolve to `__wrap_<symbol>` and the original symbol to be
available as `__real_<symbol>`. Most of the changes handle creating
this arguments and passing them to the linker.

Further, once you use the linker's wrap, you will encounter another
issue: if TF-A does not use a function, its wrapper is not present.
This causes link issues when a library and not TF-A uses the wrapper.
Note that this issue would have been resolved previously by ignoring
the wrapper and using the base definition.

This further issue is worked around by concatenating the assembly for
all of the wrappers into a single translation unit. It's possible to
work around this issue in a few other ways, including reordering the
libraries passed to the linker to place libwrapper.a last or grouping
the libraries so that symbols from later libraries may be resolved
with prior libraries.

I chose the translation unit concatenation approach as it revealed
that a jumptable has duplicate symbols within it.

Change-Id: Ie57b5ae69bde2fc8705bdc7a93fae3ddb5341ed9
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
2024-08-15 10:49:07 -05:00
Hugues Kamba-Mpiana
deb7210d16 docs(maintainers): update Corstone-1000 maintainers
* Add new maintainers: Hugues Kamba Mpiana
* Remove maintainers: Xueliang Zhong
* Update contact information for existing maintainers

Change-Id: Ie4b7e7a1a179e3bf6f8d8e6c8e7ff0ad788e9f8f
Signed-off-by: Hugues Kamba-Mpiana <hugues.kambampiana@arm.com>
2024-08-15 08:45:44 +01:00
Manish V Badarkhe
26f2f24c69 Merge changes from topic "cot-dt2c" into integration
* changes:
  feat(arm): update documentation for cot-dt2c
  feat(arm): remove the bl2 static c file
  feat(arm): generate tbbr c file CoT dt2c
  feat(arm): makefile invoke CoT dt2c
  feat(auth): standalone CoT dt2c tool
  refactor(auth): separate bl1 and bl2 CoT
  refactor(st): align the NV counter naming
  refactor(fvp): align the NV counter naming
2024-08-14 18:52:20 +02:00
Madhukar Pappireddy
2c1a116fd5 Merge changes from topic "mp/ffa_bindings_update" into integration
* changes:
  docs: add binding for vm availability messages
  docs: fix discrepancies in value type of manifest fields
  docs: update ff-a manifest bindings
  chore(docs): remove hafnium specific documentation
2024-08-13 22:01:37 +02:00
XiaoDong Huang
e3ec6ff4b2 feat(rk3588): support rk3588
rk3588 is an Octa-core soc with Cortex-a55/a76 inside.
This patch supports the following functions:
1. basic platform setup
2. power up/off cpus
3. suspend/resume cpus
4. suspend/resume system
5. reset system
6. power off system

Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: I598109f15a2efd5b33aedd176cf708c08cb1dcf4
2024-08-13 14:26:04 +08:00
Balint Dobszay
a22f84f059 docs: add binding for vm availability messages
SPs can subscribe to get notified when a VM is created or destroyed.
This patch adds a binding to the SP manifest to represent this.

Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
Change-Id: Ib23655575f471a22bcf261f70f2c4124a3f292c3
2024-08-12 13:19:57 +02:00
Joanna Farley
2e1db2b4c7 Merge "feat(versal): deprecate build time arg VERSAL_PLATFORM" into integration 2024-08-12 11:49:37 +02:00
Joanna Farley
778e2452b1 Merge changes from topic "xlnx_tfa_passthrough_plm_ipi_cmd" into integration
* changes:
  docs(xilinx): update SMC documentation in TF-A
  feat(xilinx): add feature check function for TF-A specific APIs
  feat(xilinx): update SiP SVC version number
  feat(xilinx): update TF-A to passthrough all PLM commands
  fix(xilinx): fix logic to read ipi response
2024-08-12 11:48:46 +02:00
Madhukar Pappireddy
9a01089df5 docs: fix discrepancies in value type of manifest fields
In order to avoid the complexity of supporting value types smaller
than u32 and avoid discrepancies for the various manifest fields
among different projects, the value type for relevant fields are
upgraded to u32.

Change-Id: Ib033019b3b8c26bf4b8b50f89b7a6d1a772e5e51
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2024-08-08 13:19:47 -05:00
Madhukar Pappireddy
3b63eef981 docs: update ff-a manifest bindings
Various SPMC projects within trustefirmware.org have decided to adhere
to a common FF-A manifest binding document. The one hosted in the
readthedocs portal of TF-A project will be considered as the reference.

Hence, this binding document is updated to reflect new additions made
to binding document hosted in Hafnium project. Eventually, all other
binding document are going to be removed.

Also, few fields were incorrectly identified as mandatory. Necessary
corrections are made in this patch.

Change-Id: I2eadd77487c770e49605285bbd72027c5e72e385
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2024-08-08 13:19:47 -05:00
Madhukar Pappireddy
65e573fc7a chore(docs): remove hafnium specific documentation
All the relevant documentation for Hafnium as the chosen Secure
Partition Manager has been moved to hafnium project[1].

This patch removes the redundant sections without any loss of
information.

This patch adds links to documentation of each of the SPM projects.

[1] https://hafnium.readthedocs.io/en/latest/secure-partition-manager/index.html

Change-Id: I52caf7dc50f4aa253c68309cac0915b7d368939d
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2024-08-08 13:12:06 -05:00
Xialin Liu
b95f398ebd feat(arm): update documentation for cot-dt2c
Add documentation for the cot-dt2c feature

Change-Id: I27383882b639e39217d09ca76e316098cc4753d0
Signed-off-by: Xialin Liu <Xialin.Liu@ARM.com>
2024-08-07 08:46:30 +01:00
Jaylyn Ren
1b7f51ea16 feat(docs): add RMM option in build-options.rst
Add the RMM option description in the build-options document.

Signed-off-by: Jaylyn Ren <Jaylyn.Ren2@arm.com>
Change-Id: Idb884e2707a2bdc686f676d16f0ff2f0e001a17d
2024-08-02 16:16:43 +01:00
Charlie Bareham
4dcbba98ce feat: add option to input attr as string of flag names
Change-Id: I56f0364ef43c9d415a335474e15b68e79db37f5d
Signed-off-by: Charlie Bareham <charlie.bareham@arm.com>
2024-08-02 12:14:53 +00:00
Charlie Bareham
792e8e896f feat: add option to input text instead of tag id number
Change-Id: I6d1b1a20d1cd5b073d7d614da102b9e6bd8ea522
Signed-off-by: Charlie Bareham <charlie.bareham@arm.com>
2024-08-02 12:14:53 +00:00
Charlie Bareham
311209934e feat: add creating transfer lists from yaml files
This commit adds a command create-from-yaml to tlc, which
creates a transfer list from a yaml file. It also changes
the files structure of the fixtures in the unit tests so
they are in a directory called trusted-firmware-a. This
is necessary because blob file paths in the yaml file are
relative to the root of TF-A.

The blob files are not verified by TLC, so it can be used
to load arbitrary binary information into the transfer
list. The authenticity of the transfer list must be
ensured by the loader.

Change-Id: Idf704ce5d9b7e28b31f471ac337e4aef33d0ad8a
Signed-off-by: Charlie Bareham <charlie.bareham@arm.com>
2024-08-02 12:14:53 +00:00
Sona Mathew
12140908a5 fix(cpus): workaround for Cortex-A720 erratum 2844092
Cortex-A720 erratum 2844092 is a Cat B erratum that is present
in revisions r0p0, r0p1 and is fixed in r0p2.

The workaround is to set bit[11] of CPUACTLR4_EL1 register.

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

Change-Id: I3d8eacb26cba42774f1f31c3aae2a0e6fecec614
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-08-01 13:40:32 -05:00
Sona Mathew
1e4480bb54 fix(cpus): workaround for Cortex-X4 erratum 2816013
Cortex-X4 erratum 2816013 is a Cat B erratum that applies
to all revisions <= r0p1 and is fixed in r0p2. This erratum
is only present when memory tagging is enabled.

The workaround is to set CPUACTLR5_EL1[14] to 1.

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

Change-Id: I546044bde6e5eedd0abf61643d25e2dd2036df5c
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-08-01 13:40:32 -05:00
Jay Buddhabhatti
e1890297df docs(xilinx): update SMC documentation in TF-A
Updated documentation for new SMC SiP calling conventions for Platform
Management specific SiP Service calls.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: Iee09d3d843c6bb3f82aad6df703542ba1eb63c6c
2024-07-31 02:44:43 -07:00
Harrison Mutai
6ac31f3e76 feat(tlc): add host tool for static TL generation
Transfer List Compiler is a command line tool that enables the static
generation of TL's compliant with version 0.9 of the firmware handoff
specification. The intent of this tool is to support information passing
via the firmware handoff framework to bootloaders that run without
preceding images (i.e. `RESET_TO_BL31`).

It currently allows for TL's to be statically generated from blobs of
data, and modified by removing/adding TE's. Future work will provide
support for TL generation from configuration file.

Change-Id: Iff670842e34c9ad18eac935248ee2aece43dc533
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Co-authored-by: Charlie Bareham <charlie.bareham@arm.com>
2024-07-30 10:25:57 +00:00
Manish V Badarkhe
93b7b752e9 Merge "build(amu): restrict counters (RAZ)" into integration 2024-07-29 18:55:03 +02:00
Maheedhar Bollapalli
09ac1ca27c feat(versal): deprecate build time arg VERSAL_PLATFORM
Update Versal platform to enable runtime detection of variants instead
of relying on the build argument VERSAL_PLATFORM.
Integrate functionality for identifying the board variant during
runtime, allowing dynamic adjustment of CPU and UART clock values
accordingly.
Print the runtime board information during boot.
This advancement streamlines the build process by eliminating
dependencies on variant-specific builds, enabling the use of a single
binary for multiple variants.
Removing all the platform related constants for versal_virt,SPP,EMU as
they are not used.

Change-Id: I8c1a1d391bd1a8971addc1f56f8309a3fb75aa6d
Signed-off-by: Amey Avinash Raghatate <AmeyAvinash.Raghatate@amd.com>
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
2024-07-26 12:20:50 +05:30
Manish Pandey
e7c060d559 Merge "feat(fgt2): add support for FEAT_FGT2" into integration 2024-07-24 17:26:21 +02:00
Manish Pandey
c5b8de86c8 Merge "feat(debugv8p9): add support for FEAT_Debugv8p9" into integration 2024-07-22 18:07:11 +02:00
Arvind Ram Prakash
33e6aaacf1 feat(fgt2): add support for FEAT_FGT2
This patch disables trapping to EL3 when the FEAT_FGT2
specific trap registers are accessed by setting the
SCR_EL3.FGTEn2 bit

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I6d2b614affb9067b2bc3d7bf0ae7d169d031592a
2024-07-18 13:49:43 -05:00
Arvind Ram Prakash
83271d5a5a feat(debugv8p9): add support for FEAT_Debugv8p9
This patch enables FEAT_Debugv8p9 and prevents EL1/0 from
trapping to EL3 when accessing MDSELR_EL1 register by
setting the MDCR_EL3.EBWE bit.

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I3613af1dd8cb8c0d3c33dc959f170846c0b9695a
2024-07-18 13:49:43 -05:00
Yidi Lin
65ada75717 fix(docs): fix CPU type for mt8195
MT8195 features four Cortex-A78 cores not Cortex-A76.

Change-Id: I62c60373e7a3e570bcadaeaf065ca0f7473cb838
Signed-off-by: Yidi Lin <yidilin@chromium.org>
2024-07-17 11:47:39 +08:00
Manish V Badarkhe
0dc0fda716 Merge changes from topic "stm32mp2_doc_update" into integration
* changes:
  feat(docs): add STM32MP2 docs links
  docs(stm32mp2): correct STM32MP2 frequencies
2024-07-03 15:36:54 +02:00
Manish Pandey
8d6fc86c35 Merge "refactor(docs): update RSE docs to match the example CCA token" into integration 2024-07-03 14:43:27 +02:00
Yann Gautier
21b6260ec8 feat(docs): add STM32MP2 docs links
Add links to official STMicroelectronics documentation (STM32MP2
series presentation and wiki).

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I2fca0da56bc6064c222df34493921dff3e119a22
2024-07-03 13:48:20 +02:00
Nicolas Le Bayon
7b7d23cd77 docs(stm32mp2): correct STM32MP2 frequencies
STM32MP25xA & STM32MP25xC versions run at 1.2GHz.

Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Change-Id: I75aea682c8e3fa89e7ac1347bb7f9d02f2086222
2024-07-03 13:48:20 +02:00
Madhukar Pappireddy
c4d9fbec5e Merge changes from topic "add_s32cc_clk_skeleton" into integration
* changes:
  feat(s32g274a): use s32cc clock driver
  feat(nxp-drivers): add clock skeleton for s32cc
2024-07-01 15:29:52 +02:00
Ghennadi Procopciuc
3a580e9e47 feat(nxp-drivers): add clock skeleton for s32cc
The S32CC is an umbrella for S32G2, S32G3 and S32R45 SoCs; therefore,
this clock driver will be used for all of these families.

Change-Id: Iede5371b212b67cf494a033c62fbfdcbe9b1a879
Signed-off-by: Ghennadi Procopciuc <ghennadi.procopciuc@nxp.com>
2024-06-28 08:33:39 +03:00
Govindraj Raja
e28ea93064 docs(fvp): update FVP versions used
Patch series:
https://review.trustedfirmware.org/q/hashtag:%22fvp_migration_11_26%22+(status:open%20OR%20status:merged)

Migrated FVP's to use version 11.26.11 and 11.24.24, also removed
some model testing that are now no more available with newer model
configuration.

Change-Id: Ib93a7148270e2b6fb356a631dcc36061c7c8341c
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-06-27 09:33:03 -05:00
Joanna Farley
6f05b8d45e Merge "feat(versal2): add support for AMD Versal Gen 2 platform" into integration 2024-06-18 12:27:27 +02:00
Manish V Badarkhe
08fc380ab3 Merge changes from topic "st-nand-backup-fwu" into integration
* changes:
  refactor(st): rename plat_set_image_source
  feat(st): add FWU with boot from NAND
  feat(st): manage backup partitions for NAND devices
  feat(bl): add plat handler for image loading
  refactor(bl)!: remove unused plat_try_next_boot_source
2024-06-17 20:05:05 +02:00
Thomas Fossati
6dfeb60a37 refactor(docs): update RSE docs to match the example CCA token
The RSE documentation includes binary and JSON dumps of the CCA platform
token.  This change updates those to match the example CCA platform
token from [1], which is also the one returned by the TC and QEMU
platforms.

[1] https://review.trustedfirmware.org/c/TF-M/tf-m-tools/+/28493

Change-Id: I21048e7f995eb24212cf62fb2128b576bc11ecff
Signed-off-by: Thomas Fossati <thomas.fossati@linaro.org>
2024-06-17 16:29:04 +02:00
Chris Kay
7c4e1eea61 build: unify verbosity handling
This change introduces a few helper variables for dealing with verbose
and silent build modes: `silent`, `verbose`, `q` and `s`.

The `silent` and `verbose` variables are boolean values determining
whether the build system has been configured to run silently or
verbosely respectively (i.e. with `--silent` or `V=1`).

These two modes cannot be used together - if `silent` is truthy then
`verbose` is always falsy. As such:

    make --silent V=1

... results in a silent build.

In addition to these boolean variables, we also introduce two new
variables - `s` and `q` - for use in rule recipes to conditionally
suppress the output of commands.

When building silently, `s` expands to a value which disables the
command that follows, and `q` expands to a value which supppresses
echoing of the command:

    $(s)echo 'This command is neither echoed nor executed'
    $(q)echo 'This command is executed but not echoed'

When building verbosely, `s` expands to a value which disables the
command that follows, and `q` expands to nothing:

    $(s)echo 'This command is neither echoed nor executed'
    $(q)echo 'This command is executed and echoed'

In all other cases, both `s` and `q` expand to a value which suppresses
echoing of the command that follows:

    $(s)echo 'This command is executed but not echoed'
    $(q)echo 'This command is executed but not echoed'

The `s` variable is predominantly useful for `echo` commands, where you
always want to suppress echoing of the command itself, whilst `q` is
more useful for all other commands.

Change-Id: I8d8ff6ed714d3cb401946c52955887ed7dca602b
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-06-14 15:54:48 +00:00