16#ifndef ZEPHYR_INCLUDE_ARCH_ARM64_SYSCALL_H_ 
   17#define ZEPHYR_INCLUDE_ARCH_ARM64_SYSCALL_H_ 
   19#define _SVC_CALL_IRQ_OFFLOAD           1 
   20#define _SVC_CALL_RUNTIME_EXCEPT        2 
   21#define _SVC_CALL_SYSTEM_CALL           3 
   23#ifdef CONFIG_USERSPACE 
   45        register uint64_t r1 __asm__(
"x1") = arg2;
 
   46        register uint64_t r2 __asm__(
"x2") = arg3;
 
   47        register uint64_t r3 __asm__(
"x3") = arg4;
 
   48        register uint64_t r4 __asm__(
"x4") = arg5;
 
   49        register uint64_t r5 __asm__(
"x5") = arg6;
 
   50        register uint64_t r8 __asm__(
"x8") = call_id;
 
   52        __asm__ 
volatile(
"svc %[svid]\n" 
   54                         : [svid] 
"i" (_SVC_CALL_SYSTEM_CALL),
 
   55                           "r" (
ret), 
"r" (r1), 
"r" (r2), 
"r" (r3),
 
   56                           "r" (r4), 
"r" (r5), 
"r" (r8)
 
   68        register uint64_t r1 __asm__(
"x1") = arg2;
 
   69        register uint64_t r2 __asm__(
"x2") = arg3;
 
   70        register uint64_t r3 __asm__(
"x3") = arg4;
 
   71        register uint64_t r4 __asm__(
"x4") = arg5;
 
   72        register uint64_t r8 __asm__(
"x8") = call_id;
 
   74        __asm__ 
volatile(
"svc %[svid]\n" 
   76                         : [svid] 
"i" (_SVC_CALL_SYSTEM_CALL),
 
   77                           "r" (
ret), 
"r" (r1), 
"r" (r2), 
"r" (r3),
 
   89        register uint64_t r1 __asm__(
"x1") = arg2;
 
   90        register uint64_t r2 __asm__(
"x2") = arg3;
 
   91        register uint64_t r3 __asm__(
"x3") = arg4;
 
   92        register uint64_t r8 __asm__(
"x8") = call_id;
 
   94        __asm__ 
volatile(
"svc %[svid]\n" 
   96                         : [svid] 
"i" (_SVC_CALL_SYSTEM_CALL),
 
   97                           "r" (
ret), 
"r" (r1), 
"r" (r2), 
"r" (r3),
 
  109        register uint64_t r1 __asm__(
"x1") = arg2;
 
  110        register uint64_t r2 __asm__(
"x2") = arg3;
 
  111        register uint64_t r8 __asm__(
"x8") = call_id;
 
  113        __asm__ 
volatile(
"svc %[svid]\n" 
  115                         : [svid] 
"i" (_SVC_CALL_SYSTEM_CALL),
 
  116                           "r" (
ret), 
"r" (r1), 
"r" (r2), 
"r" (r8)
 
  126        register uint64_t r1 __asm__(
"x1") = arg2;
 
  127        register uint64_t r8 __asm__(
"x8") = call_id;
 
  129        __asm__ 
volatile(
"svc %[svid]\n" 
  131                         : [svid] 
"i" (_SVC_CALL_SYSTEM_CALL),
 
  132                           "r" (
ret), 
"r" (r1), 
"r" (r8)
 
  142        register uint64_t r8 __asm__(
"x8") = call_id;
 
  144        __asm__ 
volatile(
"svc %[svid]\n" 
  146                         : [svid] 
"i" (_SVC_CALL_SYSTEM_CALL),
 
  155        register uint64_t r8 __asm__(
"x8") = call_id;
 
  157        __asm__ 
volatile(
"svc %[svid]\n" 
  159                         : [svid] 
"i" (_SVC_CALL_SYSTEM_CALL),
 
static ALWAYS_INLINE uint64_t read_tpidrro_el0(void)
Definition: lib_helpers.h:75
 
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:84
 
static uintptr_t arch_syscall_invoke2(uintptr_t arg1, uintptr_t arg2, uintptr_t call_id)
Definition: syscall.h:122
 
static uintptr_t arch_syscall_invoke1(uintptr_t arg1, uintptr_t call_id)
Definition: syscall.h:138
 
static uintptr_t arch_syscall_invoke0(uintptr_t call_id)
Definition: syscall.h:152
 
static bool arch_is_user_context(void)
Definition: syscall.h:166
 
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:62
 
static uintptr_t arch_syscall_invoke3(uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t call_id)
Definition: syscall.h:104
 
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:39
 
static ZTEST_BMEM volatile int ret
Definition: k_float_disable.c:28
 
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91
 
__UINTPTR_TYPE__ uintptr_t
Definition: stdint.h:105
 
tpidrro_el0 bits allocation
 
#define TPIDRROEL0_IN_EL0
Definition: tpidrro_el0.h:20