]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
3 years agofeat(sgi): bump bl1 rw size
Vijayenthiran Subramaniam [Tue, 25 Jan 2022 17:29:10 +0000 (22:59 +0530)]
feat(sgi): bump bl1 rw size

Increase BL1 RW size by 16 KiB to accommodate for future development.

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

3 years agorefactor(sgi): rewrite address space size definitions
Vijayenthiran Subramaniam [Tue, 25 Jan 2022 15:07:20 +0000 (20:37 +0530)]
refactor(sgi): rewrite address space size definitions

The value of the macro CSS_SGI_REMOTE_CHIP_MEM_OFFSET can be different
across all the Neoverse reference design platforms. This value depends
on the number of address bits used per chip. So let all platforms define
CSS_SGI_ADDR_BITS_PER_CHIP which specifies the number of address bits
used per chip.

In addition to this, reuse the definition of CSS_SGI_ADDR_BITS_PER_CHIP
for single chip platforms and CSS_SGI_REMOTE_CHIP_MEM_OFFSET for multi-
chip platforms to determine the maximum address space size. Also,
increase the RD-N2 multi-chip address space per chip from 4TB to 64TB.

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

3 years agoMerge "fix(rme): xlat table setup fails for bl2" into integration
Manish Pandey [Thu, 7 Jul 2022 09:38:37 +0000 (11:38 +0200)]
Merge "fix(rme): xlat table setup fails for bl2" into integration

3 years agofix(rme): xlat table setup fails for bl2
Soby Mathew [Wed, 6 Jul 2022 15:01:40 +0000 (16:01 +0100)]
fix(rme): xlat table setup fails for bl2

The patch 8c980a4 created a 4KB shared region from the 32MB
Realm region for RMM-EL3 communication. But this meant that BL2
needs to map a region of 32MB - 4KB, which required more xlat
tables at runtime. This patch maps the entire 32MB region in BL2
which is more memory efficient in terms of xlat tables needed.

Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: I17aa27545293d7b5bbec1c9132ea2c22bf2e7e65

3 years agoMerge changes from topic "st_fix_stm32mp13" into integration
Manish Pandey [Wed, 6 Jul 2022 14:08:27 +0000 (16:08 +0200)]
Merge changes from topic "st_fix_stm32mp13" into integration

* changes:
  fix(stm32mp13): correct USART addresses
  feat(stm32mp13): change BL33 memory mapping

3 years agoMerge "docs(rmmd): add myself as RMMD and RME owner" into integration
Olivier Deprez [Wed, 6 Jul 2022 06:47:26 +0000 (08:47 +0200)]
Merge "docs(rmmd): add myself as RMMD and RME owner" into integration

3 years agodocs(rmmd): add myself as RMMD and RME owner
Javier Almansa Sobrino [Tue, 5 Jul 2022 14:32:01 +0000 (15:32 +0100)]
docs(rmmd): add myself as RMMD and RME owner

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I93f5e622e37f3156bd5326b7d3a3d0d7f73b2c2e

3 years agofix(stm32mp13): correct USART addresses
Yann Gautier [Tue, 5 Jul 2022 11:29:13 +0000 (13:29 +0200)]
fix(stm32mp13): correct USART addresses

On STM32MP13, USART1 and USART2 addresses are 0x4C000000 and 0x4C001000.
Whereas on STM32MP15, the addresses were 0x5C000000 and 0x4000E000.
Use dedicated flags to choose the correct address, that could be use
for early or crash console.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I98bd97a0ac8b0408a50376801e2a1961b241a3d6

3 years agofeat(stm32mp13): change BL33 memory mapping
Patrick Delaunay [Tue, 13 Apr 2021 12:44:48 +0000 (14:44 +0200)]
feat(stm32mp13): change BL33 memory mapping

U-Boot is loaded at the beginning of the DDR:
STM32MP_DDR_BASE = 0xC0000000.

This patch remove the need to use the 0x100000 offset, reserved
on STM32MP15 for flashlayout.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I8d0a93f4db411cf59838e635a315c729cccee269

3 years agoMerge "feat(sme): fall back to SVE if SME is not there" into integration
Manish Pandey [Tue, 5 Jul 2022 12:32:39 +0000 (14:32 +0200)]
Merge "feat(sme): fall back to SVE if SME is not there" into integration

3 years agoMerge changes from topic "jas/rmm-el3-ifc" into integration
Soby Mathew [Tue, 5 Jul 2022 10:03:49 +0000 (12:03 +0200)]
Merge changes from topic "jas/rmm-el3-ifc" into integration

* changes:
  docs(rmmd): document EL3-RMM Interfaces
  feat(rmmd): add support to create a boot manifest
  fix(rme): use RMM shared buffer for attest SMCs
  feat(rmmd): add support for RMM Boot interface

3 years agofeat(sme): fall back to SVE if SME is not there
Mark Brown [Mon, 9 May 2022 12:26:36 +0000 (13:26 +0100)]
feat(sme): fall back to SVE if SME is not there

Due to their interrelationship in the architecture the SVE and SME
features in TF-A are mutually exclusive. This means that a single binary
can't be shared between systems with and without SME if the system
without SME does support SVE, SVE will not be initialised so lower ELs
will run into trouble trying to use it. This unusual behaviour for TF-A
which normally gracefully handles situations where features are enabled
but not supported on the current hardware.

Address this by calling the SVE enable and disable functions if SME is
not supported rather than immediately exiting, these perform their own
feature checks so if neither SVE nor SME is supported behaviour is
unchanged.

Signed-off-by: Mark Brown <broonie@kernel.org>
Change-Id: I2c606202fa6c040069f44e29d36b5abb48391874

3 years agodocs(rmmd): document EL3-RMM Interfaces
Javier Almansa Sobrino [Thu, 7 Apr 2022 17:26:49 +0000 (18:26 +0100)]
docs(rmmd): document EL3-RMM Interfaces

This patch documents the RMM-EL3 Boot and runtime interfaces.

Note that for the runtime interfaces, some services are not
documented in this patch and will be added on a later doc patch.

These services are:

* RMMD_GTSI_DELEGATE
* RMMD_GTSI_UNDELEGATE
* RMMD_RMI_REQ_COMPLETE

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I8fcc89d91fe5a334c2f68c6bfd1fd672a8738b5c

3 years agoMerge "feat(spmd): avoid spoofing in FF-A direct request" into integration
Olivier Deprez [Tue, 5 Jul 2022 08:21:59 +0000 (10:21 +0200)]
Merge "feat(spmd): avoid spoofing in FF-A direct request" into integration

3 years agoMerge "feat(arm): forbid running RME-enlightened BL31 from DRAM" into integration
Sandrine Bailleux [Tue, 5 Jul 2022 08:21:36 +0000 (10:21 +0200)]
Merge "feat(arm): forbid running RME-enlightened BL31 from DRAM" into integration

3 years agofeat(rmmd): add support to create a boot manifest
Javier Almansa Sobrino [Mon, 25 Apr 2022 16:18:15 +0000 (17:18 +0100)]
feat(rmmd): add support to create a boot manifest

This patch also adds an initial RMM Boot Manifest (v0.1) for fvp
platform.

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I1374f8f9cb207028f1820953cd2a5cf6d6c3b948

3 years agofix(rme): use RMM shared buffer for attest SMCs
Javier Almansa Sobrino [Wed, 13 Apr 2022 16:57:35 +0000 (17:57 +0100)]
fix(rme): use RMM shared buffer for attest SMCs

Use the RMM shared buffer to attestation token and signing key SMCs.

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I313838b26d3d9334fb0fe8cd4b229a326440d2f4

3 years agofeat(rmmd): add support for RMM Boot interface
Javier Almansa Sobrino [Wed, 24 Nov 2021 18:37:37 +0000 (18:37 +0000)]
feat(rmmd): add support for RMM Boot interface

This patch adds the infrastructure needed to pass boot arguments from
EL3 to RMM and allocates a shared buffer between both worlds that can
be used, among others, to pass a boot manifest to RMM. The buffer is
composed a single memory page be used by a later EL3 <-> RMM interface
by all CPUs.

The RMM boot manifest is not implemented by this patch.

In addition to that, this patch also enables support for RMM when
RESET_TO_BL31 is enabled.

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I855cd4758ee3843eadd9fb482d70a6d18954d82a

3 years agofeat(arm): forbid running RME-enlightened BL31 from DRAM
Sandrine Bailleux [Mon, 4 Jul 2022 09:17:43 +0000 (11:17 +0200)]
feat(arm): forbid running RME-enlightened BL31 from DRAM

According to Arm CCA security model [1],

"Root world firmware, including Monitor, is the most trusted CCA
component on application PE. It enforces CCA security guarantees for
not just Realm world, but also for Secure world and for itself.

It is expected to be small enough to feasibly fit in on-chip memory,
and typically needs to be available early in the boot process when
only on-chip memory is available."

For these reasons, it is expected that "monitor code executes entirely
from on-chip memory."

This precludes usage of ARM_BL31_IN_DRAM for RME-enlightened firmware.

[1] Arm DEN0096 A.a, section 7.3 "Use of external memory by CCA".

Change-Id: I752eb45f1e6ffddc7a6f53aadcc92a3e71c1759f
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agofeat(spmd): avoid spoofing in FF-A direct request
Shruti [Thu, 9 Jun 2022 10:03:11 +0000 (11:03 +0100)]
feat(spmd): avoid spoofing in FF-A direct request

Validate that non-secure caller does not spoof
SPMD, SPMC or any secure endpoint ID
in FFA_MSG_SEND_DIRECT_REQ.

Change-Id: I7eadb8886142d94bef107cf485462dfcda828895
Signed-off-by: Shruti <shruti.gupta@arm.com>
3 years agoMerge changes from topics "binary-format-sp", "od/meas-boot-spmc" into integration
Sandrine Bailleux [Thu, 30 Jun 2022 14:47:49 +0000 (16:47 +0200)]
Merge changes from topics "binary-format-sp", "od/meas-boot-spmc" into integration

* changes:
  feat(spm): add tpm event log node to spmc manifest
  fix(measured-boot): add SP entries to event_log_metadata

3 years agoMerge "feat(stm32mp15): manage OP-TEE shared memory" into integration
Manish Pandey [Thu, 30 Jun 2022 14:29:22 +0000 (16:29 +0200)]
Merge "feat(stm32mp15): manage OP-TEE shared memory" into integration

3 years agofeat(stm32mp15): manage OP-TEE shared memory
Yann Gautier [Thu, 30 Jun 2022 09:33:27 +0000 (11:33 +0200)]
feat(stm32mp15): manage OP-TEE shared memory

On STM32MP15, there is currently an OP-TEE shared memory area at the end
of the DDR. But this area will in term be removed. To allow a smooth
transition, a new flag is added (STM32MP15_OPTEE_RSV_SHM). It reflects
the OP-TEE flag: CFG_CORE_RESERVED_SHM. The flag is enabled by default
(no behavior change). It will be set to 0 when OP-TEE is aligned, and
then later be removed.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I91146cd8a26a24be22143c212362294c1e880264

3 years agoMerge changes from topic "xlnx_zynqmp_misra_fix1" into integration
Joanna Farley [Wed, 29 Jun 2022 22:36:46 +0000 (00:36 +0200)]
Merge changes from topic "xlnx_zynqmp_misra_fix1" into integration

* changes:
  fix(zynqmp): resolve the misra 8.6 warnings
  fix(zynqmp): resolve the misra 4.6 warnings

3 years agoMerge "fix(sptool): fix concurrency issue for SP packages" into integration
Madhukar Pappireddy [Wed, 29 Jun 2022 13:27:32 +0000 (15:27 +0200)]
Merge "fix(sptool): fix concurrency issue for SP packages" into integration

3 years agofix(sptool): fix concurrency issue for SP packages
Daniel Boulby [Thu, 9 Jun 2022 11:04:30 +0000 (12:04 +0100)]
fix(sptool): fix concurrency issue for SP packages

Add dependency between rules to generate SP packages and their dtb files
to ensure the dtb files are built before the sptool attempts to generate
the SP package.

Change-Id: I071806f4aa09f39132e3e1990c91d71dc9acd728
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
3 years agoMerge "docs: add Manish Badarkhe to maintainer list" into integration
Joanna Farley [Tue, 28 Jun 2022 11:23:18 +0000 (13:23 +0200)]
Merge "docs: add Manish Badarkhe to maintainer list" into integration

3 years agoMerge "feat(stm32mp1): save boot auth status and partition info" into integration
Manish Pandey [Tue, 28 Jun 2022 08:53:01 +0000 (10:53 +0200)]
Merge "feat(stm32mp1): save boot auth status and partition info" into integration

3 years agoMerge "fix(measured-boot): clear the entire digest array of Startup Locality event...
Sandrine Bailleux [Tue, 28 Jun 2022 07:33:44 +0000 (09:33 +0200)]
Merge "fix(measured-boot): clear the entire digest array of Startup Locality event" into integration

3 years agoMerge changes from topic "HEAD" into integration
Madhukar Pappireddy [Tue, 28 Jun 2022 01:43:48 +0000 (03:43 +0200)]
Merge changes from topic "HEAD" into integration

* changes:
  feat(synquacer): add FWU Multi Bank Update support
  feat(synquacer): add TBBR support
  feat(synquacer): add BL2 support
  refactor(synquacer): move common source files

3 years agofeat(synquacer): add FWU Multi Bank Update support
Jassi Brar [Mon, 23 May 2022 18:16:01 +0000 (13:16 -0500)]
feat(synquacer): add FWU Multi Bank Update support

Add FWU Multi Bank Update support. This reads the platform metadata
and update the FIP base address so that BL2 can load correct BL3X
based on the boot index.

Cc: Sumit Garg <sumit.garg@linaro.org>
Cc: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: Manish V Badarkhe <manish.badarkhe@arm.com>
Cc: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: I5d96972bc4b3b9a12a8157117e53a05da5ce89f6
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
3 years agofeat(synquacer): add TBBR support
Jassi Brar [Thu, 3 Mar 2022 21:24:31 +0000 (15:24 -0600)]
feat(synquacer): add TBBR support

enable Trusted-Boot for Synquacer platform.

Cc: Sumit Garg <sumit.garg@linaro.org>
Cc: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: Manish V Badarkhe <manish.badarkhe@arm.com>
Cc: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: I2608b4d573d95d55da1fc5544333e0dbf3f763f2
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
3 years agofeat(synquacer): add BL2 support
Jassi Brar [Thu, 3 Mar 2022 21:24:31 +0000 (15:24 -0600)]
feat(synquacer): add BL2 support

Add BL2 support by default. Move the legacy mode behind the
RESET_TO_BL31 define.

Cc: Sumit Garg <sumit.garg@linaro.org>
Cc: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: Manish V Badarkhe <manish.badarkhe@arm.com>
Cc: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: Ic490745a7e8f6114172733428ebd6bd6adfcc1ec
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
3 years agorefactor(synquacer): move common source files
Jassi Brar [Thu, 3 Mar 2022 21:24:31 +0000 (15:24 -0600)]
refactor(synquacer): move common source files

Prepare for introduction of BL2 support by moving
reusable files from BL31_SOURCES into PLAT_BL_COMMON_SOURCES

Cc: Sumit Garg <sumit.garg@linaro.org>
Cc: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: Manish V Badarkhe <manish.badarkhe@arm.com>
Cc: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: I21137cdd40d027cfa77f1dec3598ee85d4873581
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
3 years agodocs: add Manish Badarkhe to maintainer list
Manish Pandey [Mon, 27 Jun 2022 17:05:48 +0000 (18:05 +0100)]
docs: add Manish Badarkhe to maintainer list

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I8fd116962bb9775e2f96faee37bbf73073e15512

3 years agoMerge "feat(auth): enable MBEDTLS_CHECK_RETURN_WARNING" into integration
Madhukar Pappireddy [Mon, 27 Jun 2022 16:01:12 +0000 (18:01 +0200)]
Merge "feat(auth): enable MBEDTLS_CHECK_RETURN_WARNING" into integration

3 years agoMerge changes from topic "st_optee_paged" into integration
Manish Pandey [Mon, 27 Jun 2022 16:00:50 +0000 (18:00 +0200)]
Merge changes from topic "st_optee_paged" into integration

* changes:
  feat(stm32mp1): optionally use paged OP-TEE
  feat(optee): check paged_image_info

3 years agofeat(stm32mp1): save boot auth status and partition info
Igor Opaniuk [Thu, 23 Jun 2022 18:19:26 +0000 (21:19 +0300)]
feat(stm32mp1): save boot auth status and partition info

Introduce a functionality for saving/restoring boot auth status
and partition used for booting (FSBL partition on which the boot
was successful).

Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Change-Id: I4d7f153b70dfc49dad8c1c3fa71111a350caf1ee

3 years agoMerge changes from topic "mb_hash" into integration
Lauren Wehrmeister [Mon, 27 Jun 2022 15:32:59 +0000 (17:32 +0200)]
Merge changes from topic "mb_hash" into integration

* changes:
  refactor(imx): update config of mbedtls support
  refactor(qemu): update configuring mbedtls support
  refactor(measured-boot): mb algorithm selection

3 years agoMerge "fix(nxp-ddr): fix firmware buffer re-mapping issue" into integration
Madhukar Pappireddy [Mon, 27 Jun 2022 13:46:58 +0000 (15:46 +0200)]
Merge "fix(nxp-ddr): fix firmware buffer re-mapping issue" into integration

3 years agofeat(auth): enable MBEDTLS_CHECK_RETURN_WARNING
Sandrine Bailleux [Wed, 15 Jun 2022 13:31:52 +0000 (15:31 +0200)]
feat(auth): enable MBEDTLS_CHECK_RETURN_WARNING

Define the MBEDTLS_CHECK_RETURN_WARNING macro in mbedTLS configuration
file to get compile-time warnings for mbedTLS functions we call and do
not check the return value of. Right now, this does not flag anything
but it could help catching bugs in the future.

This was a new feature introduced in mbed TLS 2.28.0 release.

Change-Id: If26f3c83b6ccc8bc60e75c3e582ab20817d047aa
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agoMerge "fix(measured-boot): fix verbosity level of RSS digests traces" into integration
Sandrine Bailleux [Mon, 27 Jun 2022 07:37:39 +0000 (09:37 +0200)]
Merge "fix(measured-boot): fix verbosity level of RSS digests traces" into integration

3 years agoMerge "fix(zynqmp): move bl31 with DEBUG=1 back to OCM" into integration
Manish Pandey [Fri, 24 Jun 2022 11:43:41 +0000 (13:43 +0200)]
Merge "fix(zynqmp): move bl31 with DEBUG=1 back to OCM" into integration

3 years agoMerge changes from topic "xlnx_versal_misra_fix" into integration
Manish Pandey [Fri, 24 Jun 2022 11:40:01 +0000 (13:40 +0200)]
Merge changes from topic "xlnx_versal_misra_fix" into integration

* changes:
  fix(versal): resolve misra 15.6 warnings
  fix(zynqmp): resolve misra 8.13 warnings
  fix(versal): resolve misra 8.13 warnings
  fix(versal): resolve the misra 4.6 warnings

3 years agoMerge changes from topic "lw/cca_cot" into integration
Manish Pandey [Fri, 24 Jun 2022 10:44:06 +0000 (12:44 +0200)]
Merge changes from topic "lw/cca_cot" into integration

* changes:
  feat(arm): retrieve the right ROTPK for cca
  feat(arm): add support for cca CoT
  feat(arm): provide some swd rotpk files
  build(tbbr): drive cert_create changes for cca CoT
  refactor(arm): add cca CoT certificates to fconf
  feat(fiptool): add cca, core_swd, plat cert in FIP
  feat(cert_create): define the cca chain of trust
  feat(cca): introduce new "cca" chain of trust
  build(changelog): add new scope for CCA
  refactor(fvp): increase bl2 size when bl31 in DRAM

3 years agoMerge changes from topic "ns/cpu_info" into integration
Madhukar Pappireddy [Wed, 22 Jun 2022 15:45:45 +0000 (17:45 +0200)]
Merge changes from topic "ns/cpu_info" into integration

* changes:
  feat(plat/arm/sgi): increase memory reserved for bl31 image
  feat(plat/arm/sgi): read isolated cpu mpid list from sds

3 years agoMerge "feat(board/rdn2): add a new 'isolated-cpu-list' property" into integration
Madhukar Pappireddy [Wed, 22 Jun 2022 15:45:40 +0000 (17:45 +0200)]
Merge "feat(board/rdn2): add a new 'isolated-cpu-list' property" into integration

3 years agofeat(stm32mp1): optionally use paged OP-TEE
Yann Gautier [Mon, 20 Jun 2022 09:43:17 +0000 (11:43 +0200)]
feat(stm32mp1): optionally use paged OP-TEE

STM32MP13 can encrypt the DDR. OP-TEE is then fully in DDR, and there
is no need for paged image on STM32MP13. The management of the paged
OP-TEE is made conditional, and will be kept only for STM32MP15.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I85ac7aaf6a172c4ee529736113ed40fe66835fd7

3 years agofeat(optee): check paged_image_info
Yann Gautier [Mon, 20 Jun 2022 09:24:22 +0000 (11:24 +0200)]
feat(optee): check paged_image_info

For OP-TEE without pager, the paged image may not be present in OP-TEE
header. We could then pass NULL for paged_image_info to the function
parse_optee_header(). It avoids creating a useless struct for that
non existing image. But we should then avoid assigning header_ep args
that depend on paged_image_info.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I4fdb45a91ac1ba6f912d6130813f5215c7e28c8b

3 years agoMerge changes from topic "st_clk_fixes" into integration
Madhukar Pappireddy [Tue, 21 Jun 2022 15:19:58 +0000 (17:19 +0200)]
Merge changes from topic "st_clk_fixes" into integration

* changes:
  fix(st-clock): correct MISRA C2012 15.6
  fix(st-clock): correctly check ready bit

3 years agofix(st-clock): correct MISRA C2012 15.6
Yann Gautier [Tue, 21 Jun 2022 12:34:13 +0000 (14:34 +0200)]
fix(st-clock): correct MISRA C2012 15.6

Add braces to correct MISRA C2012 15.6 warning:
The body of an iteration-statement or a selection-statement shall be a
compound-statement.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: If26f3732d31df11bf389a16298ec9e9d8a4a2279

3 years agofix(st-clock): correctly check ready bit
Yann Gautier [Tue, 21 Jun 2022 13:12:27 +0000 (15:12 +0200)]
fix(st-clock): correctly check ready bit

The function clk_oscillator_wait_ready() was wrongly checking the set
bit and not the ready bit. Correct that by using osc_data->gate_rdy_id
when calling _clk_stm32_gate_wait_ready().

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: Ida58f14d7f0f326b580ae24b98d6b9f592d2d711

3 years agofeat(plat/arm/sgi): increase memory reserved for bl31 image
Nishant Sharma [Thu, 31 Mar 2022 16:16:21 +0000 (17:16 +0100)]
feat(plat/arm/sgi): increase memory reserved for bl31 image

Increase the size of bl31 image by 52K to accomodate increased size of
xlat table.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: Ic3a8d8be1104adf48d22aa829e2197f710b6b666

3 years agofeat(plat/arm/sgi): read isolated cpu mpid list from sds
Nishant Sharma [Tue, 30 Nov 2021 09:31:48 +0000 (09:31 +0000)]
feat(plat/arm/sgi): read isolated cpu mpid list from sds

Add support to read the list of isolated CPUs from SDS and publish this
list via the non-trusted firmware configuration file for the next stages
of boot software to use.

Isolated CPUs are those that are not to be used on the platform for
various reasons. The isolated CPU list is an array of MPID values of the
CPUs that have to be isolated.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: I4313cf025f4c9e9feffebca2d35b259f5bafce69

3 years agoMerge changes from topic "mb/gic600-errata" into integration
Manish Pandey [Tue, 21 Jun 2022 12:11:47 +0000 (14:11 +0200)]
Merge changes from topic "mb/gic600-errata" into integration

* changes:
  refactor(arm): update BL2 base address
  refactor(nxp): use DPG0 mask from Arm GICv3 header
  fix(gic600): implement workaround to forward highest priority interrupt

3 years agofeat(board/rdn2): add a new 'isolated-cpu-list' property
Nishant Sharma [Tue, 30 Nov 2021 09:38:46 +0000 (09:38 +0000)]
feat(board/rdn2): add a new 'isolated-cpu-list' property

Add a new property named 'isolated-cpu-list' to list the CPUs that are
to be isolated and not used by the platform. The data represented by
this property is formatted as below.

  strutct isolated_cpu_mpid_list {
          uint64_t count;
          uint64_t mpid_list[MAX Number of PE];
  }

Also, the property is pre-initialized to 0 to reserve space for the
property in the dtb. The data for this property is read from SDS and
updated during boot. The number of entries in this list is equal to the
maximum number of PEs present on the platform.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: I4119f899a273ccbf8259e0d711d3a25501c7ec64

3 years agoMerge changes from topic "uart_segregation_v2" into integration
Manish Pandey [Tue, 21 Jun 2022 10:42:08 +0000 (12:42 +0200)]
Merge changes from topic "uart_segregation_v2" into integration

* changes:
  feat(sgi): add page table translation entry for secure uart
  feat(sgi): route TF-A logs via secure uart
  feat(sgi): deviate from arm css common uart related definitions

3 years agofix(nxp-ddr): fix firmware buffer re-mapping issue
Jiafei Pan [Fri, 8 Apr 2022 03:10:40 +0000 (11:10 +0800)]
fix(nxp-ddr): fix firmware buffer re-mapping issue

Firmware buffer has already been mapped when loading 1D firmware,
so the same buffer address will be re-mapped when loading 2D
firmware. Move the buffer mapping to be out of load_fw().

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Change-Id: Idb29d504bc482a1e7ca58bc51bec09ffe6068324

3 years agofeat(spm): add tpm event log node to spmc manifest
Olivier Deprez [Wed, 15 Jun 2022 09:18:48 +0000 (11:18 +0200)]
feat(spm): add tpm event log node to spmc manifest

Add the TPM event log node to the SPMC manifest such that the TF-A
measured boot infrastructure fills the properties with event log address
for components measured by BL2 at boot time.
For a SPMC there is a particular interest with SP measurements.
In the particular case of Hafnium SPMC, the tpm event log node is not
yet consumed, but the intent is later to pass this information to an
attestation SP.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Ic30b553d979532c5dad9ed6d419367595be5485e

3 years agofeat(sgi): add page table translation entry for secure uart
Rohit Mathew [Mon, 13 Dec 2021 15:33:04 +0000 (15:33 +0000)]
feat(sgi): add page table translation entry for secure uart

Add page table translation entry for secure uart so that logs from
secure partition can be routed via the same.

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Change-Id: I3416d114bcee13824a7d0861ee54fb799e154897

3 years agofeat(sgi): route TF-A logs via secure uart
Rohit Mathew [Mon, 13 Dec 2021 15:40:25 +0000 (15:40 +0000)]
feat(sgi): route TF-A logs via secure uart

Route the boot, runtime and crash stage logs via secure UART port
instead of the existing use of non-secure UART. This aligns with the
security state the PE is in when logs are put out. In addition to this,
this allows consolidation of the UART related macros across all the
variants of the Neoverse reference design platforms.

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Change-Id: I417f5d16457b602c94da4c74b4d88bba03da7462

3 years agofeat(sgi): deviate from arm css common uart related definitions
Rohit Mathew [Mon, 13 Dec 2021 13:50:15 +0000 (13:50 +0000)]
feat(sgi): deviate from arm css common uart related definitions

The Neoverse reference design platforms will migrate to use different
set of secure and non-secure UART ports. This implies that the board
specific macros defined in the common Arm platform code will no longer
be usable for Neoverse reference design platforms.

In preparation for migrating to a different set of UART ports, add a
Neoverse reference design platform specific copy of the board
definitions. The value of these definitions will be changed in
subsequent patches.

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Change-Id: I1ab17a3f02c8180b63be24e9266f7129beee819f

3 years agofix(measured-boot): clear the entire digest array of Startup Locality event
Manish V Badarkhe [Thu, 9 Jun 2022 21:39:32 +0000 (22:39 +0100)]
fix(measured-boot): clear the entire digest array of Startup Locality event

According to TCG PC Client Platform Firmware Profile Specification
(Section 10.2.2, TCG_PCR_EVENT2 Structure, and 10.4.5 EV_NO_ACTION Event
Types), all EV_NO_ACTION events shall set TCG_PCR_EVENT2.digests to all
0x00's for each allocated Hash algorithm.

Right now, this is not enforced. Only part of the buffer is zeroed due
to the wrong macro being used for the size of the buffer in the clearing
operation (TPM_ALG_ID instead of TCG_DIGEST_SIZE). This could confuse
a TPM event log parser.

Also, add an assertion to ensure that the Event Log size is large enough
before writing the Event Log header.

Change-Id: I6d4bc3fb28fd10c227e33c8c7bb4a40b08c3fd5e
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
3 years agoMerge "docs(security): update security advisory for CVE-2022-23960" into integration
Manish Pandey [Fri, 17 Jun 2022 09:10:35 +0000 (11:10 +0200)]
Merge "docs(security): update security advisory for CVE-2022-23960" into integration

3 years agodocs(security): update security advisory for CVE-2022-23960
Bipin Ravi [Thu, 16 Jun 2022 21:32:22 +0000 (16:32 -0500)]
docs(security): update security advisory for CVE-2022-23960

Update advisory document following Spectre-BHB mitigation support for
additional CPUs.

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

3 years agoMerge "fix(errata): workaround for Neoverse-V1 erratum 2372203" into integration
Madhukar Pappireddy [Thu, 16 Jun 2022 21:30:22 +0000 (23:30 +0200)]
Merge "fix(errata): workaround for Neoverse-V1 erratum 2372203" into integration

3 years agoMerge "fix(errata): workaround for Cortex-A77 erratum 2356587" into integration
Madhukar Pappireddy [Thu, 16 Jun 2022 20:06:40 +0000 (22:06 +0200)]
Merge "fix(errata): workaround for Cortex-A77 erratum 2356587" into integration

3 years agorefactor(imx): update config of mbedtls support
laurenw-arm [Thu, 16 Jun 2022 18:40:48 +0000 (13:40 -0500)]
refactor(imx): update config of mbedtls support

Pull in MbedTLS support for sha512 when greater than sha256 is required
based on refactoring for hash algorithm selection for Measured Boot.

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

3 years agorefactor(qemu): update configuring mbedtls support
laurenw-arm [Thu, 16 Jun 2022 18:36:52 +0000 (13:36 -0500)]
refactor(qemu): update configuring mbedtls support

Pull in MbedTLS support for sha512 when greater than sha256 is required
based on refactoring for hash algorithm selection for Measured Boot.

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

3 years agorefactor(measured-boot): mb algorithm selection
laurenw-arm [Tue, 31 May 2022 21:39:09 +0000 (16:39 -0500)]
refactor(measured-boot): mb algorithm selection

With RSS now introduced, we have 2 Measured Boot backends. Both backends
can be used in the same firmware build with potentially different hash
algorithms, so now there can be more than one hash algorithm in a build.
Therefore the logic for selecting the measured boot hash algorithm needs
to be updated and the coordination of algorithm selection added. This is
done by:

- Adding MBOOT_EL_HASH_ALG for Event Log to define the hash algorithm
to replace TPM_HASH_ALG, removing reference to TPM.

- Adding MBOOT_RSS_HASH_ALG for RSS to define the hash algorithm to
replace TPM_HASH_ALG.

- Coordinating MBOOT_EL_HASH_ALG and MBOOT_RSS_HASH_ALG to define the
Measured Boot configuration macros through defining
TF_MBEDTLS_MBOOT_USE_SHA512 to pull in SHA-512 support if either
backend requires a stronger algorithm than SHA-256.

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

3 years agofix(errata): workaround for Cortex-A77 erratum 2356587
Bipin Ravi [Wed, 8 Jun 2022 20:27:00 +0000 (15:27 -0500)]
fix(errata): workaround for Cortex-A77 erratum 2356587

Cortex-A77 erratum 2356587 is a cat B erratum that applies to revisions
r0p0 - r1p1 and is still open. The workaround is to set bit[0] of
CPUACTLR2_EL1 to force PLDW/PFRM ST to behave like PLD/PRFM LD and not
cause invalidations to other PE caches.

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

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

3 years agofix(errata): workaround for Neoverse-V1 erratum 2372203
Bipin Ravi [Tue, 14 Jun 2022 22:09:23 +0000 (17:09 -0500)]
fix(errata): workaround for Neoverse-V1 erratum 2372203

Neoverse-V1 erratum 2372203 is a cat B erratum that applies to revisions
r0p0 - r1p1 and is still open. The workaround is to set bit[40] of
CPUACTLR2_EL1 to disable folding of demand requests into older
prefetches with L2 miss requests outstanding.

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

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

3 years agofix(measured-boot): fix verbosity level of RSS digests traces
Sandrine Bailleux [Wed, 15 Jun 2022 12:21:17 +0000 (14:21 +0200)]
fix(measured-boot): fix verbosity level of RSS digests traces

Most traces displayed by log_measurement() use the INFO verbosity
level. Only the digests are unconditionally printed, regardless of
the verbosity level. As a result, when the verbosity level is set
lower than INFO (typically in release mode), only the digests are
printed, which look weird and out of context.

Change-Id: I0220977c35dcb636f1510d8a7a0a9e3d92548bdc
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agorefactor(arm): update BL2 base address
Manish V Badarkhe [Mon, 13 Jun 2022 17:23:01 +0000 (18:23 +0100)]
refactor(arm): update BL2 base address

BL2 base address updated to provide enough space for BL31 in
Trusted SRAM when building with BL2_AT_EL3 and ENABLE_PIE options.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: Ieaba00d841648add855feb99b7923a4b0cccfb08

3 years agorefactor(nxp): use DPG0 mask from Arm GICv3 header
Manish V Badarkhe [Mon, 6 Jun 2022 11:08:35 +0000 (12:08 +0100)]
refactor(nxp): use DPG0 mask from Arm GICv3 header

Removed GICR_CTLR_DPG0_MASK definition from platform GIC header file
as Arm GICv3 header file added its definition.

Change-Id: Ieec43aeef96b9b6c8a7f955a8d145be6e4b183c5
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
3 years agofix(gic600): implement workaround to forward highest priority interrupt
Manish V Badarkhe [Mon, 9 May 2022 20:55:19 +0000 (21:55 +0100)]
fix(gic600): implement workaround to forward highest priority interrupt

If the interrupt being targeted is released from the CPU before the
CLEAR command is sent to the CPU then a subsequent SET command may not
be delivered in a finite time. To workaround this, issue an unblocking
event by toggling GICR_CTLR.DPG* bits after clearing the cpu group
enable (EnableGrp* bits of GIC CPU interface register)
This fix is implemented as per the errata 2384374-part 2 workaround
mentioned here:
https://developer.arm.com/documentation/sden892601/latest/

Change-Id: I13926ceeb7740fa4c05cc5b43170e7ce49598f70
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
3 years agoMerge "build(changelog): add stm32mp13 and stm32mp15 scopes" into integration
Madhukar Pappireddy [Wed, 15 Jun 2022 15:15:47 +0000 (17:15 +0200)]
Merge "build(changelog): add stm32mp13 and stm32mp15 scopes" into integration

3 years agofix(zynqmp): move bl31 with DEBUG=1 back to OCM
Michal Simek [Wed, 15 Jun 2022 12:19:56 +0000 (14:19 +0200)]
fix(zynqmp): move bl31 with DEBUG=1 back to OCM

By default placing bl31 to addrexx 0x1000 is not good. Because this
location is used by U-Boot SPL. That's why move TF-A back to OCM where it
should be placed. BL31_BASE address exactly matches which requested address
for U-BOOT SPL boot flow.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Change-Id: I608c1b88baffec538c6ae528f057820e34971c4c

3 years agofeat(arm): retrieve the right ROTPK for cca
laurenw-arm [Thu, 21 Apr 2022 21:53:37 +0000 (16:53 -0500)]
feat(arm): retrieve the right ROTPK for cca

The cca chain of trust involves 3 root-of-trust public keys:
- The CCA components ROTPK.
- The platform owner ROTPK (PROTPK).
- The secure world ROTPK (SWD_ROTPK).

Use the cookie argument as a key ID for plat_get_rotpk_info() to return
the appropriate one.

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

3 years agofeat(arm): add support for cca CoT
laurenw-arm [Thu, 21 Apr 2022 21:50:49 +0000 (16:50 -0500)]
feat(arm): add support for cca CoT

- Use the development PROTPK and SWD_ROTPK if using cca CoT.

- Define a cca CoT build flag for the platform code to provide
different implementations where needed.

- When ENABLE_RME=1, CCA CoT is selected by default on Arm
platforms if no specific CoT is specified by the user.

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

3 years agofeat(arm): provide some swd rotpk files
laurenw-arm [Thu, 21 Apr 2022 21:31:07 +0000 (16:31 -0500)]
feat(arm): provide some swd rotpk files

When using the new cca chain of trust, a new root of trust key is needed
to authenticate the images belonging to the secure world. Provide a
development one to deploy this on Arm platforms.

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

3 years agobuild(tbbr): drive cert_create changes for cca CoT
laurenw-arm [Thu, 21 Apr 2022 21:25:52 +0000 (16:25 -0500)]
build(tbbr): drive cert_create changes for cca CoT

The build system needs to drive the cert_create tool in a slightly
different manner when using the cca chain of trust.

- It needs to pass it the plat, core_swd, and swd ROT key files.

- It must now generate the cca, core_swd, and plat key certificates,
and exclude the non-relevant certificates.

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

3 years agorefactor(arm): add cca CoT certificates to fconf
laurenw-arm [Thu, 21 Apr 2022 22:03:30 +0000 (17:03 -0500)]
refactor(arm): add cca CoT certificates to fconf

Adding support in fconf for the cca CoT certificates for cca, core_swd,
and plat key.

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

3 years agofeat(fiptool): add cca, core_swd, plat cert in FIP
laurenw-arm [Thu, 21 Apr 2022 21:36:26 +0000 (16:36 -0500)]
feat(fiptool): add cca, core_swd, plat cert in FIP

Added support for cca CoT in the fiptool by adding the cca,
core_swd, and plat key certificates.

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

3 years agofeat(cert_create): define the cca chain of trust
laurenw-arm [Thu, 21 Apr 2022 21:21:53 +0000 (16:21 -0500)]
feat(cert_create): define the cca chain of trust

Selection of the cca chain of trust is done through the COT build
option:

> make COT=cca

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

3 years agofeat(cca): introduce new "cca" chain of trust
laurenw-arm [Thu, 21 Apr 2022 20:49:00 +0000 (15:49 -0500)]
feat(cca): introduce new "cca" chain of trust

This chain of trust is targeted at Arm CCA solutions and defines 3
independent signing domains:

1) CCA signing domain. The Arm CCA Security Model (Arm DEN-0096.A.a) [1]
refers to the CCA signing domain as the provider of CCA components
running on the CCA platform. The CCA signing domain might be independent
from other signing domains providing other firmware blobs.

The CCA platform is a collective term used to identify all hardware and
firmware components involved in delivering the CCA security guarantee.
Hence, all hardware and firmware components on a CCA enabled system that
a Realm is required to trust.

In the context of TF-A, this corresponds to BL1, BL2, BL31, RMM and
associated configuration files.

The CCA signing domain is rooted in the Silicon ROTPK, just as in the
TBBR CoT.

2) Non-CCA Secure World signing domain. This includes SPMC (and
associated configuration file) as the expected BL32 image as well as
SiP-owned secure partitions. It is rooted in a new SiP-owned key called
Secure World ROTPK, or SWD_ROTPK for short.

3) Platform owner signing domain. This includes BL33 (and associated
configuration file) and the platform owner's secure partitions. It is
rooted in the Platform ROTPK, or PROTPK.

[1] https://developer.arm.com/documentation/DEN0096/A_a

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

3 years agobuild(changelog): add new scope for CCA
laurenw-arm [Wed, 1 Jun 2022 18:45:39 +0000 (13:45 -0500)]
build(changelog): add new scope for CCA

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

3 years agorefactor(fvp): increase bl2 size when bl31 in DRAM
laurenw-arm [Wed, 8 Jun 2022 21:50:42 +0000 (16:50 -0500)]
refactor(fvp): increase bl2 size when bl31 in DRAM

Increase the space for BL2 by 0xC000 to accommodate the increase in size
of BL2 when ARM_BL31_IN_DRAM is set.

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

3 years agoMerge "fix(errata): workaround for Neoverse-V1 erratum 2294912" into integration
Madhukar Pappireddy [Mon, 13 Jun 2022 20:55:09 +0000 (22:55 +0200)]
Merge "fix(errata): workaround for Neoverse-V1 erratum 2294912" into integration

3 years agofix(errata): workaround for Neoverse-V1 erratum 2294912
Bipin Ravi [Wed, 8 Jun 2022 21:28:46 +0000 (16:28 -0500)]
fix(errata): workaround for Neoverse-V1 erratum 2294912

Neoverse-V1 erratum 2294912 is a cat B erratum that applies to revisions
r0p0 - r1p1 and is still open. The workaround is to set bit[0] of
CPUACTLR2_EL1 to force PLDW/PFRM ST to behave like PLD/PRFM LD and not
cause invalidations to other PE caches.

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

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

3 years agoMerge "feat(zynqmp): add support for xck24 silicon" into integration
Madhukar Pappireddy [Mon, 13 Jun 2022 18:12:31 +0000 (20:12 +0200)]
Merge "feat(zynqmp): add support for xck24 silicon" into integration

3 years agoMerge "refactor(context mgmt): refactor EL2 context save and restore functions" into...
Manish Pandey [Mon, 13 Jun 2022 12:18:57 +0000 (14:18 +0200)]
Merge "refactor(context mgmt): refactor EL2 context save and restore functions" into integration

3 years agoMerge changes from topic "jc/detect_feat" into integration
Manish Pandey [Fri, 10 Jun 2022 09:57:12 +0000 (11:57 +0200)]
Merge changes from topic "jc/detect_feat" into integration

* changes:
  feat(trbe): add trbe under feature detection mechanism
  feat(brbe): add brbe under feature detection mechanism

3 years agoMerge "fix(mmc): remove broken, unsecure, unused eMMC RPMB handling" into integration
Madhukar Pappireddy [Thu, 9 Jun 2022 14:23:04 +0000 (16:23 +0200)]
Merge "fix(mmc): remove broken, unsecure, unused eMMC RPMB handling" into integration

3 years agorefactor(context mgmt): refactor EL2 context save and restore functions
Zelalem Aweke [Mon, 4 Apr 2022 22:42:48 +0000 (17:42 -0500)]
refactor(context mgmt): refactor EL2 context save and restore functions

This patch splits the el2_sysregs_context_save/restore functions
into multiple functions based on features. This will allow us to
selectively save and restore EL2 context registers based on
features enabled for a particular configuration.

For now feature build flags are used to decide which registers
to save and restore. The long term plan is to dynamically check
for features that are enabled and then save/restore registers
accordingly. Splitting el2_sysregs_context_save/restore functions
into smaller assembly functions makes that task easier. For more
information please take a look at:
https://trustedfirmware-a.readthedocs.io/en/latest/design_documents/context_mgmt_rework.html

Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
Change-Id: I1819a9de8b70fa35c8f45568908025f790c4808c

3 years agoMerge "fix(rme/fid): refactor RME fid macros" into integration
Soby Mathew [Wed, 8 Jun 2022 11:37:33 +0000 (13:37 +0200)]
Merge "fix(rme/fid): refactor RME fid macros" into integration

3 years agofix(mmc): remove broken, unsecure, unused eMMC RPMB handling
Ahmad Fatoum [Wed, 8 Jun 2022 06:42:24 +0000 (08:42 +0200)]
fix(mmc): remove broken, unsecure, unused eMMC RPMB handling

Replay-protected memory block access is enabled by writing 0x3
to PARTITION_ACCESS (bit[2:0]). Instead the driver is using the
first boot partition, which does not provide any playback protection.
Additionally, it unconditionally activates the first boot partition,
potentially breaking boot for SoCs that consult boot partitions,
require boot ack or downgrading to an old bootloader if the first
partition happens to be the inactive one.

Also, neither enabling or disabling the RPMB observes the
PARTITION_SWITCH_TIME. As there are no in-tree users for these
functions, drop them for now until a properly functional implementation
is added. That one will likely share most code with the existing boot
partition switch, which doesn't suffer from the described issues.

Change-Id: Ia4a3f738f60a0dbcc33782f868cfbb1e1c5b664a
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
3 years agoMerge changes from topic "stm32mp-emmc-boot-fip" into integration
Madhukar Pappireddy [Tue, 7 Jun 2022 22:14:59 +0000 (00:14 +0200)]
Merge changes from topic "stm32mp-emmc-boot-fip" into integration

* changes:
  feat(stm32mp1): extend STM32MP_EMMC_BOOT support to FIP format
  refactor(mmc): replace magic value with new PART_CFG_BOOT_PARTITION_NO_ACCESS
  refactor(mmc): export user/boot partition switch functions

3 years agoMerge changes from topic "st-pinctrl" into integration
Madhukar Pappireddy [Tue, 7 Jun 2022 14:47:12 +0000 (16:47 +0200)]
Merge changes from topic "st-pinctrl" into integration

* changes:
  feat(stm32mp1-fdts): change pin-controller to pinctrl
  feat(st): search pinctrl node by compatible

3 years agofeat(stm32mp1-fdts): change pin-controller to pinctrl
Yann Gautier [Fri, 11 Mar 2022 13:23:43 +0000 (14:23 +0100)]
feat(stm32mp1-fdts): change pin-controller to pinctrl

Due to commit updating kernel yaml file [1], we need to align TF-A DT
files to what is done in kernel.

[1] c09acbc499e8 ("dt-bindings: pinctrl: use pinctrl.yaml")

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Id717162e42d3959339d6c01883e87a9d4399f5d9