add system call execution for uti
Change-Id: Ide79726b79964e72596ed78c87ec61d1eaf7e1c7
This commit is contained in:
committed by
Masamichi Takagi
parent
c96dfb0c68
commit
52f89cf8fa
69
executer/user/arch/arm64/archdep_c.c
Normal file
69
executer/user/arch/arm64/archdep_c.c
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
/* archdep_c.c COPYRIGHT FUJITSU LIMITED 2019 */
|
||||||
|
|
||||||
|
long uti_syscall6(long syscall_number,
|
||||||
|
long arg0, long arg1, long arg2,
|
||||||
|
long arg3, long arg4, long arg5)
|
||||||
|
{
|
||||||
|
long ret;
|
||||||
|
|
||||||
|
asm volatile(
|
||||||
|
"mov x8, %1;"
|
||||||
|
"mov x0, %2;"
|
||||||
|
"mov x1, %3;"
|
||||||
|
"mov x2, %4;"
|
||||||
|
"mov x3, %5;"
|
||||||
|
"mov x4, %6;"
|
||||||
|
"mov x5, %7;"
|
||||||
|
"svc #0x0;"
|
||||||
|
"mov %0, x0;"
|
||||||
|
: "=r" (ret)
|
||||||
|
: "r" (syscall_number),
|
||||||
|
"r" (arg0), "r" (arg1), "r" (arg2),
|
||||||
|
"r" (arg3), "r" (arg4), "r" (arg5));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
long uti_syscall3(long syscall_number, long arg0, long arg1, long arg2)
|
||||||
|
{
|
||||||
|
long ret;
|
||||||
|
|
||||||
|
asm volatile(
|
||||||
|
"mov x8, %1;"
|
||||||
|
"mov x0, %2;"
|
||||||
|
"mov x1, %3;"
|
||||||
|
"mov x2, %4;"
|
||||||
|
"svc #0x0;"
|
||||||
|
"mov %0, x0;"
|
||||||
|
: "=r" (ret)
|
||||||
|
: "r" (syscall_number),
|
||||||
|
"r" (arg0), "r" (arg1), "r" (arg2));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
long uti_syscall1(long syscall_number, long arg0)
|
||||||
|
{
|
||||||
|
long ret;
|
||||||
|
|
||||||
|
asm volatile(
|
||||||
|
"mov x8, %1;"
|
||||||
|
"mov x0, %2;"
|
||||||
|
"svc #0x0;"
|
||||||
|
"mov %0, x0;"
|
||||||
|
: "=r" (ret)
|
||||||
|
: "r" (syscall_number),
|
||||||
|
"r" (arg0));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
long uti_syscall0(long syscall_number)
|
||||||
|
{
|
||||||
|
long ret;
|
||||||
|
|
||||||
|
asm volatile(
|
||||||
|
"mov x8, %1;"
|
||||||
|
"svc #0x0;"
|
||||||
|
"mov %0, x0;"
|
||||||
|
: "=r" (ret)
|
||||||
|
: "r" (syscall_number));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user