Go to the documentation of this file.
40 #include <sys/syscall.h>
65 auto arch = obj_file->
getArch();
72 warn(
"Unknown operating system; assuming Linux.");
86 X86LinuxObjectFileLoader loader;
96 strcpy(
name->sysname,
"Linux");
97 strcpy(
name->nodename,
"sim.gem5.org");
98 strcpy(
name->release, process->release.c_str());
99 strcpy(
name->version,
"#1 Mon Aug 18 11:32:15 EDT 2003");
100 strcpy(
name->machine,
"x86_64");
116 uint64_t fsBase, gsBase;
127 p.write(
addr, fsBase);
135 p.write(
addr, gsBase);
143 Bitfield<0> seg_32bit;
152 uint32_t entry_number;
170 const int minTLSEntry = 6;
171 const int numTLSEntries = 3;
172 const int maxTLSEntry = minTLSEntry + numTLSEntries - 1;
179 assert((maxTLSEntry + 1) *
sizeof(uint64_t) <= x86p->
gdtSize());
182 gdt(x86p->
gdtStart() + minTLSEntry *
sizeof(uint64_t),
183 numTLSEntries *
sizeof(uint64_t));
186 panic(
"Failed to copy in GDT for %s.\n", desc->
name());
188 if (userDesc->entry_number == (uint32_t)(-1)) {
190 for (
int i = 0;
i < numTLSEntries;
i++) {
192 userDesc->entry_number =
i + minTLSEntry;
197 if (userDesc->entry_number == (uint32_t)(-1))
201 int index = userDesc->entry_number;
203 if (index < minTLSEntry || index > maxTLSEntry)
206 index -= minTLSEntry;
209 SegDescriptor segDesc = 0;
210 UserDescFlags flags = userDesc->flags;
212 segDesc.limitLow =
bits(userDesc->limit, 15, 0);
213 segDesc.baseLow =
bits(userDesc->base_addr, 23, 0);
215 if (!flags.read_exec_only)
217 if (
bits((uint8_t)flags.contents, 0))
219 if (
bits((uint8_t)flags.contents, 1))
220 segDesc.type.codeOrData = 1;
223 if (!flags.seg_not_present)
225 segDesc.limitHigh =
bits(userDesc->limit, 19, 16);
231 if (flags.limit_in_pages)
233 segDesc.baseHigh =
bits(userDesc->base_addr, 31, 24);
235 gdt[
index] = (uint64_t)segDesc;
238 panic(
"Failed to copy out GDT for %s.\n", desc->
name());
244 INTREG_RDI, INTREG_RSI, INTREG_RDX, INTREG_R10W, INTREG_R8W, INTREG_R9W
248 { 0,
"read", readFunc<X86Linux64> },
249 { 1,
"write", writeFunc<X86Linux64> },
250 { 2,
"open", openFunc<X86Linux64> },
252 { 4,
"stat", stat64Func<X86Linux64> },
253 { 5,
"fstat", fstat64Func<X86Linux64> },
254 { 6,
"lstat", lstat64Func<X86Linux64> },
255 { 7,
"poll", pollFunc<X86Linux64> },
257 { 9,
"mmap", mmapFunc<X86Linux64> },
263 { 15,
"rt_sigreturn" },
264 { 16,
"ioctl", ioctlFunc<X86Linux64> },
265 { 17,
"pread64", pread64Func<X86Linux64> },
266 { 18,
"pwrite64", pwrite64Func<X86Linux64> },
267 { 19,
"readv", readvFunc<X86Linux64> },
268 { 20,
"writev", writevFunc<X86Linux64> },
271 { 23,
"select", selectFunc<X86Linux64> },
273 { 25,
"mremap", mremapFunc<X86Linux64> },
289 { 41,
"socket", socketFunc<X86Linux64> },
291 { 43,
"accept", acceptFunc<X86Linux64> },
301 { 53,
"socketpair", socketpairFunc<X86Linux64> },
304 { 56,
"clone", cloneFunc<X86Linux64> },
307 { 59,
"execve", execveFunc<X86Linux64> },
309 { 61,
"wait4", wait4Func<X86Linux64> },
326 #if defined(SYS_getdents)
327 { 78,
"getdents", getdentsFunc },
348 { 96,
"gettimeofday", gettimeofdayFunc<X86Linux64> },
349 { 97,
"getrlimit", getrlimitFunc<X86Linux64> },
350 { 98,
"getrusage", getrusageFunc<X86Linux64> },
351 { 99,
"sysinfo", sysinfoFunc<X86Linux64> },
352 { 100,
"times", timesFunc<X86Linux64> },
367 { 115,
"getgroups" },
368 { 116,
"setgroups" },
370 { 118,
"getresuid" },
371 { 119,
"setresgid" },
372 { 120,
"getresgid" },
379 { 127,
"rt_sigpending" },
380 { 128,
"rt_sigtimedwait" },
381 { 129,
"rt_sigqueueinfo" },
382 { 130,
"rt_sigsuspend" },
383 { 131,
"sigaltstack" },
387 { 135,
"personality" },
389 { 137,
"statfs", statfsFunc<X86Linux64> },
390 { 138,
"fstatfs", fstatfsFunc<X86Linux64> },
392 { 140,
"getpriority" },
394 { 142,
"sched_setparam" },
395 { 143,
"sched_getparam" },
396 { 144,
"sched_setscheduler" },
397 { 145,
"sched_getscheduler" },
398 { 146,
"sched_get_priority_max" },
399 { 147,
"sched_get_priority_min" },
400 { 148,
"sched_rr_get_interval" },
404 { 152,
"munlockall" },
406 { 154,
"modify_ldt" },
407 { 155,
"pivot_root" },
416 { 164,
"settimeofday" },
422 { 170,
"sethostname" },
423 { 171,
"setdomainname" },
426 { 174,
"create_module" },
427 { 175,
"init_module" },
428 { 176,
"delete_module" },
429 { 177,
"get_kernel_syms" },
430 { 178,
"query_module" },
432 { 180,
"nfsservctl" },
435 { 183,
"afs_syscall" },
439 { 187,
"readahead" },
441 { 189,
"lsetxattr" },
442 { 190,
"fsetxattr" },
444 { 192,
"lgetxattr" },
445 { 193,
"fgetxattr" },
446 { 194,
"listxattr" },
447 { 195,
"llistxattr" },
448 { 196,
"flistxattr" },
449 { 197,
"removexattr" },
450 { 198,
"lremovexattr" },
451 { 199,
"fremovexattr" },
453 { 201,
"time", timeFunc<X86Linux64> },
454 { 202,
"futex", futexFunc<X86Linux64> },
457 { 205,
"set_thread_area" },
459 { 207,
"io_destroy" },
460 { 208,
"io_getevents" },
461 { 209,
"io_submit" },
462 { 210,
"io_cancel" },
463 { 211,
"get_thread_area" },
464 { 212,
"lookup_dcookie" },
465 { 213,
"epoll_create" },
466 { 214,
"epoll_ctl_old" },
467 { 215,
"epoll_wait_old" },
468 { 216,
"remap_file_pages" },
469 { 217,
"getdents64" },
471 { 219,
"restart_syscall" },
472 { 220,
"semtimedop" },
474 { 222,
"timer_create" },
475 { 223,
"timer_settime" },
476 { 224,
"timer_gettime" },
477 { 225,
"timer_getoverrun" },
478 { 226,
"timer_delete" },
479 { 227,
"clock_settime" },
480 { 228,
"clock_gettime", clock_gettimeFunc<X86Linux64> },
481 { 229,
"clock_getres", clock_getresFunc<X86Linux64> },
482 { 230,
"clock_nanosleep" },
484 { 232,
"epoll_wait" },
485 { 233,
"epoll_ctl" },
486 { 234,
"tgkill", tgkillFunc<X86Linux64> },
490 { 238,
"set_mempolicy" },
493 { 241,
"mq_unlink" },
494 { 242,
"mq_timedsend" },
495 { 243,
"mq_timedreceive" },
496 { 244,
"mq_notify" },
497 { 245,
"mq_getsetattr" },
498 { 246,
"kexec_load" },
501 { 249,
"request_key" },
503 { 251,
"ioprio_set" },
504 { 252,
"ioprio_get" },
505 { 253,
"inotify_init" },
506 { 254,
"inotify_add_watch" },
507 { 255,
"inotify_rm_watch" },
508 { 256,
"migrate_pages" },
509 { 257,
"openat", openatFunc<X86Linux64> },
513 { 261,
"futimesat" },
514 { 262,
"newfstatat" },
518 { 266,
"symlinkat" },
521 { 269,
"faccessat" },
526 { 274,
"get_robust_list" },
529 { 277,
"sync_file_range" },
531 { 279,
"move_pages" },
532 { 280,
"utimensat" },
533 { 281,
"epoll_pwait" },
535 { 283,
"timerfd_create" },
536 { 284,
"eventfd", eventfdFunc<X86Linux64> },
538 { 286,
"timerfd_settime" },
539 { 287,
"timerfd_gettime" },
541 { 289,
"signalfd4" },
542 { 290,
"eventfd2", eventfdFunc<X86Linux64> },
543 { 291,
"epoll_create1" },
546 { 294,
"inotify_init1" },
549 { 297,
"rt_tgsigqueueinfo" },
550 { 298,
"perf_event_open" },
552 { 300,
"fanotify_init" },
553 { 301,
"fanotify_mark" },
554 { 302,
"prlimit64", prlimitFunc<X86Linux64> },
555 { 303,
"name_to_handle_at" },
556 { 304,
"open_by_handle_at" },
557 { 305,
"clock_adjtime" },
562 { 310,
"proess_vm_readv" },
563 { 311,
"proess_vm_writev" },
565 { 313,
"finit_module" },
571 X86_64Process::syscall(tc);
579 X86_64Process::clone(old_tc, new_tc, (
X86_64Process*)process, flags);
583 INTREG_EBX, INTREG_ECX, INTREG_EDX, INTREG_ESI, INTREG_EDI, INTREG_EBP
587 { 0,
"restart_syscall" },
590 { 3,
"read", readFunc<X86Linux32> },
591 { 4,
"write", writeFunc<X86Linux32> },
592 { 5,
"open", openFunc<X86Linux32> },
598 { 11,
"execve", execveFunc<X86Linux32> },
600 { 13,
"time", timeFunc<X86Linux32> },
630 { 43,
"times", timesFunc<X86Linux32> },
641 { 54,
"ioctl", ioctlFunc<X86Linux32> },
646 { 59,
"oldolduname" },
659 { 72,
"sigsuspend" },
660 { 73,
"sigpending" },
661 { 74,
"sethostname" },
663 { 76,
"getrlimit", getrlimitFunc<X86Linux32> },
664 { 77,
"getrusage", getrusageFunc<X86Linux32> },
665 { 78,
"gettimeofday" },
666 { 79,
"settimeofday" },
669 { 82,
"select", selectFunc<X86Linux32> },
683 { 96,
"getpriority" },
689 { 102,
"socketcall" },
691 { 104,
"setitimer" },
692 { 105,
"getitimer" },
701 { 114,
"wait4", wait4Func<X86Linux32> },
703 { 116,
"sysinfo", sysinfoFunc<X86Linux32> },
706 { 119,
"sigreturn" },
707 { 120,
"clone", cloneFunc<X86Linux32> },
708 { 121,
"setdomainname" },
710 { 123,
"modify_ldt" },
713 { 126,
"sigprocmask" },
714 { 127,
"create_module" },
715 { 128,
"init_module" },
716 { 129,
"delete_module" },
717 { 130,
"get_kernel_syms" },
723 { 136,
"personality" },
724 { 137,
"afs_syscall" },
728 #if defined(SYS_getdents)
729 { 141,
"getdents", getdentsFunc },
733 { 142,
"_newselect" },
736 { 145,
"readv", readvFunc<X86Linux32> },
737 { 146,
"writev", writevFunc<X86Linux32> },
739 { 148,
"fdatasync" },
744 { 153,
"munlockall" },
745 { 154,
"sched_setparam" },
746 { 155,
"sched_getparam" },
747 { 156,
"sched_setscheduler" },
748 { 157,
"sched_getscheduler" },
750 { 159,
"sched_get_priority_max" },
751 { 160,
"sched_get_priority_min" },
752 { 161,
"sched_rr_get_interval" },
756 { 165,
"getresuid" },
758 { 167,
"query_module" },
759 { 168,
"poll", pollFunc<X86Linux32> },
760 { 169,
"nfsservctl" },
761 { 170,
"setresgid" },
762 { 171,
"getresgid" },
764 { 173,
"rt_sigreturn" },
767 { 176,
"rt_sigpending" },
768 { 177,
"rt_sigtimedwait" },
769 { 178,
"rt_sigqueueinfo" },
770 { 179,
"rt_sigsuspend" },
771 { 180,
"pread64", pread64Func<X86Linux64> },
772 { 181,
"pwrite64", pwrite64Func<X86Linux64> },
777 { 186,
"sigaltstack" },
783 { 192,
"mmap2", mmap2Func<X86Linux32> },
786 { 195,
"stat64", stat64Func<X86Linux32> },
788 { 197,
"fstat64", fstat64Func<X86Linux32> },
794 { 203,
"setreuid32" },
795 { 204,
"setregid32" },
796 { 205,
"getgroups32" },
797 { 206,
"setgroups32" },
799 { 208,
"setresuid32" },
800 { 209,
"getresuid32" },
801 { 210,
"setresgid32" },
802 { 211,
"getresgid32" },
806 { 215,
"setfsuid32" },
807 { 216,
"setfsgid32" },
808 { 217,
"pivot_root" },
812 { 221,
"getdents64" },
816 { 225,
"readahead" },
818 { 227,
"lsetxattr" },
819 { 228,
"fsetxattr" },
821 { 230,
"lgetxattr" },
822 { 231,
"fgetxattr" },
823 { 232,
"listxattr" },
824 { 233,
"llistxattr" },
825 { 234,
"flistxattr" },
826 { 235,
"removexattr" },
827 { 236,
"lremovexattr" },
828 { 237,
"fremovexattr" },
830 { 239,
"sendfile64" },
835 { 244,
"get_thread_area" },
837 { 246,
"io_destroy" },
838 { 247,
"io_getevents" },
839 { 248,
"io_submit" },
840 { 249,
"io_cancel" },
841 { 250,
"fadvise64" },
844 { 253,
"lookup_dcookie" },
845 { 254,
"epoll_create" },
846 { 255,
"epoll_ctl" },
847 { 256,
"epoll_wait" },
848 { 257,
"remap_file_pages" },
850 { 259,
"timer_create" },
851 { 260,
"timer_settime" },
852 { 261,
"timer_gettime" },
853 { 262,
"timer_getoverrun" },
854 { 263,
"timer_delete" },
855 { 264,
"clock_settime" },
856 { 265,
"clock_gettime", clock_gettimeFunc<X86Linux32> },
857 { 266,
"clock_getres" },
858 { 267,
"clock_nanosleep" },
860 { 269,
"fstatfs64" },
861 { 270,
"tgkill", tgkillFunc<X86Linux32> },
863 { 272,
"fadvise64_64" },
867 { 276,
"set_mempolicy" },
869 { 278,
"mq_unlink" },
870 { 279,
"mq_timedsend" },
871 { 280,
"mq_timedreceive" },
872 { 281,
"mq_notify" },
873 { 282,
"mq_getsetattr" },
874 { 283,
"kexec_load" },
876 { 285,
"sys_setaltroot" },
878 { 287,
"request_key" },
880 { 289,
"ioprio_set" },
881 { 290,
"ioprio_get" },
882 { 291,
"inotify_init" },
883 { 292,
"inotify_add_watch" },
884 { 293,
"inotify_rm_watch" },
885 { 294,
"migrate_pages" },
886 { 295,
"openat", openatFunc<X86Linux32> },
890 { 299,
"futimesat" },
891 { 300,
"fstatat64" },
895 { 304,
"symlinkat" },
898 { 307,
"faccessat" },
905 { 314,
"sync_file_range" },
908 { 317,
"move_pages" },
910 { 319,
"epoll_pwait" },
911 { 320,
"utimensat" },
914 { 323,
"eventfd", eventfdFunc<X86Linux32> }
920 I386Process::syscall(tc);
923 if (eip >= vsyscallPage.base &&
924 eip < vsyscallPage.base + vsyscallPage.size) {
925 pc.npc(vsyscallPage.base + vsyscallPage.vsysexitOffset);
935 I386Process::clone(old_tc, new_tc, (
I386Process*)process, flags);
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
SyscallReturn connectFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, Addr buf_ptr, int addrlen)
SyscallReturn geteuidFunc(SyscallDesc *desc, ThreadContext *tc)
Target geteuid() handler.
SyscallReturn munmapFunc(SyscallDesc *desc, ThreadContext *tc, Addr start, size_t length)
Target munmap() handler.
Each instance of a Loader subclass will have a chance to try to load an object file when tryLoaders i...
SyscallReturn dupFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
FIXME: The file description is not shared among file descriptors created with dup.
const std::vector< int > ArgumentRegs
SyscallReturn ignoreFunc(SyscallDesc *desc, ThreadContext *tc)
Handler for unimplemented syscalls that we never intend to implement (signal handling,...
SyscallReturn getpeernameFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, Addr sockAddrPtr, Addr addrlenPtr)
Bitfield< 5 > seg_not_present
static SyscallReturn archPrctlFunc(SyscallDesc *desc, ThreadContext *tc, int code, uint64_t addr)
SyscallReturn listenFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int backlog)
SyscallReturn shutdownFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int how)
Target shutdown() handler.
SyscallReturn mkdirFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, mode_t mode)
Target mkdir() handler.
SyscallReturn unlinkFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname)
Target unlink() handler.
static SyscallReturn setThreadArea32Func(SyscallDesc *desc, ThreadContext *tc, VPtr< UserDesc32 > userDesc)
SyscallReturn getegidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getegid() handler.
virtual Process * getProcessPtr()=0
SyscallReturn ftruncateFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, off_t length)
Target ftruncate() handler.
SyscallReturn umaskFunc(SyscallDesc *desc, ThreadContext *tc)
Target umask() handler.
SyscallReturn getsocknameFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, Addr addrPtr, Addr lenPtr)
Bitfield< 3 > read_exec_only
SyscallReturn symlinkFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, Addr new_pathname)
Target symlink() handler.
SyscallReturn lseekFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, uint64_t offs, int whence)
Target lseek() handler.
static SyscallDescTable< I386LinuxProcess::SyscallABI > syscallDescs32
SyscallReturn exitFunc(SyscallDesc *desc, ThreadContext *tc, int status)
Target exit() handler: terminate current context.
static SyscallReturn unameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
SyscallReturn getpidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getpid() handler.
SyscallReturn renameFunc(SyscallDesc *desc, ThreadContext *tc, Addr oldpath, Addr newpath)
Target rename() handler.
SyscallReturn brkFunc(SyscallDesc *desc, ThreadContext *tc, Addr new_brk)
Target brk() handler: set brk address.
Bitfield< 2, 1 > contents
ThreadContext is the external interface to all thread state for anything outside of the CPU.
SyscallReturn setpgidFunc(SyscallDesc *desc, ThreadContext *tc, int pid, int pgid)
Target setpgid() handler.
SyscallReturn _llseekFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, uint64_t offset_high, uint32_t offset_low, Addr result_ptr, int whence)
Target _llseek() handler.
SyscallReturn getsockoptFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int level, int optname, Addr valPtr, Addr lenPtr)
SyscallReturn readlinkFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, Addr buf_ptr, size_t bufsiz)
Target readlink() handler.
SyscallReturn fallocateFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int mode, off_t offset, off_t len)
static SyscallDescTable< X86_64LinuxProcess::SyscallABI > syscallDescs64
SyscallReturn truncateFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, off_t length)
Target truncate() handler.
SyscallReturn getppidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getppid() handler.
SyscallReturn mknodFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, mode_t mode, dev_t dev)
Target mknod() handler.
SyscallReturn recvfromFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, Addr bufrPtr, size_t bufrLen, int flags, Addr addrPtr, Addr addrlenPtr)
SyscallReturn pipeFunc(SyscallDesc *desc, ThreadContext *tc, Addr tgt_addr)
Target pipe() handler.
SyscallReturn ftruncate64Func(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int64_t length)
Target ftruncate64() handler.
SyscallReturn recvmsgFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, Addr msgPtr, int flags)
SyscallReturn exitGroupFunc(SyscallDesc *desc, ThreadContext *tc, int status)
Target exit_group() handler: terminate simulation. (exit all threads)
This is exposed globally, independent of the ISA.
Bitfield< 4 > limit_in_pages
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.
const std::string & name()
SyscallReturn sendmsgFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, Addr msgPtr, int flags)
SyscallReturn setTidAddressFunc(SyscallDesc *desc, ThreadContext *tc, uint64_t tidPtr)
Target set_tid_address() handler.
SyscallReturn setsockoptFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int level, int optname, Addr valPtr, socklen_t len)
SyscallReturn rmdirFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname)
bool copyIn(PortProxy &memproxy)
copy data into simulator space (read from target memory)
virtual TheISA::PCState pcState() const =0
virtual PortProxy & getVirtProxy()=0
SyscallReturn fcntlFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd, GuestABI::VarArgs< int > varargs)
Target fcntl() handler.
SyscallReturn getcwdFunc(SyscallDesc *desc, ThreadContext *tc, Addr buf_ptr, unsigned long size)
Target getcwd() handler.
SyscallReturn linkFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, Addr new_pathname)
Target link() handler.
SyscallReturn gettidFunc(SyscallDesc *desc, ThreadContext *tc)
Target gettid() handler.
BitUnion32(UserDescFlags) Bitfield< 0 > seg_32bit
SyscallReturn ignoreWarnOnceFunc(SyscallDesc *desc, ThreadContext *tc)
Like above, but only prints a warning once per syscall desc it's used with.
SyscallReturn getuidFunc(SyscallDesc *desc, ThreadContext *tc)
This object is a proxy for a port or other object which implements the functional response protocol,...
SyscallReturn closeFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
Target close() handler.
Overload hash function for BasicBlockRange type.
SyscallReturn chdirFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname)
Target chdir() handler.
SyscallReturn bindFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, Addr buf_ptr, int addrlen)
BitfieldType< SegDescriptorLimit > limit
TypedBufferArg is a class template; instances of this template represent typed buffers in target user...
SyscallReturn getpgrpFunc(SyscallDesc *desc, ThreadContext *tc)
Target getpgrpFunc() handler.
virtual void setMiscRegNoEffect(RegIndex misc_reg, RegVal val)=0
virtual RegVal readIntReg(RegIndex reg_idx) const =0
SyscallReturn sendtoFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, Addr bufrPtr, size_t bufrLen, int flags, Addr addrPtr, socklen_t addrLen)
SyscallReturn getgidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getgid() handler.
SyscallReturn truncate64Func(SyscallDesc *desc, ThreadContext *tc, Addr pathname, int64_t length)
Target truncate64() handler.
EndBitUnion(UserDescFlags) struct UserDesc32
SyscallReturn pipe2Func(SyscallDesc *desc, ThreadContext *tc, Addr tgt_addr, int flags)
Target pipe() handler.
This class provides the wrapper interface for the system call implementations which are defined in th...
SyscallReturn getcpuFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< uint32_t > cpu, VPtr< uint32_t > node, VPtr< uint32_t > tcache)
#define panic(...)
This implements a cprintf based panic() function.
bool copyOut(PortProxy &memproxy)
copy data out of simulator space (write to target memory)
SyscallReturn dup2Func(SyscallDesc *desc, ThreadContext *tc, int old_tgt_fd, int new_tgt_fd)
Target dup2() handler.
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Generated on Wed Sep 30 2020 14:01:59 for gem5 by doxygen 1.8.17