]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
2 years agoMerge "feat(imx8m): make psci common code pie compatible" into integration
Madhukar Pappireddy [Tue, 1 Nov 2022 14:14:16 +0000 (15:14 +0100)]
Merge "feat(imx8m): make psci common code pie compatible" into integration

2 years agoMerge "fix(imx8m): fix dram retention fsp_table access" into integration
Madhukar Pappireddy [Tue, 1 Nov 2022 14:14:10 +0000 (15:14 +0100)]
Merge "fix(imx8m): fix dram retention fsp_table access" into integration

2 years agoMerge "fix(mediatek): switch console to runtime state before leaving BL31" into integ...
Manish Pandey [Tue, 1 Nov 2022 11:44:02 +0000 (12:44 +0100)]
Merge "fix(mediatek): switch console to runtime state before leaving BL31" into integration

2 years agoMerge "build: deprecate Arm rdn1edge and sgi575 FVP platforms" into integration
Manish Pandey [Mon, 31 Oct 2022 10:23:45 +0000 (11:23 +0100)]
Merge "build: deprecate Arm rdn1edge and sgi575 FVP platforms" into integration

2 years agoMerge changes from topic "db/deps" into integration
Manish V Badarkhe [Fri, 28 Oct 2022 13:56:28 +0000 (15:56 +0200)]
Merge changes from topic "db/deps" into integration

* changes:
  feat(compiler-rt): update compiler-rt source files
  fix(deps): add missing aeabi_memcpy.S
  feat(zlib): update zlib source files
  docs(changelog): add zlib and compiler-rt scope
  feat(libfdt): upgrade libfdt source files
  docs(prerequisites): upgrade to Mbed TLS 2.28.1

2 years agoMerge changes from topic "ffa_el3_spmc" into integration
Olivier Deprez [Fri, 28 Oct 2022 08:22:39 +0000 (10:22 +0200)]
Merge changes from topic "ffa_el3_spmc" into integration

* changes:
  docs(spm): add threat model for el3 spmc
  docs(spm): add design documentation

2 years agoMerge "fix(aarch64): make AArch64 FGT feature detection more robust" into integration
Sandrine Bailleux [Fri, 28 Oct 2022 06:15:46 +0000 (08:15 +0200)]
Merge "fix(aarch64): make AArch64 FGT feature detection more robust" into integration

2 years agoMerge changes I7d3a97df,I5935b4bc,I9a325c5b,Ie29bd3a5,Iebb90cf2 into integration
Bipin Ravi [Thu, 27 Oct 2022 17:21:46 +0000 (19:21 +0200)]
Merge changes I7d3a97df,I5935b4bc,I9a325c5b,Ie29bd3a5,Iebb90cf2 into integration

* changes:
  fix(cpus): workaround for Cortex-A710 erratum 2291219
  fix(cpus): workaround for Cortex-X3 erratum 2313909
  fix(cpus): workaround for Neoverse-N2 erratum 2326639
  fix(rpi3): tighten platform pwr_domain_pwr_down_wfi behaviour
  chore: rename Makalu ELP to Cortex-X3

2 years agoMerge "fix(imx8m): update poweroff related SNVS_LPCR bits only" into integration
Madhukar Pappireddy [Thu, 27 Oct 2022 13:24:57 +0000 (15:24 +0200)]
Merge "fix(imx8m): update poweroff related SNVS_LPCR bits only" into integration

2 years agofix(cpus): workaround for Cortex-A710 erratum 2291219
Boyan Karatotev [Mon, 3 Oct 2022 13:21:28 +0000 (14:21 +0100)]
fix(cpus): workaround for Cortex-A710 erratum 2291219

Cortex-A710 erratum 2291219 is a Cat B erratum that applies to revisions
r0p0, r1p0, and r2p0, and is fixed in r2p1. The workaround is to set
CPUACTLR2_EL1[36] to 1 before the power down sequence that sets
CORE_PWRDN_EN. This allows the cpu to retry the power down and prevents
the deadlock. TF-A never clears this bit even if it wakes up from the
wfi in the sequence since it is not expected to do anything but retry to
power down after and the bit is cleared on reset.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN1775101/latest

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I7d3a97dfac0c433c0be386c1f3d2f2e895a3f691

2 years agofix(cpus): workaround for Cortex-X3 erratum 2313909
Boyan Karatotev [Mon, 3 Oct 2022 13:18:28 +0000 (14:18 +0100)]
fix(cpus): workaround for Cortex-X3 erratum 2313909

Cortex-X3 erratum 2313909 is a Cat B erratum that applies to revisions
r0p0 and r1p0, and is fixed in r1p1. The workaround is to set
CPUACTLR2_EL1[36] to 1 before the power down sequence that sets
CORE_PWRDN_EN. This allows the cpu to retry the power down and prevents
the deadlock. TF-A never clears this bit even if it wakes up from the
wfi in the sequence since it is not expected to do anything but retry to
power down after and the bit is cleared on reset.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN2055130/latest

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I5935b4bcd1e6712477c0d6eab2acc96d7964a35d

2 years agofix(cpus): workaround for Neoverse-N2 erratum 2326639
Boyan Karatotev [Mon, 3 Oct 2022 13:07:08 +0000 (14:07 +0100)]
fix(cpus): workaround for Neoverse-N2 erratum 2326639

Neoverse-N2 erratum 2326639 is a Cat B erratum that applies to revision
r0p0 and is fixed in r0p1. The workaround is to set CPUACTLR2_EL1[36] to
1 before the power down sequence that sets CORE_PWRDN_EN. This allows
the cpu to retry the power down and prevents the deadlock. TF-A never
clears this bit even if it wakes up from the wfi in the sequence since
it is not expected to do anything but retry to power down after and the
bit is cleared on reset.

SDEN can be found here:
https://developer.arm.com/documentation/SDEN1982442/latest/

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I9a325c5b9b498798e5efd5c79a4a6d5bed97c619

2 years agofix(rpi3): tighten platform pwr_domain_pwr_down_wfi behaviour
Boyan Karatotev [Wed, 5 Oct 2022 12:41:56 +0000 (13:41 +0100)]
fix(rpi3): tighten platform pwr_domain_pwr_down_wfi behaviour

Platforms which implement pwr_domain_pwr_down_wfi differ substantially
in behaviour. However, different cpus require similar sequences to power
down. This patch tightens the behaviour of these platforms to end on a
wfi loop after performing platform power down. This is required so that
platforms behave more consistently on power down, in cases where the wfi
can fall through.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ie29bd3a5e654780bacb4e07a6d123ac6d2467c1f

2 years agodocs(spm): add threat model for el3 spmc
Shruti Gupta [Tue, 27 Sep 2022 13:21:13 +0000 (14:21 +0100)]
docs(spm): add threat model for el3 spmc

Threat model for EL3 SPMC.
The mitigations are based on the guidance
provided in FF-A v1.1 EAC0 spec.

Signed-off-by: Shruti Gupta <shruti.gupta@arm.com>
Change-Id: I7f4c9370b6eefe6d1a7d1afac27e8b3a7b476072

2 years agodocs(spm): add design documentation
Shruti Gupta [Tue, 20 Sep 2022 08:53:53 +0000 (09:53 +0100)]
docs(spm): add design documentation

Add documentation how to build EL3 SPMC,
briefly describes all FF-A interfaces,
SP boot flow, SP Manifest, Power Management,
Boot Info Protocol, Runtime model and state
transition and Interrupt Handling.

Signed-off-by: Shruti Gupta <shruti.gupta@arm.com>
Change-Id: I630df1d50a4621b344a09e462563eacc90109de4

2 years agochore: rename Makalu ELP to Cortex-X3
Boyan Karatotev [Tue, 25 Oct 2022 10:29:04 +0000 (11:29 +0100)]
chore: rename Makalu ELP to Cortex-X3

The Cortex-X3 cpu port was developed before its public release when it
was known as Makalu ELP. Now that it's released we can use the official
product name.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Iebb90cf2f77330ed848a3d61c5f6928942189c5a

2 years agoMerge "fix(security): optimisations for CVE-2022-23960" into integration
Lauren Wehrmeister [Wed, 26 Oct 2022 22:00:11 +0000 (00:00 +0200)]
Merge "fix(security): optimisations for CVE-2022-23960" into integration

2 years agofix(security): optimisations for CVE-2022-23960
Bipin Ravi [Thu, 13 Oct 2022 22:25:51 +0000 (17:25 -0500)]
fix(security): optimisations for CVE-2022-23960

Optimised the loop workaround for Spectre_BHB mitigation:
1. use of speculation barrier for cores implementing SB instruction.
2. use str/ldr instead of stp/ldp as the loop uses only X2 register.

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I8ac53ea1e42407ad8004c1d59c05f791011f195d

2 years agofix(mediatek): switch console to runtime state before leaving BL31
Rex-BC Chen [Wed, 26 Oct 2022 09:26:05 +0000 (17:26 +0800)]
fix(mediatek): switch console to runtime state before leaving BL31

We should switch console to runtime state. If we don't do this, the
state will keep boot state even we exit from BL31.

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: Id2269ccf2fdc22e0fa088c3c0365836730172233

2 years agoMerge "fix(sme): add missing ISBs" into integration
Manish Pandey [Wed, 26 Oct 2022 12:27:43 +0000 (14:27 +0200)]
Merge "fix(sme): add missing ISBs" into integration

2 years agofix(imx8m): update poweroff related SNVS_LPCR bits only
Shawn Guo [Wed, 26 Oct 2022 08:38:53 +0000 (16:38 +0800)]
fix(imx8m): update poweroff related SNVS_LPCR bits only

Function imx_system_off() writes SNVS_LPCR register to power off the SoC
without bit masking.  This clears other bits like LPWUI_EN and breaks
the function of SoC wake-up using RTC alarm.  Fix it by updating poweroff
related bits only.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Change-Id: If641af4dc1103c67e1a645c03bb36a5f56665aef

2 years agoMerge "fix(gicv3/multichip): fix overflow caused by left shift" into integration
Manish V Badarkhe [Wed, 26 Oct 2022 07:45:24 +0000 (09:45 +0200)]
Merge "fix(gicv3/multichip): fix overflow caused by left shift" into integration

2 years agoMerge "fix(stm32mp13-fdts): correct PLL nodes name" into integration
Madhukar Pappireddy [Mon, 24 Oct 2022 19:41:31 +0000 (21:41 +0200)]
Merge "fix(stm32mp13-fdts): correct PLL nodes name" into integration

2 years agofeat(compiler-rt): update compiler-rt source files
Daniel Boulby [Fri, 21 Oct 2022 19:20:52 +0000 (20:20 +0100)]
feat(compiler-rt): update compiler-rt source files

Update the compiler-rt source files to the tip of the llvm-project [1].
To do this some new header files were pulled in from the freebsd-src
repo [2].

[1] https://github.com/llvm/llvm-project/commit/fae258e
[2] https://github.com/freebsd/freebsd-src/commit/243a0eda

Change-Id: I1a012b1fe04e127d35e208923877c98c5d999d00
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2 years agofix(deps): add missing aeabi_memcpy.S
Daniel Boulby [Fri, 21 Oct 2022 16:38:24 +0000 (17:38 +0100)]
fix(deps): add missing aeabi_memcpy.S

Add missing aeabi_memcpy.S file from llvm compiler-rt library [1]. This
is required for Aarch32 builds with clang.

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

Change-Id: I7fd6ab1e81dd45d24afef49a3eb8fcdcbc5c082f
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2 years agofeat(zlib): update zlib source files
Daniel Boulby [Wed, 5 Oct 2022 10:05:22 +0000 (11:05 +0100)]
feat(zlib): update zlib source files

Upgrade the zlib source files to the ones present in the version 1.2.13
of zlib [1]. Since 1.2.11 the use of Arm crc32 instructions has been
introduced so update the files to make use of this.

[1] https://github.com/madler/zlib/tree/v1.2.13

Change-Id: Ideef78c56f05ae7daec390d00dcaa8f66b18729e
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2 years agodocs(changelog): add zlib and compiler-rt scope
Daniel Boulby [Wed, 5 Oct 2022 10:03:44 +0000 (11:03 +0100)]
docs(changelog): add zlib and compiler-rt scope

Change-Id: Id98ca7762fd17cb793b0ec9119d0b026195cf2c2
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2 years agoMerge "fix(rme): relax RME compiler requirements" into integration
Manish V Badarkhe [Fri, 21 Oct 2022 08:17:52 +0000 (10:17 +0200)]
Merge "fix(rme): relax RME compiler requirements" into integration

2 years agoMerge changes from topic "imx8m-hab-support" into integration
Sandrine Bailleux [Fri, 21 Oct 2022 07:35:32 +0000 (09:35 +0200)]
Merge changes from topic "imx8m-hab-support" into integration

* changes:
  docs(imx8m): update for high assurance boot
  feat(imx8m): add support for high assurance boot
  feat(imx8mp): add hab and map required memory blocks
  feat(imx8mn): add hab and map required memory blocks
  feat(imx8mm): add hab and map required memory blocks

2 years agobuild: deprecate Arm rdn1edge and sgi575 FVP platforms
Manish V Badarkhe [Wed, 19 Oct 2022 08:31:07 +0000 (09:31 +0100)]
build: deprecate Arm rdn1edge and sgi575 FVP platforms

Arm has decided to deprecate the sgi575 and rdn1edge platforms.
The development of software and fast models for these platforms
has been discontinued. rdn1edge platform has been superseded by the
rdn2 platform, which is already supported in TF-A and CI work is
underway for this platform.

Change-Id: If2228fb73549b244c3a5b0e5746617b3f24fe771
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2 years agofeat(imx8m): make psci common code pie compatible
Marco Felsch [Tue, 5 Jul 2022 13:00:44 +0000 (15:00 +0200)]
feat(imx8m): make psci common code pie compatible

Swap the BL31_BASE define with the BL31_START symbol. This is required
for later added PIE support because the symbol location can be relocated
whereas the define can't be relocated. In case of disabled PIE support
BL31_START equals BL31_BASE and so we don't need a ifdef.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Change-Id: Ic1bbf3af5b346898bfcbb207ffc27d9a5bdcaae7

2 years agofix(imx8m): fix dram retention fsp_table access
Marco Felsch [Wed, 21 Sep 2022 15:48:35 +0000 (17:48 +0200)]
fix(imx8m): fix dram retention fsp_table access

The fsp_table access by [i-1] can cause invalid memory access in case of
i=0. This can be the case if no fsp_table is available. Fix this by
adding the idx variable which tracks the correct index.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Change-Id: If2285517eb9fe837f3ad54360307a77a658bf62c

2 years agofix(aarch64): make AArch64 FGT feature detection more robust
Andre Przywara [Fri, 7 Oct 2022 11:19:05 +0000 (12:19 +0100)]
fix(aarch64): make AArch64 FGT feature detection more robust

The ARMv8 ARM says about the values in the ID register scheme:

==== D17.1.3 Principles of the ID scheme for fields in ID registers ===
The ID fields, which are either signed or unsigned, use increasing
numerical values to indicate increases in functionality. Therefore,
if a value of 0x1 indicates the presence of some instructions, then
the value 0x2 will indicate the presence of those instructions plus
some additional instructions or functionality. This means software
can be written in the form:
     if (value >= number) {
         // do something that relies on the value of the feature
     }
=======================================================================

So to check for the presence of a certain architecture feature, we
should not check against a certain specific value, as it's done right
now in several cases.

Relax the test for Fine Grained Trapping (FGT) to just check against
the field being 0 or not.

This fixes TF-A crashing due to an unhandled exception, when running a
Linux kernel on an FVP enabling ARMv8.9 features. The value of
ID_AA64MMFR0_EL1.FGT went from 0b0001 to 0b0010 there.

Change-Id: Ic3f1625a7650306ed388a0660429ca8823c673c2
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agoMerge "fix(cpus): fix cpu version check for Neoverse N2, V1" into integration
Madhukar Pappireddy [Thu, 20 Oct 2022 13:56:57 +0000 (15:56 +0200)]
Merge "fix(cpus): fix cpu version check for Neoverse N2, V1" into integration

2 years agoMerge "fix(cpus): workaround for Cortex-A510 erratum 2666669" into integration
Madhukar Pappireddy [Thu, 20 Oct 2022 13:03:13 +0000 (15:03 +0200)]
Merge "fix(cpus): workaround for Cortex-A510 erratum 2666669" into integration

2 years agoMerge "feat(ethos-n)!: add support for SMMU streams" into integration
Joanna Farley [Thu, 20 Oct 2022 09:04:48 +0000 (11:04 +0200)]
Merge "feat(ethos-n)!: add support for SMMU streams" into integration

2 years agofix(cpus): fix cpu version check for Neoverse N2, V1
Bipin Ravi [Wed, 19 Oct 2022 15:29:16 +0000 (10:29 -0500)]
fix(cpus): fix cpu version check for Neoverse N2, V1

The CPU version check was moved wrongly down in N2 and missing in V1.
The patch fixes the issues.

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: Icb6e5285d6cc97fbe416fe1f0b1ab7afbd8a8809

2 years agodocs(imx8m): update for high assurance boot
Andrey Zhizhikin [Mon, 26 Sep 2022 20:51:47 +0000 (22:51 +0200)]
docs(imx8m): update for high assurance boot

Add a section into documentation listing the support for High Assurance
Boot (HABv4), note on the DRAM mapping, and reference to the external
documentation.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Change-Id: Iaca97f4ac2595e35de2664a880394519f96eca07

2 years agofeat(imx8m): add support for high assurance boot
Andrey Zhizhikin [Mon, 26 Sep 2022 20:25:33 +0000 (22:25 +0200)]
feat(imx8m): add support for high assurance boot

Introduce support for High Assurance Boot (HABv4), which is used to
establish and extend the Root-of-Trust during FW loading at any given
boot stage.

This commit introduces support for HAB ROM Vector Table (RVT) API, which
is normally used by post-ROM code to authenticate additional boot images
(Kernel, FDT, FIT, etc.) that are taking part in the Root-of-Trust.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Change-Id: I780d308369824fa4850844eb9e91768e417166a0

2 years agofeat(imx8mp): add hab and map required memory blocks
Andrey Zhizhikin [Mon, 26 Sep 2022 20:48:56 +0000 (22:48 +0200)]
feat(imx8mp): add hab and map required memory blocks

In order for HAB to perform operations, memory regions has to be mapped
in TF-A, which HAB ROM code would use internally.

Include those memory blocks for i.MX8M+ SoC. Of a special note, the DRAM
block is mapped with complete size available on the platform and uses
MT_RW attributes, this is required to minimize the size of translation
tables and provide a possibility to exchange the execution results
between EL3 and EL1&2, see details in [1].

Link: [1]: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/16880
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Change-Id: I986cdce434d1ec9ea8b3c0d5599edde55b9b30f8

2 years agofeat(imx8mn): add hab and map required memory blocks
Andrey Zhizhikin [Mon, 26 Sep 2022 20:47:12 +0000 (22:47 +0200)]
feat(imx8mn): add hab and map required memory blocks

In order for HAB to perform operations, memory regions has to be mapped
in TF-A, which HAB ROM code would use internally.

Include those memory blocks for i.MX8MN SoC. Of a special note, the DRAM
block is mapped with complete size available on the platform and uses
MT_RW attributes, this is required to minimize the size of translation
tables and provide a possibility to exchange the execution results
between EL3 and EL1&2, see details in [1].

Link: [1]: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/16880
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Change-Id: If7a2b718658db452871e1ae56b71a4983e8ef2fe

2 years agofeat(imx8mm): add hab and map required memory blocks
Andrey Zhizhikin [Mon, 26 Sep 2022 20:41:08 +0000 (22:41 +0200)]
feat(imx8mm): add hab and map required memory blocks

In order for HAB to perform operations, memory regions has to be mapped
in TF-A, which HAB ROM code would use internally.

Include those memory blocks for i.MX8MM SoC. Of a special note, the DRAM
block is mapped with complete size available on the platform and uses
MT_RW attributes, this is required to minimize the size of translation
tables and provide a possibility to exchange the execution results
between EL3 and EL1&2, see details in [1].

Link: [1]: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/16880
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Change-Id: I6a3a3d7105b85c2f4ab6ea6cfbca67c9a325eb11

2 years agofeat(libfdt): upgrade libfdt source files
Daniel Boulby [Fri, 23 Sep 2022 15:22:27 +0000 (16:22 +0100)]
feat(libfdt): upgrade libfdt source files

Update the libfdt source files to the upstream commit e37c256 [1].

[1] https://github.com/dgibson/dtc/commit/e37c256

Change-Id: I00e29b467ff6f8c094f68245232a7cedeaa14aef
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2 years agodocs(prerequisites): upgrade to Mbed TLS 2.28.1
Daniel Boulby [Fri, 23 Sep 2022 08:37:20 +0000 (09:37 +0100)]
docs(prerequisites): upgrade to Mbed TLS 2.28.1

In anticpation of the next Trusted Firmware release update the to newest
2.x Mbed TLS library [1].

Note that the Mbed TLS project published version 3.x some time ago.
However, as this is a major release with API breakages, upgrading to
this one might require some more involved changes in TF-A, which we are
not ready to do. We shall upgrade to Mbed TLS 3.x after the v2.8 release
of TF-A.

[1] https://github.com/Mbed-TLS/mbedtls/tree/v2.28.1

Change-Id: I7594ad062a693d2ecc3b1705e944dce2c3c43bb2
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2 years agoMerge "feat(fvp): build delegated attestation in BL31" into integration
Sandrine Bailleux [Tue, 18 Oct 2022 14:20:05 +0000 (16:20 +0200)]
Merge "feat(fvp): build delegated attestation in BL31" into integration

2 years agoMerge "chore(rpi3): remove redundant code" into integration
André Przywara [Mon, 17 Oct 2022 13:57:40 +0000 (15:57 +0200)]
Merge "chore(rpi3): remove redundant code" into integration

2 years agoMerge "docs(maintainers): add NPU driver owners" into integration
Manish V Badarkhe [Mon, 17 Oct 2022 13:20:19 +0000 (15:20 +0200)]
Merge "docs(maintainers): add NPU driver owners" into integration

2 years agodocs(maintainers): add NPU driver owners
Mikael Olsson [Fri, 14 Oct 2022 09:48:07 +0000 (11:48 +0200)]
docs(maintainers): add NPU driver owners

Code owners have been added for the Arm(R) Ethos(TM)-N NPU driver.

Change-Id: I0bda0d95151cdff5cd3a793c6c0e9ef6a9a5f50b
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
2 years agoMerge "fix(versal_net): Enable a78 errata workarounds" into integration
Joanna Farley [Fri, 14 Oct 2022 17:58:35 +0000 (19:58 +0200)]
Merge "fix(versal_net): Enable a78 errata workarounds" into integration

2 years agofix(versal_net): Enable a78 errata workarounds
Akshay Belsare [Tue, 11 Oct 2022 09:42:02 +0000 (15:12 +0530)]
fix(versal_net): Enable a78 errata workarounds

TF-A is reporting that erratum are missing to be enabled.

Enable the Following errata workaround to Cortex-A78 AE CPU for versal_net
ERRATA_A78_AE_1941500
ERRATA_A78_AE_1951502
ERRATA_A78_AE_2376748
ERRATA_A78_AE_2395408

For further information refer to
https://developer.arm.com/documentation/SDEN1707912/1300/

Signed-off-by: Akshay Belsare <Akshay.Belsare@amd.com>
Change-Id: Ib7fc16e035feab1dfbd88c1f8ce128b057eee86d

2 years agofix(cpus): workaround for Cortex-A510 erratum 2666669
Akram Ahmad [Wed, 21 Sep 2022 12:59:56 +0000 (13:59 +0100)]
fix(cpus): workaround for Cortex-A510 erratum 2666669

Cortex-A510 erratum 2666669 applies to revisions r1p1 and lower,
and is fixed in r1p2. The errata is mitigated by setting
IMP_CPUACTLR_EL1[38] to 1.

SDEN documentation:
https://developer.arm.com/documentation/SDEN1873351/latest
https://developer.arm.com/documentation/SDEN1873361/latest

Signed-off-by: Akram Ahmad <Akram.Ahmad@arm.com>
Change-Id: Ief27e4a155e43e75f05f2710d0c7bd5da2dec43f

2 years agofeat(fvp): build delegated attestation in BL31
Sandrine Bailleux [Wed, 12 Oct 2022 12:46:56 +0000 (14:46 +0200)]
feat(fvp): build delegated attestation in BL31

Right now, the delegated attestation module is not used in TF-A. This
means it's not even getting built and so the CI system cannot detect
build regressions.

Eventually, delegated attestation will be involved in a new runtime
service exposed by BL31 to lower exception levels. We are not there
yet but let's already include it into BL31 image, so we get build
coverage and static analysis on the code. Note that we make sure to
cover both PLAT_RSS_NOT_SUPPORTED=0 and PLAT_RSS_NOT_SUPPORTED=1
configurations.

Delegated attestation is currently made dependent on measured boot
support. This dependency is not at the source code level (attestation
code does not invoke any measured boot interfaces) but it is rather a
logical dependency: attestation without boot measurements is not very
useful...

For now, this is good enough for our purpose but the conditions under
which the attestation code is included might change in the future.

Change-Id: I616715c3dd0418a1bbf1019df3ff9acd8461e705
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2 years agofix(sme): add missing ISBs
Boyan Karatotev [Thu, 13 Oct 2022 12:51:05 +0000 (13:51 +0100)]
fix(sme): add missing ISBs

EL3 is configured to trap accesses to SME registers (via
CPTR_EL3.ESM=0). To allow SME instructions, this needs to be temporarily
disabled before changing system registers. If the PE delays the effects
of writes to system registers then accessing the SME registers will trap
without an isb. This patch adds the isb to restore functionality.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I8ee5ecaec978dde2525631daa682a182ad8f7f04

2 years agoMerge "fix(versal): enable a72 erratum 859971 and 1319367" into integration
Joanna Farley [Thu, 13 Oct 2022 09:15:12 +0000 (11:15 +0200)]
Merge "fix(versal): enable a72 erratum 859971 and 1319367" into integration

2 years agofix(versal): enable a72 erratum 859971 and 1319367
Michal Simek [Fri, 7 Oct 2022 06:15:19 +0000 (08:15 +0200)]
fix(versal): enable a72 erratum 859971 and 1319367

TF-A is reporting that above two erratum are missing to be enabled that's
why enable them by default.

For futher information please refer to
https://developer.arm.com/documentation/epm012079/11/

where
859971 is "Speculative instruction prefetch to Execute-never (XN) memory
could cause deadlock or data integrity issue" and
1319367 is "Speculative AT instruction using out-of-context translation
regime could cause subsequent request to generate an incorrect
translation".

Change-Id: I408706713a169e53db63ac5657751b0b003e646d
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agoMerge "fix(ufs): retry commands on unit attention" into integration
Madhukar Pappireddy [Wed, 12 Oct 2022 13:56:24 +0000 (15:56 +0200)]
Merge "fix(ufs): retry commands on unit attention" into integration

2 years agoMerge "fix(sptool): operators "is/is not" in sp_mk_gen.py" into integration
Manish Pandey [Wed, 12 Oct 2022 11:01:04 +0000 (13:01 +0200)]
Merge "fix(sptool): operators "is/is not" in sp_mk_gen.py" into integration

2 years agoMerge "fix(mt8186): fix EMI_MPU domain setting for DSP" into integration
Olivier Deprez [Wed, 12 Oct 2022 10:02:51 +0000 (12:02 +0200)]
Merge "fix(mt8186): fix EMI_MPU domain setting for DSP" into integration

2 years agoMerge "fix: backtrace stack unwind misses lr adjustment" into integration
Manish Pandey [Wed, 12 Oct 2022 09:32:08 +0000 (11:32 +0200)]
Merge "fix: backtrace stack unwind misses lr adjustment" into integration

2 years agoMerge "fix(rk3399): explicitly define the sys_sleep_flag_sram type" into integration
Olivier Deprez [Wed, 12 Oct 2022 09:30:54 +0000 (11:30 +0200)]
Merge "fix(rk3399): explicitly define the sys_sleep_flag_sram type" into integration

2 years agochore(rpi3): remove redundant code
Boyan Karatotev [Wed, 5 Oct 2022 13:43:54 +0000 (14:43 +0100)]
chore(rpi3): remove redundant code

The pwr_domain_pwr_down_wfi entry is overridden by a newer
implementation. This removes the last reference to
rpi3_pwr_domain_pwr_down_wfi. Remove both as they are not needed

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ie65c40935cd1ed3c673ffdc9aa72064f5ab4032e

2 years agofix(rk3399): explicitly define the sys_sleep_flag_sram type
Scott Parlane [Mon, 5 Sep 2022 22:59:57 +0000 (10:59 +1200)]
fix(rk3399): explicitly define the sys_sleep_flag_sram type

Recent GCC versions now do array-bounds checking which fails for
sys_sleep_flag_sram because the struct is larger than the 8-bytes
size that (void *) is

This variable is only used in one place as the struct,
so it can be defined with the struct type.

Resolves:
plat/rockchip/px30/drivers/pmu/pmu.c: In function 'rockchip_soc_sys_pwr_dm_suspend':
plat/rockchip/px30/drivers/pmu/pmu.c:977:23: error: array subscript 'struct psram_data_t[0]' is partly outside array bounds of 'void[8]' [-Werror=array-bounds]
  977 |         psram_boot_cfg->pm_flag &= ~PM_WARM_BOOT_BIT;

Change-Id: Ifbe42d11d0c7875f6cb23dc0b7ffb3f3f90c55a8
Signed-off-by: Scott Parlane <scott@parlanenz.com>
2 years agoMerge changes from topic "fvp_dts_rework" into integration
Manish V Badarkhe [Tue, 11 Oct 2022 17:33:35 +0000 (19:33 +0200)]
Merge changes from topic "fvp_dts_rework" into integration

* changes:
  fix(fvp_ve): fdts: Fix vexpress,config-bus subnode names
  fix(fvp): fdts: Fix idle-states entry method
  fix(fvp): fdts: fix memtimer subframe addressing
  feat(fvp): fdts: update rtsm_ve DT files from the Linux kernel
  refactor(fvp): fdts: consolidate GICv2 base FVP DT files
  refactor(fvp): fdts: consolidate GICv3 base FVP DT files
  feat(fvp): dts: drop 32-bit .dts files
  refactor(fvp): fdts: merge motherboard .dtsi files
  refactor(fvp_ve): fdts: prepare Cortex-A5 and A7 model DTs
  fix(fvp): fdts: unify and fix PSCI nodes

2 years agofix(gicv3/multichip): fix overflow caused by left shift
Vijayenthiran Subramaniam [Thu, 29 Sep 2022 10:03:50 +0000 (15:33 +0530)]
fix(gicv3/multichip): fix overflow caused by left shift

When spi_id_max is 5119, the expression `(spi_id_max - 4096U + 1U >> 5)`
evaluates to 32 leading to undefined behavior when using it to left
shift 1. Fix this undefined behavior.

Reported-by coverity scan:
https://lists.trustedfirmware.org/archives/list/tf-a@lists.trustedfirmware.org/thread/RMB4U7COL6IONZWEGF2FWXOQ6FPDIT4U/

```
    large_shift: In expression 1 << (spi_id_max - 4096U + 1U >> 5), left
    shifting by more than 31 bits has undefined behavior. The shift
    amount, spi_id_max - 4096U + 1U >> 5, is as much as 32.
```

Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
Change-Id: I5e77a78b81a6d0367875e7ea432a82b6ba0e587c

2 years agoMerge "feat(cpu): add library support for Hunter ELP" into integration
Bipin Ravi [Tue, 11 Oct 2022 15:23:56 +0000 (17:23 +0200)]
Merge "feat(cpu): add library support for Hunter ELP" into integration

2 years agofix(fvp_ve): fdts: Fix vexpress,config-bus subnode names
Andre Przywara [Tue, 23 Aug 2022 09:45:54 +0000 (10:45 +0100)]
fix(fvp_ve): fdts: Fix vexpress,config-bus subnode names

The arm,vexpress,config-bus DT binding restricts the possible (sub)node
names.
Adjust the current node names, to drop the unneeded address specifier,
and make the node names binding compliant.

Change-Id: Ic48c6969268c960ce92c8ec3a756ed1d89e61b08
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agofix(fvp): fdts: Fix idle-states entry method
Andre Przywara [Mon, 22 Aug 2022 14:54:26 +0000 (15:54 +0100)]
fix(fvp): fdts: Fix idle-states entry method

When firmware implements idle states via PSCI, the value of the DT
entry-method property must be "psci", not "arm,psci".

Fix this to make the CPU description binding compliant.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Change-Id: Icd1bf704d177368af9b7aab545f47e580791b8cc

2 years agofix(fvp): fdts: fix memtimer subframe addressing
Andre Przywara [Mon, 22 Aug 2022 14:50:22 +0000 (15:50 +0100)]
fix(fvp): fdts: fix memtimer subframe addressing

The arm,armv7-timer-mem DT binding documentation demands that the
 #size-cells property should be <1> only.

Adjust the value to be <1> and drop the now needless leading 0 in the
frame's reg property. Convert to #address-cell = <1> on the way.
Also adjust the interrupts property to use the proper GIC macros.

Change-Id: Ia2224663b1e6aaa7cf94af777473641de6a840d2
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agofeat(fvp): fdts: update rtsm_ve DT files from the Linux kernel
Andre Przywara [Fri, 19 Aug 2022 15:21:29 +0000 (16:21 +0100)]
feat(fvp): fdts: update rtsm_ve DT files from the Linux kernel

The existing DT files for the base FVP model are having some issues,
that lead to warnings reported by the device tree compiler.

Those (and many other issues around (updated) DT binding compliance)
were fixed in the Linux kernel tree, so let's sync those files back into
TF-A.
We cannot copy the files "as is" for now, since we rely on certain custom
properties to be added (max-pwr-lvl in the PSCI node, SDEI nodes, etc).

Merge in the changed parts of the Linux kernel DT (from Linux v6.0-rc1),
and rework the base file to allow including the motherboard.dtsi
unchanged. This should make any future update less painful.

As this also affects the FVP VE boards (Cortex-A7 and Cortex-A5), since
they share the motherboard include file, fix them up as well.

Change-Id: I4f74d05e5583747f8849e32f246f74aeec7a9c60
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agorefactor(fvp): fdts: consolidate GICv2 base FVP DT files
Andre Przywara [Fri, 19 Aug 2022 10:01:16 +0000 (11:01 +0100)]
refactor(fvp): fdts: consolidate GICv2 base FVP DT files

The GICv2 and GICv3 version of the FVP DT files are unnecessarily split,
as the common part of the peripherals is the same: it's literally just
the interrupt controller node that is different.
Since the GICv3 versions now use a generic DT include file (without any
GIC node), let's reuse that for the GICv2 versions of the FVP as well.
We just add a separate fvp-base-gicv2.dtsi file which describes the
GICv2 interrupt controller. Also shorten the compatible string, since
the GICv2 binding documentation does not allow the current combination.

This allows to remove the mostly redundant nodes from the GICv2 .dts
file.

Change-Id: I9018031bb611fb00ca7dbefc1bff7d40c3f05819
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agorefactor(fvp): fdts: consolidate GICv3 base FVP DT files
Andre Przywara [Fri, 19 Aug 2022 10:00:37 +0000 (11:00 +0100)]
refactor(fvp): fdts: consolidate GICv3 base FVP DT files

The GICv2 and GICv3 version of the FVP DT files are unnecessarily split,
as the common part of the peripherals is the same: it's literally just
the interrupt controller node that is different.
To facilitate a unification, refactor the DT include files to explicitly
include a snippet with just the GICv3 description, and a generic base DT
file for the rest. This generic file can then be reused by the GICv2
versions later.

Since we can only have a /memreserve/ entry *before* any DT nodes, move
that line to each file, to allow including the GIC DT file separately.

Change-Id: I9ff357d3fe0ce46e280c30131aeae97a99631512
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agofeat(fvp): dts: drop 32-bit .dts files
Andre Przywara [Fri, 19 Aug 2022 09:26:00 +0000 (10:26 +0100)]
feat(fvp): dts: drop 32-bit .dts files

Conceptually the DT is a hardware description, as such it's independent
from the instruction set that a DT client uses. So having separate DTs
for aarch32 and aarch64 does not make sense and is not needed.

Probably due to historic reasons (a Linux bug fixed in 2016 with Linux
commit ba6dea4f7ced, in Linux v4.8) the CPU reg property was using a
different size between aarch64 and aarch32, even though the size of it
is solely governed by the parent's #address-cells property.

Consolidate this to be always 2, and always use two cells to describe
the CPU's MPIDR register.

This removes the last difference of the -aarch32 versions of the FVP
DT files, so just remove all of them. The respective versions without
that suffix can now be used with AArch32 DT clients as well.

Also remove the respective part in the documentation.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Change-Id: I45d3a2cbba8e04595a741e1cf41900377952673e

2 years agorefactor(fvp): fdts: merge motherboard .dtsi files
Andre Przywara [Fri, 19 Aug 2022 09:45:17 +0000 (10:45 +0100)]
refactor(fvp): fdts: merge motherboard .dtsi files

For no real reason we were shipping two separate DT include files for the
base FVP motherboard peripherals, one for aarch32, one for aarch64.
There is no difference in the hardware description when using a
different instruction set, and the diff between the two files was about
a missing interrupt map for the 64-bit DT files.

Consolidate the situation by just using a single motherboard .dtsi file,
which relies on an interrupt map by the including files.
Provide that map in the two files where it was missing before, and
change the filenames to let all users include the same file now.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Change-Id: I19b77ecc8da9b4bfbd61d02f910b9ab05dbf92e9

2 years agoMerge "revert(cpus): "Revert workaround for A77 erratum 1800714"" into integration
Bipin Ravi [Tue, 11 Oct 2022 15:01:17 +0000 (17:01 +0200)]
Merge "revert(cpus): "Revert workaround for A77 erratum 1800714"" into integration

2 years agoMerge "fix(psa): add missing semicolon" into integration
Sandrine Bailleux [Tue, 11 Oct 2022 13:46:16 +0000 (15:46 +0200)]
Merge "fix(psa): add missing semicolon" into integration

2 years agorefactor(fvp_ve): fdts: prepare Cortex-A5 and A7 model DTs
Andre Przywara [Thu, 25 Aug 2022 11:59:10 +0000 (12:59 +0100)]
refactor(fvp_ve): fdts: prepare Cortex-A5 and A7 model DTs

The DT files for the Cortex-A5 and Cortex-A7 FVP models include the
shared rtsm_ve-motherboard.dtsi file, which we need to sync with the
upstream Linux version soon.

To prepare for its changed structure there, adjust the top-level
 #address-cells and #size-cells properties to be compatible with the
expectations of the Linux version.
Also extend the interrupt map to cover all peripherals listed in the
motherboard file, and use the proper GIC macros to make them more
readable on the way.

Change-Id: I7d1493f1a200e8350530f912833f9ffcc5f94b21
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agofix(fvp): fdts: unify and fix PSCI nodes
Andre Przywara [Fri, 10 Dec 2021 18:22:09 +0000 (18:22 +0000)]
fix(fvp): fdts: unify and fix PSCI nodes

The PSCI DT nodes used for the various fvp-base model variants provide
explicit function IDs, as required for the pre-v0.2 PSCI specification.
This prevents them from being used from both AArch32 and AArch64 DT
clients, and using this version of the PSCI spec is long deprecated
anyway.

Remove the old compatible string and the function properties, to
force clients to use the standard function IDs as described in the PSCI
spec. sys_poweroff and sys_reset were never standardised or used anyway.

There should be no client software around that cannot deal with PSCI
v0.2.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Change-Id: Ie87deb9898eae79b7307c15bcefcd4b311d4dc22

2 years agofix(psa): add missing semicolon
Sandrine Bailleux [Tue, 11 Oct 2022 12:45:18 +0000 (14:45 +0200)]
fix(psa): add missing semicolon

Fix a syntax error in the delegated attestation service code.

Unfortunately, this build failure was not caught by the CI system
because right now lib/psa/delegated_attestation.c file is not getting
pulled in by any upstream platform. This will be addressed in a
separate patch.

Change-Id: Idb84f62aabc5008396213023fc40547097925860
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2 years agoMerge changes from topic "npm-dependencies" into integration
Olivier Deprez [Tue, 11 Oct 2022 12:27:34 +0000 (14:27 +0200)]
Merge changes from topic "npm-dependencies" into integration

* changes:
  build(npm): update locked Node.js dependencies
  build(npm): add NVM version file

2 years agofix(rme): relax RME compiler requirements
Andre Przywara [Tue, 4 Oct 2022 12:56:49 +0000 (13:56 +0100)]
fix(rme): relax RME compiler requirements

Currently building TF-A for the FVP with RME enabled requires a
toolchain that understands the -march=armv8.6-a command line option,
even though we actually don't need any ARMv8.6 features from the
compiler.

Relax the requirement to use ARMv8.5, since this is what's the GCC
shipped with Ubuntu 20.04 understands. This is in line what the current
RMM implementation uses as well.

Change-Id: I3806dcff90319a87f003fe2c86b7cdcdebd625e4
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agorevert(cpus): "Revert workaround for A77 erratum 1800714"
Boyan Karatotev [Tue, 27 Sep 2022 09:37:54 +0000 (10:37 +0100)]
revert(cpus): "Revert workaround for A77 erratum 1800714"

Reinstate the workaround introduced in commit
9bbc03a6e0608a949d66d9da6db12a455b452bfb. The cited change to the SDEN
could not be found and there are no known problems with the workaround.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Iec9938f173e7565024aca798f224df339de90806

2 years agofix(mt8186): fix EMI_MPU domain setting for DSP
Tinghan Shen [Fri, 7 Oct 2022 06:46:49 +0000 (14:46 +0800)]
fix(mt8186): fix EMI_MPU domain setting for DSP

Correct the domain setting for DSP. It should be 6.

BUG=b:249954378
TEST=audio is functional.

Change-Id: Ie79aa0dad3d2b1ef5de0f2acc51ded13b6f085ac
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
2 years agobuild(npm): update locked Node.js dependencies
Chris Kay [Mon, 10 Oct 2022 12:28:19 +0000 (13:28 +0100)]
build(npm): update locked Node.js dependencies

This change updates our Node.js dependencies to their latest minor/patch
versions, but not necessarily to their latest major versions.

Change-Id: I59b093675134c679b7a834f3da6acf830f596c67
Signed-off-by: Chris Kay <chris.kay@arm.com>
2 years agobuild(npm): add NVM version file
Chris Kay [Mon, 10 Oct 2022 12:21:19 +0000 (13:21 +0100)]
build(npm): add NVM version file

The `.nvmrc` file specifies the version of Node.js that the repository's
Node.js-based tooling has been designed to be compatible with.

Users of NVM may want to run `nvm use` to install this version
automatically.

Change-Id: Ied90c51d8d1e5b43f2ca4de08a58bc782d9ae4e6
Signed-off-by: Chris Kay <chris.kay@arm.com>
2 years agoMerge changes I072fe5fe,I4066d476,Ie4af38b8,I730e7b04,Iac3356f8, ... into integration
Sandrine Bailleux [Mon, 10 Oct 2022 11:57:17 +0000 (13:57 +0200)]
Merge changes I072fe5fe,I4066d476,Ie4af38b8,I730e7b04,Iac3356f8, ... into integration

* changes:
  fix(psa): extend measured boot logging
  fix(rss): determine the size of sw_type in RSS mboot metadata
  fix(psa): align with original API in tf-m-extras
  fix(rss): clear the message buffer
  feat(tc): enable RSS backend based measured boot
  feat(tc): increase maximum BL1/BL2/BL31 sizes

2 years agoMerge "build(changelog): add new scope for Performance Monitor Extensions" into integ...
Manish V Badarkhe [Mon, 10 Oct 2022 09:49:13 +0000 (11:49 +0200)]
Merge "build(changelog): add new scope for Performance Monitor Extensions" into integration

2 years agoMerge changes from topic "delegated_attest" into integration
Sandrine Bailleux [Mon, 10 Oct 2022 09:06:38 +0000 (11:06 +0200)]
Merge changes from topic "delegated_attest" into integration

* changes:
  feat(psa): remove initial attestation partition API
  docs: add PLAT_RSS_COMMS_PAYLOAD_MAX_SIZE to porting-guide.rst

2 years agoMerge changes from topic "delegated_attest" into integration
Sandrine Bailleux [Mon, 10 Oct 2022 05:53:22 +0000 (07:53 +0200)]
Merge changes from topic "delegated_attest" into integration

* changes:
  fix(rss): remove dependency on attestation header
  fix(rss): rename AP-RSS message size macro
  feat(tc): add RSS-AP message size macro
  feat(tc): add MHU addresses for AP-RSS comms on TC2
  feat(psa): add delegated attestation partition API
  fix(rss): reduce input validation for measured boot

2 years agofeat(cpu): add library support for Hunter ELP
Harrison Mutai [Mon, 3 Oct 2022 11:48:35 +0000 (12:48 +0100)]
feat(cpu): add library support for Hunter ELP

Add basic CPU library code to support the Hunter ELP CPU in TF-A.
Hunter-ELP adds v9.2 architecture support and is derived from
Makalu-ELP. As such, the library code is adapted from the
Makalu-ELP support library.

Change-Id: I7e93b9af6b1f0bc4d08c3cf5caf071d2cbdbc89f
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2 years agofix(psa): extend measured boot logging
Tamas Ban [Wed, 5 Oct 2022 11:22:23 +0000 (13:22 +0200)]
fix(psa): extend measured boot logging

Print all the params of
rss_measured_boot_extend_measurement() to
the console to check parameter healthiness.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I072fe5fef72c67e615ab64e06a9e1f6add5e9cfc

2 years agofeat(psa): remove initial attestation partition API
Tamas Ban [Thu, 1 Sep 2022 07:02:49 +0000 (09:02 +0200)]
feat(psa): remove initial attestation partition API

The attestation key derivation and platform attestation token
creation functionality is provided by the Delegated Attestation
partition in RSS.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I2d8c0e6589d11e7c81c698adf75ee2a993e3a0c6

2 years agofix(rss): remove dependency on attestation header
Tamas Ban [Thu, 8 Sep 2022 15:04:49 +0000 (17:04 +0200)]
fix(rss): remove dependency on attestation header

Platform must define the maximum size of the message
over MHU.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I91a6c132c946f4465178910b8ea83544f562e837

2 years agofix(rss): determine the size of sw_type in RSS mboot metadata
Tamas Ban [Mon, 3 Oct 2022 11:19:55 +0000 (13:19 +0200)]
fix(rss): determine the size of sw_type in RSS mboot metadata

Without setting the correct size of sw_type the metadata won't
be propagated to RSS through rss_measured_boot_extend_measurement()
API.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I4066d4762689c96ac2ac8e8b8db5d2b1f108b550

2 years agodocs: add PLAT_RSS_COMMS_PAYLOAD_MAX_SIZE to porting-guide.rst
Tamas Ban [Fri, 16 Sep 2022 12:09:30 +0000 (14:09 +0200)]
docs: add PLAT_RSS_COMMS_PAYLOAD_MAX_SIZE to porting-guide.rst

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I79761347919a0dfa86a29b5424f1d34fc4ab91cb

2 years agofix(rss): rename AP-RSS message size macro
Tamas Ban [Wed, 5 Oct 2022 09:56:04 +0000 (11:56 +0200)]
fix(rss): rename AP-RSS message size macro

Adding PLAT_* prefix to indicate that the
platform needs to provide this definition.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I0bd02be405fd8b1e625bd2b82647ebb2b58265fc

2 years agofix(psa): align with original API in tf-m-extras
Tamas Ban [Mon, 3 Oct 2022 11:06:53 +0000 (13:06 +0200)]
fix(psa): align with original API in tf-m-extras

The measured boot API is available in the tf-m-extras
repo:
partitions/measured_boot/interface/src/measured_boot_api.c

This change make the API behavior align with
the original implementation.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: Ie4af38b859f942b2ef090e92da64d75811b5b49b

2 years agofeat(tc): add RSS-AP message size macro
David Vincze [Mon, 11 Apr 2022 15:08:20 +0000 (17:08 +0200)]
feat(tc): add RSS-AP message size macro

Define the RSS_COMMS_PAYLOAD_MAX_SIZE macro. Its value is platform
specific and gives the largest message size which are exchanged
on the TC2 platform between RSS and AP.

Change-Id: Id831c282dc9a39755b82befead1a81767e217215
Signed-off-by: David Vincze <david.vincze@arm.com>
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
2 years agofix(rss): clear the message buffer
Tamas Ban [Fri, 16 Sep 2022 11:42:29 +0000 (13:42 +0200)]
fix(rss): clear the message buffer

Clear the MHU message buffer to remove assets from memory.

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I730e7b044eaf0bf517532a12146e4f542949544e

2 years agofeat(tc): add MHU addresses for AP-RSS comms on TC2
David Vincze [Wed, 13 Apr 2022 12:00:21 +0000 (14:00 +0200)]
feat(tc): add MHU addresses for AP-RSS comms on TC2

Change-Id: I600485ca83f91378d07cac6cee484bc4a1bf2a9c
Signed-off-by: David Vincze <david.vincze@arm.com>
2 years agofeat(tc): enable RSS backend based measured boot
Tamas Ban [Fri, 16 Sep 2022 14:26:15 +0000 (16:26 +0200)]
feat(tc): enable RSS backend based measured boot

Measurements taken during boot are stored in RSS.
These measurements are included in the platform
attestation token.

Change-Id: Iac3356f813fb417315681c718839319832a76191
Signed-off-by: David Vincze <david.vincze@arm.com>
Signed-off-by: Tamas Ban <tamas.ban@arm.com>