]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
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(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 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

3 years agofeat(st): search pinctrl node by compatible
Yann Gautier [Fri, 11 Mar 2022 13:18:13 +0000 (14:18 +0100)]
feat(st): search pinctrl node by compatible

Instead of searching pinctrl node with its name, search with its
compatible. This will be necessary before pin-controller name changes
to pinctrl due to kernel yaml changes.

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

3 years agoMerge "fix(changelog): fix the broken link to commitlintrc.js" into integration
Manish Pandey [Tue, 7 Jun 2022 12:05:42 +0000 (14:05 +0200)]
Merge "fix(changelog): fix the broken link to commitlintrc.js" into integration

3 years agofix(changelog): fix the broken link to commitlintrc.js
Jayanth Dodderi Chidanand [Tue, 7 Jun 2022 11:01:41 +0000 (12:01 +0100)]
fix(changelog): fix the broken link to commitlintrc.js

The link to commitlintrc.js file in the v2.7 changelog
is updated.

Change-Id: I24ee736180d8df72b2d831e110a9a3a80a6d9862
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
3 years agofix(rme/fid): refactor RME fid macros
Subhasish Ghosh [Thu, 12 May 2022 11:22:17 +0000 (12:22 +0100)]
fix(rme/fid): refactor RME fid macros

Refactored RME FID macros to simplify usage.

Signed-off-by: Subhasish Ghosh <subhasish.ghosh@arm.com>
Change-Id: I68f51f43d6c100d90069577412c2e495fe7b7e40

3 years agoMerge "feat(imx8mq): add 100us delay after USB OTG SRC bit 0 clear" into integration
Madhukar Pappireddy [Mon, 6 Jun 2022 14:18:20 +0000 (16:18 +0200)]
Merge "feat(imx8mq): add 100us delay after USB OTG SRC bit 0 clear" into integration

3 years agoMerge "fix(imx8mq): correct architected counter frequency" into integration
Madhukar Pappireddy [Mon, 6 Jun 2022 14:17:00 +0000 (16:17 +0200)]
Merge "fix(imx8mq): correct architected counter frequency" into integration

3 years agoMerge "fix(plat/zynqmp): fix coverity scan warnings" into integration
Madhukar Pappireddy [Fri, 3 Jun 2022 17:44:00 +0000 (19:44 +0200)]
Merge "fix(plat/zynqmp): fix coverity scan warnings" into integration

3 years agoMerge "feat(plat/xilinx/zynqmp): optimization on pinctrl_functions" into integration
Madhukar Pappireddy [Thu, 2 Jun 2022 17:33:24 +0000 (19:33 +0200)]
Merge "feat(plat/xilinx/zynqmp): optimization on pinctrl_functions" into integration

3 years agoMerge changes Idafbe02d,Ib01eb5ce into integration
Madhukar Pappireddy [Thu, 2 Jun 2022 15:39:57 +0000 (17:39 +0200)]
Merge changes Idafbe02d,Ib01eb5ce into integration

* changes:
  fix(scmi-msg): base: fix protocol list querying
  fix(scmi-msg): base: fix protocol list response size

3 years agofeat(stm32mp1): extend STM32MP_EMMC_BOOT support to FIP format
Ahmad Fatoum [Thu, 19 May 2022 05:42:33 +0000 (07:42 +0200)]
feat(stm32mp1): extend STM32MP_EMMC_BOOT support to FIP format

STM32MP_EMMC_BOOT allowed placing SSBL into the eMMC boot
partition along with FSBL. This allows atomic update of both
FSBL and SSBL at the same time. Previously, this was only
possible for the FSBL, as the eMMC layout expected by TF-A
had a single SSBL GPT partition in the eMMC user area.
TEE binaries remained in dedicated GPT partitions whether
STM32MP_EMMC_BOOT was on or off.

The new FIP format collects SSBL and TEE partitions into
a single binary placed into a GPT partition.
Extend STM32MP_EMMC_BOOT, so eMMC-booted TF-A first uses
a FIP image placed at offset 256K into the active eMMC boot
partition. If no FIP magic is detected at that offset or if
STM32MP_EMMC_BOOT is disabled, the GPT on the eMMC user area
will be consulted as before.

This allows power fail-safe update of all firmware using the
built-in eMMC boot selector mechanism, provided it fits into
the boot partition - SZ_256K. SZ_256K was chosen because it's
the same offset used with the legacy format and because it's
the size of the on-chip SRAM, where the STM32MP15x BootROM
loads TF-A into. As such, TF-A may not exceed this size limit
for existing SoCs.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Change-Id: Id7bec45652b3a289ca632d38d4b51316c5efdf8d

3 years agorefactor(mmc): replace magic value with new PART_CFG_BOOT_PARTITION_NO_ACCESS
Ahmad Fatoum [Tue, 31 May 2022 08:03:04 +0000 (10:03 +0200)]
refactor(mmc): replace magic value with new PART_CFG_BOOT_PARTITION_NO_ACCESS

Disabling access to the boot partition reverts the MMC to read from the
user area. Add a macro to make this clearer.

Suggested-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Change-Id: I34a5a987980bb4690d08d255f465b11a4697ed5a

3 years agorefactor(mmc): export user/boot partition switch functions
Ahmad Fatoum [Mon, 23 May 2022 15:06:37 +0000 (17:06 +0200)]
refactor(mmc): export user/boot partition switch functions

At the moment, mmc_boot_part_read_blocks() takes care to switch
to the boot partition before transfer and back afterwards.
This can introduce large overhead when reading small chunks.
Give consumers of the API more control by exporting
mmc_part_switch_current_boot() and mmc_part_switch_user().

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Change-Id: Ib641f188071bb8e0196f4af495ec9ad4a292284f

3 years agoMerge "fix(lib/psa): fix Null pointer dereference error" into integration
Madhukar Pappireddy [Thu, 2 Jun 2022 15:26:53 +0000 (17:26 +0200)]
Merge "fix(lib/psa): fix Null pointer dereference error" into integration

3 years agoMerge "fix(stm32mp1): fdts: stm32mp1: align DDR regulators with new driver" into...
Madhukar Pappireddy [Thu, 2 Jun 2022 15:12:24 +0000 (17:12 +0200)]
Merge "fix(stm32mp1): fdts: stm32mp1: align DDR regulators with new driver" into integration

3 years agofix(stm32mp1): fdts: stm32mp1: align DDR regulators with new driver
Ahmad Fatoum [Thu, 2 Jun 2022 04:28:31 +0000 (06:28 +0200)]
fix(stm32mp1): fdts: stm32mp1: align DDR regulators with new driver

With recent changes, TF-A now panics on MC-1, Avenger96 and Odyssey:

  NOTICE:  CPU: STM32MP157C?? Rev.B
  NOTICE:  Model: Linux Automation MC-1 board
  ERROR:   regul ldo3: max value 750 is invalid
  PANIC at PC : 0x2ffeebb7

as the driver takes great offense at the content of the device
tree. The parts in question were copy-pasted from ST DTs, but
those ST DTs were fixed by commit 67d95409baae
("refactor(stm32mp1-fdts): update regulator description").

Fix the breakage by transplanting the same changes into all
remaining STM32MP1 DTs.

Change was boot-tested on MC-1, but only build tested for the
other two.

Fixes: bba9fdee589f ("feat(stm32mp1): add regulator framework compilation")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Change-Id: I143d0091625f62c313b3b71449c9ad99583d01c8

3 years agoMerge "docs(changelog): changelog for v2.7 release" into integration
Joanna Farley [Wed, 1 Jun 2022 15:02:46 +0000 (17:02 +0200)]
Merge "docs(changelog): changelog for v2.7 release" into integration

3 years agodocs(changelog): changelog for v2.7 release
Jayanth Dodderi Chidanand [Thu, 19 May 2022 10:03:07 +0000 (11:03 +0100)]
docs(changelog): changelog for v2.7 release

Change-Id: I573e5eb3c7fad097892292c8a967dc02d72d12e6
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
3 years agoMerge changes from topic "sb/threat-model" into integration
Joanna Farley [Wed, 1 Jun 2022 12:37:30 +0000 (14:37 +0200)]
Merge changes from topic "sb/threat-model" into integration

* changes:
  docs(threat-model): broaden the scope of threat #05
  docs(threat-model): emphasize whether mitigations are implemented

3 years agoMerge changes from topic "od/spm-doc-update" into integration
Joanna Farley [Wed, 1 Jun 2022 12:29:45 +0000 (14:29 +0200)]
Merge changes from topic "od/spm-doc-update" into integration

* changes:
  docs(spm): refresh FF-A SPM design doc
  docs(spm): update FF-A manifest binding

3 years agodocs(spm): refresh FF-A SPM design doc
Olivier Deprez [Thu, 28 Apr 2022 16:18:36 +0000 (18:18 +0200)]
docs(spm): refresh FF-A SPM design doc

- Move manifest binding doc as a dedicated SPM doc section.
- Highlight introduction of an EL3 FF-A SPM solution.
- Refresh TF-A build options.
- Refresh PE MMU configuration section.
- Add arch extensions for security hardening section.
- Minor corrections, typos fixes and rephrasing.

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

3 years agodocs(spm): update FF-A manifest binding
Olivier Deprez [Thu, 12 May 2022 16:17:05 +0000 (18:17 +0200)]
docs(spm): update FF-A manifest binding

- Add security state attribute to memory and device regions.
- Rename device region reg attribution to base-address aligned with
  memory regions.
- Add pages-count field to device regions.
- Refresh interrupt attributes description in device regions.

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

3 years agodocs(threat-model): broaden the scope of threat #05
Sandrine Bailleux [Mon, 16 May 2022 11:57:38 +0000 (13:57 +0200)]
docs(threat-model): broaden the scope of threat #05

 - Cite crash reports as an example of sensitive
   information. Previously, it might have sounded like this was the
   focus of the threat.

 - Warn about logging high-precision timing information, as well as
   conditionally logging (potentially nonsensitive) information
   depending on sensitive information.

Change-Id: I33232dcb1e4b5c81efd4cd621b24ab5ac7b58685
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agodocs(threat-model): emphasize whether mitigations are implemented
Sandrine Bailleux [Fri, 13 May 2022 10:39:56 +0000 (12:39 +0200)]
docs(threat-model): emphasize whether mitigations are implemented

For each threat, we now separate:
 - how to mitigate against it;
 - whether TF-A currently implements these mitigations.

A new "Mitigations implemented?" box is added to each threat to
provide the implementation status. For threats that are partially
mitigated from platform code, the original text is improved to make
these expectations clearer. The hope is that platform integrators will
have an easier time identifying what they need to carefully implement
in order to follow the security recommendations from the threat model.

Change-Id: I8473d75946daf6c91a0e15e61758c183603e195b
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agoMerge changes from topic "ja/boot_protocol" into integration
Olivier Deprez [Mon, 30 May 2022 14:50:10 +0000 (16:50 +0200)]
Merge changes from topic "ja/boot_protocol" into integration

* changes:
  docs(spm): update ff-a boot protocol documentation
  docs(maintainers): add code owner to sptool

3 years agoMerge "fix(include/aarch64): fix encodings for MPAMVPM* registers" into integration
Manish Pandey [Thu, 26 May 2022 09:30:34 +0000 (11:30 +0200)]
Merge "fix(include/aarch64): fix encodings for MPAMVPM* registers" into integration

3 years agodocs(spm): update ff-a boot protocol documentation
J-Alves [Tue, 24 May 2022 11:13:08 +0000 (12:13 +0100)]
docs(spm): update ff-a boot protocol documentation

Updated following sections to document implementation of the FF-A boot
information protocol:
- Describing secure partitions.
- Secure Partition Packages.
- Passing boot data to the SP.
Also updated description of the manifest field 'gp-register-num'.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I5c856437b60cdf05566dd636a01207c9b9f42e61

3 years agoMerge "fix(cpus/denver): use CPU_NO_EXTRA3_FUNC for all variants" into integration
Varun Wadekar [Wed, 25 May 2022 11:52:40 +0000 (13:52 +0200)]
Merge "fix(cpus/denver): use CPU_NO_EXTRA3_FUNC for all variants" into integration

3 years agofix(include/aarch64): fix encodings for MPAMVPM* registers
Varun Wadekar [Wed, 25 May 2022 11:45:22 +0000 (12:45 +0100)]
fix(include/aarch64): fix encodings for MPAMVPM* registers

This patch fixes the following encodings in the System register
encoding space for the MPAM registers. The encodings now match
with the ArmĀ® Architecture Reference Manual Supplement for MPAM.

* MPAMVPM0_EL2
* MPAMVPM1_EL2
* MPAMVPM2_EL2
* MPAMVPM3_EL2
* MPAMVPM4_EL2
* MPAMVPM5_EL2
* MPAMVPM6_EL2
* MPAMVPM7_EL2
* MPAMVPMV_EL2

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Ib339412de6a9c945a3307f3f347fe7b2efabdc18

3 years agofeat(imx8mq): add 100us delay after USB OTG SRC bit 0 clear
Jacky Bai [Sun, 19 Jan 2020 07:05:12 +0000 (15:05 +0800)]
feat(imx8mq): add 100us delay after USB OTG SRC bit 0 clear

After the SRC bit clear, we must wait for a while to make sure
the operation is finished. And don't enable all the PU domains
by default.

for USB OTG, the limitations are:
1. before system clock configuration. ipg clock runs at 12.5MHz.
delay time should longer than 82us.

2. after system clock configuration. ipg clock runs at 66.5MHz.
delay time should longer than 15.3us.

so add udelay 100 to safely clear the SRC bit 0.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Change-Id: I52e8e7739fdaaf86442bcd148e768b6af38bcdb7

3 years agodocs(maintainers): add code owner to sptool
J-Alves [Tue, 24 May 2022 10:04:43 +0000 (11:04 +0100)]
docs(maintainers): add code owner to sptool

Add Joao Alves as code owner to the sptool.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I9e44e322ba1cce62308bf16c4a6253f7b0117fe0

3 years agofix(cpus/denver): use CPU_NO_EXTRA3_FUNC for all variants
Varun Wadekar [Tue, 24 May 2022 14:00:06 +0000 (15:00 +0100)]
fix(cpus/denver): use CPU_NO_EXTRA3_FUNC for all variants

Denver CPUs use the same workaround for CVE-2017-5715 and CVE-2022-23960
vulnerabilities. The workaround for CVE-2017-5715 is always enabled, so
all Denver variants use CPU_NO_EXTRA3_FUNC as a placeholder for the
mitigation for CVE-2022-23960. This patch implements the approach.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I0863541ce19b6b3b6d1b2f901d3fb6a77f315189

3 years agoMerge "fix(build): use DWARF 4 when building debug" into integration
Manish Pandey [Tue, 24 May 2022 13:30:27 +0000 (15:30 +0200)]
Merge "fix(build): use DWARF 4 when building debug" into integration

3 years agoMerge changes from topic "ffa_el3_spmc" into integration
Olivier Deprez [Tue, 24 May 2022 13:04:16 +0000 (15:04 +0200)]
Merge changes from topic "ffa_el3_spmc" into integration

* changes:
  fix(spmc): fix incorrect FF-A version usage
  fix(spmc): fix FF-A memory transaction validation

3 years agofix(imx8mq): correct architected counter frequency
Lucas Stach [Fri, 20 May 2022 10:37:39 +0000 (12:37 +0200)]
fix(imx8mq): correct architected counter frequency

Different from other i.MX SoCs, which typically use a 24MHz reference clock,
the i.MX8MQ uses a 25MHz reference clock. As the architected timer clock
frequency is directly sourced from the reference clock via a /3 divider this
SoC runs the timers at 8.33MHz.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Change-Id: Ief36af9ffebce7cb75a200124134828d3963e744

3 years agofeat(plat/xilinx/zynqmp): optimization on pinctrl_functions
Ronak Jain [Fri, 6 May 2022 11:45:59 +0000 (04:45 -0700)]
feat(plat/xilinx/zynqmp): optimization on pinctrl_functions

Optimizing the pinctrl_functions structure. Remove the pointer to
array of u16 type which consumes a lot of memory (64bits pointer to
array + 16B for END_OF_GROUPS + almost useless 8bits on every entry
which is the same for every group) and add two new members of type
u16 and u8 with the name called group_base and group_size
respectively.

The group_base member contains the base value of pinctrl group whereas
the group_size member contains the total number of groups requested
from the pinctrl function.

Overall, it saves around ~2KB of RAM and ~0.7KB of code memory.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Ronak Jain <ronak.jain@xilinx.com>
Change-Id: I79b761b45df350d390fa344d411b340d9b2f13ac

3 years agofix(lib/psa): fix Null pointer dereference error
David Vincze [Wed, 18 May 2022 14:02:37 +0000 (16:02 +0200)]
fix(lib/psa): fix Null pointer dereference error

Fixing possible Null pointer dereference error, found
by Coverity scan.

Change-Id: If60b7f7e13ecbc3c01e3a9c5005c480260bbabdd
Signed-off-by: David Vincze <david.vincze@arm.com>
3 years agofix(spmc): fix incorrect FF-A version usage
Marc Bonnici [Fri, 20 May 2022 13:38:55 +0000 (14:38 +0100)]
fix(spmc): fix incorrect FF-A version usage

Fix the wrong FF-A version being used for retrieving existing memory
descriptors for v1.0 clients. Internally these should always be stored
using the latest version rather than client version.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: Ibee1b2452c8d6ebd23bbd9d703c96ca185444093

3 years agofix(spmc): fix FF-A memory transaction validation
Marc Bonnici [Fri, 20 May 2022 13:34:56 +0000 (14:34 +0100)]
fix(spmc): fix FF-A memory transaction validation

Fix an incorrect bound check for overlapping memory regions which can
give false positives if the two regions are consecutive to each other.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I997dc4d1ef2014660cc964aff0a73e348c44eff0

3 years agofix(build): use DWARF 4 when building debug
Daniel Boulby [Tue, 3 May 2022 15:46:16 +0000 (16:46 +0100)]
fix(build): use DWARF 4 when building debug

GCC 11 and Clang 14 now use the DWARF 5 standard by default however
Arm-DS currently only supports up to version 4. Therefore, for debug
builds, ensure the DWARF 4 standard is used.
Also update references for Arm DS-5 to it's successor Arm-DS (Arm
Development Studio).

Change-Id: Ica59588de3d121c1b795b3699f42c31f032cee49
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
3 years agoMerge changes from topic "sb/threat-model" into integration
Bipin Ravi [Thu, 19 May 2022 19:33:32 +0000 (21:33 +0200)]
Merge changes from topic "sb/threat-model" into integration

* changes:
  docs(threat-model): make measured boot out of scope
  docs(threat-model): revamp threat #9

3 years agoMerge "fix(bl1): invalidate SP in data cache during secure SMC" into integration
Madhukar Pappireddy [Thu, 19 May 2022 19:11:55 +0000 (21:11 +0200)]
Merge "fix(bl1): invalidate SP in data cache during secure SMC" into integration

3 years agoMerge changes from topic "ffa_el3_spmc" into integration
Olivier Deprez [Thu, 19 May 2022 16:33:03 +0000 (18:33 +0200)]
Merge changes from topic "ffa_el3_spmc" into integration

* changes:
  feat(fvp): add plat hook for memory transactions
  feat(spmc): enable handling of the NS bit
  feat(spmc): add support for v1.1 FF-A memory data structures
  feat(spmc/mem): prevent duplicated sharing of memory regions
  feat(spmc/mem): support multiple endpoints in memory transactions
  feat(spmc): add support for v1.1 FF-A boot protocol
  feat(plat/fvp): introduce accessor function to obtain datastore
  feat(spmc/mem): add FF-A memory management code

3 years agoMerge "refactor(context mgmt): refactor initialization of EL1 context registers"...
Olivier Deprez [Thu, 19 May 2022 14:42:58 +0000 (16:42 +0200)]
Merge "refactor(context mgmt): refactor initialization of EL1 context registers" into integration

3 years agoMerge changes from topic "gpt-crc" into integration
Madhukar Pappireddy [Thu, 19 May 2022 14:04:39 +0000 (16:04 +0200)]
Merge changes from topic "gpt-crc" into integration

* changes:
  feat(partition): verify crc while loading gpt header
  build(hikey): platform changes for verifying gpt header crc
  build(agilex): platform changes for verifying gpt header crc
  build(stratix10): platform changes for verifying gpt header crc
  build(stm32mp1): platform changes for verifying gpt header crc

3 years agofeat(fvp): add plat hook for memory transactions
Marc Bonnici [Mon, 21 Feb 2022 15:02:36 +0000 (15:02 +0000)]
feat(fvp): add plat hook for memory transactions

Add call to platform hooks upon successful transmission of a
memory transaction request and as part of a memory reclaim request.
This allows for platform specific functionality to be performed
accordingly.

Note the hooks must be placed in the initial share request and final
reclaim to prevent order dependencies with operations that may take
place in the normal world without visibility of the SPMC.

Add a dummy implementation to the FVP platform.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I0c7441a9fdf953c4db0651512e5e2cdbc6656c79

3 years agofeat(spmc): enable handling of the NS bit
Marc Bonnici [Tue, 19 Apr 2022 15:52:59 +0000 (16:52 +0100)]
feat(spmc): enable handling of the NS bit

In FF-A v1.1 the NS bit is used by the SPMC to specify the
security state of a memory region retrieved by a SP.

Enable the SPMC to set the bit for v1.1 callers or v1.0
callers that explicitly request the usage via FFA_FEATURES.

In this implementation the sender of the memory region must
reside in the normal world and the SPMC does not support
changing the security state of memory regions therefore
always set the NS bit if required by the caller.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I215756b28e2382082933ba1dcc7584e7faf4b36b

3 years agofeat(spmc): add support for v1.1 FF-A memory data structures
Marc Bonnici [Tue, 19 Apr 2022 16:42:53 +0000 (17:42 +0100)]
feat(spmc): add support for v1.1 FF-A memory data structures

Add support for the FF-A v1.1 data structures to the EL3 SPMC
and enable the ability to convert between v1.0 and the v1.1
forwards compatible data structures.

The SPMC now uses the v1.1 data structures internally and will
convert descriptors as required depending on the FF-A version
supported by the calling partition.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: Ic14a95ea2e49c989aecf19b927a6b21ac50f863e

3 years agofeat(spmc/mem): prevent duplicated sharing of memory regions
Marc Bonnici [Fri, 21 Jan 2022 10:34:55 +0000 (10:34 +0000)]
feat(spmc/mem): prevent duplicated sharing of memory regions

Allow the SPMC to reject incoming memory sharing/lending requests
that contain memory regions which overlap with an existing
request.

To enable this functionality the SPMC compares each requested
memory region to those in ongoing memory transactions and rejects
the request if the ranges overlap.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I7588846f272ec2add2a341d9f24836c73a046e2f

3 years agofeat(spmc/mem): support multiple endpoints in memory transactions
Marc Bonnici [Thu, 13 Jan 2022 11:39:10 +0000 (11:39 +0000)]
feat(spmc/mem): support multiple endpoints in memory transactions

Enable FFA_MEM_LEND and FFA_MEM_SHARE transactions to support multiple
borrowers and add the appropriate validation. Since we currently
only support a single S-EL1 partition, this functionality is to
support the use case where a VM shares or lends memory to one or
more VMs in the normal world as part of the same transaction to
the SP.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: Ia12c4357e9d015cb5f9b38e518b7a25b1ea2e30e

3 years agoMerge changes from topic "mb/drtm-work-phase-1" into integration
Manish Pandey [Thu, 19 May 2022 13:15:49 +0000 (15:15 +0200)]
Merge changes from topic "mb/drtm-work-phase-1" into integration

* changes:
  build(changelog): add new scope for Arm SMMU driver
  feat(smmu): add SMMU abort transaction function
  docs(build): add build option for DRTM support
  build(drtm): add DRTM support build option

3 years agoMerge changes from topic "sb/threat-model" into integration
Sandrine Bailleux [Thu, 19 May 2022 11:09:00 +0000 (13:09 +0200)]
Merge changes from topic "sb/threat-model" into integration

* changes:
  docs(threat-model): remove some redundant text in threat #08
  docs(threat-model): make experimental features out of scope
  docs(threat-model): cosmetic changes

3 years agoMerge "build(changelog): add new scope for the threat model" into integration
Sandrine Bailleux [Thu, 19 May 2022 10:58:10 +0000 (12:58 +0200)]
Merge "build(changelog): add new scope for the threat model" into integration

3 years agofeat(spmc): add support for v1.1 FF-A boot protocol
Achin Gupta [Tue, 19 Oct 2021 11:21:16 +0000 (12:21 +0100)]
feat(spmc): add support for v1.1 FF-A boot protocol

A partition can request the use of the FF-A boot protocol via
an entry in its manifest along with the register (0-3)
that should be populated with a pointer to a data structure
containing boot related information. Currently the boot
information consists of an allocated memory region
containing the SP's manifest, allowing it to map and parse
any extra information as required.

This implementation only supports the v1.1 data structures
and will return an error if a v1.0 client requests the usage
of the protocol.

Signed-off-by: Achin Gupta <achin.gupta@arm.com>
Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I67692553a90a7e7d94c64fe275edd247b512efca

3 years agofeat(plat/fvp): introduce accessor function to obtain datastore
Marc Bonnici [Thu, 16 Dec 2021 18:31:02 +0000 (18:31 +0000)]
feat(plat/fvp): introduce accessor function to obtain datastore

In order to provide the EL3 SPMC a sufficient datastore to
record memory descriptors, a accessor function is used.
This allows for the backing memory to be allocated in a
platform defined manner, to accommodate memory constraints
and desired use cases.

Provide an implementation for the Arm FVP platform to
use a default value of 512KB memory allocated in the
TZC RAM section.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I92bc55ba6e04bdad429eb52f0d2960ceda682804

3 years agofeat(spmc/mem): add FF-A memory management code
Marc Bonnici [Fri, 1 Oct 2021 15:06:04 +0000 (16:06 +0100)]
feat(spmc/mem): add FF-A memory management code

Originally taken from the downstream Trusty SPD [1]
implementation and modified to integrate with
the EL3 SPMC internals.

Add support to the EL3 SPMC for a subset of the FF-A
memory management ABIs:
- FFA_MEM_SHARE
- FFA_MEM_LEND
- FFA_MEM_RETRIEVE_REQ
- FFA_MEM_RETRIEVE_RESP
- FFA_MEM_RELINQUISH
- FFA_MEM_RECLAIM
- FFA_MEM_FRAG_RX
- FFA_MEM_FRAG_TX

This implementation relies on a datastore allocated in
platform specific code in order to store memory descriptors
about ongoing memory transactions. This mechanism
will be implemented in the following commit.

[1] https://android.googlesource.com/trusty/external/trusted-firmware-a/+/refs/heads/master/services/spd/trusty/

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: Ib042f73c8a6e0f0aed00f6762be175cb9dedc042

3 years agodocs(threat-model): make measured boot out of scope
Sandrine Bailleux [Mon, 16 May 2022 13:10:27 +0000 (15:10 +0200)]
docs(threat-model): make measured boot out of scope

Add an explicit note that measured boot is out of scope of the threat
model. For example, we have no threat related to the secure
management of measurements, nor do we list its security benefits
(e.g. in terms of repudiation).

This might be a future improvement to the threat model but for now
just acknowledge it is not considered.

Change-Id: I2fb799a2ef0951aa681a755a948bd2b67415d156
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agofix(plat/zynqmp): fix coverity scan warnings
Ronak Jain [Wed, 11 May 2022 09:48:52 +0000 (02:48 -0700)]
fix(plat/zynqmp): fix coverity scan warnings

- Fix uninitialized variable use
- Fix array overrun issue

Signed-off-by: Tanmay Shah <tanmay.shah@xilinx.com>
Signed-off-by: Ronak Jain <ronak.jain@xilinx.com>
Change-Id: I604416531122c9208793d66c26b1fa69c95f3165

3 years agobuild(changelog): add new scope for Arm SMMU driver
Manish V Badarkhe [Thu, 24 Mar 2022 18:23:37 +0000 (18:23 +0000)]
build(changelog): add new scope for Arm SMMU driver

Added new scope for Arm SMMU driver.

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

3 years agofeat(smmu): add SMMU abort transaction function
Lucian Paul-Trifu [Fri, 25 Mar 2022 14:30:20 +0000 (14:30 +0000)]
feat(smmu): add SMMU abort transaction function

Created a function to abort all pending NS DMA transactions to
engage complete DMA protection. This call will be used by the
subsequent DRTM implementation changes.

Signed-off-by: Manish V Badarkhe <manish.badarkhe@arm.com>
Signed-off-by: Lucian Paul-Trifu <lucian.paultrifu@gmail.com>
Change-Id: I94992b54c570327d6746295073822a9c0ebdc85d

3 years agodocs(build): add build option for DRTM support
Manish V Badarkhe [Mon, 14 Feb 2022 18:31:16 +0000 (18:31 +0000)]
docs(build): add build option for DRTM support

Documented the build option for DRTM support.

Signed-off-by: Manish V Badarkhe <manish.badarkhe@arm.com>
Signed-off-by: Lucian Paul-Trifu <lucian.paultrifu@gmail.com>
Change-Id: Ic1543ee5f1d0046d5062d9744bd1a136d940b687

3 years agobuild(drtm): add DRTM support build option
Manish V Badarkhe [Wed, 2 Mar 2022 12:06:35 +0000 (12:06 +0000)]
build(drtm): add DRTM support build option

Added DRTM support build option in the makefiles.
This build option will be used by the DRTM implementation
in the subsequent patches.

Signed-off-by: Manish V Badarkhe <manish.badarkhe@arm.com>
Signed-off-by: Lucian Paul-Trifu <lucian.paultrifu@gmail.com>
Change-Id: I15366f86b3ebd6ab2ebcb192753015d547cdddee

3 years agoMerge changes from topic "xlnx_zynqmp_misra_fix" into integration
Madhukar Pappireddy [Wed, 18 May 2022 20:10:31 +0000 (22:10 +0200)]
Merge changes from topic "xlnx_zynqmp_misra_fix" into integration

* changes:
  fix(zynqmp): resolve misra 8.3 warnings
  fix(zynqmp): resolve misra R8.4 warnings

3 years agorefactor(context mgmt): refactor initialization of EL1 context registers
Zelalem Aweke [Fri, 8 Apr 2022 21:48:05 +0000 (16:48 -0500)]
refactor(context mgmt): refactor initialization of EL1 context registers

When SPMC is present at S-EL2, EL1 context registers don't need to be
initialized for Secure state. This patch makes sure that EL1 context
registers are initialized only for Non-secure state, and when SPMC is
not present at S-EL2

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

3 years agoMerge "build(deps): bump ansi-regex from 3.0.0 to 3.0.1" into integration
Sandrine Bailleux [Wed, 18 May 2022 13:46:22 +0000 (15:46 +0200)]
Merge "build(deps): bump ansi-regex from 3.0.0 to 3.0.1" into integration

3 years agofeat(partition): verify crc while loading gpt header
Rohit Ner [Fri, 6 May 2022 07:58:21 +0000 (07:58 +0000)]
feat(partition): verify crc while loading gpt header

This change makes use of 32-bit crc for calculating gpt header crc
and compares it with the given value.

Signed-off-by: Rohit Ner <rohitner@google.com>
Change-Id: I49bca7aab2c3884881c4b7d90d31786a895290e6

3 years agobuild(hikey): platform changes for verifying gpt header crc
Rohit Ner [Wed, 11 May 2022 10:06:07 +0000 (03:06 -0700)]
build(hikey): platform changes for verifying gpt header crc

This change makes the necessary additions to makefile of
platforms using partition driver.

Signed-off-by: Rohit Ner <rohitner@google.com>
Change-Id: I0d524760bf52e1d9b4a103f556231f20146bd78e

3 years agobuild(agilex): platform changes for verifying gpt header crc
Rohit Ner [Wed, 11 May 2022 10:15:40 +0000 (03:15 -0700)]
build(agilex): platform changes for verifying gpt header crc

This change makes the necessary additions to makefile of
platforms using partition driver.

Signed-off-by: Rohit Ner <rohitner@google.com>
Change-Id: I1290972c7d2626262d4b6d68b99bb8f2c4b6744c

3 years agobuild(stratix10): platform changes for verifying gpt header crc
Rohit Ner [Wed, 11 May 2022 10:18:31 +0000 (03:18 -0700)]
build(stratix10): platform changes for verifying gpt header crc

This change makes the necessary additions to makefile of
platforms using partition driver.

Signed-off-by: Rohit Ner <rohitner@google.com>
Change-Id: Ie26d9e5943453ce54ee8c72c6e44170577e3afc0

3 years agobuild(stm32mp1): platform changes for verifying gpt header crc
Rohit Ner [Wed, 18 May 2022 07:55:02 +0000 (00:55 -0700)]
build(stm32mp1): platform changes for verifying gpt header crc

This change makes the necessary additions to makefile of
platforms using partition driver.

Signed-off-by: Rohit Ner <rohitner@google.com>
Change-Id: I66f6daaa0deac984b0aa5f2a182385410189ba8a

3 years agobuild(deps): bump ansi-regex from 3.0.0 to 3.0.1
dependabot[bot] [Mon, 16 May 2022 16:40:42 +0000 (16:40 +0000)]
build(deps): bump ansi-regex from 3.0.0 to 3.0.1

Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Change-Id: Ie00f6fa342338bcd5c7cd32eec6f9d225738ad9b
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Chris Kay <chris.kay@arm.com>
3 years agofix(bl1): invalidate SP in data cache during secure SMC
Harrison Mutai [Wed, 11 May 2022 10:05:02 +0000 (11:05 +0100)]
fix(bl1): invalidate SP in data cache during secure SMC

Invalidate the SP holding `smc_ctx_t` prior to enabling the data cache
when handling SMCs from the secure world. Enabling the data cache
without doing so results in dirty data either being evicted into main
memory, or being used directly from bl1. This corrupted data causes
system failure as the SMC handler attempts to use it.

Change-Id: I5b7225a6fdd1fcfe34ee054ca46dffea06b84b7d
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
3 years agoMerge changes from topic "sb/update-maintainers" into integration
Sandrine Bailleux [Wed, 18 May 2022 05:50:42 +0000 (07:50 +0200)]
Merge changes from topic "sb/update-maintainers" into integration

* changes:
  docs(maintainers): remove John Powell from code owners
  docs(maintainers): remove Jimmy Brisson from code owners

3 years agoMerge "fix(stm32mp1): include assert.h to fix build failure" into integration
Madhukar Pappireddy [Tue, 17 May 2022 16:42:32 +0000 (18:42 +0200)]
Merge "fix(stm32mp1): include assert.h to fix build failure" into integration

3 years agoMerge "docs: update supported FVP models documentation" into integration
Olivier Deprez [Tue, 17 May 2022 15:40:45 +0000 (17:40 +0200)]
Merge "docs: update supported FVP models documentation" into integration

3 years agofix(stm32mp1): include assert.h to fix build failure
Manish V Badarkhe [Tue, 17 May 2022 13:05:06 +0000 (14:05 +0100)]
fix(stm32mp1): include assert.h to fix build failure

stm32mp1 platform build failed with the error [1] in the coverity, to
fix it included assert.h file.

Including bl32/sp_min/sp_min.mk
plat/st/stm32mp1/plat_image_load.c: In function
'plat_get_bl_image_load_info':
plat/st/stm32mp1/plat_image_load.c:30:2: error: implicit declaration of
function 'assert' [-Werror=implicit-function-declaration]
   30 |  assert(bl33 != NULL);
      |  ^~~~~~
plat/st/stm32mp1/plat_image_load.c:9:1: note: 'assert' is defined in
header '<assert.h>'; did you forget to '#include <assert.h>'?
    8 | #include <plat/common/platform.h>
  +++ |+#include <assert.h>
    9 |
cc1: all warnings being treated as errors

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

3 years agoMerge "fix(stm32mp1-fdts): correct memory mapping for STM32MP13" into integration
Madhukar Pappireddy [Tue, 17 May 2022 15:15:11 +0000 (17:15 +0200)]
Merge "fix(stm32mp1-fdts): correct memory mapping for STM32MP13" into integration

3 years agoMerge "refactor(security): upgrade tools to OpenSSL 3.0" into integration
Manish Pandey [Tue, 17 May 2022 14:48:07 +0000 (16:48 +0200)]
Merge "refactor(security): upgrade tools to OpenSSL 3.0" into integration

3 years agodocs: update supported FVP models documentation
Maksims Svecovs [Thu, 28 Apr 2022 15:52:37 +0000 (16:52 +0100)]
docs: update supported FVP models documentation

Update supported models list according to changes for v2.7 release in
ci/tf-a-ci-scripts repository:
* general FVP model update: 5c54251
* CSS model update: 3bd12fb

Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com>
Change-Id: I38c2ef2991b23873821c7e34ad2900b9ad023c4b

3 years agofix(stm32mp1-fdts): correct memory mapping for STM32MP13
Yann Gautier [Tue, 17 May 2022 14:21:25 +0000 (16:21 +0200)]
fix(stm32mp1-fdts): correct memory mapping for STM32MP13

On STM32MP13, OP-TEE will be loaded at the beginning of the secure
memory, and will be responsible for its shared memory.
The memory allocated to OP-TEE is then 32MB, and the shared memory
does no more appear in the STM32MP13 fw-config DT file.

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

3 years agoMerge "fix(arm): remove reclamation of functions starting with "init"" into integration
Manish Pandey [Tue, 17 May 2022 09:11:16 +0000 (11:11 +0200)]
Merge "fix(arm): remove reclamation of functions starting with "init"" into integration

3 years agodocs(maintainers): remove John Powell from code owners
Sandrine Bailleux [Tue, 17 May 2022 08:34:15 +0000 (10:34 +0200)]
docs(maintainers): remove John Powell from code owners

John Powell is no longer part of the TF-A core team at Arm.

Change-Id: Iaa91474cb2c5c334b9ae6f2376724fad2677e285
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agodocs(maintainers): remove Jimmy Brisson from code owners
Sandrine Bailleux [Tue, 17 May 2022 08:25:20 +0000 (10:25 +0200)]
docs(maintainers): remove Jimmy Brisson from code owners

Jimmy Brisson is no longer part of the TF-A core team at Arm.

Change-Id: I2966c513a0c2cda438a05dedd42149d16190cbf6
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agodocs(threat-model): remove some redundant text in threat #08
Sandrine Bailleux [Fri, 13 May 2022 10:40:22 +0000 (12:40 +0200)]
docs(threat-model): remove some redundant text in threat #08

The threat description was repeating the threat title.

Change-Id: I67de2c0aab6e86bf33eb91e7562e075fcb76259b
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agobuild(changelog): add new scope for the threat model
Sandrine Bailleux [Tue, 10 May 2022 12:53:44 +0000 (14:53 +0200)]
build(changelog): add new scope for the threat model

Change-Id: I884f31f7f4b5515c420839ff37d401faa69f5fff
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agodocs(threat-model): revamp threat #9
Sandrine Bailleux [Thu, 12 May 2022 14:37:18 +0000 (16:37 +0200)]
docs(threat-model): revamp threat #9

Reword the description of threat #9 to make it more future-proof for
Arm CCA. By avoiding specific references to secure or non-secure
contexts, in favour of "worlds" and "security contexts", we make the
description equally applicable to 2-world and 4-world architectures.

Note that there are other threats that would benefit from such a
similar revamp but this is out of scope of this patch.

Also list malicious secure world code as a potential threat
agent. This seems to be an oversight in the first version of the
threat model (i.e. this change is not related to Arm CCA).

Change-Id: Id8c8424b0a801104c4f3dc70e344ee702d2b259a
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agodocs(threat-model): make experimental features out of scope
Sandrine Bailleux [Thu, 12 May 2022 12:57:26 +0000 (14:57 +0200)]
docs(threat-model): make experimental features out of scope

By nature, experimental features are incomplete pieces of work,
sometimes going under rapid change. Typically, the threat model
implications have not been fully considered yet.

Change-Id: Ice8d4273a789558e912f82cde592da4747b37fdf
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agodocs(threat-model): cosmetic changes
Sandrine Bailleux [Tue, 10 May 2022 12:55:01 +0000 (14:55 +0200)]
docs(threat-model): cosmetic changes

 - Add empty lines after titles.

 - Reduce number of highlighting characters to fit title length.

 - Remove most ``monospaced text``.
   I think most of it looked weird in the rendered HTML version and
   it had no obvious meaning.

Change-Id: I5f746a3de035d8ac59eec0af491c187bfe86dad7
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
3 years agofix(zynqmp): resolve misra 8.3 warnings
Venkatesh Yadav Abbarapu [Mon, 16 May 2022 12:14:33 +0000 (17:44 +0530)]
fix(zynqmp): resolve misra 8.3 warnings

MISRA Violation: MISRA-C:2012 R.8.3
- Declaration uses a different parameter name than the one present in the
definition.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: Id0521afd7383df13870710b7dd2894e788896e5e

3 years agoMerge changes I2fcf13b7,I153ccb43 into integration
Madhukar Pappireddy [Mon, 16 May 2022 19:59:08 +0000 (21:59 +0200)]
Merge changes I2fcf13b7,I153ccb43 into integration

* changes:
  feat(n1sdp): add support for nt_fw_config
  feat(n1sdp): enable trusted board boot on n1sdp

3 years agorefactor(security): upgrade tools to OpenSSL 3.0
Juan Pablo Conde [Wed, 2 Mar 2022 23:10:08 +0000 (18:10 -0500)]
refactor(security): upgrade tools to OpenSSL 3.0

Host tools cert_tool and encrypt_fw refactored to be fully
compatible with OpenSSL v3.0.

Changes were made following the OpenSSL 3.0 migration guide:
https://www.openssl.org/docs/man3.0/man7/migration_guide.html
In some cases, those changes are straightforward and only
a small modification on the types or API calls was needed
(e.g.: replacing BN_pseudo_rand() with BN_rand(). Both identical
since v1.1.0).
The use of low level APIs is now deprecated. In some cases,
the new API provides a simplified solution for our goals and
therefore the code was simplified accordingly (e.g.: generating
RSA keys through EVP_RSA_gen() without the need of handling the
exponent). However, in some cases, a more
sophisticated approach was necessary, as the use of a context
object was required (e.g.: when retrieving the digest value from
an SHA file).

Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
Change-Id: I978e8578fe7ab3e71307450ebe7e7812fbcaedb6

3 years agofix(zynqmp): resolve misra R8.4 warnings
Venkatesh Yadav Abbarapu [Mon, 16 May 2022 11:59:04 +0000 (17:29 +0530)]
fix(zynqmp): resolve misra R8.4 warnings

MISRA Violation: MISRA-C:2012 R.8.4
- Function definition does not have a visible prototype.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I50a2c1adf2e099217770ac665f135302f990b162

3 years agoMerge changes from topic "ffa_el3_spmc" into integration
Olivier Deprez [Mon, 16 May 2022 10:32:27 +0000 (12:32 +0200)]
Merge changes from topic "ffa_el3_spmc" into integration

* changes:
  feat(spmd): allow forwarding of FFA_FRAG_RX/TX calls
  feat(spmc): add support for FFA_SPM_ID_GET
  feat(spmc): add support for forwarding a secure interrupt to the SP
  feat(spmc): add support for FF-A power mgmt. messages in the EL3 SPMC

3 years agoMerge changes from topic "ffa_el3_spmc" into integration
Olivier Deprez [Mon, 16 May 2022 10:05:59 +0000 (12:05 +0200)]
Merge changes from topic "ffa_el3_spmc" into integration

* changes:
  feat(spmc): enable the SPMC to pass the linear core ID in a register
  feat(spmc): add FFA_RX_RELEASE handler
  feat(spmc): add FFA_RUN handler
  feat(spmc): support FFA_ID_GET ABI
  feat(spmc): add FFA_FEATURES handler
  feat(spmc): add FFA_PARTITION_INFO_GET handler
  feat(spmc): enable handling FF-A RX/TX Mapping ABIs
  docs(maintainers): introduce SPMC maintainer section