Commit graph

16223 commits

Author SHA1 Message Date
Yann Gautier
36416b1e76 refactor(rse): put MHU code in a dedicated file
To be able to use RSE comms without MHU, a first step is to disentangle
the rse_comms.c file with MHU code direct calls. This is done with the
creation of a new file rse_comms_mhu.c. New APIs are created to
initialize the mailbox, get max message size and send and receive data.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I75dda77e1886beaa6ced6f92c311617125918cfa
2025-02-12 10:11:49 +01:00
Yann Gautier
5b46aaccec refactor(tc): add plat_rse_comms_init
The same way it is done for neoverse_rd, create a plat_rse_comms_init()
function to call rse_comms_init().

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I12f3b8a38a5369decb4b97f8aceeb0dc81cbea28
2025-02-12 10:11:49 +01:00
Yann Gautier
a773955094 refactor(arm)!: rename PLAT_MHU_VERSION flag
In order to support a platform without MHU in RSE, update the flag
PLAT_MHU_VERSION. It is renamed PLAT_MHU and can take the following
entries: NO_MHU, MHUv1, MHUv2, MHUv3...

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ia72e590088ce62ba8c9009f341b6135926947bee
2025-02-12 10:11:46 +01:00
Yann Gautier
613892cfef Merge changes from topic "imx8mq_build_fix" into integration
* changes:
  fix(imx8m): fix imx8mq build break
  fix(imx8mq): fix imx8mq build break due to hab
2025-02-12 09:26:36 +01:00
Yann Gautier
8c4ae764ff Merge "fix(altera): add in support for agilex5 b0 jtag id" into integration 2025-02-12 09:18:25 +01:00
Manish Pandey
fcb80d7d14 Merge changes I765a7fa0,Ic33f0b6d,I8d1a88c7,I381f96be,I698fa849, ... into integration
* changes:
  fix(cpus): clear CPUPWRCTLR_EL1.CORE_PWRDN_EN_BIT on reset
  chore(docs): drop the "wfi" from `pwr_domain_pwr_down_wfi`
  chore(psci): drop skip_wfi variable
  feat(arm): convert arm platforms to expect a wakeup
  fix(cpus): avoid SME related loss of context on powerdown
  feat(psci): allow cores to wake up from powerdown
  refactor: panic after calling psci_power_down_wfi()
  refactor(cpus): undo errata mitigations
  feat(cpus): add sysreg_bit_toggle
2025-02-11 16:52:18 +01:00
Govindraj Raja
0f38b9f87e Merge "fix(mt8196): fix wrong register offset of dptx on MT8196" into integration 2025-02-10 16:43:52 +01:00
Govindraj Raja
d2e0a4dfc7 Merge "feat(mt8196): enable vcore dvfsrc feature" into integration 2025-02-10 16:31:53 +01:00
Manish Pandey
0d22145fe2 Merge "fix: add support for 128-bit sysregs to EL3 crash handler" into integration 2025-02-10 14:14:42 +01:00
Jit Loon Lim
8a0a006af3 fix(altera): add in support for agilex5 b0 jtag id
Support Agilex5 B0 jtag id for fpga reconfig.

Change-Id: I4efb5a046a0f11009a1f08412ff0e48f376c94e1
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2025-02-10 12:22:06 +08:00
Kunlong Wang
a3c218afd6 feat(mt8196): enable vcore dvfsrc feature
This patch will enable vcore dvfsrc.
- 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.corp-partner.google.com>
Change-Id: I972eb2da1b8526f4ce2927cd662a6fc3ef2f2401
2025-02-10 11:21:10 +08:00
Govindraj Raja
03a7a43e18 Merge "docs: bump the arm compiler version" into integration 2025-02-07 16:33:53 +01:00
Boyan Karatotev
35503bdc4a docs: bump the arm compiler version
Patch fdae0b95852e087d8a19187f4d40babc67f0e57a in the CI bumped it to
6.23. Reflect this in docs

Change-Id: I39f3cd6fb03f81066fbbae3672c79802c607e3cd
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2025-02-07 10:52:59 +00:00
Gavin Liu
b38f8f7a3e fix(mt8196): fix wrong register offset of dptx on MT8196
Fix wrong register offset of dptx on MT8196.

Change-Id: I46f7ac7751d14c9093b7b5bd1c741179a7fbbd34
Signed-off-by: Gavin Liu <gavin.liu@mediatek.com>
2025-02-07 17:26:57 +08:00
Manish V Badarkhe
b9315f5087 Merge "feat(cpus): add ENABLE_ERRATA_ALL flag" into integration 2025-02-06 21:45:23 +01:00
Boyan Karatotev
593ae35435 feat(cpus): add ENABLE_ERRATA_ALL flag
Now that all errata flags are all conveniently in a single list we can
make sweeping decisions about their values. The first use-case is to
enable all errata in TF-A. This is useful for CI runs where it is
impractical to list every single one. This should help with the long
standing issue of errata not being built or tested.

Also add missing CPUs with errata to `ENABLE_ERRATA_ALL` to enable all
errata builds in CI.

Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I2b456d304d7bf3215c7c4f4fd70b56ecbcb09979
2025-02-06 17:25:48 +01:00
Govindraj Raja
efff459bdb Merge "fix(mt8196): remove CPU_IDLE_SRAM_BASE entry from plat_mmap" into integration 2025-02-06 16:20:51 +01:00
Govindraj Raja
372fdde8c8 Merge "feat(mediatek): update mtk_sip_def.h" into integration 2025-02-06 16:19:56 +01:00
Manish V Badarkhe
7c4c065022 Merge "feat(tc): enable Arm SPE for TC4" into integration 2025-02-06 13:49:11 +01:00
Manish Pandey
8b68a617bc Merge changes from topic "RDV3-hafnium-support" into integration
* changes:
  feat(rdv3): enable the support to fetch dynamic config
  feat(rdv3): add dts files to enable hafnium as BL32
  feat(rdv3): define SPMC manifest base address
  feat(arm): add a macro for SPMC manifest base address
  feat(rdv3): add carveout for BL32 image
  feat(rdv3): introduce platform handler for Group0 interrupt
  feat(neoverse-rd): use larger stack size when S-EL2 spmc is enabled
  fix(neoverse-rd): set correct SVE vector lengths
2025-02-06 12:55:47 +01:00
Manish Pandey
48730a2e3b Merge "fix(el3-runtime): for nested serrors, restore x30 to lower EL address" into integration 2025-02-06 11:51:49 +01:00
Joanna Farley
5e941e78e0 Merge "fix(versal2): update DDR address map" into integration 2025-02-06 09:27:45 +01:00
Joanna Farley
90e36ad849 Merge "feat(versal2): update platform version to versal2" into integration 2025-02-06 09:25:09 +01:00
Gavin Liu
83f37d9981 fix(mt8196): remove CPU_IDLE_SRAM_BASE entry from plat_mmap
This region is defined in LPM driver. Prefer managing this region in
LPM driver and remove it from plat_mmap and platform_def.h.

Change-Id: I57bfaad88a28d4f29e2b132ba080bc7d5b8248d8
Signed-off-by: Gavin Liu <gavin.liu@mediatek.com>
2025-02-06 14:21:03 +08:00
Yidi Lin
ead26026ff feat(mediatek): update mtk_sip_def.h
Update missing SiP SCM ID definitions. Those definitons are required
when linking to the proprietary library.

Change-Id: I6b912cee9bcceac774ff2228a1e335073a1d5ea7
Signed-off-by: Yidi Lin <yidilin@chromium.org>
2025-02-06 13:51:05 +08:00
Govindraj Raja
cea1549c95 Merge "fix(mt8196): add whole-archive option to prebuilt library" into integration 2025-02-05 21:20:19 +01:00
Igor Podgainõi
58fadd62be fix: add support for 128-bit sysregs to EL3 crash handler
The following changes have been made:
* Add new sysreg definitions and ASM macro is_feat_sysreg128_present_asm
* Add registers TTBR0_EL2 and VTTBR_EL2 to EL3 crash handler output
* Use MRRS instead of MRS for registers TTBR0_EL1, TTBR0_EL2, TTBR1_EL1,
  VTTBR_EL2 and PAR_EL1

Change-Id: I0e20b2c35251f3afba2df794c1f8bc0c46c197ff
Signed-off-by: Igor Podgainõi <igor.podgainoi@arm.com>
2025-02-05 21:19:15 +01:00
Govindraj Raja
e6cbdb00b7 Merge changes I65b9e341,I7f3c42cb,I1bb1771d into integration
* changes:
  feat(mt8196): add reset and poweroff function for PSCI call
  feat(mt8196): refactor LPM header include paths to use lpm_v2
  refactor(mediatek): update API calls to MTK GIC v3 driver
2025-02-05 21:19:04 +01:00
Jaiprakash Singh
0bc3115f6e fix(el3-runtime): for nested serrors, restore x30 to lower EL address
In FFH mode, When handling nested serrors, serror is handled once and
all subsequent serrors are considered handled.And EL3 directly return
to lower EL.

While returning to lower EL, x30 is restore to CTX_SAVED_GPREG_LR
address.CTX_SAVED_GPREG_LR address belongs to EL3 address range and
this address will not be accessible in lower EL.

After return to lower EL, when lower EL access x30, segmentation fault
happens and Kernel kills application.

This patch restore x30 to lower EL address (CTX_GPREG_LR) to avoid
segmentation fault at lower EL.

Change-Id: Ie8becb206e0c0204e01d12ab63ae6e915dcf33e4
Signed-off-by: Jaiprakash Singh <jaiprakashs@marvell.com>
2025-02-05 16:33:33 +00:00
Manish Pandey
79e6b76309 Merge "docs(context-mgmt): remove redundant information" into integration 2025-02-05 17:22:01 +01:00
Yidi Lin
22d74da7cd feat(mt8196): add reset and poweroff function for PSCI call
Add reset and poweroff function for PSCI call.

Change-Id: I65b9e341b74f568f968f3c464a64ea754284cb8c
Signed-off-by: Yidi Lin <yidilin@chromium.org>
2025-02-05 23:56:28 +08:00
Madhukar Pappireddy
55740f3d3e Merge changes from topic "nxp-clk/add_get_rate" into integration
* changes:
  feat(nxp-clk): restore pll output dividers rate
  feat(nxp-clk): get pll rate using get_module_rate
  feat(nxp-clk): add get_rate for partition objects
  feat(nxp-clk): add get_rate for clock muxes
  feat(nxp-clk): add get_rate for s32cc_pll_out_div
  feat(nxp-clk): add get_rate for s32cc_fixed_div
  feat(nxp-clk): add get_rate for s32cc_dfs_div
  feat(nxp-clk): add get_rate for s32cc_dfs
  feat(nxp-clk): add get_rate for s32cc_pll
  feat(nxp-clk): add get_rate for s32cc_clk
  feat(nxp-clk): add a basic get_rate implementation
2025-02-05 15:41:04 +01:00
Boyan Karatotev
c9f352c362 fix(cpus): clear CPUPWRCTLR_EL1.CORE_PWRDN_EN_BIT on reset
The model has a bug where it will not clear CPUPWRCTLR_EL1 on reset,
even though the actual cores do. The write of 1 to the bit itself
triggers the powerdown sequnece, regardless of the value before the
write. As such, the bug does not impact functionality but it does throw
off software reading it.

Clear the bit on Travis and Gelas as they are the only ones to require
reading it back.

Change-Id: I765a7fa055733d522480be30d412e3b417af2bd7
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2025-02-05 14:18:49 +00:00
Wenzhen Yu
6fac00a490 feat(mt8196): refactor LPM header include paths to use lpm_v2
These changes align the project with the latest directory structure
and ensure consistency in header references.

Signed-off-by: Wenzhen Yu <wenzhen.yu@mediatek.com>
Change-Id: I7f3c42cbd9a803064bbfed67cd8f309638da8441
2025-02-05 21:38:22 +08:00
Gavin Liu
0d8c101cd9 refactor(mediatek): update API calls to MTK GIC v3 driver
Updated the code to call the API of MTK GIC v3.

Change-Id: I1bb1771dda4d5532b1b818864f823dbb7a38094d
Signed-off-by: Gavin Liu <gavin.liu@mediatek.com>
2025-02-05 21:37:34 +08:00
Leo Yan
cea55c836f feat(tc): enable Arm SPE for TC4
Enable the Arm SPE DT binding for TC4.

Signed-off-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Icen.Zeyada <Icen.Zeyada2@arm.com>
Change-Id: I9ea49046a663eecc2b97ecef9ca939575d71fdd9
2025-02-05 14:34:20 +01:00
Nishant Sharma
37cc7fa539 feat(rdv3): enable the support to fetch dynamic config
To enable the support to load Hafnium as BL32, BL31 needs firmware
configuration info to get BL32 manifest load location. The load address
of BL32 is passed via firmware config info.

Add the support to get the address using fconf framework from dynamic
config info.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Signed-off-by: Rakshit Goyal <rakshit.goyal@arm.com>
Change-Id: I3a2a5706789ed290dc7f4a67e62e03751b930c02
2025-02-05 10:58:38 +00:00
Nishant Sharma
4d9b8281f3 feat(rdv3): add dts files to enable hafnium as BL32
On RD-V3 platform and variants, Hafnium is used as SPMC running at
S-EL2 and manage SP running at S-EL0. Hafnium is loaded and configured
as BL32 image. SP is loaded by SP load framework and configured by
Hafnium.

Add the dts files needed to enable load and configuration of hafnium and
SP.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Signed-off-by: Rakshit Goyal <rakshit.goyal@arm.com>
Change-Id: I7de72052323ff9106d7bedbaaf5ece3272e9a6cd
2025-02-05 10:58:38 +00:00
Rakshit Goyal
12973bcc89 feat(rdv3): define SPMC manifest base address
ARM_SPMC_MANIFEST_BASE defines the base address of the SPMC manifest
used by BL32. In the non-RESET_TO_BL31 case, it is defined relative to
the top of Trusted SRAM. However, for RESET_TO_BL31, the
PLAT_ARM_SPMC_MANIFEST_BASE macro can be used to set it to a different
location which is then used to populate ARM_SPMC_MANIFEST_BASE.

As the RD-V3 platform and its variants have a different SRAM layout
compared to that defined in arm_def.h, define the
PLAT_ARM_SPMC_MANIFEST_BASE macro to an address suitable for this
platform and its variants.

Signed-off-by: Rakshit Goyal <rakshit.goyal@arm.com>
Change-Id: I36e1eb21ab3d1c68bddb52c62198fcdfc40d8993
2025-02-05 10:58:38 +00:00
Rakshit Goyal
eab1ed54bf feat(arm): add a macro for SPMC manifest base address
In RESET_TO_BL31, the SPMC manifest base address that is utilized by
bl32_image_ep_info has to be statically defined as DT is not available.
Common arm code sets this to the top of SRAM using macros but it can be
different for some platforms. Hence, introduce the macro
PLAT_ARM_SPMC_MANIFEST_BASE that could be re-defined by platform as per
their use-case. Platforms that utilize arm_def.h would use the existing
value from arm common code.

Signed-off-by: Rakshit Goyal <rakshit.goyal@arm.com>
Change-Id: I4491749ad2b5794e06c9bd11ff61e2e64f21a948
2025-02-05 10:58:32 +00:00
Manish V Badarkhe
c0893d3fff Merge "fix(arm): create build directory before key generation" into integration 2025-02-05 11:46:46 +01:00
Gavin Liu
8f7d9bfa0a fix(mt8196): add whole-archive option to prebuilt library
Added `-Wl,--whole-archive` option to the LDLIBS in the platfrom.mk to
ensure that the symbols within the library are not stripped during the
linking process.

Change-Id: I35c728d3ccc98489183285a96f703e02dc7505d3
Signed-off-by: Gavin Liu <gavin.liu@mediatek.com>
2025-02-05 09:58:23 +08:00
Govindraj Raja
0c370e2d59 Merge "feat(mt8196): add SMMU driver for PM" into integration 2025-02-04 18:14:07 +01:00
Olivier Deprez
8a7dcf9759 Merge "fix(rdn2): correct RD-N2 StMM uuid format" into integration 2025-02-04 16:44:23 +01:00
Manish Pandey
51eb528184 Merge "chore(dependabot): limit LTS branches to patch updates" into integration 2025-02-04 16:02:11 +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
Rohit Mathew
6823f5f520 feat(rdv3): add carveout for BL32 image
Add and map the carveout for loading Hafnium as BL32 image. Also define
PLAT_ARM_SP_MAX_SIZE as 3 MB for secure partitions.

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Signed-off-by: Rakshit Goyal <rakshit.goyal@arm.com>
Change-Id: I2845eb6807a127c9f6b92de2dabc9a58d25bd4d4
2025-02-04 11:49:19 +00:00
Nishant Sharma
4593b93239 feat(rdv3): introduce platform handler for Group0 interrupt
This patch introduces a handler for RD-V3 variants to handle Group0
secure interrupts. Currently, it is empty but serves as a placeholder
for future Group0 interrupt sources.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Signed-off-by: Rakshit Goyal <rakshit.goyal@arm.com>
Change-Id: Ifa418094f6075a6cdc33e63eec1825103bbf6d68
2025-02-04 11:49:19 +00:00
Nishant Sharma
82f46593de feat(neoverse-rd): use larger stack size when S-EL2 spmc is enabled
Larger stack size is needed when S-EL2 SPMC is enabled. This is required
because BL31 xlat map framework makes more nested calls when this
feature is enabled.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Signed-off-by: Rakshit Goyal <rakshit.goyal@arm.com>
Change-Id: Ib3f2abf38b576ba96402dab4ba995d8b648b4cc7
2025-02-04 11:49:19 +00:00