Commit graph

16247 commits

Author SHA1 Message Date
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
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
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
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