Commit graph

16413 commits

Author SHA1 Message Date
Wenzhen Yu
11855267b5 fix(mt8196): remove EC_SUSPEND_PIN initial setting
Move EC_SUSPEND_PIN (GPIO_AP_SUSPEND_L) init to coreboot and remove
EC_SUSPEND_PIN init from TF-A.

Signed-off-by: Wenzhen Yu <wenzhen.yu@mediatek.com>
Change-Id: I3d7a5a923dc9f692495d99255427a39ef5852bf8
2025-02-13 20:33:52 +08:00
Wenzhen Yu
ee2e99c3e3 fix(mt8196): remove SPM support for ES chip
We no longer maintain the device equipped with ES chip. Remove SPM
support for ES ship.

Signed-off-by: Wenzhen Yu <wenzhen.yu@mediatek.com>
Change-Id: I5b2d035ec384a9861239f33dbe6df54c17f1285c
2025-02-13 20:33:43 +08:00
Levi Yun
b51436c2ca feat(spm_mm): move mm_communication header define to general header
To support TPM start method with SIP, SIP handler dispatch request to
secure partition via MM_COMMUNICATE abi.
That means spm_mm sip handler should generate mm communication header.

Move mm_communication header's definition to spm_mm_svc header.

Change-Id: I40567c16e67b068ee83a39eff050d6578aecfb2c
Signed-off-by: Levi Yun <yeoreum.yun@arm.com>
2025-02-13 12:06:17 +00:00
Rakshit Goyal
8f60d99f44 fix(spmd): prevent SIMD context loss
When SPMD_SPM_AT_SEL2 is enabled, saving and restoring the SIMD context
is not needed because the SPMC handles it. The function
spmd_secure_interrupt_handler incorrectly restores the SWD SIMD context
before entering the SPMC without saving the NWD SIMD context, leading to
its loss. Furthermore, the SWD SIMD context is saved after returning
from the SPMC which is unnecessary.

This commit prevents the restoration of the SWD SIMD context before SPMC
entry and the saving of the SWD SIMD context after returning from the
SPMC when SPMD_SPM_AT_SEL2 is enabled. This ensures the preservation of
the NWD SIMD context.

Change-Id: I16a3e698e61da7019b3a670475e542d1690a5dd9
Signed-off-by: Rakshit Goyal <rakshit.goyal@arm.com>
2025-02-13 08:48:44 +00:00
Bipin Ravi
c37c35d654 Merge changes from topic "gr/errata_mpidr" into integration
* changes:
  fix(cpus): workaround for Cortex-X925 erratum 2963999
  fix(cpus): workaround for Neoverse-V3 erratum 2970647
  fix(cpus): workaround for Cortex-X4 erratum 2957258
2025-02-12 18:58:20 +01:00
Lauren Wehrmeister
6db9aac6c3 Merge changes from topic "mb/drtm" into integration
* changes:
  fix(drtm): fix DLME data size check
  fix(drtm): sort the address-map in ascending order
  feat(libc): import qsort implementation
2025-02-12 18:24:44 +01:00
Govindraj Raja
a58d99ec67 Merge "feat(mt8196): disable debug flag in APU driver" into integration 2025-02-12 17:13:08 +01:00
Manish V Badarkhe
d0a0d61e5b Merge changes I32bd0c71,I167e7398 into integration
* changes:
  fix(arm): don't race on the build directory
  fix(armada): don't race on the UART_IMAGE
2025-02-12 16:25:49 +01:00
Govindraj Raja
29bda258d5 fix(cpus): workaround for Cortex-X925 erratum 2963999
Cortex-X925 erratum 2963999 that applies to r0p0 and is fixed in
r0p1.

In EL3, reads of MPIDR_EL1 and MIDR_EL1 might incorrectly virtualize
which register to return when reading the value of
MPIDR_EL1/VMPIDR_EL2 and MIDR_EL1/VPIDR_EL2, respectively.

The workaround is to do an ISB prior to an MRS read to either
MPIDR_EL1 and MIDR_EL1.

SDEN documentation:
https://developer.arm.com/documentation/109180/latest/

Change-Id: I447fd359ea32e1d274e1245886e1de57d14f082c
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2025-02-12 09:25:06 -06:00
Govindraj Raja
5f32fd2145 fix(cpus): workaround for Neoverse-V3 erratum 2970647
Neoverse V3 erratum 2970647 that applies to r0p0 and is fixed in r0p1.

In EL3, reads of MPIDR_EL1 and MIDR_EL1 might incorrectly virtualize
which register to return when reading the value of
MPIDR_EL1/VMPIDR_EL2 and MIDR_EL1/VPIDR_EL2, respectively.

The workaround is to do an ISB prior to an MRS read to either
MPIDR_EL1 and MIDR_EL1.

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

Change-Id: Iedf7d799451f0be58a5da1f93f7f5b6940f2bb35
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2025-02-12 09:25:06 -06:00
Govindraj Raja
09c1edb84b fix(cpus): workaround for Cortex-X4 erratum 2957258
Cortex-X4 erratum 2957258 that applies to r0p0, r0p1 and is fixed in
r0p2.

In EL3, reads of MPIDR_EL1 and MIDR_EL1 might incorrectly virtualize
which register to return when reading the value of
MPIDR_EL1/VMPIDR_EL2 and MIDR_EL1/VPIDR_EL2, respectively.

The workaround is to do an ISB prior to an MRS read to either
MPIDR_EL1 and MIDR_EL1.

SDEN documentation:
https://developer.arm.com/documentation/109148/latest/

Change-Id: I2d8e7f4ce19ca2e1d87527c31e7778d81aff0279
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2025-02-12 09:25:06 -06:00
Manish V Badarkhe
243fba1f18 Merge "docs(console): updated console docs" into integration 2025-02-12 15:33:26 +01:00
Jens Wiklander
6d7f1d4945 feat(rockchip): update uart baudrate for rk3399
Set the UART baudrate to 1500000 since that is what the ROM code and
other components use. This reverts the change of baudrate in the commit
0c05748bde ("rockchip: fixes for the required") and enables logging
from BL31 and OP-TEE during boot and after the kernel has booted.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Change-Id: I5b5db25b069f3676ebb9dba2fa778601e05f1334
2025-02-12 11:22:45 +01:00
Salman Nabi
31edc20dc4 docs(console): updated console docs
Add documentation for the console framework on how to go about
instantiating a new console and how to use these consoles in TF-A.
This includes BOOT, RUNTIME and CRASH consoles.

Change-Id: I746d38f69f1b035d2e85d2589646e7fd67cb9cc3
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
2025-02-12 10:18:57 +00:00
Yann Gautier
71348d392d Merge "chore(dependabot): further refine Dependabot configuration" into integration 2025-02-12 11:17:34 +01:00
Soby Mathew
e13622312e Merge changes from topic "memory_bank" into integration
* changes:
  fix(qemu): statically allocate bitlocks array
  feat(qemu): update for renamed struct memory_bank
  feat(fvp): increase GPT PPS to 1TB
  feat(gpt): statically allocate bitlocks array
  chore(gpt): define PPS in platform header files
  feat(fvp): allocate L0 GPT at the top of SRAM
  feat(fvp): change size of PCIe memory region 2
  feat(rmm): add PCIe IO info to Boot manifest
  feat(fvp): define single Root region
2025-02-12 10:49:42 +01:00
Yann Gautier
91c7a952be refactor(rse)!: remove rse_comms_init
The function to use is now rse_mbx_init(), that does the same if
using MHU.

Change-Id: I712712d7d1bcd8c96d26951e176b877afb65209d
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2025-02-12 10:11:49 +01:00
Yann Gautier
08963618c7 refactor(arm): switch to rse_mbx_init
The rse_comms_init() function will be removed. The new function to use
is rse_mbx_init() for the MHU mailbox initialization.

Change-Id: I1932500ef71b6e895f0ee164ee9c2b58becf4409
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2025-02-12 10:11:49 +01:00
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
Gavin Liu
31137e1b15 feat(mt8196): disable debug flag in APU driver
Disable the debug flag from the driver to reduce debugging messages.

Change-Id: I9444f64acbf684debab56d8226b14c6c01200ea4
Signed-off-by: Gavin Liu <gavin.liu@mediatek.com>
2025-02-12 10:48:35 +08:00
Boyan Karatotev
9855568cc5 fix(arm): don't race on the build directory
Wait for it to have been created. This is the same issue as
commit db69d11829.

Change-Id: I32bd0c713e2837563d32131fb0beddb5533c0792
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2025-02-11 17:05:06 +00:00
Boyan Karatotev
3395bd12bc fix(armada): don't race on the UART_IMAGE
UART_IMAGE is not set when WTP isn't. The error rules will then provide
a recipe for $(BUILD_PLAT). When building with a lot of cores (64) this
rule might be called before the directory is made, causing a build
failure.

Hoist the definition so that the depended path is correct.

Change-Id: I167e7398e576e667d0c5c1fc0f07ab8c8ef939a8
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2025-02-11 16:28:00 +00: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
Jean-Philippe Brucker
a32a77f9c7 fix(qemu): statically allocate bitlocks array
gpt_runtime_init() now takes the bitlock array's address and size as
argument. Rather than reserving space at the end of the L0 GPT for
storing bitlocks, allocate a static array and pass its address to
gpt_runtime_init(). This frees up a little bit of space formerly
reserved for alignment of the GPT.

Change-Id: I48a1a2bc230f64e13e3ed08b18ebdc2d387d77d0
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
2025-02-11 15:12:27 +00:00
Jens Wiklander
991f5360b6 feat(qemu): update for renamed struct memory_bank
The struct ns_dram_bank has been renamed to struct memory_bank, so
update plat/qemu accordingly.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Change-Id: If5ed92edd132c977009a7371ec53eca0ee35ef00
2025-02-11 15:10:49 +00:00
AlexeiFedorov
aeec55c876 feat(fvp): increase GPT PPS to 1TB
- Increase PPS for FVP from 64GB to 1TB.
- GPT L0 table for 1TB PPS requires 8KB memory.
- Set FVP_TRUSTED_SRAM_SIZE to 384 with ENABLE_RME=1
  option.
- Add 256MB of PCIe memory region 1 and 3GB of
  PCIe memory region 2 to FVP PAS regions array.

Change-Id: Icadd528576f53c55b5d461ff4dcd357429ba622a
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
2025-02-11 15:10:49 +00:00
AlexeiFedorov
b0f1c84035 feat(gpt): statically allocate bitlocks array
Statically allocate 'gpt_bitlock' array of fine-grained
'bitlock_t' data structures in arm_bl31_setup.c.
The amount of memory needed for this array is controlled
by 'RME_GPT_BITLOCK_BLOCK' build option and 'PLAT_ARM_PPS'
macro defined in platform_def.h which specifies the size
of protected physical address space in bytes.
'PLAT_ARM_PPS' takes values from 4GB to 4PB supported by
Arm architecture.

Change-Id: Icf620b5039e45df6828d58fca089cad83b0bc669
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
2025-02-11 15:10:49 +00:00
AlexeiFedorov
ac07f3ab6e chore(gpt): define PPS in platform header files
Define protected physical address size in bytes
PLAT_ARM_PPS macro for FVP and RDV3 in platform_def.h
files.

Change-Id: I7f6529dfbb8df864091fbefc08131a0e6d689eb6
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
2025-02-11 15:10:49 +00:00
AlexeiFedorov
7a4a07078b feat(fvp): allocate L0 GPT at the top of SRAM
This patch allocates level 0 GPT at the top of SRAM
for FVP. This helps to meet L0 GPT alignment requirements
and prevent the occurrence of possible unused gaps in SRAM.
Load addresses for FVP TB_FW, SOC_FW and TOS_FW DTBs are
defined in fvp_fw_config.dts via ARM_BL_RAM_BASE macro.

Change-Id: Iaa52e302373779d9fdbaf4e1ba40c10aa8d1f8bd
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
2025-02-11 15:10:49 +00:00
AlexeiFedorov
2e55a3d74d feat(fvp): change size of PCIe memory region 2
Change size of PCIe memory region 2 from 256GB
to 3GB to fit in 1TB of GPT PPS.

Change-Id: Ic769bb784dd17d390b54ccef53b7788334373cb4
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
2025-02-11 15:10:49 +00:00
AlexeiFedorov
bef44f60ed feat(rmm): add PCIe IO info to Boot manifest
- Add PCIe and SMMUv3 related information to DTS for
  configurations with ENABLE_RME=1.
- Add entries for PCIe IO memory regions to Boot manifest
- Update RMMD_MANIFEST_VERSION_MINOR from 3 to 4.
- Read PCIe related information from DTB and write it to
  Boot manifest.
- Rename structures that used to describe DRAM layout
  and now describe both DRAM and PCIe IO memory regions:
  - ns_dram_bank -> memory_bank
  - ns_dram_info -> memory_info.

Change-Id: Ib75d1af86076f724f5c330074e231f1c2ba8e21d
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
2025-02-11 15:10:49 +00:00
AlexeiFedorov
665a8fdf3a feat(fvp): define single Root region
For FVP model define single Root PAS which
includes EL3 DRAM data, L1 GPTs and SCP TZC.
This allows to decrease the number of PAS
regions passed to GPT library and use GPT
mapping with Contiguous descriptor of
larger block size.

Change-Id: I70f6babaebc14e5e0bce033783ec423c8a26c542
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
2025-02-11 15:10:49 +00: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
Chris Kay
d235708c0e chore(dependabot): further refine Dependabot configuration
The current Dependabot configuration results in several breaking changes
to `package.json` and `pyproject.toml` files. Until we can get around
bringing all of our tooling up to date with their latest dependencies,
just ask Dependabot to limit its changes to minor updates in the
lockfiles.

Change-Id: I8a161c6373a24ae9b754eab47f04c3c3e85c449c
Signed-off-by: Chris Kay <chris.kay@arm.com>
2025-02-10 15:21:23 +00:00
Manish V Badarkhe
28e8f9d933 fix(drtm): fix DLME data size check
dlme_data_min_size is currently defined in pages but is being compared
against byte sizes in the code. This patch corrects this issue.

Change-Id: Ib250ef6efedf321706624dfca263e8042a25f6d1
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2025-02-10 15:21:00 +00:00
Manish V Badarkhe
7cf3784814 fix(drtm): sort the address-map in ascending order
As per the specification the address map region in the
DLME data must be sorted.

Change-Id: Ibf39dad33ef7ce739d6ec8632198df55a4e8a1c3
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2025-02-10 15:21:00 +00:00
Manish V Badarkhe
277713e0ae feat(libc): import qsort implementation
Import qsort implementation from FreeBSD[1] to libc.

[1]: https://cgit.freebsd.org/src/tree/lib/libc/stdlib/qsort.c

Change-Id: Ia0d8e2d1c40c679844c0746db1b669cda672a482
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2025-02-10 15:21:00 +00: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