Go to the documentation of this file.
36 #include <sys/param.h>
37 #include <sys/syscall.h>
38 #if !defined ( __GNU_LIBRARY__ )
39 #include <sys/sysctl.h>
41 #include <sys/types.h>
67 auto arch = obj_file->
getArch();
85 ArmFreebsdObjectFileLoader loader;
95 #if !defined ( __GNU_LIBRARY__ )
117 uint32_t *hnamep = (uint32_t *)buf.
bufferPtr();
119 size_t *holdlenp = (
size_t *)buf3.
bufferPtr();
121 ret = sysctl((
int *)hnamep, nameLen, holdp, holdlenp, hnewp, newlen);
137 { 3,
"read", readFunc<ArmFreebsd64> },
138 { 4,
"write", writeFunc<ArmFreebsd64> },
140 { 54,
"ioctl", ioctlFunc<ArmFreebsd64> },
142 { 117,
"getrusage", getrusageFunc<ArmFreebsd64> },
143 { 189,
"fstat", fstatFunc<ArmFreebsd64> },
144 #if !defined ( __GNU_LIBRARY__ )
150 { 477,
"mmap", mmapFunc<ArmFreebsd64> }
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
Each instance of a Loader subclass will have a chance to try to load an object file when tryLoaders i...
ArmFreebsdProcess32(ProcessParams *params, ::Loader::ObjectFile *objFile, ::Loader::Arch _arch)
static SyscallDescTable< ArmFreebsdProcess32::SyscallABI > syscallDescs32({})
virtual void syscall(ThreadContext *tc)
SyscallReturn exitFunc(SyscallDesc *desc, ThreadContext *tc, int status)
Target exit() handler: terminate current context.
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
static SyscallDescTable< ArmFreebsdProcess64::SyscallABI > syscallDescs64
SyscallReturn brkFunc(SyscallDesc *desc, ThreadContext *tc, Addr new_brk)
Target brk() handler: set brk address.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
SyscallReturn readlinkFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, Addr buf_ptr, size_t bufsiz)
Target readlink() handler.
void syscall(ThreadContext *tc) override
A process with emulated Arm/Freebsd syscalls.
static SyscallReturn sysctlFunc(SyscallDesc *desc, ThreadContext *tc, Addr namep, size_t nameLen, Addr oldp, Addr oldlenp, Addr newp, size_t newlen)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
This class represents the return value from an emulated system call, including any errno setting.
static SyscallReturn issetugidFunc(SyscallDesc *desc, ThreadContext *tc)
bool copyIn(PortProxy &memproxy)
copy data into simulator space (read from target memory)
void * bufferPtr()
Return a pointer to the internal simulator-space buffer.
void syscall(ThreadContext *tc) override
virtual PortProxy & getVirtProxy()=0
Overload hash function for BasicBlockRange type.
A process with emulated Arm/Freebsd syscalls.
BufferArg represents an untyped buffer in target user space that is passed by reference to an (emulat...
virtual RegVal readIntReg(RegIndex reg_idx) const =0
This class provides the wrapper interface for the system call implementations which are defined in th...
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
bool copyOut(PortProxy &memproxy)
copy data out of simulator space (write to target memory)
ArmFreebsdProcess64(ProcessParams *params, ::Loader::ObjectFile *objFile, ::Loader::Arch _arch)
Generated on Wed Sep 30 2020 14:01:59 for gem5 by doxygen 1.8.17