Go to the documentation of this file.
43 #include <sys/syscall.h>
57 class LinuxLoader :
public Process::Loader
61 load(
const ProcessParams ¶ms, loader::ObjectFile *obj)
override
63 auto arch = obj->getArch();
64 auto opsys = obj->getOpSys();
72 warn(
"Unknown operating system; assuming Linux.");
77 fatal(
"gem5 does not support ARM OABI binaries. Please recompile "
78 "with an EABI compiler.");
85 return new ArmLinuxProcess64(params, obj, arch);
87 return new ArmLinuxProcess32(params, obj, arch);
91 LinuxLoader linuxLoader;
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");
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");
133 &tlsPtr,
sizeof(tlsPtr));
149 {
base + 0,
"syscall" },
151 {
base + 2,
"fork" },
152 {
base + 3,
"read", readFunc<ArmLinux32> },
153 {
base + 4,
"write", writeFunc<ArmLinux32> },
154 {
base + 5,
"open", openFunc<ArmLinux32> },
156 {
base + 8,
"creat" },
157 {
base + 9,
"link" },
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> },
167 {
base + 21,
"mount" },
168 {
base + 22,
"umount" },
171 {
base + 25,
"stime" },
172 {
base + 26,
"ptrace" },
173 {
base + 27,
"alarm" },
174 {
base + 29,
"pause" },
175 {
base + 30,
"utime" },
177 {
base + 34,
"nice" },
178 {
base + 36,
"sync" },
182 {
base + 40,
"rmdir" },
185 {
base + 43,
"times", timesFunc<ArmLinux32> },
187 {
base + 46,
"setgid" },
191 {
base + 51,
"acct" },
192 {
base + 52,
"umount2" },
193 {
base + 54,
"ioctl", ioctlFunc<ArmLinux32> },
195 {
base + 57,
"setpgid" },
197 {
base + 61,
"chroot" },
198 {
base + 62,
"ustat" },
199 {
base + 63,
"dup2" },
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" },
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" },
219 {
base + 86,
"uselib" },
220 {
base + 87,
"swapon" },
221 {
base + 88,
"reboot" },
222 {
base + 89,
"readdir" },
223 {
base + 90,
"mmap", mmapFunc<ArmLinux32> },
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" },
251 {
base + 124,
"adjtimex" },
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" },
266 #if defined(SYS_getdents)
267 {
base + 141,
"getdents", getdentsFunc },
269 {
base + 141,
"getdents" },
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" },
292 {
base + 163,
"mremap", mremapFunc<ArmLinux32> },
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" },
303 {
base + 176,
"rt_sigpending" },
304 {
base + 177,
"rt_sigtimedwait" },
306 {
base + 179,
"rt_sigsuspend" },
307 {
base + 180,
"pread64" },
308 {
base + 181,
"pwrite64" },
309 {
base + 182,
"chown" },
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" },
320 {
base + 195,
"stat64", stat64Func<ArmLinux32> },
321 {
base + 196,
"lstat64", lstat64Func<ArmLinux32> },
322 {
base + 197,
"fstat64", fstat64Func<ArmLinux32> },
323 {
base + 198,
"lchown" },
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 },
345 {
base + 217,
"getdents64" },
347 {
base + 218,
"pivot_root" },
348 {
base + 219,
"mincore" },
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> },
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" },
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" },
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" },
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" },
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" },
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" },
518 {
base + 18,
"lookup_dcookie" },
519 {
base + 19,
"eventfd2" },
520 {
base + 20,
"epoll_create1" },
521 {
base + 21,
"epoll_ctl" },
522 {
base + 22,
"epoll_pwait" },
524 {
base + 24,
"dup3" },
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" },
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> },
558 {
base + 58,
"vhangup" },
559 {
base + 59,
"pipe2" },
560 {
base + 60,
"quotactl" },
561 #if defined(SYS_getdents64)
562 {
base + 61,
"getdents64", getdents64Func },
564 {
base + 61,
"getdents64" },
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" },
599 {
base + 95,
"waitid" },
601 {
base + 97,
"unshare" },
602 {
base + 98,
"futex", futexFunc<ArmLinux64> },
604 {
base + 100,
"get_robust_list" },
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" },
632 {
base + 128,
"restart_syscall" },
634 {
base + 130,
"tkill" },
635 {
base + 131,
"tgkill", tgkillFunc<ArmLinux64> },
636 {
base + 132,
"sigaltstack" },
637 {
base + 133,
"rt_sigsuspend" },
640 {
base + 136,
"rt_sigpending" },
641 {
base + 137,
"rt_sigtimedwait" },
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" },
666 {
base + 162,
"setdomainname" },
667 {
base + 163,
"getrlimit", getrlimitFunc<ArmLinux64> },
669 {
base + 165,
"getrusage", getrusageFunc<ArmLinux64> },
670 {
base + 166,
"umask" },
671 {
base + 167,
"prctl" },
673 {
base + 169,
"gettimeofday", gettimeofdayFunc<ArmLinux64> },
674 {
base + 170,
"settimeofday" },
675 {
base + 171,
"adjtimex" },
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" },
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" },
731 {
base + 227,
"msync" },
732 {
base + 228,
"mlock" },
733 {
base + 229,
"munlock" },
734 {
base + 230,
"mlockall" },
735 {
base + 231,
"munlockall" },
736 {
base + 232,
"mincore" },
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" },
763 {
base + 1027,
"mknod" },
764 {
base + 1028,
"chmod", chmodFunc<ArmLinux64> },
765 {
base + 1029,
"chown" },
767 {
base + 1031,
"rmdir" },
768 {
base + 1032,
"lchown" },
772 {
base + 1036,
"symlink" },
773 {
base + 1037,
"utimes" },
774 {
base + 1038,
"stat64", stat64Func<ArmLinux64> },
775 {
base + 1039,
"lstat64", lstat64Func<ArmLinux64> },
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" },
785 {
base + 1049,
"stat", statFunc<ArmLinux64> },
786 {
base + 1050,
"lstat" },
787 {
base + 1051,
"fstat", fstatFunc<ArmLinux64> },
789 {
base + 1053,
"fadvise64" },
790 {
base + 1054,
"newfstatat" },
791 {
base + 1055,
"fstatfs" },
792 {
base + 1056,
"statfs" },
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 },
804 {
base + 1065,
"getdents" },
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" }
827 { 0xf0001,
"breakpoint" },
828 { 0xf0002,
"cacheflush" },
829 { 0xf0003,
"usr26" },
830 { 0xf0004,
"usr32" },
836 { 0x1002,
"cacheflush" },
846 process->Process::syscall(tc);
#define fatal(...)
This implements a cprintf based fatal() function.
SyscallReturn dupFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
FIXME: The file description is not shared among file descriptors created with dup.
void writeBlob(Addr addr, const void *p, int size) const
Same as tryWriteBlob, but insists on success.
static SyscallTable32 syscallDescs32Low(0)
SyscallReturn getuidFunc(SyscallDesc *desc, ThreadContext *tc)
This class represents the return value from an emulated system call, including any errno setting.
A process with emulated Arm/Linux syscalls.
void syscall(ThreadContext *tc) override
static SyscallReturn unameFunc64(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
SyscallReturn mkdirFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, mode_t mode)
Target mkdir() handler.
SyscallReturn getcwdFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> buf_ptr, unsigned long size)
Target getcwd() handler.
SyscallReturn brkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> new_brk)
Target brk() handler: set brk address.
void doSyscall(ThreadContext *tc)
Interface for invoking the system call funcion pointer.
SyscallReturn ignoreWarnOnceFunc(SyscallDesc *desc, ThreadContext *tc)
Like above, but only prints a warning once per syscall desc it's used with.
SyscallReturn closeFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
Target close() handler.
SyscallReturn getcpuFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< uint32_t > cpu, VPtr< uint32_t > node, VPtr< uint32_t > tcache)
SyscallReturn umaskFunc(SyscallDesc *desc, ThreadContext *tc)
Target umask() handler.
SyscallReturn exitGroupFunc(SyscallDesc *desc, ThreadContext *tc, int status)
Target exit_group() handler: terminate simulation. (exit all threads)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
SyscallReturn unlinkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname)
Target unlink() handler.
virtual PortProxy & getVirtProxy()=0
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.
static SyscallReturn setTLSFunc32(SyscallDesc *desc, ThreadContext *tc, uint32_t tlsPtr)
Target set_tls() handler.
SyscallReturn getgidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getgid() handler.
SyscallReturn truncateFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, off_t length)
Target truncate() handler.
SyscallReturn getegidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getegid() handler.
SyscallReturn munmapFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> start, size_t length)
Target munmap() handler.
static SyscallTable32 syscallDescs32High(0x900000)
SyscallReturn gettidFunc(SyscallDesc *desc, ThreadContext *tc)
Target gettid() handler.
SyscallReturn setTidAddressFunc(SyscallDesc *desc, ThreadContext *tc, uint64_t tidPtr)
Target set_tid_address() handler.
static SyscallReturn setTLSFunc64(SyscallDesc *desc, ThreadContext *tc, uint32_t tlsPtr)
SyscallReturn fcntlFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd, guest_abi::VarArgs< int > varargs)
Target fcntl() handler.
SyscallReturn readlinkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, VPtr<> buf_ptr, size_t bufsiz)
Target readlink() handler.
virtual RegVal readIntReg(RegIndex reg_idx) const =0
const std::string & name()
SyscallReturn accessFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, mode_t mode)
Target access() handler.
SyscallReturn fcntl64Func(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd)
Target fcntl64() handler.
virtual Process * getProcessPtr()=0
SyscallReturn ftruncateFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, off_t length)
Target ftruncate() handler.
SyscallReturn exitFunc(SyscallDesc *desc, ThreadContext *tc, int status)
Target exit() handler: terminate current context.
static SyscallDescTable< EmuLinux::SyscallABI32 > privSyscallDescs32
SyscallReturn pipePseudoFunc(SyscallDesc *desc, ThreadContext *tc)
Pseudo Funcs - These functions use a different return convension, returning a second value in a regis...
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
static SyscallReturn unameFunc32(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
SyscallReturn getppidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getppid() handler.
SyscallDesc * get(int num, bool fatal_if_missing=true)
SyscallReturn renameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> oldpath, VPtr<> newpath)
Target rename() handler.
This class provides the wrapper interface for the system call implementations which are defined in th...
static const Addr commPage
A page to hold "kernel" provided functions. The name might be wrong.
SyscallReturn ignoreFunc(SyscallDesc *desc, ThreadContext *tc)
Handler for unimplemented syscalls that we never intend to implement (signal handling,...
SyscallReturn getpidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getpid() handler.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
static SyscallTable64 syscallDescs64Low(0)
static SyscallDescTable< EmuLinux::SyscallABI64 > privSyscallDescs64
SyscallReturn geteuidFunc(SyscallDesc *desc, ThreadContext *tc)
Target geteuid() handler.
SyscallReturn ftruncate64Func(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int64_t length)
Target ftruncate64() handler.
SyscallReturn chownFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, uint32_t owner, uint32_t group)
Target chown() handler.
SyscallReturn lseekFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, uint64_t offs, int whence)
Target lseek() handler.
static SyscallTable64 syscallDescs64High(0x900000)
Generated on Tue Sep 21 2021 12:24:34 for gem5 by doxygen 1.8.17