Go to the documentation of this file.
43 #include <sys/syscall.h>
69 warn(
"Unknown operating system; assuming Linux.");
74 fatal(
"gem5 does not support ARM OABI binaries. Please recompile "
75 "with an EABI compiler.");
101 strcpy(
name->sysname,
"Linux");
102 strcpy(
name->nodename,
"m5.eecs.umich.edu");
103 strcpy(
name->release, process->release.c_str());
104 strcpy(
name->version,
"#1 SMP Sat Dec 1 00:00:00 GMT 2012");
105 strcpy(
name->machine,
"armv7l");
116 strcpy(
name->sysname,
"Linux");
117 strcpy(
name->nodename,
"gem5");
118 strcpy(
name->release, process->release.c_str());
119 strcpy(
name->version,
"#1 SMP Sat Dec 1 00:00:00 GMT 2012");
120 strcpy(
name->machine,
"armv8l");
130 &tlsPtr,
sizeof(tlsPtr));
146 {
base + 0,
"syscall" },
148 {
base + 2,
"fork" },
149 {
base + 3,
"read", readFunc<ArmLinux32> },
150 {
base + 4,
"write", writeFunc<ArmLinux32> },
151 {
base + 5,
"open", openFunc<ArmLinux32> },
153 {
base + 8,
"creat" },
154 {
base + 9,
"link" },
156 {
base + 11,
"execve", execveFunc<ArmLinux32> },
157 {
base + 12,
"chdir" },
158 {
base + 13,
"time", timeFunc<ArmLinux32> },
159 {
base + 14,
"mknod" },
160 {
base + 15,
"chmod", chmodFunc<ArmLinux32> },
164 {
base + 21,
"mount" },
165 {
base + 22,
"umount" },
168 {
base + 25,
"stime" },
169 {
base + 26,
"ptrace" },
170 {
base + 27,
"alarm" },
171 {
base + 29,
"pause" },
172 {
base + 30,
"utime" },
174 {
base + 34,
"nice" },
175 {
base + 36,
"sync" },
179 {
base + 40,
"rmdir" },
182 {
base + 43,
"times", timesFunc<ArmLinux32> },
184 {
base + 46,
"setgid" },
188 {
base + 51,
"acct" },
189 {
base + 52,
"umount2" },
190 {
base + 54,
"ioctl", ioctlFunc<ArmLinux32> },
192 {
base + 57,
"setpgid" },
194 {
base + 61,
"chroot" },
195 {
base + 62,
"ustat" },
196 {
base + 63,
"dup2" },
198 {
base + 65,
"getpgrp" },
199 {
base + 66,
"setsid" },
200 {
base + 67,
"sigaction" },
201 {
base + 70,
"setreuid" },
202 {
base + 71,
"setregid" },
203 {
base + 72,
"sigsuspend" },
204 {
base + 73,
"sigpending" },
207 {
base + 76,
"getrlimit", getrlimitFunc<ArmLinux32> },
208 {
base + 77,
"getrusage", getrusageFunc<ArmLinux32> },
209 {
base + 78,
"gettimeofday", gettimeofdayFunc<ArmLinux32> },
210 {
base + 79,
"settimeofday" },
211 {
base + 80,
"getgroups" },
212 {
base + 81,
"setgroups" },
213 {
base + 82,
"reserved#82" },
214 {
base + 83,
"symlink" },
216 {
base + 86,
"uselib" },
217 {
base + 87,
"swapon" },
218 {
base + 88,
"reboot" },
219 {
base + 89,
"readdir" },
220 {
base + 90,
"mmap", mmapFunc<ArmLinux32> },
224 {
base + 94,
"fchmod" },
225 {
base + 95,
"fchown" },
226 {
base + 96,
"getpriority" },
227 {
base + 97,
"setpriority" },
228 {
base + 99,
"statfs" },
229 {
base + 100,
"fstatfs" },
230 {
base + 102,
"socketcall" },
231 {
base + 103,
"syslog" },
232 {
base + 104,
"setitimer" },
233 {
base + 105,
"getitimer" },
234 {
base + 106,
"stat", statFunc<ArmLinux32> },
235 {
base + 107,
"lstat" },
236 {
base + 108,
"fstat", fstatFunc<ArmLinux32> },
237 {
base + 111,
"vhangup" },
238 {
base + 113,
"syscall" },
239 {
base + 114,
"wait4" },
240 {
base + 115,
"swapoff" },
241 {
base + 116,
"sysinfo", sysinfoFunc<ArmLinux32> },
242 {
base + 117,
"ipc" },
243 {
base + 118,
"fsync" },
244 {
base + 119,
"sigreturn" },
245 {
base + 120,
"clone", cloneBackwardsFunc<ArmLinux32> },
246 {
base + 121,
"setdomainname" },
248 {
base + 124,
"adjtimex" },
251 {
base + 128,
"init_module" },
252 {
base + 129,
"delete_module" },
253 {
base + 131,
"quotactl" },
254 {
base + 132,
"getpgid" },
255 {
base + 133,
"fchdir" },
256 {
base + 134,
"bdflush" },
257 {
base + 135,
"sysfs" },
258 {
base + 136,
"personality" },
259 {
base + 137,
"reserved#138" },
260 {
base + 138,
"setfsuid" },
261 {
base + 139,
"setfsgid" },
263 #if defined(SYS_getdents)
264 {
base + 141,
"getdents", getdentsFunc },
266 {
base + 141,
"getdents" },
268 {
base + 142,
"newselect" },
269 {
base + 143,
"flock" },
270 {
base + 144,
"msync" },
271 {
base + 145,
"readv" },
272 {
base + 146,
"writev", writevFunc<ArmLinux32> },
273 {
base + 147,
"getsid" },
274 {
base + 148,
"fdatasync" },
275 {
base + 149,
"sysctl" },
276 {
base + 150,
"mlock" },
277 {
base + 151,
"munlock" },
278 {
base + 152,
"mlockall" },
279 {
base + 153,
"munlockall" },
289 {
base + 163,
"mremap", mremapFunc<ArmLinux32> },
290 {
base + 164,
"setresuid" },
291 {
base + 165,
"getresuid" },
292 {
base + 168,
"poll" },
293 {
base + 169,
"nfsservctl" },
294 {
base + 170,
"setresgid" },
295 {
base + 171,
"getresgid" },
296 {
base + 172,
"prctl" },
297 {
base + 173,
"rt_sigreturn" },
300 {
base + 176,
"rt_sigpending" },
301 {
base + 177,
"rt_sigtimedwait" },
303 {
base + 179,
"rt_sigsuspend" },
304 {
base + 180,
"pread64" },
305 {
base + 181,
"pwrite64" },
306 {
base + 182,
"chown" },
308 {
base + 184,
"capget" },
309 {
base + 185,
"capset" },
310 {
base + 186,
"sigaltstack" },
311 {
base + 187,
"sendfile" },
312 {
base + 190,
"vfork" },
313 {
base + 191,
"getrlimit", getrlimitFunc<ArmLinux32> },
314 {
base + 192,
"mmap2", mmapFunc<ArmLinux32> },
315 {
base + 193,
"truncate64" },
317 {
base + 195,
"stat64", stat64Func<ArmLinux32> },
318 {
base + 196,
"lstat64", lstat64Func<ArmLinux32> },
319 {
base + 197,
"fstat64", fstat64Func<ArmLinux32> },
320 {
base + 198,
"lchown" },
325 {
base + 203,
"setreuid" },
326 {
base + 204,
"setregid" },
327 {
base + 205,
"getgroups" },
328 {
base + 206,
"setgroups" },
329 {
base + 207,
"fchown" },
330 {
base + 208,
"setresuid" },
331 {
base + 209,
"getresuid" },
332 {
base + 210,
"setresgid" },
333 {
base + 211,
"getresgid" },
334 {
base + 212,
"chown" },
335 {
base + 213,
"setuid" },
336 {
base + 214,
"setgid" },
337 {
base + 215,
"setfsuid" },
338 {
base + 216,
"setfsgid" },
339 #if defined(SYS_getdents64)
340 {
base + 217,
"getdents64", getdents64Func },
342 {
base + 217,
"getdents64" },
344 {
base + 218,
"pivot_root" },
345 {
base + 219,
"mincore" },
349 {
base + 225,
"readahead" },
350 {
base + 226,
"setxattr" },
351 {
base + 227,
"lsetxattr" },
352 {
base + 228,
"fsetxattr" },
353 {
base + 229,
"getxattr" },
354 {
base + 230,
"lgetxattr" },
355 {
base + 231,
"fgetxattr" },
356 {
base + 232,
"listxattr" },
357 {
base + 233,
"llistxattr" },
358 {
base + 234,
"flistxattr" },
359 {
base + 235,
"removexattr" },
360 {
base + 236,
"lremovexattr" },
361 {
base + 237,
"fremovexattr" },
362 {
base + 238,
"tkill" },
363 {
base + 239,
"sendfile64" },
364 {
base + 240,
"futex", futexFunc<ArmLinux32> },
367 {
base + 243,
"io_setup" },
368 {
base + 244,
"io_destroy" },
369 {
base + 245,
"io_getevents" },
370 {
base + 246,
"io_submit" },
371 {
base + 247,
"io_cancel" },
373 {
base + 249,
"lookup_dcookie" },
374 {
base + 250,
"epoll_create" },
375 {
base + 251,
"epoll_ctl" },
376 {
base + 252,
"epoll_wait" },
377 {
base + 253,
"remap_file_pages" },
379 {
base + 257,
"timer_create" },
380 {
base + 258,
"timer_settime" },
381 {
base + 259,
"timer_gettime" },
382 {
base + 260,
"timer_getoverrun" },
383 {
base + 261,
"timer_delete" },
384 {
base + 262,
"clock_settime" },
385 {
base + 263,
"clock_gettime", clock_gettimeFunc<ArmLinux32> },
386 {
base + 264,
"clock_getres", clock_getresFunc<ArmLinux32> },
387 {
base + 265,
"clock_nanosleep" },
388 {
base + 266,
"statfs64" },
389 {
base + 267,
"fstatfs64" },
390 {
base + 268,
"tgkill", tgkillFunc<ArmLinux32> },
391 {
base + 269,
"utimes" },
392 {
base + 270,
"arm_fadvise64_64" },
393 {
base + 271,
"pciconfig_iobase" },
394 {
base + 272,
"pciconfig_read" },
395 {
base + 273,
"pciconfig_write" },
396 {
base + 274,
"mq_open" },
397 {
base + 275,
"mq_unlink" },
398 {
base + 276,
"mq_timedsend" },
399 {
base + 277,
"mq_timedreceive" },
400 {
base + 278,
"mq_notify" },
401 {
base + 279,
"mq_getsetattr" },
402 {
base + 280,
"waitid" },
403 {
base + 281,
"socket" },
404 {
base + 282,
"bind" },
405 {
base + 283,
"connect" },
406 {
base + 284,
"listen" },
407 {
base + 285,
"accept" },
408 {
base + 286,
"getsockname" },
409 {
base + 287,
"getpeername" },
410 {
base + 288,
"socketpair" },
411 {
base + 289,
"send" },
412 {
base + 290,
"sendto" },
413 {
base + 291,
"recv" },
414 {
base + 292,
"recvfrom" },
415 {
base + 293,
"shutdown" },
416 {
base + 294,
"setsockopt" },
417 {
base + 295,
"getsockopt" },
418 {
base + 296,
"sendmsg" },
419 {
base + 297,
"rcvmsg" },
420 {
base + 298,
"semop" },
421 {
base + 299,
"semget" },
422 {
base + 300,
"semctl" },
423 {
base + 301,
"msgsend" },
424 {
base + 302,
"msgrcv" },
425 {
base + 303,
"msgget" },
426 {
base + 304,
"msgctl" },
427 {
base + 305,
"shmat" },
428 {
base + 306,
"shmdt" },
429 {
base + 307,
"shmget" },
430 {
base + 308,
"shmctl" },
431 {
base + 309,
"add_key" },
432 {
base + 310,
"request_key" },
433 {
base + 311,
"keyctl" },
434 {
base + 312,
"semtimedop" },
435 {
base + 314,
"ioprio_set" },
436 {
base + 315,
"ioprio_get" },
437 {
base + 316,
"inotify_init" },
438 {
base + 317,
"inotify_add_watch" },
439 {
base + 318,
"inotify_rm_watch" },
440 {
base + 319,
"mbind" },
441 {
base + 320,
"get_mempolicy" },
442 {
base + 321,
"set_mempolicy" },
443 {
base + 322,
"openat", openatFunc<ArmLinux32> },
444 {
base + 323,
"mkdirat" },
445 {
base + 324,
"mknodat" },
446 {
base + 325,
"fchownat" },
447 {
base + 326,
"futimesat" },
448 {
base + 327,
"fstatat64" },
449 {
base + 328,
"unlinkat" },
450 {
base + 329,
"renameat" },
451 {
base + 330,
"linkat" },
452 {
base + 331,
"symlinkat" },
453 {
base + 332,
"readlinkat" },
454 {
base + 333,
"fchmodat" },
455 {
base + 334,
"faccessat" },
456 {
base + 335,
"pselect6" },
457 {
base + 336,
"ppoll" },
458 {
base + 337,
"unshare" },
460 {
base + 339,
"get_robust_list" },
461 {
base + 340,
"splice" },
462 {
base + 341,
"arm_sync_file_range" },
463 {
base + 342,
"tee" },
464 {
base + 343,
"vmsplice" },
465 {
base + 344,
"move_pages" },
467 {
base + 346,
"epoll_pwait" },
468 {
base + 347,
"sys_kexec_load" },
469 {
base + 348,
"sys_utimensat" },
470 {
base + 349,
"sys_signalfd" },
471 {
base + 350,
"sys_timerfd_create" },
472 {
base + 351,
"sys_eventfd" },
473 {
base + 352,
"sys_fallocate" },
474 {
base + 353,
"sys_timerfd_settime" },
475 {
base + 354,
"sys_timerfd_gettime" },
476 {
base + 355,
"sys_signalfd4" },
477 {
base + 356,
"sys_eventfd2" },
478 {
base + 357,
"sys_epoll_create1" },
479 {
base + 358,
"sys_dup3" },
480 {
base + 359,
"sys_pipe2" },
481 {
base + 360,
"sys_inotify_init1" },
482 {
base + 361,
"sys_preadv" },
483 {
base + 362,
"sys_pwritev" },
484 {
base + 363,
"sys_rt_tgsigqueueinfo" },
485 {
base + 364,
"sys_perf_event_open" },
486 {
base + 365,
"sys_recvmmsg" },
497 {
base + 0,
"io_setup" },
498 {
base + 1,
"io_destroy" },
499 {
base + 2,
"io_submit" },
500 {
base + 3,
"io_cancel" },
501 {
base + 4,
"io_getevents" },
502 {
base + 5,
"setxattr" },
503 {
base + 6,
"lsetxattr" },
504 {
base + 7,
"fsetxattr" },
505 {
base + 8,
"getxattr" },
506 {
base + 9,
"lgetxattr" },
507 {
base + 10,
"fgetxattr" },
508 {
base + 11,
"listxattr" },
509 {
base + 12,
"llistxattr" },
510 {
base + 13,
"flistxattr" },
511 {
base + 14,
"removexattr" },
512 {
base + 15,
"lremovexattr" },
513 {
base + 16,
"fremovexattr" },
515 {
base + 18,
"lookup_dcookie" },
516 {
base + 19,
"eventfd2" },
517 {
base + 20,
"epoll_create1" },
518 {
base + 21,
"epoll_ctl" },
519 {
base + 22,
"epoll_pwait" },
521 {
base + 24,
"dup3" },
523 {
base + 26,
"inotify_init1" },
524 {
base + 27,
"inotify_add_watch" },
525 {
base + 28,
"inotify_rm_watch" },
526 {
base + 29,
"ioctl", ioctlFunc<ArmLinux64> },
527 {
base + 30,
"ioprio_set" },
528 {
base + 31,
"ioprio_get" },
529 {
base + 32,
"flock" },
530 {
base + 33,
"mknodat" },
531 {
base + 34,
"mkdirat" },
532 {
base + 35,
"unlinkat", unlinkatFunc<ArmLinux64> },
533 {
base + 36,
"symlinkat" },
534 {
base + 37,
"linkat" },
535 {
base + 38,
"renameat", renameatFunc<ArmLinux64> },
536 {
base + 39,
"umount2" },
537 {
base + 40,
"mount" },
538 {
base + 41,
"pivot_root" },
539 {
base + 42,
"nfsservctl" },
540 {
base + 43,
"statfs64" },
541 {
base + 44,
"fstatfs64" },
542 {
base + 45,
"truncate64" },
544 {
base + 47,
"fallocate" },
545 {
base + 48,
"faccessat", faccessatFunc<ArmLinux64> },
546 {
base + 49,
"chdir" },
547 {
base + 50,
"fchdir" },
548 {
base + 51,
"chroot" },
549 {
base + 52,
"fchmod" },
550 {
base + 53,
"fchmodat" },
551 {
base + 54,
"fchownat" },
552 {
base + 55,
"fchown" },
553 {
base + 56,
"openat", openatFunc<ArmLinux64> },
555 {
base + 58,
"vhangup" },
556 {
base + 59,
"pipe2" },
557 {
base + 60,
"quotactl" },
558 #if defined(SYS_getdents64)
559 {
base + 61,
"getdents64", getdents64Func },
561 {
base + 61,
"getdents64" },
564 {
base + 63,
"read", readFunc<ArmLinux64> },
565 {
base + 64,
"write", writeFunc<ArmLinux64> },
566 {
base + 65,
"readv" },
567 {
base + 66,
"writev", writevFunc<ArmLinux64> },
568 {
base + 67,
"pread64" },
569 {
base + 68,
"pwrite64" },
570 {
base + 69,
"preadv" },
571 {
base + 70,
"pwritev" },
572 {
base + 71,
"sendfile64" },
573 {
base + 72,
"pselect6" },
574 {
base + 73,
"ppoll" },
575 {
base + 74,
"signalfd4" },
576 {
base + 75,
"vmsplice" },
577 {
base + 76,
"splice" },
578 {
base + 77,
"tee" },
579 {
base + 78,
"readlinkat", readlinkatFunc<ArmLinux64> },
580 {
base + 79,
"fstatat64", fstatat64Func<ArmLinux64> },
581 {
base + 80,
"fstat64", fstat64Func<ArmLinux64> },
582 {
base + 81,
"sync" },
583 {
base + 82,
"fsync" },
584 {
base + 83,
"fdatasync" },
585 {
base + 84,
"sync_file_range" },
586 {
base + 85,
"timerfd_create" },
587 {
base + 86,
"timerfd_settime" },
588 {
base + 87,
"timerfd_gettime" },
589 {
base + 88,
"utimensat" },
590 {
base + 89,
"acct" },
591 {
base + 90,
"capget" },
592 {
base + 91,
"capset" },
593 {
base + 92,
"personality" },
596 {
base + 95,
"waitid" },
598 {
base + 97,
"unshare" },
599 {
base + 98,
"futex", futexFunc<ArmLinux64> },
601 {
base + 100,
"get_robust_list" },
603 {
base + 102,
"getitimer" },
604 {
base + 103,
"setitimer" },
605 {
base + 104,
"kexec_load" },
606 {
base + 105,
"init_module" },
607 {
base + 106,
"delete_module" },
608 {
base + 107,
"timer_create" },
609 {
base + 108,
"timer_gettime" },
610 {
base + 109,
"timer_getoverrun" },
611 {
base + 110,
"timer_settime" },
612 {
base + 111,
"timer_delete" },
613 {
base + 112,
"clock_settime" },
614 {
base + 113,
"clock_gettime", clock_gettimeFunc<ArmLinux64> },
615 {
base + 114,
"clock_getres" },
616 {
base + 115,
"clock_nanosleep" },
617 {
base + 116,
"syslog" },
618 {
base + 117,
"ptrace" },
629 {
base + 128,
"restart_syscall" },
631 {
base + 130,
"tkill" },
632 {
base + 131,
"tgkill", tgkillFunc<ArmLinux64> },
633 {
base + 132,
"sigaltstack" },
634 {
base + 133,
"rt_sigsuspend" },
637 {
base + 136,
"rt_sigpending" },
638 {
base + 137,
"rt_sigtimedwait" },
640 {
base + 139,
"rt_sigreturn" },
641 {
base + 140,
"setpriority" },
642 {
base + 141,
"getpriority" },
643 {
base + 142,
"reboot" },
644 {
base + 143,
"setregid" },
645 {
base + 144,
"setgid" },
646 {
base + 145,
"setreuid" },
647 {
base + 146,
"setuid" },
648 {
base + 147,
"setresuid" },
649 {
base + 148,
"getresuid" },
650 {
base + 149,
"setresgid" },
651 {
base + 150,
"getresgid" },
652 {
base + 151,
"setfsuid" },
653 {
base + 152,
"setfsgid" },
654 {
base + 153,
"times", timesFunc<ArmLinux64> },
655 {
base + 154,
"setpgid" },
656 {
base + 155,
"getpgid" },
657 {
base + 156,
"getsid" },
658 {
base + 157,
"setsid" },
659 {
base + 158,
"getgroups" },
660 {
base + 159,
"setgroups" },
663 {
base + 162,
"setdomainname" },
664 {
base + 163,
"getrlimit", getrlimitFunc<ArmLinux64> },
666 {
base + 165,
"getrusage", getrusageFunc<ArmLinux64> },
667 {
base + 166,
"umask" },
668 {
base + 167,
"prctl" },
670 {
base + 169,
"gettimeofday", gettimeofdayFunc<ArmLinux64> },
671 {
base + 170,
"settimeofday" },
672 {
base + 171,
"adjtimex" },
680 {
base + 179,
"sysinfo", sysinfoFunc<ArmLinux64> },
681 {
base + 180,
"mq_open" },
682 {
base + 181,
"mq_unlink" },
683 {
base + 182,
"mq_timedsend" },
684 {
base + 183,
"mq_timedreceive" },
685 {
base + 184,
"mq_notify" },
686 {
base + 185,
"mq_getsetattr" },
687 {
base + 186,
"msgget" },
688 {
base + 187,
"msgctl" },
689 {
base + 188,
"msgrcv" },
690 {
base + 189,
"msgsnd" },
691 {
base + 190,
"semget" },
692 {
base + 191,
"semctl" },
693 {
base + 192,
"semtimedop" },
694 {
base + 193,
"semop" },
695 {
base + 194,
"shmget" },
696 {
base + 195,
"shmctl" },
697 {
base + 196,
"shmat" },
698 {
base + 197,
"shmdt" },
699 {
base + 198,
"socket" },
700 {
base + 199,
"socketpair" },
701 {
base + 200,
"bind" },
702 {
base + 201,
"listen" },
703 {
base + 202,
"accept" },
704 {
base + 203,
"connect" },
705 {
base + 204,
"getsockname" },
706 {
base + 205,
"getpeername" },
707 {
base + 206,
"sendto" },
708 {
base + 207,
"recvfrom" },
709 {
base + 208,
"setsockopt" },
710 {
base + 209,
"getsockopt" },
711 {
base + 210,
"shutdown" },
712 {
base + 211,
"sendmsg" },
713 {
base + 212,
"recvmsg" },
714 {
base + 213,
"readahead" },
717 {
base + 216,
"mremap", mremapFunc<ArmLinux64> },
718 {
base + 217,
"add_key" },
719 {
base + 218,
"request_key" },
720 {
base + 219,
"keyctl" },
721 {
base + 220,
"clone", cloneBackwardsFunc<ArmLinux64> },
722 {
base + 221,
"execve", execveFunc<ArmLinux64> },
723 {
base + 222,
"mmap2", mmapFunc<ArmLinux64> },
724 {
base + 223,
"fadvise64_64" },
725 {
base + 224,
"swapon" },
726 {
base + 225,
"swapoff" },
728 {
base + 227,
"msync" },
729 {
base + 228,
"mlock" },
730 {
base + 229,
"munlock" },
731 {
base + 230,
"mlockall" },
732 {
base + 231,
"munlockall" },
733 {
base + 232,
"mincore" },
735 {
base + 234,
"remap_file_pages" },
736 {
base + 235,
"mbind" },
737 {
base + 236,
"get_mempolicy" },
738 {
base + 237,
"set_mempolicy" },
739 {
base + 238,
"migrate_pages" },
740 {
base + 239,
"move_pages" },
741 {
base + 240,
"rt_tgsigqueueinfo" },
742 {
base + 241,
"perf_event_open" },
743 {
base + 242,
"accept4" },
744 {
base + 243,
"recvmmsg" },
745 {
base + 260,
"wait4" },
746 {
base + 261,
"prlimit64", prlimitFunc<ArmLinux64> },
747 {
base + 262,
"fanotify_init" },
748 {
base + 263,
"fanotify_mark" },
749 {
base + 264,
"name_to_handle_at" },
750 {
base + 265,
"open_by_handle_at" },
751 {
base + 266,
"clock_adjtime" },
752 {
base + 267,
"syncfs" },
753 {
base + 268,
"setns" },
754 {
base + 269,
"sendmmsg" },
755 {
base + 270,
"process_vm_readv" },
756 {
base + 271,
"process_vm_writev" },
757 {
base + 1024,
"open", openFunc<ArmLinux64> },
758 {
base + 1025,
"link" },
760 {
base + 1027,
"mknod" },
761 {
base + 1028,
"chmod", chmodFunc<ArmLinux64> },
762 {
base + 1029,
"chown" },
764 {
base + 1031,
"rmdir" },
765 {
base + 1032,
"lchown" },
769 {
base + 1036,
"symlink" },
770 {
base + 1037,
"utimes" },
771 {
base + 1038,
"stat64", stat64Func<ArmLinux64> },
772 {
base + 1039,
"lstat64", lstat64Func<ArmLinux64> },
774 {
base + 1041,
"dup2" },
775 {
base + 1042,
"epoll_create" },
776 {
base + 1043,
"inotify_init" },
777 {
base + 1044,
"eventfd" },
778 {
base + 1045,
"signalfd" },
779 {
base + 1046,
"sendfile" },
782 {
base + 1049,
"stat", statFunc<ArmLinux64> },
783 {
base + 1050,
"lstat" },
784 {
base + 1051,
"fstat", fstatFunc<ArmLinux64> },
786 {
base + 1053,
"fadvise64" },
787 {
base + 1054,
"newfstatat" },
788 {
base + 1055,
"fstatfs" },
789 {
base + 1056,
"statfs" },
791 {
base + 1058,
"mmap", mmapFunc<ArmLinux64> },
792 {
base + 1059,
"alarm" },
793 {
base + 1060,
"getpgrp" },
794 {
base + 1061,
"pause" },
795 {
base + 1062,
"time", timeFunc<ArmLinux64> },
796 {
base + 1063,
"utime" },
797 {
base + 1064,
"creat" },
798 #if defined(SYS_getdents)
799 {
base + 1065,
"getdents", getdentsFunc },
801 {
base + 1065,
"getdents" },
803 {
base + 1066,
"futimesat" },
804 {
base + 1067,
"select" },
805 {
base + 1068,
"poll" },
806 {
base + 1069,
"epoll_wait" },
807 {
base + 1070,
"ustat" },
808 {
base + 1071,
"vfork" },
809 {
base + 1072,
"oldwait4" },
810 {
base + 1073,
"recv" },
811 {
base + 1074,
"send" },
812 {
base + 1075,
"bdflush" },
813 {
base + 1076,
"umount" },
814 {
base + 1077,
"uselib" },
815 {
base + 1078,
"_sysctl" },
816 {
base + 1079,
"fork" }
824 { 0xf0001,
"breakpoint" },
825 { 0xf0002,
"cacheflush" },
826 { 0xf0003,
"usr26" },
827 { 0xf0004,
"usr32" },
833 { 0x1002,
"cacheflush" },
843 process->Process::syscall(tc);
#define fatal(...)
This implements a cprintf based fatal() function.
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 mkdirFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, mode_t mode)
Target mkdir() 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.
SyscallReturn getegidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getegid() handler.
static SyscallTable64 syscallDescs64High(0x900000)
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.
static SyscallReturn setTLSFunc64(SyscallDesc *desc, ThreadContext *tc, uint32_t tlsPtr)
SyscallReturn accessFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, mode_t mode)
Target access() handler.
static SyscallReturn setTLSFunc32(SyscallDesc *desc, ThreadContext *tc, uint32_t tlsPtr)
Target set_tls() 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.
void writeBlob(Addr addr, const void *p, int size) const
Same as tryWriteBlob, but insists on success.
static SyscallTable64 syscallDescs64Low(0)
SyscallReturn getpidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getpid() handler.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
A process with emulated Arm/Linux syscalls.
static SyscallTable32 syscallDescs32High(0x900000)
SyscallReturn getppidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getppid() handler.
SyscallReturn ftruncate64Func(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int64_t length)
Target ftruncate64() handler.
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 setTidAddressFunc(SyscallDesc *desc, ThreadContext *tc, uint64_t tidPtr)
Target set_tid_address() handler.
static SyscallDescTable< EmuLinux::SyscallABI64 > privSyscallDescs64
void doSyscall(ThreadContext *tc)
Interface for invoking the system call funcion pointer.
SyscallReturn truncateFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, off_t length)
Target truncate() handler.
virtual PortProxy & getVirtProxy()=0
SyscallReturn fcntlFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd, GuestABI::VarArgs< int > varargs)
Target fcntl() handler.
static SyscallTable32 syscallDescs32Low(0)
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.
virtual Process * load(const ProcessParams ¶ms, ::Loader::ObjectFile *obj_file)=0
Each subclass needs to implement this method.
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
SyscallReturn getcwdFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> buf_ptr, unsigned long size)
Target getcwd() handler.
static const Addr commPage
A page to hold "kernel" provided functions. The name might be wrong.
static SyscallReturn unameFunc32(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
SyscallReturn fcntl64Func(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd)
Target fcntl64() handler.
static SyscallReturn unameFunc64(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
static SyscallDescTable< EmuLinux::SyscallABI32 > privSyscallDescs32
SyscallDesc * get(int num, bool fatal_if_missing=true)
A process with emulated Arm/Linux syscalls.
virtual RegVal readIntReg(RegIndex reg_idx) const =0
void syscall(ThreadContext *tc) override
SyscallReturn getgidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getgid() handler.
SyscallReturn pipePseudoFunc(SyscallDesc *desc, ThreadContext *tc)
Pseudo Funcs - These functions use a different return convension, returning a second value in a regis...
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)
Generated on Tue Jun 22 2021 15:28:20 for gem5 by doxygen 1.8.17