Go to the documentation of this file.
44 #include <sys/syscall.h>
69 auto arch = obj_file->
getArch();
78 warn(
"Unknown operating system; assuming Linux.");
83 fatal(
"gem5 does not support ARM OABI binaries. Please recompile "
84 "with an EABI compiler.");
97 ArmLinuxObjectFileLoader loader;
107 strcpy(
name->sysname,
"Linux");
108 strcpy(
name->nodename,
"m5.eecs.umich.edu");
109 strcpy(
name->release, process->release.c_str());
110 strcpy(
name->version,
"#1 SMP Sat Dec 1 00:00:00 GMT 2012");
111 strcpy(
name->machine,
"armv7l");
122 strcpy(
name->sysname,
"Linux");
123 strcpy(
name->nodename,
"gem5");
124 strcpy(
name->release, process->release.c_str());
125 strcpy(
name->version,
"#1 SMP Sat Dec 1 00:00:00 GMT 2012");
126 strcpy(
name->machine,
"armv8l");
136 &tlsPtr,
sizeof(tlsPtr));
155 {
base + 0,
"syscall" },
157 {
base + 2,
"fork" },
158 {
base + 3,
"read", readFunc<ArmLinux32> },
159 {
base + 4,
"write", writeFunc<ArmLinux32> },
160 {
base + 5,
"open", openFunc<ArmLinux32> },
162 {
base + 8,
"creat" },
163 {
base + 9,
"link" },
165 {
base + 11,
"execve", execveFunc<ArmLinux32> },
166 {
base + 12,
"chdir" },
167 {
base + 13,
"time", timeFunc<ArmLinux32> },
168 {
base + 14,
"mknod" },
169 {
base + 15,
"chmod", chmodFunc<ArmLinux32> },
173 {
base + 21,
"mount" },
174 {
base + 22,
"umount" },
177 {
base + 25,
"stime" },
178 {
base + 26,
"ptrace" },
179 {
base + 27,
"alarm" },
180 {
base + 29,
"pause" },
181 {
base + 30,
"utime" },
183 {
base + 34,
"nice" },
184 {
base + 36,
"sync" },
188 {
base + 40,
"rmdir" },
191 {
base + 43,
"times", timesFunc<ArmLinux32> },
193 {
base + 46,
"setgid" },
197 {
base + 51,
"acct" },
198 {
base + 52,
"umount2" },
199 {
base + 54,
"ioctl", ioctlFunc<ArmLinux32> },
201 {
base + 57,
"setpgid" },
203 {
base + 61,
"chroot" },
204 {
base + 62,
"ustat" },
205 {
base + 63,
"dup2" },
207 {
base + 65,
"getpgrp" },
208 {
base + 66,
"setsid" },
209 {
base + 67,
"sigaction" },
210 {
base + 70,
"setreuid" },
211 {
base + 71,
"setregid" },
212 {
base + 72,
"sigsuspend" },
213 {
base + 73,
"sigpending" },
216 {
base + 76,
"getrlimit", getrlimitFunc<ArmLinux32> },
217 {
base + 77,
"getrusage", getrusageFunc<ArmLinux32> },
218 {
base + 78,
"gettimeofday", gettimeofdayFunc<ArmLinux32> },
219 {
base + 79,
"settimeofday" },
220 {
base + 80,
"getgroups" },
221 {
base + 81,
"setgroups" },
222 {
base + 82,
"reserved#82" },
223 {
base + 83,
"symlink" },
225 {
base + 86,
"uselib" },
226 {
base + 87,
"swapon" },
227 {
base + 88,
"reboot" },
228 {
base + 89,
"readdir" },
229 {
base + 90,
"mmap", mmapFunc<ArmLinux32> },
233 {
base + 94,
"fchmod" },
234 {
base + 95,
"fchown" },
235 {
base + 96,
"getpriority" },
236 {
base + 97,
"setpriority" },
237 {
base + 99,
"statfs" },
238 {
base + 100,
"fstatfs" },
239 {
base + 102,
"socketcall" },
240 {
base + 103,
"syslog" },
241 {
base + 104,
"setitimer" },
242 {
base + 105,
"getitimer" },
243 {
base + 106,
"stat", statFunc<ArmLinux32> },
244 {
base + 107,
"lstat" },
245 {
base + 108,
"fstat", fstatFunc<ArmLinux32> },
246 {
base + 111,
"vhangup" },
247 {
base + 113,
"syscall" },
248 {
base + 114,
"wait4" },
249 {
base + 115,
"swapoff" },
250 {
base + 116,
"sysinfo", sysinfoFunc<ArmLinux32> },
251 {
base + 117,
"ipc" },
252 {
base + 118,
"fsync" },
253 {
base + 119,
"sigreturn" },
254 {
base + 120,
"clone", cloneBackwardsFunc<ArmLinux32> },
255 {
base + 121,
"setdomainname" },
257 {
base + 124,
"adjtimex" },
260 {
base + 128,
"init_module" },
261 {
base + 129,
"delete_module" },
262 {
base + 131,
"quotactl" },
263 {
base + 132,
"getpgid" },
264 {
base + 133,
"fchdir" },
265 {
base + 134,
"bdflush" },
266 {
base + 135,
"sysfs" },
267 {
base + 136,
"personality" },
268 {
base + 137,
"reserved#138" },
269 {
base + 138,
"setfsuid" },
270 {
base + 139,
"setfsgid" },
272 #if defined(SYS_getdents)
273 {
base + 141,
"getdents", getdentsFunc },
275 {
base + 141,
"getdents" },
277 {
base + 142,
"newselect" },
278 {
base + 143,
"flock" },
279 {
base + 144,
"msync" },
280 {
base + 145,
"readv" },
281 {
base + 146,
"writev", writevFunc<ArmLinux32> },
282 {
base + 147,
"getsid" },
283 {
base + 148,
"fdatasync" },
284 {
base + 149,
"sysctl" },
285 {
base + 150,
"mlock" },
286 {
base + 151,
"munlock" },
287 {
base + 152,
"mlockall" },
288 {
base + 153,
"munlockall" },
298 {
base + 163,
"mremap", mremapFunc<ArmLinux32> },
299 {
base + 164,
"setresuid" },
300 {
base + 165,
"getresuid" },
301 {
base + 168,
"poll" },
302 {
base + 169,
"nfsservctl" },
303 {
base + 170,
"setresgid" },
304 {
base + 171,
"getresgid" },
305 {
base + 172,
"prctl" },
306 {
base + 173,
"rt_sigreturn" },
309 {
base + 176,
"rt_sigpending" },
310 {
base + 177,
"rt_sigtimedwait" },
312 {
base + 179,
"rt_sigsuspend" },
313 {
base + 180,
"pread64" },
314 {
base + 181,
"pwrite64" },
315 {
base + 182,
"chown" },
317 {
base + 184,
"capget" },
318 {
base + 185,
"capset" },
319 {
base + 186,
"sigaltstack" },
320 {
base + 187,
"sendfile" },
321 {
base + 190,
"vfork" },
322 {
base + 191,
"getrlimit", getrlimitFunc<ArmLinux32> },
323 {
base + 192,
"mmap2", mmapFunc<ArmLinux32> },
324 {
base + 193,
"truncate64" },
326 {
base + 195,
"stat64", stat64Func<ArmLinux32> },
327 {
base + 196,
"lstat64", lstat64Func<ArmLinux32> },
328 {
base + 197,
"fstat64", fstat64Func<ArmLinux32> },
329 {
base + 198,
"lchown" },
334 {
base + 203,
"setreuid" },
335 {
base + 204,
"setregid" },
336 {
base + 205,
"getgroups" },
337 {
base + 206,
"setgroups" },
338 {
base + 207,
"fchown" },
339 {
base + 208,
"setresuid" },
340 {
base + 209,
"getresuid" },
341 {
base + 210,
"setresgid" },
342 {
base + 211,
"getresgid" },
343 {
base + 212,
"chown" },
344 {
base + 213,
"setuid" },
345 {
base + 214,
"setgid" },
346 {
base + 215,
"setfsuid" },
347 {
base + 216,
"setfsgid" },
348 #if defined(SYS_getdents64)
349 {
base + 217,
"getdents64", getdents64Func },
351 {
base + 217,
"getdents64" },
353 {
base + 218,
"pivot_root" },
354 {
base + 219,
"mincore" },
358 {
base + 225,
"readahead" },
359 {
base + 226,
"setxattr" },
360 {
base + 227,
"lsetxattr" },
361 {
base + 228,
"fsetxattr" },
362 {
base + 229,
"getxattr" },
363 {
base + 230,
"lgetxattr" },
364 {
base + 231,
"fgetxattr" },
365 {
base + 232,
"listxattr" },
366 {
base + 233,
"llistxattr" },
367 {
base + 234,
"flistxattr" },
368 {
base + 235,
"removexattr" },
369 {
base + 236,
"lremovexattr" },
370 {
base + 237,
"fremovexattr" },
371 {
base + 238,
"tkill" },
372 {
base + 239,
"sendfile64" },
373 {
base + 240,
"futex", futexFunc<ArmLinux32> },
376 {
base + 243,
"io_setup" },
377 {
base + 244,
"io_destroy" },
378 {
base + 245,
"io_getevents" },
379 {
base + 246,
"io_submit" },
380 {
base + 247,
"io_cancel" },
382 {
base + 249,
"lookup_dcookie" },
383 {
base + 250,
"epoll_create" },
384 {
base + 251,
"epoll_ctl" },
385 {
base + 252,
"epoll_wait" },
386 {
base + 253,
"remap_file_pages" },
388 {
base + 257,
"timer_create" },
389 {
base + 258,
"timer_settime" },
390 {
base + 259,
"timer_gettime" },
391 {
base + 260,
"timer_getoverrun" },
392 {
base + 261,
"timer_delete" },
393 {
base + 262,
"clock_settime" },
394 {
base + 263,
"clock_gettime", clock_gettimeFunc<ArmLinux32> },
395 {
base + 264,
"clock_getres", clock_getresFunc<ArmLinux32> },
396 {
base + 265,
"clock_nanosleep" },
397 {
base + 266,
"statfs64" },
398 {
base + 267,
"fstatfs64" },
399 {
base + 268,
"tgkill", tgkillFunc<ArmLinux32> },
400 {
base + 269,
"utimes" },
401 {
base + 270,
"arm_fadvise64_64" },
402 {
base + 271,
"pciconfig_iobase" },
403 {
base + 272,
"pciconfig_read" },
404 {
base + 273,
"pciconfig_write" },
405 {
base + 274,
"mq_open" },
406 {
base + 275,
"mq_unlink" },
407 {
base + 276,
"mq_timedsend" },
408 {
base + 277,
"mq_timedreceive" },
409 {
base + 278,
"mq_notify" },
410 {
base + 279,
"mq_getsetattr" },
411 {
base + 280,
"waitid" },
412 {
base + 281,
"socket" },
413 {
base + 282,
"bind" },
414 {
base + 283,
"connect" },
415 {
base + 284,
"listen" },
416 {
base + 285,
"accept" },
417 {
base + 286,
"getsockname" },
418 {
base + 287,
"getpeername" },
419 {
base + 288,
"socketpair" },
420 {
base + 289,
"send" },
421 {
base + 290,
"sendto" },
422 {
base + 291,
"recv" },
423 {
base + 292,
"recvfrom" },
424 {
base + 293,
"shutdown" },
425 {
base + 294,
"setsockopt" },
426 {
base + 295,
"getsockopt" },
427 {
base + 296,
"sendmsg" },
428 {
base + 297,
"rcvmsg" },
429 {
base + 298,
"semop" },
430 {
base + 299,
"semget" },
431 {
base + 300,
"semctl" },
432 {
base + 301,
"msgsend" },
433 {
base + 302,
"msgrcv" },
434 {
base + 303,
"msgget" },
435 {
base + 304,
"msgctl" },
436 {
base + 305,
"shmat" },
437 {
base + 306,
"shmdt" },
438 {
base + 307,
"shmget" },
439 {
base + 308,
"shmctl" },
440 {
base + 309,
"add_key" },
441 {
base + 310,
"request_key" },
442 {
base + 311,
"keyctl" },
443 {
base + 312,
"semtimedop" },
444 {
base + 314,
"ioprio_set" },
445 {
base + 315,
"ioprio_get" },
446 {
base + 316,
"inotify_init" },
447 {
base + 317,
"inotify_add_watch" },
448 {
base + 318,
"inotify_rm_watch" },
449 {
base + 319,
"mbind" },
450 {
base + 320,
"get_mempolicy" },
451 {
base + 321,
"set_mempolicy" },
452 {
base + 322,
"openat", openatFunc<ArmLinux32> },
453 {
base + 323,
"mkdirat" },
454 {
base + 324,
"mknodat" },
455 {
base + 325,
"fchownat" },
456 {
base + 326,
"futimesat" },
457 {
base + 327,
"fstatat64" },
458 {
base + 328,
"unlinkat" },
459 {
base + 329,
"renameat" },
460 {
base + 330,
"linkat" },
461 {
base + 331,
"symlinkat" },
462 {
base + 332,
"readlinkat" },
463 {
base + 333,
"fchmodat" },
464 {
base + 334,
"faccessat" },
465 {
base + 335,
"pselect6" },
466 {
base + 336,
"ppoll" },
467 {
base + 337,
"unshare" },
469 {
base + 339,
"get_robust_list" },
470 {
base + 340,
"splice" },
471 {
base + 341,
"arm_sync_file_range" },
472 {
base + 342,
"tee" },
473 {
base + 343,
"vmsplice" },
474 {
base + 344,
"move_pages" },
476 {
base + 346,
"epoll_pwait" },
477 {
base + 347,
"sys_kexec_load" },
478 {
base + 348,
"sys_utimensat" },
479 {
base + 349,
"sys_signalfd" },
480 {
base + 350,
"sys_timerfd_create" },
481 {
base + 351,
"sys_eventfd" },
482 {
base + 352,
"sys_fallocate" },
483 {
base + 353,
"sys_timerfd_settime" },
484 {
base + 354,
"sys_timerfd_gettime" },
485 {
base + 355,
"sys_signalfd4" },
486 {
base + 356,
"sys_eventfd2" },
487 {
base + 357,
"sys_epoll_create1" },
488 {
base + 358,
"sys_dup3" },
489 {
base + 359,
"sys_pipe2" },
490 {
base + 360,
"sys_inotify_init1" },
491 {
base + 361,
"sys_preadv" },
492 {
base + 362,
"sys_pwritev" },
493 {
base + 363,
"sys_rt_tgsigqueueinfo" },
494 {
base + 364,
"sys_perf_event_open" },
495 {
base + 365,
"sys_recvmmsg" },
508 {
base + 0,
"io_setup" },
509 {
base + 1,
"io_destroy" },
510 {
base + 2,
"io_submit" },
511 {
base + 3,
"io_cancel" },
512 {
base + 4,
"io_getevents" },
513 {
base + 5,
"setxattr" },
514 {
base + 6,
"lsetxattr" },
515 {
base + 7,
"fsetxattr" },
516 {
base + 8,
"getxattr" },
517 {
base + 9,
"lgetxattr" },
518 {
base + 10,
"fgetxattr" },
519 {
base + 11,
"listxattr" },
520 {
base + 12,
"llistxattr" },
521 {
base + 13,
"flistxattr" },
522 {
base + 14,
"removexattr" },
523 {
base + 15,
"lremovexattr" },
524 {
base + 16,
"fremovexattr" },
526 {
base + 18,
"lookup_dcookie" },
527 {
base + 19,
"eventfd2" },
528 {
base + 20,
"epoll_create1" },
529 {
base + 21,
"epoll_ctl" },
530 {
base + 22,
"epoll_pwait" },
532 {
base + 24,
"dup3" },
534 {
base + 26,
"inotify_init1" },
535 {
base + 27,
"inotify_add_watch" },
536 {
base + 28,
"inotify_rm_watch" },
537 {
base + 29,
"ioctl", ioctlFunc<ArmLinux64> },
538 {
base + 30,
"ioprio_set" },
539 {
base + 31,
"ioprio_get" },
540 {
base + 32,
"flock" },
541 {
base + 33,
"mknodat" },
542 {
base + 34,
"mkdirat" },
543 {
base + 35,
"unlinkat", unlinkatFunc<ArmLinux64> },
544 {
base + 36,
"symlinkat" },
545 {
base + 37,
"linkat" },
546 {
base + 38,
"renameat", renameatFunc<ArmLinux64> },
547 {
base + 39,
"umount2" },
548 {
base + 40,
"mount" },
549 {
base + 41,
"pivot_root" },
550 {
base + 42,
"nfsservctl" },
551 {
base + 43,
"statfs64" },
552 {
base + 44,
"fstatfs64" },
553 {
base + 45,
"truncate64" },
555 {
base + 47,
"fallocate" },
556 {
base + 48,
"faccessat", faccessatFunc<ArmLinux64> },
557 {
base + 49,
"chdir" },
558 {
base + 50,
"fchdir" },
559 {
base + 51,
"chroot" },
560 {
base + 52,
"fchmod" },
561 {
base + 53,
"fchmodat" },
562 {
base + 54,
"fchownat" },
563 {
base + 55,
"fchown" },
564 {
base + 56,
"openat", openatFunc<ArmLinux64> },
566 {
base + 58,
"vhangup" },
567 {
base + 59,
"pipe2" },
568 {
base + 60,
"quotactl" },
569 #if defined(SYS_getdents64)
570 {
base + 61,
"getdents64", getdents64Func },
572 {
base + 61,
"getdents64" },
575 {
base + 63,
"read", readFunc<ArmLinux64> },
576 {
base + 64,
"write", writeFunc<ArmLinux64> },
577 {
base + 65,
"readv" },
578 {
base + 66,
"writev", writevFunc<ArmLinux64> },
579 {
base + 67,
"pread64" },
580 {
base + 68,
"pwrite64" },
581 {
base + 69,
"preadv" },
582 {
base + 70,
"pwritev" },
583 {
base + 71,
"sendfile64" },
584 {
base + 72,
"pselect6" },
585 {
base + 73,
"ppoll" },
586 {
base + 74,
"signalfd4" },
587 {
base + 75,
"vmsplice" },
588 {
base + 76,
"splice" },
589 {
base + 77,
"tee" },
590 {
base + 78,
"readlinkat", readlinkatFunc<ArmLinux64> },
591 {
base + 79,
"fstatat64", fstatat64Func<ArmLinux64> },
592 {
base + 80,
"fstat64", fstat64Func<ArmLinux64> },
593 {
base + 81,
"sync" },
594 {
base + 82,
"fsync" },
595 {
base + 83,
"fdatasync" },
596 {
base + 84,
"sync_file_range" },
597 {
base + 85,
"timerfd_create" },
598 {
base + 86,
"timerfd_settime" },
599 {
base + 87,
"timerfd_gettime" },
600 {
base + 88,
"utimensat" },
601 {
base + 89,
"acct" },
602 {
base + 90,
"capget" },
603 {
base + 91,
"capset" },
604 {
base + 92,
"personality" },
607 {
base + 95,
"waitid" },
609 {
base + 97,
"unshare" },
610 {
base + 98,
"futex", futexFunc<ArmLinux64> },
612 {
base + 100,
"get_robust_list" },
614 {
base + 102,
"getitimer" },
615 {
base + 103,
"setitimer" },
616 {
base + 104,
"kexec_load" },
617 {
base + 105,
"init_module" },
618 {
base + 106,
"delete_module" },
619 {
base + 107,
"timer_create" },
620 {
base + 108,
"timer_gettime" },
621 {
base + 109,
"timer_getoverrun" },
622 {
base + 110,
"timer_settime" },
623 {
base + 111,
"timer_delete" },
624 {
base + 112,
"clock_settime" },
625 {
base + 113,
"clock_gettime", clock_gettimeFunc<ArmLinux64> },
626 {
base + 114,
"clock_getres" },
627 {
base + 115,
"clock_nanosleep" },
628 {
base + 116,
"syslog" },
629 {
base + 117,
"ptrace" },
640 {
base + 128,
"restart_syscall" },
642 {
base + 130,
"tkill" },
643 {
base + 131,
"tgkill", tgkillFunc<ArmLinux64> },
644 {
base + 132,
"sigaltstack" },
645 {
base + 133,
"rt_sigsuspend" },
648 {
base + 136,
"rt_sigpending" },
649 {
base + 137,
"rt_sigtimedwait" },
651 {
base + 139,
"rt_sigreturn" },
652 {
base + 140,
"setpriority" },
653 {
base + 141,
"getpriority" },
654 {
base + 142,
"reboot" },
655 {
base + 143,
"setregid" },
656 {
base + 144,
"setgid" },
657 {
base + 145,
"setreuid" },
658 {
base + 146,
"setuid" },
659 {
base + 147,
"setresuid" },
660 {
base + 148,
"getresuid" },
661 {
base + 149,
"setresgid" },
662 {
base + 150,
"getresgid" },
663 {
base + 151,
"setfsuid" },
664 {
base + 152,
"setfsgid" },
665 {
base + 153,
"times", timesFunc<ArmLinux64> },
666 {
base + 154,
"setpgid" },
667 {
base + 155,
"getpgid" },
668 {
base + 156,
"getsid" },
669 {
base + 157,
"setsid" },
670 {
base + 158,
"getgroups" },
671 {
base + 159,
"setgroups" },
674 {
base + 162,
"setdomainname" },
675 {
base + 163,
"getrlimit", getrlimitFunc<ArmLinux64> },
677 {
base + 165,
"getrusage", getrusageFunc<ArmLinux64> },
678 {
base + 166,
"umask" },
679 {
base + 167,
"prctl" },
681 {
base + 169,
"gettimeofday", gettimeofdayFunc<ArmLinux64> },
682 {
base + 170,
"settimeofday" },
683 {
base + 171,
"adjtimex" },
691 {
base + 179,
"sysinfo", sysinfoFunc<ArmLinux64> },
692 {
base + 180,
"mq_open" },
693 {
base + 181,
"mq_unlink" },
694 {
base + 182,
"mq_timedsend" },
695 {
base + 183,
"mq_timedreceive" },
696 {
base + 184,
"mq_notify" },
697 {
base + 185,
"mq_getsetattr" },
698 {
base + 186,
"msgget" },
699 {
base + 187,
"msgctl" },
700 {
base + 188,
"msgrcv" },
701 {
base + 189,
"msgsnd" },
702 {
base + 190,
"semget" },
703 {
base + 191,
"semctl" },
704 {
base + 192,
"semtimedop" },
705 {
base + 193,
"semop" },
706 {
base + 194,
"shmget" },
707 {
base + 195,
"shmctl" },
708 {
base + 196,
"shmat" },
709 {
base + 197,
"shmdt" },
710 {
base + 198,
"socket" },
711 {
base + 199,
"socketpair" },
712 {
base + 200,
"bind" },
713 {
base + 201,
"listen" },
714 {
base + 202,
"accept" },
715 {
base + 203,
"connect" },
716 {
base + 204,
"getsockname" },
717 {
base + 205,
"getpeername" },
718 {
base + 206,
"sendto" },
719 {
base + 207,
"recvfrom" },
720 {
base + 208,
"setsockopt" },
721 {
base + 209,
"getsockopt" },
722 {
base + 210,
"shutdown" },
723 {
base + 211,
"sendmsg" },
724 {
base + 212,
"recvmsg" },
725 {
base + 213,
"readahead" },
728 {
base + 216,
"mremap", mremapFunc<ArmLinux64> },
729 {
base + 217,
"add_key" },
730 {
base + 218,
"request_key" },
731 {
base + 219,
"keyctl" },
732 {
base + 220,
"clone", cloneBackwardsFunc<ArmLinux64> },
733 {
base + 221,
"execve", execveFunc<ArmLinux64> },
734 {
base + 222,
"mmap2", mmapFunc<ArmLinux64> },
735 {
base + 223,
"fadvise64_64" },
736 {
base + 224,
"swapon" },
737 {
base + 225,
"swapoff" },
739 {
base + 227,
"msync" },
740 {
base + 228,
"mlock" },
741 {
base + 229,
"munlock" },
742 {
base + 230,
"mlockall" },
743 {
base + 231,
"munlockall" },
744 {
base + 232,
"mincore" },
746 {
base + 234,
"remap_file_pages" },
747 {
base + 235,
"mbind" },
748 {
base + 236,
"get_mempolicy" },
749 {
base + 237,
"set_mempolicy" },
750 {
base + 238,
"migrate_pages" },
751 {
base + 239,
"move_pages" },
752 {
base + 240,
"rt_tgsigqueueinfo" },
753 {
base + 241,
"perf_event_open" },
754 {
base + 242,
"accept4" },
755 {
base + 243,
"recvmmsg" },
756 {
base + 260,
"wait4" },
757 {
base + 261,
"prlimit64", prlimitFunc<ArmLinux64> },
758 {
base + 262,
"fanotify_init" },
759 {
base + 263,
"fanotify_mark" },
760 {
base + 264,
"name_to_handle_at" },
761 {
base + 265,
"open_by_handle_at" },
762 {
base + 266,
"clock_adjtime" },
763 {
base + 267,
"syncfs" },
764 {
base + 268,
"setns" },
765 {
base + 269,
"sendmmsg" },
766 {
base + 270,
"process_vm_readv" },
767 {
base + 271,
"process_vm_writev" },
768 {
base + 1024,
"open", openFunc<ArmLinux64> },
769 {
base + 1025,
"link" },
771 {
base + 1027,
"mknod" },
772 {
base + 1028,
"chmod", chmodFunc<ArmLinux64> },
773 {
base + 1029,
"chown" },
775 {
base + 1031,
"rmdir" },
776 {
base + 1032,
"lchown" },
780 {
base + 1036,
"symlink" },
781 {
base + 1037,
"utimes" },
782 {
base + 1038,
"stat64", stat64Func<ArmLinux64> },
783 {
base + 1039,
"lstat64", lstat64Func<ArmLinux64> },
785 {
base + 1041,
"dup2" },
786 {
base + 1042,
"epoll_create" },
787 {
base + 1043,
"inotify_init" },
788 {
base + 1044,
"eventfd" },
789 {
base + 1045,
"signalfd" },
790 {
base + 1046,
"sendfile" },
793 {
base + 1049,
"stat", statFunc<ArmLinux64> },
794 {
base + 1050,
"lstat" },
795 {
base + 1051,
"fstat", fstatFunc<ArmLinux64> },
797 {
base + 1053,
"fadvise64" },
798 {
base + 1054,
"newfstatat" },
799 {
base + 1055,
"fstatfs" },
800 {
base + 1056,
"statfs" },
802 {
base + 1058,
"mmap", mmapFunc<ArmLinux64> },
803 {
base + 1059,
"alarm" },
804 {
base + 1060,
"getpgrp" },
805 {
base + 1061,
"pause" },
806 {
base + 1062,
"time", timeFunc<ArmLinux64> },
807 {
base + 1063,
"utime" },
808 {
base + 1064,
"creat" },
809 #if defined(SYS_getdents)
810 {
base + 1065,
"getdents", getdentsFunc },
812 {
base + 1065,
"getdents" },
814 {
base + 1066,
"futimesat" },
815 {
base + 1067,
"select" },
816 {
base + 1068,
"poll" },
817 {
base + 1069,
"epoll_wait" },
818 {
base + 1070,
"ustat" },
819 {
base + 1071,
"vfork" },
820 {
base + 1072,
"oldwait4" },
821 {
base + 1073,
"recv" },
822 {
base + 1074,
"send" },
823 {
base + 1075,
"bdflush" },
824 {
base + 1076,
"umount" },
825 {
base + 1077,
"uselib" },
826 {
base + 1078,
"_sysctl" },
827 {
base + 1079,
"fork" }
835 { 0xf0001,
"breakpoint" },
836 { 0xf0002,
"cacheflush" },
837 { 0xf0003,
"usr26" },
838 { 0xf0004,
"usr32" },
844 { 0x1002,
"cacheflush" },
867 uint8_t swiNeg1[] = {
868 0xff, 0xff, 0xff, 0xef
874 swiNeg1,
sizeof(swiNeg1));
877 uint8_t memory_barrier[] =
879 0x5f, 0xf0, 0x7f, 0xf5,
880 0x0e, 0xf0, 0xa0, 0xe1
883 sizeof(memory_barrier));
887 0x9f, 0x3f, 0x92, 0xe1,
888 0x00, 0x30, 0x53, 0xe0,
889 0x91, 0x3f, 0x82, 0x01,
890 0x01, 0x00, 0x33, 0x03,
891 0xfa, 0xff, 0xff, 0x0a,
892 0x00, 0x00, 0x73, 0xe2,
893 0x5f, 0xf0, 0x7f, 0xf5,
894 0x0e, 0xf0, 0xa0, 0xe1
901 0x70, 0x0f, 0x1d, 0xee,
902 0x0e, 0xf0, 0xa0, 0xe1
#define fatal(...)
This implements a cprintf based fatal() function.
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
SyscallReturn geteuidFunc(SyscallDesc *desc, ThreadContext *tc)
Target geteuid() handler.
SyscallReturn munmapFunc(SyscallDesc *desc, ThreadContext *tc, Addr start, size_t length)
Target munmap() 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 ignoreFunc(SyscallDesc *desc, ThreadContext *tc)
Handler for unimplemented syscalls that we never intend to implement (signal handling,...
static SyscallTable32 syscallDescs32High(0x900000)
void syscall(ThreadContext *tc) override
SyscallReturn chownFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, uint32_t owner, uint32_t group)
Target chown() handler.
static SyscallTable64 syscallDescs64High(0x900000)
SyscallReturn mkdirFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, mode_t mode)
Target mkdir() handler.
SyscallReturn unlinkFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname)
Target unlink() handler.
SyscallReturn getegidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getegid() handler.
virtual Process * getProcessPtr()=0
static SyscallReturn unameFunc32(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
SyscallReturn ftruncateFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, off_t length)
Target ftruncate() handler.
SyscallReturn umaskFunc(SyscallDesc *desc, ThreadContext *tc)
Target umask() handler.
virtual void syscall(ThreadContext *tc)
ArmLinuxProcess64(ProcessParams *params, ::Loader::ObjectFile *objFile, ::Loader::Arch _arch)
SyscallReturn lseekFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, uint64_t offs, int whence)
Target lseek() handler.
SyscallReturn exitFunc(SyscallDesc *desc, ThreadContext *tc, int status)
Target exit() handler: terminate current context.
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
void writeBlob(Addr addr, const void *p, int size) const
Same as tryWriteBlob, but insists on success.
static SyscallReturn unameFunc64(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
static SyscallReturn setTLSFunc32(SyscallDesc *desc, ThreadContext *tc, uint32_t tlsPtr)
Target set_tls() handler.
SyscallReturn getpidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getpid() handler.
SyscallReturn renameFunc(SyscallDesc *desc, ThreadContext *tc, Addr oldpath, Addr newpath)
Target rename() handler.
SyscallReturn brkFunc(SyscallDesc *desc, ThreadContext *tc, Addr new_brk)
Target brk() handler: set brk address.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
SyscallReturn _llseekFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, uint64_t offset_high, uint32_t offset_low, Addr result_ptr, int whence)
Target _llseek() handler.
static SyscallReturn setTLSFunc64(SyscallDesc *desc, ThreadContext *tc, uint32_t tlsPtr)
A process with emulated Arm/Linux syscalls.
SyscallReturn readlinkFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, Addr buf_ptr, size_t bufsiz)
Target readlink() handler.
void allocateMem(Addr vaddr, int64_t size, bool clobber=false)
SyscallReturn truncateFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, off_t length)
Target truncate() handler.
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
SyscallReturn getppidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getppid() handler.
static SyscallDescTable< ArmLinuxProcess64::SyscallABI > privSyscallDescs64
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)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
This class represents the return value from an emulated system call, including any errno setting.
const std::string & name()
std::vector< ContextID > contextIds
SyscallReturn setTidAddressFunc(SyscallDesc *desc, ThreadContext *tc, uint64_t tidPtr)
Target set_tid_address() handler.
void doSyscall(ThreadContext *tc)
Interface for invoking the system call funcion pointer.
virtual PortProxy & getVirtProxy()=0
SyscallReturn fcntlFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd, GuestABI::VarArgs< int > varargs)
Target fcntl() handler.
SyscallReturn getcwdFunc(SyscallDesc *desc, ThreadContext *tc, Addr buf_ptr, unsigned long size)
Target getcwd() handler.
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
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 closeFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
Target close() handler.
Overload hash function for BasicBlockRange type.
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
static const Addr commPage
A page to hold "kernel" provided functions. The name might be wrong.
void syscall(ThreadContext *tc) override
SyscallReturn fcntl64Func(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd)
Target fcntl64() handler.
SyscallDesc * get(int num, bool fatal_if_missing=true)
A process with emulated Arm/Linux syscalls.
virtual RegVal readIntReg(RegIndex reg_idx) const =0
static SyscallTable32 syscallDescs32Low(0)
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...
ArmLinuxProcess32(ProcessParams *params, ::Loader::ObjectFile *objFile, ::Loader::Arch _arch)
SyscallReturn accessFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, mode_t mode)
Target access() handler.
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)
static SyscallTable64 syscallDescs64Low(0)
static SyscallDescTable< ArmLinuxProcess32::SyscallABI > privSyscallDescs32
Generated on Wed Sep 30 2020 14:01:59 for gem5 by doxygen 1.8.17