Go to the documentation of this file.
49 strcpy(
name->sysname,
"Linux");
50 strcpy(
name->nodename,
"sim.gem5.org");
51 strcpy(
name->release, process->release.c_str());
52 strcpy(
name->version,
"#1 Mon Aug 18 11:32:15 EDT 2003");
53 strcpy(
name->machine,
"sparc");
64 const uint64_t
id =
htobe(100);
68 BufferArg ruidBuff(ruid,
sizeof(uint64_t));
69 memcpy(ruidBuff.
bufferPtr(), &
id,
sizeof(uint64_t));
74 BufferArg euidBuff(euid,
sizeof(uint64_t));
75 memcpy(euidBuff.
bufferPtr(), &
id,
sizeof(uint64_t));
80 BufferArg suidBuff(suid,
sizeof(uint64_t));
81 memcpy(suidBuff.
bufferPtr(), &
id,
sizeof(uint64_t));
88 { 0,
"restart_syscall" },
91 { 3,
"read", readFunc<Sparc32Linux> },
92 { 4,
"write", writeFunc<Sparc32Linux> },
93 { 5,
"open", openFunc<Sparc32Linux> },
116 { 28,
"sigaltstack" },
140 { 52,
"memory_ordering" },
146 { 58,
"readlink", readlinkFunc<Sparc32Linux> },
151 { 63,
"fstat64", fstat64Func<Sparc32Linux> },
152 { 64,
"getpagesize" },
159 { 71,
"mmap", mmapFunc<Sparc32Linux> },
160 { 72,
"setreuid32" },
161 { 73,
"munmap", munmapFunc<Sparc32Linux> },
165 { 77,
"truncate64" },
170 { 82,
"setgroups32" },
172 { 84,
"ftruncate64" },
176 { 88,
"sethostname" },
179 { 91,
"setfsuid32" },
182 { 94,
"setfsgid32" },
184 { 96,
"setpriority" },
188 { 100,
"getpriority" },
189 { 101,
"rt_sigreturn" },
192 { 104,
"rt_sigpending" },
193 { 105,
"rt_sigtimedwait" },
194 { 106,
"rt_sigqueueinfo" },
195 { 107,
"rt_sigsuspend" },
196 { 108,
"setresuid32" },
199 { 111,
"getresgid32" },
200 { 112,
"setregid32" },
203 { 115,
"getgroups32" },
204 { 116,
"gettimeofday", gettimeofdayFunc<Sparc32Linux> },
205 { 117,
"getrusage" },
206 { 118,
"getsockopt" },
210 { 122,
"settimeofday" },
218 { 130,
"ftruncate" },
223 { 135,
"socketpair" },
228 { 140,
"sendfile64" },
229 { 141,
"getpeername" },
232 { 144,
"getrlimit" },
233 { 145,
"setrlimit" },
234 { 146,
"pivot_root" },
236 { 148,
"pciconfig_read" },
237 { 149,
"pciconfig_write" },
238 { 150,
"getsockname" },
239 { 151,
"inotify_init" },
240 { 152,
"inotify_add_watch" },
242 { 154,
"getdents64" },
244 { 156,
"inotify_rm_watch" },
248 { 160,
"sched_setaffinity" },
249 { 161,
"sched_getaffinity" },
250 { 162,
"getdomainname" },
251 { 163,
"setdomainname" },
252 { 164,
"ni_syscall" },
254 { 166,
"set_tid_address" },
258 { 170,
"lsetxattr" },
259 { 171,
"fsetxattr" },
261 { 173,
"lgetxattr" },
265 { 177,
"fgetxattr" },
266 { 178,
"listxattr" },
267 { 179,
"llistxattr" },
268 { 180,
"flistxattr" },
269 { 181,
"removexattr" },
270 { 182,
"lremovexattr" },
271 { 183,
"sigpending" },
272 { 184,
"query_module" },
274 { 186,
"fremovexattr" },
278 { 190,
"init_module" },
279 { 191,
"personality" },
280 { 192,
"remap_file_pages" },
281 { 193,
"epoll_create" },
282 { 194,
"epoll_ctl" },
283 { 195,
"epoll_wait" },
284 { 196,
"ioprio_set" },
286 { 198,
"sigaction" },
289 { 201,
"sigsuspend" },
293 { 205,
"readahead" },
294 { 206,
"socketcall" },
296 { 208,
"lookup_dcookie" },
297 { 209,
"fadvise64" },
298 { 210,
"fadvise64_64" },
302 { 214,
"sysinfo", sysinfoFunc<Sparc32Linux> },
304 { 216,
"sigreturn" },
305 { 217,
"clone", cloneFunc<Sparc32Linux> },
306 { 218,
"ioprio_get" },
308 { 220,
"sigprocmask" },
309 { 221,
"create_module" },
310 { 222,
"delete_module" },
311 { 223,
"get_kernel_syms" },
315 { 227,
"afs_syscall" },
318 { 230,
"_newselect" },
323 { 235,
"fstatfs64" },
328 { 240,
"munlockall" },
329 { 241,
"sched_setparam" },
330 { 242,
"sched_getparam" },
331 { 243,
"sched_setscheduler" },
332 { 244,
"sched_getscheduler" },
333 { 245,
"sched_yield" },
334 { 246,
"sched_get_priority_max" },
335 { 247,
"sched_get_priority_min" },
336 { 248,
"sched_rr_get_interval" },
337 { 249,
"nanosleep" },
338 { 250,
"mremap", mremapFunc<Sparc32Linux> },
341 { 253,
"fdatasync" },
342 { 254,
"nfsservctl" },
344 { 256,
"clock_settime" },
345 { 257,
"clock_gettime" },
346 { 258,
"clock_getres" },
347 { 259,
"clock_nanosleep" },
348 { 260,
"sched_getaffinity" },
349 { 261,
"sched_setaffinity" },
350 { 262,
"timer_settime" },
351 { 263,
"timer_gettime" },
352 { 264,
"timer_getoverrun" },
353 { 265,
"timer_delete" },
354 { 266,
"timer_create" },
357 { 269,
"io_destroy" },
358 { 270,
"io_submit" },
359 { 271,
"io_cancel" },
360 { 272,
"io_getevents" },
362 { 274,
"mq_unlink" },
363 { 275,
"mq_timedsend" },
364 { 276,
"mq_timedreceive" },
365 { 277,
"mq_notify" },
366 { 278,
"mq_getsetattr" },
368 { 280,
"sys_setaltroot" },
370 { 282,
"request_key" },
376 { 288,
"futimesat" },
377 { 289,
"fstatat64" },
381 { 293,
"symlinkat" },
382 { 294,
"readlinkat" },
384 { 296,
"faccessat" },
391 { 0,
"restart_syscall" },
394 { 3,
"read", readFunc<SparcLinux> },
395 { 4,
"write", writeFunc<SparcLinux> },
396 { 5,
"open", openFunc<SparcLinux> },
406 { 15,
"chmod", chmodFunc<Linux> },
419 { 28,
"sigaltstack" },
443 { 52,
"memory_ordering" },
449 { 58,
"readlink", readlinkFunc<SparcLinux> },
453 { 62,
"fstat", fstatFunc<SparcLinux> },
454 { 63,
"fstat64", fstat64Func<SparcLinux> },
455 { 64,
"getpagesize" },
462 { 71,
"mmap", mmapFunc<SparcLinux> },
463 { 72,
"setreuid32" },
464 { 73,
"munmap", munmapFunc<SparcLinux> },
468 { 77,
"truncate64" },
473 { 82,
"setgroups32" },
475 { 84,
"ftruncate64" },
479 { 88,
"sethostname" },
482 { 91,
"setfsuid32" },
485 { 94,
"setfsgid32" },
487 { 96,
"setpriority" },
491 { 100,
"getpriority" },
492 { 101,
"rt_sigreturn" },
495 { 104,
"rt_sigpending" },
496 { 105,
"rt_sigtimedwait" },
497 { 106,
"rt_sigqueueinfo" },
498 { 107,
"rt_sigsuspend" },
499 { 108,
"setresuid" },
502 { 111,
"getresgid" },
503 { 112,
"setregid32" },
506 { 115,
"getgroups32" },
507 { 116,
"gettimeofday", gettimeofdayFunc<SparcLinux> },
508 { 117,
"getrusage" },
509 { 118,
"getsockopt" },
513 { 122,
"settimeofday" },
521 { 130,
"ftruncate" },
526 { 135,
"socketpair" },
531 { 140,
"sendfile64" },
532 { 141,
"getpeername" },
535 { 144,
"getrlimit" },
536 { 145,
"setrlimit" },
537 { 146,
"pivot_root" },
539 { 148,
"pciconfig_read" },
540 { 149,
"pciconfig_write" },
541 { 150,
"getsockname" },
542 { 151,
"inotify_init" },
543 { 152,
"inotify_add_watch" },
545 { 154,
"getdents64" },
547 { 156,
"inotify_rm_watch" },
551 { 160,
"sched_set_affinity" },
552 { 161,
"sched_get_affinity" },
553 { 162,
"getdomainname" },
554 { 163,
"setdomainname" },
555 { 164,
"utrap_install" },
557 { 166,
"set_tid_address" },
561 { 170,
"lsetxattr" },
562 { 171,
"fsetxattr" },
564 { 173,
"lgetxattr" },
568 { 177,
"fgetxattr" },
569 { 178,
"listxattr" },
570 { 179,
"llistxattr" },
571 { 180,
"flistxattr" },
572 { 181,
"removexattr" },
573 { 182,
"lremovexattr" },
574 { 183,
"sigpending" },
575 { 184,
"query_module" },
577 { 186,
"fremovexattr" },
581 { 190,
"init_module" },
582 { 191,
"personality" },
583 { 192,
"remap_file_pages" },
584 { 193,
"epoll_create" },
585 { 194,
"epoll_ctl" },
586 { 195,
"epoll_wait" },
587 { 196,
"ioprio_set" },
592 { 201,
"sigsuspend" },
596 { 205,
"readahead" },
597 { 206,
"socketcall" },
599 { 208,
"lookup_dcookie" },
600 { 209,
"fadvise64" },
601 { 210,
"fadvise64_64" },
605 { 214,
"sysinfo", sysinfoFunc<SparcLinux> },
607 { 216,
"sigreturn" },
608 { 217,
"clone", cloneFunc<SparcLinux> },
609 { 218,
"ioprio_get" },
611 { 220,
"sigprocmask" },
612 { 221,
"create_module" },
613 { 222,
"delete_module" },
614 { 223,
"get_kernel_syms" },
618 { 227,
"afs_syscall" },
621 { 230,
"_newselect" },
626 { 235,
"fstatfs64" },
631 { 240,
"munlockall" },
632 { 241,
"sched_setparam" },
633 { 242,
"sched_getparam" },
634 { 243,
"sched_setscheduler" },
635 { 244,
"sched_getscheduler" },
636 { 245,
"sched_yield" },
637 { 246,
"sched_get_priority_max" },
638 { 247,
"sched_get_priority_min" },
639 { 248,
"sched_rr_get_interval" },
640 { 249,
"nanosleep" },
641 { 250,
"mremap", mremapFunc<SparcLinux> },
644 { 253,
"fdatasync" },
645 { 254,
"nfsservctl" },
647 { 256,
"clock_settime" },
648 { 257,
"clock_gettime" },
649 { 258,
"clock_getres" },
650 { 259,
"clock_nanosleep" },
651 { 260,
"sched_getaffinity" },
652 { 261,
"sched_setaffinity" },
653 { 262,
"timer_settime" },
654 { 263,
"timer_gettime" },
655 { 264,
"timer_getoverrun" },
656 { 265,
"timer_delete" },
657 { 266,
"timer_create" },
660 { 269,
"io_destroy" },
661 { 270,
"io_submit" },
662 { 271,
"io_cancel" },
663 { 272,
"io_getevents" },
665 { 274,
"mq_unlink" },
666 { 275,
"mq_timedsend" },
667 { 276,
"mq_timedreceive" },
668 { 277,
"mq_notify" },
669 { 278,
"mq_getsetattr" },
671 { 280,
"sys_setaltroot" },
673 { 282,
"request_key" },
SyscallReturn getuidFunc(SyscallDesc *desc, ThreadContext *tc)
This class represents the return value from an emulated system call, including any errno setting.
static SyscallDescTable< SEWorkload::SyscallABI32 > syscall32Descs
32 bit compatibility syscall descriptors, indexed by call number.
SyscallReturn mkdirFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, mode_t mode)
Target mkdir() handler.
static SyscallReturn getresuidFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> ruid, VPtr<> euid, VPtr<> suid)
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.
SyscallReturn closeFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
Target close() 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.
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 getgidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getgid() handler.
BufferArg represents an untyped buffer in target user space that is passed by reference to an (emulat...
SyscallReturn getegidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getegid() handler.
const std::string & name()
virtual Process * getProcessPtr()=0
SyscallReturn exitFunc(SyscallDesc *desc, ThreadContext *tc, int status)
Target exit() handler: terminate current context.
bool copyOut(const PortProxy &memproxy)
copy data out of simulator space (write to target memory)
SyscallReturn pipePseudoFunc(SyscallDesc *desc, ThreadContext *tc)
Pseudo Funcs - These functions use a different return convension, returning a second value in a regis...
SyscallReturn getppidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getppid() handler.
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...
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.
void * bufferPtr()
Return a pointer to the internal simulator-space buffer.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
SyscallReturn geteuidFunc(SyscallDesc *desc, ThreadContext *tc)
Target geteuid() handler.
static SyscallReturn unameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() 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 SyscallDescTable< SEWorkload::SyscallABI64 > syscallDescs
64 bit syscall descriptors, indexed by call number.
Generated on Sun Jul 30 2023 01:56:50 for gem5 by doxygen 1.8.17