From: Gabe Black Date: Thu, 28 Nov 2019 08:04:54 +0000 (-0800) Subject: riscv: Convert RISCV specific syscalls to Guest ABI. X-Git-Tag: v20.0.0.0~391 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=33593d77f93ea80a50e5230e075c9b8314561280;p=gem5.git riscv: Convert RISCV specific syscalls to Guest ABI. Jira Issue: https://gem5.atlassian.net/browse/GEM5-187 Change-Id: I1a7041ba890f5f69d5506583c658ae6a777b5daf Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23202 Reviewed-by: Bobby R. Bruce Maintainer: Gabe Black Tested-by: kokoro --- diff --git a/src/arch/riscv/linux/process.cc b/src/arch/riscv/linux/process.cc index acf698912..d5be09848 100644 --- a/src/arch/riscv/linux/process.cc +++ b/src/arch/riscv/linux/process.cc @@ -84,11 +84,10 @@ RiscvLinuxObjectFileLoader loader; /// Target uname() handler. static SyscallReturn -unameFunc64(SyscallDesc *desc, int callnum, ThreadContext *tc) +unameFunc64(SyscallDesc *desc, int callnum, ThreadContext *tc, Addr utsname) { - int index = 0; auto process = tc->getProcessPtr(); - TypedBufferArg name(process->getSyscallArg(tc, index)); + TypedBufferArg name(utsname); strcpy(name->sysname, "Linux"); strcpy(name->nodename,"sim.gem5.org"); @@ -102,11 +101,10 @@ unameFunc64(SyscallDesc *desc, int callnum, ThreadContext *tc) /// Target uname() handler. static SyscallReturn -unameFunc32(SyscallDesc *desc, int callnum, ThreadContext *tc) +unameFunc32(SyscallDesc *desc, int callnum, ThreadContext *tc, Addr utsname) { - int index = 0; auto process = tc->getProcessPtr(); - TypedBufferArg name(process->getSyscallArg(tc, index)); + TypedBufferArg name(utsname); strcpy(name->sysname, "Linux"); strcpy(name->nodename,"sim.gem5.org");