Commit graph

14763 commits

Author SHA1 Message Date
Yann Gautier
a03dafe516 feat(bl): add plat handler for image loading
In case of load error, platform may need to try another instance, either
from another storage, or from the same storage in case of PSA FWU. On
MTD devices such as NAND, it is required to define backup partitions.
A new function plat_setup_try_img_ops() should be called by platform
code to register handlers (plat_try_images_ops) to manage loading
other images.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
Change-Id: Ideaecaf296c0037a26fb4e6680f33e507111378a
2024-06-13 11:30:29 +02:00
Yann Gautier
2c303e393b refactor(bl)!: remove unused plat_try_next_boot_source
The plat_try_next_boot_source() API is not used by any upstream platform
and not used by platforms that asked for this API. It is then removed.
It will be replaced with a more generic interface in next patch.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I298c7acace8c5efb3c66422d8d9280ecd08e5ade
2024-06-13 10:48:02 +02:00
Manish Pandey
c4b215ff0b Merge changes from topic "dualroot_dtb" into integration
* changes:
  refactor(fvp): add CoT desc dtsi
  feat(arm): add COT_DESC_IN_DTB option for Dualroot
  feat(fvp): add Dualroot CoT in DTB support
  feat(dt-bindings): introduce Dualroot CoT DTB
2024-06-11 14:49:45 +02:00
André Przywara
1e34c3bca2 Merge "fix(allwinner): remove unneeded header inclusion" into integration 2024-06-10 18:41:43 +02:00
Manish V Badarkhe
2941e5b146 Merge changes from topic "mb/refactor-cot" into integration
* changes:
  refactor(juno): add explicit entry for HW_CONFIG in BL2 CoT file
  refactor(auth): remove HW_CONFIG reference from BL1 CoT file
2024-06-10 17:27:25 +02:00
Manish V Badarkhe
59b163157c Merge "refactor(fdts): remove unused nodes from CoT device tree" into integration 2024-06-10 17:26:49 +02:00
Andre Przywara
8bb8f02d44 fix(allwinner): remove unneeded header inclusion
Nothing in sunxi_bl31_setup.c uses any functionality provided by the
fdt_wrappers file, so remove its inclusion from the header list.

Change-Id: I47031a58add2f85e757e75d8578f4e8e21ef65ea
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2024-06-10 15:56:29 +01:00
Madhukar Pappireddy
a681e767aa Merge "fix(imx): disable DRAM retention by default on i.MX8MQ" into integration 2024-06-10 15:42:52 +02:00
Joanna Farley
4328ca595f Merge changes from topic "xlnx_fix_cpu_pwrdwn_handling" into integration
* changes:
  fix(xilinx): handle power down event if SGI not registered
  fix(xilinx): register for idle callback
2024-06-10 09:18:49 +02:00
André Przywara
fe4df8bdae Merge "feat(rockchip): add RK3566/RK3568 Socs support" into integration 2024-06-07 12:55:56 +02:00
shengfei Xu
9fd9f1d024 feat(rockchip): add RK3566/RK3568 Socs support
RK3566/RK3568 is a Quad-core soc and Cortex-a55 inside.
This patch supports the following functions:
1. basic platform setup
2. power up/off cpus
3. suspend/resume cpus
4. suspend/resume system
5. reset system

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I8b98a4d07664de26bd6078f63664cbc3d9c1c68c
2024-06-07 11:59:46 +02:00
Jay Buddhabhatti
c3ffa4c5ba fix(xilinx): handle power down event if SGI not registered
Currently, if SGI is not registered by Linux and power down event from
firmware is received then it's not getting handled in TF-A and core power
down is not happening. Because of that subsystem restart or force power
down without Linux boot is not happening. So, handle power down event in
TF-A if Linux not registered SGI.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: I0c23792daba6ae47004ae99e232c77e17230bcfb
2024-06-07 02:41:00 -07:00
Soby Mathew
85b9401bc0 Merge "fix(gpt): fix RME GPT library bug" into integration 2024-06-07 11:39:27 +02:00
Jay Buddhabhatti
a3b0a3422c fix(xilinx): register for idle callback
Currently, only Linux registering for getting idle callback during
subsystem restart or force power down. Because of that if Linux boot
hang or someone wants to do subsystem restart before Linux boot then
it's not working. So, register for idle callback in TF-A to get idle
callback during subsystem restart or force power down to do ARM
specific steps for proper power down of core.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: If7c01f79be6958678243be844bcfdc50d59b0fb8
2024-06-07 02:38:11 -07:00
Bipin Ravi
c7d5e45d8f Merge changes from topics "ck/tf-a-build-fixes", "ck/tf-a-romlib-build-fixes" into integration
* changes:
  build(romlib): don't timestamp generated wrappers
  build(romlib): de-duplicate ROMLib wrapper sources
  fix(build): fix incorrectly-escaped armlink preprocessor definitions
2024-06-06 23:50:32 +02:00
Madhukar Pappireddy
3967fa5e93 Merge "fix(nuvoton): fix MMU mapping settings" into integration 2024-06-06 15:42:43 +02:00
Joanna Farley
ab4e9c0b7f Merge "feat(xilinx): remove PM_IOCTL and PM_QUERY_DATA APIs" into integration 2024-06-06 14:54:21 +02:00
AlexeiFedorov
6350aea2f1 fix(gpt): fix RME GPT library bug
This patch fixes fill_l1_tbl() function bug
for RME_GPT_MAX_BLOCK build option set to 0
disabling filling L1 tables with Contiguous
descriptors.

Change-Id: I3eedd6c1bb55b7c207bb3630d1ab2fda8f72eb17
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
2024-06-06 13:03:33 +01:00
Ronak Jain
924f8ce2e9 feat(xilinx): remove PM_IOCTL and PM_QUERY_DATA APIs
Today, the PM_IOCTL and PM_QUERY_DATA APIs are there to maintain
backward compatibility. Now, the usage of these APIs on the Linux
side and the firmware side is updated. Hence remove the deprecated
PM_IOCTL and PM_QUERY_DATA EEMI API from the TF-A to make TF-A pass
through.

Note: Only use the newer kernel to access the deprecated features in
this patch. Otherwise, the system may not function correctly.

Change-Id: I23effb7ff62e7f83563c2b422ea64a0289fd880f
Signed-off-by: Ronak Jain <ronak.jain@amd.com>
2024-06-06 01:47:16 -07:00
rutigl
0a1df64117 fix(nuvoton): fix MMU mapping settings
MAP_DEVICE0 for internal (register) space access settings
flag MT_NS was changed to MT_SECURE to enable access
to the TSGEN register, otherwise it brings to MCR violation,
because access to the TSGEN register is locked and enabled
for secure only

Change-Id: Id2fe90d30342706c58064161360d8be6e0d5616b
Signed-off-by: Margarita Glushkin <rutigl@gmail.com>
2024-06-06 09:24:13 +02:00
Manish V Badarkhe
0909b52273 refactor(fdts): remove unused nodes from CoT device tree
Since the CoT device tree is intended solely for BL2, remove the
nodes that are not handled by BL2.

Change-Id: I977eec902f16de59743e97d15148d63934b7b863
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2024-06-05 14:04:00 +01:00
Manish V Badarkhe
3e2aa0d854 refactor(juno): add explicit entry for HW_CONFIG in BL2 CoT file
Add an explicit entry for HW_CONFIG in the BL2 CoT file for the Juno
platform, as the HW_CONFIG node has been removed from the common CoT
file.

Change-Id: I8a1a22dd1023895cfc5730101fad20a80390ce17
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2024-06-05 12:42:40 +01:00
Manish V Badarkhe
7962c1c2c2 refactor(auth): remove HW_CONFIG reference from BL1 CoT file
Remove the 'HW_CONFIG' reference from the BL1 CoT file, as BL1
does not play any role in loading the hw_config image. This
reference was incorrectly added to the BL1 CoT file.

Change-Id: I9c1d9abce65844eaa1f41ab4f98d3c258ab7a8d2
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2024-06-05 10:20:36 +01:00
laurenw-arm
bdc15fe6d4 refactor(fvp): add CoT desc dtsi
Adding CoT descriptor dtsi file to streamline fvp_tb_fw_config DTB file.

Change-Id: I0bbaef764b100ed0e749ec5f0c78a366398b3519
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2024-06-04 14:11:46 -05:00
laurenw-arm
731ac5ea04 feat(arm): add COT_DESC_IN_DTB option for Dualroot
Add support for BL2 to get the Dualroot chain of trust description
through the Firmware Configuration Framework (FCONF). This makes it
possible to export the part of the Dualroot chain of trust enforced by
BL2 in BL2's configuration file (TB_FW_CONFIG DTB file). BL2 will parse
it when setting up the platform.

The feature can be enabled through the COT_DESC_IN_DTB=1 option. The
default behavior (COT_DESC_IN_DTB=0) remains to hard-code the Dualroot
CoT into BL2 images.

Change-Id: I3497b1daf14be09b5ce3a74d39df7551819255c2
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2024-06-04 12:55:32 -05:00
laurenw-arm
0af86f08ce feat(fvp): add Dualroot CoT in DTB support
Adding support for Dualroot CoT in DTB. This makes it possible for BL2
to retrieve its chain of trust description from a configuration file in
DTB format. With this, the CoT description may be updated without
rebuilding BL2 image.

This feature can be enabled by building BL2 with COT_DESC_IN_DTB=1 and
COT=dualroot. The default behavior remains to embed the CoT description
into BL2 image.

Change-Id: I343931b145aa8a53b0a5d4b8aefb273ffb5a9163
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2024-06-04 12:55:32 -05:00
laurenw-arm
703df3a3ef feat(dt-bindings): introduce Dualroot CoT DTB
Add Dualroot CoT DTB, which allows Dualroot platforms to get their chain
of trust description from a configuration file, rather than hard-coding
it into the firmware source code itself.

Change-Id: I03af8f28ba7ad56b883ff5e7961500ffdb8c3957
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2024-06-04 12:55:32 -05:00
Olivier Deprez
416aa42e55 Merge "feat(fvp): fdts: add stdout-path to the Foundation FVPs" into integration 2024-06-04 14:32:33 +02:00
Chris Kay
ae4795261a build(romlib): don't timestamp generated wrappers
The Makefile rule for the libwrappers object files places a dependency
on a timestamp file. This timestamp file is created by the recipe that
generates the libwrappers sources, and was presumably introduced to
indicate to Make that all of the source files are generated
simultaneously by that rule.

Instead, we can use a grouped target rule, which uses `&:` instead of
`:`. This communicates to Make that all of the targets listed are
generated at once.

To demonstrate, the following two Makefile rules differ in their
behaviour:

    a.x b.x c.x: # targets may be updated independently
        ... # generate a.x, b.x and c.x

    a.x b.x c.x &: # all targets are updated at once
        ... # generate a.x, b.x and c.x

While both recipes do generate all three files, only the second rule
communicates this fact to Make. As such, Make can reason that if one of
the files is up to date then all of them are, and avoid re-running the
rule for any generated file that it has not already run it for.

Change-Id: I10b49eb72b5276c7f9bd933900833b03a61cff2f
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-06-04 11:09:02 +00:00
Chris Kay
d9db846766 build(romlib): de-duplicate ROMLib wrapper sources
The `romlib_generator.py` script may generate duplicate wrapper sources,
which is undesirable when using them to generate Makefile rules as Make
will warn about duplicated targets.

This change sorts the wrapper sources returned from this script, which
has the effect of also de-duplicating them.

Change-Id: I109607ef94f77113a48cc0d6e07877efd1971dbc
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-06-04 11:08:53 +00:00
Chris Kay
df52e2600d fix(build): fix incorrectly-escaped armlink preprocessor definitions
Preprocessor definitions that are passed to armlink are currently not
correctly escaped, resulting in the shell trying to parse the
parentheses contained in some of the preprocessor definitions:

```
  LD      build/tegra/t210/release/bl31/bl31.elf
/bin/sh: 1: Syntax error: "(" unexpected
```

This change ensures that these preprocessor definitions are adequately
escaped for the shell.

Change-Id: I9d2c60fa60c0aa00770417a68f900e9fb84b4669
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-06-04 11:06:38 +00:00
Soby Mathew
20307efa5e Merge "docs(gpt): update GPT library documentation" into integration 2024-06-03 15:26:05 +02:00
AlexeiFedorov
c944952bc3 docs(gpt): update GPT library documentation
This patch updates GPT library design documentation
with the changes introduced by patches which add
support for large GPT mappings and configuration of
memory size protected by bitlock.

Change-Id: I1f97fa8f003deb07a5f32b7237c1927581a788c8
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
2024-06-03 12:13:06 +01:00
Manish V Badarkhe
a13449da37 Merge "feat(stm32mp15): remove OP-TEE shared mem" into integration 2024-06-03 09:50:20 +02:00
Manish V Badarkhe
6d5048f025 Merge "feat(tc): add default SLC policy for the gpu" into integration 2024-06-03 09:39:10 +02:00
Manish V Badarkhe
adf19215f9 Merge "feat(tc): support full-HD resolution for the FVP model" into integration 2024-06-03 09:39:01 +02:00
Vincent Stehlé
2faccaba80 feat(fvp): fdts: add stdout-path to the Foundation FVPs
Add an `stdout-path' property into the `chosen' node of the Foundation
FVPs Devicetrees.

This gives a default console to the Linux kernel when "console=" is not
specified on the kernel command line, which is useful when booting with
U-Boot in UEFI for example.

Change-Id: I27d5f7f9416bd42b7401b1a57ae64bfee2524204
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
2024-05-31 11:06:08 +02:00
Lauren Wehrmeister
aff731af1c Merge "chore(errata-abi): minor variable rename" into integration 2024-05-30 18:58:11 +02:00
Govindraj Raja
5dd9068853 chore(errata-abi): minor variable rename
'cpu_partnumber' variable part of 'em_cpu_list' actually contains the
cpu midr value and not the actual part number. The part number is
extracted from midr value in 'non_arm_interconnect_errata' function.

So 'cpu_partnumber' is misleading and the actual value is midr, thus
rename it to 'cpu_midr'.

Change-Id: I4bfe71ce24542d508e2bcf39a1097724d14c4511
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-05-30 10:39:24 -05:00
Manish Pandey
95bf32e77c Merge changes from topic "us_mhuv3" into integration
* changes:
  feat(tc): add MHUv3 addresses between RSS and AP
  feat(tc): specify MHU version based on platform
  feat(tc): bind SCMI over MHUv3 for TC3
  feat(tc): add MHUv3 DT binding for TC3
  feat(tc): add MHUv3 doorbell support on TC3
  refactor(tc): change tc_scmi_plat_info to single structure
2024-05-30 17:10:22 +02:00
Angel Rodriguez Garcia
bebefe0f33 feat(tc): add default SLC policy for the gpu
As per the GPU integration guide, adding the PBHA INT overrides to
influence the GPU allocation policy for the System Level Cache (SLC).

This commit uses SLC policy #23, which is the Arm SLC cache policy
number for GPUs. The cache policy #23 may not be optimal for all
workloads, although it outperforms other policies on the tested data
sets.

Change-Id: I19ddbcf52a2f01af0ab6dfd7cc25b2e438b9014a
Signed-off-by: Angel Rodriguez Garcia <angel.rodriguezgarcia@arm.com>
Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-05-30 14:23:19 +01:00
Manish Pandey
55c7efc494 Merge "refactor(cm): move mpam registers into el2 context" into integration 2024-05-30 13:48:04 +02:00
Joanna Farley
76e2698a08 Merge changes from topic "gr/cpu_ren" into integration
* changes:
  chore: rename Blackhawk to Cortex-X925
  chore: rename Chaberton to Cortex-A725
2024-05-30 08:52:15 +02:00
Govindraj Raja
bbe94cddc4 chore: rename Blackhawk to Cortex-X925
Rename Blackhawk to Cortex-X925.

Change-Id: I51e40a7bc6b8871c53c40d1f341853b1fd7fdf71
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-05-29 21:38:24 +02:00
Ahmad Fatoum
108146ce73 fix(imx): disable DRAM retention by default on i.MX8MQ
Building the default upstream configuration for the imx8mq-evk is no longer
possible: The linker will complain that the TF-A image will no longer
fit On-Chip SRAM.

In order to make the i.MX8MQ Image buildable again, let's make the DRAM
retention feature optional: It was added in v2.9 and it's possible to
boot the systems without it. Users that make space elsewhere and wish to
enable it can use the newly introduced IMX_DRAM_RETENTION parameter to
configure it. The parameter is added to all i.MX8M variants, but only
for i.MX8MQ, we disable it by default, as that's the one that currently
has binary size problems.

Change-Id: I714f8ea96f18154db02390ba500f4a2dc5329ee7
Fixes: dd108c3c1f ("feat(imx8mq): add the dram retention support for imx8mq")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
2024-05-29 21:16:54 +02:00
Madhukar Pappireddy
dafa718bc9 Merge "fix(imx8m): 8mq: enable imx_hab_handler" into integration 2024-05-29 21:09:25 +02:00
Govindraj Raja
16aacab801 chore: rename Chaberton to Cortex-A725
Rename Chaberton to Cortex-A725.

Change-Id: I981b22d3b37f1aa6e25ff1f35aa156fff9c30076
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-05-29 13:48:56 -05:00
Jayanth Dodderi Chidanand
7d930c7e59 refactor(cm): move mpam registers into el2 context
* FEAT_MPAM related EL2 registers are placed explicitly outside
  the EL2 context in the cpu_context_t structure.

* With EL2 registers now coupled with dependent features, this
  patch moves them to the el2_context structure "el2_sysregs_t".

* Further, converting the assembly context-offset entries into a
  c structure. It relies on garbage collection of the linker
  removing unreferenced structures from memory, as well as aiding
  in readability and future maintenance.

Change-Id: Ib784bc8d2fbe35a8a47a569426d8663282ec06aa
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2024-05-29 17:01:51 +01:00
Madhukar Pappireddy
b690d244f2 Merge "fix(s32g274a): avoid overwriting const fields" into integration 2024-05-29 16:16:22 +02:00
Julius Werner
31309da016 Merge "feat(mt8188): update SVP region ID and permission" into integration 2024-05-29 07:37:36 +02:00