gem5  v22.1.0.0
Namespaces | Functions | Variables
syscall_emul.cc File Reference
#include "sim/syscall_emul.hh"
#include <fcntl.h>
#include <sys/syscall.h>
#include <unistd.h>
#include <csignal>
#include <iostream>
#include <mutex>
#include <string>
#include <unordered_map>
#include "base/chunk_generator.hh"
#include "base/trace.hh"
#include "cpu/thread_context.hh"
#include "dev/net/dist_iface.hh"
#include "mem/page_table.hh"
#include "mem/se_translating_port_proxy.hh"
#include "sim/byteswap.hh"
#include "sim/process.hh"
#include "sim/proxy_ptr.hh"
#include "sim/sim_exit.hh"
#include "sim/syscall_debug_macros.hh"
#include "sim/syscall_desc.hh"
#include "sim/system.hh"

Go to the source code of this file.

Namespaces

 gem5
 Reference material can be found at the JEDEC website: UFS standard http://www.jedec.org/standards-documents/results/jesd220 UFS HCI specification http://www.jedec.org/standards-documents/results/jesd223.
 

Functions

void gem5::warnUnsupportedOS (std::string syscall_name)
 
SyscallReturn gem5::unimplementedFunc (SyscallDesc *desc, ThreadContext *tc)
 Handler for unimplemented syscalls that we haven't thought about. More...
 
SyscallReturn gem5::ignoreFunc (SyscallDesc *desc, 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. More...
 
SyscallReturn gem5::ignoreWarnOnceFunc (SyscallDesc *desc, ThreadContext *tc)
 Like above, but only prints a warning once per syscall desc it's used with. More...
 
static void gem5::exitFutexWake (ThreadContext *tc, VPtr<> addr, uint64_t tgid)
 
static SyscallReturn gem5::exitImpl (SyscallDesc *desc, ThreadContext *tc, bool group, int status)
 
SyscallReturn gem5::exitFunc (SyscallDesc *desc, ThreadContext *tc, int status)
 Target exit() handler: terminate current context. More...
 
SyscallReturn gem5::exitGroupFunc (SyscallDesc *desc, ThreadContext *tc, int status)
 Target exit_group() handler: terminate simulation. (exit all threads) More...
 
SyscallReturn gem5::getpagesizeFunc (SyscallDesc *desc, ThreadContext *tc)
 Target getpagesize() handler. More...
 
SyscallReturn gem5::brkFunc (SyscallDesc *desc, ThreadContext *tc, VPtr<> new_brk)
 Target brk() handler: set brk address. More...
 
SyscallReturn gem5::setTidAddressFunc (SyscallDesc *desc, ThreadContext *tc, uint64_t tidPtr)
 Target set_tid_address() handler. More...
 
SyscallReturn gem5::closeFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
 Target close() handler. More...
 
SyscallReturn gem5::lseekFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, uint64_t offs, int whence)
 Target lseek() handler. More...
 
SyscallReturn gem5::_llseekFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, uint64_t offset_high, uint32_t offset_low, VPtr<> result_ptr, int whence)
 Target _llseek() handler. More...
 
SyscallReturn gem5::gethostnameFunc (SyscallDesc *desc, ThreadContext *tc, VPtr<> buf_ptr, int name_len)
 Target gethostname() handler. More...
 
SyscallReturn gem5::getcwdFunc (SyscallDesc *desc, ThreadContext *tc, VPtr<> buf_ptr, unsigned long size)
 Target getcwd() handler. More...
 
SyscallReturn gem5::unlinkFunc (SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname)
 Target unlink() handler. More...
 
SyscallReturn gem5::unlinkImpl (SyscallDesc *desc, ThreadContext *tc, std::string path)
 
SyscallReturn gem5::linkFunc (SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, VPtr<> new_pathname)
 Target link() handler. More...
 
SyscallReturn gem5::symlinkFunc (SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, VPtr<> new_pathname)
 Target symlink() handler. More...
 
SyscallReturn gem5::mkdirFunc (SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, mode_t mode)
 Target mkdir() handler. More...
 
SyscallReturn gem5::mkdirImpl (SyscallDesc *desc, ThreadContext *tc, std::string path, mode_t mode)
 
SyscallReturn gem5::renameFunc (SyscallDesc *desc, ThreadContext *tc, VPtr<> oldpath, VPtr<> newpath)
 Target rename() handler. More...
 
SyscallReturn gem5::renameImpl (SyscallDesc *desc, ThreadContext *tc, std::string old_name, std::string new_name)
 
SyscallReturn gem5::truncate64Func (SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, int64_t length)
 Target truncate64() handler. More...
 
SyscallReturn gem5::ftruncate64Func (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int64_t length)
 Target ftruncate64() handler. More...
 
SyscallReturn gem5::umaskFunc (SyscallDesc *desc, ThreadContext *tc)
 Target umask() handler. More...
 
SyscallReturn gem5::chownFunc (SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, uint32_t owner, uint32_t group)
 Target chown() handler. More...
 
SyscallReturn gem5::chownImpl (SyscallDesc *desc, ThreadContext *tc, std::string path, uint32_t owner, uint32_t group)
 
SyscallReturn gem5::fchownFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, uint32_t owner, uint32_t group)
 Target fchown() handler. More...
 
SyscallReturn gem5::dupFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
 FIXME: The file description is not shared among file descriptors created with dup. More...
 
SyscallReturn gem5::dup2Func (SyscallDesc *desc, ThreadContext *tc, int old_tgt_fd, int new_tgt_fd)
 Target dup2() handler. More...
 
SyscallReturn gem5::fcntlFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd, guest_abi::VarArgs< int > varargs)
 Target fcntl() handler. More...
 
SyscallReturn gem5::fcntl64Func (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd)
 Target fcntl64() handler. More...
 
SyscallReturn gem5::pipePseudoFunc (SyscallDesc *desc, ThreadContext *tc)
 Pseudo Funcs - These functions use a different return convension, returning a second value in a register other than the normal return register. More...
 
SyscallReturn gem5::pipeFunc (SyscallDesc *desc, ThreadContext *tc, VPtr<> tgt_addr)
 Target pipe() handler. More...
 
SyscallReturn gem5::pipe2Func (SyscallDesc *desc, ThreadContext *tc, VPtr<> tgt_addr, int flags)
 Target pipe() handler. More...
 
SyscallReturn gem5::getpgrpFunc (SyscallDesc *desc, ThreadContext *tc)
 Target getpgrpFunc() handler. More...
 
SyscallReturn gem5::setpgidFunc (SyscallDesc *desc, ThreadContext *tc, int pid, int pgid)
 Target setpgid() handler. More...
 
SyscallReturn gem5::getpidFunc (SyscallDesc *desc, ThreadContext *tc)
 Target getpid() handler. More...
 
SyscallReturn gem5::gettidFunc (SyscallDesc *desc, ThreadContext *tc)
 Target gettid() handler. More...
 
SyscallReturn gem5::getppidFunc (SyscallDesc *desc, ThreadContext *tc)
 Target getppid() handler. More...
 
SyscallReturn gem5::getuidFunc (SyscallDesc *desc, ThreadContext *tc)
 
SyscallReturn gem5::geteuidFunc (SyscallDesc *desc, ThreadContext *tc)
 Target geteuid() handler. More...
 
SyscallReturn gem5::getgidFunc (SyscallDesc *desc, ThreadContext *tc)
 Target getgid() handler. More...
 
SyscallReturn gem5::getegidFunc (SyscallDesc *desc, ThreadContext *tc)
 Target getegid() handler. More...
 
SyscallReturn gem5::accessFunc (SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, mode_t mode)
 Target access() handler. More...
 
SyscallReturn gem5::accessImpl (SyscallDesc *desc, ThreadContext *tc, std::string path, mode_t mode)
 
SyscallReturn gem5::mknodFunc (SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, mode_t mode, dev_t dev)
 Target mknod() handler. More...
 
SyscallReturn gem5::mknodImpl (SyscallDesc *desc, ThreadContext *tc, std::string path, mode_t mode, dev_t dev)
 
SyscallReturn gem5::chdirFunc (SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname)
 Target chdir() handler. More...
 
SyscallReturn gem5::rmdirFunc (SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname)
 
SyscallReturn gem5::rmdirImpl (SyscallDesc *desc, ThreadContext *tc, std::string path)
 
SyscallReturn gem5::shutdownFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int how)
 Target shutdown() handler. More...
 
SyscallReturn gem5::bindFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> buf_ptr, int addrlen)
 
SyscallReturn gem5::listenFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int backlog)
 
SyscallReturn gem5::connectFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> buf_ptr, int addrlen)
 
SyscallReturn gem5::recvmsgFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> msgPtr, int flags)
 
SyscallReturn gem5::sendmsgFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> msgPtr, int flags)
 
SyscallReturn gem5::getsockoptFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int level, int optname, VPtr<> valPtr, VPtr<> lenPtr)
 
SyscallReturn gem5::getsocknameFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> addrPtr, VPtr<> lenPtr)
 
SyscallReturn gem5::getpeernameFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> sockAddrPtr, VPtr<> addrlenPtr)
 
SyscallReturn gem5::setsockoptFunc (SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int level, int optname, VPtr<> valPtr, socklen_t len)
 
SyscallReturn gem5::getcpuFunc (SyscallDesc *desc, ThreadContext *tc, VPtr< uint32_t > cpu, VPtr< uint32_t > node, VPtr< uint32_t > tcache)
 

Variables

const char * gem5::hostname = "m5.eecs.umich.edu"
 

Generated on Wed Dec 21 2022 10:22:59 for gem5 by doxygen 1.9.1