Commit graph

16120 commits

Author SHA1 Message Date
Govindraj Raja
af5ae9a73f fix(cpus): workaround for Cortex-A720-AE erratum 3699562
Cortex-A720-AE erratum 3699562 that applies to r0p0 and is still
Open.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

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

Change-Id: Ib830470747822cac916750c01684a65cb5efc15b
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2025-02-03 13:57:50 -06:00
Govindraj Raja
050c4a38a3 fix(cpus): workaround for Cortex-A720 erratum 3699561
Cortex-A720 erratum 3699561 that applies to all revisions <= r0p2
and is still Open.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

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

Change-Id: I7ea3aaf3e7bf6b4f3648f6872e505a41247b14ba
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2025-02-03 13:57:26 -06:00
Govindraj Raja
26437afde1 fix(cpus): workaround for Cortex-A715 erratum 3699560
Cortex-A715 erratum 3699560 that applies to all revisions <= r1p3
and is still Open.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

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

Change-Id: I183aa921b4b6f715d64eb6b70809de2566017d31
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2025-02-03 10:14:33 -06:00
Govindraj Raja
463b5b4a46 fix(cpus): workaround for Cortex-A710 erratum 3701772
Cortex-A710 erratum 3701772 that applies to all revisions <= r2p1
and is still Open.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

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

Change-Id: I997c9cfaa75321f22b4f690c4d3f234c0b51c670
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2025-02-03 10:14:33 -06:00
Govindraj Raja
7455cd1721 fix(cpus): workaround for accessing ICH_VMCR_EL2
When ICH_VMCR_EL2.VBPR1 is written in Secure state (SCR_EL3.NS==0)
and then subsequently read in Non-secure state (SCR_EL3.NS==1), a
wrong value might be returned. The same issue exists in the opposite way.

Adding workaround in EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored. For example, EL3 software should set
SCR_EL3.NS to 1 when saving or restoring the value ICH_VMCR_EL2 for
Non-secure(or Realm) state. EL3 software should clear
SCR_EL3.NS to 0 when saving or restoring the value ICH_VMCR_EL2 for
Secure state.

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

Change-Id: I9f0403601c6346276e925f02eab55908b009d957
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2025-02-03 10:14:09 -06:00
Govindraj Raja
58d98ba82d chore(cpus): fix incorrect header macro
- errata.h is using incorrect header macro ERRATA_REPORT_H fix this.
- Group errata function utilities.

Change-Id: I6a4a8ec6546adb41e24d8885cb445fa8be830148
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2025-02-03 10:13:45 -06:00
Govindraj Raja
a726d56074 Merge "feat(mt8196): enable appropriate errata" into integration 2025-02-03 16:49:02 +01:00
Madhukar Pappireddy
6bd0dd4ab7 Merge "feat(sptool): transfer list to replace SP Pkg" into integration 2025-02-03 15:45:14 +01:00
Joanna Farley
fdbd18b56c Merge "fix(zynqmp): fix length of clock name" into integration 2025-02-03 10:00:35 +01:00
Olivier Deprez
56d8842052 Merge "feat(tc): enable stack protector" into integration 2025-02-03 08:35:29 +01:00
Douglas Anderson
0d11e62e67 feat(mt8196): enable appropriate errata
Booting mt8196 and grepping the logs for "errat" showed:

  WARNING: BL31: cortex_a720: CPU workaround for erratum 2792132 was missing!
  WARNING: BL31: cortex_a720: CPU workaround for erratum 2844092 was missing!
  WARNING: BL31: cortex_a720: CPU workaround for erratum 2926083 was missing!
  WARNING: BL31: cortex_a720: CPU workaround for erratum 2940794 was missing!
  WARNING: BL31: cortex_x4: CPU workaround for erratum 2726228 was missing!
  WARNING: BL31: cortex_x4: CPU workaround for erratum 2740089 was missing!
  WARNING: BL31: cortex_x4: CPU workaround for erratum 2763018 was missing!
  WARNING: BL31: cortex_x4: CPU workaround for erratum 2816013 was missing!
  WARNING: BL31: cortex_x4: CPU workaround for erratum 2897503 was missing!
  WARNING: BL31: cortex_x4: CPU workaround for erratum 2923985 was missing!
  WARNING: BL31: cortex_x4: CPU workaround for erratum 3076789 was missing!

Set defines so that all the errata are fixed. Now the above shows:

  INFO:    BL31: cortex_a720: CPU workaround for erratum 2792132 was applied
  INFO:    BL31: cortex_a720: CPU workaround for erratum 2844092 was applied
  INFO:    BL31: cortex_a720: CPU workaround for erratum 2926083 was applied
  INFO:    BL31: cortex_a720: CPU workaround for erratum 2940794 was applied
  INFO:    BL31: cortex_x4: CPU workaround for erratum 2726228 was applied
  INFO:    BL31: cortex_x4: CPU workaround for erratum 2740089 was applied
  INFO:    BL31: cortex_x4: CPU workaround for erratum 2763018 was applied
  INFO:    BL31: cortex_x4: CPU workaround for erratum 2816013 was applied
  INFO:    BL31: cortex_x4: CPU workaround for erratum 2897503 was applied
  INFO:    BL31: cortex_x4: CPU workaround for erratum 2923985 was applied
  INFO:    BL31: cortex_x4: CPU workaround for erratum 3076789 was applied

Change-Id: I209784c2574b99c3c275ac60adf73896e0cdd078
Signed-off-by: Douglas Anderson <dianders@chromium.org>
2025-02-01 01:01:33 +01:00
Govindraj Raja
6ef685a913 Merge changes I58637b8d,I4bb1a50a,Iadac6549,I758e933f into integration
* changes:
  feat(mt8196): turn on APU smpu protection
  feat(mt8196): enable APU spmi operation
  feat(mt8196): add Mediatek MMinfra stub implementation
  feat(mt8196): enable cirq for MediaTek MT8196
2025-01-31 17:15:55 +01:00
Bipin Ravi
1f2c58b109 Merge changes from topic "ar/smccc_arch_wa_4" into integration
* changes:
  fix(security): apply SMCCC_ARCH_WORKAROUND_4 to affected cpus
  fix(security): add support in cpu_ops for CVE-2024-7881
  fix(security): add CVE-2024-7881 mitigation to Cortex-X3
  fix(security): add CVE-2024-7881 mitigation to Neoverse-V3
  fix(security): add CVE-2024-7881 mitigation to Neoverse-V2
  fix(security): add CVE-2024-7881 mitigation to Cortex-X925
  fix(security): add CVE-2024-7881 mitigation to Cortex-X4
  fix(security): enable WORKAROUND_CVE_2024_7881 build option
2025-01-31 17:10:57 +01:00
Leo Yan
d1de6b2b57 feat(tc): enable stack protector
Enable the compiler's stack protector for detecting stack overflow
issues.

Though TC platform can generate RNG from RSE via MHU channel, the
stack protector canary is used prior to MHU channel initialization.

Thus, currently here simply returns a value of the combination of a
timer's value and a compile-time constant.

Signed-off-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Icen Zeyada <Icen.Zeyada2@arm.com>
Change-Id: I68fcc7782637b2b6b4dbbc81bc15df8c5ce0040b
2025-01-31 13:45:28 +01:00
Olivier Deprez
cc7f37137e Merge "chore(deps): add LTS Dependabot configuration" into integration 2025-01-31 13:37:02 +01:00
Olivier Deprez
a2c5171461 Merge "fix(intel): update debug messages to appropriate class" into integration 2025-01-31 12:02:18 +01:00
Olivier Deprez
5cef096e4c Merge "fix(intel): update warm reset routine and bootscratch register usage" into integration 2025-01-31 12:01:35 +01:00
Olivier Deprez
de5943f94c Merge changes from topic "Id18b0341353ffc00e44e2d3c643ccdd05cc20c4f" into integration
* changes:
  fix(rk3399): fix unquoted .incbin for clang
  fix(rk3399): mark INCBIN-generated sections as SHF_ALLOC
2025-01-31 11:52:13 +01:00
Olivier Deprez
3ce41dc7cc Merge "fix(rdv3): add console name to checksum calculation on RD-V3" into integration 2025-01-31 10:36:12 +01:00
Arvind Ram Prakash
8ae6b1ad6c fix(security): apply SMCCC_ARCH_WORKAROUND_4 to affected cpus
This patch implements SMCCC_ARCH_WORKAROUND_4 and
allows discovery through SMCCC_ARCH_FEATURES.
This mechanism is enabled if CVE_2024_7881 [1] is enabled
by the platform. If CVE_2024_7881 mitigation
is implemented, the discovery call returns 0,
if not -1 (SMC_ARCH_CALL_NOT_SUPPORTED).

For more information about SMCCC_ARCH_WORKAROUND_4 [2], please
refer to the SMCCC Specification reference provided below.

[1]: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-7881
[2]: https://developer.arm.com/documentation/den0028/latest

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I1b1ffaa1f806f07472fd79d5525f81764d99bc79
2025-01-30 16:45:35 -06:00
Arvind Ram Prakash
4caef42a94 fix(security): add support in cpu_ops for CVE-2024-7881
This patch adds new cpu ops function extra4 and a new macro
for CVE-2024-7881 [1]. This new macro declare_cpu_ops_wa_4 allows
support for new CVE check function.

[1]: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-7881

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I417389f040c6ead7f96f9b720d29061833f43d37
2025-01-30 16:45:35 -06:00
Arvind Ram Prakash
b0521a164a fix(security): add CVE-2024-7881 mitigation to Cortex-X3
This patch mitigates CVE-2024-7881 [1] by setting CPUACTLR6_EL1[41] to 1
for Cortex-X3 CPU.

[1]: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-7881

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I410517d175a80fc6f459fa6ce5c30c0a38db9eaf
2025-01-30 16:45:35 -06:00
Arvind Ram Prakash
037a15f5c7 fix(security): add CVE-2024-7881 mitigation to Neoverse-V3
This patch mitigates CVE-2024-7881 [1] by setting CPUACTLR6_EL1[41] to 1
for Neoverse-V3 CPU.

[1]: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-7881

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: Ib5c644895b8c76d3c7e8b5e6e98d7b9afef7f1ec
2025-01-30 16:45:35 -06:00
Arvind Ram Prakash
56bb1d172c fix(security): add CVE-2024-7881 mitigation to Neoverse-V2
This patch mitigates CVE-2024-7881 [1] by setting CPUACTLR6_EL1[41] to 1
for Neoverse-V2 CPU.

[1]: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-7881

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I129814eb3494b287fd76a3f7dbc50f76553b2565
2025-01-30 16:45:35 -06:00
Arvind Ram Prakash
520c2207b9 fix(security): add CVE-2024-7881 mitigation to Cortex-X925
This patch mitigates CVE-2024-7881 [1] by setting CPUACTLR6_EL1[41] to 1
for Cortex-X925 CPU.

[1]: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-7881

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I53e72e4dbc8937cea3c344a5ba04664c50a0792a
2025-01-30 16:45:35 -06:00
Arvind Ram Prakash
6ce6acac91 fix(security): add CVE-2024-7881 mitigation to Cortex-X4
This patch mitigates CVE-2024-7881 [1] by setting CPUACTLR6_EL1[41] to 1
for Cortex-X4 CPU.

[1]: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-7881

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I0bec96d4f71a08a89c6612e272ecfb173f80da20
2025-01-30 16:45:35 -06:00
Arvind Ram Prakash
2372179484 fix(security): enable WORKAROUND_CVE_2024_7881 build option
This patch enables build option needed to include
support for CVE_2024_7881 [1] migitation.

[1]: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-7881

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: Id77f82a4dfaa4422729f7e3f2429f47cc90d9782
2025-01-30 16:45:35 -06:00
Manish V Badarkhe
ea370b041a Merge "docs(changelog): remove FEAT_XXXX scopes" into integration 2025-01-30 20:47:05 +01:00
Peter Robinson
f535068c84 fix(zynqmp): fix length of clock name
The CLK_NAME_LEN variable is set to 15 but with more
hardening we get the following error for the
pss_alt_ref_clk name so bump the length slightly
to take all the requirements into account.

plat/xilinx/zynqmp/pm_service/pm_api_clock.c:2248:25: error: initializer-string for array of ‘char’ is too long [-Werror=unterminated-string-initialization]
2248 |                 .name = "pss_alt_ref_clk",
     |                         ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Fixes: caae497df ("zynqmp: pm: Add clock control EEMI API and ioctl functions")
Change-Id: I399271dd257c6e40a2d319c47f2588a958a5491b
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2025-01-30 20:28:45 +01:00
Govindraj Raja
9b494c2d19 docs(changelog): remove FEAT_XXXX scopes
We have one entry per CPU features but most of the time we just add
CPU feature and its not touched again, so considering to generalize
anything with FEAT_XXXX additions to use `cpufeat` as subsection scope.

Also, some time we don't add a scope for CPU feature this causes problem
while generating release notes as CPU feature additions ends up in wrong
section.

Change-Id: Ibc80f6cdab9ae10ec3af1485640f46771b382da0
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2025-01-30 10:27:50 -06:00
Manish Pandey
a2ea98598c Merge "fix(versal-net): remove_redundant_lock_defs" into integration 2025-01-30 16:32:41 +01:00
Karl Li
5de1ace54a feat(mt8196): turn on APU smpu protection
1. Turn on APU SMPU protection on MT8196.
2. Remove unused header file.

Change-Id: I58637b8dda4bf68253bc2329580963a8bd9cca8b
Signed-off-by: Karl Li <karl.li@mediatek.com>
2025-01-30 23:32:30 +08:00
Karl Li
823a57e11c feat(mt8196): enable APU spmi operation
Enable APU spmi operation after spmi module ready

Change-Id: I4bb1a50a635e8798b049295dbbf98967daff5997
Signed-off-by: Karl Li <karl.li@mediatek.com>
2025-01-30 23:30:59 +08:00
Yong Wu
4794746eec feat(mt8196): add Mediatek MMinfra stub implementation
Implement stub functions for the MMinfra (Multimedia Infrastructure)
driver to ensure that the build can pass when a prebuilt library is
not available.

Change-Id: Iadac654950c868d3743b13a1d6f7ab5d1015fb86
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
2025-01-30 23:30:09 +08:00
ot_chhao.chang
49d8c11285 feat(mt8196): enable cirq for MediaTek MT8196
- Add CIRQ related information.

Signed-off-by: ot_chhao.chang <ot_chhao.chang@mediatek.com>
Change-Id: I758e933f9d53f7bfb16e3d7feb1c7f53516b1da6
2025-01-30 23:28:17 +08:00
Olivier Deprez
cf084b3620 Merge "fix(gicv3): do not assume redistributors are powered down" into integration 2025-01-30 16:27:44 +01:00
Govindraj Raja
ff82102505 Merge "feat(mediatek): add gic driver" into integration 2025-01-29 23:08:26 +01:00
Govindraj Raja
35c54de149 Merge "refactor(mediatek): refactor the data type of the return value" into integration 2025-01-29 22:57:15 +01:00
Manish V Badarkhe
206dd2bb3e Merge "fix(tc): fix compilation error" into integration 2025-01-29 22:09:56 +01:00
Manish Pandey
c2673bff18 Merge "fix(build): do not force PLAT in plat_helpers.mk" into integration 2025-01-29 13:58:46 +01:00
Yann Gautier
27f7083227 Merge "fix(xilinx): remove unused write_icc_asgi1r_el1()" into integration 2025-01-29 10:54:33 +01:00
Michal Simek
1c12cd10fc fix(xilinx): remove unused write_icc_asgi1r_el1()
The commit 427e46ddea ("fix(xilinx): fix sending sgi to linux")
removed code which called write_icc_asgi1r_el1() but function itself
wasn't removed.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: I95a1424b0546f3f4a5e4611de34441b96e70b7d3
2025-01-29 10:52:59 +01:00
Leo Yan
26a520b2be fix(tc): fix compilation error
When the SPD_spmd configuration is disabled, the compiler complaints:

plat/arm/board/tc/tc_bl2_dpe.c:234:22: error: unused variable 'array_size' [-Werror=unused-variable]
  234 |         const size_t array_size = ARRAY_SIZE(tc_dpe_metadata);
      |                      ^~~~~~~~~~
plat/arm/board/tc/tc_bl2_dpe.c:233:16: error: unused variable 'i' [-Werror=unused-variable]
  233 |         size_t i;
      |                ^
cc1: all warnings being treated as errors

Move variable declarations into the code chunk protected by the SPD_spmd
configuration.

Change-Id: I1a3889938e2d4ec5efec516e9ef54034f9d711b2
Signed-off-by: Leo Yan <leo.yan@arm.com>
2025-01-29 09:49:18 +00:00
Madhukar Pappireddy
604b879778 Merge "fix(el3-spmc): move ERROR line inside conditional" into integration 2025-01-29 00:52:43 +01:00
Madhukar Pappireddy
eb2215d2e7 Merge "feat(el3-spmc): use spmd_smc_switch_state after secure interrupt" into integration 2025-01-29 00:46:06 +01:00
Govindraj Raja
2c09bf93f0 Merge changes I3f63d597,I40fc21f5 into integration
* changes:
  feat(mt8196): add mtcmos driver
  feat(mt8196): add DCM driver
2025-01-28 22:08:16 +01:00
Govindraj Raja
cf2df874cd Merge changes I1126311e,I6ae5b5b4,I1b907256,I9facb6bf,Ie51cffeb, ... into integration
* changes:
  feat(mt8196): add vcore dvfs drivers
  feat(mt8196): add LPM v2 support
  feat(mt8196): add SPM common version support
  feat(mt8196): add SPM common driver support
  feat(mt8196): add SPM basic features support
  feat(mt8196): add SPM features support
  feat(mt8196): enable PMIC low power setting
  feat(mt8196): add mcdi driver
  feat(mt8196): add pwr_ctrl module for CPU power management
  feat(mt8196): add mcusys moudles for power management
  feat(mt8196): add CPC module for power management
  feat(mt8196): add topology module for power management
  feat(mt8196): add SPMI driver
  feat(mt8196): add PMIC driver
2025-01-28 22:07:51 +01:00
Guangjie Song
1f913a6e3a feat(mt8196): add mtcmos driver
add mtcmos driver for ufs power control

Signed-off-by: Guangjie Song <guangjie.song@mediatek.com>
Change-Id: I3f63d5976906aaca91a71a147497e9345339774d
2025-01-28 21:59:52 +01:00
Guangjie Song
e578702f71 feat(mt8196): add DCM driver
DCM means dynamic clock management, and it can dynamically slow down
or gate clocks during CPU or bus idle.

Add MCUSYS or bus related DCM drivers.
Enable MCUSYS or bus related DCM by default.

Signed-off-by: Guangjie Song <guangjie.song@mediatek.com>
Change-Id: I40fc21f5808962ca46870a2f3b9963dc8088f877
2025-01-28 21:59:03 +01:00
Manish V Badarkhe
fc45c16b46 Merge "fix(rdv3): fix comment for DRAM1 carveout size" into integration 2025-01-28 18:11:12 +01:00