Achin Gupta | 7c88f3f | 2014-02-18 18:09:12 +0000 | [diff] [blame] | 1 | /* |
Alexei Fedorov | 7d616ee | 2020-11-13 12:36:49 +0000 | [diff] [blame] | 2 | * Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved. |
Achin Gupta | 7c88f3f | 2014-02-18 18:09:12 +0000 | [diff] [blame] | 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Achin Gupta | 7c88f3f | 2014-02-18 18:09:12 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
Andrew Thoelke | 38bde41 | 2014-03-18 13:46:55 +0000 | [diff] [blame] | 7 | #include <asm_macros.S> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 8 | #include <bl32/tsp/tsp.h> |
Achin Gupta | 7c88f3f | 2014-02-18 18:09:12 +0000 | [diff] [blame] | 9 | |
| 10 | .globl tsp_get_magic |
| 11 | |
Achin Gupta | 7c88f3f | 2014-02-18 18:09:12 +0000 | [diff] [blame] | 12 | /* |
| 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 Thoelke | 38bde41 | 2014-03-18 13:46:55 +0000 | [diff] [blame] | 17 | func tsp_get_magic |
Achin Gupta | 7c88f3f | 2014-02-18 18:09:12 +0000 | [diff] [blame] | 18 | /* Load arguments */ |
| 19 | ldr w0, _tsp_fid_get_magic |
| 20 | |
| 21 | /* Raise SMC */ |
| 22 | smc #0 |
| 23 | |
Alexei Fedorov | 7d616ee | 2020-11-13 12:36:49 +0000 | [diff] [blame] | 24 | /* Return arguments in x1:x0 */ |
Achin Gupta | 7c88f3f | 2014-02-18 18:09:12 +0000 | [diff] [blame] | 25 | ret |
Kévin Petit | a877c25 | 2015-03-24 14:03:57 +0000 | [diff] [blame] | 26 | endfunc tsp_get_magic |
Achin Gupta | 7c88f3f | 2014-02-18 18:09:12 +0000 | [diff] [blame] | 27 | |
| 28 | .align 2 |
| 29 | _tsp_fid_get_magic: |
| 30 | .word TSP_GET_ARGS |