Go to the documentation of this file.
45 strcpy(
name->sysname,
"Linux");
46 strcpy(
name->nodename,
"sim.gem5.org");
47 strcpy(
name->release, process->release.c_str());
48 strcpy(
name->version,
"#1 Mon Aug 18 11:32:15 EDT 2003");
49 strcpy(
name->machine,
"sparc");
59 const uint64_t
id =
htobe(100);
63 BufferArg ruidBuff(ruid,
sizeof(uint64_t));
64 memcpy(ruidBuff.
bufferPtr(), &
id,
sizeof(uint64_t));
69 BufferArg euidBuff(euid,
sizeof(uint64_t));
70 memcpy(euidBuff.
bufferPtr(), &
id,
sizeof(uint64_t));
75 BufferArg suidBuff(suid,
sizeof(uint64_t));
76 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" },
386 { 0,
"restart_syscall" },
389 { 3,
"read", readFunc<SparcLinux> },
390 { 4,
"write", writeFunc<SparcLinux> },
391 { 5,
"open", openFunc<SparcLinux> },
401 { 15,
"chmod", chmodFunc<Linux> },
414 { 28,
"sigaltstack" },
438 { 52,
"memory_ordering" },
448 { 62,
"fstat", fstatFunc<SparcLinux> },
449 { 63,
"fstat64", fstat64Func<SparcLinux> },
450 { 64,
"getpagesize" },
457 { 71,
"mmap", mmapFunc<SparcLinux> },
458 { 72,
"setreuid32" },
463 { 77,
"truncate64" },
468 { 82,
"setgroups32" },
470 { 84,
"ftruncate64" },
474 { 88,
"sethostname" },
477 { 91,
"setfsuid32" },
480 { 94,
"setfsgid32" },
482 { 96,
"setpriority" },
486 { 100,
"getpriority" },
487 { 101,
"rt_sigreturn" },
490 { 104,
"rt_sigpending" },
491 { 105,
"rt_sigtimedwait" },
492 { 106,
"rt_sigqueueinfo" },
493 { 107,
"rt_sigsuspend" },
494 { 108,
"setresuid" },
497 { 111,
"getresgid" },
498 { 112,
"setregid32" },
501 { 115,
"getgroups32" },
502 { 116,
"gettimeofday", gettimeofdayFunc<SparcLinux> },
503 { 117,
"getrusage" },
504 { 118,
"getsockopt" },
508 { 122,
"settimeofday" },
516 { 130,
"ftruncate" },
521 { 135,
"socketpair" },
526 { 140,
"sendfile64" },
527 { 141,
"getpeername" },
530 { 144,
"getrlimit" },
531 { 145,
"setrlimit" },
532 { 146,
"pivot_root" },
534 { 148,
"pciconfig_read" },
535 { 149,
"pciconfig_write" },
536 { 150,
"getsockname" },
537 { 151,
"inotify_init" },
538 { 152,
"inotify_add_watch" },
540 { 154,
"getdents64" },
542 { 156,
"inotify_rm_watch" },
546 { 160,
"sched_set_affinity" },
547 { 161,
"sched_get_affinity" },
548 { 162,
"getdomainname" },
549 { 163,
"setdomainname" },
550 { 164,
"utrap_install" },
552 { 166,
"set_tid_address" },
556 { 170,
"lsetxattr" },
557 { 171,
"fsetxattr" },
559 { 173,
"lgetxattr" },
563 { 177,
"fgetxattr" },
564 { 178,
"listxattr" },
565 { 179,
"llistxattr" },
566 { 180,
"flistxattr" },
567 { 181,
"removexattr" },
568 { 182,
"lremovexattr" },
569 { 183,
"sigpending" },
570 { 184,
"query_module" },
572 { 186,
"fremovexattr" },
576 { 190,
"init_module" },
577 { 191,
"personality" },
578 { 192,
"remap_file_pages" },
579 { 193,
"epoll_create" },
580 { 194,
"epoll_ctl" },
581 { 195,
"epoll_wait" },
582 { 196,
"ioprio_set" },
587 { 201,
"sigsuspend" },
591 { 205,
"readahead" },
592 { 206,
"socketcall" },
594 { 208,
"lookup_dcookie" },
595 { 209,
"fadvise64" },
596 { 210,
"fadvise64_64" },
600 { 214,
"sysinfo", sysinfoFunc<SparcLinux> },
602 { 216,
"sigreturn" },
603 { 217,
"clone", cloneFunc<SparcLinux> },
604 { 218,
"ioprio_get" },
606 { 220,
"sigprocmask" },
607 { 221,
"create_module" },
608 { 222,
"delete_module" },
609 { 223,
"get_kernel_syms" },
613 { 227,
"afs_syscall" },
616 { 230,
"_newselect" },
621 { 235,
"fstatfs64" },
626 { 240,
"munlockall" },
627 { 241,
"sched_setparam" },
628 { 242,
"sched_getparam" },
629 { 243,
"sched_setscheduler" },
630 { 244,
"sched_getscheduler" },
631 { 245,
"sched_yield" },
632 { 246,
"sched_get_priority_max" },
633 { 247,
"sched_get_priority_min" },
634 { 248,
"sched_rr_get_interval" },
635 { 249,
"nanosleep" },
636 { 250,
"mremap", mremapFunc<SparcLinux> },
639 { 253,
"fdatasync" },
640 { 254,
"nfsservctl" },
642 { 256,
"clock_settime" },
643 { 257,
"clock_gettime" },
644 { 258,
"clock_getres" },
645 { 259,
"clock_nanosleep" },
646 { 260,
"sched_getaffinity" },
647 { 261,
"sched_setaffinity" },
648 { 262,
"timer_settime" },
649 { 263,
"timer_gettime" },
650 { 264,
"timer_getoverrun" },
651 { 265,
"timer_delete" },
652 { 266,
"timer_create" },
655 { 269,
"io_destroy" },
656 { 270,
"io_submit" },
657 { 271,
"io_cancel" },
658 { 272,
"io_getevents" },
660 { 274,
"mq_unlink" },
661 { 275,
"mq_timedsend" },
662 { 276,
"mq_timedreceive" },
663 { 277,
"mq_notify" },
664 { 278,
"mq_getsetattr" },
666 { 280,
"sys_setaltroot" },
668 { 282,
"request_key" },
SyscallReturn geteuidFunc(SyscallDesc *desc, ThreadContext *tc)
Target geteuid() handler.
static SyscallReturn unameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
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.
virtual Process * getProcessPtr()=0
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.
SyscallReturn getpidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getpid() handler.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
static SyscallDescTable< SEWorkload::SyscallABI64 > syscallDescs
64 bit syscall descriptors, indexed by call number.
SyscallReturn getppidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getppid() handler.
static SyscallDescTable< SEWorkload::SyscallABI32 > syscall32Descs
32 bit compatibility syscall descriptors, indexed by call number.
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()
void * bufferPtr()
Return a pointer to the internal simulator-space buffer.
static SyscallReturn getresuidFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> ruid, VPtr<> euid, VPtr<> suid)
virtual PortProxy & getVirtProxy()=0
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.
SyscallReturn getcwdFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> buf_ptr, unsigned long size)
Target getcwd() handler.
BufferArg represents an untyped buffer in target user space that is passed by reference to an (emulat...
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 Tue Jun 22 2021 15:28:25 for gem5 by doxygen 1.8.17