xref: /optee_os/lib/libutee/arch/arm/utee_syscalls_a64.S (revision b1d7375c01ec8bcbf3561d27425d320afed23bce)
1/* SPDX-License-Identifier: BSD-2-Clause */
2/*
3 * Copyright (c) 2015, Linaro Limited
4 */
5
6#include <tee_syscall_numbers.h>
7#include <asm.S>
8
9        .section .text
10
11        .macro UTEE_SYSCALL name, scn, num_args
12	FUNC \name , :
13
14	.if \num_args > TEE_SVC_MAX_ARGS || \num_args > 8
15	.error "Too many arguments for syscall"
16	.endif
17        mov     x8, #(\scn)
18        svc #0
19        ret
20        END_FUNC \name
21        .endm
22
23	FUNC utee_panic, :
24	stp	x29, x30, [sp, #-16]!
25	mov	x1, sp
26	bl	__utee_panic
27	/* Not reached */
28	END_FUNC utee_panic
29
30#include "utee_syscalls_asm.S"
31
32