#if !defined ( __GNU_LIBRARY__ )
static SyscallReturn
-sysctlFunc(SyscallDesc *desc, int callnum, ThreadContext *tc)
+sysctlFunc(SyscallDesc *desc, int callnum, ThreadContext *tc,
+ Addr namep, size_t nameLen, Addr oldp, Addr oldlenp,
+ Addr newp, size_t newlen)
{
- int index = 0;
uint64_t ret;
- auto process = tc->getProcessPtr();
- Addr namep = process->getSyscallArg(tc, index);
- size_t namelen = process->getSyscallArg(tc, index);
- Addr oldp = process->getSyscallArg(tc, index);
- Addr oldlenp = process->getSyscallArg(tc, index);
- Addr newp = process->getSyscallArg(tc, index);
- size_t newlen = process->getSyscallArg(tc, index);
-
BufferArg buf(namep, sizeof(size_t));
BufferArg buf2(oldp, sizeof(size_t));
BufferArg buf3(oldlenp, sizeof(size_t));
/// 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<Linux::utsname> name(process->getSyscallArg(tc, index));
+ TypedBufferArg<Linux::utsname> name(utsname);
strcpy(name->sysname, "Linux");
strcpy(name->nodename, "m5.eecs.umich.edu");
/// 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<Linux::utsname> name(process->getSyscallArg(tc, index));
+ TypedBufferArg<Linux::utsname> name(utsname);
strcpy(name->sysname, "Linux");
strcpy(name->nodename, "gem5");
/// Target set_tls() handler.
static SyscallReturn
-setTLSFunc32(SyscallDesc *desc, int callnum, ThreadContext *tc)
+setTLSFunc32(SyscallDesc *desc, int callnum, ThreadContext *tc,
+ uint32_t tlsPtr)
{
- int index = 0;
- auto process = tc->getProcessPtr();
- uint32_t tlsPtr = process->getSyscallArg(tc, index);
-
tc->getVirtProxy().writeBlob(ArmLinuxProcess32::commPage + 0x0ff0,
&tlsPtr, sizeof(tlsPtr));
- tc->setMiscReg(MISCREG_TPIDRURO,tlsPtr);
+ tc->setMiscReg(MISCREG_TPIDRURO, tlsPtr);
return 0;
}
static SyscallReturn
-setTLSFunc64(SyscallDesc *desc, int callnum, ThreadContext *tc)
+setTLSFunc64(SyscallDesc *desc, int callnum, ThreadContext *tc,
+ uint32_t tlsPtr)
{
- int index = 0;
- auto process = tc->getProcessPtr();
- uint32_t tlsPtr = process->getSyscallArg(tc, index);
-
tc->setMiscReg(MISCREG_TPIDRRO_EL0, tlsPtr);
return 0;
}