1 // Copyright 2018 The Fuchsia Authors 2 // 3 // Use of this source code is governed by a MIT-style 4 // license that can be found in the LICENSE file or at 5 // https://opensource.org/licenses/MIT 6 7 #include "ddk_priv.h" 8 9 #include <arch/arm64/smccc.h> 10 arch_smc_call(const zx_smc_parameters_t * params,zx_smc_result_t * result)11zx_status_t arch_smc_call(const zx_smc_parameters_t* params, zx_smc_result_t* result) { 12 auto arm_result = arm_smccc_smc(params->func_id, 13 params->arg1, params->arg2, params->arg3, 14 params->arg4, params->arg5, params->arg6, 15 static_cast<uint32_t>(params->secure_os_id) << 16 | 16 static_cast<uint32_t>(params->client_id)); 17 18 result->arg0 = arm_result.x0; 19 result->arg1 = arm_result.x1; 20 result->arg2 = arm_result.x2; 21 result->arg3 = arm_result.x3; 22 23 return ZX_OK; 24 } 25