53 load(ProcessParams *params,
ObjectFile *obj_file)
override 55 auto arch = obj_file->
getArch();
68 SparcSolarisObjectFileLoader loader;
81 strcpy(
name->sysname,
"SunOS");
82 strcpy(
name->nodename,
"m5.eecs.umich.edu");
83 strcpy(
name->release, process->release.c_str());
84 strcpy(
name->version,
"Generic_118558-21");
85 strcpy(
name->machine,
"sun4u");
97 {
"read", readFunc<SparcSolaris> },
98 {
"write", writeFunc<SparcSolaris> },
99 {
"open", openFunc<SparcSolaris> },
109 {
"chmod", chmodFunc<Solaris> },
122 {
"fstat", fstatFunc<SparcSolaris> },
209 {
"mmap", mmapFunc<SparcSolaris> },
243 {
"lwp_sema_trywait" },
259 {
"lwp_setprivate" },
260 {
"lwp_getprivate" },
262 {
"lwp_mutex_wakeup" },
263 {
"lwp_mutex_lock" },
265 {
"lwp_cond_signal" },
266 {
"lwp_cond_broadcast" },
274 {
"lgrpsys_meminfosys" },
281 {
"processor_bind" },
282 {
"processor_info" },
292 {
"timer_getoverrun" },
302 {
"sparc_utrap_install" },
305 {
"lwp_sigredirect" },
344 {
"lwp_mutex_unlock" },
345 {
"lwp_mutex_trylock" },
346 {
"lwp_mutex_init" },
348 {
"lwp_sigtimedwait" },
352 SparcSolarisProcess::SparcSolarisProcess(ProcessParams * params,
355 Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(
SyscallDesc))
const std::string & name()
static SyscallReturn unameFunc(SyscallDesc *desc, int callnum, ThreadContext *tc)
Target uname() handler.
SyscallReturn ignoreFunc(SyscallDesc *desc, int callnum, ThreadContext *tc)
Handler for unimplemented syscalls that we never intend to implement (signal handling, etc.) and should not affect the correct behavior of the program.
virtual RegVal readIntReg(RegIndex reg_idx) const =0
virtual PortProxy & getVirtProxy()=0
virtual Process * getProcessPtr()=0
Overload hash function for BasicBlockRange type.
void doSyscall(int64_t callnum, ThreadContext *tc, Fault *fault)
A process with emulated SPARC/Solaris syscalls.
TypedBufferArg is a class template; instances of this template represent typed buffers in target user...
ThreadContext is the external interface to all thread state for anything outside of the CPU...
SyscallReturn closeFunc(SyscallDesc *desc, int num, ThreadContext *tc, int tgt_fd)
Target close() handler.
const int Num_Syscall_Descs
SyscallReturn umaskFunc(SyscallDesc *desc, int num, ThreadContext *tc)
Target umask() handler.
SyscallReturn munmapFunc(SyscallDesc *desc, int num, ThreadContext *tc)
Target munmap() handler.
SyscallReturn getuidFunc(SyscallDesc *desc, int callnum, ThreadContext *tc)
SyscallReturn unlinkFunc(SyscallDesc *desc, int num, ThreadContext *tc, Addr pathname)
Target unlink() handler.
SyscallReturn readlinkFunc(SyscallDesc *desc, int num, ThreadContext *tc, Addr pathname, Addr buf_ptr, size_t bufsiz)
Target readlink() handler.
static SyscallDescABI< DefaultSyscallABI > syscallDescs[]
Array of syscall descriptors, indexed by call number.
SyscallReturn brkFunc(SyscallDesc *desc, int num, ThreadContext *tc, Addr new_brk)
Target brk() handler: set brk address.
SyscallReturn getgidFunc(SyscallDesc *desc, int callnum, ThreadContext *tc)
Target getgid() handler.
void syscall(ThreadContext *tc, Fault *fault) override
This class provides the wrapper interface for the system call implementations which are defined in th...
SyscallReturn lseekFunc(SyscallDesc *desc, int num, ThreadContext *tc, int tgt_fd, uint64_t offs, int whence)
Target lseek() handler.
This file defines objects used to emulate syscalls from the target application on the host machine...
SyscallReturn chownFunc(SyscallDesc *desc, int num, ThreadContext *tc, Addr pathname, uint32_t owner, uint32_t group)
Target chown() handler.
SyscallReturn pipePseudoFunc(SyscallDesc *desc, int callnum, ThreadContext *tc)
Pseudo Funcs - These functions use a different return convension, returning a second value in a regis...
This class represents the return value from an emulated system call, including any errno setting...
Each instance of a Loader subclass will have a chance to try to load an object file when tryLoaders i...
SyscallDesc * getDesc(int callnum) override
std::shared_ptr< FaultBase > Fault
SyscallReturn getpidFunc(SyscallDesc *desc, int callnum, ThreadContext *tc)
Target getpid() handler.
SyscallReturn exitFunc(SyscallDesc *desc, int callnum, ThreadContext *tc, int status)
Target exit() handler: terminate current context.