gem5  v21.1.0.2
se_workload.cc
Go to the documentation of this file.
1 /*
2  * Copyright 2010-2013, 2015, 2020 ARM Limited
3  *
4  * The license below extends only to copyright in the software and shall
5  * not be construed as granting a license to any other intellectual
6  * property including but not limited to intellectual property relating
7  * to a hardware implementation of the functionality of the software
8  * licensed hereunder. You may use the software subject to the license
9  * terms below provided that you ensure that this notice is replicated
10  * unmodified and in its entirety in all distributions of the software,
11  * modified or unmodified, in source code or in binary form.
12  *
13  * Copyright 2003-2005 The Regents of The University of Michigan
14  * Copyright 2007-2008 The Florida State University
15  * Copyright 2020 Google Inc.
16  *
17  * Redistribution and use in source and binary forms, with or without
18  * modification, are permitted provided that the following conditions are
19  * met: redistributions of source code must retain the above copyright
20  * notice, this list of conditions and the following disclaimer;
21  * redistributions in binary form must reproduce the above copyright
22  * notice, this list of conditions and the following disclaimer in the
23  * documentation and/or other materials provided with the distribution;
24  * neither the name of the copyright holders nor the names of its
25  * contributors may be used to endorse or promote products derived from
26  * this software without specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  */
40 
42 
43 #include <sys/syscall.h>
44 
47 #include "base/trace.hh"
48 #include "cpu/thread_context.hh"
49 #include "sim/syscall_emul.hh"
50 
51 namespace gem5
52 {
53 
54 namespace
55 {
56 
57 class LinuxLoader : public Process::Loader
58 {
59  public:
60  Process *
61  load(const ProcessParams &params, loader::ObjectFile *obj) override
62  {
63  auto arch = obj->getArch();
64  auto opsys = obj->getOpSys();
65 
66  if (arch != loader::Arm && arch != loader::Thumb &&
67  arch != loader::Arm64) {
68  return nullptr;
69  }
70 
71  if (opsys == loader::UnknownOpSys) {
72  warn("Unknown operating system; assuming Linux.");
73  opsys = loader::Linux;
74  }
75 
76  if (opsys == loader::LinuxArmOABI) {
77  fatal("gem5 does not support ARM OABI binaries. Please recompile "
78  "with an EABI compiler.");
79  }
80 
81  if (opsys != loader::Linux)
82  return nullptr;
83 
84  if (arch == loader::Arm64)
85  return new ArmLinuxProcess64(params, obj, arch);
86  else
87  return new ArmLinuxProcess32(params, obj, arch);
88  }
89 };
90 
91 LinuxLoader linuxLoader;
92 
93 } // anonymous namespace
94 
95 namespace ArmISA
96 {
97 
99 static SyscallReturn
101 {
102  auto process = tc->getProcessPtr();
103 
104  strcpy(name->sysname, "Linux");
105  strcpy(name->nodename, "m5.eecs.umich.edu");
106  strcpy(name->release, process->release.c_str());
107  strcpy(name->version, "#1 SMP Sat Dec 1 00:00:00 GMT 2012");
108  strcpy(name->machine, "armv7l");
109 
110  return 0;
111 }
112 
114 static SyscallReturn
116 {
117  auto process = tc->getProcessPtr();
118 
119  strcpy(name->sysname, "Linux");
120  strcpy(name->nodename, "gem5");
121  strcpy(name->release, process->release.c_str());
122  strcpy(name->version, "#1 SMP Sat Dec 1 00:00:00 GMT 2012");
123  strcpy(name->machine, "armv8l");
124 
125  return 0;
126 }
127 
129 static SyscallReturn
130 setTLSFunc32(SyscallDesc *desc, ThreadContext *tc, uint32_t tlsPtr)
131 {
133  &tlsPtr, sizeof(tlsPtr));
134  tc->setMiscReg(MISCREG_TPIDRURO, tlsPtr);
135  return 0;
136 }
137 
138 static SyscallReturn
139 setTLSFunc64(SyscallDesc *desc, ThreadContext *tc, uint32_t tlsPtr)
140 {
141  tc->setMiscReg(MISCREG_TPIDRRO_EL0, tlsPtr);
142  return 0;
143 }
144 
145 class SyscallTable32 : public SyscallDescTable<EmuLinux::SyscallABI32>
146 {
147  public:
149  { base + 0, "syscall" },
150  { base + 1, "exit", exitFunc },
151  { base + 2, "fork" },
152  { base + 3, "read", readFunc<ArmLinux32> },
153  { base + 4, "write", writeFunc<ArmLinux32> },
154  { base + 5, "open", openFunc<ArmLinux32> },
155  { base + 6, "close", closeFunc },
156  { base + 8, "creat" },
157  { base + 9, "link" },
158  { base + 10, "unlink", unlinkFunc },
159  { base + 11, "execve", execveFunc<ArmLinux32> },
160  { base + 12, "chdir" },
161  { base + 13, "time", timeFunc<ArmLinux32> },
162  { base + 14, "mknod" },
163  { base + 15, "chmod", chmodFunc<ArmLinux32> },
164  { base + 16, "lchown", chownFunc },
165  { base + 19, "lseek", lseekFunc },
166  { base + 20, "getpid", getpidFunc },
167  { base + 21, "mount" },
168  { base + 22, "umount" },
169  { base + 23, "setuid", ignoreFunc },
170  { base + 24, "getuid", getuidFunc },
171  { base + 25, "stime" },
172  { base + 26, "ptrace" },
173  { base + 27, "alarm" },
174  { base + 29, "pause" },
175  { base + 30, "utime" },
176  { base + 33, "access", accessFunc },
177  { base + 34, "nice" },
178  { base + 36, "sync" },
179  { base + 37, "kill", ignoreFunc },
180  { base + 38, "rename", renameFunc },
181  { base + 39, "mkdir", mkdirFunc },
182  { base + 40, "rmdir" },
183  { base + 41, "dup", dupFunc },
184  { base + 42, "pipe", pipePseudoFunc },
185  { base + 43, "times", timesFunc<ArmLinux32> },
186  { base + 45, "brk", brkFunc },
187  { base + 46, "setgid" },
188  { base + 47, "getgid", getgidFunc },
189  { base + 49, "geteuid", geteuidFunc },
190  { base + 50, "getegid", getegidFunc },
191  { base + 51, "acct" },
192  { base + 52, "umount2" },
193  { base + 54, "ioctl", ioctlFunc<ArmLinux32> },
194  { base + 55, "fcntl", fcntlFunc },
195  { base + 57, "setpgid" },
196  { base + 60, "umask", umaskFunc },
197  { base + 61, "chroot" },
198  { base + 62, "ustat" },
199  { base + 63, "dup2" },
200  { base + 64, "getppid", getppidFunc },
201  { base + 65, "getpgrp" },
202  { base + 66, "setsid" },
203  { base + 67, "sigaction" },
204  { base + 70, "setreuid" },
205  { base + 71, "setregid" },
206  { base + 72, "sigsuspend" },
207  { base + 73, "sigpending" },
208  { base + 74, "sethostname", ignoreFunc },
209  { base + 75, "setrlimit", ignoreFunc },
210  { base + 76, "getrlimit", getrlimitFunc<ArmLinux32> },
211  { base + 77, "getrusage", getrusageFunc<ArmLinux32> },
212  { base + 78, "gettimeofday", gettimeofdayFunc<ArmLinux32> },
213  { base + 79, "settimeofday" },
214  { base + 80, "getgroups" },
215  { base + 81, "setgroups" },
216  { base + 82, "reserved#82" },
217  { base + 83, "symlink" },
218  { base + 85, "readlink", readlinkFunc },
219  { base + 86, "uselib" },
220  { base + 87, "swapon" },
221  { base + 88, "reboot" },
222  { base + 89, "readdir" },
223  { base + 90, "mmap", mmapFunc<ArmLinux32> },
224  { base + 91, "munmap", munmapFunc },
225  { base + 92, "truncate", truncateFunc },
226  { base + 93, "ftruncate", ftruncateFunc },
227  { base + 94, "fchmod" },
228  { base + 95, "fchown" },
229  { base + 96, "getpriority" },
230  { base + 97, "setpriority" },
231  { base + 99, "statfs" },
232  { base + 100, "fstatfs" },
233  { base + 102, "socketcall" },
234  { base + 103, "syslog" },
235  { base + 104, "setitimer" },
236  { base + 105, "getitimer" },
237  { base + 106, "stat", statFunc<ArmLinux32> },
238  { base + 107, "lstat" },
239  { base + 108, "fstat", fstatFunc<ArmLinux32> },
240  { base + 111, "vhangup" },
241  { base + 113, "syscall" },
242  { base + 114, "wait4" },
243  { base + 115, "swapoff" },
244  { base + 116, "sysinfo", sysinfoFunc<ArmLinux32> },
245  { base + 117, "ipc" },
246  { base + 118, "fsync" },
247  { base + 119, "sigreturn" },
248  { base + 120, "clone", cloneBackwardsFunc<ArmLinux32> },
249  { base + 121, "setdomainname" },
250  { base + 122, "uname", unameFunc32 },
251  { base + 124, "adjtimex" },
252  { base + 125, "mprotect", ignoreFunc },
253  { base + 126, "sigprocmask", ignoreWarnOnceFunc },
254  { base + 128, "init_module" },
255  { base + 129, "delete_module" },
256  { base + 131, "quotactl" },
257  { base + 132, "getpgid" },
258  { base + 133, "fchdir" },
259  { base + 134, "bdflush" },
260  { base + 135, "sysfs" },
261  { base + 136, "personality" },
262  { base + 137, "reserved#138" },
263  { base + 138, "setfsuid" },
264  { base + 139, "setfsgid" },
265  { base + 140, "llseek", _llseekFunc },
266 #if defined(SYS_getdents)
267  { base + 141, "getdents", getdentsFunc },
268 #else
269  { base + 141, "getdents" },
270 #endif
271  { base + 142, "newselect" },
272  { base + 143, "flock" },
273  { base + 144, "msync" },
274  { base + 145, "readv" },
275  { base + 146, "writev", writevFunc<ArmLinux32> },
276  { base + 147, "getsid" },
277  { base + 148, "fdatasync" },
278  { base + 149, "sysctl" },
279  { base + 150, "mlock" },
280  { base + 151, "munlock" },
281  { base + 152, "mlockall" },
282  { base + 153, "munlockall" },
283  { base + 154, "sched_setparam", ignoreWarnOnceFunc },
284  { base + 155, "sched_getparam", ignoreWarnOnceFunc },
285  { base + 156, "sched_setscheduler", ignoreWarnOnceFunc },
286  { base + 157, "sched_getscheduler", ignoreWarnOnceFunc },
287  { base + 158, "sched_yield", ignoreWarnOnceFunc },
288  { base + 159, "sched_get_priority_max", ignoreWarnOnceFunc },
289  { base + 160, "sched_get_priority_min", ignoreWarnOnceFunc },
290  { base + 161, "sched_rr_get_interval", ignoreWarnOnceFunc },
291  { base + 162, "nanosleep", ignoreWarnOnceFunc },
292  { base + 163, "mremap", mremapFunc<ArmLinux32> }, // ARM-specific
293  { base + 164, "setresuid" },
294  { base + 165, "getresuid" },
295  { base + 168, "poll" },
296  { base + 169, "nfsservctl" },
297  { base + 170, "setresgid" },
298  { base + 171, "getresgid" },
299  { base + 172, "prctl" },
300  { base + 173, "rt_sigreturn" },
301  { base + 174, "rt_sigaction", ignoreWarnOnceFunc },
302  { base + 175, "rt_sigprocmask", ignoreWarnOnceFunc },
303  { base + 176, "rt_sigpending" },
304  { base + 177, "rt_sigtimedwait" },
305  { base + 178, "rt_sigqueueinfo", ignoreFunc },
306  { base + 179, "rt_sigsuspend" },
307  { base + 180, "pread64" },
308  { base + 181, "pwrite64" },
309  { base + 182, "chown" },
310  { base + 183, "getcwd", getcwdFunc },
311  { base + 184, "capget" },
312  { base + 185, "capset" },
313  { base + 186, "sigaltstack" },
314  { base + 187, "sendfile" },
315  { base + 190, "vfork" },
316  { base + 191, "getrlimit", getrlimitFunc<ArmLinux32> },
317  { base + 192, "mmap2", mmapFunc<ArmLinux32> },
318  { base + 193, "truncate64" },
319  { base + 194, "ftruncate64", ftruncate64Func },
320  { base + 195, "stat64", stat64Func<ArmLinux32> },
321  { base + 196, "lstat64", lstat64Func<ArmLinux32> },
322  { base + 197, "fstat64", fstat64Func<ArmLinux32> },
323  { base + 198, "lchown" },
324  { base + 199, "getuid", getuidFunc },
325  { base + 200, "getgid", getgidFunc },
326  { base + 201, "geteuid", geteuidFunc },
327  { base + 202, "getegid", getegidFunc },
328  { base + 203, "setreuid" },
329  { base + 204, "setregid" },
330  { base + 205, "getgroups" },
331  { base + 206, "setgroups" },
332  { base + 207, "fchown" },
333  { base + 208, "setresuid" },
334  { base + 209, "getresuid" },
335  { base + 210, "setresgid" },
336  { base + 211, "getresgid" },
337  { base + 212, "chown" },
338  { base + 213, "setuid" },
339  { base + 214, "setgid" },
340  { base + 215, "setfsuid" },
341  { base + 216, "setfsgid" },
342 #if defined(SYS_getdents64)
343  { base + 217, "getdents64", getdents64Func },
344 #else
345  { base + 217, "getdents64" },
346 #endif
347  { base + 218, "pivot_root" },
348  { base + 219, "mincore" },
349  { base + 220, "madvise", ignoreFunc },
350  { base + 221, "fcntl64", fcntl64Func },
351  { base + 224, "gettid", gettidFunc },
352  { base + 225, "readahead" },
353  { base + 226, "setxattr" },
354  { base + 227, "lsetxattr" },
355  { base + 228, "fsetxattr" },
356  { base + 229, "getxattr" },
357  { base + 230, "lgetxattr" },
358  { base + 231, "fgetxattr" },
359  { base + 232, "listxattr" },
360  { base + 233, "llistxattr" },
361  { base + 234, "flistxattr" },
362  { base + 235, "removexattr" },
363  { base + 236, "lremovexattr" },
364  { base + 237, "fremovexattr" },
365  { base + 238, "tkill" },
366  { base + 239, "sendfile64" },
367  { base + 240, "futex", futexFunc<ArmLinux32> },
368  { base + 241, "sched_setaffinity", ignoreWarnOnceFunc },
369  { base + 242, "sched_getaffinity", ignoreFunc },
370  { base + 243, "io_setup" },
371  { base + 244, "io_destroy" },
372  { base + 245, "io_getevents" },
373  { base + 246, "io_submit" },
374  { base + 247, "io_cancel" },
375  { base + 248, "exit_group", exitGroupFunc },
376  { base + 249, "lookup_dcookie" },
377  { base + 250, "epoll_create" },
378  { base + 251, "epoll_ctl" },
379  { base + 252, "epoll_wait" },
380  { base + 253, "remap_file_pages" },
381  { base + 256, "set_tid_address", setTidAddressFunc },
382  { base + 257, "timer_create" },
383  { base + 258, "timer_settime" },
384  { base + 259, "timer_gettime" },
385  { base + 260, "timer_getoverrun" },
386  { base + 261, "timer_delete" },
387  { base + 262, "clock_settime" },
388  { base + 263, "clock_gettime", clock_gettimeFunc<ArmLinux32> },
389  { base + 264, "clock_getres", clock_getresFunc<ArmLinux32> },
390  { base + 265, "clock_nanosleep" },
391  { base + 266, "statfs64" },
392  { base + 267, "fstatfs64" },
393  { base + 268, "tgkill", tgkillFunc<ArmLinux32> },
394  { base + 269, "utimes" },
395  { base + 270, "arm_fadvise64_64" },
396  { base + 271, "pciconfig_iobase" },
397  { base + 272, "pciconfig_read" },
398  { base + 273, "pciconfig_write" },
399  { base + 274, "mq_open" },
400  { base + 275, "mq_unlink" },
401  { base + 276, "mq_timedsend" },
402  { base + 277, "mq_timedreceive" },
403  { base + 278, "mq_notify" },
404  { base + 279, "mq_getsetattr" },
405  { base + 280, "waitid" },
406  { base + 281, "socket" },
407  { base + 282, "bind" },
408  { base + 283, "connect" },
409  { base + 284, "listen" },
410  { base + 285, "accept" },
411  { base + 286, "getsockname" },
412  { base + 287, "getpeername" },
413  { base + 288, "socketpair" },
414  { base + 289, "send" },
415  { base + 290, "sendto" },
416  { base + 291, "recv" },
417  { base + 292, "recvfrom" },
418  { base + 293, "shutdown" },
419  { base + 294, "setsockopt" },
420  { base + 295, "getsockopt" },
421  { base + 296, "sendmsg" },
422  { base + 297, "rcvmsg" },
423  { base + 298, "semop" },
424  { base + 299, "semget" },
425  { base + 300, "semctl" },
426  { base + 301, "msgsend" },
427  { base + 302, "msgrcv" },
428  { base + 303, "msgget" },
429  { base + 304, "msgctl" },
430  { base + 305, "shmat" },
431  { base + 306, "shmdt" },
432  { base + 307, "shmget" },
433  { base + 308, "shmctl" },
434  { base + 309, "add_key" },
435  { base + 310, "request_key" },
436  { base + 311, "keyctl" },
437  { base + 312, "semtimedop" },
438  { base + 314, "ioprio_set" },
439  { base + 315, "ioprio_get" },
440  { base + 316, "inotify_init" },
441  { base + 317, "inotify_add_watch" },
442  { base + 318, "inotify_rm_watch" },
443  { base + 319, "mbind" },
444  { base + 320, "get_mempolicy" },
445  { base + 321, "set_mempolicy" },
446  { base + 322, "openat", openatFunc<ArmLinux32> },
447  { base + 323, "mkdirat" },
448  { base + 324, "mknodat" },
449  { base + 325, "fchownat" },
450  { base + 326, "futimesat" },
451  { base + 327, "fstatat64" },
452  { base + 328, "unlinkat" },
453  { base + 329, "renameat" },
454  { base + 330, "linkat" },
455  { base + 331, "symlinkat" },
456  { base + 332, "readlinkat" },
457  { base + 333, "fchmodat" },
458  { base + 334, "faccessat" },
459  { base + 335, "pselect6" },
460  { base + 336, "ppoll" },
461  { base + 337, "unshare" },
462  { base + 338, "set_robust_list", ignoreFunc },
463  { base + 339, "get_robust_list" },
464  { base + 340, "splice" },
465  { base + 341, "arm_sync_file_range" },
466  { base + 342, "tee" },
467  { base + 343, "vmsplice" },
468  { base + 344, "move_pages" },
469  { base + 345, "getcpu", getcpuFunc },
470  { base + 346, "epoll_pwait" },
471  { base + 347, "sys_kexec_load" },
472  { base + 348, "sys_utimensat" },
473  { base + 349, "sys_signalfd" },
474  { base + 350, "sys_timerfd_create" },
475  { base + 351, "sys_eventfd" },
476  { base + 352, "sys_fallocate" },
477  { base + 353, "sys_timerfd_settime" },
478  { base + 354, "sys_timerfd_gettime" },
479  { base + 355, "sys_signalfd4" },
480  { base + 356, "sys_eventfd2" },
481  { base + 357, "sys_epoll_create1" },
482  { base + 358, "sys_dup3" },
483  { base + 359, "sys_pipe2" },
484  { base + 360, "sys_inotify_init1" },
485  { base + 361, "sys_preadv" },
486  { base + 362, "sys_pwritev" },
487  { base + 363, "sys_rt_tgsigqueueinfo" },
488  { base + 364, "sys_perf_event_open" },
489  { base + 365, "sys_recvmmsg" },
490  })
491  {}
492 };
493 
494 static SyscallTable32 syscallDescs32Low(0), syscallDescs32High(0x900000);
495 
496 class SyscallTable64 : public SyscallDescTable<EmuLinux::SyscallABI64>
497 {
498  public:
500  { base + 0, "io_setup" },
501  { base + 1, "io_destroy" },
502  { base + 2, "io_submit" },
503  { base + 3, "io_cancel" },
504  { base + 4, "io_getevents" },
505  { base + 5, "setxattr" },
506  { base + 6, "lsetxattr" },
507  { base + 7, "fsetxattr" },
508  { base + 8, "getxattr" },
509  { base + 9, "lgetxattr" },
510  { base + 10, "fgetxattr" },
511  { base + 11, "listxattr" },
512  { base + 12, "llistxattr" },
513  { base + 13, "flistxattr" },
514  { base + 14, "removexattr" },
515  { base + 15, "lremovexattr" },
516  { base + 16, "fremovexattr" },
517  { base + 17, "getcwd", getcwdFunc },
518  { base + 18, "lookup_dcookie" },
519  { base + 19, "eventfd2" },
520  { base + 20, "epoll_create1" },
521  { base + 21, "epoll_ctl" },
522  { base + 22, "epoll_pwait" },
523  { base + 23, "dup", dupFunc },
524  { base + 24, "dup3" },
525  { base + 25, "fcntl64", fcntl64Func },
526  { base + 26, "inotify_init1" },
527  { base + 27, "inotify_add_watch" },
528  { base + 28, "inotify_rm_watch" },
529  { base + 29, "ioctl", ioctlFunc<ArmLinux64> },
530  { base + 30, "ioprio_set" },
531  { base + 31, "ioprio_get" },
532  { base + 32, "flock" },
533  { base + 33, "mknodat" },
534  { base + 34, "mkdirat" },
535  { base + 35, "unlinkat", unlinkatFunc<ArmLinux64> },
536  { base + 36, "symlinkat" },
537  { base + 37, "linkat" },
538  { base + 38, "renameat", renameatFunc<ArmLinux64> },
539  { base + 39, "umount2" },
540  { base + 40, "mount" },
541  { base + 41, "pivot_root" },
542  { base + 42, "nfsservctl" },
543  { base + 43, "statfs64" },
544  { base + 44, "fstatfs64" },
545  { base + 45, "truncate64" },
546  { base + 46, "ftruncate64", ftruncate64Func },
547  { base + 47, "fallocate" },
548  { base + 48, "faccessat", faccessatFunc<ArmLinux64> },
549  { base + 49, "chdir" },
550  { base + 50, "fchdir" },
551  { base + 51, "chroot" },
552  { base + 52, "fchmod" },
553  { base + 53, "fchmodat" },
554  { base + 54, "fchownat" },
555  { base + 55, "fchown" },
556  { base + 56, "openat", openatFunc<ArmLinux64> },
557  { base + 57, "close", closeFunc },
558  { base + 58, "vhangup" },
559  { base + 59, "pipe2" },
560  { base + 60, "quotactl" },
561 #if defined(SYS_getdents64)
562  { base + 61, "getdents64", getdents64Func },
563 #else
564  { base + 61, "getdents64" },
565 #endif
566  { base + 62, "llseek", lseekFunc },
567  { base + 63, "read", readFunc<ArmLinux64> },
568  { base + 64, "write", writeFunc<ArmLinux64> },
569  { base + 65, "readv" },
570  { base + 66, "writev", writevFunc<ArmLinux64> },
571  { base + 67, "pread64" },
572  { base + 68, "pwrite64" },
573  { base + 69, "preadv" },
574  { base + 70, "pwritev" },
575  { base + 71, "sendfile64" },
576  { base + 72, "pselect6" },
577  { base + 73, "ppoll" },
578  { base + 74, "signalfd4" },
579  { base + 75, "vmsplice" },
580  { base + 76, "splice" },
581  { base + 77, "tee" },
582  { base + 78, "readlinkat", readlinkatFunc<ArmLinux64> },
583  { base + 79, "fstatat64", fstatat64Func<ArmLinux64> },
584  { base + 80, "fstat64", fstat64Func<ArmLinux64> },
585  { base + 81, "sync" },
586  { base + 82, "fsync" },
587  { base + 83, "fdatasync" },
588  { base + 84, "sync_file_range" },
589  { base + 85, "timerfd_create" },
590  { base + 86, "timerfd_settime" },
591  { base + 87, "timerfd_gettime" },
592  { base + 88, "utimensat" },
593  { base + 89, "acct" },
594  { base + 90, "capget" },
595  { base + 91, "capset" },
596  { base + 92, "personality" },
597  { base + 93, "exit", exitFunc },
598  { base + 94, "exit_group", exitGroupFunc },
599  { base + 95, "waitid" },
600  { base + 96, "set_tid_address", setTidAddressFunc },
601  { base + 97, "unshare" },
602  { base + 98, "futex", futexFunc<ArmLinux64> },
603  { base + 99, "set_robust_list", ignoreFunc },
604  { base + 100, "get_robust_list" },
605  { base + 101, "nanosleep", ignoreWarnOnceFunc },
606  { base + 102, "getitimer" },
607  { base + 103, "setitimer" },
608  { base + 104, "kexec_load" },
609  { base + 105, "init_module" },
610  { base + 106, "delete_module" },
611  { base + 107, "timer_create" },
612  { base + 108, "timer_gettime" },
613  { base + 109, "timer_getoverrun" },
614  { base + 110, "timer_settime" },
615  { base + 111, "timer_delete" },
616  { base + 112, "clock_settime" },
617  { base + 113, "clock_gettime", clock_gettimeFunc<ArmLinux64> },
618  { base + 114, "clock_getres" },
619  { base + 115, "clock_nanosleep" },
620  { base + 116, "syslog" },
621  { base + 117, "ptrace" },
622  { base + 118, "sched_setparam", ignoreWarnOnceFunc },
623  { base + 119, "sched_setscheduler", ignoreWarnOnceFunc },
624  { base + 120, "sched_getscheduler", ignoreWarnOnceFunc },
625  { base + 121, "sched_getparam", ignoreWarnOnceFunc },
626  { base + 122, "sched_setaffinity", ignoreWarnOnceFunc },
627  { base + 123, "sched_getaffinity", ignoreFunc },
628  { base + 124, "sched_yield", ignoreWarnOnceFunc },
629  { base + 125, "sched_get_priority_max", ignoreWarnOnceFunc },
630  { base + 126, "sched_get_priority_min", ignoreWarnOnceFunc },
631  { base + 127, "sched_rr_get_interval", ignoreWarnOnceFunc },
632  { base + 128, "restart_syscall" },
633  { base + 129, "kill", ignoreFunc },
634  { base + 130, "tkill" },
635  { base + 131, "tgkill", tgkillFunc<ArmLinux64> },
636  { base + 132, "sigaltstack" },
637  { base + 133, "rt_sigsuspend" },
638  { base + 134, "rt_sigaction", ignoreFunc },
639  { base + 135, "rt_sigprocmask", ignoreWarnOnceFunc },
640  { base + 136, "rt_sigpending" },
641  { base + 137, "rt_sigtimedwait" },
642  { base + 138, "rt_sigqueueinfo", ignoreFunc },
643  { base + 139, "rt_sigreturn" },
644  { base + 140, "setpriority" },
645  { base + 141, "getpriority" },
646  { base + 142, "reboot" },
647  { base + 143, "setregid" },
648  { base + 144, "setgid" },
649  { base + 145, "setreuid" },
650  { base + 146, "setuid" },
651  { base + 147, "setresuid" },
652  { base + 148, "getresuid" },
653  { base + 149, "setresgid" },
654  { base + 150, "getresgid" },
655  { base + 151, "setfsuid" },
656  { base + 152, "setfsgid" },
657  { base + 153, "times", timesFunc<ArmLinux64> },
658  { base + 154, "setpgid" },
659  { base + 155, "getpgid" },
660  { base + 156, "getsid" },
661  { base + 157, "setsid" },
662  { base + 158, "getgroups" },
663  { base + 159, "setgroups" },
664  { base + 160, "uname", unameFunc64 },
665  { base + 161, "sethostname", ignoreFunc },
666  { base + 162, "setdomainname" },
667  { base + 163, "getrlimit", getrlimitFunc<ArmLinux64> },
668  { base + 164, "setrlimit", ignoreFunc },
669  { base + 165, "getrusage", getrusageFunc<ArmLinux64> },
670  { base + 166, "umask" },
671  { base + 167, "prctl" },
672  { base + 168, "getcpu", getcpuFunc },
673  { base + 169, "gettimeofday", gettimeofdayFunc<ArmLinux64> },
674  { base + 170, "settimeofday" },
675  { base + 171, "adjtimex" },
676  { base + 172, "getpid", getpidFunc },
677  { base + 173, "getppid", getppidFunc },
678  { base + 174, "getuid", getuidFunc },
679  { base + 175, "geteuid", geteuidFunc },
680  { base + 176, "getgid", getgidFunc },
681  { base + 177, "getegid", getegidFunc },
682  { base + 178, "gettid", gettidFunc },
683  { base + 179, "sysinfo", sysinfoFunc<ArmLinux64> },
684  { base + 180, "mq_open" },
685  { base + 181, "mq_unlink" },
686  { base + 182, "mq_timedsend" },
687  { base + 183, "mq_timedreceive" },
688  { base + 184, "mq_notify" },
689  { base + 185, "mq_getsetattr" },
690  { base + 186, "msgget" },
691  { base + 187, "msgctl" },
692  { base + 188, "msgrcv" },
693  { base + 189, "msgsnd" },
694  { base + 190, "semget" },
695  { base + 191, "semctl" },
696  { base + 192, "semtimedop" },
697  { base + 193, "semop" },
698  { base + 194, "shmget" },
699  { base + 195, "shmctl" },
700  { base + 196, "shmat" },
701  { base + 197, "shmdt" },
702  { base + 198, "socket" },
703  { base + 199, "socketpair" },
704  { base + 200, "bind" },
705  { base + 201, "listen" },
706  { base + 202, "accept" },
707  { base + 203, "connect" },
708  { base + 204, "getsockname" },
709  { base + 205, "getpeername" },
710  { base + 206, "sendto" },
711  { base + 207, "recvfrom" },
712  { base + 208, "setsockopt" },
713  { base + 209, "getsockopt" },
714  { base + 210, "shutdown" },
715  { base + 211, "sendmsg" },
716  { base + 212, "recvmsg" },
717  { base + 213, "readahead" },
718  { base + 214, "brk", brkFunc },
719  { base + 215, "munmap", munmapFunc },
720  { base + 216, "mremap", mremapFunc<ArmLinux64> },
721  { base + 217, "add_key" },
722  { base + 218, "request_key" },
723  { base + 219, "keyctl" },
724  { base + 220, "clone", cloneBackwardsFunc<ArmLinux64> },
725  { base + 221, "execve", execveFunc<ArmLinux64> },
726  { base + 222, "mmap2", mmapFunc<ArmLinux64> },
727  { base + 223, "fadvise64_64" },
728  { base + 224, "swapon" },
729  { base + 225, "swapoff" },
730  { base + 226, "mprotect", ignoreFunc },
731  { base + 227, "msync" },
732  { base + 228, "mlock" },
733  { base + 229, "munlock" },
734  { base + 230, "mlockall" },
735  { base + 231, "munlockall" },
736  { base + 232, "mincore" },
737  { base + 233, "madvise", ignoreFunc },
738  { base + 234, "remap_file_pages" },
739  { base + 235, "mbind" },
740  { base + 236, "get_mempolicy" },
741  { base + 237, "set_mempolicy" },
742  { base + 238, "migrate_pages" },
743  { base + 239, "move_pages" },
744  { base + 240, "rt_tgsigqueueinfo" },
745  { base + 241, "perf_event_open" },
746  { base + 242, "accept4" },
747  { base + 243, "recvmmsg" },
748  { base + 260, "wait4" },
749  { base + 261, "prlimit64", prlimitFunc<ArmLinux64> },
750  { base + 262, "fanotify_init" },
751  { base + 263, "fanotify_mark" },
752  { base + 264, "name_to_handle_at" },
753  { base + 265, "open_by_handle_at" },
754  { base + 266, "clock_adjtime" },
755  { base + 267, "syncfs" },
756  { base + 268, "setns" },
757  { base + 269, "sendmmsg" },
758  { base + 270, "process_vm_readv" },
759  { base + 271, "process_vm_writev" },
760  { base + 1024, "open", openFunc<ArmLinux64> },
761  { base + 1025, "link" },
762  { base + 1026, "unlink", unlinkFunc },
763  { base + 1027, "mknod" },
764  { base + 1028, "chmod", chmodFunc<ArmLinux64> },
765  { base + 1029, "chown" },
766  { base + 1030, "mkdir", mkdirFunc },
767  { base + 1031, "rmdir" },
768  { base + 1032, "lchown" },
769  { base + 1033, "access", accessFunc },
770  { base + 1034, "rename", renameFunc },
771  { base + 1035, "readlink", readlinkFunc },
772  { base + 1036, "symlink" },
773  { base + 1037, "utimes" },
774  { base + 1038, "stat64", stat64Func<ArmLinux64> },
775  { base + 1039, "lstat64", lstat64Func<ArmLinux64> },
776  { base + 1040, "pipe", pipePseudoFunc },
777  { base + 1041, "dup2" },
778  { base + 1042, "epoll_create" },
779  { base + 1043, "inotify_init" },
780  { base + 1044, "eventfd" },
781  { base + 1045, "signalfd" },
782  { base + 1046, "sendfile" },
783  { base + 1047, "ftruncate", ftruncateFunc },
784  { base + 1048, "truncate", truncateFunc },
785  { base + 1049, "stat", statFunc<ArmLinux64> },
786  { base + 1050, "lstat" },
787  { base + 1051, "fstat", fstatFunc<ArmLinux64> },
788  { base + 1052, "fcntl", fcntlFunc },
789  { base + 1053, "fadvise64" },
790  { base + 1054, "newfstatat" },
791  { base + 1055, "fstatfs" },
792  { base + 1056, "statfs" },
793  { base + 1057, "lseek", lseekFunc },
794  { base + 1058, "mmap", mmapFunc<ArmLinux64> },
795  { base + 1059, "alarm" },
796  { base + 1060, "getpgrp" },
797  { base + 1061, "pause" },
798  { base + 1062, "time", timeFunc<ArmLinux64> },
799  { base + 1063, "utime" },
800  { base + 1064, "creat" },
801 #if defined(SYS_getdents)
802  { base + 1065, "getdents", getdentsFunc },
803 #else
804  { base + 1065, "getdents" },
805 #endif
806  { base + 1066, "futimesat" },
807  { base + 1067, "select" },
808  { base + 1068, "poll" },
809  { base + 1069, "epoll_wait" },
810  { base + 1070, "ustat" },
811  { base + 1071, "vfork" },
812  { base + 1072, "oldwait4" },
813  { base + 1073, "recv" },
814  { base + 1074, "send" },
815  { base + 1075, "bdflush" },
816  { base + 1076, "umount" },
817  { base + 1077, "uselib" },
818  { base + 1078, "_sysctl" },
819  { base + 1079, "fork" }
820  })
821  {}
822 };
823 
824 static SyscallTable64 syscallDescs64Low(0), syscallDescs64High(0x900000);
825 
827  { 0xf0001, "breakpoint" },
828  { 0xf0002, "cacheflush" },
829  { 0xf0003, "usr26" },
830  { 0xf0004, "usr32" },
831  { 0xf0005, "set_tls", setTLSFunc32 },
832 };
833 
834 // Indices 1, 3 and 4 are unallocated.
836  { 0x1002, "cacheflush" },
837  { 0x1005, "set_tls", setTLSFunc64 }
838 };
839 
840 void
842 {
843  Process *process = tc->getProcessPtr();
844  // Call the syscall function in the base Process class to update stats.
845  // This will move into the base SEWorkload function at some point.
846  process->Process::syscall(tc);
847 
848  SyscallDesc *desc = nullptr;
849  if (dynamic_cast<ArmLinuxProcess64 *>(process)) {
850  int num = tc->readIntReg(INTREG_X8);
851  desc = syscallDescs64Low.get(num, false);
852  if (!desc)
853  desc = syscallDescs64Low.get(num, false);
854  if (!desc)
855  desc = privSyscallDescs64.get(num);
856  } else {
857  int num = tc->readIntReg(INTREG_R7);
858  desc = syscallDescs32Low.get(num, false);
859  if (!desc)
860  desc = syscallDescs32Low.get(num, false);
861  if (!desc)
862  desc = privSyscallDescs32.get(num);
863  }
864  assert(desc);
865  desc->doSyscall(tc);
866 }
867 
868 } // namespace ArmISA
869 } // namespace gem5
fatal
#define fatal(...)
This implements a cprintf based fatal() function.
Definition: logging.hh:189
gem5::dupFunc
SyscallReturn dupFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
FIXME: The file description is not shared among file descriptors created with dup.
Definition: syscall_emul.cc:680
warn
#define warn(...)
Definition: logging.hh:245
gem5::PortProxy::writeBlob
void writeBlob(Addr addr, const void *p, int size) const
Same as tryWriteBlob, but insists on success.
Definition: port_proxy.hh:192
gem5::ArmISA::EmuLinux
Definition: se_workload.hh:43
gem5::ArmISA::syscallDescs32Low
static SyscallTable32 syscallDescs32Low(0)
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::ArmLinuxProcess64
A process with emulated Arm/Linux syscalls.
Definition: process.hh:67
gem5::ArmISA::EmuLinux::syscall
void syscall(ThreadContext *tc) override
Definition: se_workload.cc:841
gem5::ArmISA::unameFunc64
static SyscallReturn unameFunc64(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
Definition: se_workload.cc:115
gem5::mkdirFunc
SyscallReturn mkdirFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, mode_t mode)
Target mkdir() handler.
Definition: syscall_emul.cc:516
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::SyscallDesc::doSyscall
void doSyscall(ThreadContext *tc)
Interface for invoking the system call funcion pointer.
Definition: syscall_desc.cc:41
gem5::ignoreWarnOnceFunc
SyscallReturn ignoreWarnOnceFunc(SyscallDesc *desc, ThreadContext *tc)
Like above, but only prints a warning once per syscall desc it's used with.
Definition: syscall_emul.cc:78
gem5::X86ISA::base
Bitfield< 51, 12 > base
Definition: pagetable.hh:141
gem5::ArmISA::MISCREG_TPIDRRO_EL0
@ MISCREG_TPIDRRO_EL0
Definition: misc.hh:749
gem5::closeFunc
SyscallReturn closeFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
Target close() handler.
Definition: syscall_emul.cc:288
gem5::getcpuFunc
SyscallReturn getcpuFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< uint32_t > cpu, VPtr< uint32_t > node, VPtr< uint32_t > tcache)
Definition: syscall_emul.cc:1653
gem5::loader::Arm64
@ Arm64
Definition: object_file.hh:58
gem5::umaskFunc
SyscallReturn umaskFunc(SyscallDesc *desc, ThreadContext *tc)
Target umask() handler.
Definition: syscall_emul.cc:623
gem5::loader::UnknownOpSys
@ UnknownOpSys
Definition: object_file.hh:71
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::ArmISA::SyscallTable32::SyscallTable32
SyscallTable32(int base)
Definition: se_workload.cc:148
gem5::ArmISA::SyscallTable64::SyscallTable64
SyscallTable64(int base)
Definition: se_workload.cc:499
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::ArmISA::setTLSFunc32
static SyscallReturn setTLSFunc32(SyscallDesc *desc, ThreadContext *tc, uint32_t tlsPtr)
Target set_tls() handler.
Definition: se_workload.cc:130
gem5::getgidFunc
SyscallReturn getgidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getgid() handler.
Definition: syscall_emul.cc:972
gem5::truncateFunc
SyscallReturn truncateFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, off_t length)
Target truncate() handler.
Definition: syscall_emul.cc:552
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::ArmISA::MISCREG_TPIDRURO
@ MISCREG_TPIDRURO
Definition: misc.hh:405
gem5::ProxyPtr
Definition: proxy_ptr.hh:238
gem5::ArmISA::syscallDescs32High
static SyscallTable32 syscallDescs32High(0x900000)
gem5::ArmISA::SyscallTable32
Definition: se_workload.cc:145
gem5::gettidFunc
SyscallReturn gettidFunc(SyscallDesc *desc, ThreadContext *tc)
Target gettid() handler.
Definition: syscall_emul.cc:944
gem5::SyscallDescTable
Definition: syscall_desc.hh:184
gem5::setTidAddressFunc
SyscallReturn setTidAddressFunc(SyscallDesc *desc, ThreadContext *tc, uint64_t tidPtr)
Target set_tid_address() handler.
Definition: syscall_emul.cc:279
gem5::ArmISA::setTLSFunc64
static SyscallReturn setTLSFunc64(SyscallDesc *desc, ThreadContext *tc, uint32_t tlsPtr)
Definition: se_workload.cc:139
gem5::fcntlFunc
SyscallReturn fcntlFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd, guest_abi::VarArgs< int > varargs)
Target fcntl() handler.
Definition: syscall_emul.cc:728
gem5::readlinkFunc
SyscallReturn readlinkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, VPtr<> buf_ptr, size_t bufsiz)
Target readlink() handler.
Definition: syscall_emul.cc:401
gem5::ThreadContext::readIntReg
virtual RegVal readIntReg(RegIndex reg_idx) const =0
name
const std::string & name()
Definition: trace.cc:49
gem5::accessFunc
SyscallReturn accessFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, mode_t mode)
Target access() handler.
Definition: syscall_emul.cc:1008
gem5::fcntl64Func
SyscallReturn fcntl64Func(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd)
Target fcntl64() handler.
Definition: syscall_emul.cc:770
gem5::Process
Definition: process.hh:67
gem5::ThreadContext::getProcessPtr
virtual Process * getProcessPtr()=0
gem5::loader::Thumb
@ Thumb
Definition: object_file.hh:60
gem5::ArmISA::SyscallTable64
Definition: se_workload.cc:496
gem5::ftruncateFunc
SyscallReturn ftruncateFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, off_t length)
Target ftruncate() handler.
Definition: syscall_emul.cc:569
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::ArmISA::privSyscallDescs32
static SyscallDescTable< EmuLinux::SyscallABI32 > privSyscallDescs32
Definition: se_workload.cc:826
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
se_workload.hh
gem5::ThreadContext::setMiscReg
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
gem5::ArmISA::unameFunc32
static SyscallReturn unameFunc32(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
Definition: se_workload.cc:100
gem5::getppidFunc
SyscallReturn getppidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getppid() handler.
Definition: syscall_emul.cc:951
gem5::SyscallDescTable::get
SyscallDesc * get(int num, bool fatal_if_missing=true)
Definition: syscall_desc.hh:199
gem5::renameFunc
SyscallReturn renameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> oldpath, VPtr<> newpath)
Target rename() handler.
Definition: syscall_emul.cc:530
gem5::loader::LinuxArmOABI
@ LinuxArmOABI
Definition: object_file.hh:75
process.hh
trace.hh
gem5::SyscallDesc
This class provides the wrapper interface for the system call implementations which are defined in th...
Definition: syscall_desc.hh:69
gem5::ArmLinuxProcess32::commPage
static const Addr commPage
A page to hold "kernel" provided functions. The name might be wrong.
Definition: process.hh:63
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
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::ArmISA::syscallDescs64Low
static SyscallTable64 syscallDescs64Low(0)
object_file.hh
gem5::loader::Arm
@ Arm
Definition: object_file.hh:59
gem5::ArmISA::privSyscallDescs64
static SyscallDescTable< EmuLinux::SyscallABI64 > privSyscallDescs64
Definition: se_workload.cc:835
thread_context.hh
gem5::loader::Linux
@ Linux
Definition: object_file.hh:73
gem5::geteuidFunc
SyscallReturn geteuidFunc(SyscallDesc *desc, ThreadContext *tc)
Target geteuid() handler.
Definition: syscall_emul.cc:965
gem5::ftruncate64Func
SyscallReturn ftruncate64Func(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int64_t length)
Target ftruncate64() handler.
Definition: syscall_emul.cc:604
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::ArmISA::syscallDescs64High
static SyscallTable64 syscallDescs64High(0x900000)

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