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