Commit 472be0f7 authored by Jeenu Viswambharan's avatar Jeenu Viswambharan
Browse files

TSPD: Register preempted SMC error code with EHF



An earlier patch extended ehf_allow_ns_preemption() API to also register
an error code to offer to Non-secure when a Yielding SMC is preempted by
SDEI interrupt. In TSPD's case, register the error code TSP_PREEMPTED.

Change-Id: I31992b6651f80694e83bc5092b044ef7a3eda690
Signed-off-by: default avatarJeenu Viswambharan <jeenu.viswambharan@arm.com>
parent af34cd72
...@@ -549,9 +549,10 @@ uint64_t tspd_smc_handler(uint32_t smc_fid, ...@@ -549,9 +549,10 @@ uint64_t tspd_smc_handler(uint32_t smc_fid,
* preempt Secure execution. However, for * preempt Secure execution. However, for
* yielding SMCs, we want preemption to happen; * yielding SMCs, we want preemption to happen;
* so explicitly allow NS preemption in this * so explicitly allow NS preemption in this
* case. * case, and supply the preemption return code
* for TSP.
*/ */
ehf_allow_ns_preemption(); ehf_allow_ns_preemption(TSP_PREEMPTED);
#endif #endif
} }
...@@ -662,9 +663,10 @@ uint64_t tspd_smc_handler(uint32_t smc_fid, ...@@ -662,9 +663,10 @@ uint64_t tspd_smc_handler(uint32_t smc_fid,
#if EL3_EXCEPTION_HANDLING #if EL3_EXCEPTION_HANDLING
/* /*
* Allow the resumed yielding SMC processing to be preempted by * Allow the resumed yielding SMC processing to be preempted by
* Non-secure interrupts. * Non-secure interrupts. Also, supply the preemption return
* code for TSP.
*/ */
ehf_allow_ns_preemption(); ehf_allow_ns_preemption(TSP_PREEMPTED);
#endif #endif
/* We just need to return to the preempted point in /* We just need to return to the preempted point in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment