aboutsummaryrefslogtreecommitdiff
path: root/services/spd
diff options
context:
space:
mode:
authorJeenu Viswambharan <jeenu.viswambharan@arm.com>2018-01-22 12:42:54 +0000
committerJeenu Viswambharan <jeenu.viswambharan@arm.com>2018-02-27 13:46:40 +0000
commit472be0f74e8d4559471c6eb95169455001f236de (patch)
tree8bd944476f009fea74aaeaa6bf6772406fcc57ab /services/spd
parentaf34cd72ca3b716d8a9800c83b1577e3a39cf41b (diff)
downloadtrusted-firmware-a-472be0f74e8d4559471c6eb95169455001f236de.tar.gz
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: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Diffstat (limited to 'services/spd')
-rw-r--r--services/spd/tspd/tspd_main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/services/spd/tspd/tspd_main.c b/services/spd/tspd/tspd_main.c
index c564f8b867..3d06e0b81d 100644
--- a/services/spd/tspd/tspd_main.c
+++ b/services/spd/tspd/tspd_main.c
@@ -549,9 +549,10 @@ uint64_t tspd_smc_handler(uint32_t smc_fid,
* preempt Secure execution. However, for
* yielding SMCs, we want preemption to happen;
* 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
}
@@ -662,9 +663,10 @@ uint64_t tspd_smc_handler(uint32_t smc_fid,
#if EL3_EXCEPTION_HANDLING
/*
* 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
/* We just need to return to the preempted point in