Commit graph

7937 commits

Author SHA1 Message Date
Manish V Badarkhe
c0893d3fff Merge "fix(arm): create build directory before key generation" into integration 2025-02-05 11:46:46 +01:00
Govindraj Raja
0c370e2d59 Merge "feat(mt8196): add SMMU driver for PM" into integration 2025-02-04 18:14:07 +01:00
Jerry Wang
6fb8d8cf84 fix(rdn2): correct RD-N2 StMM uuid format
Edk2 converts StMM GUID to UUID format, which is used in FF-A and linux
kernel. StMM manifest currently provides GUID format. Correcting this to
UUID format.

Change-Id: Ie94728e5ea74d3d9935e0af9a2a601cbafe5ad3d
Signed-off-by: Jerry Wang <Jerry.Wang4@arm.com>
2025-02-04 14:04:35 +01:00
Manish V Badarkhe
697290a916 Merge changes from topic "us_tc_trng" into integration
* changes:
  feat(tc): get entropy with PSA Crypto API
  feat(psa): add interface with RSE for retrieving entropy
  fix(psa): guard Crypto APIs with CRYPTO_SUPPORT
  feat(tc): enable trng
  feat(tc): initialize the RSE communication in earlier phase
2025-02-04 13:19:10 +01:00
Olivier Deprez
aacdfdfe2b Merge "fix(tc): enable Last-level cache (LLC) for tc4" into integration 2025-02-04 11:58:30 +01:00
Olivier Deprez
a0883e9e74 Merge "refactor(bl32): flush before console switch state" into integration 2025-02-04 11:34:06 +01:00
Leo Yan
8f0235fb8f feat(tc): get entropy with PSA Crypto API
The PSA Crypto API is available with sending messages to RSE.  Change
to invoke PSA Crypto API for getting entropy.

Change-Id: I4b2dc4eb99606c2425b64949d9c3f5c576883758
Signed-off-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Icen Zeyada <Icen.Zeyada2@arm.com>
2025-02-04 10:28:18 +00:00
Leo Yan
2ae197acd6 feat(tc): enable trng
Enable the trng on the platform, which can be used by other features.
`rng-seed` has been removed and enabled `FEAT_RNG_TRAP` to trap to EL3
when accessing system registers RNDR and RNDRRS

Change-Id: Ibde39115f285e67d31b14863c75beaf37493deca
Signed-off-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Icen Zeyada <Icen.Zeyada2@arm.com>
2025-02-04 10:26:00 +00:00
Olivier Deprez
895d973d41 Merge "fix(morello): remove stray white-space in 'morello/platform.mk'" into integration 2025-02-04 11:20:13 +01:00
Yong Wu
86dd08d838 feat(mt8196): add SMMU driver for PM
Add MediaTek SMMU power driver. This driver tracks the reference
counter for power domain access on SMMU hardware, including
Multimedia SMMU and APU SMMU. The PM get/put commands may come from
linux(EL1) and hypervisor(EL2).

Change-Id: I60f83c4e3d87059b0549b2ed8c68367be3bfbbc5
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
2025-02-04 10:39:57 +08:00
Govindraj Raja
a726d56074 Merge "feat(mt8196): enable appropriate errata" into integration 2025-02-03 16:49:02 +01:00
Leo Yan
a3f9617964 feat(tc): initialize the RSE communication in earlier phase
Move the RSE MHU channel initialization to the platform setup phase,
this allows the services (e.g. TRNG service) to talk to RSE during the
service init function.

Change-Id: Id0ff6e49117008463f11b2dc3c585daca00f609c
Signed-off-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Icen Zeyada <Icen.Zeyada2@arm.com>
2025-02-03 14:50:40 +00:00
Manish V Badarkhe
db69d11829 fix(arm): create build directory before key generation
Arm ROTPK generation may start before the build directory is
created, causing errors like:

 00:45:53.235 Can't open "/home/buildslave/workspace/tf-a-coverity/
 trusted-firmware-a/build/rd1ae/debug/arm_rotpk.bin" for writing,
 No such file or directory

This patch ensures the build directory is created beforehand to
prevent such issues.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I73f7d5af00efc738e95ea79c5cacecdb6a2d20c6
2025-02-03 09:37:50 +00: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
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
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
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
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
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
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
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
Manish V Badarkhe
c2f05915bd Merge changes from topic "upstream_sp_num" into integration
* changes:
  fix(tc): enable certificate on the last secure partition
  feat(sptool): populate secure partition number in makefile
2025-01-28 18:01:23 +01:00
Ben Horgan
2e361319ac fix(tc): enable certificate on the last secure partition
Distros (e.g. Buildroot and Android) can have different secure partition
layout.

This commit iterates the DPE metadata table and finds index (i) for the
first entry of the secure partition, connecting with the defined secure
partition number NUM_SP, so the last secure partition index is:

   i + NUM_SP - 1

Instead of setting the certificate in hard code, dynamically enables the
certificate for the last secure partition base on calculated index.

Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
Change-Id: Idd11b4f463bf5ccc8d82cd06bd21deeebbda67d9
2025-01-28 14:08:18 +00:00
Boerge Struempfel
23647bd52c
fix(stm32mp2): correct early/crash console init
The previous code used 64-bit registers as the target and source for
load and store operations on 32-bit hardware registers. In certain
cases (e.g., when using USART1 as the debug console), this could result
in deadlocks where the A35 gets stuck in a permanent loop due to test
conditions that are never fulfilled.

To resolve this issue, 32-bit registers are now used for these
operations.

Change-Id: Id2c03a1df26738fe815079da042cc2dd989f4f8e
Signed-off-by: Boerge Struempfel <boerge.struempfel@gmail.com>
2025-01-28 15:04:32 +01:00
Rakshit Goyal
4e2369c707 fix(rdv3): fix comment for DRAM1 carveout size
Corrected the comment for the size of NRD_CSS_DRAM1_CARVEOUT_SIZE
(0x0C000000) from 117MB to 192MB

Signed-off-by: Rakshit Goyal <rakshit.goyal@arm.com>
Change-Id: I289d37f50e70b936f717d4579d73882fac28ee95
2025-01-28 13:56:33 +00:00
Lauren Wehrmeister
bba792b165 Merge changes Ided750de,Id3cc887c into integration
* changes:
  docs(gxl): add build instructions for booting BL31 from U-Boot SPL
  feat(gxl): add support for booting from U-Boot SPL/with standard params
2025-01-24 23:26:44 +01:00
Jagdish Gediya
7b41acaf72 fix(tc): enable Last-level cache (LLC) for tc4
EXTLLC bit in CPUECTLR_EL1(for non-gelas cpus) and in CPUECTLR2_EL1
register for gelas cpu enables external Last-level cache in the system,

External LLC is present on TC4 systems in MCN but it is not enabled in
CPU registers so enable it.

On TC4, Gelas vs Non-Gelas CPUs have different bits to enable EXTLLC
so take care of that as well.

Change-Id: Ic6a74b4af110a3c34d19131676e51901ea2bf6e3
Signed-off-by: Jagdish Gediya <jagdish.gediya@arm.com>
Signed-off-by: Icen.Zeyada <Icen.Zeyada2@arm.com>
2025-01-23 16:03:48 +00:00
Yann Gautier
fffde230ba Merge changes from topic "xlnx_fix_plat_single_ret" into integration
* changes:
  fix(versal2): modify function to have single return
  fix(versal-net): modify function to have single return
  fix(versal): modify function to have single return
  fix(xilinx): modify function to have single return
  fix(zynqmp): modify function to have single return
  fix(versal-net): add unsigned suffix to match data type
  fix(versal): add unsigned suffix to match data type
  fix(versal2): add missing curly braces
  fix(versal-net): add missing curly braces
  fix(zynqmp): add missing curly braces
2025-01-23 11:22:47 +01:00
Yann Gautier
5e36111422 Merge "fix(xilinx): dcc console tests failing" into integration 2025-01-23 11:19:54 +01:00
Manish V Badarkhe
bf6b151390 Merge changes I70b68b06,I7b180c3e,Id4ad925d,Ie31933e0,Ie8fe1f1d, ... into integration
* changes:
  refactor(tc): rename TC_FPGA_ANDROID_IMG_IN_RAM
  fix(tc): modify ethernet configuration for TC4 FPGA
  fix(tc): modify gpio controller base addr for TC4 FPGA
  fix(tc): modify DPU configuration in dts for TC4 FPGA
  fix(tc): modify mmc configuration for TC4 FPGA
  feat(tc): configure UART for TC4 FPGA
2025-01-23 10:41:35 +01:00
Kunlong Wang
f0dce79600 feat(mt8196): add vcore dvfs drivers
- VCORE DVFS is the feature to change VCORE/DDR Freq for power saving
- When there are no requests for using Vcore/DRAM, Vcore DVFS will
- lower the voltage and frequency of Vcore/DRAM to achieve power saving.

Signed-off-by: Kunlong Wang <kunlong.wang@mediatek.com>
Change-Id: I1126311e8b3943cc54fb13e15973b9e1b74c129e
2025-01-22 15:28:08 +08:00
Wenzhen Yu
da8cc41bc8 feat(mt8196): add LPM v2 support
LPM means low power module, it will connect idle and SPM to achieve
lower power consumption in some scenarios, and this patch is LPM
second version

Signed-off-by: Wenzhen Yu <wenzhen.yu@mediatek.corp-partner.google.com>
Change-Id: I6ae5b5b4c2056d08c29efab5116be3a92351d8f1
2025-01-22 15:28:08 +08:00