Go to the documentation of this file.
44 strcpy(
name->sysname,
"Linux");
45 strcpy(
name->nodename,
"sim.gem5.org");
46 strcpy(
name->release, process->release.c_str());
47 strcpy(
name->version,
"#1 Mon Aug 18 11:32:15 EDT 2003");
48 strcpy(
name->machine,
"sparc");
58 const uint64_t
id =
htobe(100);
62 BufferArg ruidBuff(ruid,
sizeof(uint64_t));
63 memcpy(ruidBuff.
bufferPtr(), &
id,
sizeof(uint64_t));
68 BufferArg euidBuff(euid,
sizeof(uint64_t));
69 memcpy(euidBuff.
bufferPtr(), &
id,
sizeof(uint64_t));
74 BufferArg suidBuff(suid,
sizeof(uint64_t));
75 memcpy(suidBuff.
bufferPtr(), &
id,
sizeof(uint64_t));
83 { 0,
"restart_syscall" },
86 { 3,
"read", readFunc<Sparc32Linux> },
87 { 4,
"write", writeFunc<Sparc32Linux> },
88 { 5,
"open", openFunc<Sparc32Linux> },
111 { 28,
"sigaltstack" },
135 { 52,
"memory_ordering" },
146 { 63,
"fstat64", fstat64Func<Sparc32Linux> },
147 { 64,
"getpagesize" },
154 { 71,
"mmap", mmapFunc<Sparc32Linux> },
155 { 72,
"setreuid32" },
160 { 77,
"truncate64" },
165 { 82,
"setgroups32" },
167 { 84,
"ftruncate64" },
171 { 88,
"sethostname" },
174 { 91,
"setfsuid32" },
177 { 94,
"setfsgid32" },
179 { 96,
"setpriority" },
183 { 100,
"getpriority" },
184 { 101,
"rt_sigreturn" },
187 { 104,
"rt_sigpending" },
188 { 105,
"rt_sigtimedwait" },
189 { 106,
"rt_sigqueueinfo" },
190 { 107,
"rt_sigsuspend" },
191 { 108,
"setresuid32" },
194 { 111,
"getresgid32" },
195 { 112,
"setregid32" },
198 { 115,
"getgroups32" },
199 { 116,
"gettimeofday", gettimeofdayFunc<Sparc32Linux> },
200 { 117,
"getrusage" },
201 { 118,
"getsockopt" },
205 { 122,
"settimeofday" },
213 { 130,
"ftruncate" },
218 { 135,
"socketpair" },
223 { 140,
"sendfile64" },
224 { 141,
"getpeername" },
227 { 144,
"getrlimit" },
228 { 145,
"setrlimit" },
229 { 146,
"pivot_root" },
231 { 148,
"pciconfig_read" },
232 { 149,
"pciconfig_write" },
233 { 150,
"getsockname" },
234 { 151,
"inotify_init" },
235 { 152,
"inotify_add_watch" },
237 { 154,
"getdents64" },
239 { 156,
"inotify_rm_watch" },
243 { 160,
"sched_setaffinity" },
244 { 161,
"sched_getaffinity" },
245 { 162,
"getdomainname" },
246 { 163,
"setdomainname" },
247 { 164,
"ni_syscall" },
249 { 166,
"set_tid_address" },
253 { 170,
"lsetxattr" },
254 { 171,
"fsetxattr" },
256 { 173,
"lgetxattr" },
260 { 177,
"fgetxattr" },
261 { 178,
"listxattr" },
262 { 179,
"llistxattr" },
263 { 180,
"flistxattr" },
264 { 181,
"removexattr" },
265 { 182,
"lremovexattr" },
266 { 183,
"sigpending" },
267 { 184,
"query_module" },
269 { 186,
"fremovexattr" },
273 { 190,
"init_module" },
274 { 191,
"personality" },
275 { 192,
"remap_file_pages" },
276 { 193,
"epoll_create" },
277 { 194,
"epoll_ctl" },
278 { 195,
"epoll_wait" },
279 { 196,
"ioprio_set" },
281 { 198,
"sigaction" },
284 { 201,
"sigsuspend" },
288 { 205,
"readahead" },
289 { 206,
"socketcall" },
291 { 208,
"lookup_dcookie" },
292 { 209,
"fadvise64" },
293 { 210,
"fadvise64_64" },
297 { 214,
"sysinfo", sysinfoFunc<Sparc32Linux> },
299 { 216,
"sigreturn" },
300 { 217,
"clone", cloneFunc<Sparc32Linux> },
301 { 218,
"ioprio_get" },
303 { 220,
"sigprocmask" },
304 { 221,
"create_module" },
305 { 222,
"delete_module" },
306 { 223,
"get_kernel_syms" },
310 { 227,
"afs_syscall" },
313 { 230,
"_newselect" },
318 { 235,
"fstatfs64" },
323 { 240,
"munlockall" },
324 { 241,
"sched_setparam" },
325 { 242,
"sched_getparam" },
326 { 243,
"sched_setscheduler" },
327 { 244,
"sched_getscheduler" },
328 { 245,
"sched_yield" },
329 { 246,
"sched_get_priority_max" },
330 { 247,
"sched_get_priority_min" },
331 { 248,
"sched_rr_get_interval" },
332 { 249,
"nanosleep" },
333 { 250,
"mremap", mremapFunc<Sparc32Linux> },
336 { 253,
"fdatasync" },
337 { 254,
"nfsservctl" },
339 { 256,
"clock_settime" },
340 { 257,
"clock_gettime" },
341 { 258,
"clock_getres" },
342 { 259,
"clock_nanosleep" },
343 { 260,
"sched_getaffinity" },
344 { 261,
"sched_setaffinity" },
345 { 262,
"timer_settime" },
346 { 263,
"timer_gettime" },
347 { 264,
"timer_getoverrun" },
348 { 265,
"timer_delete" },
349 { 266,
"timer_create" },
352 { 269,
"io_destroy" },
353 { 270,
"io_submit" },
354 { 271,
"io_cancel" },
355 { 272,
"io_getevents" },
357 { 274,
"mq_unlink" },
358 { 275,
"mq_timedsend" },
359 { 276,
"mq_timedreceive" },
360 { 277,
"mq_notify" },
361 { 278,
"mq_getsetattr" },
363 { 280,
"sys_setaltroot" },
365 { 282,
"request_key" },
371 { 288,
"futimesat" },
372 { 289,
"fstatat64" },
376 { 293,
"symlinkat" },
377 { 294,
"readlinkat" },
379 { 296,
"faccessat" },
387 { 0,
"restart_syscall" },
390 { 3,
"read", readFunc<SparcLinux> },
391 { 4,
"write", writeFunc<SparcLinux> },
392 { 5,
"open", openFunc<SparcLinux> },
402 { 15,
"chmod", chmodFunc<Linux> },
415 { 28,
"sigaltstack" },
439 { 52,
"memory_ordering" },
449 { 62,
"fstat", fstatFunc<SparcLinux> },
450 { 63,
"fstat64", fstat64Func<SparcLinux> },
451 { 64,
"getpagesize" },
458 { 71,
"mmap", mmapFunc<SparcLinux> },
459 { 72,
"setreuid32" },
464 { 77,
"truncate64" },
469 { 82,
"setgroups32" },
471 { 84,
"ftruncate64" },
475 { 88,
"sethostname" },
478 { 91,
"setfsuid32" },
481 { 94,
"setfsgid32" },
483 { 96,
"setpriority" },
487 { 100,
"getpriority" },
488 { 101,
"rt_sigreturn" },
491 { 104,
"rt_sigpending" },
492 { 105,
"rt_sigtimedwait" },
493 { 106,
"rt_sigqueueinfo" },
494 { 107,
"rt_sigsuspend" },
495 { 108,
"setresuid" },
498 { 111,
"getresgid" },
499 { 112,
"setregid32" },
502 { 115,
"getgroups32" },
503 { 116,
"gettimeofday", gettimeofdayFunc<SparcLinux> },
504 { 117,
"getrusage" },
505 { 118,
"getsockopt" },
509 { 122,
"settimeofday" },
517 { 130,
"ftruncate" },
522 { 135,
"socketpair" },
527 { 140,
"sendfile64" },
528 { 141,
"getpeername" },
531 { 144,
"getrlimit" },
532 { 145,
"setrlimit" },
533 { 146,
"pivot_root" },
535 { 148,
"pciconfig_read" },
536 { 149,
"pciconfig_write" },
537 { 150,
"getsockname" },
538 { 151,
"inotify_init" },
539 { 152,
"inotify_add_watch" },
541 { 154,
"getdents64" },
543 { 156,
"inotify_rm_watch" },
547 { 160,
"sched_set_affinity" },
548 { 161,
"sched_get_affinity" },
549 { 162,
"getdomainname" },
550 { 163,
"setdomainname" },
551 { 164,
"utrap_install" },
553 { 166,
"set_tid_address" },
557 { 170,
"lsetxattr" },
558 { 171,
"fsetxattr" },
560 { 173,
"lgetxattr" },
564 { 177,
"fgetxattr" },
565 { 178,
"listxattr" },
566 { 179,
"llistxattr" },
567 { 180,
"flistxattr" },
568 { 181,
"removexattr" },
569 { 182,
"lremovexattr" },
570 { 183,
"sigpending" },
571 { 184,
"query_module" },
573 { 186,
"fremovexattr" },
577 { 190,
"init_module" },
578 { 191,
"personality" },
579 { 192,
"remap_file_pages" },
580 { 193,
"epoll_create" },
581 { 194,
"epoll_ctl" },
582 { 195,
"epoll_wait" },
583 { 196,
"ioprio_set" },
588 { 201,
"sigsuspend" },
592 { 205,
"readahead" },
593 { 206,
"socketcall" },
595 { 208,
"lookup_dcookie" },
596 { 209,
"fadvise64" },
597 { 210,
"fadvise64_64" },
601 { 214,
"sysinfo", sysinfoFunc<SparcLinux> },
603 { 216,
"sigreturn" },
604 { 217,
"clone", cloneFunc<SparcLinux> },
605 { 218,
"ioprio_get" },
607 { 220,
"sigprocmask" },
608 { 221,
"create_module" },
609 { 222,
"delete_module" },
610 { 223,
"get_kernel_syms" },
614 { 227,
"afs_syscall" },
617 { 230,
"_newselect" },
622 { 235,
"fstatfs64" },
627 { 240,
"munlockall" },
628 { 241,
"sched_setparam" },
629 { 242,
"sched_getparam" },
630 { 243,
"sched_setscheduler" },
631 { 244,
"sched_getscheduler" },
632 { 245,
"sched_yield" },
633 { 246,
"sched_get_priority_max" },
634 { 247,
"sched_get_priority_min" },
635 { 248,
"sched_rr_get_interval" },
636 { 249,
"nanosleep" },
637 { 250,
"mremap", mremapFunc<SparcLinux> },
640 { 253,
"fdatasync" },
641 { 254,
"nfsservctl" },
643 { 256,
"clock_settime" },
644 { 257,
"clock_gettime" },
645 { 258,
"clock_getres" },
646 { 259,
"clock_nanosleep" },
647 { 260,
"sched_getaffinity" },
648 { 261,
"sched_setaffinity" },
649 { 262,
"timer_settime" },
650 { 263,
"timer_gettime" },
651 { 264,
"timer_getoverrun" },
652 { 265,
"timer_delete" },
653 { 266,
"timer_create" },
656 { 269,
"io_destroy" },
657 { 270,
"io_submit" },
658 { 271,
"io_cancel" },
659 { 272,
"io_getevents" },
661 { 274,
"mq_unlink" },
662 { 275,
"mq_timedsend" },
663 { 276,
"mq_timedreceive" },
664 { 277,
"mq_notify" },
665 { 278,
"mq_getsetattr" },
667 { 280,
"sys_setaltroot" },
669 { 282,
"request_key" },
SyscallReturn geteuidFunc(SyscallDesc *desc, ThreadContext *tc)
Target geteuid() handler.
SyscallReturn munmapFunc(SyscallDesc *desc, ThreadContext *tc, Addr start, size_t length)
Target munmap() handler.
static SyscallReturn unameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
SyscallReturn ignoreFunc(SyscallDesc *desc, ThreadContext *tc)
Handler for unimplemented syscalls that we never intend to implement (signal handling,...
SyscallReturn chownFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, uint32_t owner, uint32_t group)
Target chown() handler.
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 getresuidFunc(SyscallDesc *desc, ThreadContext *tc, Addr ruid, Addr euid, Addr suid)
SyscallReturn getegidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getegid() handler.
virtual Process * getProcessPtr()=0
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.
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.
SyscallReturn readlinkFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, Addr buf_ptr, size_t bufsiz)
Target readlink() handler.
SyscallReturn getppidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getppid() 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()
void * bufferPtr()
Return a pointer to the internal simulator-space buffer.
virtual PortProxy & getVirtProxy()=0
static SyscallDescTable< Sparc32Process::SyscallABI > syscall32Descs
32 bit compatibility syscall descriptors, indexed by call number.
SyscallReturn getcwdFunc(SyscallDesc *desc, ThreadContext *tc, Addr buf_ptr, unsigned long size)
Target getcwd() handler.
SyscallReturn getuidFunc(SyscallDesc *desc, ThreadContext *tc)
SyscallReturn closeFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
Target close() handler.
BufferArg represents an untyped buffer in target user space that is passed by reference to an (emulat...
static SyscallDescTable< Sparc64Process::SyscallABI > syscallDescs
64 bit syscall descriptors, indexed by call number.
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...
bool copyOut(PortProxy &memproxy)
copy data out of simulator space (write to target memory)
Generated on Wed Sep 30 2020 14:02:07 for gem5 by doxygen 1.8.17