1 /* 2 * Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #include <asm_macros.S> 8 #include <tsp.h> 9 10 .globl tsp_get_magic 11 12 13 /* 14 * This function raises an SMC to retrieve arguments from secure 15 * monitor/dispatcher, saves the returned arguments the array received in x0, 16 * and then returns to the caller 17 */ 18 func tsp_get_magic 19 /* Save address to stack */ 20 stp x0, xzr, [sp, #-16]! 21 22 /* Load arguments */ 23 ldr w0, _tsp_fid_get_magic 24 25 /* Raise SMC */ 26 smc #0 27 28 /* Restore address from stack */ 29 ldp x4, xzr, [sp], #16 30 31 /* Store returned arguments to the array */ 32 stp x0, x1, [x4, #0] 33 34 ret 35 endfunc tsp_get_magic 36 37 .align 2 38 _tsp_fid_get_magic: 39 .word TSP_GET_ARGS 40