Go to the documentation of this file.
62 warn(
"Unknown operating system; assuming Linux.");
73 PowerLinuxObjectFileLoader loader;
83 strcpy(
name->sysname,
"Linux");
84 strcpy(
name->nodename,
"sim.gem5.org");
85 strcpy(
name->release, process->release.c_str());
86 strcpy(
name->version,
"#1 Mon Aug 18 11:32:15 EDT 2003");
87 strcpy(
name->machine,
"power");
96 { 3,
"read", readFunc<PowerLinux> },
97 { 4,
"write", writeFunc<PowerLinux> },
98 { 5,
"open", openFunc<PowerLinux> },
106 { 13,
"time", timeFunc<PowerLinux> },
108 { 15,
"chmod", chmodFunc<PowerLinux> },
136 { 43,
"times", timesFunc<PowerLinux> },
147 { 54,
"ioctl", ioctlFunc<PowerLinux> },
165 { 72,
"sigsuspend" },
166 { 73,
"sigpending" },
171 { 78,
"gettimeofday" },
172 { 79,
"settimeofday" },
175 { 82,
"reserved#82" },
183 { 90,
"mmap", mmapFunc<PowerLinux> },
189 { 96,
"getpriority" },
190 { 97,
"setpriority" },
195 { 102,
"socketcall" },
197 { 104,
"setitimer" },
198 { 105,
"getitimer" },
199 { 106,
"stat", statFunc<PowerLinux> },
201 { 108,
"fstat", fstatFunc<PowerLinux> },
202 { 109,
"unused#109" },
212 { 119,
"sigreturn" },
214 { 121,
"setdomainname" },
216 { 123,
"modify_ldt" },
219 { 126,
"sigprocmask" },
220 { 127,
"create_module" },
221 { 128,
"init_module" },
222 { 129,
"delete_module" },
223 { 130,
"get_kernel_syms" },
229 { 136,
"personality" },
230 { 137,
"afs_syscall" },
235 { 142,
"newselect" },
239 { 146,
"writev", writevFunc<PowerLinux> },
241 { 148,
"fdatasync" },
246 { 153,
"munlockall" },
247 { 154,
"sched_setparam" },
248 { 155,
"sched_getparam" },
249 { 156,
"sched_setscheduler" },
250 { 157,
"sched_getscheduler" },
251 { 158,
"sched_yield" },
252 { 159,
"sched_get_priority_max" },
253 { 160,
"sched_get_priority_min" },
254 { 161,
"sched_rr_get_interval" },
255 { 162,
"nanosleep" },
257 { 164,
"setresuid" },
258 { 165,
"getresuid" },
260 { 167,
"query_module" },
262 { 169,
"nfsservctl" },
263 { 170,
"setresgid" },
264 { 171,
"getresgid" },
267 { 174,
"rt_sigprocmask" },
268 { 175,
"unknown#175" },
269 { 176,
"rt_sigpending" },
270 { 177,
"rt_sigtimedwait" },
272 { 179,
"rt_sigsuspend" },
279 { 186,
"sigaltstack" },
284 { 191,
"getrlimit" },
285 { 192,
"mmap2", mmapFunc<PowerLinux> },
286 { 193,
"truncate64" },
288 { 195,
"stat64", stat64Func<PowerLinux> },
289 { 196,
"lstat64", lstat64Func<PowerLinux> },
290 { 197,
"fstat64", fstat64Func<PowerLinux> },
298 { 205,
"getgroups" },
299 { 206,
"setgroups" },
301 { 208,
"setresuid" },
302 { 209,
"getresuid" },
303 { 210,
"setresgid" },
304 { 211,
"getresgid" },
310 { 217,
"getdents64" },
311 { 218,
"pivot_root" },
314 { 221,
"unknown#221" },
316 { 223,
"unknown#223" },
318 { 225,
"readahead" },
320 { 227,
"lsetxattr" },
321 { 228,
"fsetxattr" },
323 { 230,
"lgetxattr" },
324 { 231,
"fgetxattr" },
325 { 232,
"listxattr" },
326 { 233,
"llistxattr" },
328 { 235,
"removexattr" },
329 { 236,
"lremovexattr" },
330 { 237,
"fremovexattr" },
332 { 239,
"sendfile64" },
334 { 241,
"sched_setaffinity" },
335 { 242,
"sched_getaffinity" },
337 { 244,
"io_destory" },
338 { 245,
"io_getevents" },
339 { 246,
"io_submit" },
340 { 247,
"io_cancel" },
341 { 248,
"unknown#248" },
342 { 249,
"lookup_dcookie" },
343 { 250,
"epoll_create" },
344 { 251,
"epoll_ctl" },
345 { 252,
"epoll_wait" },
346 { 253,
"remap_file_pages" },
347 { 254,
"set_thread_area" },
348 { 255,
"get_thread_area" },
349 { 256,
"set_tid_address" },
350 { 257,
"timer_create" },
351 { 258,
"timer_settime" },
352 { 259,
"timer_gettime" },
353 { 260,
"timer_getoverrun" },
354 { 261,
"timer_delete" },
355 { 262,
"clock_settime" },
356 { 263,
"clock_gettime" },
357 { 264,
"clock_getres" },
358 { 265,
"clock_nanosleep" },
360 { 267,
"fstatfs64" },
363 { 270,
"arm_fadvise64_64" },
364 { 271,
"pciconfig_iobase" },
365 { 272,
"pciconfig_read" },
366 { 273,
"pciconfig_write" },
368 { 275,
"mq_unlink" },
369 { 276,
"mq_timedsend" },
370 { 277,
"mq_timedreceive" },
371 { 278,
"mq_notify" },
372 { 279,
"mq_getsetattr" },
379 { 286,
"getsockname" },
380 { 287,
"getpeername" },
381 { 288,
"socketpair" },
387 { 294,
"setsockopt" },
388 { 295,
"getsockopt" },
403 { 310,
"request_key" },
405 { 312,
"semtimedop" },
407 { 314,
"ioprio_set" },
408 { 315,
"ioprio_get" },
409 { 316,
"inotify_init" },
410 { 317,
"inotify_add_watch" },
411 { 318,
"inotify_rm_watch" },
413 { 320,
"get_mempolicy" },
414 { 321,
"set_mempolicy" },
419 { 326,
"futimesat" },
420 { 327,
"fstatat64" },
424 { 331,
"symlinkat" },
425 { 332,
"readlinkat" },
427 { 334,
"faccessat" },
431 { 338,
"set_robust_list" },
432 { 339,
"get_robust_list" },
434 { 341,
"arm_sync_file_range" },
437 { 344,
"move_pages" },
439 { 346,
"epoll_pwait" },
SyscallReturn geteuidFunc(SyscallDesc *desc, ThreadContext *tc)
Target geteuid() handler.
SyscallReturn munmapFunc(SyscallDesc *desc, ThreadContext *tc, Addr start, size_t length)
Target munmap() handler.
Each instance of a Loader subclass will have a chance to try to load an object file when tryLoaders i...
SyscallReturn dupFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
FIXME: The file description is not shared among file descriptors created with dup.
SyscallReturn ignoreFunc(SyscallDesc *desc, ThreadContext *tc)
Handler for unimplemented syscalls that we never intend to implement (signal handling,...
SyscallReturn getpagesizeFunc(SyscallDesc *desc, ThreadContext *tc)
Target getpagesize() handler.
SyscallReturn chownFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, uint32_t owner, uint32_t group)
Target chown() handler.
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
SyscallReturn unlinkFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname)
Target unlink() handler.
SyscallReturn getegidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getegid() handler.
virtual Process * getProcessPtr()=0
SyscallReturn ftruncateFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, off_t length)
Target ftruncate() handler.
SyscallReturn umaskFunc(SyscallDesc *desc, ThreadContext *tc)
Target umask() handler.
virtual void syscall(ThreadContext *tc)
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.
void syscall(ThreadContext *tc) override
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
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 truncateFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, off_t length)
Target truncate() handler.
static SyscallReturn unameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
SyscallReturn ftruncate64Func(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int64_t length)
Target ftruncate64() handler.
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 doSyscall(ThreadContext *tc)
Interface for invoking the system call funcion pointer.
SyscallReturn fcntlFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd, GuestABI::VarArgs< int > varargs)
Target fcntl() handler.
SyscallReturn getuidFunc(SyscallDesc *desc, ThreadContext *tc)
PowerLinuxProcess(ProcessParams *params, ::Loader::ObjectFile *objFile)
SyscallReturn closeFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
Target close() handler.
Overload hash function for BasicBlockRange type.
static SyscallDescTable< SyscallABI > syscallDescs
Syscall descriptors, indexed by call number.
SyscallReturn gethostnameFunc(SyscallDesc *desc, ThreadContext *tc, Addr buf_ptr, int name_len)
Target gethostname() handler.
SyscallReturn fcntl64Func(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd)
Target fcntl64() handler.
SyscallDesc * get(int num, bool fatal_if_missing=true)
virtual RegVal readIntReg(RegIndex reg_idx) const =0
SyscallReturn getgidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getgid() handler.
A process with emulated PPC/Linux syscalls.
This class provides the wrapper interface for the system call implementations which are defined in th...
Generated on Wed Sep 30 2020 14:01:59 for gem5 by doxygen 1.8.17