17c88f3f6SAchin Gupta/* 2*caff3c87SAlexei Fedorov * Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved. 37c88f3f6SAchin Gupta * 482cb2c1aSdp-arm * SPDX-License-Identifier: BSD-3-Clause 57c88f3f6SAchin Gupta */ 67c88f3f6SAchin Gupta 70a30cf54SAndrew Thoelke#include <asm_macros.S> 809d40e0eSAntonio Nino Diaz#include <bl32/tsp/tsp.h> 97c88f3f6SAchin Gupta 107c88f3f6SAchin Gupta .globl tsp_get_magic 117c88f3f6SAchin Gupta 127c88f3f6SAchin Gupta/* 137c88f3f6SAchin Gupta * This function raises an SMC to retrieve arguments from secure 147c88f3f6SAchin Gupta * monitor/dispatcher, saves the returned arguments the array received in x0, 157c88f3f6SAchin Gupta * and then returns to the caller 167c88f3f6SAchin Gupta */ 170a30cf54SAndrew Thoelkefunc tsp_get_magic 187c88f3f6SAchin Gupta /* Load arguments */ 197c88f3f6SAchin Gupta ldr w0, _tsp_fid_get_magic 207c88f3f6SAchin Gupta 217c88f3f6SAchin Gupta /* Raise SMC */ 227c88f3f6SAchin Gupta smc #0 237c88f3f6SAchin Gupta 24*caff3c87SAlexei Fedorov /* Return arguments in x1:x0 */ 257c88f3f6SAchin Gupta ret 268b779620SKévin Petitendfunc tsp_get_magic 277c88f3f6SAchin Gupta 287c88f3f6SAchin Gupta .align 2 297c88f3f6SAchin Gupta_tsp_fid_get_magic: 307c88f3f6SAchin Gupta .word TSP_GET_ARGS 31