16#ifndef ZEPHYR_INCLUDE_ARCH_ARM64_SYSCALL_H_
17#define ZEPHYR_INCLUDE_ARCH_ARM64_SYSCALL_H_
19#define _SVC_CALL_CONTEXT_SWITCH 0
20#define _SVC_CALL_IRQ_OFFLOAD 1
21#define _SVC_CALL_RUNTIME_EXCEPT 2
22#define _SVC_CALL_SYSTEM_CALL 3
24#ifdef CONFIG_USERSPACE
46 register uint64_t r1 __asm__(
"x1") = arg2;
47 register uint64_t r2 __asm__(
"x2") = arg3;
48 register uint64_t r3 __asm__(
"x3") = arg4;
49 register uint64_t r4 __asm__(
"x4") = arg5;
50 register uint64_t r5 __asm__(
"x5") = arg6;
51 register uint64_t r8 __asm__(
"x8") = call_id;
53 __asm__
volatile(
"svc %[svid]\n"
55 : [svid]
"i" (_SVC_CALL_SYSTEM_CALL),
56 "r" (
ret),
"r" (r1),
"r" (r2),
"r" (r3),
57 "r" (r4),
"r" (r5),
"r" (r8)
69 register uint64_t r1 __asm__(
"x1") = arg2;
70 register uint64_t r2 __asm__(
"x2") = arg3;
71 register uint64_t r3 __asm__(
"x3") = arg4;
72 register uint64_t r4 __asm__(
"x4") = arg5;
73 register uint64_t r8 __asm__(
"x8") = call_id;
75 __asm__
volatile(
"svc %[svid]\n"
77 : [svid]
"i" (_SVC_CALL_SYSTEM_CALL),
78 "r" (
ret),
"r" (r1),
"r" (r2),
"r" (r3),
90 register uint64_t r1 __asm__(
"x1") = arg2;
91 register uint64_t r2 __asm__(
"x2") = arg3;
92 register uint64_t r3 __asm__(
"x3") = arg4;
93 register uint64_t r8 __asm__(
"x8") = call_id;
95 __asm__
volatile(
"svc %[svid]\n"
97 : [svid]
"i" (_SVC_CALL_SYSTEM_CALL),
98 "r" (
ret),
"r" (r1),
"r" (r2),
"r" (r3),
110 register uint64_t r1 __asm__(
"x1") = arg2;
111 register uint64_t r2 __asm__(
"x2") = arg3;
112 register uint64_t r8 __asm__(
"x8") = call_id;
114 __asm__
volatile(
"svc %[svid]\n"
116 : [svid]
"i" (_SVC_CALL_SYSTEM_CALL),
117 "r" (
ret),
"r" (r1),
"r" (r2),
"r" (r8)
127 register uint64_t r1 __asm__(
"x1") = arg2;
128 register uint64_t r8 __asm__(
"x8") = call_id;
130 __asm__
volatile(
"svc %[svid]\n"
132 : [svid]
"i" (_SVC_CALL_SYSTEM_CALL),
133 "r" (
ret),
"r" (r1),
"r" (r8)
143 register uint64_t r8 __asm__(
"x8") = call_id;
145 __asm__
volatile(
"svc %[svid]\n"
147 : [svid]
"i" (_SVC_CALL_SYSTEM_CALL),
156 register uint64_t r8 __asm__(
"x8") = call_id;
158 __asm__
volatile(
"svc %[svid]\n"
160 : [svid]
"i" (_SVC_CALL_SYSTEM_CALL),
static uintptr_t arch_syscall_invoke4(uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t call_id)
Definition: syscall.h:85
static uintptr_t arch_syscall_invoke2(uintptr_t arg1, uintptr_t arg2, uintptr_t call_id)
Definition: syscall.h:123
static uintptr_t arch_syscall_invoke1(uintptr_t arg1, uintptr_t call_id)
Definition: syscall.h:139
static uintptr_t arch_syscall_invoke0(uintptr_t call_id)
Definition: syscall.h:153
static bool arch_is_user_context(void)
Definition: syscall.h:167
static uintptr_t arch_syscall_invoke5(uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5, uintptr_t call_id)
Definition: syscall.h:63
static uintptr_t arch_syscall_invoke3(uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t call_id)
Definition: syscall.h:105
static uintptr_t arch_syscall_invoke6(uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5, uintptr_t arg6, uintptr_t call_id)
Definition: syscall.h:40
static ZTEST_BMEM volatile int ret
Definition: k_float_disable.c:28
static ALWAYS_INLINE uint64_t read_tpidrro_el0(void)
Definition: lib_helpers.h:69
__UINT64_TYPE__ uint64_t
Definition: stdint.h:61
__UINTPTR_TYPE__ uintptr_t
Definition: stdint.h:75
tpidrro_el0 bits allocation
#define TPIDRROEL0_IN_EL0
Definition: tpidrro_el0.h:20