Go to the documentation of this file.
33 #include <sys/syscall.h>
56 warn(
"Unknown operating system; assuming Linux.");
80 process->Process::syscall(tc);
91 strcpy(
name->sysname,
"Linux");
92 strcpy(
name->nodename,
"sim.gem5.org");
93 strcpy(
name->release, process->release.c_str());
94 strcpy(
name->version,
"#1 Mon Aug 18 11:32:15 EDT 2003");
95 strcpy(
name->machine,
"power");
104 { 3,
"read", readFunc<PowerLinux> },
105 { 4,
"write", writeFunc<PowerLinux> },
106 { 5,
"open", openFunc<PowerLinux> },
114 { 13,
"time", timeFunc<PowerLinux> },
116 { 15,
"chmod", chmodFunc<PowerLinux> },
144 { 43,
"times", timesFunc<PowerLinux> },
155 { 54,
"ioctl", ioctlFunc<PowerLinux> },
173 { 72,
"sigsuspend" },
174 { 73,
"sigpending" },
179 { 78,
"gettimeofday" },
180 { 79,
"settimeofday" },
183 { 82,
"reserved#82" },
191 { 90,
"mmap", mmapFunc<PowerLinux> },
197 { 96,
"getpriority" },
198 { 97,
"setpriority" },
203 { 102,
"socketcall" },
205 { 104,
"setitimer" },
206 { 105,
"getitimer" },
207 { 106,
"stat", statFunc<PowerLinux> },
209 { 108,
"fstat", fstatFunc<PowerLinux> },
210 { 109,
"unused#109" },
220 { 119,
"sigreturn" },
222 { 121,
"setdomainname" },
224 { 123,
"modify_ldt" },
227 { 126,
"sigprocmask" },
228 { 127,
"create_module" },
229 { 128,
"init_module" },
230 { 129,
"delete_module" },
231 { 130,
"get_kernel_syms" },
237 { 136,
"personality" },
238 { 137,
"afs_syscall" },
243 { 142,
"newselect" },
247 { 146,
"writev", writevFunc<PowerLinux> },
249 { 148,
"fdatasync" },
254 { 153,
"munlockall" },
255 { 154,
"sched_setparam" },
256 { 155,
"sched_getparam" },
257 { 156,
"sched_setscheduler" },
258 { 157,
"sched_getscheduler" },
259 { 158,
"sched_yield" },
260 { 159,
"sched_get_priority_max" },
261 { 160,
"sched_get_priority_min" },
262 { 161,
"sched_rr_get_interval" },
263 { 162,
"nanosleep" },
265 { 164,
"setresuid" },
266 { 165,
"getresuid" },
268 { 167,
"query_module" },
270 { 169,
"nfsservctl" },
271 { 170,
"setresgid" },
272 { 171,
"getresgid" },
275 { 174,
"rt_sigprocmask" },
276 { 175,
"unknown#175" },
277 { 176,
"rt_sigpending" },
278 { 177,
"rt_sigtimedwait" },
280 { 179,
"rt_sigsuspend" },
287 { 186,
"sigaltstack" },
292 { 191,
"getrlimit" },
293 { 192,
"mmap2", mmapFunc<PowerLinux> },
294 { 193,
"truncate64" },
296 { 195,
"stat64", stat64Func<PowerLinux> },
297 { 196,
"lstat64", lstat64Func<PowerLinux> },
298 { 197,
"fstat64", fstat64Func<PowerLinux> },
306 { 205,
"getgroups" },
307 { 206,
"setgroups" },
309 { 208,
"setresuid" },
310 { 209,
"getresuid" },
311 { 210,
"setresgid" },
312 { 211,
"getresgid" },
318 { 217,
"getdents64" },
319 { 218,
"pivot_root" },
322 { 221,
"unknown#221" },
324 { 223,
"unknown#223" },
326 { 225,
"readahead" },
328 { 227,
"lsetxattr" },
329 { 228,
"fsetxattr" },
331 { 230,
"lgetxattr" },
332 { 231,
"fgetxattr" },
333 { 232,
"listxattr" },
334 { 233,
"llistxattr" },
336 { 235,
"removexattr" },
337 { 236,
"lremovexattr" },
338 { 237,
"fremovexattr" },
340 { 239,
"sendfile64" },
342 { 241,
"sched_setaffinity" },
343 { 242,
"sched_getaffinity" },
345 { 244,
"io_destory" },
346 { 245,
"io_getevents" },
347 { 246,
"io_submit" },
348 { 247,
"io_cancel" },
349 { 248,
"unknown#248" },
350 { 249,
"lookup_dcookie" },
351 { 250,
"epoll_create" },
352 { 251,
"epoll_ctl" },
353 { 252,
"epoll_wait" },
354 { 253,
"remap_file_pages" },
355 { 254,
"set_thread_area" },
356 { 255,
"get_thread_area" },
357 { 256,
"set_tid_address" },
358 { 257,
"timer_create" },
359 { 258,
"timer_settime" },
360 { 259,
"timer_gettime" },
361 { 260,
"timer_getoverrun" },
362 { 261,
"timer_delete" },
363 { 262,
"clock_settime" },
364 { 263,
"clock_gettime" },
365 { 264,
"clock_getres" },
366 { 265,
"clock_nanosleep" },
368 { 267,
"fstatfs64" },
371 { 270,
"arm_fadvise64_64" },
372 { 271,
"pciconfig_iobase" },
373 { 272,
"pciconfig_read" },
374 { 273,
"pciconfig_write" },
376 { 275,
"mq_unlink" },
377 { 276,
"mq_timedsend" },
378 { 277,
"mq_timedreceive" },
379 { 278,
"mq_notify" },
380 { 279,
"mq_getsetattr" },
387 { 286,
"getsockname" },
388 { 287,
"getpeername" },
389 { 288,
"socketpair" },
395 { 294,
"setsockopt" },
396 { 295,
"getsockopt" },
411 { 310,
"request_key" },
413 { 312,
"semtimedop" },
415 { 314,
"ioprio_set" },
416 { 315,
"ioprio_get" },
417 { 316,
"inotify_init" },
418 { 317,
"inotify_add_watch" },
419 { 318,
"inotify_rm_watch" },
421 { 320,
"get_mempolicy" },
422 { 321,
"set_mempolicy" },
427 { 326,
"futimesat" },
428 { 327,
"fstatat64" },
432 { 331,
"symlinkat" },
433 { 332,
"readlinkat" },
435 { 334,
"faccessat" },
439 { 338,
"set_robust_list" },
440 { 339,
"get_robust_list" },
442 { 341,
"arm_sync_file_range" },
445 { 344,
"move_pages" },
447 { 346,
"epoll_pwait" },
SyscallReturn geteuidFunc(SyscallDesc *desc, ThreadContext *tc)
Target geteuid() 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.
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 _llseekFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, uint64_t offset_high, uint32_t offset_low, VPtr<> result_ptr, int whence)
Target _llseek() handler.
SyscallReturn chownFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, uint32_t owner, uint32_t group)
Target chown() handler.
SyscallReturn getpagesizeFunc(SyscallDesc *desc, ThreadContext *tc)
Target getpagesize() handler.
SyscallReturn gethostnameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> buf_ptr, int name_len)
Target gethostname() handler.
SyscallReturn readlinkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, VPtr<> buf_ptr, size_t bufsiz)
Target readlink() handler.
SyscallReturn renameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> oldpath, VPtr<> newpath)
Target rename() handler.
void syscall(ThreadContext *tc) override
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 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.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
SyscallReturn ftruncate64Func(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int64_t length)
Target ftruncate64() handler.
static SyscallReturn unameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
static SyscallDescTable< SEWorkload::SyscallABI > syscallDescs
Syscall descriptors, indexed by call number.
SyscallReturn exitGroupFunc(SyscallDesc *desc, ThreadContext *tc, int status)
Target exit_group() handler: terminate simulation. (exit all threads)
This class represents the return value from an emulated system call, including any errno setting.
const std::string & name()
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 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.
virtual Process * load(const ProcessParams ¶ms, ::Loader::ObjectFile *obj_file)=0
Each subclass needs to implement this method.
SyscallReturn fcntl64Func(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd)
Target fcntl64() handler.
virtual RegVal readIntReg(RegIndex reg_idx) const =0
SyscallReturn getgidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getgid() handler.
This class provides the wrapper interface for the system call implementations which are defined in th...
Generated on Tue Jun 22 2021 15:28:20 for gem5 by doxygen 1.8.17