gem5  v21.1.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
syscalls.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2005 The Regents of The University of Michigan
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met: redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
30 #include "sim/syscall_desc.hh"
31 #include "sim/syscall_emul.hh"
32 
33 namespace gem5
34 {
35 
36 class Process;
37 class ThreadContext;
38 
39 namespace SparcISA
40 {
41 
43 static SyscallReturn
45 {
46  auto process = tc->getProcessPtr();
47 
48  strcpy(name->sysname, "Linux");
49  strcpy(name->nodename, "sim.gem5.org");
50  strcpy(name->release, process->release.c_str());
51  strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
52  strcpy(name->machine, "sparc");
53 
54  return 0;
55 }
56 
57 
58 static SyscallReturn
60  VPtr<> ruid, VPtr<> euid, VPtr<> suid)
61 {
62  const uint64_t id = htobe(100);
63  // Handle the EFAULT case
64  // Set the ruid
65  if (ruid) {
66  BufferArg ruidBuff(ruid, sizeof(uint64_t));
67  memcpy(ruidBuff.bufferPtr(), &id, sizeof(uint64_t));
68  ruidBuff.copyOut(tc->getVirtProxy());
69  }
70  // Set the euid
71  if (euid) {
72  BufferArg euidBuff(euid, sizeof(uint64_t));
73  memcpy(euidBuff.bufferPtr(), &id, sizeof(uint64_t));
74  euidBuff.copyOut(tc->getVirtProxy());
75  }
76  // Set the suid
77  if (suid) {
78  BufferArg suidBuff(suid, sizeof(uint64_t));
79  memcpy(suidBuff.bufferPtr(), &id, sizeof(uint64_t));
80  suidBuff.copyOut(tc->getVirtProxy());
81  }
82  return 0;
83 }
84 
86  { 0, "restart_syscall" },
87  { 1, "exit", exitFunc }, // 32 bit
88  { 2, "fork" },
89  { 3, "read", readFunc<Sparc32Linux> },
90  { 4, "write", writeFunc<Sparc32Linux> },
91  { 5, "open", openFunc<Sparc32Linux> }, // 32 bit
92  { 6, "close", closeFunc },
93  { 7, "wait4" }, // 32 bit
94  { 8, "creat" }, // 32 bit
95  { 9, "link" },
96  { 10, "unlink", unlinkFunc },
97  { 11, "execv" },
98  { 12, "chdir" },
99  { 13, "chown", chownFunc }, // 32 bit
100  { 14, "mknod" },
101  { 15, "chmod" },
102  { 16, "lchown" }, // 32 bit
103  { 17, "brk", brkFunc },
104  { 18, "perfctr" }, // 32 bit
105  { 19, "lseek", lseekFunc }, // 32 bit
106  { 20, "getpid", getpidFunc },
107  { 21, "capget" },
108  { 22, "capset" },
109  { 23, "setuid", ignoreFunc }, // 32 bit
110  { 24, "getuid", getuidFunc }, // 32 bit
111  { 25, "time" },
112  { 26, "ptrace" },
113  { 27, "alarm" },
114  { 28, "sigaltstack" }, // 32 bit
115  { 29, "pause" }, // 32 bit
116  { 30, "utime" },
117  { 31, "lchown32" },
118  { 32, "fchown32" },
119  { 33, "access" }, // 32 bit
120  { 34, "nice" }, // 32 bit
121  { 35, "chown32" },
122  { 36, "sync" },
123  { 37, "kill" }, // 32 bit
124  { 38, "stat" },
125  { 39, "sendfile" }, // 32 bit
126  { 40, "lstat" },
127  { 41, "dup" },
128  { 42, "pipe", pipePseudoFunc },
129  { 43, "times", ignoreFunc },
130  { 44, "getuid32" },
131  { 45, "umount2" }, // 32 bit
132  { 46, "setgid" }, // 32 bit
133  { 47, "getgid", getgidFunc }, // 32 bit
134  { 48, "signal" }, // 32 bit
135  { 49, "geteuid", geteuidFunc }, // 32 bit
136  { 50, "getegid", getegidFunc }, // 32 bit
137  { 51, "acct" },
138  { 52, "memory_ordering" },
139  { 53, "getgid32" },
140  { 54, "ioctl" },
141  { 55, "reboot" }, // 32 bit
142  { 56, "mmap2" }, // 32 bit
143  { 57, "symlink" },
144  { 58, "readlink", readlinkFunc }, // 32 bit
145  { 59, "execve" }, // 32 bit
146  { 60, "umask" }, // 32 bit
147  { 61, "chroot" },
148  { 62, "fstat" },
149  { 63, "fstat64", fstat64Func<Sparc32Linux> },
150  { 64, "getpagesize" },
151  { 65, "msync" }, // 32 bit
152  { 66, "vfork" },
153  { 67, "pread64" }, // 32 bit
154  { 68, "pwrite64" }, // 32 bit
155  { 69, "geteuid32" },
156  { 70, "getegid32" },
157  { 71, "mmap", mmapFunc<Sparc32Linux> },
158  { 72, "setreuid32" },
159  { 73, "munmap", munmapFunc },
160  { 74, "mprotect", ignoreFunc },
161  { 75, "madvise" },
162  { 76, "vhangup" },
163  { 77, "truncate64" }, // 32 bit
164  { 78, "mincore" },
165  { 79, "getgroups" }, // 32 bit
166  { 80, "setgroups" }, // 32 bit
167  { 81, "getpgrp" },
168  { 82, "setgroups32" }, // 32 bit
169  { 83, "setitimer" }, // 32 bit
170  { 84, "ftruncate64" }, // 32 bit
171  { 85, "swapon" }, // 32 bit
172  { 86, "getitimer" }, // 32 bit
173  { 87, "setuid32" },
174  { 88, "sethostname" }, // 32 bit
175  { 89, "setgid32" },
176  { 90, "dup2" },
177  { 91, "setfsuid32" },
178  { 92, "fcntl" },
179  { 93, "select" }, // 32 bit
180  { 94, "setfsgid32" },
181  { 95, "fsync" },
182  { 96, "setpriority" }, // 32 bit
183  { 97, "socket" },
184  { 98, "connect" },
185  { 99, "accept" },
186  { 100, "getpriority" }, // 32 bit
187  { 101, "rt_sigreturn" }, // 32 bit
188  { 102, "rt_sigaction", ignoreFunc }, // 32 bit
189  { 103, "rt_sigprocmask", ignoreFunc }, // 32 bit
190  { 104, "rt_sigpending" }, // 32 bit
191  { 105, "rt_sigtimedwait" },
192  { 106, "rt_sigqueueinfo" }, // 32 bit
193  { 107, "rt_sigsuspend" },
194  { 108, "setresuid32" },
195  { 109, "getresuid32", getresuidFunc },
196  { 110, "setresgid32", ignoreFunc },
197  { 111, "getresgid32" },
198  { 112, "setregid32" },
199  { 113, "revcmsg" },
200  { 114, "sendmsg" },
201  { 115, "getgroups32" }, // 32 bit
202  { 116, "gettimeofday", gettimeofdayFunc<Sparc32Linux> }, // 32 bit
203  { 117, "getrusage" }, // 32 bit
204  { 118, "getsockopt" },
205  { 119, "getcwd", getcwdFunc },
206  { 120, "readv" },
207  { 121, "writev" },
208  { 122, "settimeofday" }, // 32 bit
209  { 123, "fchown" }, // 32 bit
210  { 124, "fchmod" },
211  { 125, "recvfrom" },
212  { 126, "setreuid" }, // 32 bit
213  { 127, "setregid" }, // 32 bit
214  { 128, "rename", renameFunc },
215  { 129, "truncate" },
216  { 130, "ftruncate" },
217  { 131, "flock" },
218  { 132, "lstat64" },
219  { 133, "sendto" },
220  { 134, "shutdown" },
221  { 135, "socketpair" },
222  { 136, "mkdir", mkdirFunc }, // 32 bit
223  { 137, "rmdir" },
224  { 138, "utimes" }, // 32 bit
225  { 139, "stat64" },
226  { 140, "sendfile64" }, // 32 bit
227  { 141, "getpeername" },
228  { 142, "futex" }, // 32 bit
229  { 143, "gettid" },
230  { 144, "getrlimit" },
231  { 145, "setrlimit" },
232  { 146, "pivot_root" },
233  { 147, "prctl" }, // 32 bit
234  { 148, "pciconfig_read" },
235  { 149, "pciconfig_write" },
236  { 150, "getsockname" },
237  { 151, "inotify_init" },
238  { 152, "inotify_add_watch" },
239  { 153, "poll" },
240  { 154, "getdents64" },
241  { 155, "fcntl64" },
242  { 156, "inotify_rm_watch" },
243  { 157, "statfs" },
244  { 158, "fstatfs" },
245  { 159, "umount" },
246  { 160, "sched_setaffinity" },
247  { 161, "sched_getaffinity" },
248  { 162, "getdomainname" }, // 32 bit
249  { 163, "setdomainname" }, // 32 bit
250  { 164, "ni_syscall" },
251  { 165, "quotactl" },
252  { 166, "set_tid_address" },
253  { 167, "mount" },
254  { 168, "ustat" },
255  { 169, "setxattr" }, // 32 bit
256  { 170, "lsetxattr" }, // 32 bit
257  { 171, "fsetxattr" }, // 32 bit
258  { 172, "getxattr" },
259  { 173, "lgetxattr" },
260  { 174, "getdents" },
261  { 175, "setsid" },
262  { 176, "fchdir" },
263  { 177, "fgetxattr" }, // 32 bit
264  { 178, "listxattr" },
265  { 179, "llistxattr" },
266  { 180, "flistxattr" }, // 32 bit
267  { 181, "removexattr" },
268  { 182, "lremovexattr" },
269  { 183, "sigpending" },
270  { 184, "query_module" },
271  { 185, "setpgid" }, // 32 bit
272  { 186, "fremovexattr" }, // 32 bit
273  { 187, "tkill" }, // 32 bit
274  { 188, "exit_group", exitGroupFunc }, // 32 bit
275  { 189, "uname", unameFunc },
276  { 190, "init_module" }, // 32 bit
277  { 191, "personality" },
278  { 192, "remap_file_pages" },
279  { 193, "epoll_create" }, // 32 bit
280  { 194, "epoll_ctl" }, // 32 bit
281  { 195, "epoll_wait" }, // 32 bit
282  { 196, "ioprio_set" }, // 32 bit
283  { 197, "getppid", getppidFunc },
284  { 198, "sigaction" }, // 32 bit
285  { 199, "sgetmask" },
286  { 200, "ssetmask" },
287  { 201, "sigsuspend" },
288  { 202, "oldlstat" },
289  { 203, "uselib" },
290  { 204, "readdir" },
291  { 205, "readahead" }, // 32 bit
292  { 206, "socketcall" }, // 32 bit
293  { 207, "syslog" }, // 32 bit
294  { 208, "lookup_dcookie" }, // 32 bit
295  { 209, "fadvise64" }, // 32 bit
296  { 210, "fadvise64_64" }, // 32 bit
297  { 211, "tgkill" }, // 32 bit
298  { 212, "waitpid" }, // 32 bit
299  { 213, "swapoff" },
300  { 214, "sysinfo", sysinfoFunc<Sparc32Linux> }, // 32 bit
301  { 215, "ipc" }, // 32 bit
302  { 216, "sigreturn" }, // 32 bit
303  { 217, "clone", cloneFunc<Sparc32Linux> },
304  { 218, "ioprio_get" }, // 32 bit
305  { 219, "adjtimex" }, // 32 bit
306  { 220, "sigprocmask" }, // 32 bit
307  { 221, "create_module" },
308  { 222, "delete_module" }, // 32 bit
309  { 223, "get_kernel_syms" },
310  { 224, "getpgid" }, // 32 bit
311  { 225, "bdflush" }, // 32 bit
312  { 226, "sysfs" }, // 32 bit
313  { 227, "afs_syscall" },
314  { 228, "setfsuid" }, // 32 bit
315  { 229, "setfsgid" }, // 32 bit
316  { 230, "_newselect" }, // 32 bit
317  { 231, "time", ignoreFunc },
318  { 232, "oldstat" },
319  { 233, "stime" },
320  { 234, "statfs64" },
321  { 235, "fstatfs64" },
322  { 236, "_llseek", _llseekFunc },
323  { 237, "mlock" },
324  { 238, "munlock" },
325  { 239, "mlockall" }, // 32 bit
326  { 240, "munlockall" },
327  { 241, "sched_setparam" }, // 32 bit
328  { 242, "sched_getparam" }, // 32 bit
329  { 243, "sched_setscheduler" }, // 32 bit
330  { 244, "sched_getscheduler" }, // 32 bit
331  { 245, "sched_yield" },
332  { 246, "sched_get_priority_max" }, // 32 bit
333  { 247, "sched_get_priority_min" }, // 32 bit
334  { 248, "sched_rr_get_interval" }, // 32 bit
335  { 249, "nanosleep" },
336  { 250, "mremap", mremapFunc<Sparc32Linux> }, // 32 bit
337  { 251, "_sysctl" }, // 32 bit
338  { 252, "getsid" }, // 32 bit
339  { 253, "fdatasync" },
340  { 254, "nfsservctl" }, // 32 bit
341  { 255, "aplib" },
342  { 256, "clock_settime" },
343  { 257, "clock_gettime" },
344  { 258, "clock_getres" },
345  { 259, "clock_nanosleep" }, // 32 bit
346  { 260, "sched_getaffinity" },
347  { 261, "sched_setaffinity" },
348  { 262, "timer_settime" }, // 32 bit
349  { 263, "timer_gettime" },
350  { 264, "timer_getoverrun" },
351  { 265, "timer_delete" },
352  { 266, "timer_create" },
353  { 267, "vserver" },
354  { 268, "io_setup" },
355  { 269, "io_destroy" },
356  { 270, "io_submit" }, // 32 bit
357  { 271, "io_cancel" },
358  { 272, "io_getevents" },
359  { 273, "mq_open" }, // 32 bit
360  { 274, "mq_unlink" },
361  { 275, "mq_timedsend" },
362  { 276, "mq_timedreceive" },
363  { 277, "mq_notify" },
364  { 278, "mq_getsetattr" },
365  { 279, "waitid" },
366  { 280, "sys_setaltroot" },
367  { 281, "add_key" },
368  { 282, "request_key" },
369  { 283, "keyctl" },
370  { 284, "openat" },
371  { 285, "mkdirat" },
372  { 286, "mknodat" },
373  { 287, "fchownat" },
374  { 288, "futimesat" },
375  { 289, "fstatat64" },
376  { 290, "unlinkat" },
377  { 291, "renameat" },
378  { 292, "linkat" },
379  { 293, "symlinkat" },
380  { 294, "readlinkat" },
381  { 295, "fchmodat" },
382  { 296, "faccessat" },
383  { 297, "pselect6" },
384  { 298, "ppoll" },
385  { 299, "unshare" }
386 };
387 
388 SyscallDescTable<SEWorkload::SyscallABI64> EmuLinux::syscallDescs = {
389  { 0, "restart_syscall" },
390  { 1, "exit", exitFunc },
391  { 2, "fork" },
392  { 3, "read", readFunc<SparcLinux> },
393  { 4, "write", writeFunc<SparcLinux> },
394  { 5, "open", openFunc<SparcLinux> },
395  { 6, "close", closeFunc },
396  { 7, "wait4" },
397  { 8, "creat" },
398  { 9, "link" },
399  { 10, "unlink", unlinkFunc },
400  { 11, "execv" },
401  { 12, "chdir" },
402  { 13, "chown", chownFunc },
403  { 14, "mknod" },
404  { 15, "chmod", chmodFunc<Linux> },
405  { 16, "lchown" },
406  { 17, "brk", brkFunc },
407  { 18, "perfctr" },
408  { 19, "lseek", lseekFunc },
409  { 20, "getpid", getpidFunc },
410  { 21, "capget" },
411  { 22, "capset" },
412  { 23, "setuid", ignoreFunc },
413  { 24, "getuid", getuidFunc },
414  { 25, "time" },
415  { 26, "ptrace" },
416  { 27, "alarm" },
417  { 28, "sigaltstack" },
418  { 29, "pause" },
419  { 30, "utime" },
420  { 31, "lchown32" },
421  { 32, "fchown32" },
422  { 33, "access" },
423  { 34, "nice" },
424  { 35, "chown32" },
425  { 36, "sync" },
426  { 37, "kill" },
427  { 38, "stat" },
428  { 39, "sendfile" },
429  { 40, "lstat" },
430  { 41, "dup" },
431  { 42, "pipe", pipePseudoFunc },
432  { 43, "times", ignoreFunc },
433  { 44, "getuid32" },
434  { 45, "umount2" },
435  { 46, "setgid" },
436  { 47, "getgid", getgidFunc },
437  { 48, "signal" },
438  { 49, "geteuid", geteuidFunc },
439  { 50, "getegid", getegidFunc },
440  { 51, "acct" },
441  { 52, "memory_ordering" },
442  { 53, "getgid32" },
443  { 54, "ioctl" },
444  { 55, "reboot" },
445  { 56, "mmap2" },
446  { 57, "symlink" },
447  { 58, "readlink", readlinkFunc },
448  { 59, "execve" },
449  { 60, "umask" },
450  { 61, "chroot" },
451  { 62, "fstat", fstatFunc<SparcLinux> },
452  { 63, "fstat64", fstat64Func<SparcLinux> },
453  { 64, "getpagesize" },
454  { 65, "msync" },
455  { 66, "vfork" },
456  { 67, "pread64" },
457  { 68, "pwrite64" },
458  { 69, "geteuid32" },
459  { 70, "getegid32" },
460  { 71, "mmap", mmapFunc<SparcLinux> },
461  { 72, "setreuid32" },
462  { 73, "munmap", munmapFunc },
463  { 74, "mprotect", ignoreFunc },
464  { 75, "madvise" },
465  { 76, "vhangup" },
466  { 77, "truncate64" },
467  { 78, "mincore" },
468  { 79, "getgroups" },
469  { 80, "setgroups" },
470  { 81, "getpgrp" },
471  { 82, "setgroups32" },
472  { 83, "setitimer" },
473  { 84, "ftruncate64" },
474  { 85, "swapon" },
475  { 86, "getitimer" },
476  { 87, "setuid32" },
477  { 88, "sethostname" },
478  { 89, "setgid32" },
479  { 90, "dup2" },
480  { 91, "setfsuid32" },
481  { 92, "fcntl" },
482  { 93, "select" },
483  { 94, "setfsgid32" },
484  { 95, "fsync" },
485  { 96, "setpriority" },
486  { 97, "socket" },
487  { 98, "connect" },
488  { 99, "accept" },
489  { 100, "getpriority" },
490  { 101, "rt_sigreturn" },
491  { 102, "rt_sigaction", ignoreFunc },
492  { 103, "rt_sigprocmask", ignoreFunc },
493  { 104, "rt_sigpending" },
494  { 105, "rt_sigtimedwait" },
495  { 106, "rt_sigqueueinfo" },
496  { 107, "rt_sigsuspend" },
497  { 108, "setresuid" },
498  { 109, "getresuid", getresuidFunc },
499  { 110, "setresgid", ignoreFunc },
500  { 111, "getresgid" },
501  { 112, "setregid32" },
502  { 113, "recvmsg" },
503  { 114, "sendmsg" },
504  { 115, "getgroups32" },
505  { 116, "gettimeofday", gettimeofdayFunc<SparcLinux> },
506  { 117, "getrusage" },
507  { 118, "getsockopt" },
508  { 119, "getcwd" },
509  { 120, "readv" },
510  { 121, "writev" },
511  { 122, "settimeofday" },
512  { 123, "fchown" },
513  { 124, "fchmod" },
514  { 125, "recvfrom" },
515  { 126, "setreuid" },
516  { 127, "setregid" },
517  { 128, "rename", renameFunc },
518  { 129, "truncate" },
519  { 130, "ftruncate" },
520  { 131, "flock" },
521  { 132, "lstat64" },
522  { 133, "sendto" },
523  { 134, "shutdown" },
524  { 135, "socketpair" },
525  { 136, "mkdir", mkdirFunc },
526  { 137, "rmdir" },
527  { 138, "utimes" },
528  { 139, "stat64" },
529  { 140, "sendfile64" },
530  { 141, "getpeername" },
531  { 142, "futex" },
532  { 143, "gettid" },
533  { 144, "getrlimit" },
534  { 145, "setrlimit" },
535  { 146, "pivot_root" },
536  { 147, "prctl" },
537  { 148, "pciconfig_read" },
538  { 149, "pciconfig_write" },
539  { 150, "getsockname" },
540  { 151, "inotify_init" },
541  { 152, "inotify_add_watch" },
542  { 153, "poll" },
543  { 154, "getdents64" },
544  { 155, "fcntl64" },
545  { 156, "inotify_rm_watch" },
546  { 157, "statfs" },
547  { 158, "fstatfs" },
548  { 159, "umount" },
549  { 160, "sched_set_affinity" },
550  { 161, "sched_get_affinity" },
551  { 162, "getdomainname" },
552  { 163, "setdomainname" },
553  { 164, "utrap_install" },
554  { 165, "quotactl" },
555  { 166, "set_tid_address" },
556  { 167, "mount" },
557  { 168, "ustat" },
558  { 169, "setxattr" },
559  { 170, "lsetxattr" },
560  { 171, "fsetxattr" },
561  { 172, "getxattr" },
562  { 173, "lgetxattr" },
563  { 174, "getdents" },
564  { 175, "setsid" },
565  { 176, "fchdir" },
566  { 177, "fgetxattr" },
567  { 178, "listxattr" },
568  { 179, "llistxattr" },
569  { 180, "flistxattr" },
570  { 181, "removexattr" },
571  { 182, "lremovexattr" },
572  { 183, "sigpending" },
573  { 184, "query_module" },
574  { 185, "setpgid" },
575  { 186, "fremovexattr" },
576  { 187, "tkill" },
577  { 188, "exit_group", exitGroupFunc },
578  { 189, "uname", unameFunc },
579  { 190, "init_module" },
580  { 191, "personality" },
581  { 192, "remap_file_pages" },
582  { 193, "epoll_create" },
583  { 194, "epoll_ctl" },
584  { 195, "epoll_wait" },
585  { 196, "ioprio_set" },
586  { 197, "getppid", getppidFunc },
587  { 198, "sigaction", ignoreFunc },
588  { 199, "sgetmask" },
589  { 200, "ssetmask" },
590  { 201, "sigsuspend" },
591  { 202, "oldlstat" },
592  { 203, "uselib" },
593  { 204, "readdir" },
594  { 205, "readahead" },
595  { 206, "socketcall" },
596  { 207, "syslog" },
597  { 208, "lookup_dcookie" },
598  { 209, "fadvise64" },
599  { 210, "fadvise64_64" },
600  { 211, "tgkill" },
601  { 212, "waitpid" },
602  { 213, "swapoff" },
603  { 214, "sysinfo", sysinfoFunc<SparcLinux> },
604  { 215, "ipc" },
605  { 216, "sigreturn" },
606  { 217, "clone", cloneFunc<SparcLinux> },
607  { 218, "ioprio_get" },
608  { 219, "adjtimex" },
609  { 220, "sigprocmask" },
610  { 221, "create_module" },
611  { 222, "delete_module" },
612  { 223, "get_kernel_syms" },
613  { 224, "getpgid" },
614  { 225, "bdflush" },
615  { 226, "sysfs" },
616  { 227, "afs_syscall" },
617  { 228, "setfsuid" },
618  { 229, "setfsgid" },
619  { 230, "_newselect" },
620  { 231, "time", ignoreFunc },
621  { 232, "oldstat" },
622  { 233, "stime" },
623  { 234, "statfs64" },
624  { 235, "fstatfs64" },
625  { 236, "_llseek", _llseekFunc },
626  { 237, "mlock" },
627  { 238, "munlock" },
628  { 239, "mlockall" },
629  { 240, "munlockall" },
630  { 241, "sched_setparam" },
631  { 242, "sched_getparam" },
632  { 243, "sched_setscheduler" },
633  { 244, "sched_getscheduler" },
634  { 245, "sched_yield" },
635  { 246, "sched_get_priority_max" },
636  { 247, "sched_get_priority_min" },
637  { 248, "sched_rr_get_interval" },
638  { 249, "nanosleep" },
639  { 250, "mremap", mremapFunc<SparcLinux> },
640  { 251, "_sysctl" },
641  { 252, "getsid" },
642  { 253, "fdatasync" },
643  { 254, "nfsservctl" },
644  { 255, "aplib" },
645  { 256, "clock_settime" },
646  { 257, "clock_gettime" },
647  { 258, "clock_getres" },
648  { 259, "clock_nanosleep" },
649  { 260, "sched_getaffinity" },
650  { 261, "sched_setaffinity" },
651  { 262, "timer_settime" },
652  { 263, "timer_gettime" },
653  { 264, "timer_getoverrun" },
654  { 265, "timer_delete" },
655  { 266, "timer_create" },
656  { 267, "vserver" },
657  { 268, "io_setup" },
658  { 269, "io_destroy" },
659  { 270, "io_submit" },
660  { 271, "io_cancel" },
661  { 272, "io_getevents" },
662  { 273, "mq_open" },
663  { 274, "mq_unlink" },
664  { 275, "mq_timedsend" },
665  { 276, "mq_timedreceive" },
666  { 277, "mq_notify" },
667  { 278, "mq_getsetattr" },
668  { 279, "waitid" },
669  { 280, "sys_setaltroot" },
670  { 281, "add_key" },
671  { 282, "request_key" },
672  { 283, "keyctl" }
673 };
674 
675 } // namespace SparcISA
676 } // namespace gem5
gem5::getuidFunc
SyscallReturn getuidFunc(SyscallDesc *desc, ThreadContext *tc)
Definition: syscall_emul.cc:958
gem5::SyscallReturn
This class represents the return value from an emulated system call, including any errno setting.
Definition: syscall_return.hh:55
gem5::SparcISA::EmuLinux::syscall32Descs
static SyscallDescTable< SEWorkload::SyscallABI32 > syscall32Descs
32 bit compatibility syscall descriptors, indexed by call number.
Definition: se_workload.hh:50
gem5::mkdirFunc
SyscallReturn mkdirFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, mode_t mode)
Target mkdir() handler.
Definition: syscall_emul.cc:516
gem5::SparcISA::getresuidFunc
static SyscallReturn getresuidFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> ruid, VPtr<> euid, VPtr<> suid)
Definition: syscalls.cc:59
gem5::getcwdFunc
SyscallReturn getcwdFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> buf_ptr, unsigned long size)
Target getcwd() handler.
Definition: syscall_emul.cc:371
gem5::brkFunc
SyscallReturn brkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> new_brk)
Target brk() handler: set brk address.
Definition: syscall_emul.cc:257
gem5::htobe
T htobe(T value)
Definition: byteswap.hh:174
gem5::closeFunc
SyscallReturn closeFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
Target close() handler.
Definition: syscall_emul.cc:288
gem5::exitGroupFunc
SyscallReturn exitGroupFunc(SyscallDesc *desc, ThreadContext *tc, int status)
Target exit_group() handler: terminate simulation. (exit all threads)
Definition: syscall_emul.cc:244
gem5::ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:93
gem5::unlinkFunc
SyscallReturn unlinkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname)
Target unlink() handler.
Definition: syscall_emul.cc:459
gem5::ThreadContext::getVirtProxy
virtual PortProxy & getVirtProxy()=0
gem5::_llseekFunc
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.
Definition: syscall_emul.cc:312
gem5::getgidFunc
SyscallReturn getgidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getgid() handler.
Definition: syscall_emul.cc:972
gem5::BufferArg
BufferArg represents an untyped buffer in target user space that is passed by reference to an (emulat...
Definition: syscall_emul_buf.hh:107
gem5::getegidFunc
SyscallReturn getegidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getegid() handler.
Definition: syscall_emul.cc:979
gem5::munmapFunc
SyscallReturn munmapFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> start, size_t length)
Target munmap() handler.
Definition: syscall_emul.cc:339
gem5::ProxyPtr
Definition: proxy_ptr.hh:238
gem5::SyscallDescTable
Definition: syscall_desc.hh:184
gem5::readlinkFunc
SyscallReturn readlinkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, VPtr<> buf_ptr, size_t bufsiz)
Target readlink() handler.
Definition: syscall_emul.cc:401
name
const std::string & name()
Definition: trace.cc:49
gem5::ThreadContext::getProcessPtr
virtual Process * getProcessPtr()=0
gem5::exitFunc
SyscallReturn exitFunc(SyscallDesc *desc, ThreadContext *tc, int status)
Target exit() handler: terminate current context.
Definition: syscall_emul.cc:238
syscall_emul.hh
gem5::BaseBufferArg::copyOut
bool copyOut(const PortProxy &memproxy)
copy data out of simulator space (write to target memory)
Definition: syscall_emul_buf.hh:91
gem5::pipePseudoFunc
SyscallReturn pipePseudoFunc(SyscallDesc *desc, ThreadContext *tc)
Pseudo Funcs - These functions use a different return convension, returning a second value in a regis...
Definition: syscall_emul.cc:799
gem5::getppidFunc
SyscallReturn getppidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getppid() handler.
Definition: syscall_emul.cc:951
gem5::renameFunc
SyscallReturn renameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> oldpath, VPtr<> newpath)
Target rename() handler.
Definition: syscall_emul.cc:530
gem5::SyscallDesc
This class provides the wrapper interface for the system call implementations which are defined in th...
Definition: syscall_desc.hh:69
gem5::ignoreFunc
SyscallReturn ignoreFunc(SyscallDesc *desc, ThreadContext *tc)
Handler for unimplemented syscalls that we never intend to implement (signal handling,...
Definition: syscall_emul.cc:71
gem5::getpidFunc
SyscallReturn getpidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getpid() handler.
Definition: syscall_emul.cc:937
gem5::BufferArg::bufferPtr
void * bufferPtr()
Return a pointer to the internal simulator-space buffer.
Definition: syscall_emul_buf.hh:119
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
se_workload.hh
gem5::geteuidFunc
SyscallReturn geteuidFunc(SyscallDesc *desc, ThreadContext *tc)
Target geteuid() handler.
Definition: syscall_emul.cc:965
gem5::SparcISA::unameFunc
static SyscallReturn unameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
Definition: syscalls.cc:44
syscall_desc.hh
gem5::chownFunc
SyscallReturn chownFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, uint32_t owner, uint32_t group)
Target chown() handler.
Definition: syscall_emul.cc:634
gem5::lseekFunc
SyscallReturn lseekFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, uint64_t offs, int whence)
Target lseek() handler.
Definition: syscall_emul.cc:295
gem5::SparcISA::EmuLinux::syscallDescs
static SyscallDescTable< SEWorkload::SyscallABI64 > syscallDescs
64 bit syscall descriptors, indexed by call number.
Definition: se_workload.hh:47

Generated on Tue Sep 21 2021 12:24:51 for gem5 by doxygen 1.8.17