1375f538aSAchin Gupta /* 2375f538aSAchin Gupta * Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved. 3375f538aSAchin Gupta * 4375f538aSAchin Gupta * Redistribution and use in source and binary forms, with or without 5375f538aSAchin Gupta * modification, are permitted provided that the following conditions are met: 6375f538aSAchin Gupta * 7375f538aSAchin Gupta * Redistributions of source code must retain the above copyright notice, this 8375f538aSAchin Gupta * list of conditions and the following disclaimer. 9375f538aSAchin Gupta * 10375f538aSAchin Gupta * Redistributions in binary form must reproduce the above copyright notice, 11375f538aSAchin Gupta * this list of conditions and the following disclaimer in the documentation 12375f538aSAchin Gupta * and/or other materials provided with the distribution. 13375f538aSAchin Gupta * 14375f538aSAchin Gupta * Neither the name of ARM nor the names of its contributors may be used 15375f538aSAchin Gupta * to endorse or promote products derived from this software without specific 16375f538aSAchin Gupta * prior written permission. 17375f538aSAchin Gupta * 18375f538aSAchin Gupta * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19375f538aSAchin Gupta * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20375f538aSAchin Gupta * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21375f538aSAchin Gupta * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22375f538aSAchin Gupta * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23375f538aSAchin Gupta * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24375f538aSAchin Gupta * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25375f538aSAchin Gupta * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26375f538aSAchin Gupta * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27375f538aSAchin Gupta * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28375f538aSAchin Gupta * POSSIBILITY OF SUCH DAMAGE. 29375f538aSAchin Gupta */ 30375f538aSAchin Gupta 31375f538aSAchin Gupta 32375f538aSAchin Gupta /******************************************************************************* 33375f538aSAchin Gupta * This is the Secure Payload Dispatcher (SPD). The dispatcher is meant to be a 34375f538aSAchin Gupta * plug-in component to the Secure Monitor, registered as a runtime service. The 35375f538aSAchin Gupta * SPD is expected to be a functional extension of the Secure Payload (SP) that 36375f538aSAchin Gupta * executes in Secure EL1. The Secure Monitor will delegate all SMCs targeting 37375f538aSAchin Gupta * the Trusted OS/Applications range to the dispatcher. The SPD will either 38375f538aSAchin Gupta * handle the request locally or delegate it to the Secure Payload. It is also 39375f538aSAchin Gupta * responsible for initialising and maintaining communication with the SP. 40375f538aSAchin Gupta ******************************************************************************/ 41375f538aSAchin Gupta #include <arch_helpers.h> 42*97043ac9SDan Handley #include <assert.h> 43*97043ac9SDan Handley #include <bl_common.h> 44*97043ac9SDan Handley #include <bl31.h> 45375f538aSAchin Gupta #include <context_mgmt.h> 46375f538aSAchin Gupta #include <runtime_svc.h> 47*97043ac9SDan Handley #include <stddef.h> 48375f538aSAchin Gupta #include <tsp.h> 4952538b9bSJeenu Viswambharan #include <uuid.h> 5035e98e55SDan Handley #include "tspd_private.h" 51375f538aSAchin Gupta 52375f538aSAchin Gupta /******************************************************************************* 53375f538aSAchin Gupta * Single structure to hold information about the various entry points into the 54375f538aSAchin Gupta * Secure Payload. It is initialised once on the primary core after a cold boot. 55375f538aSAchin Gupta ******************************************************************************/ 56fb037bfbSDan Handley entry_info_t *tsp_entry_info; 57375f538aSAchin Gupta 58375f538aSAchin Gupta /******************************************************************************* 59375f538aSAchin Gupta * Array to keep track of per-cpu Secure Payload state 60375f538aSAchin Gupta ******************************************************************************/ 61fb037bfbSDan Handley tsp_context_t tspd_sp_context[TSPD_CORE_COUNT]; 62375f538aSAchin Gupta 637f366605SJeenu Viswambharan 6452538b9bSJeenu Viswambharan /* TSP UID */ 6552538b9bSJeenu Viswambharan DEFINE_SVC_UUID(tsp_uuid, 6652538b9bSJeenu Viswambharan 0x5b3056a0, 0x3291, 0x427b, 0x98, 0x11, 6752538b9bSJeenu Viswambharan 0x71, 0x68, 0xca, 0x50, 0xf3, 0xfa); 6852538b9bSJeenu Viswambharan 69fb037bfbSDan Handley int32_t tspd_init(meminfo_t *bl32_meminfo); 707f366605SJeenu Viswambharan 717f366605SJeenu Viswambharan 72375f538aSAchin Gupta /******************************************************************************* 73375f538aSAchin Gupta * Secure Payload Dispatcher setup. The SPD finds out the SP entrypoint and type 74375f538aSAchin Gupta * (aarch32/aarch64) if not already known and initialises the context for entry 75375f538aSAchin Gupta * into the SP for its initialisation. 76375f538aSAchin Gupta ******************************************************************************/ 77375f538aSAchin Gupta int32_t tspd_setup(void) 78375f538aSAchin Gupta { 79fb037bfbSDan Handley el_change_info_t *image_info; 80375f538aSAchin Gupta int32_t rc; 81375f538aSAchin Gupta uint64_t mpidr = read_mpidr(); 82375f538aSAchin Gupta uint32_t linear_id; 83375f538aSAchin Gupta 84375f538aSAchin Gupta linear_id = platform_get_core_pos(mpidr); 85375f538aSAchin Gupta 86375f538aSAchin Gupta /* 87375f538aSAchin Gupta * Get information about the Secure Payload (BL32) image. Its 88375f538aSAchin Gupta * absence is a critical failure. TODO: Add support to 89375f538aSAchin Gupta * conditionally include the SPD service 90375f538aSAchin Gupta */ 91375f538aSAchin Gupta image_info = bl31_get_next_image_info(SECURE); 92375f538aSAchin Gupta assert(image_info); 93375f538aSAchin Gupta 94375f538aSAchin Gupta /* 957f366605SJeenu Viswambharan * If there's no valid entry point for SP, we return a non-zero value 967f366605SJeenu Viswambharan * signalling failure initializing the service. We bail out without 977f366605SJeenu Viswambharan * registering any handlers 987f366605SJeenu Viswambharan */ 997f366605SJeenu Viswambharan if (!image_info->entrypoint) 1007f366605SJeenu Viswambharan return 1; 1017f366605SJeenu Viswambharan 1027f366605SJeenu Viswambharan /* 103375f538aSAchin Gupta * We could inspect the SP image and determine it's execution 104375f538aSAchin Gupta * state i.e whether AArch32 or AArch64. Assuming it's AArch64 105375f538aSAchin Gupta * for the time being. 106375f538aSAchin Gupta */ 107375f538aSAchin Gupta rc = tspd_init_secure_context(image_info->entrypoint, 108375f538aSAchin Gupta TSP_AARCH64, 109375f538aSAchin Gupta mpidr, 110375f538aSAchin Gupta &tspd_sp_context[linear_id]); 111375f538aSAchin Gupta assert(rc == 0); 112375f538aSAchin Gupta 1137f366605SJeenu Viswambharan /* 1147f366605SJeenu Viswambharan * All TSPD initialization done. Now register our init function with 1157f366605SJeenu Viswambharan * BL31 for deferred invocation 1167f366605SJeenu Viswambharan */ 1177f366605SJeenu Viswambharan bl31_register_bl32_init(&tspd_init); 1187f366605SJeenu Viswambharan 119375f538aSAchin Gupta return rc; 120375f538aSAchin Gupta } 121375f538aSAchin Gupta 122375f538aSAchin Gupta /******************************************************************************* 123375f538aSAchin Gupta * This function passes control to the Secure Payload image (BL32) for the first 124375f538aSAchin Gupta * time on the primary cpu after a cold boot. It assumes that a valid secure 125375f538aSAchin Gupta * context has already been created by tspd_setup() which can be directly used. 126375f538aSAchin Gupta * It also assumes that a valid non-secure context has been initialised by PSCI 127375f538aSAchin Gupta * so it does not need to save and restore any non-secure state. This function 128375f538aSAchin Gupta * performs a synchronous entry into the Secure payload. The SP passes control 129375f538aSAchin Gupta * back to this routine through a SMC. It also passes the extents of memory made 130375f538aSAchin Gupta * available to BL32 by BL31. 131375f538aSAchin Gupta ******************************************************************************/ 132fb037bfbSDan Handley int32_t tspd_init(meminfo_t *bl32_meminfo) 133375f538aSAchin Gupta { 134375f538aSAchin Gupta uint64_t mpidr = read_mpidr(); 135375f538aSAchin Gupta uint32_t linear_id = platform_get_core_pos(mpidr); 136375f538aSAchin Gupta uint64_t rc; 137fb037bfbSDan Handley tsp_context_t *tsp_ctx = &tspd_sp_context[linear_id]; 138375f538aSAchin Gupta 139375f538aSAchin Gupta /* 140375f538aSAchin Gupta * Arrange for passing a pointer to the meminfo structure 141375f538aSAchin Gupta * describing the memory extents available to the secure 142375f538aSAchin Gupta * payload. 143375f538aSAchin Gupta * TODO: We are passing a pointer to BL31 internal memory 144375f538aSAchin Gupta * whereas this structure should be copied to a communication 145375f538aSAchin Gupta * buffer between the SP and SPD. 146375f538aSAchin Gupta */ 147375f538aSAchin Gupta write_ctx_reg(get_gpregs_ctx(&tsp_ctx->cpu_ctx), 148375f538aSAchin Gupta CTX_GPREG_X0, 149375f538aSAchin Gupta (uint64_t) bl32_meminfo); 150375f538aSAchin Gupta 151607084eeSAchin Gupta /* 152607084eeSAchin Gupta * Arrange for an entry into the test secure payload. We expect an array 153607084eeSAchin Gupta * of vectors in return 154607084eeSAchin Gupta */ 155375f538aSAchin Gupta rc = tspd_synchronous_sp_entry(tsp_ctx); 156375f538aSAchin Gupta assert(rc != 0); 1577f366605SJeenu Viswambharan if (rc) { 158375f538aSAchin Gupta tsp_ctx->state = TSP_STATE_ON; 159375f538aSAchin Gupta 1607f366605SJeenu Viswambharan /* 1617f366605SJeenu Viswambharan * TSP has been successfully initialized. Register power 1627f366605SJeenu Viswambharan * managemnt hooks with PSCI 1637f366605SJeenu Viswambharan */ 1647f366605SJeenu Viswambharan psci_register_spd_pm_hook(&tspd_pm); 1657f366605SJeenu Viswambharan } 1667f366605SJeenu Viswambharan 167375f538aSAchin Gupta return rc; 168375f538aSAchin Gupta } 169375f538aSAchin Gupta 1707f366605SJeenu Viswambharan 171375f538aSAchin Gupta /******************************************************************************* 172375f538aSAchin Gupta * This function is responsible for handling all SMCs in the Trusted OS/App 173375f538aSAchin Gupta * range from the non-secure state as defined in the SMC Calling Convention 174375f538aSAchin Gupta * Document. It is also responsible for communicating with the Secure payload 175375f538aSAchin Gupta * to delegate work and return results back to the non-secure state. Lastly it 176375f538aSAchin Gupta * will also return any information that the secure payload needs to do the 177375f538aSAchin Gupta * work assigned to it. 178375f538aSAchin Gupta ******************************************************************************/ 179375f538aSAchin Gupta uint64_t tspd_smc_handler(uint32_t smc_fid, 180375f538aSAchin Gupta uint64_t x1, 181375f538aSAchin Gupta uint64_t x2, 182375f538aSAchin Gupta uint64_t x3, 183375f538aSAchin Gupta uint64_t x4, 184375f538aSAchin Gupta void *cookie, 185375f538aSAchin Gupta void *handle, 186375f538aSAchin Gupta uint64_t flags) 187375f538aSAchin Gupta { 188fb037bfbSDan Handley cpu_context_t *ns_cpu_context; 189fb037bfbSDan Handley gp_regs_t *ns_gp_regs; 190375f538aSAchin Gupta unsigned long mpidr = read_mpidr(); 191375f538aSAchin Gupta uint32_t linear_id = platform_get_core_pos(mpidr), ns; 192fb037bfbSDan Handley tsp_context_t *tsp_ctx = &tspd_sp_context[linear_id]; 193375f538aSAchin Gupta 194375f538aSAchin Gupta /* Determine which security state this SMC originated from */ 195375f538aSAchin Gupta ns = is_caller_non_secure(flags); 196375f538aSAchin Gupta 197375f538aSAchin Gupta switch (smc_fid) { 198375f538aSAchin Gupta 199375f538aSAchin Gupta /* 200375f538aSAchin Gupta * This function ID is used only by the SP to indicate it has 201375f538aSAchin Gupta * finished initialising itself after a cold boot 202375f538aSAchin Gupta */ 203375f538aSAchin Gupta case TSP_ENTRY_DONE: 204375f538aSAchin Gupta if (ns) 205375f538aSAchin Gupta SMC_RET1(handle, SMC_UNK); 206375f538aSAchin Gupta 207375f538aSAchin Gupta /* 208375f538aSAchin Gupta * Stash the SP entry points information. This is done 209375f538aSAchin Gupta * only once on the primary cpu 210375f538aSAchin Gupta */ 211375f538aSAchin Gupta assert(tsp_entry_info == NULL); 212fb037bfbSDan Handley tsp_entry_info = (entry_info_t *) x1; 213375f538aSAchin Gupta 214375f538aSAchin Gupta /* 215375f538aSAchin Gupta * SP reports completion. The SPD must have initiated 216375f538aSAchin Gupta * the original request through a synchronous entry 217375f538aSAchin Gupta * into the SP. Jump back to the original C runtime 218375f538aSAchin Gupta * context. 219375f538aSAchin Gupta */ 220916a2c1eSAchin Gupta tspd_synchronous_sp_exit(tsp_ctx, x1); 221375f538aSAchin Gupta 222375f538aSAchin Gupta /* Should never reach here */ 223375f538aSAchin Gupta assert(0); 224375f538aSAchin Gupta 225607084eeSAchin Gupta /* 226607084eeSAchin Gupta * These function IDs is used only by the SP to indicate it has 227607084eeSAchin Gupta * finished: 228607084eeSAchin Gupta * 1. turning itself on in response to an earlier psci 229607084eeSAchin Gupta * cpu_on request 230607084eeSAchin Gupta * 2. resuming itself after an earlier psci cpu_suspend 231607084eeSAchin Gupta * request. 232607084eeSAchin Gupta */ 233607084eeSAchin Gupta case TSP_ON_DONE: 234607084eeSAchin Gupta case TSP_RESUME_DONE: 235607084eeSAchin Gupta 236607084eeSAchin Gupta /* 237607084eeSAchin Gupta * These function IDs is used only by the SP to indicate it has 238607084eeSAchin Gupta * finished: 239607084eeSAchin Gupta * 1. suspending itself after an earlier psci cpu_suspend 240607084eeSAchin Gupta * request. 241607084eeSAchin Gupta * 2. turning itself off in response to an earlier psci 242607084eeSAchin Gupta * cpu_off request. 243607084eeSAchin Gupta */ 244607084eeSAchin Gupta case TSP_OFF_DONE: 245607084eeSAchin Gupta case TSP_SUSPEND_DONE: 246607084eeSAchin Gupta if (ns) 247607084eeSAchin Gupta SMC_RET1(handle, SMC_UNK); 248607084eeSAchin Gupta 249607084eeSAchin Gupta /* 250607084eeSAchin Gupta * SP reports completion. The SPD must have initiated the 251607084eeSAchin Gupta * original request through a synchronous entry into the SP. 252607084eeSAchin Gupta * Jump back to the original C runtime context, and pass x1 as 253607084eeSAchin Gupta * return value to the caller 254607084eeSAchin Gupta */ 255916a2c1eSAchin Gupta tspd_synchronous_sp_exit(tsp_ctx, x1); 256607084eeSAchin Gupta 257607084eeSAchin Gupta /* Should never reach here */ 258607084eeSAchin Gupta assert(0); 259607084eeSAchin Gupta 260916a2c1eSAchin Gupta /* 261916a2c1eSAchin Gupta * Request from non-secure client to perform an 262916a2c1eSAchin Gupta * arithmetic operation or response from secure 263916a2c1eSAchin Gupta * payload to an earlier request. 264916a2c1eSAchin Gupta */ 265916a2c1eSAchin Gupta case TSP_FID_ADD: 266916a2c1eSAchin Gupta case TSP_FID_SUB: 267916a2c1eSAchin Gupta case TSP_FID_MUL: 268916a2c1eSAchin Gupta case TSP_FID_DIV: 269916a2c1eSAchin Gupta if (ns) { 270916a2c1eSAchin Gupta /* 271916a2c1eSAchin Gupta * This is a fresh request from the non-secure client. 272916a2c1eSAchin Gupta * The parameters are in x1 and x2. Figure out which 273916a2c1eSAchin Gupta * registers need to be preserved, save the non-secure 274916a2c1eSAchin Gupta * state and send the request to the secure payload. 275916a2c1eSAchin Gupta */ 276916a2c1eSAchin Gupta assert(handle == cm_get_context(mpidr, NON_SECURE)); 277916a2c1eSAchin Gupta cm_el1_sysregs_context_save(NON_SECURE); 278916a2c1eSAchin Gupta 279916a2c1eSAchin Gupta /* Save x1 and x2 for use by TSP_GET_ARGS call below */ 280916a2c1eSAchin Gupta SMC_SET_GP(handle, CTX_GPREG_X1, x1); 281916a2c1eSAchin Gupta SMC_SET_GP(handle, CTX_GPREG_X2, x2); 282916a2c1eSAchin Gupta 283916a2c1eSAchin Gupta /* 284916a2c1eSAchin Gupta * We are done stashing the non-secure context. Ask the 285916a2c1eSAchin Gupta * secure payload to do the work now. 286916a2c1eSAchin Gupta */ 287916a2c1eSAchin Gupta 288916a2c1eSAchin Gupta /* 289916a2c1eSAchin Gupta * Verify if there is a valid context to use, copy the 290916a2c1eSAchin Gupta * operation type and parameters to the secure context 291916a2c1eSAchin Gupta * and jump to the fast smc entry point in the secure 292916a2c1eSAchin Gupta * payload. Entry into S-EL1 will take place upon exit 293916a2c1eSAchin Gupta * from this function. 294916a2c1eSAchin Gupta */ 295916a2c1eSAchin Gupta assert(&tsp_ctx->cpu_ctx == cm_get_context(mpidr, SECURE)); 296916a2c1eSAchin Gupta set_aapcs_args7(&tsp_ctx->cpu_ctx, smc_fid, x1, x2, 0, 0, 297916a2c1eSAchin Gupta 0, 0, 0); 298916a2c1eSAchin Gupta cm_set_el3_elr(SECURE, (uint64_t) tsp_entry_info->fast_smc_entry); 299916a2c1eSAchin Gupta cm_el1_sysregs_context_restore(SECURE); 300916a2c1eSAchin Gupta cm_set_next_eret_context(SECURE); 301916a2c1eSAchin Gupta 302916a2c1eSAchin Gupta return smc_fid; 303916a2c1eSAchin Gupta } else { 304916a2c1eSAchin Gupta /* 305916a2c1eSAchin Gupta * This is the result from the secure client of an 306916a2c1eSAchin Gupta * earlier request. The results are in x1-x2. Copy it 307916a2c1eSAchin Gupta * into the non-secure context, save the secure state 308916a2c1eSAchin Gupta * and return to the non-secure state. 309916a2c1eSAchin Gupta */ 310916a2c1eSAchin Gupta assert(handle == cm_get_context(mpidr, SECURE)); 311916a2c1eSAchin Gupta cm_el1_sysregs_context_save(SECURE); 312916a2c1eSAchin Gupta 313916a2c1eSAchin Gupta /* Get a reference to the non-secure context */ 314916a2c1eSAchin Gupta ns_cpu_context = cm_get_context(mpidr, NON_SECURE); 315916a2c1eSAchin Gupta assert(ns_cpu_context); 316916a2c1eSAchin Gupta ns_gp_regs = get_gpregs_ctx(ns_cpu_context); 317916a2c1eSAchin Gupta 318916a2c1eSAchin Gupta /* Restore non-secure state */ 319916a2c1eSAchin Gupta cm_el1_sysregs_context_restore(NON_SECURE); 320916a2c1eSAchin Gupta cm_set_next_eret_context(NON_SECURE); 321916a2c1eSAchin Gupta 322916a2c1eSAchin Gupta SMC_RET2(ns_gp_regs, x1, x2); 323916a2c1eSAchin Gupta } 324916a2c1eSAchin Gupta 325916a2c1eSAchin Gupta break; 326916a2c1eSAchin Gupta 327916a2c1eSAchin Gupta /* 328916a2c1eSAchin Gupta * This is a request from the secure payload for more arguments 329916a2c1eSAchin Gupta * for an ongoing arithmetic operation requested by the 330916a2c1eSAchin Gupta * non-secure world. Simply return the arguments from the non- 331916a2c1eSAchin Gupta * secure client in the original call. 332916a2c1eSAchin Gupta */ 333916a2c1eSAchin Gupta case TSP_GET_ARGS: 334916a2c1eSAchin Gupta if (ns) 335916a2c1eSAchin Gupta SMC_RET1(handle, SMC_UNK); 336916a2c1eSAchin Gupta 337916a2c1eSAchin Gupta /* Get a reference to the non-secure context */ 338916a2c1eSAchin Gupta ns_cpu_context = cm_get_context(mpidr, NON_SECURE); 339916a2c1eSAchin Gupta assert(ns_cpu_context); 340916a2c1eSAchin Gupta ns_gp_regs = get_gpregs_ctx(ns_cpu_context); 341916a2c1eSAchin Gupta 342916a2c1eSAchin Gupta SMC_RET2(handle, read_ctx_reg(ns_gp_regs, CTX_GPREG_X1), 343916a2c1eSAchin Gupta read_ctx_reg(ns_gp_regs, CTX_GPREG_X2)); 344916a2c1eSAchin Gupta 34552538b9bSJeenu Viswambharan case TOS_CALL_COUNT: 34652538b9bSJeenu Viswambharan /* 34752538b9bSJeenu Viswambharan * Return the number of service function IDs implemented to 34852538b9bSJeenu Viswambharan * provide service to non-secure 34952538b9bSJeenu Viswambharan */ 35052538b9bSJeenu Viswambharan SMC_RET1(handle, TSP_NUM_FID); 35152538b9bSJeenu Viswambharan 35252538b9bSJeenu Viswambharan case TOS_UID: 35352538b9bSJeenu Viswambharan /* Return TSP UID to the caller */ 35452538b9bSJeenu Viswambharan SMC_UUID_RET(handle, tsp_uuid); 35552538b9bSJeenu Viswambharan 35652538b9bSJeenu Viswambharan case TOS_CALL_VERSION: 35752538b9bSJeenu Viswambharan /* Return the version of current implementation */ 35852538b9bSJeenu Viswambharan SMC_RET2(handle, TSP_VERSION_MAJOR, TSP_VERSION_MINOR); 35952538b9bSJeenu Viswambharan 360375f538aSAchin Gupta default: 361607084eeSAchin Gupta break; 362375f538aSAchin Gupta } 363375f538aSAchin Gupta 364607084eeSAchin Gupta SMC_RET1(handle, SMC_UNK); 365375f538aSAchin Gupta } 366375f538aSAchin Gupta 367375f538aSAchin Gupta /* Define a SPD runtime service descriptor */ 368375f538aSAchin Gupta DECLARE_RT_SVC( 369375f538aSAchin Gupta spd, 370375f538aSAchin Gupta 371375f538aSAchin Gupta OEN_TOS_START, 372375f538aSAchin Gupta OEN_TOS_END, 373375f538aSAchin Gupta SMC_TYPE_FAST, 374375f538aSAchin Gupta tspd_setup, 375375f538aSAchin Gupta tspd_smc_handler 376375f538aSAchin Gupta ); 377