Commit graph

14407 commits

Author SHA1 Message Date
Chris Kay
a6b3643c2a fix(cm): hide cm_init_context_by_index from BL1
BL1 requires the context management library but does not use or
implement `cm_init_context_by_index`. This change ensures that is not
compiled into BL1, as linking with LTO enabled causes an undefined
reference for this function.

Change-Id: I4a4602843bd75bc4f47b3e0c4c5a6efce1514ef6
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-04-11 11:20:32 +00:00
Chris Kay
e40b563e87 fix(bl1): add missing spinlock dependency
The spinlock functions from `spinlock.S` are used by `errata_report.c`,
which is pulled into BL1. In a normal build it appears that this
function call undergoes dead code elimination so the link error is not
reported, but when compiled with LTO enabled the linker reports an
undefined reference.

Change-Id: Id22ffa8c0c8d3ca4b4cd46f0f4aefa53907c8de5
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-04-11 11:20:04 +00:00
Mark Dykes
a6cb061b62 Merge "fix(cc): code coverage optimization fix" into integration 2024-04-10 20:15:00 +02:00
Mark Dykes
bbe901f3bd Merge "feat(build): redirect stdin to nul during toolchain detection" into integration 2024-04-10 16:46:21 +02:00
Ahmad Fatoum
b9014f858d feat(build): redirect stdin to nul during toolchain detection
It's common for Makefiles to use variables like CC, AS or LD instead of
hardcoding the name of binaries. These can be defined by the user to
use a differnet toolchain or even as a crutch to enable cross-compilation.

In TF-A, this is not needed, as support for cross-compilation is baked
in via the CROSS_COMPILE option. TF-A still defined AS for its internal
use, but unlike most other projects, the default was setting it to the C
compiler. Overriding it wasn't possible from the environment though,
only as a make argument, so this didn't cause much issue.

With commit cc277de816 ("build: refactor toolchain detection"), AS can
now also be set from the environment. This breaks any scripts that
supply make with a cross environment that sets AS to an assembler.

Doing so was without effect before, but now leads to a quite ugly failure
mode: As TF-A now tries to detect the toolchain, it will call AS with the
option -v, which for GNU as(1) prints the version, but doesn't exit.

Thus, as(1) will continue waiting on stdin input and the build hangs
without much indication what's wrong.

Avoid this failure mode by ensuring any tool that attempts to read stdin
during toolchain detection will immediately get EOF and exit, leading to
an error message later on instead of the build hang.

Change-Id: I79a84961f5a69250292caa7f9e879a65be4bd9f2
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
2024-04-09 12:17:02 +02:00
Mark Dykes
4b50d7582f Merge "fix(cm): add more system registers to EL1 context mgmt" into integration 2024-04-08 23:14:03 +02:00
Mark Dykes
152ad112d7
fix(cc): code coverage optimization fix
Resolve issue where optimization is enabled for TF-A using
-Og and compile fail is seen in PSCI module.

Change-Id: Id9afb5c56a6937e7040b20cd01080c190c8276d5
Signed-off-by: Mark Dykes <mark.dykes@arm.com>
2024-04-08 13:38:01 -05:00
Olivier Deprez
04e9c66a36 Merge "docs: update release and code freeze dates" into integration 2024-04-08 14:22:20 +02:00
Olivier Deprez
19b73173b0 Merge "docs: remove entries of the deleted platforms" into integration 2024-04-08 14:20:14 +02:00
Bipin Ravi
c97831eb09 Merge "build: use GCC to link by default" into integration 2024-04-05 22:21:15 +02:00
Madhukar Pappireddy
3474340bd5 Merge "fix(spmd): skip NS EL1 context save & restore operations" into integration 2024-04-05 21:07:11 +02:00
Madhukar Pappireddy
2d960a1160 fix(spmd): skip NS EL1 context save & restore operations
NS EL1 context save and restore is taken by SPMC upon entering and
exiting S-EL2

BREAKING CHANGE: Corresponding support is needed in Hafnium SPMC

Change-Id: I8524f1229b3e13c2df4e4b5be3f12436289c30c7
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2024-04-05 13:13:33 -05:00
Harrison Mutai
7c9720f2ef docs: update release and code freeze dates
Change-Id: I850f26a66f017d5290ca4d3d670a7efed527f1ef
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2024-04-04 15:29:53 +00:00
Alexei Fedorov
2cbc8952a5 Merge "fix(rmmd): fix bug, raised by coverity, when zeroing manifest struct" into integration 2024-04-04 14:50:55 +02:00
Harry Moulton
83a4e8e0c6 fix(rmmd): fix bug, raised by coverity, when zeroing manifest struct
An "Incorrect expression (SIZEOF_MISMATCH)" bug was raised by coverity
on the memset for clearing the manifest structure. This patch resolves
that issue.

Signed-off-by: Harry Moulton <harry.moulton@arm.com>
Change-Id: I40431b972fc434d2b33f597813f22126d5d4cb70
2024-04-04 09:46:58 +01:00
Bipin Ravi
f7c091eaad Merge "refactor(arm): remove unused SP_MIN UART macros" into integration 2024-04-03 18:16:00 +02:00
Madhukar Pappireddy
ed9bb824e4 fix(cm): add more system registers to EL1 context mgmt
The following system registers are made part of save and restore
operations for EL1 context:
  MDCCINT_EL1
  MDSCR_EL1
  DISR_EL1
  PIRE0_EL1
  PIR_EL1
  POR_EL1
  S2POR_EL1
  TCR2_EL1

Some of these registers are available as part of core Armv8-A
architecture while others are made available through various
architectural extensions.

Change-Id: I507dccb9053ba177e1b98100fceccd1f32bdfc5c
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2024-04-03 11:08:35 -05:00
Manish Pandey
a77459dca9 Merge "feat(handoff): add additional TE tags" into integration 2024-04-03 11:02:20 +02:00
Bipin Ravi
fd265ece07 Merge "fix(cm): save guarded control stack registers" into integration 2024-04-02 21:36:25 +02:00
Soby Mathew
0f4811b48f Merge changes I3a4f9a4f,Iedc4e640 into integration
* changes:
  docs(rmm): document console struct in rmm boot manifest
  feat(rme): pass console info via RMM-EL3 ifc
2024-04-02 19:17:24 +02:00
Harrison Mutai
a312bfb344 feat(handoff): add additional TE tags
`TL_TAG_EXEC_EP_INFO64` type entries represent the `entry_point_info_t`
data structure. This structure provides the consumer with the execution
environment of an image. This is needed primarily in BL31 to execute
subsequent images i.e. BL32, BL33, or NT FW.

`TL_TAG_DT_SPMC_MANIFEST` holds the SPMC (Secure Partition Manager Core)
manifest image which is in DT format.

Change-Id: I80c4a72d639851457bc3c9b158b2e56041e8b29a
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2024-04-02 16:50:36 +00:00
Harry Moulton
88f7c87b8a docs(rmm): document console struct in rmm boot manifest
This change adds documentation for the console_list and
console_info structures added to the RMM Boot Manifest v0.3.

Signed-off-by: Harry Moulton <harry.moulton@arm.com>
Change-Id: I3a4f9a4f1d34259bc69c0ab497cbfbc268d7a994
2024-04-02 16:52:32 +01:00
Soby Mathew
32904472cc feat(rme): pass console info via RMM-EL3 ifc
This patch modifies the boot manifest to add console information to
be passed from EL3 to RMM.

Boot manifest version is bumped to v0.3

Signed-off-by: Harry Moulton <harry.moulton@arm.com>
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: Iedc4e640fb7a4450ce5ce966ae76936d1b7b742d
2024-04-02 16:16:57 +01:00
Leo Yan
67ff4f5646 refactor(arm): remove unused SP_MIN UART macros
Currently, tf-a has been refactored to support the multi UARTs (boot and
runtime UARTs). As a result, the SP_MIN UART related code has been
removed, and the macros are no longer used.

Therefore, this patch removes these unused UART macros.

Change-Id: I496349f876ba918fcafa7ed6c65d149914762290
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-04-02 13:36:31 +01:00
Manish Pandey
42d4111dcf Merge "fix(spmd): register group0 handler only if supported" into integration 2024-04-02 12:51:57 +02:00
Manish Pandey
d8629c8b9c Merge "fix(build): don't rely on that gcc-ar is in the same directory as gcc" into integration 2024-04-02 12:39:41 +02:00
Chris Kay
2f1c5e7eb1 build: use GCC to link by default
When configuring GNU GCC as the C compiler, we usually use the GNU BFD
linker directly to link by default. However, this complicates things
because we also need to support LTO, which can only be done when linking
is done via the C compiler, and we cannot change the linker later on if
some other part of the build system wants to enable LTO.

This change migrates the default choice of linker to GCC if the C
compiler is GCC, in order to enable this use-case. This should have no
impact on anything outside of the build system, as by default GCC merely
acts as a wrapper around BFD.

Change-Id: I40771be2b0571def67bbfde9e877e7629ec8cdaa
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-04-02 09:52:17 +00:00
Madhukar Pappireddy
6aae3acfd0 fix(cm): save guarded control stack registers
This patch fixes a typo which led to incorrect context save
operations for two FEAT_GCS registers.

Change-Id: I3d3202a6721714bbc8f84c2d775d1b28afffa5df
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2024-04-01 16:13:59 -05:00
Madhukar Pappireddy
753da8ce45 Merge "fix(nuvoton): prevent changing clock frequency" into integration 2024-04-01 16:07:01 +02:00
Madhukar Pappireddy
fbd5a2c3c2 Merge "feat(imx8mq): detect console base address during runtime" into integration 2024-04-01 15:59:48 +02:00
Joanna Farley
118d44315e Merge "feat(xilinx): send SGI to mailbox driver" into integration 2024-04-01 15:44:47 +02:00
Leonard Göhrs
52ee817304 feat(imx8mq): detect console base address during runtime
On the i.MX8M SoCs, TF-A doesn't itself initialize the UART, but depends
on BL2 to set it up beforehand. To allow using the same TF-A binary on
boards with different UART assignment, TF-A On i.MX8M M/N/P supports
dynamically determining the UART in use. The code is also applicable to
the i.MX8MQ, so enable it there too.

Change-Id: I9ba70f7068e762da979bd103390fa006c3a5d480
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
2024-04-01 15:08:20 +02:00
Yann Gautier
79da348916 Merge "feat(rcar3): change CAM setting to improve bus latency of R-Car Gen3" into integration 2024-03-29 09:14:53 +01:00
Madhukar Pappireddy
fca5f0ebe5 fix(spmd): register group0 handler only if supported
For platforms that do not support EL3 interrupts, such as ones with
GICV2 controller, do not register handler for Group0 interrupt.

Change-Id: I34536c0db9806c7b4c12dd398c0e5c12119c7457
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2024-03-28 14:32:18 -05:00
Tanmay Shah
9a7f892e29 feat(xilinx): send SGI to mailbox driver
Generate SGI to mailbox driver if IPI FIQ occurs due to agents
other than PMC.

Change-Id: Ieefb9f0db4009fe0179b18d30da153ce3f9e134c
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
2024-03-27 15:53:07 +01:00
Madhukar Pappireddy
eee0ec48b5 Merge changes from topic "mte_fixes" into integration
* changes:
  build(changelog): move mte to mte2
  refactor(mte): remove mte, mte_perm
2024-03-26 23:01:05 +01:00
Govindraj Raja
1e02ce6832 build(changelog): move mte to mte2
With commit:
https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/27122?tab=comments

FEAT_MTE is removed and we have only FEAT_MTE2, so update change log
to reflect the same.

Change-Id: I9f3bd7053f9c1fa355168968f412374e1c4937d4
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-03-26 14:31:14 -05:00
Govindraj Raja
c282384dbb refactor(mte): remove mte, mte_perm
Currently both FEAT_MTE and FEAT_MTE_PERM aren't used for enabling
of any feature bits in EL3. So remove both FEAT handling.

All mte regs that are currently context saved/restored are needed
only when FEAT_MTE2 is enabled, so move to usage of FEAT_MTE2 and
remove FEAT_MTE usage.

BREAKING CHANGE: Any platform or downstream code trying to use
SCR_EL3.ATA bit(26) will see failures as this is now moved to be
used only with FEAT_MTE2 with
commit@ef0d0e5478a3f19cbe70a378b9b184036db38fe2

Change-Id: Id01e154156571f7792135639e17dc5c8d0e17cf8
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-03-26 14:30:58 -05:00
Lauren Wehrmeister
ff8e68c071 Merge "chore: rename Poseidon to Neoverse V3" into integration 2024-03-26 19:12:56 +01:00
Sona Mathew
328d304d27 chore: rename Poseidon to Neoverse V3
Rename Neoverse Poseidon to Neoverse V3, make changes
to related build flags, macros, file names etc.

Change-Id: I9e40ba8f80b7390703d543787e6cd2ab6301e891
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-03-26 11:27:31 -05:00
Madhukar Pappireddy
5f4acf98dd Merge changes from topic "feature/imx8m-csu" into integration
* changes:
  style(imx8m): add parenthesis to CSU_HP_REG
  feat(imx8mp): restrict peripheral access to secure world
  feat(imx8mp): set and lock almost all peripherals as non-secure
  feat(imx8mm): restrict peripheral access to secure world
  feat(imx8mm): set and lock almost all peripherals as non-secure
  feat(imx8m): add defines for csu_sa access security
  feat(imx8m): add imx csu_sa enum type defines for imx8m
  fix(imx8m): fix CSU_SA_REG to work with all sa registers
2024-03-26 16:45:33 +01:00
Madhukar Pappireddy
abf7bb5042 Merge "feat(imx8ulp): give HIFI4 DSP access to more resources" into integration 2024-03-26 16:44:01 +01:00
rutigl@gmail.com
fe8cc55a0c fix(nuvoton): prevent changing clock frequency
prevent changing clock frequency already set in BootBlock based on PLL value

Change-Id: I8b4b53448cc8e703fd88ad6166f85a4fe3ba9e46
Signed-off-by: Margarita Glushkin <rutigl@gmail.com>
2024-03-26 16:44:07 +02:00
Laurentiu Mihalcea
351976bb06 feat(imx8ulp): give HIFI4 DSP access to more resources
This patch gives i.MX8ULP's HIFI4 DSP R/W access to the
following additional resources (peripherals):
	1) LPUART7
	2) IOMUXC1
	3) PCC4
	4) CGC1

Doing this allows the firmware running on the DSP to
set up serial communication, which also requires doing
pinctrl and clock management-related operations.

Access to the aforementioned resources is given by
configuring the XRDC module.

Change-Id: Ie3ca9f22bb625b2463870158875f503c3c1d6452
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
2024-03-26 15:51:26 +02:00
Bipin Ravi
e7419780f7 Merge "fix(cpus): workaround for Cortex-A715 erratum 2413290" into integration 2024-03-26 01:12:57 +01:00
Mark Dykes
3daf936b0e Merge "fix(cpus): workaround for Cortex-A720 erratum 2926083" into integration 2024-03-25 22:08:14 +01:00
Sona Mathew
bd2f7d3258 fix(cpus): workaround for Cortex-A715 erratum 2413290
Erratum 2413290 is a Cat B erratum that is present only
in revision r0p1 and is fixed in r1p1.

The initial implementation did not consider that this
fix is to be applied only when SPE (Statistical Profiling
Extension) is implemented and enabled. This patch applies
the fix by adding a check for ENABLE_SPE_FOR_NS.

Change-Id: I87b2175b89d6fb168c77e6ab233c90ca056791a1
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-03-24 22:45:31 -05:00
André Przywara
5318255f12 Merge changes Id72a0370,I2bafba38,I2bd48441,I164c579c,Iddf8aea0, ... into integration
* changes:
  feat(rpi): add Raspberry Pi 5 support
  fix(rpi): consider MT when calculating core index from MPIDR
  refactor(rpi): move register definitions out of rpi_hw.h
  refactor(rpi): add platform macro for the crash UART base address
  refactor(rpi): split out console registration logic
  refactor(rpi): move more platform-specific code into common
2024-03-22 23:12:28 +01:00
Bipin Ravi
152f4cfa16 fix(cpus): workaround for Cortex-A720 erratum 2926083
Cortex-A720 erratum 2926083 is a Cat B erratum that is present
in revisions r0p0, r0p1 and is fixed in r0p2. The errata is only
present when SPE (Statistical Profiling Extension) is implemented
and enabled.

The workaround is to set bits[58:57] of the CPUACTLR_EL1 to 'b11
when SPE is "implemented and enabled".

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

Change-Id: I30182c3893416af65b55fca9a913cb4512430434
Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-03-22 16:10:07 -05:00
Manish Pandey
869ee08638 Merge "fix(mte): use ATA bit with FEAT_MTE2" into integration 2024-03-22 18:24:29 +01:00