| e46b2fd2 | 01-Mar-2021 |
J-Alves <joao.alves@arm.com> |
SPM: Fix error codes size in SPMD handler
FF-A specification states that error codes should be typed int32_t. SPMD's uses uint64_t for return values, which if assigned with a signed type would have
SPM: Fix error codes size in SPMD handler
FF-A specification states that error codes should be typed int32_t. SPMD's uses uint64_t for return values, which if assigned with a signed type would have sign extension, and change the size of the return from 32-bit to 64-bit.
Signed-off-by: J-Alves <joao.alves@arm.com> Change-Id: I288ab2ffec8330a2fe1f21df14e22c34bd83ced3
show more ...
|
| 51bb1d73 | 18-Sep-2020 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
Bug fix in tspd interrupt handling when TSP_NS_INTR_ASYNC_PREEMPT is enabled
Typically, interrupts for a specific security state get handled in the same security execption level if the execution is
Bug fix in tspd interrupt handling when TSP_NS_INTR_ASYNC_PREEMPT is enabled
Typically, interrupts for a specific security state get handled in the same security execption level if the execution is in the same security state. For example, if a non-secure interrupt gets fired when CPU is executing in NS-EL2 it gets handled in the non-secure world.
However, interrupts belonging to the opposite security state typically demand a world(context) switch. This is inline with the security principle which states a secure interrupt has to be handled in the secure world. Hence, the TSPD in EL3 expects the context(handle) for a secure interrupt to be non-secure and vice versa.
The function "tspd_sel1_interrupt_handler" is the handler registered for S-EL1 interrupts by the TSPD. Based on the above assumption, it provides an assertion to validate if the interrupt originated from non-secure world and upon success arranges entry into the TSP at 'tsp_sel1_intr_entry' for handling the interrupt.
However, a race condition between non-secure and secure interrupts can lead to a scenario where the above assumptions do not hold true and further leading to following assert fail.
This patch fixes the bug which causes this assert fail:
ASSERT: services/spd/tspd/tspd_main.c:105 BACKTRACE: START: assert 0: EL3: 0x400c128 1: EL3: 0x400faf8 2: EL3: 0x40099a4 3: EL3: 0x4010d54 BACKTRACE: END: assert
Change-Id: I359d30fb5dbb1429a4a3c3fff37fdc64c07e9414 Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
show more ...
|
| 473ced56 | 02-Mar-2021 |
Olivier Deprez <olivier.deprez@arm.com> |
SPMD: lock the g_spmd_pm structure
Add a lock and spin lock/unlock calls when accessing the fields of the SPMD PM structure.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Change-Id: I9bab7
SPMD: lock the g_spmd_pm structure
Add a lock and spin lock/unlock calls when accessing the fields of the SPMD PM structure.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Change-Id: I9bab705564dc1ba003c29512b1f9be5f126fbb0d
show more ...
|
| cdb49d47 | 19-Jan-2021 |
Olivier Deprez <olivier.deprez@arm.com> |
FF-A: implement FFA_SECONDARY_EP_REGISTER
Remove the former impdef SPMD service for SPMC entry point registration. Replace with FFA_SECONDARY_EP_REGISTER ABI providing a single entry point address i
FF-A: implement FFA_SECONDARY_EP_REGISTER
Remove the former impdef SPMD service for SPMC entry point registration. Replace with FFA_SECONDARY_EP_REGISTER ABI providing a single entry point address into the SPMC for primary and secondary cold boot.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Change-Id: I067adeec25fc12cdae90c15a616903b4ac4d4d83
show more ...
|
| 6ccbcff5 | 31-Dec-2020 |
Tony Xie <tony.xie@rock-chips.com> |
SDEI: updata the affinity of shared event
when updata routing of an SDEI event, if the registration flags is SDEI_REGF_RM_PE, need to updata the affinity of shared event.
Signed-off-by: Tony Xie <t
SDEI: updata the affinity of shared event
when updata routing of an SDEI event, if the registration flags is SDEI_REGF_RM_PE, need to updata the affinity of shared event.
Signed-off-by: Tony Xie <tony.xie@rock-chips.com> Change-Id: Ie5d7cc4199253f6af1c28b407f712caac3092d06
show more ...
|
| f36e62e3 | 18-Feb-2021 |
Max Shvetsov <maksims.svecovs@arm.com> |
Revert "spmd: ensure SIMD context is saved/restored on SPMC entry/exit"
This reverts commit bedb13f509ac68adaf9baa9b5f24eede912e801d. SIMD context is now saved in S-EL2 as opposed to EL3, see commit
Revert "spmd: ensure SIMD context is saved/restored on SPMC entry/exit"
This reverts commit bedb13f509ac68adaf9baa9b5f24eede912e801d. SIMD context is now saved in S-EL2 as opposed to EL3, see commit: https://review.trustedfirmware.org/c/hafnium/hafnium/+/8321
Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com> Change-Id: Ic81416464ffada1a6348d0abdcf3adc7c1879e61
show more ...
|
| bedb13f5 | 01-Dec-2020 |
Olivier Deprez <olivier.deprez@arm.com> |
spmd: ensure SIMD context is saved/restored on SPMC entry/exit
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Change-Id: I8ed58ec5f97e05d91451020a2739464bb8e428b3 |
| 323b6c63 | 10-Feb-2021 |
Andre Przywara <andre.przywara@arm.com> |
services: TRNG: Fix -O0 compilation
The code to check for the presence of the TRNG service relies on toolchain garbage collection, which is not enabled with -O0.
Add #ifdef guards around the call t
services: TRNG: Fix -O0 compilation
The code to check for the presence of the TRNG service relies on toolchain garbage collection, which is not enabled with -O0.
Add #ifdef guards around the call to the TRNG service handler to cover builds without optimisation as well.
Change-Id: I08ece2005ea1c8fa96afa13904a851dec6b24216 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 7dfb9911 | 22-Jun-2020 |
Jimmy Brisson <jimmy.brisson@arm.com> |
Add TRNG Firmware Interface service
This adds the TRNG Firmware Interface Service to the standard service dispatcher. This includes a method for dispatching entropy requests to platforms and include
Add TRNG Firmware Interface service
This adds the TRNG Firmware Interface Service to the standard service dispatcher. This includes a method for dispatching entropy requests to platforms and includes an entropy pool implementation to avoid dropping any entropy requested from the platform.
Change-Id: I71cadb3cb377a507652eca9e0d68714c973026e9 Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| a83103c8 | 25-Nov-2020 |
Alexei Fedorov <Alexei.Fedorov@arm.com> |
Aarch64: Add support for FEAT_PANx extensions
This patch provides the changes listed below: - Adds new bit fields definitions for SCTLR_EL1/2 registers - Corrects the name of SCTLR_EL1/2.[20] bit fi
Aarch64: Add support for FEAT_PANx extensions
This patch provides the changes listed below: - Adds new bit fields definitions for SCTLR_EL1/2 registers - Corrects the name of SCTLR_EL1/2.[20] bit field from SCTLR_UWXN_BIT to SCTLR_TSCXT_BIT - Adds FEAT_PANx bit field definitions and their possible values for ID_AA64MMFR1_EL1 register. - Adds setting of SCTLR_EL1.SPAN bit to preserve PSTATE.PAN on taking an exception to EL1 in spm_sp_setup() function (services\std_svc\spm_mm\spm_mm_setup.c)
Change-Id: If51f20e7995c649126a7728a4d0867041fdade19 Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
show more ...
|
| 6e4da01f | 02-Oct-2020 |
Andre Przywara <andre.przywara@arm.com> |
spmd: Fix signedness comparison warning
With -Wsign-compare, compilers issue a warning in the SPMD code: ==================== services/std_svc/spmd/spmd_pm.c:35:22: error: comparison of integer expr
spmd: Fix signedness comparison warning
With -Wsign-compare, compilers issue a warning in the SPMD code: ==================== services/std_svc/spmd/spmd_pm.c:35:22: error: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Werror=sign-compare] 35 | if ((id < 0) || (id >= PLATFORM_CORE_COUNT)) { | ^~ cc1: all warnings being treated as errors ====================
Since we just established that "id" is positive, we can safely cast it to an unsigned type to make the comparison have matching types.
Change-Id: I6ef24804c88136d7e3f15de008e4fea854f10ffe Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| 80f823b7 | 17-Sep-2020 |
Mark Dykes <mardyk01@review.trustedfirmware.org> |
Merge "spmd: remove assert for SPMC PC value" into integration |
| f7fb0bf7 | 25-Aug-2020 |
Max Shvetsov <maksims.svecovs@arm.com> |
Fix: fixing coverity issue for SPM Core.
spmd_get_context_by_mpidr was using potentially negative value as an array index. plat_core_pos_by_mpidr could return -1 on failure which is utilized by some
Fix: fixing coverity issue for SPM Core.
spmd_get_context_by_mpidr was using potentially negative value as an array index. plat_core_pos_by_mpidr could return -1 on failure which is utilized by some platforms.
Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com> Change-Id: I7f8827e77f18da389c9cafdc1fc841aba9f03120
show more ...
|
| 75e1dfa0 | 01-Sep-2020 |
Varun Wadekar <vwadekar@nvidia.com> |
spmd: remove assert for SPMC PC value
This patch removes the assert that expects the SPMC PC value to be same as BL32_BASE. This assumption is not true for all platforms e.g. Tegra, and so will be r
spmd: remove assert for SPMC PC value
This patch removes the assert that expects the SPMC PC value to be same as BL32_BASE. This assumption is not true for all platforms e.g. Tegra, and so will be removed from the SPMD.
Platforms can always add this check to the platform files, if required.
Change-Id: Ic40620b43d160feb4f72f4af18e6d01861d4bf37 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| fc198188 | 17-Sep-2019 |
Varun Wadekar <vwadekar@nvidia.com> |
spd: trusty: allow clients to retrieve service UUID
This patch implements support for the 64-bit and 32-bit versions of 0xBF00FF01 SMC function ID, as documented by the SMCCC, to allow non-secure wo
spd: trusty: allow clients to retrieve service UUID
This patch implements support for the 64-bit and 32-bit versions of 0xBF00FF01 SMC function ID, as documented by the SMCCC, to allow non-secure world clients to query SPD's UUID.
In order to service this FID, the Trusty SPD now increases the range of SMCs that it services. To restrict Trusty from receiving the extra SMC FIDs, this patch drops any unsupported FID.
Verified with TFTF tests for UID query and internal gtest for Trusty.
Change-Id: If96fe4993f7e641595cfe67cc6b4210a0d52403f Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| 545b8eb3 | 28-Jul-2020 |
Ruari Phipps <ruari.phipps@arm.com> |
SPMD: Dont forward PARTITION_INFO_GET from secure FF-A instance
Signed-off-by: Ruari Phipps <ruari.phipps@arm.com> Change-Id: I4e9fbfcfda4ed4b87d5ece1c609c57c73d617d4c |
| 02d50bb0 | 19-Jun-2020 |
Olivier Deprez <olivier.deprez@arm.com> |
SPMC: embed secondary core ep info into to SPMC context
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com> Change-Id: Icdb15b8664fb3467ffd55
SPMC: embed secondary core ep info into to SPMC context
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com> Change-Id: Icdb15b8664fb3467ffd55b44d1f0660457192586
show more ...
|
| a92bc73b | 23-Mar-2020 |
Olivier Deprez <olivier.deprez@arm.com> |
SPMD: secondary cores PM on and off SPD hooks relayed to SPMC
Define SPMD PM hooks for warm boot and off events. svc_on_finish handler enters the SPMC at the entry point defined by the secondary EP
SPMD: secondary cores PM on and off SPD hooks relayed to SPMC
Define SPMD PM hooks for warm boot and off events. svc_on_finish handler enters the SPMC at the entry point defined by the secondary EP register service. The svc_off handler notifies the SPMC that a physical core is being turned off through a notification message.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Change-Id: I2609a75a0c6ffb9f6313fc09553be2b29a41de59
show more ...
|
| f0d743db | 16-Apr-2020 |
Olivier Deprez <olivier.deprez@arm.com> |
SPMD: handle SPMC message to register secondary core entry point
Upon booting, the SPMC running on the primary core shall register the secondary core entry points to which a given secondary core bei
SPMD: handle SPMC message to register secondary core entry point
Upon booting, the SPMC running on the primary core shall register the secondary core entry points to which a given secondary core being woken up shall jump to into the SPMC . The current implementation assumes the SPMC calls a registering service implemented in the SPMD for each core identified by its MPIDR. This can typically happen in a simple loop implemented in the early SPMC initialization routines by passing each core identifier associated with an entry point address and context information. This service is implemented on top of a more generic SPMC<=>SPMD interface using direct request/response message passing as defined by the FF-A specification.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com> Change-Id: I1f70163b6b5cee0880bd2004e1fec41e3780ba35
show more ...
|
| c2901419 | 16-Apr-2020 |
Olivier Deprez <olivier.deprez@arm.com> |
SPMD: introduce SPMC to SPMD messages
FF-A interface to handle SPMC to SPMD direct messages requests.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Signed-off-by: Max Shvetsov <maksims.sve
SPMD: introduce SPMC to SPMD messages
FF-A interface to handle SPMC to SPMD direct messages requests.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com> Change-Id: Ia707a308c55561a31dcfa86e554ea1c9e23f862a
show more ...
|
| a334c4e6 | 28-Oct-2019 |
Olivier Deprez <olivier.deprez@arm.com> |
SPMD: register the SPD PM hooks
Change-Id: If88d64c0e3d60accd2638a55f9f3299ec700a8c8 Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> |
| b058f20a | 28-Oct-2019 |
Olivier Deprez <olivier.deprez@arm.com> |
SPMD: add generic SPD PM handlers
This patch defines and registers the SPMD PM handler hooks. This is intended to relay boot and PM events to the SPMC.
Change-Id: If5a758d22b8d2152cbbb83a0cad563b5e
SPMD: add generic SPD PM handlers
This patch defines and registers the SPMD PM handler hooks. This is intended to relay boot and PM events to the SPMC.
Change-Id: If5a758d22b8d2152cbbb83a0cad563b5e1c6bd49 Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
show more ...
|
| 9dcf63dd | 28-Oct-2019 |
Olivier Deprez <olivier.deprez@arm.com> |
SPMD: enhance SPMC internal boot states
This patch adds SPMC states used by the SPMD to track SPMC boot phases specifically on secondary cores.
Change-Id: If97af7352dda7f04a8e46a56892a2aeddcfab91b
SPMD: enhance SPMC internal boot states
This patch adds SPMC states used by the SPMD to track SPMC boot phases specifically on secondary cores.
Change-Id: If97af7352dda7f04a8e46a56892a2aeddcfab91b Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
show more ...
|
| c0267cc9 | 28-Oct-2019 |
Olivier Deprez <olivier.deprez@arm.com> |
SPMD: entry point info get helper
This patch provides a helper to get the entry_point_info structure used by the boot CPU as it is used to initialise the SPMC context on secondary CPUs.
Change-Id:
SPMD: entry point info get helper
This patch provides a helper to get the entry_point_info structure used by the boot CPU as it is used to initialise the SPMC context on secondary CPUs.
Change-Id: I99087dc7a86a7258e545d24a2ff06aa25170f00c Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
show more ...
|
| 86ba5853 | 14-Jul-2020 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
Add wrapper for AT instruction
In case of AT speculative workaround applied, page table walk is disabled for lower ELs (EL1 and EL0) in EL3. Hence added a wrapper function which temporarily enables
Add wrapper for AT instruction
In case of AT speculative workaround applied, page table walk is disabled for lower ELs (EL1 and EL0) in EL3. Hence added a wrapper function which temporarily enables page table walk to execute AT instruction for lower ELs and then disables page table walk.
Execute AT instructions directly for lower ELs (EL1 and EL0) assuming page table walk is enabled always when AT speculative workaround is not applied.
Change-Id: I4ad4c0bcbb761448af257e9f72ae979473c0dde8 Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
show more ...
|