Commit graph

14661 commits

Author SHA1 Message Date
Manish Pandey
23fc05a33d Merge "docs(context-mgmt): add documentation for context management library" into integration 2024-05-10 12:05:07 +02:00
Manish Pandey
b38b37ba06 Merge changes from topic "ar/pmuSaveRestore" into integration
* changes:
  feat(tc): add save/restore DSU PMU register support
  feat(dsu): save/restore DSU PMU register
  feat(plat): add platform API that gets cluster ID
2024-05-10 11:46:42 +02:00
Manish Pandey
73360b4308 Merge "chore(compiler-rt): update compiler-rt source files" into integration 2024-05-10 11:26:59 +02:00
Manish Pandey
3a965bb372 chore(compiler-rt): update compiler-rt source files
Update the compiler-rt source files to the tip of llvm-project [1]
on 9th May 2024, sha 673cfcd03b7b938b422fee07d8ca4a127d480b1f

[1] https://github.com/llvm/llvm-project

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I19f2b8ea6676d365780783f902003b0e95f0f606
2024-05-10 11:24:49 +02:00
Olivier Deprez
332b62e044 Merge "feat(cpus): support to update External LLC presence in Neoverse N3" into integration 2024-05-10 07:55:59 +02:00
Olivier Deprez
88d48bc7fa Merge "fix(smc): correctly find pmf version" into integration 2024-05-10 07:54:23 +02:00
Manish Pandey
421f3e3e9e Merge "feat(cpus): support to update External LLC presence in Neoverse V2" into integration 2024-05-09 22:05:07 +02:00
Manish Pandey
32e5979a44 Merge changes Ia6611e0c,Ic1ea4d59 into integration
* changes:
  build: remove experimental mark for PSA FWU support
  build: mark DICE_PROTECTION_ENVIRONMENT as an experimental feature
2024-05-09 22:03:34 +02:00
Lauren Wehrmeister
b692987ccb Merge "feat(mbedtls): update config for 3.6.0" into integration 2024-05-09 21:14:07 +02:00
Jimmy Brisson
55aed7d798 feat(mbedtls): update config for 3.6.0
Further, remove reliance of mbedtls_md_psa_alg_from_type on
the actual values of the PSA_ALG_... defines.

And work around a prior bug that would try to import a
SubjectPublicKeyInfo into a PSA key. Instead, we import the
SubjectPublicKey itself.

Change-Id: Ib345b0bd4f2994f366629ed162d18814fd05aa2b
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
2024-05-09 18:44:38 +01:00
Arvind Ram Prakash
b87d7ab13f feat(tc): add save/restore DSU PMU register support
This patch adds support for preserving DSU PMU registers
over a power cycle in TC platform.

These PMU registers need to be manually saved/restored
because they are part of cluster power domain and OS
doesn't know when DSU is powered OFF.

Change-Id: Ife9573f205d99d092039cb95674e7434bb5f9239
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
2024-05-09 10:20:58 -05:00
Arvind Ram Prakash
f99a69c386 feat(dsu): save/restore DSU PMU register
Adds driver support to preserve DSU PMU register values over a DSU
power cycle. This driver needs to be enabled by the platforms that
support DSU and also need it's PMU registers to be preserved

Change-Id: I7fc68a3d7d99ee369379aa5cd114fffc763fc0d2
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
2024-05-09 10:20:32 -05:00
Arvind Ram Prakash
e6ae019a84 feat(plat): add platform API that gets cluster ID
This patch adds an API(plat_cluster_id_by_mpidr)
that retrieves the cluster ID by looking at
the MPIDR_EL1 for platforms that have ARM_PLAT_MT set

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I0266f2e49a3114d169a7708d7ddbd4f6229a7a41
2024-05-09 10:00:16 -05:00
Manish Pandey
bbbc32c904 Merge "refactor(arm): remove console switch from platform" into integration 2024-05-09 16:36:31 +02:00
Manish V Badarkhe
91dcf7d176 build: remove experimental mark for PSA FWU support
The PSA FWU support is significantly matured in terms of
its design, threat model documentation, and implementation
as well as its adherence to the latest PSA FWU specifications.
Consequently, the experimental mark for this feature has been
removed.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: Ia6611e0c71485413b0da885f41ac59c93038e480
2024-05-09 14:42:18 +02:00
Manish V Badarkhe
82222db809 build: mark DICE_PROTECTION_ENVIRONMENT as an experimental feature
The DICE_PROTECTION_ENVIRONMENT support has been marked as experimental
since it has not incorporated into the threat model.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: Ic1ea4d59fd8a3fde7ce0404488a56e9d11bc1b85
2024-05-09 14:42:06 +02:00
Manish Pandey
5593ec1ae2 refactor(arm): remove console switch from platform
With commit af3e8e63b switching from Boot console to runtime console is
consolidated and been moved to just before exiting bl31 and removed from
platform runtime setup hooks.

For Arm platform's runtime hook has not removed switching of console
causing runtime console to be used for Runtime instrumentation logs
which is just before bl31 exit. Causing a CI sript fail as it expects
the logs on boot console.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ia3728d17635f993911099f9d6a6938e55f45de42
2024-05-09 14:26:03 +02:00
Joanna Farley
f1464ceaf9 Merge changes I0e7650c0,I33acead9 into integration
* changes:
  fix(xilinx): follow MISRA-C standards for condition check
  fix(zynqmp): resolve null pointer dereferencing
2024-05-09 09:18:21 +02:00
Govindraj Raja
62865b4ee4 fix(smc): correctly find pmf version
Commit@f7679d437d5f27a3168f017db8d42bc561ac0c59
PMF is moved under vendor specific EL3 range, part of this
we have introduced each sub-service have an version scheme[1].

- Current PMF is not handling correctly identifying all FID's
  under it so handle this correctly.
- Minor refactor to use existing macro GET_SMC_NUM rather than manual
  parsing to find the SMC number.

[1]:
https://trustedfirmware-a.readthedocs.io/en/latest/components/ven-el3-service.html

Change-Id: I7a4c8936e42d4a579f0243fa3d06015540caca37
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-05-08 20:36:04 -05:00
Younghyun Park
6fbc98b15d feat(cpus): support to update External LLC presence in Neoverse N3
The CPUECTLR_EL1.EXTLLC bit indicates that an external last level
cache(LLC) is present in the system. The default value is internal LLC.
Some systems which may have External LLC can enable the External LLC
presece with the build option 'NEOVERSE_Nx_EXTERNAL_LLC'.

Change-Id: I2567283a55c0d6e2f9fd986b7dbab91c7a815d3d
Signed-off-by: Younghyun Park <younghyunpark@google.com>
2024-05-08 17:22:50 -07:00
Manish Pandey
a97e1f9747 Merge changes from topic "early_console" into integration
* changes:
  feat(stm32mp2): use early traces
  feat(st-bsec): use early traces
  refactor(st): replace STM32MP_EARLY_CONSOLE with EARLY_CONSOLE
  feat(console): introduce EARLY_CONSOLE
  feat(bl32): create an sp_min_setup function
2024-05-08 23:12:11 +02:00
Manish Pandey
10327628ca Merge "feat(stm32mp2): add ddr-fw parameter for fiptool" into integration 2024-05-08 23:08:44 +02:00
Manish Pandey
72ac981044 Merge changes from topic "css_refactor_arm" into integration
* changes:
  refactor(console): consolidate console runtime switch
  refactor(synquacer): console runtime switch on bl31 exit
  refactor(nxp): console runtime switch on bl31 exit
  refactor(nvidia): console runtime switch on bl31 exit
  refactor(hisilicon): console runtime switch on bl31 exit
  refactor(xilinx): console runtime switch on bl31 exit
  refactor(mediatek): console runtime switch on bl31 exit
  refactor(armada): console runtime switch on bl31 exit
  refactor(imx): console runtime switch on bl31 exit
  refactor(brcm): console runtime switch on bl31 exit
2024-05-08 22:25:08 +02:00
Manish V Badarkhe
69c4bf9ae3 Merge changes from topic "tc_refactor_dt_binding" into integration
* changes:
  refactor(tc): move SCMI nodes into the 'firmware' node
  refactor(tc): move MHUv2 property to tc2.dts
  refactor(tc): drop the 'mhu-protocol' property in DT binding
  refactor(tc): append properties in DT bindings
  refactor(tc): move SCMI clock DT binding into tc-base.dtsi
  refactor(tc): introduce a new file tc-fpga.dtsi
  refactor(tc): move out platform specific DT binding from tc-base.dtsi
  refactor(tc): move out platform specific code from tc_vers.dtsi
  refactor(tc): add platform specific DT files
  refactor(tc): rename 'tc_fvp.dtsi' to 'tc-fvp.dtsi'
  refactor(tc): introduce a new macro ADDRESSIFY()
2024-05-08 20:19:36 +02:00
Manish Pandey
4bd1e7bdc6 Merge changes from topic "add_s32g274ardb2_support" into integration
* changes:
  feat(s32g274a): enable BL31 stage
  feat(s32g274a): add S32G274ARDB2 board support
  feat(nxp-drivers): add Linflex driver
2024-05-08 17:16:50 +02:00
Salman Nabi
af3e8e63b4 refactor(console): consolidate console runtime switch
Refactor console_flush() and console_switch_state(CONSOLE_FLAG_RUNTIME)
to bl31_main(). This has been done per the recommendation in TF-A
mailing list. These calls need to be the last calls, after any runtime
initialization has been done, before BL31 exits.

All platforms that override the generic implementation of
bl31_plat_runtime_setup() have been refactored. The console_flush()
and console_switch_state() calls have been removed as they become
part of bl31_main() function.

Any platform that don't need to make any change to the generic (weak)
implementation of bl31_plat_runtime_setup() don't need to override it
in their platforms.

Change-Id: I6d04d6daa9353daeaa7e3df9e9adf6f322a917b8
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
2024-05-08 15:50:58 +02:00
Salman Nabi
92752355f5 refactor(synquacer): console runtime switch on bl31 exit
TF-A plans to move the console_flush() and
console_switch_state(CONOSLE_FLAG_RUNTIME) calls to bl31_main() just
before BL31 exits.

For now we are mimicking the generic implementation by calling flush
and changing the console state to runtime at the end of
bl31_plat_runtime_setup() for each platform. This is so that each
platform can test it prior to moving flush and switch to bl31_main().

This patch affects the synquacer SoC of the socionext platform.

Change-Id: I85a251e3d9732c5fb5010c3c8bb7323c4f57fa96
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
2024-05-08 15:50:58 +02:00
Salman Nabi
3e6fb87225 refactor(nxp): console runtime switch on bl31 exit
TF-A plans to move the console_flush() and
console_switch_state(CONOSLE_FLAG_RUNTIME) calls to bl31_main() just
before BL31 exits.

For now we are mimicking the generic implementation by calling flush
and changing the console state to runtime at the end of
bl31_plat_runtime_setup() for each platform. This is so that each
platform can test it prior to moving flush and switch to bl31_main().

This patch affects the nxp platform only.

Change-Id: Ic55334a4a69b57f3c18799da12f4f521ce9de423
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
2024-05-08 15:50:58 +02:00
Salman Nabi
c1fd8f9d7b refactor(nvidia): console runtime switch on bl31 exit
TF-A plans to move the console_flush() and
console_switch_state(CONOSLE_FLAG_RUNTIME) calls to bl31_main() just
before BL31 exits.

For now we are mimicking the generic implementation by calling flush
and changing the console state to runtime at the end of
bl31_plat_runtime_setup() for each platform. This is so that each
platform can test it prior to moving flush and switch to bl31_main().

This patch affects Nvidia platform only.

Change-Id: I78c148f50e8ee881e1816cab6eeea3765dc469e5
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
2024-05-08 15:50:58 +02:00
Salman Nabi
d51a63260f refactor(hisilicon): console runtime switch on bl31 exit
TF-A plans to move the console_flush() and
console_switch_state(CONOSLE_FLAG_RUNTIME) calls to bl31_main() just
before BL31 exits.

For now we are mimicking the generic implementation by calling flush
and changing the console state to runtime at the end of
bl31_plat_runtime_setup() for each platform. This is so that each
platform can test it prior to moving flush and switch to bl31_main().

This patch affects the Hisilicon SoCs (poplar, hikey, hikey960).

Change-Id: I0cbb0644377f663e880310362abb4308e24f0cef
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
2024-05-08 15:50:58 +02:00
Salman Nabi
48932c3c27 refactor(xilinx): console runtime switch on bl31 exit
Flush the FIFO before switching to runtime. This is so that there are
no lingering chars in the FIFO when we move to the runtime console.

TF-A plans to refactor the console_Switch_state(CONSOLE_FLAG_RUNTIME)
and console_flush() calls and make them the last calls in bl31_main()
(before BL31 exits). Until then they are being left as the last calls
in bl31_plat_runtime_setup() for testing before refactoring.

This patch affects Xilinx SoCs only.

Change-Id: Iea4cf920934bbde4312f40c8c7b3e0f56a316e86
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
2024-05-08 15:50:58 +02:00
Salman Nabi
9edf08b177 refactor(mediatek): console runtime switch on bl31 exit
Flush the FIFO before switching to runtime. This is so that there are
no lingering chars in the FIFO when we move to the runtime console.

TF-A plans to refactor the console_Switch_state(CONSOLE_FLAG_RUNTIME)
and console_flush() calls and make them the last calls in bl31_main()
(before BL31 exits). Until then they are being left as the last calls
in bl31_plat_runtime_setup() for testing before refactoring.

This patch affects the Mediatek platform only.

Change-Id: I83beee28ed856bc9b2f3131aa577be9bfa529028
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
2024-05-08 15:50:58 +02:00
Salman Nabi
88ab2261b3 refactor(armada): console runtime switch on bl31 exit
Flush the FIFO before switching to runtime. This is so that there are
no lingering chars in the FIFO when we move to the runtime console.

TF-A plans to refactor the console_Switch_state(CONSOLE_FLAG_RUNTIME)
and console_flush() calls and make them the last calls in bl31_main()
(before BL31 exits). Until then they are being left as the last calls
in bl31_plat_runtime_setup() for testing before refactoring.

This patch only affects the Armada SoC of Marvell's platform.

Change-Id: I7082fdb8c5507cd1ce5915d67e61e638605982e0
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
2024-05-08 15:50:58 +02:00
Salman Nabi
d3c643c2dc refactor(imx): console runtime switch on bl31 exit
Flush the FIFO before switching to runtime. This is so that there are
no lingering chars in the FIFO when we move to the runtime console.

TF-A plans to refactor the console_Switch_state(CONSOLE_FLAG_RUNTIME)
and console_flush() calls and make them the last calls in bl31_main()
(before BL31 exits). Until then they are being left as the last calls
in bl31_plat_runtime_setup() for testing before refactoring.

This patch affects the Freescale/NXP SoCs imx93, imx8qm and imx8qx.

Change-Id: Iece74579e1d15eeeb8279db0c53d74bce45545bd
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
2024-05-08 15:50:58 +02:00
Salman Nabi
46163ddddb refactor(brcm): console runtime switch on bl31 exit
Flush the FIFO before switching to runtime. This is so that there are
no lingering chars in the FIFO when we move to the runtime console.

TF-A plans to refactor the console_Switch_state(CONSOLE_FLAG_RUNTIME)
and console_flush() calls and make them the last calls in bl31_main()
(before BL31 exits). Until then they are being left as the last calls
in bl31_plat_runtime_setup() for testing before refactoring.

This patch affects the Broadcom platform only.

Change-Id: I693f749bbf56911638b03e069659e86b95b1050e
Signed-off-by: Salman Nabi <salman.nabi@arm.com>
2024-05-08 15:50:58 +02:00
Manish Pandey
2ba0c06c65 Merge "docs(maintainers): remove a maintainer for MediaTek SoCs" into integration 2024-05-08 15:47:39 +02:00
Manish Pandey
dd03806122 Merge changes from topic "fix_psci_osi" into integration
* changes:
  fix(psci): fix parent_idx in psci_validate_state_coordination
  fix(psci): mask the Last in Level nibble in StateId
2024-05-08 15:45:12 +02:00
Ronak Jain
655e62aa5b fix(xilinx): follow MISRA-C standards for condition check
As per the MISRA-C standards, there should be proc == NULL not just
!proc.

Fix the same.

Change-Id: I0e7650c09b045882a0235869d7ef9fca27f96d9a
Signed-off-by: Ronak Jain <ronak.jain@amd.com>
2024-05-08 05:33:46 -07:00
Ronak Jain
20fa9fc823 fix(zynqmp): resolve null pointer dereferencing
The upstream coverity tool has reported the null pointer dereferences
(NULL_RETURNS) warning.

The coverity warning,
Dereferencing a pointer that might be "NULL" "proc" when calling
"pm_client_suspend".

Fix the same by checking the NULL before processing further.

Change-Id: I33acead9250bab0ed24b94aa1c1bdc31e80de771
Signed-off-by: Ronak Jain <ronak.jain@amd.com>
2024-05-08 05:31:31 -07:00
Manish Pandey
2b67ee6d7c Merge "chore: rename hermes to neoverse-n3" into integration 2024-05-08 13:51:47 +02:00
Patrick Delaunay
412d92fdfd fix(psci): fix parent_idx in psci_validate_state_coordination
Update parent_idx support in psci_validate_state_coordination() as
it is done in psci_do_state_coordination(). The modified loop verifies
the targeted state for all the branch up to end_pwrlvl in the topology
for the current cpu.

Fixes: 606b743007 ("feat(psci): add support for OS-initiated mode")
Change-Id: I14420f64a18b543eb4e10a1279f51cc17558c13c
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2024-05-08 10:09:07 +01:00
Jayanth Dodderi Chidanand
0a9c244b05 fix(psci): mask the Last in Level nibble in StateId
In the ARM recommended StateID Encoding, the index for the power
level where the calling core is last to go idle use the last niblle
of the StateId.

Even if this nibble is necessary for OS-initiated mode, it can be
used by caller even when this OSI mode is not used.

In arm_validate_power_state() function, the StateId is compared with
content of arm_pm_idle_states[] build with the arm_make_pwrstate_lvl2
macro, without Last in Level information. So it is safe to mask this
nibble for ARM platform in all the cases, and that avoids issues with
caller with use the same StateId encoding with OSI mode activated or
not (in tftf tests for example, the input(power state) parameter =
(0x40001022) and the associated power state is 0x40000022).

Change-Id: I45e8e2b8f526fb61b94cf134d7d4aa3bac4c215d
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2024-05-08 10:09:07 +01:00
Manish V Badarkhe
7d00932771 Merge "docs(fvp): restructure FVP platform documentation" into integration 2024-05-07 19:25:55 +02:00
Jayanth Dodderi Chidanand
4efd219362 docs(context-mgmt): add documentation for context management library
This patch adds some documentation for the context management library.
It mainly covers the design at a higher level, with more focus on
the cold boot and warm boot entries as well as the operations
involved during context switch. Further it also includes a section
on feature enablement for individual world contexts.

Change-Id: I77005730f4df7f183f56a2c6dd04f6362e813c07
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2024-05-07 17:52:14 +01:00
Manish V Badarkhe
ee9cfaccab Merge changes from topic "makefile-cleanup" into integration
* changes:
  build: improve diagnostics for unrecognized toolchain tools
  build(rzg): separate BL2 and BL31 SREC generation
  build(rcar): separate BL2 and BL31 SREC generation
  build: separate preprocessing from DTB compilation
  build: remove `MAKE_BUILD_STRINGS` function
2024-05-07 18:39:53 +02:00
Govindraj Raja
ba6b69494b chore: rename hermes to neoverse-n3
Rename hermes cpu to Neoverse-N3

Change-Id: I912d4c824c5004a8c1909c68fef77f1f5e202b8a
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-05-07 08:51:27 -05:00
Manish V Badarkhe
531d923bac Merge "fix(tc): enable FEAT_MTE2" into integration 2024-05-07 14:58:18 +02:00
Manish Pandey
2a0ca84f47 Merge changes from topic "sm/feat_detect" into integration
* changes:
  refactor(cpufeat): restore functions in detect_arch_features
  refactor(cpufeat): add macro to simplify is_feat_xx_present
  chore: simplify the macro names in ENABLE_FEAT mechanism
2024-05-07 11:17:02 +02:00
Manish V Badarkhe
15dfbdfcae Merge changes from topic "gr/smccc-updates" into integration
* changes:
  refactor(smccc): refactor vendor-el3 build
  refactor(docs): added versioning to smccc services
  feat((smccc): add version FID for PMF
  refactor(smccc): move pmf to vendor el3 calls
  refactor(smccc): move debugfs to vendor el3 calls
  feat(smccc): add vendor-specific el3 service
  feat(smccc): add vendor specific el3 id
2024-05-07 10:53:19 +02:00
Younghyun Park
6aa5d1b3ab feat(cpus): support to update External LLC presence in Neoverse V2
The CPUECTLR_EL1.EXTLLC bit indicates that an external last level
cache(LLC) is present in the system. The default value is internal LLC.
Some systems which may have External LLC can enable the External LLC
presece with new build option 'NEOVERSE_Vx_EXTERNAL_LLC'.

Change-Id: I740947f1ef78e31626dc5b96f6d6dc6658d0120f
Signed-off-by: Younghyun Park <younghyunpark@google.com>
2024-05-07 07:46:36 +02:00