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

3 years agofeat(spmd): allow forwarding of FFA_FRAG_RX/TX calls
Marc Bonnici [Thu, 23 Sep 2021 08:44:14 +0000 (09:44 +0100)]
feat(spmd): allow forwarding of FFA_FRAG_RX/TX calls

Enable the SPMD to forward FFA_FRAG_RX/TX calls between
the normal world and the SPMC.

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

3 years agofeat(spmc): add support for FFA_SPM_ID_GET
Marc Bonnici [Thu, 25 Nov 2021 15:54:52 +0000 (15:54 +0000)]
feat(spmc): add support for FFA_SPM_ID_GET

Enable a Secure Partition to query the ID assigned to the SPMC.
The SPMD will take care of any calls from the normal world
therefore we should not need to handle this case in the SPMC.

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

3 years agoMerge changes If2408af3,If485ff27 into integration
Madhukar Pappireddy [Fri, 13 May 2022 16:13:33 +0000 (18:13 +0200)]
Merge changes If2408af3,If485ff27 into integration

* changes:
  feat(versal): add SMCCC call TF_A_PM_REGISTER_SGI
  feat(versal): add support to reset SGI

3 years agofeat(spmc): add support for forwarding a secure interrupt to the SP
Achin Gupta [Mon, 4 Oct 2021 19:17:45 +0000 (20:17 +0100)]
feat(spmc): add support for forwarding a secure interrupt to the SP

This patch adds support for forwarding a secure interrupt that
preempts the normal world to a SP for top-half interrupt handling.

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

3 years agoMerge changes from topic "ns/save_fpregs_context" into integration
Olivier Deprez [Fri, 13 May 2022 15:28:58 +0000 (17:28 +0200)]
Merge changes from topic "ns/save_fpregs_context" into integration

* changes:
  feat(sgi): enable fpregs context save and restore
  feat(spm_mm): add support to save and restore fp regs

3 years agofeat(spmc): enable the SPMC to pass the linear core ID in a register
Marc Bonnici [Wed, 15 Dec 2021 18:00:50 +0000 (18:00 +0000)]
feat(spmc): enable the SPMC to pass the linear core ID in a register

Add TF-A implementation defined behaviour to provide the linear core
ID in the x4 register when bringing up an SP.

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

3 years agofeat(spmc): add support for FF-A power mgmt. messages in the EL3 SPMC
Marc Bonnici [Tue, 12 Apr 2022 16:18:13 +0000 (17:18 +0100)]
feat(spmc): add support for FF-A power mgmt. messages in the EL3 SPMC

This patch adds support for forwarding the following PSCI messages
received by the SPMC at EL3 to the S-EL1 SP if the SP has indicated
that it wishes to receive the appropriate message via its manifest.

1. A PSCI CPU_OFF message in response to a cpu hot unplug request
   from the OS.
2. A message to indicate warm boot of a cpu in response to a cpu
   hot plug request from the OS.
3. A PSCI CPU_SUSPEND message in response to a cpu idle event
   initiated from the OS.
4. A message to indicate warm boot of a cpu from a shallow power
   state in response to a cpu resume power event.

This patch also implements the FFA_SECONDARY_EP_REGISTER function to
enable the SP specify its secondary entrypoint.

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

3 years agofeat(spmc): add FFA_RX_RELEASE handler
Marc Bonnici [Tue, 12 Apr 2022 16:17:45 +0000 (17:17 +0100)]
feat(spmc): add FFA_RX_RELEASE handler

Enable a partition to release its RX buffer and the SPMC
to update the appropriate state tracking.

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

3 years agofeat(spmc): add FFA_RUN handler
Marc Bonnici [Tue, 31 Aug 2021 16:57:04 +0000 (17:57 +0100)]
feat(spmc): add FFA_RUN handler

Enable the SPMC to handle the FFA_RUN ABI and update
the state tracking accordingly.

Change-Id: I3e8a3fa3ec9b03830055d2fbd6124b8ff1ed4103
Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
3 years agofeat(spmc): support FFA_ID_GET ABI
Marc Bonnici [Wed, 24 Nov 2021 15:40:00 +0000 (15:40 +0000)]
feat(spmc): support FFA_ID_GET ABI

Allow for a partition to retrieve its own partition ID.

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

3 years agofeat(spmc): add FFA_FEATURES handler
Marc Bonnici [Mon, 13 Dec 2021 11:08:59 +0000 (11:08 +0000)]
feat(spmc): add FFA_FEATURES handler

Enable the spmc to report the features that it currently supports.
Populated with the currently implemented functionality.

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

3 years agofeat(spmc): add FFA_PARTITION_INFO_GET handler
Marc Bonnici [Tue, 17 Aug 2021 17:00:07 +0000 (18:00 +0100)]
feat(spmc): add FFA_PARTITION_INFO_GET handler

Enable the SPMC to handle calls to FFA_PARTITION_INFO_GET.
This allows the normal world to discover which partitions
are running in the secure world including logical partitions
in EL3.

This implementation supports both the v1.0 and v1.1
implementations of the Partition Info Get Descriptor.
The SPMC populates the appropriate descriptor in the
partitions RX buffer, if requested, according to the
version of FF-A that the caller is using.

Additionally rename the common/uuid UUID_H include guard
due to a conflict with another header file.

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

3 years agofeat(spmc): enable handling FF-A RX/TX Mapping ABIs
Marc Bonnici [Wed, 25 Aug 2021 11:09:37 +0000 (12:09 +0100)]
feat(spmc): enable handling FF-A RX/TX Mapping ABIs

Enable handling of FFA_RXTX_MAP and FFA_RXTX_UNMAP ABIs
and ensure these buffers are mapped as required to allow
access by the SPMC.

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

3 years agoMerge changes from topic "rss/mboot-attest" into integration
Sandrine Bailleux [Fri, 13 May 2022 14:15:35 +0000 (16:15 +0200)]
Merge changes from topic "rss/mboot-attest" into integration

* changes:
  docs(maintainers): add PSA, MHU, RSS comms code owners
  feat(plat/arm/fvp): enable RSS backend based measured boot
  feat(lib/psa): mock PSA APIs
  feat(drivers/measured_boot): add RSS backend
  feat(drivers/arm/rss): add RSS communication driver
  feat(lib/psa): add initial attestation API
  feat(lib/psa): add measured boot API
  feat(drivers/arm/mhu): add MHU driver

3 years agoMerge changes I50721040,I1ce4b7b4,I9658aef7,I40ff55eb into integration
Joanna Farley [Fri, 13 May 2022 12:29:24 +0000 (14:29 +0200)]
Merge changes I50721040,I1ce4b7b4,I9658aef7,I40ff55eb into integration

* changes:
  fix(intel): remove unused printout
  fix(intel): fix configuration status based on start request
  style(intel): align the sequence in header file
  fix(intel): remove redundant NOC header declarations

3 years agodocs(maintainers): add PSA, MHU, RSS comms code owners
David Vincze [Thu, 12 May 2022 14:07:03 +0000 (16:07 +0200)]
docs(maintainers): add PSA, MHU, RSS comms code owners

Adding Sandrine Bailleux for the PSA APIs and myself for the
MHU and RSS comms drivers as code owner.

Change-Id: Ib948479cc6e46163aae59c938877a2d0bcf91754
Signed-off-by: David Vincze <david.vincze@arm.com>
3 years agofix(intel): remove unused printout
Sieu Mun Tang [Fri, 13 May 2022 08:42:42 +0000 (16:42 +0800)]
fix(intel): remove unused printout

This patch is to remove unused printout.

Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I507210402dcbaf8369209308ae1fcedaccb0292d

3 years agofix(intel): fix configuration status based on start request
Sieu Mun Tang [Fri, 13 May 2022 06:55:05 +0000 (14:55 +0800)]
fix(intel): fix configuration status based on start request

This patch is to fix configuration status command now returns
the result based on the last config start command made to the
runtime software. The status type can be either:
- NO_REQUEST (default)
- RECONFIGURATION
- BITSTREAM_AUTH

Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I1ce4b7b4c741d88de88778f8fbed7dfe83a39fbc

3 years agostyle(intel): align the sequence in header file
Sieu Mun Tang [Fri, 13 May 2022 06:36:32 +0000 (14:36 +0800)]
style(intel): align the sequence in header file

This patch is to align the sequence of function in header file.

Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I9658aef78b06b744c6c14f95b2821daf5dbb0082

3 years agofix(intel): remove redundant NOC header declarations
Sieu Mun Tang [Fri, 13 May 2022 03:14:08 +0000 (11:14 +0800)]
fix(intel): remove redundant NOC header declarations

This patch is to remove redundant NOC declarations in
system manager header file. The NOC headers are shareable
across both Stratix 10 and Agilex platforms.

Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I40ff55eb1d8fe280db1d099d5d1a3c2bf4b4b459

3 years agofeat(versal): add SMCCC call TF_A_PM_REGISTER_SGI
Tanmay Shah [Tue, 14 Dec 2021 12:53:40 +0000 (04:53 -0800)]
feat(versal): add SMCCC call TF_A_PM_REGISTER_SGI

This call is used to register and reset SGI interrupt.
Before this functionality was performed using IOCTL_REGISTER_SGI
pm_ioctl EEMI call. It's not correct use of PM_IOCTL as it is
not EEMI functionality. Instead this new SMCCC call will be
handled by TF-A specific handler.

Change-Id: If2408af38b889d29a5c584e8eec5f1672eab4fb5
Signed-off-by: Tanmay Shah <tanmay.shah@xilinx.com>
3 years agofeat(versal): add support to reset SGI
Venkatesh Yadav Abbarapu [Mon, 19 Apr 2021 13:49:57 +0000 (07:49 -0600)]
feat(versal): add support to reset SGI

Add "reset" parameter in pm_register_sgi() to reset
SGI number. This will be required if OS wants to reset
SGI number to default state. Caller can reset param to
1 to reset SGI in ATF.

Change-Id: If485ff275df884f74eb67671cac7fa953458afe9
Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Tanmay Shah <tanmay.shah@xilinx.com>
3 years agoMerge "fix(security): workaround for CVE-2022-23960" into integration
Madhukar Pappireddy [Thu, 12 May 2022 18:24:10 +0000 (20:24 +0200)]
Merge "fix(security): workaround for CVE-2022-23960" into integration

3 years agofeat(n1sdp): add support for nt_fw_config
sahil [Tue, 15 Mar 2022 08:41:43 +0000 (14:11 +0530)]
feat(n1sdp): add support for nt_fw_config

This patch adds support to load nt_fw_config with the information from
plat_info sds structure which is then passed from BL2 to BL33.

Signed-off-by: sahil <sahil@arm.com>
Change-Id: I2fcf13b7bf5ab042ef830157fd9cceedbdca617a

3 years agofeat(n1sdp): enable trusted board boot on n1sdp
sah01 [Sun, 6 Jun 2021 09:08:01 +0000 (14:38 +0530)]
feat(n1sdp): enable trusted board boot on n1sdp

Move from RESET_TO_BL31 boot to a TBBR style boot on N1sdp.

Signed-off-by: sahil <sahil@arm.com>
Change-Id: I153ccb43a4a013830973c7a183825d62b372c65e

3 years agoMerge "docs(versal): fix the versal platform emu name" into integration
Madhukar Pappireddy [Thu, 12 May 2022 14:49:36 +0000 (16:49 +0200)]
Merge "docs(versal): fix the versal platform emu name" into integration

3 years agoMerge "fix(errata): workaround for DSU-110 erratum 2313941" into integration
Madhukar Pappireddy [Thu, 12 May 2022 14:34:40 +0000 (16:34 +0200)]
Merge "fix(errata): workaround for DSU-110 erratum 2313941" into integration

3 years agoMerge changes Ie9451e35,I1815deeb,If277b2b3,Ie2ceaf24,I7996d505, ... into integration
Madhukar Pappireddy [Thu, 12 May 2022 14:19:15 +0000 (16:19 +0200)]
Merge changes Ie9451e35,I1815deeb,If277b2b3,Ie2ceaf24,I7996d505, ... into integration

* changes:
  fix(intel): add flash dcache after return response for INTEL_SIP_SMC_MBOX_SEND_CMD
  fix(intel): extending to support large file size for SHA2/HMAC get digest and verifying
  fix(intel): extending to support large file size for SHA-2 ECDSA data signing and signature verifying
  fix(intel): extending to support large file size for AES encryption and decryption
  feat(intel): support version 2 SiP SVC SMC function ID for mailbox commands
  feat(intel): support version 2 SiP SVC SMC function ID for non-mailbox commands
  fix(intel): update certificate mask for FPGA Attestation
  feat(intel): update to support maximum response data size
  feat(intel): support ECDSA HASH Verification
  feat(intel): support ECDSA HASH Signing
  feat(intel): support ECDH request
  feat(intel): support ECDSA SHA-2 Data Signature Verification
  feat(intel): support ECDSA SHA-2 Data Signing
  feat(intel): support ECDSA Get Public Key
  feat(intel): support session based SDOS encrypt and decrypt
  feat(intel): support AES Crypt Service
  feat(intel): support HMAC SHA-2 MAC verify request
  feat(intel): support SHA-2 hash digest generation on a blob
  feat(intel): support extended random number generation
  feat(intel): support crypto service key operation
  feat(intel): support crypto service session
  feat(intel): extend attestation service to Agilex family
  fix(intel): flush dcache before sending certificate to mailbox
  fix(intel): introduce a generic response error code
  fix(intel): allow non-secure access to FPGA Crypto Services (FCS)
  feat(intel): single certificate feature enablement
  feat(intel): initial commit for attestation service
  fix(intel): update encryption and decryption command logic

3 years agoMerge "fix(zynqmp): define and enable ARM_XLAT_TABLES_LIB_V1" into integration
Madhukar Pappireddy [Thu, 12 May 2022 14:14:55 +0000 (16:14 +0200)]
Merge "fix(zynqmp): define and enable ARM_XLAT_TABLES_LIB_V1" into integration

3 years agofix(arm): remove reclamation of functions starting with "init"
Manish Pandey [Wed, 11 May 2022 14:43:54 +0000 (15:43 +0100)]
fix(arm): remove reclamation of functions starting with "init"

When RECLAIM_INIT_CODE is enabled, functions with __init attribute can
be reclaimed after boot and marked as Execute Never.
Because of a bug in linker script the functions starting with "init"
were also marked XN and causing instruction abort.

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

3 years agofix(security): workaround for CVE-2022-23960
Bipin Ravi [Fri, 6 May 2022 21:02:30 +0000 (16:02 -0500)]
fix(security): workaround for CVE-2022-23960

Implements the loop workaround for Cortex Makalu/Makalu-ELP/Hunter
and Neoverse Demeter/Poseidon.

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

3 years agofix(errata): workaround for DSU-110 erratum 2313941
Bipin Ravi [Wed, 22 Dec 2021 20:35:21 +0000 (14:35 -0600)]
fix(errata): workaround for DSU-110 erratum 2313941

DSU-110 erratum 2313941 is a Cat B erratum and applies to revisions
r0p0, r1p0, r2p0, r2p1, r3p0, r3p1 and is still open.

The workaround sets IMP_CLUSTERACTLR_EL1[16:15] bits to 0b11 to disable
clock gating of the SCLK domain. This will increase the idle power
consumption.

This patch applies the fix for Cortex-X2/A510/A710 and Neoverse N2.

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

Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
Change-Id: I54d948b23e8e01aaf1898ed9fe4e2255dd209318
Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
3 years agofeat(sgi): enable fpregs context save and restore
Nishant Sharma [Tue, 19 Apr 2022 09:23:59 +0000 (10:23 +0100)]
feat(sgi): enable fpregs context save and restore

This is required to prevent Nwd context corruption during StMM
execution.

Standalone MM uses OpenSSL for secure boot, which uses FP registers for
floating point calculations.

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

3 years agofeat(spm_mm): add support to save and restore fp regs
Nishant Sharma [Tue, 19 Apr 2022 09:16:48 +0000 (10:16 +0100)]
feat(spm_mm): add support to save and restore fp regs

Add the support to save Nwd's floating point registers before switching
to SEL0 and then restore it after coming out of it. Emit a warning
message if SPM_MM is built with CTX_INCLUDE_FPREGS == 0

There is no need to save FP registers of SEL0 because secure partitions
run to completion.

This change is used to prevent context corruption if secure partition
enabled and Nwd decide to use floating point registers.

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

3 years agoMerge changes from topic "fix_st_spi" into integration
Madhukar Pappireddy [Wed, 11 May 2022 15:31:44 +0000 (17:31 +0200)]
Merge changes from topic "fix_st_spi" into integration

* changes:
  fix(st-spi): remove SR_BUSY bit check before sending command
  fix(st-spi): always check SR_TCF flags in stm32_qspi_wait_cmd()

3 years agoMerge "docs: update release and code freeze dates" into integration
Madhukar Pappireddy [Wed, 11 May 2022 15:16:48 +0000 (17:16 +0200)]
Merge "docs: update release and code freeze dates" into integration

3 years agoMerge "fix(security): workaround for CVE-2022-23960 for Cortex-X1" into integration
Bipin Ravi [Wed, 11 May 2022 14:59:15 +0000 (16:59 +0200)]
Merge "fix(security): workaround for CVE-2022-23960 for Cortex-X1" into integration

3 years agoMerge "fix(errata): workarounds for cortex-x1 errata" into integration
Bipin Ravi [Wed, 11 May 2022 14:59:00 +0000 (16:59 +0200)]
Merge "fix(errata): workarounds for cortex-x1 errata" into integration

3 years agoMerge "feat(cpu): add support for Cortex-X1" into integration
Bipin Ravi [Wed, 11 May 2022 14:58:50 +0000 (16:58 +0200)]
Merge "feat(cpu): add support for Cortex-X1" into integration

3 years agofeat(plat/arm/fvp): enable RSS backend based measured boot
Tamas Ban [Fri, 11 Feb 2022 08:49:36 +0000 (09:49 +0100)]
feat(plat/arm/fvp): enable RSS backend based measured boot

Enable the RSS backend based measured boot feature.
In the absence of RSS the mocked version of PSA APIs
are used. They always return with success and hard-code data.

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

3 years agofeat(lib/psa): mock PSA APIs
Tamas Ban [Tue, 18 Jan 2022 15:20:47 +0000 (16:20 +0100)]
feat(lib/psa): mock PSA APIs

Introduce PLAT_RSS_NOT_SUPPORTED build config to
provide a mocked version of PSA APIs. The goal is
to test the RSS backend based measured boot and
attestation token request integration on such
a platform (AEM FVP) where RSS is otherwise
unsupported. The mocked PSA API version does
not send a request to the RSS, it only returns
with success and hard-coded values.

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

3 years agofeat(drivers/measured_boot): add RSS backend
Tamas Ban [Tue, 11 Jan 2022 19:24:24 +0000 (20:24 +0100)]
feat(drivers/measured_boot): add RSS backend

Runtime Security Subsystem (RSS) provides for the host:
- Runtime service to store measurments, which were
  computed by the host during measured boot.

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

3 years agofeat(drivers/arm/rss): add RSS communication driver
Tamas Ban [Tue, 18 Jan 2022 15:32:18 +0000 (16:32 +0100)]
feat(drivers/arm/rss): add RSS communication driver

This commit adds a driver to conduct the AP's communication
with the Runtime Security Subsystem (RSS).
RSS is Arm's reference implementation for the CCA HES [1].
It can be considered as a secure enclave to which, for example,
certain services can be offloaded such as initial attestation.

RSS comms driver:
 - Relies on MHU v2.x communication IP, using a generic MHU API,
 - Exposes the psa_call(..) API to the upper layers.

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

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

3 years agofeat(lib/psa): add initial attestation API
Tamas Ban [Fri, 11 Feb 2022 14:24:05 +0000 (15:24 +0100)]
feat(lib/psa): add initial attestation API

Supports:
 - Get Platform Attestation token from secure enclave

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

3 years agofeat(lib/psa): add measured boot API
Tamas Ban [Tue, 18 Jan 2022 15:19:17 +0000 (16:19 +0100)]
feat(lib/psa): add measured boot API

A secure enclave could provide an alternate
backend for measured boot. This API can be used
to store measurements in a secure enclave, which
provides the measured boot runtime service.

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

3 years agofeat(drivers/arm/mhu): add MHU driver
Tamas Ban [Mon, 10 Jan 2022 16:04:03 +0000 (17:04 +0100)]
feat(drivers/arm/mhu): add MHU driver

The Arm Message Handling Unit (MHU) is a mailbox controller used to
communicate with other processing element(s). Adding a driver to
enable the communication:
- Adding generic MHU driver interface,
- Adding MHU_v2_x driver.

Driver supports:
 - Discovering available MHU channels,
 - Sending / receiving words over MHU channels,
 - Signaling happens over a dedicated channel.

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