Commit graph

14075 commits

Author SHA1 Message Date
Manish V Badarkhe
077d8b39bc docs(threat_model): mark power analysis threats out-of-scope
Exclude the threat of power analysis side-channel attacks
from consideration in the TF-A generic threat model.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I5b245f33609fe8948e473ce4484898db5ff8db4d
2024-02-14 14:18:16 +00:00
Madhukar Pappireddy
00f1ec6b87 Merge changes from topic "revert-ti-dm-workaround" into integration
* changes:
  Revert "fix(ti): do not take system power reference in bl31_platform_setup()"
  refactor(ti): remove ti_sci_init function
  fix(k3): increment while reading trail bytes
2024-02-09 17:09:05 +01:00
Madhukar Pappireddy
e790ba99f6 Merge "refactor(gicv3): introducing is_valid_interrupt, a new helper utility" into integration 2024-02-09 17:07:46 +01:00
Manish V Badarkhe
25f5574479 Merge "feat(fvp): remove left-over RSS usage" into integration 2024-02-09 16:21:49 +01:00
Manish V Badarkhe
a1726fa7ff feat(fvp): remove left-over RSS usage
Remove any residual RSS usage in the FVP platform, complementing the
changes made in commit dea307fd6c.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I9ced272503456361610ec0c7783d270349233926
2024-02-09 16:21:27 +01:00
Bipin Ravi
b06317fab2 Merge "fix(build): properly manage versions in .versionrc.js" into integration 2024-02-09 16:00:31 +01:00
Manish V Badarkhe
573b2b496d Merge "fix(build): move comment for VERSION_PATCH" into integration 2024-02-09 15:56:46 +01:00
Manish V Badarkhe
6e4b29270a Merge "docs(auth): add more information about CoTs" into integration 2024-02-09 14:18:28 +01:00
Sandrine Bailleux
5d9711fec3 docs(auth): add more information about CoTs
Explain that platforms are free to define their own Chain of Trust (CoT)
based on their needs but default ones are provided in TF-A source code:
TBBR, dualroot and CCA.

Give a brief overview of the use case for each of these CoTs.

Simplified diagrams are also provided for the TBBR and dualroot CoTs -
CCA CoT is missing such a diagram right now, it should be provided as a
future improvement.

Also do some cosmetic changes along the way.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: I7c4014d4d12d852b0ae5632ba9c71a9ad266080a
2024-02-09 13:50:30 +01:00
Manish V Badarkhe
52eb17411e Merge "docs(auth): add missing AUTH_PARAM_NV_CTR value" into integration 2024-02-09 10:17:32 +01:00
Yann Gautier
7f74030b89 fix(build): properly manage versions in .versionrc.js
To properly update pyproject.toml & docs/conf.py, we should manage
several digits for version number (the 10 for VERSION_MINOR), and the
VERSION_PATCH.

Change-Id: I612338fd2896f3fe614f23d14f56d58d43318a11
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2024-02-08 19:24:33 +01:00
Yann Gautier
c25d1ccf1e fix(build): move comment for VERSION_PATCH
Having a comment at the end of VERSION_PATCH definition line prevent
the release script to work properly. Move it on the previous line.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I4008ccbccd512edf33f67c645b38937ad1af9777
2024-02-08 18:40:27 +01:00
Manish Pandey
771a07156f Merge changes from topic "ADD_DELAY_IN_POLLING_SCMI" into integration
* changes:
  fix(scmi): induce a delay in monitoring SCMI channel status
  feat(css): initialise generic timer early in the boot
2024-02-08 16:02:56 +01:00
Manish Pandey
b1428d92d9 Merge changes from topic "stm32mp2-usb" into integration
* changes:
  feat(stm32mp2): add STM32MP_USB_PROGRAMMER compilation
  refactor(st): move macros to common folder
  refactor(stm32mp1): remove unused macros
  fix(usb): add missing include
2024-02-08 15:59:54 +01:00
Manish V Badarkhe
e66b04372a Merge changes I0e012f3f,I14ad16e8 into integration
* changes:
  fix(rss): fix bound check during protocol selection
  fix(mhuv2): provide only the usable size of memory
2024-02-08 11:08:21 +01:00
Madhukar Pappireddy
4da4a1a61d Merge changes from topic "od/sme" into integration
* changes:
  fix(fvp): permit enabling SME for SPD=spmd
  feat(spmd): pass SMCCCv1.3 SVE hint to lower EL
2024-02-07 22:45:38 +01:00
Sona Mathew
8d449929e5 refactor(gicv3): introducing is_valid_interrupt, a new helper utility
In gicv3_main.c the function is_sgi_ppi() returns true when its
sgi/ppi or false when the interrupt number matches an spi interrupt.
Introducing a new API is_valid_interrupt() which validates if
an interrupt number matches SGI/PPI or SPI as a valid interrupt,
any other interrupt number is considered invalid and panics.

Change-Id: Idce8f5432a94c8d300b9408cf5b2502c60e13318
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2024-02-07 13:31:20 -06:00
Olivier Deprez
0b0fd0b476 fix(fvp): permit enabling SME for SPD=spmd
Essentially revert [1] to permit specifying SME support along with
SPD=spmd on FVP platform.

[1] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/20764

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Iab15d5a4c966b9f5b265ccde6711765e242abeaa
2024-02-07 17:46:01 +01:00
Olivier Deprez
c925867ec1 feat(spmd): pass SMCCCv1.3 SVE hint to lower EL
A normal world caller can emit an SMC with the SVE hint bit set such
that the callee can perform an optimization by omitting to save/restore
the SVE context. Update the SPMD to pass this information to the SPMC
when set by the caller in the SMC flags parameter.
For now, restrict this behavior to the SPMC living at S-EL2.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Icf46eb8a391dd3ddd2ee6aff8581a2f1c8a1c274
2024-02-07 17:46:01 +01:00
Olivier Deprez
ce19ebd264 Merge changes from topic "ja/spm_rme" into integration
* changes:
  docs: change FVP argument in RME configuration
  feat(fvp): added calls to unprotect/protect memory
2024-02-07 17:21:39 +01:00
Sandrine Bailleux
9198ad5b6d Merge "docs: fix link to TBBR specification" into integration 2024-02-07 08:22:33 +01:00
Lauren Wehrmeister
dfa8b3ba4c Merge "fix(cpus): workaround for Cortex-A715 erratum 2561034" into integration 2024-02-06 22:20:24 +01:00
Vijayenthiran Subramaniam
f754bd4667 fix(rss): fix bound check during protocol selection
Fix the wrong placement of the closing parenthesis in the second
condition check that resulted in the incorrect calculation of the MHU
message size. Also, format the code for readability.

Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
Change-Id: I0e012f3ff00bae2dfc12cdb1c2c636fc6c0a0b55
2024-02-06 17:42:24 +01:00
Sathyam Panda
5cd10848be fix(mhuv2): provide only the usable size of memory
The function mhu_get_max_message_size() for MHUv2 should return only the
available memory for use after considering all the overheads for its own
use.

Signed-off-by: Sathyam Panda <sathyam.panda@arm.com>
Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
Change-Id: I14ad16e8f4b781e396bca6173077513db74157d5
2024-02-06 17:42:16 +01:00
Olivier Deprez
fb7f6a4422 Merge "fix(rockchip): fix documentation in how build bl31 in AARCH64" into integration 2024-02-06 14:27:54 +01:00
Manish V Badarkhe
3d630fa26a Merge changes from topic "jc/psci_spe" into integration
* changes:
  fix(spe): invoke spe_disable during power domain off/suspend
  feat(psci): add psci_do_manage_extensions API
  fix(arm_fpga): halve number of PEs per core
2024-02-06 12:46:16 +01:00
J-Alves
e0afd1471c docs: change FVP argument in RME configuration
In RME documentation use "bp.secure_memory=0" to disable TZC,
and avoid conflicts with SPM in 4-world configuration.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I532bca8ab3bd3e6d4f18b5aa7e848c533e016f39
2024-02-06 11:00:54 +00:00
J-Alves
6873088c2c feat(fvp): added calls to unprotect/protect memory
Added SiP calls to FVP platform to protect/unprotect a
memory range.
These leverage rme features to change the PAS of a given
memory range from non-secure to secure.

The mentioned call is leveraged by the SPMC in the memory
sharing flow, when memory is shared from the normal world
onto the secure world.

More details in the SPM related patches.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: Iaf15d8603a549d247ffb1fc14c16bfb94d0e178a
2024-02-06 10:56:26 +00:00
Bipin Ravi
6a6b282378 fix(cpus): workaround for Cortex-A715 erratum 2561034
Cortex-A715 erratum 2561034 is a Cat B erratum that applies to
revision r1p0 and is fixed in r1p1.

The workaround is to set bit[26] in CPUACTLR2_EL1. Setting this
bit is not expected to have a significant performance impact.

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

Change-Id: I377f250a2994b6ced3ac7d93f947af6ceb690d49
Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
2024-02-05 17:14:21 -06:00
Madhukar Pappireddy
17bef2248d Merge "feat(fvp): delegate FFH RAS handling to SP" into integration 2024-02-05 23:33:50 +01:00
Manish Pandey
c666a929c1 Merge changes from topic "gr/build_refac" into integration
* changes:
  refactor(build): minor updates
  refactor(build): remove enabling feat
  fix(build): march handling with arch-features
  refactor(build): refactor mandatory options
2024-02-05 20:03:46 +01:00
Yann Gautier
2e905c0682 feat(stm32mp2): add STM32MP_USB_PROGRAMMER compilation
Add minimal compilation step when enabling STM32MP_USB_PROGRAMMER flag
on STM32MP2. Add DWL_BUFFER_BASE in platform.mk and the compilation
of the new file plat/st/stm32mp2/stm32mp2_usb_dfu.c (just stubs for
the moment).

Signed-off-by: Pankaj Dev <pankaj.dev@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I8891ff23ddc3d40d7477ada3e49e439dd8af8316
2024-02-05 09:25:02 +01:00
Yann Gautier
9883833c90 refactor(st): move macros to common folder
As these definitions will be the same for STM32MP1 and STM32MP2, move
PLATFORM_MTD_MAX_PAGE_SIZE and DWL_BUFFER_SIZE macro definition to the
file: plat/st/common/include/stm32mp_common.h

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I480669d009d15fec753298f47b136e34fa240132
2024-02-05 09:25:02 +01:00
Yann Gautier
8af83a4483 refactor(stm32mp1): remove unused macros
PLAT_STM32MP_NS_IMAGE_OFFSET and PLAT_EMMC_BOOT_SSBL_OFFSET macros should
have been removed with patch [1].

[1] 981b9dcb87 ("refactor(stm32mp1): remove STM32MP_USE_STM32IMAGE")

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ice98c43c0257041226525199be06134fde8466c5
2024-02-05 09:25:02 +01:00
Yann Gautier
f84f21fa8d fix(usb): add missing include
When trying to compile USB stack for STM32MP2, the following warning
happens:
In file included from plat/st/stm32mp2/stm32mp2_usb_dfu.c:7:
include/drivers/usb_device.h:193:9: error: unknown type name 'bool'
  193 |         bool is_in;

Correct it by adding: #include <stdbool.h>

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: If17e4e269fcdc885e42f5fcad9cfb763829786e4
2024-02-05 09:24:54 +01:00
Manorit Chawdhry
a53d137753 Revert "fix(ti): do not take system power reference in bl31_platform_setup()"
The workaround that we required to get over the timing issue with our
Device Manager is fixed in [0], revert the workaround as it is no longer
required.

[0]: https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/commit?id=9ad862b528112f7bc26d80668fbb9b38521cddf9

This reverts commit 9977948112. It also
adds a check to make this backward compatible.

Change-Id: Icf10f9df9558de1ae7ba6f5f586485111aac4f8d
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2024-02-05 10:45:48 +05:30
Manorit Chawdhry
73d772d87f refactor(ti): remove ti_sci_init function
ti_sci_get_revision handles getting the firmware version and ti_sci_init
is just a wrapper around it with no added benefit.

Refactor the ti_sci_get_revision to give the version information and
remove ti_sci_init wrapper.

Change-Id: I39184af5b00bedc8b9220533f1ddac3b6672d2f1
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2024-02-05 10:45:48 +05:30
Manish Pandey
b55bf2562e Merge "feat(spmd): initialize SCR_EL3.EEL2 bit at RESET" into integration 2024-02-03 11:29:39 +01:00
Jayanth Dodderi Chidanand
777f1f6897 fix(spe): invoke spe_disable during power domain off/suspend
spe_disable function, disables profiling and flushes all the buffers and
hence needs to be called on power-off/suspend path.
It needs to be invoked as SPE feature writes to memory as part of
regular operation and not disabling before exiting coherency
could potentially cause issues.

Currently, this is handled only for the FVP. Other platforms need
to replicate this behaviour and is covered as part of this patch.

Calling it from generic psci library code, before the platform specific
actions to turn off the CPUs, will make it applicable for all the
platforms which have ported the PSCI library.

Change-Id: I90b24c59480357e2ebfa3dfc356c719ca935c13d
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2024-02-02 20:06:28 +00:00
Jayanth Dodderi Chidanand
160e8434ba feat(psci): add psci_do_manage_extensions API
Adding a new API under PSCI library,for managing all the architectural
features, required during power off or suspend cases.

Change-Id: I1659560daa43b9344dd0cc0d9b311129b4e9a9c7
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2024-02-02 20:06:28 +00:00
Andre Przywara
70b9204e6f fix(arm_fpga): halve number of PEs per core
When creating the Arm FPGA platform, we had plenty of memory available,
so assigned a generous four PEs per core for the potential CPU topology.
In reality we barely see implementations with two PEs per core, and
didn't have four at all so far.

With some design changes we now include more data per CPU type, and
since the Arm FPGA build supports many cores (and determines the correct
one at runtime), we run out of memory with certain build options.

Since we don't really need four PEs per core, just halve that number, to
reduce our memory footprint without sacrificing functionality.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Change-Id: Ieb37ccc9f362b10ff0ce038f72efca21512a71cb
2024-02-02 20:06:28 +00:00
Madhukar Pappireddy
d07d4d6337 feat(fvp): delegate FFH RAS handling to SP
This setup helps to mimic an end-to-end RAS handling flow inspired
by real world design with a dedicated RAS secure partition managed
by SPMC.

The detailed steps are documented as comments in the relevant source
files introduced in this patch.

Change-Id: I97737c66649f6e49840fa0bdf2e0af4fb6b08fc7
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2024-02-02 14:04:30 -06:00
Manish Pandey
8815cdaf57 feat(spmd): initialize SCR_EL3.EEL2 bit at RESET
SCR_EL3.EEL2 bit enabled denotes that the system has S-EL2 present and
enabled, Ideally this bit is constant throughout the lifetime and
should not be modified. Currently this bit is initialized in the context
mgmt code where each world copy of the SCR_EL3 register has this bit set
to 1, but for the time duration between the RESET and the first exit to
a lower EL this bit is zero.

Modifying SCR_EL3.EEL2 along with EA bit at RESET does also helps in
mitigating against ERRATA_V2_3099206.

For details on Neoverse V2 errata 3099206, refer the SDEN document
given below.
https://developer.arm.com/documentation/SDEN-2332927/latest

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: If8b2bdbb19bc65391a33dd34cc9824a0203ae4b1
2024-02-02 18:15:21 +00:00
Sandrine Bailleux
e3f9ed852b docs(auth): add missing AUTH_PARAM_NV_CTR value
Section "Describing the authentication method(s)" of the Authentication
Framework documentation shows the authentication parameters types
(auth_param_type_t enum type) but is missing the AUTH_PARAM_NV_CTR
value. Add it.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: I7c9022badfb039bfa9f999ecee40f18b49e6764c
2024-02-02 15:32:34 +01:00
Sandrine Bailleux
4290d34393 docs: fix link to TBBR specification
The former link pointed to a page which displayed the following warning
message:

  We could not find that page in the latest version, so we have taken
  you to the first page instead

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: Icf9277770e38bc5e602b75052c2386301984238d
2024-02-02 15:31:12 +01:00
Govindraj Raja
3dafd960d4 refactor(build): minor updates
Move RME to 9.2 optional features and add minor updates to comments.

Change-Id: I12a4940e82ca5df72af5421ddab43bc6a1628e95
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-02-02 08:10:12 -06:00
Govindraj Raja
0e4daed24e refactor(build): remove enabling feat
All mandatory FEAT_* enabling is done from arch_features.mk.
Remove some old code which would enable some mandatory options based
on arch-features option passed to march appending.

This is now not needed anymore since if we are using correct
ARCH_MAJOR/MINOR the mandatory options will taken care from
arch_features.mk

Change-Id: I8565ac4ebb3ced29835be65ea5b043a08810872f
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-02-02 08:10:12 -06:00
Govindraj Raja
7275ac2af8 fix(build): march handling with arch-features
Currently all march compiler option handling is moved to build
utility in march.mk.

We pass arch-features to build which appends to march options,
so this should be done once we decide march options and moving
it to march.mk file.

Change-Id: Ifaf99af5f371fd28db376a12657ccf4f363295c2
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-02-02 08:10:12 -06:00
Govindraj Raja
2a71f1633c refactor(build): refactor mandatory options
Currently we enable all mandatory options for a current MAJOR.MINOR
number without considering architecturally to what version the current
arch should be compliant with.

For example Arch v9 should be compliant with 8.5 and shouldn't
consider being compliant with 8.9, so refactor FEAT_* handling to
ensure we capture and handle compliance correctly.

So refactor to use a list and add FEAT_* which are only compliant
with a given arch rather than relying on all the FEAT_* from previous
should be enabled for given arch version.

Change-Id: I8b0dd076c168a647de43b8618fbbe607412f7cab
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-02-02 08:09:37 -06:00
Manish Pandey
48c37bee12 Merge "refactor(build): allow mandatory feats disabling" into integration 2024-02-02 14:18:05 +01:00