xref: /freebsd/stand/kboot/libkboot/arch/aarch64/host_syscall.S (revision 099335814d5aafefb3603b1a0901a1432895455c)
1*09933581SWarner Losh#include <machine/asm.h>
2*09933581SWarner Losh
3*09933581SWarner Losh/*
4*09933581SWarner Losh * Emulate the Linux system call interface. System call number in x8.
5*09933581SWarner Losh * Args in x0, x1, x2, x3, x4 and x5. Return in x0.
6*09933581SWarner Losh */
7*09933581SWarner LoshENTRY(host_syscall)
8*09933581SWarner Losh	mov	x8, x0
9*09933581SWarner Losh	mov	x0, x1
10*09933581SWarner Losh	mov	x1, x2
11*09933581SWarner Losh	mov	x2, x3
12*09933581SWarner Losh	mov	x3, x4
13*09933581SWarner Losh	mov	x4, x5
14*09933581SWarner Losh	mov	x5, x6
15*09933581SWarner Losh	svc	0
16*09933581SWarner Losh	ret
17*09933581SWarner Losh/* Note: We're exposing the raw return value to the caller */
18*09933581SWarner LoshEND(host_syscall)
19