gem5 [DEVELOP-FOR-25.0]
Loading...
Searching...
No Matches
se_workload.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Arm Limited
3 *
4 * The license below extends only to copyright in the software and shall
5 * not be construed as granting a license to any other intellectual
6 * property including but not limited to intellectual property relating
7 * to a hardware implementation of the functionality of the software
8 * licensed hereunder. You may use the software subject to the license
9 * terms below provided that you ensure that this notice is replicated
10 * unmodified and in its entirety in all distributions of the software,
11 * modified or unmodified, in source code or in binary form.
12 *
13 * Copyright 2003-2005 The Regents of The University of Michigan
14 * Copyright 2007-2008 The Florida State University
15 * Copyright 2009 The University of Edinburgh
16 * Copyright 2020 Google Inc.
17 * Copyright 2021 IBM Corporation
18 *
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions are
21 * met: redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer;
23 * redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the distribution;
26 * neither the name of the copyright holders nor the names of its
27 * contributors may be used to endorse or promote products derived from
28 * this software without specific prior written permission.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
36 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 */
42
44
45#include <sys/syscall.h>
46
47#include "arch/power/process.hh"
49#include "base/trace.hh"
50#include "cpu/thread_context.hh"
51#include "sim/syscall_emul.hh"
52
53namespace gem5
54{
55
56namespace
57{
58
59class LinuxLoader : public Process::Loader
60{
61 public:
62 Process *
63 load(const ProcessParams &params, loader::ObjectFile *obj) override
64 {
65 auto arch = obj->getArch();
66
67 if (arch != loader::Power && arch != loader::Power64)
68 return nullptr;
69
70 auto opsys = obj->getOpSys();
71
72 if (opsys == loader::UnknownOpSys) {
73 warn("Unknown operating system; assuming Linux.");
74 opsys = loader::Linux;
75 }
76
77 if ((arch == loader::Power && opsys != loader::Linux) ||
78 (arch == loader::Power64 &&
81 return nullptr;
82
83 return new PowerProcess(params, obj);
84 }
85};
86
87LinuxLoader linuxLoader;
88
89} // anonymous namespace
90
91namespace PowerISA
92{
93
94void
96{
97 Process *process = tc->getProcessPtr();
98 // Call the syscall function in the base Process class to update stats.
99 // This will move into the base SEWorkload function at some point.
100 process->Process::syscall(tc);
101
102 syscallDescs.get(tc->getReg(int_reg::R0))->doSyscall(tc);
103}
104
106static SyscallReturn
108{
109 auto process = tc->getProcessPtr();
110
111 strcpy(name->sysname, "Linux");
112 strcpy(name->nodename, "sim.gem5.org");
113 strcpy(name->release, process->release.c_str());
114 strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
115 strcpy(name->machine, "power");
116
117 return 0;
118}
119
121 { 0, "syscall" },
122 { 1, "exit", exitFunc },
123 { 2, "fork" },
124 { 3, "read", readFunc<PowerLinux> },
125 { 4, "write", writeFunc<PowerLinux> },
126 { 5, "open", openFunc<PowerLinux> },
127 { 6, "close", closeFunc },
128 { 7, "waitpid" }, //???
129 { 8, "creat" },
130 { 9, "link" },
131 { 10, "unlink", unlinkFunc },
132 { 11, "execve" },
133 { 12, "chdir" },
134 { 13, "time", timeFunc<PowerLinux> },
135 { 14, "mknod" },
136 { 15, "chmod", chmodFunc<PowerLinux> },
137 { 16, "lchown", chownFunc },
138 { 17, "break", brkFunc }, //???
139 { 18, "unused#18" }, //???
140 { 19, "lseek", lseekFunc<PowerLinux> },
141 { 20, "getpid", getpidFunc },
142 { 21, "mount" },
143 { 22, "umount" },
144 { 23, "setuid", ignoreFunc },
145 { 24, "getuid", getuidFunc },
146 { 25, "stime" },
147 { 26, "ptrace" },
148 { 27, "alarm" },
149 { 28, "unused#28" },
150 { 29, "pause" },
151 { 30, "utime" },
152 { 31, "stty" },
153 { 32, "gtty" },
154 { 33, "access" },
155 { 34, "nice" },
156 { 35, "ftime" },
157 { 36, "sync" },
158 { 37, "kill", ignoreFunc },
159 { 38, "rename", renameFunc },
160 { 39, "mkdir" },
161 { 40, "rmdir" },
162 { 41, "dup", dupFunc },
163 { 42, "pipe" },
164 { 43, "times", timesFunc<PowerLinux> },
165 { 44, "prof" },
166 { 45, "brk", brkFunc },
167 { 46, "setgid" },
168 { 47, "getgid", getgidFunc },
169 { 48, "signal", ignoreFunc },
170 { 49, "geteuid", geteuidFunc },
171 { 50, "getegid", getegidFunc },
172 { 51, "acct" },
173 { 52, "umount2" },
174 { 53, "lock" },
175 { 54, "ioctl", ioctlFunc<PowerLinux> },
176 { 55, "fcntl", fcntlFunc },
177 { 56, "mpx" },
178 { 57, "setpgid" },
179 { 58, "ulimit" },
180 { 59, "unused#59" },
181 { 60, "umask", umaskFunc },
182 { 61, "chroot" },
183 { 62, "ustat" },
184 { 63, "dup2" },
185 { 64, "getppid", getpagesizeFunc },
186 { 65, "getpgrp" },
187 { 66, "setsid" },
188 { 67, "sigaction" },
189 { 68, "sgetmask" },
190 { 69, "ssetmask" },
191 { 70, "setreuid" },
192 { 71, "setregid" },
193 { 72, "sigsuspend" },
194 { 73, "sigpending" },
195 { 74, "sethostname", ignoreFunc },
196 { 75, "setrlimit", ignoreFunc },
197 { 76, "getrlimit" },
198 { 77, "getrusage", ignoreFunc },
199 { 78, "gettimeofday" },
200 { 79, "settimeofday" },
201 { 80, "getgroups" },
202 { 81, "setgroups" },
203 { 82, "reserved#82" },
204 { 83, "symlink" },
205 { 84, "unused#84" },
206 { 85, "readlink", readlinkFunc<PowerLinux> },
207 { 86, "uselib" },
208 { 87, "swapon", gethostnameFunc },
209 { 88, "reboot" },
210 { 89, "readdir" },
211 { 90, "mmap", mmapFunc<PowerLinux> },
212 { 91, "munmap",munmapFunc<PowerLinux> },
213 { 92, "truncate", truncateFunc<PowerLinux> },
214 { 93, "ftruncate", ftruncateFunc<PowerLinux> },
215 { 94, "fchmod" },
216 { 95, "fchown" },
217 { 96, "getpriority" },
218 { 97, "setpriority" },
219 { 98, "profil" },
220 { 99, "statfs" },
221 { 100, "fstatfs" },
222 { 101, "ioperm" },
223 { 102, "socketcall" },
224 { 103, "syslog" },
225 { 104, "setitimer" },
226 { 105, "getitimer" },
227 { 106, "stat", statFunc<PowerLinux> },
228 { 107, "lstat" },
229 { 108, "fstat", fstatFunc<PowerLinux> },
230 { 109, "unused#109" },
231 { 110, "iopl" },
232 { 111, "vhangup" },
233 { 112, "idle", ignoreFunc },
234 { 113, "vm86" },
235 { 114, "wait4" },
236 { 115, "swapoff" },
237 { 116, "sysinfo" },
238 { 117, "ipc" },
239 { 118, "fsync" },
240 { 119, "sigreturn" },
241 { 120, "clone", cloneBackwardsFunc<PowerLinux> },
242 { 121, "setdomainname" },
243 { 122, "uname", unameFunc },
244 { 123, "modify_ldt" },
245 { 124, "adjtimex" },
246 { 125, "mprotect", ignoreFunc },
247 { 126, "sigprocmask" },
248 { 127, "create_module" },
249 { 128, "init_module" },
250 { 129, "delete_module" },
251 { 130, "get_kernel_syms" },
252 { 131, "quotactl" },
253 { 132, "getpgid" },
254 { 133, "fchdir" },
255 { 134, "bdflush" },
256 { 135, "sysfs" },
257 { 136, "personality" },
258 { 137, "afs_syscall" },
259 { 138, "setfsuid" },
260 { 139, "setfsgid" },
261 { 140, "llseek", _llseekFunc },
262 { 141, "getdents" },
263 { 142, "newselect" },
264 { 143, "flock" },
265 { 144, "msync" },
266 { 145, "readv" },
267 { 146, "writev", writevFunc<PowerLinux> },
268 { 147, "getsid" },
269 { 148, "fdatasync" },
270 { 149, "sysctl" },
271 { 150, "mlock" },
272 { 151, "munlock" },
273 { 152, "mlockall" },
274 { 153, "munlockall" },
275 { 154, "sched_setparam" },
276 { 155, "sched_getparam", sched_getparamFunc },
277 { 156, "sched_setscheduler" },
278 { 157, "sched_getscheduler" },
279 { 158, "sched_yield" },
280 { 159, "sched_get_priority_max" },
281 { 160, "sched_get_priority_min" },
282 { 161, "sched_rr_get_interval" },
283 { 162, "nanosleep" },
284 { 163, "mremap" },
285 { 164, "setresuid" },
286 { 165, "getresuid" },
287 { 166, "vm862" },
288 { 167, "query_module" },
289 { 168, "poll" },
290 { 169, "nfsservctl" },
291 { 170, "setresgid" },
292 { 171, "getresgid" },
293 { 172, "prctl" },
294 { 173, "rt_sigaction", ignoreFunc },
295 { 174, "rt_sigprocmask" },
296 { 175, "unknown#175" },
297 { 176, "rt_sigpending" },
298 { 177, "rt_sigtimedwait" },
299 { 178, "rt_sigqueueinfo", ignoreFunc },
300 { 179, "rt_sigsuspend" },
301 { 180, "pread64" },
302 { 181, "pwrite64" },
303 { 182, "chown" },
304 { 183, "getcwd" },
305 { 184, "capget" },
306 { 185, "capset" },
307 { 186, "sigaltstack" },
308 { 187, "sendfile" },
309 { 188, "getpmsg" },
310 { 189, "putpmsg" },
311 { 190, "ugetrlimit", ignoreFunc },
312 { 191, "getrlimit" },
313 { 192, "mmap2", mmapFunc<PowerLinux> },
314 { 193, "truncate64" },
315 { 194, "ftruncate64", ftruncate64Func },
316 { 195, "stat64", stat64Func<PowerLinux> },
317 { 196, "lstat64", lstat64Func<PowerLinux> },
318 { 197, "fstat64", fstat64Func<PowerLinux> },
319 { 198, "lchown" },
320 { 199, "getuid", getuidFunc },
321 { 200, "getgid", getgidFunc },
322 { 201, "geteuid", geteuidFunc },
323 { 202, "getegid", getegidFunc },
324 { 203, "setreuid" },
325 { 204, "fcntl64", fcntl64Func },
326 { 205, "getgroups" },
327 { 206, "setgroups" },
328 { 207, "fchown" },
329 { 208, "setresuid" },
330 { 209, "getresuid" },
331 { 210, "setresgid" },
332 { 211, "getresgid" },
333 { 212, "chown" },
334 { 213, "setuid" },
335 { 214, "setgid" },
336 { 215, "setfsuid" },
337 { 216, "setfsgid" },
338 { 217, "getdents64" },
339 { 218, "pivot_root" },
340 { 219, "mincore" },
341 { 220, "madvise" },
342 { 221, "unknown#221" },
343 { 222, "tux" },
344 { 223, "unknown#223" },
345 { 224, "gettid" },
346 { 225, "readahead" },
347 { 226, "setxattr" },
348 { 227, "lsetxattr" },
349 { 228, "fsetxattr" },
350 { 229, "getxattr" },
351 { 230, "lgetxattr" },
352 { 231, "fgetxattr" },
353 { 232, "listxattr" },
354 { 233, "llistxattr" },
355 { 234, "exit_group", exitGroupFunc },
356 { 235, "removexattr" },
357 { 236, "lremovexattr" },
358 { 237, "fremovexattr" },
359 { 238, "tkill" },
360 { 239, "sendfile64" },
361 { 240, "futex" },
362 { 241, "sched_setaffinity" },
363 { 242, "sched_getaffinity" },
364 { 243, "io_setup" },
365 { 244, "io_destory" },
366 { 245, "io_getevents" },
367 { 246, "io_submit" },
368 { 247, "io_cancel" },
369 { 248, "unknown#248" },
370 { 249, "lookup_dcookie" },
371 { 250, "epoll_create" },
372 { 251, "epoll_ctl" },
373 { 252, "epoll_wait" },
374 { 253, "remap_file_pages" },
375 { 254, "set_thread_area" },
376 { 255, "get_thread_area" },
377 { 256, "set_tid_address" },
378 { 257, "timer_create" },
379 { 258, "timer_settime" },
380 { 259, "timer_gettime" },
381 { 260, "timer_getoverrun" },
382 { 261, "timer_delete" },
383 { 262, "clock_settime" },
384 { 263, "clock_gettime" },
385 { 264, "clock_getres" },
386 { 265, "clock_nanosleep" },
387 { 266, "statfs64" },
388 { 267, "fstatfs64" },
389 { 268, "tgkill" },
390 { 269, "utimes" },
391 { 270, "arm_fadvise64_64" },
392 { 271, "pciconfig_iobase" },
393 { 272, "pciconfig_read" },
394 { 273, "pciconfig_write" },
395 { 274, "mq_open" },
396 { 275, "mq_unlink" },
397 { 276, "mq_timedsend" },
398 { 277, "mq_timedreceive" },
399 { 278, "mq_notify" },
400 { 279, "mq_getsetattr" },
401 { 280, "waitid" },
402 { 281, "socket" },
403 { 282, "bind" },
404 { 283, "connect" },
405 { 284, "listen" },
406 { 285, "accept" },
407 { 286, "getsockname" },
408 { 287, "getpeername" },
409 { 288, "socketpair" },
410 { 289, "send" },
411 { 290, "sendto" },
412 { 291, "recv" },
413 { 292, "recvfrom" },
414 { 293, "shutdown" },
415 { 294, "setsockopt" },
416 { 295, "getsockopt" },
417 { 296, "sendmsg" },
418 { 297, "rcvmsg" },
419 { 298, "semop" },
420 { 299, "semget" },
421 { 300, "semctl" },
422 { 301, "msgsend" },
423 { 302, "msgrcv" },
424 { 303, "msgget" },
425 { 304, "msgctl" },
426 { 305, "shmat" },
427 { 306, "shmdt" },
428 { 307, "shmget" },
429 { 308, "shmctl" },
430 { 309, "add_key" },
431 { 310, "request_key" },
432 { 311, "keyctl" },
433 { 312, "semtimedop" },
434 { 313, "vserver" },
435 { 314, "ioprio_set" },
436 { 315, "ioprio_get" },
437 { 316, "inotify_init" },
438 { 317, "inotify_add_watch" },
439 { 318, "inotify_rm_watch" },
440 { 319, "mbind" },
441 { 320, "get_mempolicy" },
442 { 321, "set_mempolicy" },
443 { 322, "openat" },
444 { 323, "mkdirat" },
445 { 324, "mknodat" },
446 { 325, "fchownat" },
447 { 326, "futimesat" },
448 { 327, "fstatat64" },
449 { 328, "unlinkat" },
450 { 329, "renameat" },
451 { 330, "linkat" },
452 { 331, "symlinkat" },
453 { 332, "readlinkat" },
454 { 333, "fchmodat" },
455 { 334, "faccessat" },
456 { 335, "pselect6" },
457 { 336, "ppoll" },
458 { 337, "unshare" },
459 { 338, "set_robust_list" },
460 { 339, "get_robust_list" },
461 { 340, "splice" },
462 { 341, "arm_sync_file_range" },
463 { 342, "tee" },
464 { 343, "vmsplice" },
465 { 344, "move_pages" },
466 { 345, "getcpu" },
467 { 346, "epoll_pwait" },
468};
469
470} // namespace PowerISA
471} // namespace gem5
static SyscallDescTable< SyscallABI > syscallDescs
Syscall descriptors, indexed by call number.
static SyscallDescTable< SEWorkload::SyscallABI > syscallDescs
Syscall descriptors, indexed by call number.
void syscall(ThreadContext *tc) override
Each instance of a Loader subclass will have a chance to try to load an object file when tryLoaders i...
Definition process.hh:208
This class provides the wrapper interface for the system call implementations which are defined in th...
This class represents the return value from an emulated system call, including any errno setting.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual RegVal getReg(const RegId &reg) const
virtual Process * getProcessPtr()=0
#define warn(...)
Definition logging.hh:288
constexpr RegId R0
Definition int.hh:105
static SyscallReturn unameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< Linux::utsname > name)
Target uname() handler.
Copyright (c) 2024 Arm Limited All rights reserved.
Definition binary32.hh:36
SyscallReturn exitGroupFunc(SyscallDesc *desc, ThreadContext *tc, int status)
Target exit_group() handler: terminate simulation. (exit all threads)
SyscallReturn fstat64Func(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr< typename OS::tgt_stat64 > tgt_stat)
Target fstat64() handler.
SyscallReturn brkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> new_brk)
Target brk() handler: set brk address.
SyscallReturn mmapFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> start, typename OS::size_t length, int prot, int tgt_flags, int tgt_fd, typename OS::off_t offset)
Target mmap() handler.
SyscallReturn getpidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getpid() handler.
SyscallReturn fstatFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr< typename OS::tgt_stat > tgt_stat)
Target fstat() handler.
SyscallReturn getuidFunc(SyscallDesc *desc, ThreadContext *tc)
SyscallReturn chownFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, uint32_t owner, uint32_t group)
Target chown() handler.
SyscallReturn statFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, VPtr< typename OS::tgt_stat > tgt_stat)
Target stat() handler.
SyscallReturn _llseekFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, uint32_t offset_high, uint32_t offset_low, VPtr<> result_ptr, int whence)
Target _llseek() handler.
SyscallReturn writeFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> buf_ptr, typename OS::size_t nbytes)
SyscallReturn writevFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> tiov_base, typename OS::size_t count)
Target writev() handler.
SyscallReturn chmodFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, mode_t mode)
Target chmod() handler.
SyscallReturn renameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> oldpath, VPtr<> newpath)
Target rename() handler.
SyscallReturn truncateFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, typename OS::off_t length)
Target truncate() handler.
SyscallReturn geteuidFunc(SyscallDesc *desc, ThreadContext *tc)
Target geteuid() handler.
ProxyPtr< T, SETranslatingPortProxy > VPtr
Definition proxy_ptr.hh:400
SyscallReturn unlinkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname)
Target unlink() handler.
SyscallReturn lseekFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, typename OS::off_t offs, int whence)
Target lseek() handler.
SyscallReturn fcntl64Func(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd)
Target fcntl64() handler.
SyscallReturn ftruncateFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, typename OS::off_t length)
Target ftruncate() handler.
SyscallReturn getpagesizeFunc(SyscallDesc *desc, ThreadContext *tc)
Target getpagesize() handler.
SyscallReturn dupFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
FIXME: The file description is not shared among file descriptors created with dup.
SyscallReturn ftruncate64Func(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int64_t length)
Target ftruncate64() handler.
SyscallReturn munmapFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> start, typename OS::size_t length)
Target munmap() handler.
SyscallReturn readlinkFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, VPtr<> buf_ptr, typename OS::size_t bufsiz)
Target readlink() handler.
SyscallReturn timesFunc(SyscallDesc *desc, ThreadContext *tc, VPtr< typename OS::tms > bufp)
Target times() function.
SyscallReturn fcntlFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, int cmd, guest_abi::VarArgs< int > varargs)
Target fcntl() handler.
SyscallReturn openFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, int tgt_flags, int mode)
Target open() handler.
SyscallReturn getegidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getegid() handler.
SyscallReturn timeFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> taddr)
Target time() function.
SyscallReturn ioctlFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, unsigned req, VPtr<> addr)
Target ioctl() handler.
SyscallReturn gethostnameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr<> buf_ptr, int name_len)
Target gethostname() handler.
SyscallReturn cloneBackwardsFunc(SyscallDesc *desc, ThreadContext *tc, RegVal flags, RegVal newStack, VPtr<> ptidPtr, VPtr<> tlsPtr, VPtr<> ctidPtr)
SyscallReturn lstat64Func(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, VPtr< typename OS::tgt_stat64 > tgt_stat)
Target lstat64() handler.
SyscallReturn ignoreFunc(SyscallDesc *desc, ThreadContext *tc)
Handler for unimplemented syscalls that we never intend to implement (signal handling,...
SyscallReturn stat64Func(SyscallDesc *desc, ThreadContext *tc, VPtr<> pathname, VPtr< typename OS::tgt_stat64 > tgt_stat)
Target stat64() handler.
SyscallReturn sched_getparamFunc(SyscallDesc *desc, ThreadContext *tc, int pid, VPtr< int > paramPtr)
SyscallReturn exitFunc(SyscallDesc *desc, ThreadContext *tc, int status)
Target exit() handler: terminate current context.
SyscallReturn getgidFunc(SyscallDesc *desc, ThreadContext *tc)
Target getgid() handler.
SyscallReturn readFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd, VPtr<> buf_ptr, typename OS::size_t nbytes)
SyscallReturn closeFunc(SyscallDesc *desc, ThreadContext *tc, int tgt_fd)
Target close() handler.
SyscallReturn umaskFunc(SyscallDesc *desc, ThreadContext *tc)
Target umask() handler.
This file defines objects used to emulate syscalls from the target application on the host machine.
const std::string & name()
Definition trace.cc:48

Generated on Mon May 26 2025 09:19:05 for gem5 by doxygen 1.13.2