blob: 908b8d0753469fc139621d067c8d95a6f0364a8f [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001/*
2 * Copyright (c) 2016-2017, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <asm_macros.S>
8
9 .globl asm_tftf_smc32
10
11/* ---------------------------------------------------------------------------
12 * void asm_tftf_smc32(const smc_args *args,
13 * smc_ret_values *smc_ret);
14 * ---------------------------------------------------------------------------
15 */
16func asm_tftf_smc32
17 /* Push r9 to keep the stack pointer aligned to 64 bit. */
18 push {r4 - r9}
19
20 /* Store the `smc_ret` pointer in a callee saved register */
21 mov r8, r1
22
23 /* Load values used as arguments for the SMC. */
24 ldm r0, {r0 - r7}
25
26 smc #0
27
28 /*
29 * The returned values from the SMC are in r0-r3, put them in the
30 * 'smc_ret_values' return structure.
31 */
32 stm r8, {r0 - r3}
33
34 pop {r4 - r9}
35 bx lr
36endfunc asm_tftf_smc32