Commit graph

12599 commits

Author SHA1 Message Date
Juan Pablo Conde
b78ad00e58 docs(changelog): changelog for v2.9 release
Change-Id: Ic8cd82c5424af422feedefdc001d291001817a8b
Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
2023-05-19 13:49:08 -05:00
Manish Pandey
dcf430656c Merge "docs(psci): expound runtime instrumentation docs" into integration 2023-05-11 13:41:35 +02:00
Joanna Farley
3011e1afeb Merge changes from topic "ms/external_deps" into integration
* changes:
  feat(libc): add %c to printf/snprintf
  feat(compiler-rt): update source files
  chore(libfdt): update to v1.7.0 source files
2023-05-11 13:12:06 +02: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
Maksims Svecovs
44d9706e54 feat(libc): add %c to printf/snprintf
Adds %c support for printf and snprintf to print one character. Required
by most recent MbedTLS 3.4.0.

Change-Id: I4d9b2725127a929d58946353324f99ff22b3b28b
Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com>
2023-05-11 10:32:28 +01:00
Maksims Svecovs
658ce7ad8e feat(compiler-rt): update source files
Update the compiler-rt source files to the tip of the llvm-project [1]
[1]: https://github.com/llvm/llvm-project/commit/d9683a7

Change-Id: Icec9ec73094a2b39b0240fc8253c36e7485d3a98
Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com>
2023-05-11 10:32:14 +01:00
Maksims Svecovs
058e017e51 chore(libfdt): update to v1.7.0 source files
Update libfdt to source files from v1.7.0 release.
Upstream commit:
039a99414e

Change-Id: I7e0475d2ddb819691f476e1753d1c899f8d7c278
Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com>
2023-05-11 10:28:47 +01:00
Manish Pandey
3331c33d03 Merge "feat(optee): add device tree for coreboot table" into integration 2023-05-11 11:14:50 +02:00
Manish Pandey
9d44b2b981 Merge "fix(n1sdp): add platform-specific power domain functions" into integration 2023-05-11 11:09:09 +02:00
Manish Pandey
5bfdb73270 Merge "fix(morello): add platform-specific power domain functions" into integration 2023-05-11 11:08:52 +02:00
Jeffrey Kardatzke
f4bbf43555 feat(optee): add device tree for coreboot table
This adds creation of a device tree that will be passed to OP-TEE.
Currently that device tree only contains the coreboot table per the
Linux coreboot device tree specification. This device tree is then
passed to OP-TEE so it can extract the CBMEM console information from
the coreboot table for logging purposes.

Signed-off-by: Jeffrey Kardatzke <jkardatzke@google.com>
Change-Id: I6a26d335e16f7226018c56ad571cca77b81b0f6a
2023-05-11 10:46:57 +02:00
Manish Pandey
a63de43661 Merge "fix: increase BL32 limit" into integration 2023-05-11 10:46:36 +02:00
Manish V Badarkhe
c2a76122c8 fix: increase BL32 limit
BL32_LIMIT has been increased from 2MB to 4MB to accommodate
the latest tee.bin (it is around ~2.1MB).

Change-Id: I47b770bf23c23d38931a2b3316d076b829338d70
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Co-developed-by: Juan Pablo Conde <juanpablo.conde@arm.com>
2023-05-11 10:04:04 +02:00
Madhukar Pappireddy
e1eef33572 Merge "fix(spmd): fix build error with spmd" into integration 2023-05-11 00:44:49 +02:00
Govindraj Raja
fd51b21573 fix(spmd): fix build error with spmd
Currently when we build with 'SPD=spmd SPMD_SPM_AT_SEL2=0'
options, this causes a build failure as
'plat_spmd_handle_group0_interrupt' is called irrespective of
'SPMD_SPM_AT_SEL2' usage in 'spmd_group0_interrupt_handler_nwd'

So make 'plat_spmd_handle_group0_interrupt' dummy implementation
available just when spmd is enabled and SPMC_AT_EL3 is disabled.

Change-Id: Iaccd38faab81671c98f9165f318145187dca9bc2
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-05-10 15:57:29 -05:00
Manish Pandey
8700c6f784 Merge "fix(psci): do not panic on illegal MPIDR" into integration 2023-05-10 18:56:46 +02:00
Manish V Badarkhe
b967ca06bd Merge "build(fpga): reduce cpu_libs to tc and neoverse" into integration 2023-05-10 18:34:31 +02:00
Daniel Boulby
3c3ea90c99 build(fpga): reduce cpu_libs to tc and neoverse
Change-Id: I20e88d5e712dafa7364b7932b8b4aaa9051bea55
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2023-05-10 15:43:29 +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
c84200ecd9 Merge "fix(pmu): unconditionally save PMCR_EL0" into integration 2023-05-10 14:12:25 +02:00
Manish V Badarkhe
41914de338 Merge changes I5bb43cb0,I6aebe2ca,Ib59df16a,I9d037ab2,I9df5a465, ... into integration
* changes:
  fix(msm8916): add timeout for crash console TX flush
  style(msm8916): use size macros
  feat(msm8916): expose more timer frames
  fix(msm8916): drop unneeded initialization of CNTACR
  build(msm8916): disable unneeded workarounds
  fix(msm8916): flush dcache after writing msm8916_entry_point
  fix(msm8916): print \r before \n on UART console
2023-05-09 23:29:52 +02:00
Manish Pandey
4bd8c929b4 Merge changes I1bfa797e,I0ec7a70e into integration
* changes:
  fix(tree): correct some typos
  fix(rockchip): use semicolon instead of comma
2023-05-09 22:05:52 +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
Stephan Gerhold
7e002c8a13 fix(msm8916): add timeout for crash console TX flush
Resetting the UART DM controller while there are still remaining
characters in the FIFO often results in corruption on the UART receiver
side. To avoid this the msm8916 crash console implementation tries to
wait until the TX FIFO is empty.

Unfortunately this might spin forever if the transmitter was disabled
before it has fully finished transmitting. In this case the TXEMT bit
console_uartdm_core_flush is waiting for will never get set.

There seems to be no good way to detect if the transmitter is actually
enabled via the status registers. However, the TX FIFO is fairly small
and should not take too long to get flushed, so fix this by simply
limiting the amount of iterations with a short timeout.

Move the code to console_uartdm_core_init to ensure that this always
happens before resetting the transmitter (also during initialization).

Change-Id: I5bb43cb0b6c029bcd15e253d60d36c0b310e108b
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
2023-05-09 21:46:27 +02:00
Stephan Gerhold
a27e3f7698 style(msm8916): use size macros
Use the pre-defined size macros (SZ_*) for more clarity and to avoid
having to add comments to each size represented by hexadecimal numbers.

Change-Id: I6aebe2caf1365279670955b9b507dec7d7b04457
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
2023-05-09 21:46:18 +02:00
Stephan Gerhold
1781bf1c40 feat(msm8916): expose more timer frames
The memory-mapped generic timer on msm8916 has 7 timer frames, but
currently only one is exposed for usage in the non-secure world.

The platform port is currently only designed to be used as minimal PSCI
implementation, without secure world that could make use of the other
timer frames. Let's make all of them available to the normal world.

If needed this could still be changed later by reserving some timer
frames conditionally to a specific SPD being enabled in the build.

Change-Id: Ib59df16aa1fd3dbc875ab6369c133737830c98c6
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
2023-05-09 21:44:58 +02:00
Stephan Gerhold
d833af3ab5 fix(msm8916): drop unneeded initialization of CNTACR
Normal world software is responsible to initialize CNTACR as needed.
There is no existing software for msm8916 that depends on having this
initialization in BL31 so drop it before anything starts to rely on it.

Related issue: https://github.com/ARM-software/tf-issues/issues/170

Change-Id: I9d037ab218c0c1c8a5d5523722013eba531f4728
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
2023-05-09 21:44:51 +02:00
Stephan Gerhold
4a3e2cb355 build(msm8916): disable unneeded workarounds
The Cortex-A53 cores used in the msm8916 platform are not affected by
CVE-2017-5715 and CVE-2022-23960, so disable the workarounds for them
to drop the unused code from the compiled binary.

Change-Id: I9df5a4657c4fd90702b4db4e82d4ee1a2f60303c
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
2023-05-09 21:44:44 +02:00
Stephan Gerhold
01ba69cd9b fix(msm8916): flush dcache after writing msm8916_entry_point
msm8916_entry_point is read with caches off (and even from two
different physical addresses when read through the "boot remapper"),
so it should be flushed to RAM after writing it.

Change-Id: I5c8193954bb28043b0a46fb2038f629bd8796c74
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
2023-05-09 21:44:37 +02:00
Stephan Gerhold
3fb7e40a21 fix(msm8916): print \r before \n on UART console
UART drivers in TF-A are expected to print \r before \n. Some terminal
emulators expect \r\n as line endings by default so not doing this
causes broken line breaks.

Change-Id: I271a35a7c6907441bc71713b0b6a1da19da96878
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
2023-05-09 21:44:29 +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
Bipin Ravi
dc53b9b385 Merge "fix(qemu-sbsa): enable FGT" into integration 2023-05-09 19:04:34 +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
Elyes Haouas
1b491eead5 fix(tree): correct some typos
found using codespell (https://github.com/codespell-project/codespell).

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I1bfa797e3460adddeefa916bb68e22beddaf6373
2023-05-09 15:57:12 +01:00
Elyes Haouas
8557d491b6 fix(rockchip): use semicolon instead of comma
Use semicolon insted of comma at the end of line.

Change-Id: I0ec7a70ec659333c98d586f7bebd5d91bd6c6cc1
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2023-05-09 15:57:00 +01: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
236c0bf0c4 Merge "feat(mt8188): add MT8188 SPM debug logs" into integration 2023-05-09 16:00:50 +02:00
Andre Przywara
6503ff2910 refactor(cpufeat): enable FEAT_RAS for FEAT_STATE_CHECKED
At the moment we only support FEAT_RAS to be either unconditionally
compiled in, or to be not supported at all.

Add support for runtime detection (FEAT_RAS=2), by splitting
is_armv8_2_feat_ras_present() into an ID register reading function and
a second function to report the support status. That function considers
both build time settings and runtime information (if needed), and is
used before we access RAS related registers.

Also move the context saving code from assembly to C, and use the new
is_feat_ras_supported() function to guard its execution.

Change the FVP platform default to the now supported dynamic
option (=2), so the right decision can be made by the code at runtime.

Change-Id: I30498f72fd80b136850856244687400456a03d0e
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
2023-05-09 13:20:01 +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
Manish Pandey
3e2923199d Merge changes from topic "assert_boolean_set" into integration
* changes:
  build!: check boolean flags are not empty
  fix(build): add a default value for INVERTED_MEMMAP
  fix(a5ds): add default value for ARM_DISABLE_TRUSTED_WDOG
  fix(st-crypto): move flag control into source code
  fix(stm32mp1): always define PKA algos flags
  fix(stm32mp1): remove boolean check on PLAT_TBBR_IMG_DEF
2023-05-09 11:26:11 +02:00
Manish Pandey
fbce34912f Merge changes from topics "gr/gcc12", "jc/toolchain_update_2.9" into integration
* changes:
  docs(build): update GCC to 12.2.Rel1 version
  fix(build): allow lower address access with gcc-12
2023-05-09 11:04:23 +02: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
Govindraj Raja
dea23e245f fix(build): allow lower address access with gcc-12
With gcc-12 any lower address access can trigger a warning/error
this would be useful in other parts of system but in TF-A
there are various reasons to access to the lower address ranges,
example using mmio_read_*/writes_*

So setup to allow access to lower addresses while using gcc-12

Change-Id: Id1b4012b13bc6876d83b90a347fee12478a1921d
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-05-09 10:01:02 +01:00
Manish Pandey
865aff3066 Merge "feat(fvp): introduce PLATFORM_TEST_RAS_FFH config" into integration 2023-05-09 10:19:18 +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
Jason Chen
f85b34b112 feat(mt8188): add MT8188 SPM debug logs
Add debug logs for tracking the status of suspend and resume.

Change-Id: Id2d2ab06fadb3118ab66f816937e0dd6e43dbdc3
Signed-off-by: Jason Chen <Jason-ch.Chen@mediatek.com>
2023-05-08 10:49:11 +08: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
d3bed15851 feat(fvp): enable errata management interface
Errata ABI feature specific build flag, flag to enable
CPUs in the cpu list, flags to test non-arm interconnect based
errata flags when enabled from a platform level.
Added to the FVP platform makefile to test the errata abi feature
implementation.

The flags to enable CPUs in the cpu list will be removed once
synchronized with the errata framework.

Change-Id: I30877a22ac1348906a6ddfb26f9e8839912d3572
Signed-off-by: Sona Mathew <SonaRebecca.Mathew@arm.com>
2023-05-05 13:24:56 -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