Go to the documentation of this file.
48 strcpy(
name->sysname,
"Linux");
49 strcpy(
name->nodename,
"sim.gem5.org");
50 strcpy(
name->release, process->release.c_str());
51 strcpy(
name->version,
"#1 Mon Aug 18 11:32:15 EDT 2003");
52 strcpy(
name->machine,
"sparc");
62 const uint64_t
id =
htobe(100);
66 BufferArg ruidBuff(ruid,
sizeof(uint64_t));
67 memcpy(ruidBuff.
bufferPtr(), &
id,
sizeof(uint64_t));
72 BufferArg euidBuff(euid,
sizeof(uint64_t));
73 memcpy(euidBuff.
bufferPtr(), &
id,
sizeof(uint64_t));
78 BufferArg suidBuff(suid,
sizeof(uint64_t));
79 memcpy(suidBuff.
bufferPtr(), &
id,
sizeof(uint64_t));
86 { 0,
"restart_syscall" },
89 { 3,
"read", readFunc<Sparc32Linux> },
90 { 4,
"write", writeFunc<Sparc32Linux> },
91 { 5,
"open", openFunc<Sparc32Linux> },
114 { 28,
"sigaltstack" },
138 { 52,
"memory_ordering" },
149 { 63,
"fstat64", fstat64Func<Sparc32Linux> },
150 { 64,
"getpagesize" },
157 { 71,
"mmap", mmapFunc<Sparc32Linux> },
158 { 72,
"setreuid32" },
163 { 77,
"truncate64" },
168 { 82,
"setgroups32" },
170 { 84,
"ftruncate64" },
174 { 88,
"sethostname" },
177 { 91,
"setfsuid32" },
180 { 94,
"setfsgid32" },
182 { 96,
"setpriority" },
186 { 100,
"getpriority" },
187 { 101,
"rt_sigreturn" },
190 { 104,
"rt_sigpending" },
191 { 105,
"rt_sigtimedwait" },
192 { 106,
"rt_sigqueueinfo" },
193 { 107,
"rt_sigsuspend" },
194 { 108,
"setresuid32" },
197 { 111,
"getresgid32" },
198 { 112,
"setregid32" },
201 { 115,
"getgroups32" },
202 { 116,
"gettimeofday", gettimeofdayFunc<Sparc32Linux> },
203 { 117,
"getrusage" },
204 { 118,
"getsockopt" },
208 { 122,
"settimeofday" },
216 { 130,
"ftruncate" },
221 { 135,
"socketpair" },
226 { 140,
"sendfile64" },
227 { 141,
"getpeername" },
230 { 144,
"getrlimit" },
231 { 145,
"setrlimit" },
232 { 146,
"pivot_root" },
234 { 148,
"pciconfig_read" },
235 { 149,
"pciconfig_write" },
236 { 150,
"getsockname" },
237 { 151,
"inotify_init" },
238 { 152,
"inotify_add_watch" },
240 { 154,
"getdents64" },
242 { 156,
"inotify_rm_watch" },
246 { 160,
"sched_setaffinity" },
247 { 161,
"sched_getaffinity" },
248 { 162,
"getdomainname" },
249 { 163,
"setdomainname" },
250 { 164,
"ni_syscall" },
252 { 166,
"set_tid_address" },
256 { 170,
"lsetxattr" },
257 { 171,
"fsetxattr" },
259 { 173,
"lgetxattr" },
263 { 177,
"fgetxattr" },
264 { 178,
"listxattr" },
265 { 179,
"llistxattr" },
266 { 180,
"flistxattr" },
267 { 181,
"removexattr" },
268 { 182,
"lremovexattr" },
269 { 183,
"sigpending" },
270 { 184,
"query_module" },
272 { 186,
"fremovexattr" },
276 { 190,
"init_module" },
277 { 191,
"personality" },
278 { 192,
"remap_file_pages" },
279 { 193,
"epoll_create" },
280 { 194,
"epoll_ctl" },
281 { 195,
"epoll_wait" },
282 { 196,
"ioprio_set" },
284 { 198,
"sigaction" },
287 { 201,
"sigsuspend" },
291 { 205,
"readahead" },
292 { 206,
"socketcall" },
294 { 208,
"lookup_dcookie" },
295 { 209,
"fadvise64" },
296 { 210,
"fadvise64_64" },
300 { 214,
"sysinfo", sysinfoFunc<Sparc32Linux> },
302 { 216,
"sigreturn" },
303 { 217,
"clone", cloneFunc<Sparc32Linux> },
304 { 218,
"ioprio_get" },
306 { 220,
"sigprocmask" },
307 { 221,
"create_module" },
308 { 222,
"delete_module" },
309 { 223,
"get_kernel_syms" },
313 { 227,
"afs_syscall" },
316 { 230,
"_newselect" },
321 { 235,
"fstatfs64" },
326 { 240,
"munlockall" },
327 { 241,
"sched_setparam" },
328 { 242,
"sched_getparam" },
329 { 243,
"sched_setscheduler" },
330 { 244,
"sched_getscheduler" },
331 { 245,
"sched_yield" },
332 { 246,
"sched_get_priority_max" },
333 { 247,
"sched_get_priority_min" },
334 { 248,
"sched_rr_get_interval" },
335 { 249,
"nanosleep" },
336 { 250,
"mremap", mremapFunc<Sparc32Linux> },
339 { 253,
"fdatasync" },
340 { 254,
"nfsservctl" },
342 { 256,
"clock_settime" },
343 { 257,
"clock_gettime" },
344 { 258,
"clock_getres" },
345 { 259,
"clock_nanosleep" },
346 { 260,
"sched_getaffinity" },
347 { 261,
"sched_setaffinity" },
348 { 262,
"timer_settime" },
349 { 263,
"timer_gettime" },
350 { 264,
"timer_getoverrun" },
351 { 265,
"timer_delete" },
352 { 266,
"timer_create" },
355 { 269,
"io_destroy" },
356 { 270,
"io_submit" },
357 { 271,
"io_cancel" },
358 { 272,
"io_getevents" },
360 { 274,
"mq_unlink" },
361 { 275,
"mq_timedsend" },
362 { 276,
"mq_timedreceive" },
363 { 277,
"mq_notify" },
364 { 278,
"mq_getsetattr" },
366 { 280,
"sys_setaltroot" },
368 { 282,
"request_key" },
374 { 288,
"futimesat" },
375 { 289,
"fstatat64" },
379 { 293,
"symlinkat" },
380 { 294,
"readlinkat" },
382 { 296,
"faccessat" },
389 { 0,
"restart_syscall" },
392 { 3,
"read", readFunc<SparcLinux> },
393 { 4,
"write", writeFunc<SparcLinux> },
394 { 5,
"open", openFunc<SparcLinux> },
404 { 15,
"chmod", chmodFunc<Linux> },
417 { 28,
"sigaltstack" },
441 { 52,
"memory_ordering" },
451 { 62,
"fstat", fstatFunc<SparcLinux> },
452 { 63,
"fstat64", fstat64Func<SparcLinux> },
453 { 64,
"getpagesize" },
460 { 71,
"mmap", mmapFunc<SparcLinux> },
461 { 72,
"setreuid32" },
466 { 77,
"truncate64" },
471 { 82,
"setgroups32" },
473 { 84,
"ftruncate64" },
477 { 88,
"sethostname" },
480 { 91,
"setfsuid32" },
483 { 94,
"setfsgid32" },
485 { 96,
"setpriority" },
489 { 100,
"getpriority" },
490 { 101,
"rt_sigreturn" },
493 { 104,
"rt_sigpending" },
494 { 105,
"rt_sigtimedwait" },
495 { 106,
"rt_sigqueueinfo" },
496 { 107,
"rt_sigsuspend" },
497 { 108,
"setresuid" },
500 { 111,
"getresgid" },
501 { 112,
"setregid32" },
504 { 115,
"getgroups32" },
505 { 116,
"gettimeofday", gettimeofdayFunc<SparcLinux> },
506 { 117,
"getrusage" },
507 { 118,
"getsockopt" },
511 { 122,
"settimeofday" },
519 { 130,
"ftruncate" },
524 { 135,
"socketpair" },
529 { 140,
"sendfile64" },
530 { 141,
"getpeername" },
533 { 144,
"getrlimit" },
534 { 145,
"setrlimit" },
535 { 146,
"pivot_root" },
537 { 148,
"pciconfig_read" },
538 { 149,
"pciconfig_write" },
539 { 150,
"getsockname" },
540 { 151,
"inotify_init" },
541 { 152,
"inotify_add_watch" },
543 { 154,
"getdents64" },
545 { 156,
"inotify_rm_watch" },
549 { 160,
"sched_set_affinity" },
550 { 161,
"sched_get_affinity" },
551 { 162,
"getdomainname" },
552 { 163,
"setdomainname" },
553 { 164,
"utrap_install" },
555 { 166,
"set_tid_address" },
559 { 170,
"lsetxattr" },
560 { 171,
"fsetxattr" },
562 { 173,
"lgetxattr" },
566 { 177,
"fgetxattr" },
567 { 178,
"listxattr" },
568 { 179,
"llistxattr" },
569 { 180,
"flistxattr" },
570 { 181,
"removexattr" },
571 { 182,
"lremovexattr" },
572 { 183,
"sigpending" },
573 { 184,
"query_module" },
575 { 186,
"fremovexattr" },
579 { 190,
"init_module" },
580 { 191,
"personality" },
581 { 192,
"remap_file_pages" },
582 { 193,
"epoll_create" },
583 { 194,
"epoll_ctl" },
584 { 195,
"epoll_wait" },
585 { 196,
"ioprio_set" },
590 { 201,
"sigsuspend" },
594 { 205,
"readahead" },
595 { 206,
"socketcall" },
597 { 208,
"lookup_dcookie" },
598 { 209,
"fadvise64" },
599 { 210,
"fadvise64_64" },
603 { 214,
"sysinfo", sysinfoFunc<SparcLinux> },
605 { 216,
"sigreturn" },
606 { 217,
"clone", cloneFunc<SparcLinux> },
607 { 218,
"ioprio_get" },
609 { 220,
"sigprocmask" },
610 { 221,
"create_module" },
611 { 222,
"delete_module" },
612 { 223,
"get_kernel_syms" },
616 { 227,
"afs_syscall" },
619 { 230,
"_newselect" },
624 { 235,
"fstatfs64" },
629 { 240,
"munlockall" },
630 { 241,
"sched_setparam" },
631 { 242,
"sched_getparam" },
632 { 243,
"sched_setscheduler" },
633 { 244,
"sched_getscheduler" },
634 { 245,
"sched_yield" },
635 { 246,
"sched_get_priority_max" },
636 { 247,
"sched_get_priority_min" },
637 { 248,
"sched_rr_get_interval" },
638 { 249,
"nanosleep" },
639 { 250,
"mremap", mremapFunc<SparcLinux> },
642 { 253,
"fdatasync" },
643 { 254,
"nfsservctl" },
645 { 256,
"clock_settime" },
646 { 257,
"clock_gettime" },
647 { 258,
"clock_getres" },
648 { 259,
"clock_nanosleep" },
649 { 260,
"sched_getaffinity" },
650 { 261,
"sched_setaffinity" },
651 { 262,
"timer_settime" },
652 { 263,
"timer_gettime" },
653 { 264,
"timer_getoverrun" },
654 { 265,
"timer_delete" },
655 { 266,
"timer_create" },
658 { 269,
"io_destroy" },
659 { 270,
"io_submit" },
660 { 271,
"io_cancel" },
661 { 272,
"io_getevents" },
663 { 274,
"mq_unlink" },
664 { 275,
"mq_timedsend" },
665 { 276,
"mq_timedreceive" },
666 { 277,
"mq_notify" },
667 { 278,
"mq_getsetattr" },
669 { 280,
"sys_setaltroot" },
671 { 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.
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.
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.
SyscallReturn munmapFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> start, size_t length)
Target munmap() handler.
SyscallReturn readlinkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, VPtr<> buf_ptr, size_t bufsiz)
Target readlink() 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 Tue Sep 21 2021 12:24:51 for gem5 by doxygen 1.8.17