blob: 6e238ea4c45d7d413f15f6a0cc3ac1fafd294e0b [file] [log] [blame]
Achin Gupta7c88f3f2014-02-18 18:09:12 +00001/*
Alexei Fedorov7d616ee2020-11-13 12:36:49 +00002 * Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved.
Achin Gupta7c88f3f2014-02-18 18:09:12 +00003 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
Achin Gupta7c88f3f2014-02-18 18:09:12 +00005 */
6
Andrew Thoelke38bde412014-03-18 13:46:55 +00007#include <asm_macros.S>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00008#include <bl32/tsp/tsp.h>
Achin Gupta7c88f3f2014-02-18 18:09:12 +00009
10 .globl tsp_get_magic
11
Achin Gupta7c88f3f2014-02-18 18:09:12 +000012/*
13 * This function raises an SMC to retrieve arguments from secure
14 * monitor/dispatcher, saves the returned arguments the array received in x0,
15 * and then returns to the caller
16 */
Andrew Thoelke38bde412014-03-18 13:46:55 +000017func tsp_get_magic
Achin Gupta7c88f3f2014-02-18 18:09:12 +000018 /* Load arguments */
19 ldr w0, _tsp_fid_get_magic
20
21 /* Raise SMC */
22 smc #0
23
Alexei Fedorov7d616ee2020-11-13 12:36:49 +000024 /* Return arguments in x1:x0 */
Achin Gupta7c88f3f2014-02-18 18:09:12 +000025 ret
Kévin Petita877c252015-03-24 14:03:57 +000026endfunc tsp_get_magic
Achin Gupta7c88f3f2014-02-18 18:09:12 +000027
28 .align 2
29_tsp_fid_get_magic:
30 .word TSP_GET_ARGS