]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
2 years agoMerge changes from topic "npm-dependencies" into integration
Manish Pandey [Tue, 8 Nov 2022 16:20:53 +0000 (17:20 +0100)]
Merge changes from topic "npm-dependencies" into integration

* changes:
  docs(changelog): fix invalid context management scope
  docs(commit-style): fix incorrect instructions for adding scopes
  docs(prerequisites): update Node.js prerequisites documentation

2 years agoMerge "build(bl2): only set BL2_CPPFLAGS for armv8" into integration
Manish Pandey [Tue, 8 Nov 2022 11:48:31 +0000 (12:48 +0100)]
Merge "build(bl2): only set BL2_CPPFLAGS for armv8" into integration

2 years agobuild(bl2): only set BL2_CPPFLAGS for armv8
Diego Sueiro [Thu, 3 Nov 2022 17:01:39 +0000 (17:01 +0000)]
build(bl2): only set BL2_CPPFLAGS for armv8

If ARM_ARCH_MAJOR is 9 and ARM_ARCH_MINOR is 0 we don't want need to
have "-march=armv8-a+crc" in BL2_CPPFLAGS.

Change-Id: I9ac11522fde00953da40b95eebf82ff8ab2559ba
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
2 years agoMerge "feat(qti): updated soc version for sc7180 and sc7280" into integration
Manish V Badarkhe [Fri, 4 Nov 2022 17:55:26 +0000 (18:55 +0100)]
Merge "feat(qti): updated soc version for sc7180 and sc7280" into integration

2 years agodocs(changelog): fix invalid context management scope
Chris Kay [Mon, 10 Oct 2022 15:57:45 +0000 (16:57 +0100)]
docs(changelog): fix invalid context management scope

Change-Id: Ia94b944a023568fc53a812cefffe97a7b3af4266
Signed-off-by: Chris Kay <chris.kay@arm.com>
2 years agodocs(commit-style): fix incorrect instructions for adding scopes
Chris Kay [Mon, 10 Oct 2022 15:50:14 +0000 (16:50 +0100)]
docs(commit-style): fix incorrect instructions for adding scopes

Change-Id: I3ce7abd1c21b084dea6b618c603f71b5bb4c50e8
Signed-off-by: Chris Kay <chris.kay@arm.com>
2 years agodocs(prerequisites): update Node.js prerequisites documentation
Chris Kay [Mon, 10 Oct 2022 13:34:23 +0000 (14:34 +0100)]
docs(prerequisites): update Node.js prerequisites documentation

This change updates the version of the Node Version Manager suggested by
the prerequisites documentation. The NVM installation command line hint
has been replaced with the snippet provided by NVM's user guide, and the
second line now automatically installs a version of Node.js compatible
with TF-A's repository scripts.

Change-Id: I6ef5e504118238716ceb45a52083450c424c5d20
Signed-off-by: Chris Kay <chris.kay@arm.com>
2 years agoMerge changes from topic "hikey960-el3-spmc" into integration
Olivier Deprez [Fri, 4 Nov 2022 09:47:54 +0000 (10:47 +0100)]
Merge changes from topic "hikey960-el3-spmc" into integration

* changes:
  feat(hikey960): read serial number from UFS
  feat(hikey960): add a FF-A logical partition
  feat(hikey960): add memory sharing hooks for SPMC_AT_EL3
  feat(hikey960): add plat-defines for SPMC_AT_EL3
  feat(hikey960): define a datastore for SPMC_AT_EL3
  feat(hikey960): add SP manifest for SPMC_AT_EL3
  feat(hikey960): increase secure workspace to 64MB
  feat(hikey960): upgrade to xlat_tables_v2

2 years agoMerge "fix(build): fix arch32 build issue for clang" into integration
Manish Pandey [Fri, 4 Nov 2022 09:42:17 +0000 (10:42 +0100)]
Merge "fix(build): fix arch32 build issue for clang" into integration

2 years agoMerge "style(linker_script): fix indentation" into integration
Joanna Farley [Thu, 3 Nov 2022 17:01:20 +0000 (18:01 +0100)]
Merge "style(linker_script): fix indentation" into integration

2 years agoMerge "feat(drtm): add DRTM parameters structure version check" into integration
Manish Pandey [Thu, 3 Nov 2022 16:56:35 +0000 (17:56 +0100)]
Merge "feat(drtm): add DRTM parameters structure version check" into integration

2 years agofeat(qti): updated soc version for sc7180 and sc7280
Bharath N [Tue, 1 Nov 2022 12:27:17 +0000 (17:57 +0530)]
feat(qti): updated soc version for sc7180 and sc7280

SMCCC_GET_SOC_VERSION SMC will return soc id to distinguish
different varaints in sc7180 and sc7280

Signed-off-by: Bharath N <quic_bharn@quicinc.com>
Change-Id: I72ea4bdb8193c816ba249c1e0755784c9b9bb7da

2 years agofeat(drtm): add DRTM parameters structure version check
Manish V Badarkhe [Wed, 21 Sep 2022 09:04:16 +0000 (10:04 +0100)]
feat(drtm): add DRTM parameters structure version check

Added DRTM parameters structure version check that as per
the current released DRTM specification [1].

Mainly to cater below mentioned in the specification [1]
section 3.12 -
For a given DRTM major version number this structure will
always be extended in a backwards compatible manner.

[1]: https://developer.arm.com/documentation/den0113/a

Change-Id: I9f312c7f9f20152c5d7e40a22b462c7fe8db70bc
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2 years agoMerge changes from topic "el3-spmc" into integration
Olivier Deprez [Wed, 2 Nov 2022 18:47:31 +0000 (19:47 +0100)]
Merge changes from topic "el3-spmc" into integration

* changes:
  fix(el3-spmc): error handling in allocation
  fix(el3-spmc): deadlock when relinquishing memory
  fix(el3-spmc): compute full FF-A V1.1 desc size

2 years agoMerge "chore(docs): update supported FVP models doc" into integration
Manish V Badarkhe [Wed, 2 Nov 2022 14:51:49 +0000 (15:51 +0100)]
Merge "chore(docs): update supported FVP models doc" into integration

2 years agofeat(hikey960): read serial number from UFS
Arthur Cassegrain [Fri, 26 Nov 2021 15:39:12 +0000 (16:39 +0100)]
feat(hikey960): read serial number from UFS

Serial number is written into UFS by fastboot
Pass BL2 params to BL31 (serial number)

Change-Id: I9a490db07ca10088da69191a2f2c1621d44a278c
Signed-off-by: vallau01 <valentin.laurent@trustonic.com>
Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.com>
2 years agofeat(hikey960): add a FF-A logical partition
Lukas Hanel [Mon, 24 Oct 2022 14:55:11 +0000 (16:55 +0200)]
feat(hikey960): add a FF-A logical partition

Required to compile with SPMC_AT_EL3=1
Copied from FVP, sample code for platforms

Change-Id: I7d8a4d8846a328b05cf45a5044802ea3e2f7fb67
Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.com>
2 years agofeat(hikey960): add memory sharing hooks for SPMC_AT_EL3
vallau01 [Tue, 2 Aug 2022 14:16:11 +0000 (16:16 +0200)]
feat(hikey960): add memory sharing hooks for SPMC_AT_EL3

These allows a platform to do any System-MMU/IOMMU configuration
in line with FF-A memory sharing.

Change-Id: Id517759198421a32c5d16bf5bb99590275e77736
Signed-off-by: vallau01 <valentin.laurent@trustonic.com>
Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.com>
2 years agofeat(hikey960): add plat-defines for SPMC_AT_EL3
Lukas Hanel [Tue, 1 Mar 2022 14:40:39 +0000 (15:40 +0100)]
feat(hikey960): add plat-defines for SPMC_AT_EL3

To use SPMC_AT_EL3, a platform must define a few configuration
options. Copied them from fvp platform to hikey960.

Change-Id: Ifd60d69bf79f2f340fe93fe030ab8c538b3a56e4
Signed-off-by: vallau01 <valentin.laurent@trustonic.com>
Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.com>
2 years agofeat(hikey960): define a datastore for SPMC_AT_EL3
Lukas Hanel [Tue, 1 Mar 2022 16:02:31 +0000 (17:02 +0100)]
feat(hikey960): define a datastore for SPMC_AT_EL3

Kinibi now has 60MB (instead of 64MB).
Increase XLAT tables for BL31

Change-Id: I6843d26198a7d8bdb812e394e4482b1c35afa4c0
Signed-off-by: vallau01 <valentin.laurent@trustonic.com>
Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.com>
2 years agofeat(hikey960): add SP manifest for SPMC_AT_EL3
Lukas Hanel [Tue, 1 Mar 2022 13:18:22 +0000 (14:18 +0100)]
feat(hikey960): add SP manifest for SPMC_AT_EL3

The purpose of this patch is to show silicon partners how to upgrade
existing TF-A port to include a manifest that is required with FF-A.

The manifest values are consumed by TF-A SPMC_AT_EL3 and by the TEE.

Change-Id: Ied81187d6b1cfb72ad2e9020dfc19ad73d80186f
Signed-off-by: Cedric Chan <cedric.chan@trustonic.com>
Signed-off-by: vallau01 <valentin.laurent@trustonic.com>
Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.com>
2 years agofix(el3-spmc): error handling in allocation
vallau01 [Tue, 9 Aug 2022 16:03:28 +0000 (18:03 +0200)]
fix(el3-spmc): error handling in allocation

Error check must be done on the previously allocated pointer, not a
random one from the code.

Change-Id: I1c8253eacbe778cc4a9a8d71081fc615fa7e5293
Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.com>
2 years agofix(el3-spmc): deadlock when relinquishing memory
vallau01 [Tue, 9 Aug 2022 15:06:53 +0000 (17:06 +0200)]
fix(el3-spmc): deadlock when relinquishing memory

Do not forget to pass via err_unlock_mailbox: label.

Change-Id: Icfb997b1c7cce196003af2c28bffc50dc73e30b4
Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.com>
2 years agofix(el3-spmc): compute full FF-A V1.1 desc size
vallau01 [Mon, 8 Aug 2022 12:10:14 +0000 (14:10 +0200)]
fix(el3-spmc): compute full FF-A V1.1 desc size

This patch fixes an issue in spmc_ffa_fill_desc.

In order to compute the spmc_shm_get_v1_1_descriptor_size,
fragment_length which is a fraction of the descriptor size is used as
desc_size parameter. It has to be replaced with the
full V1.0 descriptor size(obj->desc_filled).

Ran a subset of our tests and they are passing.

Change-Id: Ia4bbc5dabf0b77fa53d923ff609ee48ecd5bf549
Signed-off-by: vallau01 <valentin.laurent@trustonic.com>
Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.com>
2 years agoMerge "feat(imx8mm): add BL31 PIE support" into integration
Madhukar Pappireddy [Tue, 1 Nov 2022 14:16:07 +0000 (15:16 +0100)]
Merge "feat(imx8mm): add BL31 PIE support" into integration

2 years agoMerge "refactor(imx8mm): introduce BL2_SIZE and BL31_SIZE" into integration
Madhukar Pappireddy [Tue, 1 Nov 2022 14:16:03 +0000 (15:16 +0100)]
Merge "refactor(imx8mm): introduce BL2_SIZE and BL31_SIZE" into integration

2 years agoMerge "refactor(imx8mm): make use of setup_page_tables()" into integration
Madhukar Pappireddy [Tue, 1 Nov 2022 14:15:52 +0000 (15:15 +0100)]
Merge "refactor(imx8mm): make use of setup_page_tables()" into integration

2 years agoMerge "refactor(imx8mm): cleanup the mmap region settings" into integration
Madhukar Pappireddy [Tue, 1 Nov 2022 14:15:45 +0000 (15:15 +0100)]
Merge "refactor(imx8mm): cleanup the mmap region settings" into integration

2 years agoMerge "feat(imx8mn): add BL31 PIE support" into integration
Madhukar Pappireddy [Tue, 1 Nov 2022 14:15:04 +0000 (15:15 +0100)]
Merge "feat(imx8mn): add BL31 PIE support" into integration

2 years agoMerge "refactor(imx8mn): introduce BL31_SIZE" into integration
Madhukar Pappireddy [Tue, 1 Nov 2022 14:14:58 +0000 (15:14 +0100)]
Merge "refactor(imx8mn): introduce BL31_SIZE" into integration

2 years agoMerge "refactor(imx8mn): make use of setup_page_tables()" into integration
Madhukar Pappireddy [Tue, 1 Nov 2022 14:14:53 +0000 (15:14 +0100)]
Merge "refactor(imx8mn): make use of setup_page_tables()" into integration

2 years agoMerge "refactor(imx8mn): cleanup the mmap region settings" into integration
Madhukar Pappireddy [Tue, 1 Nov 2022 14:14:48 +0000 (15:14 +0100)]
Merge "refactor(imx8mn): cleanup the mmap region settings" into integration

2 years agoMerge "feat(imx8mp): add BL31 PIE support" into integration
Madhukar Pappireddy [Tue, 1 Nov 2022 14:14:41 +0000 (15:14 +0100)]
Merge "feat(imx8mp): add BL31 PIE support" into integration

2 years agoMerge "refactor(imx8mp): introduce BL2_SIZE and BL31_SIZE" into integration
Madhukar Pappireddy [Tue, 1 Nov 2022 14:14:36 +0000 (15:14 +0100)]
Merge "refactor(imx8mp): introduce BL2_SIZE and BL31_SIZE" into integration

2 years agoMerge "refactor(imx8mp): make use of setup_page_tables()" into integration
Madhukar Pappireddy [Tue, 1 Nov 2022 14:14:30 +0000 (15:14 +0100)]
Merge "refactor(imx8mp): make use of setup_page_tables()" into integration

2 years agoMerge "refactor(imx8mp): cleanup the mmap region settings" into integration
Madhukar Pappireddy [Tue, 1 Nov 2022 14:14:25 +0000 (15:14 +0100)]
Merge "refactor(imx8mp): cleanup the mmap region settings" into integration

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 agochore(docs): update supported FVP models doc
laurenw-arm [Wed, 14 Sep 2022 20:44:42 +0000 (15:44 -0500)]
chore(docs): update supported FVP models doc

Update supported models list according to changes for v2.8 release in
ci/tf-a-ci-scripts repository

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Ica7e062db77237220bcd861837f392496db1653a

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 agofix(build): fix arch32 build issue for clang
Arvind Ram Prakash [Wed, 19 Oct 2022 20:44:51 +0000 (15:44 -0500)]
fix(build): fix arch32 build issue for clang

Fixed the qemu 32 bit clang build fail caused because of
no march32 directives in TF_CFLAGS_aarch32 variable

march32_directive is initialized later in Makefile and since clang build
uses Immediate set instead of Lazy set , TF_CFLAGS_aarch32 doesn't
have mcpu variable.

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I09094a0912ee2d9d0e11f65135a352de8a135936

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 agofeat(hikey960): increase secure workspace to 64MB
Arthur Cassegrain [Fri, 26 Nov 2021 15:34:36 +0000 (16:34 +0100)]
feat(hikey960): increase secure workspace to 64MB

Common TEE use cases require 64 MB these days, and not just 16 MB.
This in turn requires more XLAT tables to be pre-allocated for BL31.

Change-Id: I85c4033da64785f3e3272b0e9a4da4bceb20fcc7
Signed-off-by: vallau01 <valentin.laurent@trustonic.com>
Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.com>
2 years agofeat(hikey960): upgrade to xlat_tables_v2
Lukas Hanel [Fri, 23 Apr 2021 16:45:57 +0000 (18:45 +0200)]
feat(hikey960): upgrade to xlat_tables_v2

Allow 36-bit addresses.
Don't map BL32 memory into BL31 to save space

Change-Id: I033132354dc4b9876f4a384491097b9b5238e700
Signed-off-by: vallau01 <valentin.laurent@trustonic.com>
Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.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 agostyle(linker_script): fix indentation
Jorge Troncoso [Fri, 21 Oct 2022 04:42:06 +0000 (21:42 -0700)]
style(linker_script): fix indentation

Use four spaces for indentation to maintain a consistent style. This
attempts to make the linker scripts more friendly for readers.

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: Iaf26d3c8bd7053fd9605a64ebccdae0792a90b9e

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(imx8mm): add BL31 PIE support
Marco Felsch [Mon, 22 Aug 2022 10:39:01 +0000 (12:39 +0200)]
feat(imx8mm): add BL31 PIE support

Enable PIE support so the BL31 firmware can be loaded from anywhere
within the OCRAM (SRAM). For the PIE support we only need to replace the
BL31_BASE define by the BL31_START symbol which is a relocatable and we
need to enable it by setting ENABLE_PIE := 1.

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

2 years agorefactor(imx8mm): introduce BL2_SIZE and BL31_SIZE
Marco Felsch [Mon, 22 Aug 2022 10:30:11 +0000 (12:30 +0200)]
refactor(imx8mm): introduce BL2_SIZE and BL31_SIZE

No functional change.

Introduce BLx_SIZE defines and calculate the limits based on the
BLx_BASE and the BLx_SIZE define. Also make use of SZ_128K to make it
easier to read. This is required for later BL31 PIE support since it
drops the calculation based on the BL31_LIMIT and BL31_BASE.

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

2 years agorefactor(imx8mm): make use of setup_page_tables()
Marco Felsch [Mon, 22 Aug 2022 10:25:04 +0000 (12:25 +0200)]
refactor(imx8mm): make use of setup_page_tables()

No functional change. Use the setup_page_tables() helper function which
does the three calls for us. Also the function has some logging support
which will be nice during debugging.

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

2 years agorefactor(imx8mm): cleanup the mmap region settings
Marco Felsch [Mon, 22 Aug 2022 10:23:56 +0000 (12:23 +0200)]
refactor(imx8mm): cleanup the mmap region settings

No functional change.

Introduce the bl_regions array to gather all regions and make use of the
MAP_REGION_FLAT() macro. The array is than passed to mmap_add() to map
all regions. While on it introduce some defines so the addr, size and
flags can be read more easily.

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

2 years agofeat(imx8mn): add BL31 PIE support
Marco Felsch [Mon, 4 Jul 2022 10:18:34 +0000 (12:18 +0200)]
feat(imx8mn): add BL31 PIE support

Enable PIE support so the BL31 firmware can be loaded from anywhere
within the OCRAM (SRAM). For the PIE support we only need to replace the
BL31_BASE define by the BL31_START symbol which is a relocatable and we
need to enable it by setting ENABLE_PIE := 1.

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

2 years agorefactor(imx8mn): introduce BL31_SIZE
Marco Felsch [Mon, 4 Jul 2022 10:14:54 +0000 (12:14 +0200)]
refactor(imx8mn): introduce BL31_SIZE

Introduce BL31_SIZE define and calculate the limit based on the
BL31_BASE and the BL31_SIZE define. Also make use of SZ_128K to make it
easier to read. This is required for later BL31 PIE support since it
drops the calculation based on the BL31_LIMIT and BL31_BASE.

While on it remove the duplicated <lib/utils_def.h> include.

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

2 years agorefactor(imx8mn): make use of setup_page_tables()
Marco Felsch [Mon, 4 Jul 2022 10:11:01 +0000 (12:11 +0200)]
refactor(imx8mn): make use of setup_page_tables()

No functional change.

Use the setup_page_tables() helper function which does the three calls
for us. Also the function has some logging support which will be nice
during debugging.

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

2 years agorefactor(imx8mn): cleanup the mmap region settings
Marco Felsch [Mon, 4 Jul 2022 10:07:59 +0000 (12:07 +0200)]
refactor(imx8mn): cleanup the mmap region settings

No functional change.

Introduce the bl_regions array to gather all regions and make use of the
MAP_REGION_FLAT() macro. The array is than passed to mmap_add() to map
all regions. While on it introduce some defines so the addr, size and
flags can be read more easily.

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

2 years agofeat(imx8mp): add BL31 PIE support
Marco Felsch [Fri, 1 Jul 2022 13:55:30 +0000 (15:55 +0200)]
feat(imx8mp): add BL31 PIE support

Enable PIE support so the BL31 firmware can be loaded from anywhere
within the OCRAM (SRAM). How important this is shows the back and forth
of the BL31_BASE address starting with TF-A v2.5. Since then the
BL31_BASE address wasn't stable and choosing the correct combination of
SPL version loadaddress and TF-A version loadaddr was tricky.

For the PIE support we only need to replace the BL31_BASE by the
BL31_START which is a relocatable symbol and to enable it by setting
ENABLE_PIE := 1.

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

2 years agorefactor(imx8mp): introduce BL2_SIZE and BL31_SIZE
Marco Felsch [Mon, 4 Jul 2022 09:09:46 +0000 (11:09 +0200)]
refactor(imx8mp): introduce BL2_SIZE and BL31_SIZE

No functional change.

Introduce BLx_SIZE defines and calculate the limits based on the
BLx_BASE and the BLx_SIZE define. Also make use of SZ_128K to make it
easier to read. This is required for later BL31 PIE support since it
drops the calculation based on the BL31_LIMIT and BL31_BASE.

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

2 years agorefactor(imx8mp): make use of setup_page_tables()
Marco Felsch [Fri, 1 Jul 2022 13:50:05 +0000 (15:50 +0200)]
refactor(imx8mp): make use of setup_page_tables()

No functional change. Use the setup_page_tables() helper function which
does the three calls for us. Also the function has some logging support
which will be nice during debugging.

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

2 years agorefactor(imx8mp): cleanup the mmap region settings
Marco Felsch [Fri, 1 Jul 2022 13:44:09 +0000 (15:44 +0200)]
refactor(imx8mp): cleanup the mmap region settings

Introduce the bl_regions array to gather all regions and make use of the
MAP_REGION_FLAT() macro. The array is than passed to mmap_add() to map
all regions. While on it introduce some defines so the addr, size and
flags can be read more easily. No functional change done.

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

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