Commit graph

15842 commits

Author SHA1 Message Date
Sona Mathew
902dc0e01f fix(cpus): workaround for CVE-2024-5660 for Cortex-A78_AE
Implements mitigation for CVE-2024-5660 that affects Cortex-A78_AE
revisions r0p0, r0p1, r0p2, r0p3.
The workaround is to disable the hardware page aggregation at
EL3 by setting CPUECTLR_EL1[46] = 1'b1.

Public Documentation:
https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660

Change-Id: I33ac653fcb45f687fe9ace1c76a3eb2000459751
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-12-17 10:28:09 -06:00
Sona Mathew
46a4cadb9d fix(cpus): workaround for CVE-2024-5660 for Cortex-A78C
Implements mitigation for CVE-2024-5660 that affects Cortex-A78C
revisions r0p0, r0p1, r0p2.
The workaround is to disable the hardware page aggregation at
EL3 by setting CPUECTLR_EL1[46] = 1'b1.

Public Documentation:
https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660

Change-Id: Ieb8d7b122320d16bf8987a43dc683ca41227beb5
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-12-17 10:28:09 -06:00
Sona Mathew
c818bf1d60 fix(cpus): workaround for CVE-2024-5660 for Cortex-A78
Implements mitigation for CVE-2024-5660 that affects Cortex-A78
revisions r0p0, r1p0, r1p1, r1p2.
The workaround is to disable the hardware page aggregation at
EL3 by setting CPUECTLR_EL1[46] = 1'b1.

Public Documentation:
https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660

Change-Id: I4e40388bef814481943b2459fe35dd7267c625a2
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-12-17 10:28:09 -06:00
Sona Mathew
26293a7463 fix(cpus): workaround for CVE-2024-5660 for Cortex-X1
Implements mitigation for CVE-2024-5660 that affects Cortex-X1
revisions r0p0, r1p0, r1p1, r1p2.
The workaround is to disable the hardware page aggregation at
EL3 by setting CPUECTLR_EL1[46] = 1'b1.

Public Documentation:
https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660

Change-Id: I3124db3980f2786412369a010ca6abbbbaa3b601
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-12-17 10:28:09 -06:00
Sona Mathew
26e0ff9d5e fix(cpus): workaround for CVE-2024-5660 for Neoverse-N2
Implements mitigation for CVE-2024-5660 that affects Neoverse-N2
revisions r0p0, r0p1, r0p2, r0p3.
The workaround is to disable the hardware page aggregation at
EL3 by setting CPUECTLR_EL1[46] = 1'b1.
This patch implements the erratum mitigation for Neoverse-N2.

Public Documentation:
https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660

Change-Id: I2b9dea78771cc159586a03ff563c0ec79591ea64
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-12-17 10:28:09 -06:00
Sona Mathew
0d7b503f8a fix(cpus): workaround for CVE-2024-5660 for Cortex-A710
Implements mitigation for CVE-2024-5660 that affects Cortex-A710
revisions r0p0, r1p0, r2p0, r2p1.
The workaround is to disable the hardware page aggregation at
EL3 by setting CPUECTLR_EL1[46] = 1'b1.

Public Documentation:
https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660

Change-Id: I10feea238600dcceaac7bb75a59db7913ca65cf1
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-12-17 10:28:09 -06:00
Sona Mathew
878464f02a fix(cpus): workaround for CVE-2024-5660 for Neoverse-V2
Implements mitigation for CVE-2024-5660 that affects Neoverse-V2
revisions r0p0, r0p1, r0p2.
The workaround is to disable the hardware page aggregation at
EL3 by setting CPUECTLR_EL1[46] = 1'b1.

Public Documentation:
https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660

Change-Id: If66687add52d16f68ce54fe5433dd3b3f067ee04
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-12-17 10:27:57 -06:00
Sona Mathew
b0d441bdad fix(cpus): workaround for CVE-2024-5660 for Cortex-X3
Implements mitigation for CVE-2024-5660 that affects Cortex-X3
revisions r0p0, r1p0, r1p1, r1p2.
The workaround is to disable the hardware page aggregation at
EL3 by setting CPUECTLR_EL1[46] = 1'b1.

Public Documentation:
https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660

Change-Id: Ibe90313948102ece3469f2cfe3faccc7f4beeabe
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-12-17 10:24:36 -06:00
Sona Mathew
ad3da01990 fix(cpus): workaround for CVE-2024-5660 for Neoverse-V3
Implements mitigation for CVE-2024-5660 that affects Neoverse-V3
revisions r0p0, r0p1.
The workaround is to disable the hardware page aggregation at
EL3 by setting CPUECTLR_EL1[46] = 1'b1.

Public Documentation:
https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660

Change-Id: I9ed2590bf1215bf6a692f01dfd351e469ff072f8
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-12-17 10:24:36 -06:00
Sona Mathew
af65cbb954 fix(cpus): workaround for CVE-2024-5660 for Cortex-X4
Implements mitigation for CVE-2024-5660 that affects Cortex-X4
revisions r0p0, r0p1, r0p2.
The workaround is to disable the hardware page aggregation at
EL3 by setting CPUECTLR_EL1[46] = 1'b1.

Public Documentation:
https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-5660

Change-Id: I378cb4978919cced03e7febc2ad431c572eac72d
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-12-17 10:24:33 -06:00
Manish Pandey
0863511b68 Merge "fix(psa): increase psa-mbedtls heap size for rsa" into integration 2024-12-17 14:12:10 +01:00
André Przywara
7b070314e3 Merge "fix(cm): fix context management SYSREG128 write macros" into integration 2024-12-17 11:39:12 +01:00
Yann Gautier
95977c2e4d Merge changes from topic "gerrit-master-v3" into integration
* changes:
  feat(qemu-sbsa): add support for RME on SBSA machine
  feat(qemu-sbsa): configure RMM manifest based on system RAM
  feat(qemu-sbsa): configure GPT based on system RAM
  feat(qemu-sbsa): adjust DT memory start address when supporting RME
  feat(qemu-sbsa): relocate DT after the RMM when RME is enabled
  feat(qemu-sbsa): dissociate QEMU NS start address and NS_DRAM0_BASE
  feat(qemu-sbsa): increase maximum FIP size
  refactor(qemu-sbsa): move all DT related functions to sbsa_platform.c
  refactor(qemu-sbsa): create accessor functions for platform info
  refactor(qemu-sbsa): rename function sip_svc_init() to something more meaningful
  refactor(qemu-sbsa): move DT related structures to their own header
  refactor(qemu-sbsa): rename struct dynamic_platform_info
  refactor(qemu): make L0GPT size configurable
  refactor(qemu): move GPT setup to BL31
  fix(qemu-sbsa): fix compilation error when accessing DT functions
2024-12-17 10:05:55 +01:00
Olivier Deprez
6f0a71cc19 Merge "feat(mt8196): enable DP and eDP for mt8196" into integration 2024-12-17 08:43:50 +01:00
Manish Pandey
fcdab0dc45 Merge "fix(encrypt-fw): put build_msg under LOG_LEVEL flag" into integration 2024-12-16 21:09:11 +01:00
Igor Podgainõi
6595f4cb39 fix(cm): fix context management SYSREG128 write macros
This patch fixes a bug which was introduced in commit
3065513 related to improper saving of EL1 context in the
context management library code when using 128-bit
system registers.

Bug explanation:
The function el1_sysregs_context_save still used the normal
macros that read all the system registers related to the EL1
context, which then involved casting them to uint64_t and
eventually writing them to a memory structure. This means that
the context management library was saving EL1-related SYSREG128
registers with the upper 64 bits zeroed out.

Alternative macros had previously been introduced for the EL2
context in the aforementioned commit, but not for EL1.

Some refactoring has also been done as part of this patch:
- Re-added "common" back to write_el2_ctx_common_sysreg128
- Added dummy SYSREG128 macros for cases when some features
  are disabled
- Removed some newlines

Change-Id: I15aa2190794ac099a493e5f430220b1c81e1b558
Signed-off-by: Igor Podgainõi <igor.podgainoi@arm.com>
2024-12-16 18:14:51 +01:00
Manish Pandey
885503f4f3 Merge "fix(docs): put INIT_UNUSED_NS_EL2 docs back" into integration 2024-12-16 16:56:42 +01:00
Manish Pandey
bfaded4061 Merge "feat(stm32mp2): add FWU support" into integration 2024-12-16 16:47:02 +01:00
Manish Pandey
9e6ab88eca Merge changes I7854e1ae,I214e4b2b,I000573e5 into integration
* changes:
  feat(stm32mp2): add a runtime service for STGEN configuration
  feat(stm32mp2): add common SMC runtime services
  feat(stm32mp1): rework SVC services
2024-12-16 16:46:14 +01:00
Manish V Badarkhe
3c72b2ab0b Merge "fix(tc): eliminate unneeded MbedTLS dependency" into integration 2024-12-16 09:32:16 +01:00
Manish V Badarkhe
22220e69f9 fix(tc): eliminate unneeded MbedTLS dependency
The rse_platform_api.h file includes certain MbedTLS headers,
introducing an unnecessary dependency when building the TC
platform with RSE support unconditionally.
However, these headers are not required, as the BL31
implementation only initializes RSE communication,
which does not rely on MbedTLS.

Change-Id: If45122aaf158be128f8978422fd870dbb0a0d090
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2024-12-16 09:25:09 +01:00
Manish V Badarkhe
9ac687f7be Merge changes from topic "hf_transfer_list" into integration
* changes:
  fix(tlc): pass the flags from client interface
  fix(tlc): relax entry addition from YAML files
  feat(tlc): add --align argument
  fix(tlc): add void entries to align data
  fix(handoff): correct 8-bit modulo csum calculation
  feat(tlc): formalise random generation of TEs
2024-12-13 18:31:26 +01:00
Manish Pandey
cb4562e05e Merge changes from topic "clang-rockchip" into integration
* changes:
  build(rk3399): m0: Makefile: respect verbosity for linkerfile
  build(rk3399): m0: fail linker and assembler on warnings
  build(rk3399): m0: remove redundant M0_CROSS_COMPILE
  feat(build): rk3399: m0: add support for new binutils versions
  fix(rk3399): m0: Makefile: fix outside array bounds warning
  refactor(rk3399): m0: Makefile: use same tools as in build_macros.mk
  refactor(rk3399): m0: Makefile: specify ARCH to be rk3399-m0
  fix(rk3588): pmu: fix assembly symbol redefinition
  fix(rockchip): pmu: Do not mark already defined functions as weak
  fix(rk3399): dram: Fix build with gcc 11
  fix(rk3288): remove unused function
  fix(px30): remove unused function
2024-12-13 17:36:10 +01:00
Manish Pandey
31a223cbb1 Merge "feat(tc): add devicetree node for AP/RSE MHU" into integration 2024-12-13 14:30:08 +01:00
Manish V Badarkhe
62ed5aa0b6 Merge "fix(romlib): romlib build without MbedTLS" into integration 2024-12-13 12:16:47 +01:00
Manish V Badarkhe
4817b85d72 Merge "feat(tc): initialize MHU channels with RSE" into integration 2024-12-13 11:51:01 +01:00
Manish Pandey
1b2e12cc86 Merge "fix(tc): map mem_protect flash region" into integration 2024-12-13 11:50:39 +01:00
Gatien Chevallier
7f41506fa7 feat(stm32mp2): add a runtime service for STGEN configuration
Other component such as OP-TEE may have the responsibility for
STGEN configuration but updating Arm CNTFRQ can only be done from
EL3. Therefore, implement a SiP SMC handler for this purpose and
a runtime service to catch SIP SMCs.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
Change-Id: I7854e1ae6328f149798b43d52bb1ecdf71a5aa69
2024-12-13 11:48:38 +01:00
Gatien Chevallier
f55b136abc feat(stm32mp2): add common SMC runtime services
Implement the common SMC runtime services for stm32mp2 platforms.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
Change-Id: I214e4b2bfba439572c079bbc9ffb62bc87793ce9
2024-12-13 11:48:37 +01:00
Yann Gautier
39b08bc366 feat(stm32mp1): rework SVC services
Having two generations of STM32MPX using the same SMCCC protocol,
rework the SVC services setup to put in common what can be put
in common and implement platform-specific handlers.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I000573e50d55dc70163c2657c12cc84085416f6b
2024-12-13 11:48:29 +01:00
Manish Pandey
d7ad23796c Merge changes Ib1b810df,I5492bab5 into integration
* changes:
  feat(tc): add dsu pmu node for TC4
  feat(tc): enable DSU PMU el1 access for TC4
2024-12-13 11:46:45 +01:00
Manish V Badarkhe
f3ad3f48c2 Merge "feat(qti): platform support for qcs615" into integration 2024-12-13 11:30:50 +01:00
quic_assethi
f60617d3b1 feat(qti): platform support for qcs615
Change-Id: Ibbe78a196d77530fa9d94d7d12b2f08a4b66d62e
Signed-off-by: Amarinder Singh Sethi <quic_assethi@quicinc.com>
2024-12-13 14:54:22 +05:30
Manish Pandey
f8872c9440 Merge "fix(cpus): workaround for Cortex-X4 erratum 2923985" into integration 2024-12-12 22:43:22 +01:00
Manish Pandey
45db86e0d4 Merge "feat(fpmr): disable FPMR trap" into integration 2024-12-12 22:42:20 +01:00
Arvind Ram Prakash
a57e18e433 feat(fpmr): disable FPMR trap
This patch enables support of FEAT_FPMR by enabling access
to FPMR register. It achieves it by setting the EnFPM bit of
SCR_EL3. This feature is currently enabled for NS world only.

Reference:
https://developer.arm.com/documentation/109697/2024_09/
Feature-descriptions/The-Armv9-5-architecture-extension?lang=en

Change-Id: I580c409b9b22f8ead0737502280fb9093a3d5dd2
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
2024-12-12 10:03:23 -06:00
J-Alves
537a25ef7f fix(tlc): pass the flags from client interface
Provide the 'flags' from the arguments of the create
command to the TransferList __init__ function.

This is so that the '--flags' argument to the tool is actually
used.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: Ic3f548e0ce7e704b3a12c2908f03d6a639bfa6f0
2024-12-12 16:12:35 +02:00
Yu Shihai
06fa4c4df2 feat(tc): add devicetree node for AP/RSE MHU
These dts nodes are used by u-boot MHU/RSE driver to faciliate
communication with RSE over MHU.

FPGA doesn't seem to have the MHU instances which are used to
communicate with RSE so keep rse mhu disabled for fpga.

Signed-off-by: Yu Shihai <yu.shihai@arm.com>
Signed-off-by: Jackson Cooper-Driver <jackson.cooper-driver@arm.com>
Signed-off-by: Jagdish Gediya <jagdish.gediya@arm.com>
Signed-off-by: Icen Zeyada <Icen.Zeyada2@arm.com>
Change-Id: Ib10b3da09626e5beb6d6cd87b1618a143234a5d0
2024-12-12 10:58:20 +00:00
Ryan Everett
52d2934560 fix(psa): increase psa-mbedtls heap size for rsa
The value assigned for the mbedtls heap size for large
rsa keys was too small when PSA_CRYPTO is set to 1,
leading to run-time failures if one was to attempt
to use a large RSA key with PSA_CRYPTO=1.

Change-Id: Id9b2648ae911879f483f1b88301f28694af0721d
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-12-12 10:13:41 +00:00
Arvind Ram Prakash
cc46166144 fix(cpus): workaround for Cortex-X4 erratum 2923985
Cortex-X4 erratum 2923935 is a Cat B erratum that applies
to all revisions <= r0p1 and is fixed in r0p2.

The workaround is to set CPUACTLR4_EL1[11:10] to 0b11.

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

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I9207802ad479919a7f77c1271019fa2479e076ee
2024-12-11 16:09:20 -06:00
Manish V Badarkhe
e372c29153 Merge "chore(romlib): remove unused jmptbl.i file" into integration 2024-12-11 19:01:29 +01:00
Mark Dykes
255d907675 Merge "feat(intel): add support for query SDM config error and status" into integration 2024-12-11 17:53:12 +01:00
Yann Gautier
7640df6f1e fix(encrypt-fw): put build_msg under LOG_LEVEL flag
In tools directory, contrary to other parts of TF-A code,
LOG_LEVEL_NOTICE is 20, and LOG_LEVEL_ERROR is 10. If LOG_LEVEL is
set to 10, which is the case if BUILD_INFO=0, then we can have this
compilation warning:
src/main.c:29:19: warning: ‘build_msg’ defined but not used
 [-Wunused-const-variable=]
   29 | static const char build_msg[] = "Built : " __TIME__ ",
 " __DATE__;
      |                   ^~~~~~~~~

Avoid that by putting it under '#if LOG_LEVEL >= LOG_LEVEL_NOTICE'.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ic724610d6df811fc889775dbd361087e0958d31e
2024-12-11 15:59:22 +01:00
Manish V Badarkhe
7dc43344c4 Merge changes from topic "update-mbedtls-to-3.6.2" into integration
* changes:
  feat(mbedtls): mbedtls config update for v3.6.2
  docs(prerequisites): update mbedtls to version 3.6.2
  refactor(mbedtls): rename default mbedtls confs
2024-12-11 14:55:43 +01:00
Jackson Cooper-Driver
4bfe49ec4e fix(tc): map mem_protect flash region
TC platform was missing this region's mapping in its plat_arm_mmap
structure causing a data abort when trying to access it.

Signed-off-by: Jackson Cooper-Driver <jackson.cooper-driver@arm.com>
Signed-off-by: Icen Zeyada <Icen.Zeyada2@arm.com>
Change-Id: I0a6322685f1ee017b0f0cfa795abac0524c13287
2024-12-11 10:55:20 +00:00
Leo Yan
0328f34222 feat(tc): initialize MHU channels with RSE
Initialize MHU channels between TF-A and RSE, this is a preparation
for later sending messages to RSE.

Signed-off-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Icen Zeyada <Icen.Zeyada2@arm.com>
Change-Id: I66095cafcc1d48249cf957a49dc1dad3059a0010
2024-12-11 10:42:52 +00:00
Boyan Karatotev
4557c0c001 fix(docs): put INIT_UNUSED_NS_EL2 docs back
Commit b65dfe40a removed the documentation for this flag in error. Put
it back.

Change-Id: I61a352553a010385997c47116b53d2fbe939ccd4
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2024-12-11 09:17:32 +00:00
Jagdish Gediya
50ad0cfda3 feat(tc): add dsu pmu node for TC4
Add DSU PMU node for TC4. DSU PMU interrupt is not connected on TC3
but it is connected on IRQ 290 on TC4, so add interrupt property
specifically for TC4.

Signed-off-by: Jagdish Gediya <jagdish.gediya@arm.com>
Signed-off-by: Icen Zeyada <Icen.Zeyada2@arm.com>
Change-Id: Ib1b810df65004987e9f3cf1bbd5deb5d211f3a17
2024-12-10 17:11:40 +00:00
Jagdish Gediya
00397b30b8 feat(tc): enable DSU PMU el1 access for TC4
Enable DSU PMU EL1 access for TC4 to use DSU PMU using perf
in Linux.

Signed-off-by: Jagdish Gediya <jagdish.gediya@arm.com>
Signed-off-by: Icen Zeyada <Icen.Zeyada2@arm.com>
Change-Id: I5492bab5c95d60ffaaede4606d8d75c00f988eb6
2024-12-10 16:12:59 +00:00
Mac Shen
3e43d1d317 feat(mt8196): enable DP and eDP for mt8196
- Add register definitions for DP
- Add mmap entry for DP register access

Change-Id: I22ed9fa36a7e13fcaed0c137d0e8f4449b6a52d7
Signed-off-by: Mac Shen <mac.shen@mediatek.com>
2024-12-10 10:25:01 +02:00