gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
process.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2005 The Regents of The University of Michigan
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met: redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  *
28  * Authors: Ali Saidi
29  */
30 
32 
33 #include "arch/sparc/isa_traits.hh"
34 #include "arch/sparc/registers.hh"
35 #include "base/trace.hh"
36 #include "cpu/thread_context.hh"
37 #include "kern/solaris/solaris.hh"
38 #include "sim/process.hh"
39 #include "sim/syscall_desc.hh"
40 #include "sim/syscall_emul.hh"
41 
42 using namespace std;
43 using namespace SparcISA;
44 
45 
47 static SyscallReturn
48 unameFunc(SyscallDesc *desc, int callnum, Process *process,
49  ThreadContext *tc)
50 {
51  int index = 0;
53 
54  strcpy(name->sysname, "SunOS");
55  strcpy(name->nodename, "m5.eecs.umich.edu");
56  strcpy(name->release, "5.9"); //?? do we want this or something newer?
57  strcpy(name->version, "Generic_118558-21");
58  strcpy(name->machine, "sun4u");
59 
60  name.copyOut(tc->getMemProxy());
61 
62  return 0;
63 }
64 
65 
66 SyscallDesc SparcSolarisProcess::syscallDescs[] = {
67  /* 0 */ SyscallDesc("syscall", unimplementedFunc),
68  /* 1 */ SyscallDesc("exit", exitFunc),
69  /* 2 */ SyscallDesc("fork", unimplementedFunc),
70  /* 3 */ SyscallDesc("read", readFunc),
71  /* 4 */ SyscallDesc("write", writeFunc),
72  /* 5 */ SyscallDesc("open", openFunc<SparcSolaris>),
73  /* 6 */ SyscallDesc("close", closeFunc),
74  /* 7 */ SyscallDesc("wait", unimplementedFunc),
75  /* 8 */ SyscallDesc("creat", unimplementedFunc),
76  /* 9 */ SyscallDesc("link", unimplementedFunc),
77  /* 10 */ SyscallDesc("unlink", unlinkFunc),
78  /* 11 */ SyscallDesc("exec", unimplementedFunc),
79  /* 12 */ SyscallDesc("chdir", unimplementedFunc),
80  /* 13 */ SyscallDesc("time", unimplementedFunc),
81  /* 14 */ SyscallDesc("mknod", unimplementedFunc),
82  /* 15 */ SyscallDesc("chmod", chmodFunc<Solaris>),
83  /* 16 */ SyscallDesc("chown", chownFunc),
84  /* 17 */ SyscallDesc("brk", brkFunc),
85  /* 18 */ SyscallDesc("stat", unimplementedFunc),
86  /* 19 */ SyscallDesc("lseek", lseekFunc),
87  /* 20 */ SyscallDesc("getpid", getpidFunc),
88  /* 21 */ SyscallDesc("mount", unimplementedFunc),
89  /* 22 */ SyscallDesc("umount", unimplementedFunc),
90  /* 23 */ SyscallDesc("setuid", setuidFunc),
91  /* 24 */ SyscallDesc("getuid", getuidFunc),
92  /* 25 */ SyscallDesc("stime", unimplementedFunc),
93  /* 26 */ SyscallDesc("pcsample", unimplementedFunc),
94  /* 27 */ SyscallDesc("alarm", unimplementedFunc),
95  /* 28 */ SyscallDesc("fstat", fstatFunc<SparcSolaris>),
96  /* 29 */ SyscallDesc("pause", unimplementedFunc),
97  /* 30 */ SyscallDesc("utime", unimplementedFunc),
98  /* 31 */ SyscallDesc("stty", unimplementedFunc),
99  /* 32 */ SyscallDesc("gtty", unimplementedFunc),
100  /* 33 */ SyscallDesc("access", unimplementedFunc),
101  /* 34 */ SyscallDesc("nice", unimplementedFunc),
102  /* 35 */ SyscallDesc("statfs", unimplementedFunc),
103  /* 36 */ SyscallDesc("sync", unimplementedFunc),
104  /* 37 */ SyscallDesc("kill", unimplementedFunc),
105  /* 38 */ SyscallDesc("fstatfs", unimplementedFunc),
106  /* 39 */ SyscallDesc("pgrpsys", unimplementedFunc),
107  /* 40 */ SyscallDesc("xenix", unimplementedFunc),
108  /* 41 */ SyscallDesc("dup", unimplementedFunc),
109  /* 42 */ SyscallDesc("pipe", pipePseudoFunc),
110  /* 43 */ SyscallDesc("times", unimplementedFunc),
111  /* 44 */ SyscallDesc("profil", unimplementedFunc),
112  /* 45 */ SyscallDesc("plock", unimplementedFunc),
113  /* 46 */ SyscallDesc("setgid", unimplementedFunc),
114  /* 47 */ SyscallDesc("getgid", getgidFunc),
115  /* 48 */ SyscallDesc("signal", unimplementedFunc),
116  /* 49 */ SyscallDesc("msgsys", unimplementedFunc),
117  /* 50 */ SyscallDesc("syssun", unimplementedFunc),
118  /* 51 */ SyscallDesc("acct", unimplementedFunc),
119  /* 52 */ SyscallDesc("shmsys", unimplementedFunc),
120  /* 53 */ SyscallDesc("semsys", unimplementedFunc),
121  /* 54 */ SyscallDesc("ioctl", unimplementedFunc),
122  /* 55 */ SyscallDesc("uadmin", unimplementedFunc),
123  /* 56 */ SyscallDesc("RESERVED", unimplementedFunc),
124  /* 57 */ SyscallDesc("utssys", unimplementedFunc),
125  /* 58 */ SyscallDesc("fdsync", unimplementedFunc),
126  /* 59 */ SyscallDesc("execve", unimplementedFunc),
127  /* 60 */ SyscallDesc("umask", umaskFunc),
128  /* 61 */ SyscallDesc("chroot", unimplementedFunc),
129  /* 62 */ SyscallDesc("fcntl", unimplementedFunc),
130  /* 63 */ SyscallDesc("ulimit", unimplementedFunc),
131  /* 64 */ SyscallDesc("reserved_64", unimplementedFunc),
132  /* 65 */ SyscallDesc("reserved_65", unimplementedFunc),
133  /* 66 */ SyscallDesc("reserved_66", unimplementedFunc),
134  /* 67 */ SyscallDesc("reserved_67", unimplementedFunc),
135  /* 68 */ SyscallDesc("reserved_68", unimplementedFunc),
136  /* 69 */ SyscallDesc("reserved_69", unimplementedFunc),
137  /* 70 */ SyscallDesc("tasksys", unimplementedFunc),
138  /* 71 */ SyscallDesc("acctctl", unimplementedFunc),
139  /* 72 */ SyscallDesc("reserved_72", unimplementedFunc),
140  /* 73 */ SyscallDesc("getpagesizes", unimplementedFunc),
141  /* 74 */ SyscallDesc("rctlsys", unimplementedFunc),
142  /* 75 */ SyscallDesc("issetugid", unimplementedFunc),
143  /* 76 */ SyscallDesc("fsat", unimplementedFunc),
144  /* 77 */ SyscallDesc("lwp_park", unimplementedFunc),
145  /* 78 */ SyscallDesc("sendfilev", unimplementedFunc),
146  /* 79 */ SyscallDesc("rmdir", unimplementedFunc),
147  /* 80 */ SyscallDesc("mkdir", unimplementedFunc),
148  /* 81 */ SyscallDesc("getdents", unimplementedFunc),
149  /* 82 */ SyscallDesc("reserved_82", unimplementedFunc),
150  /* 83 */ SyscallDesc("reserved_83", unimplementedFunc),
151  /* 84 */ SyscallDesc("sysfs", unimplementedFunc),
152  /* 85 */ SyscallDesc("getmsg", unimplementedFunc),
153  /* 86 */ SyscallDesc("putmsg", unimplementedFunc),
154  /* 87 */ SyscallDesc("poll", unimplementedFunc),
155  /* 88 */ SyscallDesc("lstat", unimplementedFunc),
156  /* 89 */ SyscallDesc("symlink", unimplementedFunc),
157  /* 90 */ SyscallDesc("readlink", readlinkFunc),
158  /* 91 */ SyscallDesc("setgroups", unimplementedFunc),
159  /* 92 */ SyscallDesc("getgroups", unimplementedFunc),
160  /* 93 */ SyscallDesc("fchmod", unimplementedFunc),
161  /* 94 */ SyscallDesc("fchown", unimplementedFunc),
162  /* 95 */ SyscallDesc("sigprocmask", unimplementedFunc),
163  /* 96 */ SyscallDesc("sigsuspend", unimplementedFunc),
164  /* 97 */ SyscallDesc("sigaltstack", unimplementedFunc),
165  /* 98 */ SyscallDesc("sigaction", unimplementedFunc),
166  /* 99 */ SyscallDesc("sigpending", unimplementedFunc),
167  /* 100 */ SyscallDesc("context", unimplementedFunc),
168  /* 101 */ SyscallDesc("evsys", unimplementedFunc),
169  /* 102 */ SyscallDesc("evtrapret", unimplementedFunc),
170  /* 103 */ SyscallDesc("statvfs", unimplementedFunc),
171  /* 104 */ SyscallDesc("fstatvfs", unimplementedFunc),
172  /* 105 */ SyscallDesc("getloadavg", unimplementedFunc),
173  /* 106 */ SyscallDesc("nfssys", unimplementedFunc),
174  /* 107 */ SyscallDesc("waitsys", unimplementedFunc),
175  /* 108 */ SyscallDesc("sigsendsys", unimplementedFunc),
176  /* 109 */ SyscallDesc("hrtsys", unimplementedFunc),
177  /* 110 */ SyscallDesc("acancel", unimplementedFunc),
178  /* 111 */ SyscallDesc("async", unimplementedFunc),
179  /* 112 */ SyscallDesc("priocntlsys", unimplementedFunc),
180  /* 113 */ SyscallDesc("pathconf", unimplementedFunc),
181  /* 114 */ SyscallDesc("mincore", unimplementedFunc),
182  /* 115 */ SyscallDesc("mmap", mmapFunc<SparcSolaris>),
183  /* 116 */ SyscallDesc("mprotect", unimplementedFunc),
184  /* 117 */ SyscallDesc("munmap", munmapFunc),
185  /* 118 */ SyscallDesc("fpathconf", unimplementedFunc),
186  /* 119 */ SyscallDesc("vfork", unimplementedFunc),
187  /* 120 */ SyscallDesc("fchdir", unimplementedFunc),
188  /* 121 */ SyscallDesc("readv", unimplementedFunc),
189  /* 122 */ SyscallDesc("writev", unimplementedFunc),
190  /* 123 */ SyscallDesc("xstat", unimplementedFunc),
191  /* 124 */ SyscallDesc("lxstat", unimplementedFunc),
192  /* 125 */ SyscallDesc("fxstat", unimplementedFunc),
193  /* 126 */ SyscallDesc("xmknod", unimplementedFunc),
194  /* 127 */ SyscallDesc("clocal", unimplementedFunc),
195  /* 128 */ SyscallDesc("setrlimit", unimplementedFunc),
196  /* 129 */ SyscallDesc("getrlimit", unimplementedFunc),
197  /* 130 */ SyscallDesc("lchown", unimplementedFunc),
198  /* 131 */ SyscallDesc("memcntl", unimplementedFunc),
199  /* 132 */ SyscallDesc("getpmsg", unimplementedFunc),
200  /* 133 */ SyscallDesc("putpmsg", unimplementedFunc),
201  /* 134 */ SyscallDesc("rename", unimplementedFunc),
202  /* 135 */ SyscallDesc("uname", unameFunc),
203  /* 136 */ SyscallDesc("setegid", unimplementedFunc),
204  /* 137 */ SyscallDesc("sysconfig", unimplementedFunc),
205  /* 138 */ SyscallDesc("adjtime", unimplementedFunc),
206  /* 139 */ SyscallDesc("systeminfo", unimplementedFunc),
207  /* 140 */ SyscallDesc("reserved_140", unimplementedFunc),
208  /* 141 */ SyscallDesc("seteuid", unimplementedFunc),
209  /* 142 */ SyscallDesc("vtrace", unimplementedFunc),
210  /* 143 */ SyscallDesc("fork1", unimplementedFunc),
211  /* 144 */ SyscallDesc("sigtimedwait", unimplementedFunc),
212  /* 145 */ SyscallDesc("lwp_info", unimplementedFunc),
213  /* 146 */ SyscallDesc("yield", unimplementedFunc),
214  /* 147 */ SyscallDesc("lwp_sema_wait", unimplementedFunc),
215  /* 148 */ SyscallDesc("lwp_sema_post", unimplementedFunc),
216  /* 149 */ SyscallDesc("lwp_sema_trywait", unimplementedFunc),
217  /* 150 */ SyscallDesc("lwp_detach", unimplementedFunc),
218  /* 151 */ SyscallDesc("corectl", unimplementedFunc),
219  /* 152 */ SyscallDesc("modctl", unimplementedFunc),
220  /* 153 */ SyscallDesc("fchroot", unimplementedFunc),
221  /* 154 */ SyscallDesc("utimes", unimplementedFunc),
222  /* 155 */ SyscallDesc("vhangup", unimplementedFunc),
223  /* 156 */ SyscallDesc("gettimeofday", unimplementedFunc),
224  /* 157 */ SyscallDesc("getitimer", unimplementedFunc),
225  /* 158 */ SyscallDesc("setitimer", unimplementedFunc),
226  /* 159 */ SyscallDesc("lwp_create", unimplementedFunc),
227  /* 160 */ SyscallDesc("lwp_exit", unimplementedFunc),
228  /* 161 */ SyscallDesc("lwp_suspend", unimplementedFunc),
229  /* 162 */ SyscallDesc("lwp_continue", unimplementedFunc),
230  /* 163 */ SyscallDesc("lwp_kill", unimplementedFunc),
231  /* 164 */ SyscallDesc("lwp_self", unimplementedFunc),
232  /* 165 */ SyscallDesc("lwp_setprivate", unimplementedFunc),
233  /* 166 */ SyscallDesc("lwp_getprivate", unimplementedFunc),
234  /* 167 */ SyscallDesc("lwp_wait", unimplementedFunc),
235  /* 168 */ SyscallDesc("lwp_mutex_wakeup", unimplementedFunc),
236  /* 169 */ SyscallDesc("lwp_mutex_lock", unimplementedFunc),
237  /* 170 */ SyscallDesc("lwp_cond_wait", unimplementedFunc),
238  /* 171 */ SyscallDesc("lwp_cond_signal", unimplementedFunc),
239  /* 172 */ SyscallDesc("lwp_cond_broadcast", unimplementedFunc),
240  /* 173 */ SyscallDesc("pread", unimplementedFunc),
241  /* 174 */ SyscallDesc("pwrite", unimplementedFunc),
242  /* 175 */ SyscallDesc("llseek", unimplementedFunc),
243  /* 176 */ SyscallDesc("inst_sync", unimplementedFunc),
244  /* 177 */ SyscallDesc("srmlimitsys", unimplementedFunc),
245  /* 178 */ SyscallDesc("kaio", unimplementedFunc),
246  /* 179 */ SyscallDesc("cpc", unimplementedFunc),
247  /* 180 */ SyscallDesc("lgrpsys_meminfosys", unimplementedFunc),
248  /* 181 */ SyscallDesc("rusagesys", unimplementedFunc),
249  /* 182 */ SyscallDesc("reserved_182", unimplementedFunc),
250  /* 183 */ SyscallDesc("reserved_183", unimplementedFunc),
251  /* 184 */ SyscallDesc("tsolsys", unimplementedFunc),
252  /* 185 */ SyscallDesc("acl", unimplementedFunc),
253  /* 186 */ SyscallDesc("auditsys", unimplementedFunc),
254  /* 187 */ SyscallDesc("processor_bind", unimplementedFunc),
255  /* 188 */ SyscallDesc("processor_info", unimplementedFunc),
256  /* 189 */ SyscallDesc("p_online", unimplementedFunc),
257  /* 190 */ SyscallDesc("sigqueue", unimplementedFunc),
258  /* 191 */ SyscallDesc("clock_gettime", unimplementedFunc),
259  /* 192 */ SyscallDesc("clock_settime", unimplementedFunc),
260  /* 193 */ SyscallDesc("clock_getres", unimplementedFunc),
261  /* 194 */ SyscallDesc("timer_create", unimplementedFunc),
262  /* 195 */ SyscallDesc("timer_delete", unimplementedFunc),
263  /* 196 */ SyscallDesc("timer_settime", unimplementedFunc),
264  /* 197 */ SyscallDesc("timer_gettime", unimplementedFunc),
265  /* 198 */ SyscallDesc("timer_getoverrun", unimplementedFunc),
266  /* 199 */ SyscallDesc("nanosleep", unimplementedFunc),
267  /* 200 */ SyscallDesc("facl", unimplementedFunc),
268  /* 201 */ SyscallDesc("door", unimplementedFunc),
269  /* 202 */ SyscallDesc("setreuid", unimplementedFunc),
270  /* 203 */ SyscallDesc("setregid", unimplementedFunc),
271  /* 204 */ SyscallDesc("install_utrap", unimplementedFunc),
272  /* 205 */ SyscallDesc("signotify", unimplementedFunc),
273  /* 206 */ SyscallDesc("schedctl", unimplementedFunc),
274  /* 207 */ SyscallDesc("pset", unimplementedFunc),
275  /* 208 */ SyscallDesc("sparc_utrap_install", unimplementedFunc),
276  /* 209 */ SyscallDesc("resolvepath", unimplementedFunc),
277  /* 210 */ SyscallDesc("signotifywait", unimplementedFunc),
278  /* 211 */ SyscallDesc("lwp_sigredirect", unimplementedFunc),
279  /* 212 */ SyscallDesc("lwp_alarm", unimplementedFunc),
280  /* 213 */ SyscallDesc("getdents64", unimplementedFunc),
281  /* 214 */ SyscallDesc("mmap64", unimplementedFunc),
282  /* 215 */ SyscallDesc("stat64", unimplementedFunc),
283  /* 216 */ SyscallDesc("lstat64", unimplementedFunc),
284  /* 217 */ SyscallDesc("fstat64", unimplementedFunc),
285  /* 218 */ SyscallDesc("statvfs64", unimplementedFunc),
286  /* 219 */ SyscallDesc("fstatvfs64", unimplementedFunc),
287  /* 220 */ SyscallDesc("setrlimit64", unimplementedFunc),
288  /* 221 */ SyscallDesc("getrlimit64", unimplementedFunc),
289  /* 222 */ SyscallDesc("pread64", unimplementedFunc),
290  /* 223 */ SyscallDesc("pwrite64", unimplementedFunc),
291  /* 224 */ SyscallDesc("creat64", unimplementedFunc),
292  /* 225 */ SyscallDesc("open64", unimplementedFunc),
293  /* 226 */ SyscallDesc("rpcsys", unimplementedFunc),
294  /* 227 */ SyscallDesc("reserved_227", unimplementedFunc),
295  /* 228 */ SyscallDesc("reserved_228", unimplementedFunc),
296  /* 229 */ SyscallDesc("reserved_229", unimplementedFunc),
297  /* 230 */ SyscallDesc("so_socket", unimplementedFunc),
298  /* 231 */ SyscallDesc("so_socketpair", unimplementedFunc),
299  /* 232 */ SyscallDesc("bind", unimplementedFunc),
300  /* 233 */ SyscallDesc("listen", unimplementedFunc),
301  /* 234 */ SyscallDesc("accept", unimplementedFunc),
302  /* 235 */ SyscallDesc("connect", unimplementedFunc),
303  /* 236 */ SyscallDesc("shutdown", unimplementedFunc),
304  /* 237 */ SyscallDesc("recv", unimplementedFunc),
305  /* 238 */ SyscallDesc("recvfrom", unimplementedFunc),
306  /* 239 */ SyscallDesc("recvmsg", unimplementedFunc),
307  /* 240 */ SyscallDesc("send", unimplementedFunc),
308  /* 241 */ SyscallDesc("sendmsg", unimplementedFunc),
309  /* 242 */ SyscallDesc("sendto", unimplementedFunc),
310  /* 243 */ SyscallDesc("getpeername", unimplementedFunc),
311  /* 244 */ SyscallDesc("getsockname", unimplementedFunc),
312  /* 245 */ SyscallDesc("getsockopt", unimplementedFunc),
313  /* 246 */ SyscallDesc("setsockopt", unimplementedFunc),
314  /* 247 */ SyscallDesc("sockconfig", unimplementedFunc),
315  /* 248 */ SyscallDesc("ntp_gettime", unimplementedFunc),
316  /* 249 */ SyscallDesc("ntp_adjtime", unimplementedFunc),
317  /* 250 */ SyscallDesc("lwp_mutex_unlock", unimplementedFunc),
318  /* 251 */ SyscallDesc("lwp_mutex_trylock", unimplementedFunc),
319  /* 252 */ SyscallDesc("lwp_mutex_init", unimplementedFunc),
320  /* 253 */ SyscallDesc("cladm", unimplementedFunc),
321  /* 254 */ SyscallDesc("lwp_sigtimedwait", unimplementedFunc),
322  /* 255 */ SyscallDesc("umount2", unimplementedFunc)
323 };
324 
325 SparcSolarisProcess::SparcSolarisProcess(ProcessParams * params,
326  ObjectFile *objFile)
327  : Sparc64Process(params, objFile),
328  Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(SyscallDesc))
329 {
330  // The sparc syscall table must be <= 284 entries because that is all there
331  // is space for.
332  assert(Num_Syscall_Descs <= 284);
333 }
334 
335 
336 
339 {
340  if (callnum < 0 || callnum >= Num_Syscall_Descs)
341  return NULL;
342  return &syscallDescs[callnum];
343 }
Bitfield< 30, 0 > index
SyscallReturn brkFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc)
Target brk() handler: set brk address.
const std::string & name()
Definition: trace.cc:49
SyscallReturn readlinkFunc(SyscallDesc *desc, int callnum, Process *process, ThreadContext *tc)
virtual TheISA::IntReg getSyscallArg(ThreadContext *tc, int &i)=0
SyscallReturn getpidFunc(SyscallDesc *desc, int callnum, Process *process, ThreadContext *tc)
Target getpid() handler.
TypedBufferArg is a class template; instances of this template represent typed buffers in target user...
ThreadContext is the external interface to all thread state for anything outside of the CPU...
SyscallReturn munmapFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc)
Target munmap() handler.
SyscallReturn writeFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc)
Target write() handler.
SyscallReturn unimplementedFunc(SyscallDesc *desc, int callnum, Process *process, ThreadContext *tc)
Handler for unimplemented syscalls that we haven't thought about.
Definition: syscall_emul.cc:57
SyscallReturn lseekFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc)
Target lseek() handler.
SyscallReturn unlinkFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc)
virtual SETranslatingPortProxy & getMemProxy()=0
SyscallReturn setuidFunc(SyscallDesc *desc, int callnum, Process *process, ThreadContext *tc)
Target setuid() handler.
static SyscallDesc syscallDescs[]
Array of syscall descriptors, indexed by call number.
Definition: process.hh:53
This class provides the wrapper interface for the system call implementations which are defined in th...
Definition: syscall_desc.hh:63
SyscallReturn getgidFunc(SyscallDesc *desc, int callnum, Process *process, ThreadContext *tc)
Target getgid() handler.
SyscallReturn pipePseudoFunc(SyscallDesc *desc, int callnum, Process *process, ThreadContext *tc)
Pseudo Funcs - These functions use a different return convension, returning a second value in a regis...
This file defines objects used to emulate syscalls from the target application on the host machine...
SyscallReturn getuidFunc(SyscallDesc *desc, int callnum, Process *process, ThreadContext *tc)
Target getuid() handler.
SyscallReturn umaskFunc(SyscallDesc *desc, int num, Process *process, ThreadContext *tc)
Target umask() handler.
SyscallReturn chownFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc)
Target chown() handler.
static SyscallReturn unameFunc(SyscallDesc *desc, int callnum, Process *process, ThreadContext *tc)
Target uname() handler.
Definition: process.cc:48
virtual SyscallDesc * getDesc(int callnum)
Definition: process.cc:338
SyscallReturn exitFunc(SyscallDesc *desc, int callnum, Process *p, ThreadContext *tc)
Target exit() handler: terminate current context.
SyscallReturn closeFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc)
Target close() handler.
This class represents the return value from an emulated system call, including any errno setting...
SyscallReturn readFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc)

Generated on Fri Jun 9 2017 13:03:35 for gem5 by doxygen 1.8.6