Commit Graph

11359 Commits

Author SHA1 Message Date
Yann Gautier
de1ab9fe05 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
2022-07-05 17:03:24 +02:00
Patrick Delaunay
10f6dc7893 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
2022-07-05 17:03:19 +02:00
Lionel Debieve
1dab28f99d feat(stm32mp1): retrieve FIP partition by type UUID
Modify the function to retrieve the FIP partition looking
the UUID type define for FIP. If not defined, compatibility
used to find the FIP partition by name.

Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
Change-Id: I76634dea891f51d913a549fb9a077cf7284d5cb2
2022-07-05 14:46:10 +02:00
Lionel Debieve
564f5d4776 feat(guid-partition): allow to find partition by type UUID
Add function to return the partition by type.

Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
Change-Id: I87729dc5e68fbc45a523c894b67595b0079dd8fb
2022-07-05 14:46:02 +02:00
Yann Gautier
8fc6fb5cae refactor(stm32mp1): update PLAT_PARTITION_MAX_ENTRIES
Fix the maximum partition number to a default value. It must
also take care of the extra partition when FWU feature is enabled.

Change-Id: Ib64b1f19f1f0514f7e89d35fc367facd6df54bed
Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2022-07-05 14:39:30 +02:00
Manish Pandey
e45ffa18d3 Merge "feat(sme): fall back to SVE if SME is not there" into integration 2022-07-05 14:32:39 +02:00
Soby Mathew
717daadce0 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
2022-07-05 12:03:49 +02:00
Mark Brown
26a3351eda 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
2022-07-05 11:37:18 +02:00
Javier Almansa Sobrino
6944729086 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
2022-07-05 10:41:18 +02:00
Olivier Deprez
896fd4e2ff Merge "feat(spmd): avoid spoofing in FF-A direct request" into integration 2022-07-05 10:21:59 +02:00
Sandrine Bailleux
1ae014ddca Merge "feat(arm): forbid running RME-enlightened BL31 from DRAM" into integration 2022-07-05 10:21:36 +02:00
Javier Almansa Sobrino
1d0ca40e90 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
2022-07-04 18:46:34 +01:00
Javier Almansa Sobrino
dc65ae4643 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
2022-07-04 18:46:01 +01:00
Javier Almansa Sobrino
8c980a4a46 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
2022-07-04 18:45:58 +01:00
Sandrine Bailleux
1164a59cb1 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>
2022-07-04 11:59:11 +02:00
Shruti
5519f07cd4 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>
2022-07-01 11:54:17 +01:00
Sandrine Bailleux
2d8e80c2a2 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
2022-06-30 16:47:49 +02:00
Manish Pandey
0652696243 Merge "feat(stm32mp15): manage OP-TEE shared memory" into integration 2022-06-30 16:29:22 +02:00
Yann Gautier
722ca35ecc 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
2022-06-30 14:19:45 +02:00
Joanna Farley
57ab749758 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
2022-06-30 00:36:46 +02:00
Madhukar Pappireddy
cb666b39d8 Merge "fix(sptool): fix concurrency issue for SP packages" into integration 2022-06-29 15:27:32 +02:00
Daniel Boulby
0aaa382fe2 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>
2022-06-28 12:27:20 +01:00
Joanna Farley
e0061a22a5 Merge "docs: add Manish Badarkhe to maintainer list" into integration 2022-06-28 13:23:18 +02:00
Manish Pandey
caca0e57b8 Merge "feat(stm32mp1): save boot auth status and partition info" into integration 2022-06-28 10:53:01 +02:00
Sandrine Bailleux
96f715eb84 Merge "fix(measured-boot): clear the entire digest array of Startup Locality event" into integration 2022-06-28 09:33:44 +02:00
Madhukar Pappireddy
4bbdc3912b 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
2022-06-28 03:43:48 +02:00
Jassi Brar
a19382521c 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>
2022-06-27 13:12:24 -05:00
Jassi Brar
19aaeea00b 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>
2022-06-27 13:12:24 -05:00
Jassi Brar
48ab390444 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>
2022-06-27 13:12:24 -05:00
Jassi Brar
3ba82d5ff1 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>
2022-06-27 13:12:24 -05:00
Manish Pandey
8d76a4a687 docs: add Manish Badarkhe to maintainer list
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I8fd116962bb9775e2f96faee37bbf73073e15512
2022-06-27 18:08:15 +01:00
Madhukar Pappireddy
24f51f214e Merge "feat(auth): enable MBEDTLS_CHECK_RETURN_WARNING" into integration 2022-06-27 18:01:12 +02:00
Manish Pandey
f95ddea6ce Merge changes from topic "st_optee_paged" into integration
* changes:
  feat(stm32mp1): optionally use paged OP-TEE
  feat(optee): check paged_image_info
2022-06-27 18:00:50 +02:00
Igor Opaniuk
ab2b325c1a 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
2022-06-27 18:56:55 +03:00
Lauren Wehrmeister
02450800bc 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
2022-06-27 17:32:59 +02:00
Madhukar Pappireddy
6f614219c7 Merge "fix(nxp-ddr): fix firmware buffer re-mapping issue" into integration 2022-06-27 15:46:58 +02:00
Sandrine Bailleux
a4e485d7bf 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>
2022-06-27 10:33:03 +02:00
Sandrine Bailleux
63d49c49c2 Merge "fix(measured-boot): fix verbosity level of RSS digests traces" into integration 2022-06-27 09:37:39 +02:00
Jacky Bai
9d3249de80 feat(imx8m): keep pu domains in default state during boot stage
No need to keep all PU domains on as the full power domain driver
support has been added.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Iec22dcabbbfe3f38b915104a437d396d7b1bb2d8
2022-06-27 09:27:11 +08:00
Jacky Bai
44dea5444b feat(imx8m): add the PU power domain support on imx8mm/mn
Add the PU power domain support for imx8mm/mn.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: Ib88b4b5db956fdf2c77d2f2f3723d61a7060409d
2022-06-27 09:27:11 +08:00
Jacky Bai
66d399e454 feat(imx8m): add the anamix pll override setting
Add PLL power down override & bypass support when
system enter DSM mode.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I50cd6b82151961ab849f58714a8c307d3f7f4166
2022-06-27 09:27:11 +08:00
Jacky Bai
9c336f6118 feat(imx8m): add the ddr frequency change support for imx8m family
Add the DDR frequency change support.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: If1167785796b8678c351569b83d2922c66f6e530
2022-06-27 09:27:11 +08:00
Jacky Bai
2003fa94dc feat(imx8mn): enable dram retention suuport on imx8mn
Enable dram retention support on i.MX8MN.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I9b3a08efbbd154b2fc7e41bedb36a4d4e3784448
2022-06-27 09:27:11 +08:00
Jacky Bai
b7abf485ee feat(imx8mm): enable dram retention suuport on imx8mm
Enable dram retention support on i.MX8MM.

Change-Id: I76ada615d386602e551d572ff4e60ee19bb8e418
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
2022-06-27 09:27:11 +08:00
Jacky Bai
c71793c647 feat(imx8m): add dram retention flow for imx8m family
Add the dram retention flow for i.MX8M SoC family.

Change-Id: Ifb8ba5b2f6f002133cf47c07fef73df29c51c890
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
2022-06-27 09:27:11 +08:00
Manish Pandey
9316149ef8 Merge "fix(zynqmp): move bl31 with DEBUG=1 back to OCM" into integration 2022-06-24 13:43:41 +02:00
Manish Pandey
40366cb69d 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
2022-06-24 13:40:01 +02:00
Manish Pandey
f324949821 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
2022-06-24 12:44:06 +02:00
Madhukar Pappireddy
3f261a564e 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
2022-06-22 17:45:45 +02:00
Madhukar Pappireddy
0f93168c01 Merge "feat(board/rdn2): add a new 'isolated-cpu-list' property" into integration 2022-06-22 17:45:40 +02:00