Go to the documentation of this file.
28 #include <sys/syscall.h>
39 { 0,
"read", readFunc<X86Linux64> },
40 { 1,
"write", writeFunc<X86Linux64> },
41 { 2,
"open", openFunc<X86Linux64> },
43 { 4,
"stat", stat64Func<X86Linux64> },
44 { 5,
"fstat", fstat64Func<X86Linux64> },
45 { 6,
"lstat", lstat64Func<X86Linux64> },
46 { 7,
"poll", pollFunc<X86Linux64> },
48 { 9,
"mmap", mmapFunc<X86Linux64> },
54 { 15,
"rt_sigreturn" },
55 { 16,
"ioctl", ioctlFunc<X86Linux64> },
56 { 17,
"pread64", pread64Func<X86Linux64> },
57 { 18,
"pwrite64", pwrite64Func<X86Linux64> },
58 { 19,
"readv", readvFunc<X86Linux64> },
59 { 20,
"writev", writevFunc<X86Linux64> },
62 { 23,
"select", selectFunc<X86Linux64> },
64 { 25,
"mremap", mremapFunc<X86Linux64> },
80 { 41,
"socket", socketFunc<X86Linux64> },
82 { 43,
"accept", acceptFunc<X86Linux64> },
92 { 53,
"socketpair", socketpairFunc<X86Linux64> },
95 { 56,
"clone", cloneFunc<X86Linux64> },
98 { 59,
"execve", execveFunc<X86Linux64> },
100 { 61,
"wait4", wait4Func<X86Linux64> },
117 #if defined(SYS_getdents)
118 { 78,
"getdents", getdentsFunc },
139 { 96,
"gettimeofday", gettimeofdayFunc<X86Linux64> },
140 { 97,
"getrlimit", getrlimitFunc<X86Linux64> },
141 { 98,
"getrusage", getrusageFunc<X86Linux64> },
142 { 99,
"sysinfo", sysinfoFunc<X86Linux64> },
143 { 100,
"times", timesFunc<X86Linux64> },
158 { 115,
"getgroups" },
159 { 116,
"setgroups" },
161 { 118,
"getresuid" },
162 { 119,
"setresgid" },
163 { 120,
"getresgid" },
170 { 127,
"rt_sigpending" },
171 { 128,
"rt_sigtimedwait" },
172 { 129,
"rt_sigqueueinfo" },
173 { 130,
"rt_sigsuspend" },
174 { 131,
"sigaltstack" },
178 { 135,
"personality" },
180 { 137,
"statfs", statfsFunc<X86Linux64> },
181 { 138,
"fstatfs", fstatfsFunc<X86Linux64> },
183 { 140,
"getpriority" },
185 { 142,
"sched_setparam" },
186 { 143,
"sched_getparam" },
187 { 144,
"sched_setscheduler" },
188 { 145,
"sched_getscheduler" },
189 { 146,
"sched_get_priority_max" },
190 { 147,
"sched_get_priority_min" },
191 { 148,
"sched_rr_get_interval" },
195 { 152,
"munlockall" },
197 { 154,
"modify_ldt" },
198 { 155,
"pivot_root" },
207 { 164,
"settimeofday" },
213 { 170,
"sethostname" },
214 { 171,
"setdomainname" },
217 { 174,
"create_module" },
218 { 175,
"init_module" },
219 { 176,
"delete_module" },
220 { 177,
"get_kernel_syms" },
221 { 178,
"query_module" },
223 { 180,
"nfsservctl" },
226 { 183,
"afs_syscall" },
230 { 187,
"readahead" },
232 { 189,
"lsetxattr" },
233 { 190,
"fsetxattr" },
235 { 192,
"lgetxattr" },
236 { 193,
"fgetxattr" },
237 { 194,
"listxattr" },
238 { 195,
"llistxattr" },
239 { 196,
"flistxattr" },
240 { 197,
"removexattr" },
241 { 198,
"lremovexattr" },
242 { 199,
"fremovexattr" },
244 { 201,
"time", timeFunc<X86Linux64> },
245 { 202,
"futex", futexFunc<X86Linux64> },
248 { 205,
"set_thread_area" },
250 { 207,
"io_destroy" },
251 { 208,
"io_getevents" },
252 { 209,
"io_submit" },
253 { 210,
"io_cancel" },
254 { 211,
"get_thread_area" },
255 { 212,
"lookup_dcookie" },
256 { 213,
"epoll_create" },
257 { 214,
"epoll_ctl_old" },
258 { 215,
"epoll_wait_old" },
259 { 216,
"remap_file_pages" },
260 { 217,
"getdents64" },
262 { 219,
"restart_syscall" },
263 { 220,
"semtimedop" },
265 { 222,
"timer_create" },
266 { 223,
"timer_settime" },
267 { 224,
"timer_gettime" },
268 { 225,
"timer_getoverrun" },
269 { 226,
"timer_delete" },
270 { 227,
"clock_settime" },
271 { 228,
"clock_gettime", clock_gettimeFunc<X86Linux64> },
272 { 229,
"clock_getres", clock_getresFunc<X86Linux64> },
273 { 230,
"clock_nanosleep" },
275 { 232,
"epoll_wait" },
276 { 233,
"epoll_ctl" },
277 { 234,
"tgkill", tgkillFunc<X86Linux64> },
281 { 238,
"set_mempolicy" },
284 { 241,
"mq_unlink" },
285 { 242,
"mq_timedsend" },
286 { 243,
"mq_timedreceive" },
287 { 244,
"mq_notify" },
288 { 245,
"mq_getsetattr" },
289 { 246,
"kexec_load" },
292 { 249,
"request_key" },
294 { 251,
"ioprio_set" },
295 { 252,
"ioprio_get" },
296 { 253,
"inotify_init" },
297 { 254,
"inotify_add_watch" },
298 { 255,
"inotify_rm_watch" },
299 { 256,
"migrate_pages" },
300 { 257,
"openat", openatFunc<X86Linux64> },
304 { 261,
"futimesat" },
305 { 262,
"newfstatat" },
309 { 266,
"symlinkat" },
312 { 269,
"faccessat" },
317 { 274,
"get_robust_list" },
320 { 277,
"sync_file_range" },
322 { 279,
"move_pages" },
323 { 280,
"utimensat" },
324 { 281,
"epoll_pwait" },
326 { 283,
"timerfd_create" },
327 { 284,
"eventfd", eventfdFunc<X86Linux64> },
329 { 286,
"timerfd_settime" },
330 { 287,
"timerfd_gettime" },
332 { 289,
"signalfd4" },
333 { 290,
"eventfd2", eventfdFunc<X86Linux64> },
334 { 291,
"epoll_create1" },
337 { 294,
"inotify_init1" },
340 { 297,
"rt_tgsigqueueinfo" },
341 { 298,
"perf_event_open" },
343 { 300,
"fanotify_init" },
344 { 301,
"fanotify_mark" },
345 { 302,
"prlimit64", prlimitFunc<X86Linux64> },
346 { 303,
"name_to_handle_at" },
347 { 304,
"open_by_handle_at" },
348 { 305,
"clock_adjtime" },
353 { 310,
"proess_vm_readv" },
354 { 311,
"proess_vm_writev" },
356 { 313,
"finit_module" },
SyscallReturn geteuidFunc(SyscallDesc *desc, ThreadContext *tc)
Target geteuid() handler.
SyscallReturn pipeFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> tgt_addr)
Target pipe() handler.
SyscallReturn dupFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
FIXME: The file description is not shared among file descriptors created with dup.
SyscallReturn brkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> new_brk)
Target brk() handler: set brk address.
SyscallReturn ignoreFunc(SyscallDesc *desc, ThreadContext *tc)
Handler for unimplemented syscalls that we never intend to implement (signal handling,...
SyscallReturn mkdirFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, mode_t mode)
Target mkdir() handler.
SyscallReturn bindFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> buf_ptr, int addrlen)
SyscallReturn rmdirFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname)
SyscallReturn sendtoFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> bufrPtr, size_t bufrLen, int flags, VPtr<> addrPtr, socklen_t addrLen)
SyscallReturn readlinkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, VPtr<> buf_ptr, size_t bufsiz)
Target readlink() handler.
SyscallReturn listenFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int backlog)
SyscallReturn renameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> oldpath, VPtr<> newpath)
Target rename() handler.
SyscallReturn mknodFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, mode_t mode, dev_t dev)
Target mknod() handler.
SyscallReturn shutdownFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int how)
Target shutdown() handler.
SyscallReturn getpeernameFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> sockAddrPtr, VPtr<> addrlenPtr)
SyscallReturn getegidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getegid() handler.
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 unameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
SyscallReturn setsockoptFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int level, int optname, VPtr<> valPtr, socklen_t len)
SyscallReturn lseekFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, uint64_t offs, int whence)
Target lseek() handler.
SyscallReturn munmapFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> start, size_t length)
Target munmap() handler.
SyscallReturn exitFunc(SyscallDesc *desc, ThreadContext *tc, int status)
Target exit() handler: terminate current context.
SyscallReturn getpidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getpid() handler.
SyscallReturn connectFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> buf_ptr, int addrlen)
SyscallReturn symlinkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, VPtr<> new_pathname)
Target symlink() handler.
SyscallReturn recvfromFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> bufrPtr, size_t bufrLen, int flags, VPtr<> addrPtr, VPtr<> addrlenPtr)
SyscallReturn setpgidFunc(SyscallDesc *desc, ThreadContext *tc, int pid, int pgid)
Target setpgid() handler.
SyscallReturn fallocateFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int mode, off_t offset, off_t len)
SyscallReturn getppidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getppid() handler.
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.
SyscallReturn sendmsgFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> msgPtr, int flags)
SyscallReturn setTidAddressFunc(SyscallDesc *desc, ThreadContext *tc, uint64_t tidPtr)
Target set_tid_address() handler.
SyscallReturn pipe2Func(SyscallDesc *desc, ThreadContext *tc, VPtr<> tgt_addr, int flags)
Target pipe() handler.
SyscallReturn truncateFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, off_t length)
Target truncate() handler.
SyscallReturn fcntlFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd, GuestABI::VarArgs< int > varargs)
Target fcntl() handler.
SyscallReturn chdirFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname)
Target chdir() handler.
SyscallReturn getsocknameFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> addrPtr, VPtr<> lenPtr)
SyscallReturn linkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, VPtr<> new_pathname)
Target link() handler.
SyscallReturn gettidFunc(SyscallDesc *desc, ThreadContext *tc)
Target gettid() handler.
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)
SyscallReturn unlinkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname)
Target unlink() handler.
SyscallReturn closeFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
Target close() handler.
static SyscallDescTable< SyscallABI64 > syscallDescs64
SyscallReturn getcwdFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> buf_ptr, unsigned long size)
Target getcwd() handler.
SyscallReturn getsockoptFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int level, int optname, VPtr<> valPtr, VPtr<> lenPtr)
SyscallReturn getpgrpFunc(SyscallDesc *desc, ThreadContext *tc)
Target getpgrpFunc() handler.
SyscallReturn getgidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getgid() handler.
SyscallReturn archPrctlFunc(SyscallDesc *desc, ThreadContext *tc, int code, uint64_t addr)
SyscallReturn getcpuFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< uint32_t > cpu, VPtr< uint32_t > node, VPtr< uint32_t > tcache)
SyscallReturn dup2Func(SyscallDesc *desc, ThreadContext *tc, int old_tgt_fd, int new_tgt_fd)
Target dup2() handler.
SyscallReturn recvmsgFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> msgPtr, int flags)
Generated on Tue Jun 22 2021 15:28:25 for gem5 by doxygen 1.8.17