36 #include <sys/param.h>
37 #include <sys/syscall.h>
38 #include <sys/sysctl.h>
39 #include <sys/types.h>
53 using namespace ArmISA;
92 uint32_t *hnamep = (uint32_t *)buf.
bufferPtr();
94 size_t *holdlenp = (
size_t *)buf3.
bufferPtr();
96 ret = sysctl((
int *)hnamep, namelen, holdp, holdlenp, hnewp, newlen);
776 SyscallDesc(
"getrusage", getrusageFunc<ArmFreebsd64>),
1250 if (offset < 0 || offset >=
size)
SyscallReturn brkFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc)
Target brk() handler: set brk address.
void initState()
initState() is called on each SimObject when not restoring from a checkpoint.
bool copyIn(SETranslatingPortProxy &memproxy)
copy data into simulator space (read from target memory)
SyscallReturn readlinkFunc(SyscallDesc *desc, int callnum, Process *process, ThreadContext *tc)
virtual TheISA::IntReg getSyscallArg(ThreadContext *tc, int &i)=0
ThreadContext is the external interface to all thread state for anything outside of the CPU...
SyscallDesc * getDesc(int callnum)
void initState()
initState() is called on each SimObject when not restoring from a checkpoint.
bool copyOut(SETranslatingPortProxy &memproxy)
copy data out of simulator space (write to target memory)
SyscallReturn writeFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc)
Target write() handler.
std::vector< SyscallTable > syscallTables
SyscallReturn unimplementedFunc(SyscallDesc *desc, int callnum, Process *process, ThreadContext *tc)
Handler for unimplemented syscalls that we haven't thought about.
static SyscallReturn sysctlFunc(SyscallDesc *desc, int callnum, Process *process, ThreadContext *tc)
void initState()
initState() is called on each SimObject when not restoring from a checkpoint.
void * bufferPtr()
Return a pointer to the internal simulator-space buffer.
static SyscallDesc syscallDescs64[]
virtual SETranslatingPortProxy & getMemProxy()=0
static SyscallReturn issetugidFunc(SyscallDesc *desc, int callnum, Process *process, ThreadContext *tc)
static SyscallDesc syscallDescs32[]
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
This class provides the wrapper interface for the system call implementations which are defined in th...
This file defines objects used to emulate syscalls from the target application on the host machine...
ArmFreebsdProcess64(ProcessParams *params, ObjectFile *objFile, ObjectFile::Arch _arch)
SyscallDesc * getDesc(int offset) const
SyscallDesc * getFreebsdDesc(int callnum)
BufferArg represents an untyped buffer in target user space that is passed by reference to an (emulat...
SyscallReturn exitFunc(SyscallDesc *desc, int callnum, Process *p, ThreadContext *tc)
Target exit() handler: terminate current context.
SyscallDesc * getDesc(int callnum)
This class represents the return value from an emulated system call, including any errno setting...
SyscallReturn readFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc)
ArmFreebsdProcess32(ProcessParams *params, ObjectFile *objFile, ObjectFile::Arch _arch)
void initState()
initState() is called on each SimObject when not restoring from a checkpoint.