| 1543d17b | 25-Aug-2022 |
Shruti Gupta <shruti.gupta@arm.com> |
fix(el3-spmc): fix coverity scan warnings
Validate emad descriptor integrity before accessing. Check for NULL pointer access.
Signed-off-by: Shruti Gupta <shruti.gupta@arm.com> Change-Id: Id4ff3e5d
fix(el3-spmc): fix coverity scan warnings
Validate emad descriptor integrity before accessing. Check for NULL pointer access.
Signed-off-by: Shruti Gupta <shruti.gupta@arm.com> Change-Id: Id4ff3e5d88be95ca8d067378e344947880ec984b
show more ...
|
| def7590b | 18-Oct-2022 |
Marc Bonnici <marc.bonnici@arm.com> |
fix(el3-spmc): improve bound check for descriptor
Ensure that there is sufficient space in the memory descriptor to accommodate the size of the composite memory struct as part of the descriptor.
Si
fix(el3-spmc): improve bound check for descriptor
Ensure that there is sufficient space in the memory descriptor to accommodate the size of the composite memory struct as part of the descriptor.
Signed-off-by: Marc Bonnici <marc.bonnici@arm.com> Change-Id: Iea646b144c59a2a1a171298cabb5f31040a8af31
show more ...
|
| 62cd8f31 | 26-Oct-2022 |
Marc Bonnici <marc.bonnici@arm.com> |
fix(el3-spmc): report execution state in partition info get
Ensure that the correct execution state of an SP is reported as part of an FF-A v1.1 PARTITION_INFO_GET response.
Signed-off-by: Marc Bon
fix(el3-spmc): report execution state in partition info get
Ensure that the correct execution state of an SP is reported as part of an FF-A v1.1 PARTITION_INFO_GET response.
Signed-off-by: Marc Bonnici <marc.bonnici@arm.com> Change-Id: I714e53ae71c376463797a42cd5ab7a5e9c687fb7
show more ...
|
| eed15e43 | 18-Oct-2022 |
Marc Bonnici <marc.bonnici@arm.com> |
fix(el3-spmc): check descriptor size for overflow
Ensure that the provided descriptor size used when reserving space for a memory descriptor does not overflow to prevent scope for memory corruption.
fix(el3-spmc): check descriptor size for overflow
Ensure that the provided descriptor size used when reserving space for a memory descriptor does not overflow to prevent scope for memory corruption. Reported by Matt Oh, Google Android Red Team.
Reported-by: mattoh@google.com Signed-off-by: Marc Bonnici <marc.bonnici@arm.com> Change-Id: If06985c4de9a88ff82ce60d10e346da948ed383f
show more ...
|
| 21ed9ea3 | 18-Oct-2022 |
Marc Bonnici <marc.bonnici@arm.com> |
fix(el3-spmc): fix location of fragment length check
Ensure that the fragment_length parameter is validated to prevent a buffer overflow before it is used. Reported by Matt Oh, Google Android Red Te
fix(el3-spmc): fix location of fragment length check
Ensure that the fragment_length parameter is validated to prevent a buffer overflow before it is used. Reported by Matt Oh, Google Android Red Team.
Reported-by: mattoh@google.com Signed-off-by: Marc Bonnici <marc.bonnici@arm.com> Change-Id: I0323c096ffd988fbd85bbd4ade3abd8427aea977
show more ...
|
| 0dc35186 | 18-Oct-2022 |
Marc Bonnici <marc.bonnici@arm.com> |
fix(el3-spmc): fix detection of overlapping memory regions
The current logic does not cover all scenarios of overlapping memory regions. Update the implementation to verify non-overlapping regions i
fix(el3-spmc): fix detection of overlapping memory regions
The current logic does not cover all scenarios of overlapping memory regions. Update the implementation to verify non-overlapping regions instead. Reported by Matt Oh, Google Android Red Team.
Reported-by: mattoh@google.com Signed-off-by: Marc Bonnici <marc.bonnici@arm.com> Change-Id: I16c53d081e4455bc0e28399d28a1b27b1a9eb49c
show more ...
|
| c4adbe6e | 18-Oct-2022 |
Marc Bonnici <marc.bonnici@arm.com> |
fix(el3-spmc): fix incomplete reclaim validation
Ensure that the full memory transaction descriptor has been transmitted before a request to reclaim the memory transaction is permitted. This prevent
fix(el3-spmc): fix incomplete reclaim validation
Ensure that the full memory transaction descriptor has been transmitted before a request to reclaim the memory transaction is permitted. This prevents any potential accesses to the incomplete descriptor. Reported by Matt Oh, Google Android Red Team.
Reported-by: mattoh@google.com Signed-off-by: Marc Bonnici <marc.bonnici@arm.com> Change-Id: I33e993c6b754632051e899ab20edd19b18b6cf65
show more ...
|
| cee8bb3b | 09-Aug-2022 |
vallau01 <valentin.laurent@trustonic.com> |
fix(el3-spmc): error handling in allocation
Error check must be done on the previously allocated pointer, not a random one from the code.
Change-Id: I1c8253eacbe778cc4a9a8d71081fc615fa7e5293 Signed
fix(el3-spmc): error handling in allocation
Error check must be done on the previously allocated pointer, not a random one from the code.
Change-Id: I1c8253eacbe778cc4a9a8d71081fc615fa7e5293 Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.com>
show more ...
|
| ac568b2b | 09-Aug-2022 |
vallau01 <valentin.laurent@trustonic.com> |
fix(el3-spmc): deadlock when relinquishing memory
Do not forget to pass via err_unlock_mailbox: label.
Change-Id: Icfb997b1c7cce196003af2c28bffc50dc73e30b4 Signed-off-by: Lukas Hanel <lukas.hanel@t
fix(el3-spmc): deadlock when relinquishing memory
Do not forget to pass via err_unlock_mailbox: label.
Change-Id: Icfb997b1c7cce196003af2c28bffc50dc73e30b4 Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.com>
show more ...
|
| be075c3e | 08-Aug-2022 |
vallau01 <valentin.laurent@trustonic.com> |
fix(el3-spmc): compute full FF-A V1.1 desc size
This patch fixes an issue in spmc_ffa_fill_desc.
In order to compute the spmc_shm_get_v1_1_descriptor_size, fragment_length which is a fraction of th
fix(el3-spmc): compute full FF-A V1.1 desc size
This patch fixes an issue in spmc_ffa_fill_desc.
In order to compute the spmc_shm_get_v1_1_descriptor_size, fragment_length which is a fraction of the descriptor size is used as desc_size parameter. It has to be replaced with the full V1.0 descriptor size(obj->desc_filled).
Ran a subset of our tests and they are passing.
Change-Id: Ia4bbc5dabf0b77fa53d923ff609ee48ecd5bf549 Signed-off-by: vallau01 <valentin.laurent@trustonic.com> Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.com>
show more ...
|
| 885e2683 | 12-Sep-2022 |
Claus Pedersen <claustbp@google.com> |
refactor(libc): clean up dependencies in libc
- Removing platform dependencies from libc modules. - Replacing panicking with actual error handling. - Debug macros are included indirectly from assert
refactor(libc): clean up dependencies in libc
- Removing platform dependencies from libc modules. - Replacing panicking with actual error handling. - Debug macros are included indirectly from assert.h. Removing "platform_def.h" from assert.h and adding "common/debug.h" where the macros are used. - Removing hack for fixing PLAT_LOG_LEVEL_ASSERT to 40. Instead removing assert with expression, as this does not provide additional information.
Signed-off-by: Claus Pedersen <claustbp@google.com> Change-Id: Icc201ea7b63c1277e423c1cfd13fd6816c2bc568
show more ...
|
| 4a8bfdb9 | 04-Oct-2021 |
Achin Gupta <achin.gupta@arm.com> |
feat(tsp): add FF-A support to the TSP
This patch adds the FF-A programming model in the test secure payload to ensure that it can be used to test the following spec features.
1. SP initialisation
feat(tsp): add FF-A support to the TSP
This patch adds the FF-A programming model in the test secure payload to ensure that it can be used to test the following spec features.
1. SP initialisation on the primary and secondary cpus. 2. An event loop to receive direct requests and respond with direct responses. 3. Ability to receive messages that indicate power on and off of a cpu. 4. Ability to handle a secure interrupt.
Signed-off-by: Achin Gupta <achin.gupta@arm.com> Signed-off-by: Marc Bonnici <marc.bonnici@arm.com> Signed-off-by: Shruti <shruti.gupta@arm.com> Change-Id: I81cf744904d5cdc0b27862b5e4bc6f2cfe58a13a
show more ...
|
| b4c3621e | 06-Jun-2022 |
Marc Bonnici <marc.bonnici@arm.com> |
fix(spmc): fix relinquish validation check
The current implementation expects that the endpoint IDs of all participants of a memory transaction to be listed in the relinquish descriptor. As per the
fix(spmc): fix relinquish validation check
The current implementation expects that the endpoint IDs of all participants of a memory transaction to be listed in the relinquish descriptor. As per the FF-A spec, aside from the current partition ID, only the IDs of stream endpoints whose behalf it is relinquishing the memory region must be specified.
The current implementation does not currently support proxy endpoints therefore ensure that the endpoint count is always equal to 1 and no stream endpoint IDs are specified and instead just verify the caller is a valid participant in the memory transaction.
Additionally reuse the updated check in the retrieve request flow for additional verification.
Signed-off-by: Marc Bonnici <marc.bonnici@arm.com> Change-Id: I3b970196af8a16b2531607775398cb8a2473793b
show more ...
|
| 25eb2d41 | 20-May-2022 |
Marc Bonnici <marc.bonnici@arm.com> |
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 late
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
show more ...
|
| 3954bc3c | 20-May-2022 |
Marc Bonnici <marc.bonnici@arm.com> |
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
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
show more ...
|
| a8be4cd0 | 21-Feb-2022 |
Marc Bonnici <marc.bonnici@arm.com> |
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 plat
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
show more ...
|
| 0560b53e | 19-Apr-2022 |
Marc Bonnici <marc.bonnici@arm.com> |
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 cal
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
show more ...
|
| 7e804f96 | 19-Apr-2022 |
Marc Bonnici <marc.bonnici@arm.com> |
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 compat
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
show more ...
|
| fef85e1e | 21-Jan-2022 |
Marc Bonnici <marc.bonnici@arm.com> |
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
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
show more ...
|
| f0244e5d | 13-Jan-2022 |
Marc Bonnici <marc.bonnici@arm.com> |
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 curren
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
show more ...
|
| 2e219215 | 19-Oct-2021 |
Achin Gupta <achin.gupta@arm.com> |
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
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
show more ...
|
| e0b1a6d5 | 01-Oct-2021 |
Marc Bonnici <marc.bonnici@arm.com> |
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
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
show more ...
|
| 46872e01 | 25-Nov-2021 |
Marc Bonnici <marc.bonnici@arm.com> |
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
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
show more ...
|
| 729d7793 | 04-Oct-2021 |
Achin Gupta <achin.gupta@arm.com> |
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.
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
show more ...
|
| 59bd2ad8 | 12-Apr-2022 |
Marc Bonnici <marc.bonnici@arm.com> |
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 ind
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
show more ...
|