Lines Matching refs:SMC
773 secure interrupt during ``yielding`` SMC processing, save the registers that
796 The TSP issues an SMC with ``TSP_HANDLED_S_EL1_INTR`` as the function identifier to
800 upon receiving an SMC with ``TSP_HANDLED_S_EL1_INTR`` as the function identifier:
822 ``yielding`` SMC processing or by a higher priority EL3 interrupt during
830 ``yielding`` SMC in response to the ``TSP_FID_RESUME`` SMC from the normal world.
831 (See Section `Implication of preempted SMC on Non-Secure Software`_).
833 The non-secure interrupt triggered in Secure-EL1 during ``yielding`` SMC
849 i.e. **TEL3=0, CSS=0**. During ``yielding`` SMC processing, the IRQ
852 register context and issues an SMC with ``TSP_PREEMPTED`` as the function
853 identifier to signal preemption of TSP. The TSPD SMC handler,
854 ``tspd_smc_handler()``, ensures that the SMC call originated from the
874 The Normal World is expected to resume the TSP after the ``yielding`` SMC
875 preemption by issuing an SMC with ``TSP_FID_RESUME`` as the function identifier
876 (see section `Implication of preempted SMC on Non-Secure Software`_). The TSPD
878 receiving this SMC:
943 an SMC with ``TSP_PREEMPTED`` as the function identifier.
962 the instruction that follows this SMC instruction when the TSPD hands control
963 to the TSP in response to an SMC with ``TSP_FID_RESUME`` as the function
970 Implication of preempted SMC on Non-Secure Software
973 A ``yielding`` SMC call to Secure payload can be preempted by a non-secure
975 the interrupt (For details on ``yielding`` SMC refer `SMC calling convention`_).
976 In this case, the SMC call has not completed its execution and the execution
977 must return back to the secure payload to resume the preempted SMC call.
978 This can be achieved by issuing an SMC call which instructs to resume the
979 preempted SMC.
981 A ``fast`` SMC cannot be preempted and hence this case will not happen for
982 a fast SMC call.
985 as the resume SMC FID. It is important to note that ``TSP_FID_RESUME`` is a
986 ``yielding`` SMC which means it too can be be preempted. The typical non
987 secure software sequence for issuing a ``yielding`` SMC would look like this,
993 rc = smc(TSP_YIELD_SMC_FID, ...); /* Issue a Yielding SMC call */
996 while (rc == SMC_PREEMPTED) { /* Check if the SMC call is preempted */
997 rc = smc(TSP_FID_RESUME); /* Issue resume SMC call */
1000 The ``TSP_YIELD_SMC_FID`` is any ``yielding`` SMC function identifier and the smc()
1001 function invokes a SMC call with the required arguments. The pending non-secure
1004 from the SMC call is tested for ``SMC_PREEMPTED`` to check whether it is
1005 preempted. If it is, then the resume SMC call ``TSP_FID_RESUME`` is issued. The
1006 return value of the SMC call is tested again to check if it is preempted.
1007 This is done in a loop till the SMC call succeeds or fails. If a ``yielding``
1008 SMC is preempted, until it is resumed using ``TSP_FID_RESUME`` SMC and
1009 completed, the current TSPD prevents any other SMC call from re-entering