Go to the documentation of this file.
36 #include <sys/syscall.h>
37 #if !defined( __GNU_LIBRARY__ ) && (defined(__FreeBSD__) || defined(__APPLE__))
38 #include <sys/sysctl.h>
53 class FreebsdLoader :
public Process::Loader
57 load(
const ProcessParams ¶ms, loader::ObjectFile *obj)
override
59 auto arch = obj->getArch();
60 auto opsys = obj->getOpSys();
71 return new ArmProcess64(params, obj, arch);
73 return new ArmProcess32(params, obj, arch);
77 FreebsdLoader freebsdLoader;
90 #if !defined ( __GNU_LIBRARY__ )
112 uint32_t *hnamep = (uint32_t *)buf.
bufferPtr();
114 size_t *holdlenp = (
size_t *)buf3.
bufferPtr();
116 ret = sysctl((
int *)hnamep, nameLen, holdp, holdlenp, hnewp, newlen);
132 { 3,
"read", readFunc<ArmFreebsd64> },
133 { 4,
"write", writeFunc<ArmFreebsd64> },
135 { 54,
"ioctl", ioctlFunc<ArmFreebsd64> },
137 { 117,
"getrusage", getrusageFunc<ArmFreebsd64> },
138 { 189,
"fstat", fstatFunc<ArmFreebsd64> },
139 #if !defined ( __GNU_LIBRARY__ )
145 { 477,
"mmap", mmapFunc<ArmFreebsd64> }
154 process->Process::syscall(tc);
This class represents the return value from an emulated system call, including any errno setting.
static SyscallDescTable< EmuFreebsd::SyscallABI32 > syscallDescs32({})
SyscallReturn brkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> new_brk)
Target brk() handler: set brk address.
void syscall(ThreadContext *tc) override
static SyscallReturn issetugidFunc(SyscallDesc *desc, ThreadContext *tc)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual PortProxy & getVirtProxy()=0
BufferArg represents an untyped buffer in target user space that is passed by reference to an (emulat...
static SyscallReturn sysctlFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> namep, size_t nameLen, VPtr<> oldp, VPtr<> oldlenp, VPtr<> newp, size_t newlen)
SyscallReturn readlinkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, VPtr<> buf_ptr, size_t bufsiz)
Target readlink() handler.
virtual RegVal readIntReg(RegIndex reg_idx) const =0
bool copyIn(const PortProxy &memproxy)
copy data into simulator space (read from target memory)
virtual Process * getProcessPtr()=0
SyscallReturn exitFunc(SyscallDesc *desc, ThreadContext *tc, int status)
Target exit() handler: terminate current context.
bool copyOut(const PortProxy &memproxy)
copy data out of simulator space (write to target memory)
static SyscallDescTable< EmuFreebsd::SyscallABI64 > syscallDescs64
This class provides the wrapper interface for the system call implementations which are defined in th...
void * bufferPtr()
Return a pointer to the internal simulator-space buffer.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Generated on Tue Sep 21 2021 12:24:34 for gem5 by doxygen 1.8.17