diff options
Diffstat (limited to 'src/arch/x86/linux')
-rw-r--r-- | src/arch/x86/linux/linux.hh | 22 | ||||
-rw-r--r-- | src/arch/x86/linux/syscalls.cc | 16 |
2 files changed, 20 insertions, 18 deletions
diff --git a/src/arch/x86/linux/linux.hh b/src/arch/x86/linux/linux.hh index c1bb67260..bde7925a9 100644 --- a/src/arch/x86/linux/linux.hh +++ b/src/arch/x86/linux/linux.hh @@ -65,23 +65,25 @@ class X86Linux64 : public Linux public: typedef struct { - uint32_t st_dev; - char __pad1[4]; + uint64_t st_dev; uint64_t st_ino; + uint64_t st_nlink; uint32_t st_mode; - uint16_t st_nlink; uint32_t st_uid; uint32_t st_gid; - uint32_t st_rdev; - char __pad2[4]; + uint32_t __pad0; + uint64_t st_rdev; int64_t st_size; - int64_t st_atimeX; - int64_t st_mtimeX; - int64_t st_ctimeX; int64_t st_blksize; int64_t st_blocks; - uint64_t __unused4[2]; - } tgt_stat; + uint64_t st_atimeX; + uint64_t st_atime_nsec; + uint64_t st_mtimeX; + uint64_t st_mtime_nsec; + uint64_t st_ctimeX; + uint64_t st_ctime_nsec; + int64_t __unused[3]; + } tgt_stat64; static OpenFlagTransTable openFlagTable[]; diff --git a/src/arch/x86/linux/syscalls.cc b/src/arch/x86/linux/syscalls.cc index 5c756ec7f..efbe33dfa 100644 --- a/src/arch/x86/linux/syscalls.cc +++ b/src/arch/x86/linux/syscalls.cc @@ -71,7 +71,7 @@ unameFunc(SyscallDesc *desc, int callnum, LiveProcess *process, strcpy(name->sysname, "Linux"); strcpy(name->nodename, "m5.eecs.umich.edu"); - strcpy(name->release, "2.6.12"); + strcpy(name->release, "2.6.16.19"); strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003"); strcpy(name->machine, "x86_64"); @@ -81,18 +81,18 @@ unameFunc(SyscallDesc *desc, int callnum, LiveProcess *process, } SyscallDesc X86LinuxProcess::syscallDescs[] = { - /* 0 */ SyscallDesc("read", unimplementedFunc), - /* 1 */ SyscallDesc("write", unimplementedFunc), + /* 0 */ SyscallDesc("read", readFunc), + /* 1 */ SyscallDesc("write", writeFunc), /* 2 */ SyscallDesc("open", openFunc<X86Linux64>), - /* 3 */ SyscallDesc("close", unimplementedFunc), + /* 3 */ SyscallDesc("close", closeFunc), /* 4 */ SyscallDesc("stat", unimplementedFunc), - /* 5 */ SyscallDesc("fstat", unimplementedFunc), + /* 5 */ SyscallDesc("fstat", fstat64Func<X86Linux64>), /* 6 */ SyscallDesc("lstat", unimplementedFunc), /* 7 */ SyscallDesc("poll", unimplementedFunc), /* 8 */ SyscallDesc("lseek", unimplementedFunc), /* 9 */ SyscallDesc("mmap", mmapFunc<X86Linux64>), /* 10 */ SyscallDesc("mprotect", unimplementedFunc), - /* 11 */ SyscallDesc("munmap", unimplementedFunc), + /* 11 */ SyscallDesc("munmap", munmapFunc), /* 12 */ SyscallDesc("brk", obreakFunc), /* 13 */ SyscallDesc("rt_sigaction", unimplementedFunc), /* 14 */ SyscallDesc("rt_sigprocmask", unimplementedFunc), @@ -141,7 +141,7 @@ SyscallDesc X86LinuxProcess::syscallDescs[] = { /* 57 */ SyscallDesc("fork", unimplementedFunc), /* 58 */ SyscallDesc("vfork", unimplementedFunc), /* 59 */ SyscallDesc("execve", unimplementedFunc), - /* 60 */ SyscallDesc("exit", unimplementedFunc), + /* 60 */ SyscallDesc("exit", exitFunc), /* 61 */ SyscallDesc("wait4", unimplementedFunc), /* 62 */ SyscallDesc("kill", unimplementedFunc), /* 63 */ SyscallDesc("uname", unameFunc), @@ -312,7 +312,7 @@ SyscallDesc X86LinuxProcess::syscallDescs[] = { /* 228 */ SyscallDesc("clock_gettime", unimplementedFunc), /* 229 */ SyscallDesc("clock_getres", unimplementedFunc), /* 230 */ SyscallDesc("clock_nanosleep", unimplementedFunc), - /* 231 */ SyscallDesc("exit_group", unimplementedFunc), + /* 231 */ SyscallDesc("exit_group", exitFunc), /* 232 */ SyscallDesc("epoll_wait", unimplementedFunc), /* 233 */ SyscallDesc("epoll_ctl", unimplementedFunc), /* 234 */ SyscallDesc("tgkill", unimplementedFunc), |