diff options
author | Jeenu Viswambharan <jeenu.viswambharan@arm.com> | 2014-02-28 11:23:35 +0000 |
---|---|---|
committer | Dan Handley <dan.handley@arm.com> | 2014-03-20 11:16:23 +0000 |
commit | 52538b9b3e1fcaa96a1bb466c86a35199d4fea67 (patch) | |
tree | 87d3382c3194227acda435bd472f3df06f96c0a9 /services | |
parent | 64f6ea9be7d00f1d7a09c4d928124d93354d9e2f (diff) |
Implement standard calls for TSP
This patch adds call count, UID and version information SMC calls for
the Trusted OS, as specified by the SMC calling convention.
Change-Id: I9a3e84ac1bb046051db975d853dcbe9612aba6a9
Diffstat (limited to 'services')
-rw-r--r-- | services/spd/tspd/tspd_main.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/services/spd/tspd/tspd_main.c b/services/spd/tspd/tspd_main.c index ec28773..543266e 100644 --- a/services/spd/tspd/tspd_main.c +++ b/services/spd/tspd/tspd_main.c @@ -51,6 +51,7 @@ #include <psci.h> #include <tspd_private.h> #include <debug.h> +#include <uuid.h> /******************************************************************************* * Single structure to hold information about the various entry points into the @@ -64,6 +65,11 @@ entry_info *tsp_entry_info; tsp_context tspd_sp_context[TSPD_CORE_COUNT]; +/* TSP UID */ +DEFINE_SVC_UUID(tsp_uuid, + 0x5b3056a0, 0x3291, 0x427b, 0x98, 0x11, + 0x71, 0x68, 0xca, 0x50, 0xf3, 0xfa); + int32_t tspd_init(meminfo *bl32_meminfo); @@ -340,6 +346,21 @@ uint64_t tspd_smc_handler(uint32_t smc_fid, SMC_RET2(handle, read_ctx_reg(ns_gp_regs, CTX_GPREG_X1), read_ctx_reg(ns_gp_regs, CTX_GPREG_X2)); + case TOS_CALL_COUNT: + /* + * Return the number of service function IDs implemented to + * provide service to non-secure + */ + SMC_RET1(handle, TSP_NUM_FID); + + case TOS_UID: + /* Return TSP UID to the caller */ + SMC_UUID_RET(handle, tsp_uuid); + + case TOS_CALL_VERSION: + /* Return the version of current implementation */ + SMC_RET2(handle, TSP_VERSION_MAJOR, TSP_VERSION_MINOR); + default: break; } |