gem5  v20.1.0.0
linux.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007 The Hewlett-Packard Development Company
3  * All rights reserved.
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions are
16  * met: redistributions of source code must retain the above copyright
17  * notice, this list of conditions and the following disclaimer;
18  * redistributions in binary form must reproduce the above copyright
19  * notice, this list of conditions and the following disclaimer in the
20  * documentation and/or other materials provided with the distribution;
21  * neither the name of the copyright holders nor the names of its
22  * contributors may be used to endorse or promote products derived from
23  * this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  */
37 
38 #ifndef __ARCH_X86_LINUX_LINUX_HH__
39 #define __ARCH_X86_LINUX_LINUX_HH__
40 
41 #include "arch/x86/utility.hh"
42 #include "kern/linux/linux.hh"
43 #include "sim/guest_abi.hh"
44 #include "sim/syscall_return.hh"
45 
46 class X86Linux : public Linux
47 {
48  public:
49  static const ByteOrder byteOrder = ByteOrder::little;
50 
51  static void
52  archClone(uint64_t flags,
53  Process *pp, Process *cp,
55  uint64_t stack, uint64_t tls)
56  {
57  X86ISA::copyRegs(ptc, ctc);
58 
59  if (flags & TGT_CLONE_SETTLS) {
62  }
63 
64  if (stack)
66  }
67 
68  class SyscallABI {};
69 };
70 
71 namespace GuestABI
72 {
73 
74 template <typename ABI>
75 struct Result<ABI, SyscallReturn,
76  typename std::enable_if<std::is_base_of<
77  X86Linux::SyscallABI, ABI>::value>::type>
78 {
79  static void
81  {
82  if (ret.suppressed() || ret.needsRetry())
83  return;
84 
85  tc->setIntReg(X86ISA::INTREG_RAX, ret.encodedValue());
86  }
87 };
88 
89 };
90 
91 class X86Linux64 : public X86Linux
92 {
93  public:
94 
95  typedef struct {
96  uint64_t st_dev;
97  uint64_t st_ino;
98  uint64_t st_nlink;
99  uint32_t st_mode;
100  uint32_t st_uid;
101  uint32_t st_gid;
102  uint32_t __pad0;
103  uint64_t st_rdev;
104  int64_t st_size;
105  int64_t st_blksize;
106  int64_t st_blocks;
107  uint64_t st_atimeX;
108  uint64_t st_atime_nsec;
109  uint64_t st_mtimeX;
110  uint64_t st_mtime_nsec;
111  uint64_t st_ctimeX;
112  uint64_t st_ctime_nsec;
113  int64_t unused0[3];
114  } tgt_stat64;
115 
116  typedef struct {
117  long val[2];
118  } tgt_fsid;
119 
120  typedef struct {
121  long f_type;
122  long f_bsize;
123  long f_blocks;
124  long f_bfree;
125  long f_bavail;
126  long f_files;
127  long f_ffree;
129  long f_namelen;
130  long f_frsize;
131  long f_spare[5];
132  } tgt_statfs;
133 
134  static const int TGT_SIGHUP = 0x000001;
135  static const int TGT_SIGINT = 0x000002;
136  static const int TGT_SIGQUIT = 0x000003;
137  static const int TGT_SIGILL = 0x000004;
138  static const int TGT_SIGTRAP = 0x000005;
139  static const int TGT_SIGABRT = 0x000006;
140  static const int TGT_SIGIOT = 0x000006;
141  static const int TGT_SIGBUS = 0x000007;
142  static const int TGT_SIGFPE = 0x000008;
143  static const int TGT_SIGKILL = 0x000009;
144  static const int TGT_SIGUSR1 = 0x00000a;
145  static const int TGT_SIGSEGV = 0x00000b;
146  static const int TGT_SIGUSR2 = 0x00000c;
147  static const int TGT_SIGPIPE = 0x00000d;
148  static const int TGT_SIGALRM = 0x00000e;
149  static const int TGT_SIGTERM = 0x00000f;
150  static const int TGT_SIGSTKFLT = 0x000010;
151  static const int TGT_SIGCHLD = 0x000011;
152  static const int TGT_SIGCONT = 0x000012;
153  static const int TGT_SIGSTOP = 0x000013;
154  static const int TGT_SIGTSTP = 0x000014;
155  static const int TGT_SIGTTIN = 0x000015;
156  static const int TGT_SIGTTOU = 0x000016;
157  static const int TGT_SIGURG = 0x000017;
158  static const int TGT_SIGXCPU = 0x000018;
159  static const int TGT_SIGXFSZ = 0x000019;
160  static const int TGT_SIGVTALRM = 0x00001a;
161  static const int TGT_SIGPROF = 0x00001b;
162  static const int TGT_SIGWINCH = 0x00001c;
163  static const int TGT_SIGIO = 0x00001d;
164  static const int TGT_SIGPOLL = 0x00001d;
165  static const int TGT_SIGPWR = 0x00001e;
166  static const int TGT_SIGSYS = 0x00001f;
167  static const int TGT_SIGUNUSED = 0x00001f;
168 
170 
171  static const int TGT_O_RDONLY = 000000000;
172  static const int TGT_O_WRONLY = 000000001;
173  static const int TGT_O_RDWR = 000000002;
174  static const int TGT_O_CREAT = 000000100;
175  static const int TGT_O_EXCL = 000000200;
176  static const int TGT_O_NOCTTY = 000000400;
177  static const int TGT_O_TRUNC = 000001000;
178  static const int TGT_O_APPEND = 000002000;
179  static const int TGT_O_NONBLOCK = 000004000;
180  static const int TGT_O_DSYNC = 000010000;
181  static const int TGT_FASYNC = 000020000;
182  static const int TGT_O_DIRECT = 000040000;
183  static const int TGT_O_LARGEFILE = 000100000;
184  static const int TGT_O_DIRECTORY = 000200000;
185  static const int TGT_O_NOFOLLOW = 000400000;
186  static const int TGT_O_NOATIME = 001000000;
187  static const int TGT_O_CLOEXEC = 002000000;
188  static const int TGT_O_SYNC = 004010000;
189  static const int TGT_O_PATH = 010000000;
190 
191  static const int NUM_OPEN_FLAGS;
192 
194  typedef uint64_t size_t;
196  typedef uint64_t off_t;
197  typedef int64_t time_t;
198  typedef int64_t clock_t;
200 
201  static const unsigned TGT_MAP_SHARED = 0x00001;
202  static const unsigned TGT_MAP_PRIVATE = 0x00002;
203  static const unsigned TGT_MAP_32BIT = 0x00040;
204  static const unsigned TGT_MAP_ANON = 0x00020;
205  static const unsigned TGT_MAP_DENYWRITE = 0x00800;
206  static const unsigned TGT_MAP_EXECUTABLE = 0x01000;
207  static const unsigned TGT_MAP_FILE = 0x00000;
208  static const unsigned TGT_MAP_GROWSDOWN = 0x00100;
209  static const unsigned TGT_MAP_HUGETLB = 0x40000;
210  static const unsigned TGT_MAP_LOCKED = 0x02000;
211  static const unsigned TGT_MAP_NONBLOCK = 0x10000;
212  static const unsigned TGT_MAP_NORESERVE = 0x04000;
213  static const unsigned TGT_MAP_POPULATE = 0x08000;
214  static const unsigned TGT_MAP_STACK = 0x20000;
215  static const unsigned TGT_MAP_ANONYMOUS = 0x00020;
216  static const unsigned TGT_MAP_FIXED = 0x00010;
217 
218  static const unsigned NUM_MMAP_FLAGS;
219 
220  typedef struct {
221  uint64_t iov_base; // void *
222  uint64_t iov_len; // size_t
223  } tgt_iovec;
224 
225  typedef struct {
226  int64_t uptime; /* Seconds since boot */
227  uint64_t loads[3]; /* 1, 5, and 15 minute load averages */
228  uint64_t totalram; /* Total usable main memory size */
229  uint64_t freeram; /* Available memory size */
230  uint64_t sharedram; /* Amount of shared memory */
231  uint64_t bufferram; /* Memory used by buffers */
232  uint64_t totalswap; /* Total swap space size */
233  uint64_t freeswap; /* swap space still available */
234  uint16_t procs; /* Number of current processes */
235  uint64_t totalhigh; /* Total high memory size */
236  uint64_t freehigh; /* Available high memory size */
237  uint64_t mem_unit; /* Memory unit size in bytes */
238  } tgt_sysinfo;
239 
240 };
241 
242 class X86Linux32 : public X86Linux
243 {
244  public:
245 
246  typedef struct {
247  uint64_t st_dev;
248  uint8_t __pad0[4];
249  uint32_t __st_ino;
250  uint32_t st_mode;
251  uint32_t st_nlink;
252  uint32_t st_uid;
253  uint32_t st_gid;
254  uint64_t st_rdev;
255  uint8_t __pad3[4];
256  int64_t st_size;
257  uint32_t st_blksize;
258  uint64_t st_blocks;
259  uint32_t st_atimeX;
260  uint32_t st_atime_nsec;
261  uint32_t st_mtimeX;
262  uint32_t st_mtime_nsec;
263  uint32_t st_ctimeX;
264  uint32_t st_ctime_nsec;
265  uint64_t st_ino;
266  } __attribute__((__packed__)) tgt_stat64;
267 
268  static const int TGT_SIGHUP = 0x000001;
269  static const int TGT_SIGINT = 0x000002;
270  static const int TGT_SIGQUIT = 0x000003;
271  static const int TGT_SIGILL = 0x000004;
272  static const int TGT_SIGTRAP = 0x000005;
273  static const int TGT_SIGABRT = 0x000006;
274  static const int TGT_SIGIOT = 0x000006;
275  static const int TGT_SIGBUS = 0x000007;
276  static const int TGT_SIGFPE = 0x000008;
277  static const int TGT_SIGKILL = 0x000009;
278  static const int TGT_SIGUSR1 = 0x00000a;
279  static const int TGT_SIGSEGV = 0x00000b;
280  static const int TGT_SIGUSR2 = 0x00000c;
281  static const int TGT_SIGPIPE = 0x00000d;
282  static const int TGT_SIGALRM = 0x00000e;
283  static const int TGT_SIGTERM = 0x00000f;
284  static const int TGT_SIGSTKFLT = 0x000010;
285  static const int TGT_SIGCHLD = 0x000011;
286  static const int TGT_SIGCONT = 0x000012;
287  static const int TGT_SIGSTOP = 0x000013;
288  static const int TGT_SIGTSTP = 0x000014;
289  static const int TGT_SIGTTIN = 0x000015;
290  static const int TGT_SIGTTOU = 0x000016;
291  static const int TGT_SIGURG = 0x000017;
292  static const int TGT_SIGXCPU = 0x000018;
293  static const int TGT_SIGXFSZ = 0x000019;
294  static const int TGT_SIGVTALRM = 0x00001a;
295  static const int TGT_SIGPROF = 0x00001b;
296  static const int TGT_SIGWINCH = 0x00001c;
297  static const int TGT_SIGIO = 0x00001d;
298  static const int TGT_SIGPOLL = 0x00001d;
299  static const int TGT_SIGPWR = 0x00001e;
300  static const int TGT_SIGSYS = 0x00001f;
301  static const int TGT_SIGUNUSED = 0x00001f;
302 
304 
305  static const int TGT_O_RDONLY = 000000000;
306  static const int TGT_O_WRONLY = 000000001;
307  static const int TGT_O_RDWR = 000000002;
308  static const int TGT_O_CREAT = 000000100;
309  static const int TGT_O_EXCL = 000000200;
310  static const int TGT_O_NOCTTY = 000000400;
311  static const int TGT_O_TRUNC = 000001000;
312  static const int TGT_O_APPEND = 000002000;
313  static const int TGT_O_NONBLOCK = 000004000;
314  static const int TGT_O_DSYNC = 000010000;
315  static const int TGT_FASYNC = 000020000;
316  static const int TGT_O_DIRECT = 000040000;
317  static const int TGT_O_LARGEFILE = 000100000;
318  static const int TGT_O_DIRECTORY = 000200000;
319  static const int TGT_O_NOFOLLOW = 000400000;
320  static const int TGT_O_NOATIME = 001000000;
321  static const int TGT_O_CLOEXEC = 002000000;
322  static const int TGT_O_SYNC = 004010000;
323  static const int TGT_O_PATH = 010000000;
324 
325  static const int NUM_OPEN_FLAGS;
326 
328 
330  typedef uint32_t size_t;
332  typedef uint32_t off_t;
333  typedef int32_t time_t;
334  typedef int32_t clock_t;
336 
337  static const unsigned TGT_MAP_SHARED = 0x00001;
338  static const unsigned TGT_MAP_PRIVATE = 0x00002;
339  static const unsigned TGT_MAP_32BIT = 0x00040;
340  static const unsigned TGT_MAP_ANON = 0x00020;
341  static const unsigned TGT_MAP_DENYWRITE = 0x00800;
342  static const unsigned TGT_MAP_EXECUTABLE = 0x01000;
343  static const unsigned TGT_MAP_FILE = 0x00000;
344  static const unsigned TGT_MAP_GROWSDOWN = 0x00100;
345  static const unsigned TGT_MAP_HUGETLB = 0x40000;
346  static const unsigned TGT_MAP_LOCKED = 0x02000;
347  static const unsigned TGT_MAP_NONBLOCK = 0x10000;
348  static const unsigned TGT_MAP_NORESERVE = 0x04000;
349  static const unsigned TGT_MAP_POPULATE = 0x08000;
350  static const unsigned TGT_MAP_STACK = 0x20000;
351  static const unsigned TGT_MAP_ANONYMOUS = 0x00020;
352  static const unsigned TGT_MAP_FIXED = 0x00010;
353 
354  static const unsigned NUM_MMAP_FLAGS;
355 
356  typedef struct {
357  int32_t uptime; /* Seconds since boot */
358  uint32_t loads[3]; /* 1, 5, and 15 minute load averages */
359  uint32_t totalram; /* Total usable main memory size */
360  uint32_t freeram; /* Available memory size */
361  uint32_t sharedram; /* Amount of shared memory */
362  uint32_t bufferram; /* Memory used by buffers */
363  uint32_t totalswap; /* Total swap space size */
364  uint32_t freeswap; /* swap space still available */
365  uint16_t procs; /* Number of current processes */
366  uint32_t totalhigh; /* Total high memory size */
367  uint32_t freehigh; /* Available high memory size */
368  uint32_t mem_unit; /* Memory unit size in bytes */
369  } tgt_sysinfo;
370 };
371 
372 #endif
X86Linux32::__attribute__::st_size
int64_t st_size
Definition: linux.hh:256
X86Linux64::tgt_statfs::f_type
long f_type
Definition: linux.hh:121
X86Linux64::tgt_iovec
Definition: linux.hh:220
GuestABI::Result< ABI, SyscallReturn, typename std::enable_if< std::is_base_of< X86Linux::SyscallABI, ABI >::value >::type >::store
static void store(ThreadContext *tc, const SyscallReturn &ret)
Definition: linux.hh:80
X86Linux64::TGT_SIGHUP
static const int TGT_SIGHUP
Definition: linux.hh:134
X86Linux::SyscallABI
Definition: linux.hh:68
X86Linux64::TGT_O_DIRECTORY
static const int TGT_O_DIRECTORY
Definition: linux.hh:184
X86Linux64::NUM_OPEN_FLAGS
static const int NUM_OPEN_FLAGS
Definition: linux.hh:191
X86Linux64::TGT_O_NOATIME
static const int TGT_O_NOATIME
Definition: linux.hh:186
X86Linux64::TGT_O_NOFOLLOW
static const int TGT_O_NOFOLLOW
Definition: linux.hh:185
X86Linux32::TGT_SIGSTOP
static const int TGT_SIGSTOP
Definition: linux.hh:287
X86Linux32::TGT_O_DIRECTORY
static const int TGT_O_DIRECTORY
Definition: linux.hh:318
X86Linux32::TGT_SIGPWR
static const int TGT_SIGPWR
Definition: linux.hh:299
X86Linux64::TGT_O_CLOEXEC
static const int TGT_O_CLOEXEC
Definition: linux.hh:187
X86Linux64::tgt_sysinfo::totalswap
uint64_t totalswap
Definition: linux.hh:232
X86Linux64::tgt_statfs::f_bsize
long f_bsize
Definition: linux.hh:122
X86Linux32::TGT_SIGCONT
static const int TGT_SIGCONT
Definition: linux.hh:286
linux.hh
X86Linux64::tgt_statfs::f_files
long f_files
Definition: linux.hh:126
X86Linux32::TGT_SIGPOLL
static const int TGT_SIGPOLL
Definition: linux.hh:298
X86Linux32::TGT_O_TRUNC
static const int TGT_O_TRUNC
O_TRUNC.
Definition: linux.hh:311
X86Linux64::tgt_stat64::st_blksize
int64_t st_blksize
Definition: linux.hh:105
X86Linux32::TGT_O_WRONLY
static const int TGT_O_WRONLY
O_WRONLY.
Definition: linux.hh:306
X86Linux32::time_t
int32_t time_t
Definition: linux.hh:333
X86Linux32::TGT_SIGTSTP
static const int TGT_SIGTSTP
Definition: linux.hh:288
X86Linux64::tgt_statfs::f_namelen
long f_namelen
Definition: linux.hh:129
X86Linux64::TGT_MAP_POPULATE
static const unsigned TGT_MAP_POPULATE
Definition: linux.hh:213
X86Linux64::tgt_stat64::st_atimeX
uint64_t st_atimeX
Definition: linux.hh:107
X86Linux64::TGT_MAP_STACK
static const unsigned TGT_MAP_STACK
Definition: linux.hh:214
X86Linux32::tgt_sysinfo::sharedram
uint32_t sharedram
Definition: linux.hh:361
X86Linux64::TGT_SIGSTOP
static const int TGT_SIGSTOP
Definition: linux.hh:153
X86Linux32::TGT_SIGINT
static const int TGT_SIGINT
Definition: linux.hh:269
X86Linux32::TGT_MAP_GROWSDOWN
static const unsigned TGT_MAP_GROWSDOWN
Definition: linux.hh:344
X86Linux32::__attribute__::st_nlink
uint32_t st_nlink
Definition: linux.hh:251
X86Linux64::tgt_sysinfo::freehigh
uint64_t freehigh
Definition: linux.hh:236
X86Linux32::__attribute__::st_blksize
uint32_t st_blksize
Definition: linux.hh:257
Process
Definition: process.hh:65
X86Linux64::tgt_stat64::st_rdev
uint64_t st_rdev
Definition: linux.hh:103
X86Linux64::TGT_SIGABRT
static const int TGT_SIGABRT
Definition: linux.hh:139
X86Linux64::TGT_MAP_32BIT
static const unsigned TGT_MAP_32BIT
Definition: linux.hh:203
X86Linux64::TGT_SIGIO
static const int TGT_SIGIO
Definition: linux.hh:163
X86Linux64::tgt_statfs::f_blocks
long f_blocks
Definition: linux.hh:123
X86Linux64::tgt_iovec::iov_len
uint64_t iov_len
Definition: linux.hh:222
X86Linux32::TGT_SIGIOT
static const int TGT_SIGIOT
Definition: linux.hh:274
X86Linux
Definition: linux.hh:46
X86Linux32::__attribute__::st_ctimeX
uint32_t st_ctimeX
Definition: linux.hh:263
X86Linux64::tgt_sysinfo::freeswap
uint64_t freeswap
Definition: linux.hh:233
X86Linux64::tgt_stat64::st_dev
uint64_t st_dev
Definition: linux.hh:96
X86Linux32::TGT_MAP_ANONYMOUS
static const unsigned TGT_MAP_ANONYMOUS
Definition: linux.hh:351
X86Linux64::clock_t
int64_t clock_t
Definition: linux.hh:198
type
uint8_t type
Definition: inet.hh:421
ThreadContext::setIntReg
virtual void setIntReg(RegIndex reg_idx, RegVal val)=0
X86Linux32::TGT_O_NOATIME
static const int TGT_O_NOATIME
Definition: linux.hh:320
X86Linux32::TGT_SIGILL
static const int TGT_SIGILL
Definition: linux.hh:271
X86Linux64::tgt_stat64::st_atime_nsec
uint64_t st_atime_nsec
Definition: linux.hh:108
X86Linux32::TGT_SIGSEGV
static const int TGT_SIGSEGV
Definition: linux.hh:279
X86Linux64::TGT_O_DSYNC
static const int TGT_O_DSYNC
Definition: linux.hh:180
X86Linux64::tgt_statfs::f_fsid
tgt_fsid f_fsid
Definition: linux.hh:128
X86Linux32::__attribute__::st_mtimeX
uint32_t st_mtimeX
Definition: linux.hh:261
X86Linux32::TGT_SIGUNUSED
static const int TGT_SIGUNUSED
Definition: linux.hh:301
X86Linux32::TGT_O_APPEND
static const int TGT_O_APPEND
O_APPEND.
Definition: linux.hh:312
X86Linux64::TGT_SIGWINCH
static const int TGT_SIGWINCH
Definition: linux.hh:162
OperatingSystem::tgt_stat64
void tgt_stat64
Definition: operatingsystem.hh:62
X86Linux64::TGT_MAP_SHARED
static const unsigned TGT_MAP_SHARED
Definition: linux.hh:201
X86Linux64::TGT_SIGIOT
static const int TGT_SIGIOT
Definition: linux.hh:140
X86Linux64::TGT_MAP_DENYWRITE
static const unsigned TGT_MAP_DENYWRITE
Definition: linux.hh:205
X86Linux64::TGT_MAP_FILE
static const unsigned TGT_MAP_FILE
Definition: linux.hh:207
X86ISA::copyRegs
void copyRegs(ThreadContext *src, ThreadContext *dest)
Definition: utility.cc:94
X86Linux32::__attribute__::st_gid
uint32_t st_gid
Definition: linux.hh:253
X86Linux32::tgt_sysinfo::totalswap
uint32_t totalswap
Definition: linux.hh:363
X86Linux64::TGT_O_WRONLY
static const int TGT_O_WRONLY
O_WRONLY.
Definition: linux.hh:172
X86Linux64::TGT_SIGPOLL
static const int TGT_SIGPOLL
Definition: linux.hh:164
X86Linux32::TGT_MAP_HUGETLB
static const unsigned TGT_MAP_HUGETLB
Definition: linux.hh:345
X86Linux32::TGT_SIGSYS
static const int TGT_SIGSYS
Definition: linux.hh:300
X86Linux32::TGT_O_DIRECT
static const int TGT_O_DIRECT
O_DIRECTIO.
Definition: linux.hh:316
X86Linux32::TGT_SIGCHLD
static const int TGT_SIGCHLD
Definition: linux.hh:285
X86Linux32::__attribute__::st_atimeX
uint32_t st_atimeX
Definition: linux.hh:259
X86Linux64::TGT_MAP_HUGETLB
static const unsigned TGT_MAP_HUGETLB
Definition: linux.hh:209
X86Linux32::tgt_sysinfo::freehigh
uint32_t freehigh
Definition: linux.hh:367
X86Linux32::TGT_SIGKILL
static const int TGT_SIGKILL
Definition: linux.hh:277
X86Linux32::__attribute__::st_mtime_nsec
uint32_t st_mtime_nsec
Definition: linux.hh:262
X86Linux64::tgt_statfs
Definition: linux.hh:120
X86Linux64::TGT_O_NONBLOCK
static const int TGT_O_NONBLOCK
O_NONBLOCK.
Definition: linux.hh:179
X86Linux32::TGT_SIGSTKFLT
static const int TGT_SIGSTKFLT
Definition: linux.hh:284
X86ISA::stack
Bitfield< 17, 16 > stack
Definition: misc.hh:587
X86Linux32::tgt_sysinfo::freeram
uint32_t freeram
Definition: linux.hh:360
X86Linux64::tgt_sysinfo::totalhigh
uint64_t totalhigh
Definition: linux.hh:235
X86Linux64::tgt_stat64::st_ctime_nsec
uint64_t st_ctime_nsec
Definition: linux.hh:112
X86Linux32::size_t
uint32_t size_t
Basic X86 Linux types.
Definition: linux.hh:331
X86Linux32::TGT_O_PATH
static const int TGT_O_PATH
Definition: linux.hh:323
Linux::TGT_CLONE_SETTLS
static const unsigned TGT_CLONE_SETTLS
Definition: linux.hh:289
X86Linux32::__attribute__::st_blocks
uint64_t st_blocks
Definition: linux.hh:258
X86Linux64::tgt_stat64::st_blocks
int64_t st_blocks
Definition: linux.hh:106
X86Linux32::TGT_MAP_STACK
static const unsigned TGT_MAP_STACK
Definition: linux.hh:350
X86Linux64::tgt_fsid
Definition: linux.hh:116
X86Linux64::TGT_O_CREAT
static const int TGT_O_CREAT
O_CREAT.
Definition: linux.hh:174
X86Linux64::TGT_O_DIRECT
static const int TGT_O_DIRECT
O_DIRECTIO.
Definition: linux.hh:182
SyscallReturn::suppressed
bool suppressed() const
Should returning this value be suppressed?
Definition: syscall_return.hh:97
cp
Definition: cprintf.cc:40
X86Linux32::TGT_SIGTTOU
static const int TGT_SIGTTOU
Definition: linux.hh:290
X86Linux64::TGT_O_RDONLY
static const int TGT_O_RDONLY
O_RDONLY.
Definition: linux.hh:171
X86Linux32::TGT_SIGHUP
static const int TGT_SIGHUP
Definition: linux.hh:268
X86Linux64::TGT_O_PATH
static const int TGT_O_PATH
Definition: linux.hh:189
X86Linux32::TGT_SIGIO
static const int TGT_SIGIO
Definition: linux.hh:297
X86Linux64::TGT_MAP_GROWSDOWN
static const unsigned TGT_MAP_GROWSDOWN
Definition: linux.hh:208
syscall_return.hh
X86Linux32::NUM_MMAP_FLAGS
static const unsigned NUM_MMAP_FLAGS
Definition: linux.hh:354
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
X86Linux64::TGT_MAP_ANON
static const unsigned TGT_MAP_ANON
Definition: linux.hh:204
X86Linux64::TGT_SIGILL
static const int TGT_SIGILL
Definition: linux.hh:137
X86Linux32::tgt_sysinfo::freeswap
uint32_t freeswap
Definition: linux.hh:364
X86Linux64::TGT_MAP_NONBLOCK
static const unsigned TGT_MAP_NONBLOCK
Definition: linux.hh:211
X86Linux64::tgt_iovec::iov_base
uint64_t iov_base
Definition: linux.hh:221
GuestABI
Definition: aapcs32.hh:66
X86Linux32::tgt_sysinfo::procs
uint16_t procs
Definition: linux.hh:365
X86Linux32::off_t
uint32_t off_t
Definition: linux.hh:332
X86Linux64::off_t
uint64_t off_t
Definition: linux.hh:196
SyscallReturn::needsRetry
bool needsRetry() const
Does the syscall need to be retried?
Definition: syscall_return.hh:94
X86Linux64::time_t
int64_t time_t
Definition: linux.hh:197
X86Linux64::TGT_SIGTRAP
static const int TGT_SIGTRAP
Definition: linux.hh:138
X86Linux32::TGT_O_NONBLOCK
static const int TGT_O_NONBLOCK
O_NONBLOCK.
Definition: linux.hh:313
X86Linux32::TGT_O_NOCTTY
static const int TGT_O_NOCTTY
O_NOCTTY.
Definition: linux.hh:310
X86Linux64::size_t
uint64_t size_t
Basic X86_64 Linux types.
Definition: linux.hh:195
X86Linux64::TGT_O_EXCL
static const int TGT_O_EXCL
O_EXCL.
Definition: linux.hh:175
X86Linux32::TGT_FASYNC
static const int TGT_FASYNC
Definition: linux.hh:315
X86Linux64::tgt_stat64::st_size
int64_t st_size
Definition: linux.hh:104
X86Linux::byteOrder
static const ByteOrder byteOrder
Definition: linux.hh:49
X86Linux64::tgt_statfs::f_ffree
long f_ffree
Definition: linux.hh:127
X86Linux64::NUM_MMAP_FLAGS
static const unsigned NUM_MMAP_FLAGS
Definition: linux.hh:218
X86Linux32::TGT_O_SYNC
static const int TGT_O_SYNC
O_SYNC.
Definition: linux.hh:322
X86Linux32::TGT_MAP_EXECUTABLE
static const unsigned TGT_MAP_EXECUTABLE
Definition: linux.hh:342
X86Linux32::TGT_MAP_LOCKED
static const unsigned TGT_MAP_LOCKED
Definition: linux.hh:346
X86Linux64::TGT_SIGUNUSED
static const int TGT_SIGUNUSED
Definition: linux.hh:167
X86Linux32::TGT_MAP_ANON
static const unsigned TGT_MAP_ANON
Definition: linux.hh:340
X86Linux32::TGT_MAP_NORESERVE
static const unsigned TGT_MAP_NORESERVE
Definition: linux.hh:348
X86Linux64::tgt_sysinfo
Definition: linux.hh:225
X86Linux64::TGT_SIGURG
static const int TGT_SIGURG
Definition: linux.hh:157
X86Linux64::tgt_stat64::st_nlink
uint64_t st_nlink
Definition: linux.hh:98
X86Linux32::TGT_SIGALRM
static const int TGT_SIGALRM
Definition: linux.hh:282
X86Linux32::NUM_OPEN_FLAGS
static const int NUM_OPEN_FLAGS
Definition: linux.hh:325
utility.hh
X86Linux32::__attribute__::st_ino
uint64_t st_ino
Definition: linux.hh:265
X86Linux64::tgt_statfs::f_bfree
long f_bfree
Definition: linux.hh:124
X86Linux64::tgt_sysinfo::mem_unit
uint64_t mem_unit
Definition: linux.hh:237
X86Linux32::TGT_MAP_PRIVATE
static const unsigned TGT_MAP_PRIVATE
Definition: linux.hh:338
X86Linux32::__attribute__::st_rdev
uint64_t st_rdev
Definition: linux.hh:254
X86Linux32::TGT_MAP_SHARED
static const unsigned TGT_MAP_SHARED
Definition: linux.hh:337
X86Linux64::tgt_sysinfo::freeram
uint64_t freeram
Definition: linux.hh:229
SyscallFlagTransTable
This struct is used to build target-OS-dependent tables that map the target's flags to the host's fla...
Definition: operatingsystem.hh:41
X86Linux32::TGT_SIGPIPE
static const int TGT_SIGPIPE
Definition: linux.hh:281
X86Linux64::TGT_SIGQUIT
static const int TGT_SIGQUIT
Definition: linux.hh:136
X86Linux64::TGT_SIGCHLD
static const int TGT_SIGCHLD
Definition: linux.hh:151
X86Linux32::TGT_SIGQUIT
static const int TGT_SIGQUIT
Definition: linux.hh:270
X86ISA::val
Bitfield< 63 > val
Definition: misc.hh:769
X86Linux32::tgt_sysinfo::bufferram
uint32_t bufferram
Definition: linux.hh:362
X86Linux32::TGT_MAP_32BIT
static const unsigned TGT_MAP_32BIT
Definition: linux.hh:339
X86Linux32::TGT_MAP_FILE
static const unsigned TGT_MAP_FILE
Definition: linux.hh:343
X86Linux64::TGT_MAP_ANONYMOUS
static const unsigned TGT_MAP_ANONYMOUS
Definition: linux.hh:215
X86Linux32::tgt_sysinfo::totalhigh
uint32_t totalhigh
Definition: linux.hh:366
X86Linux64::tgt_stat64::st_ino
uint64_t st_ino
Definition: linux.hh:97
X86Linux64::TGT_SIGUSR1
static const int TGT_SIGUSR1
Definition: linux.hh:144
X86Linux64::TGT_FASYNC
static const int TGT_FASYNC
Definition: linux.hh:181
X86Linux32::__attribute__::st_mode
uint32_t st_mode
Definition: linux.hh:250
X86Linux64::TGT_O_SYNC
static const int TGT_O_SYNC
O_SYNC.
Definition: linux.hh:188
SyscallReturn
This class represents the return value from an emulated system call, including any errno setting.
Definition: syscall_return.hh:52
X86Linux64::tgt_sysinfo::uptime
int64_t uptime
Definition: linux.hh:226
X86Linux64::TGT_O_APPEND
static const int TGT_O_APPEND
O_APPEND.
Definition: linux.hh:178
X86Linux32::__attribute__::st_atime_nsec
uint32_t st_atime_nsec
Definition: linux.hh:260
X86Linux64::tgt_stat64::st_mtime_nsec
uint64_t st_mtime_nsec
Definition: linux.hh:110
X86Linux64::TGT_SIGALRM
static const int TGT_SIGALRM
Definition: linux.hh:148
X86Linux32::TGT_SIGURG
static const int TGT_SIGURG
Definition: linux.hh:291
X86Linux32::TGT_SIGFPE
static const int TGT_SIGFPE
Definition: linux.hh:276
X86Linux64::TGT_O_TRUNC
static const int TGT_O_TRUNC
O_TRUNC.
Definition: linux.hh:177
X86Linux64::tgt_stat64::st_gid
uint32_t st_gid
Definition: linux.hh:101
X86Linux64::TGT_SIGSEGV
static const int TGT_SIGSEGV
Definition: linux.hh:145
X86Linux32::tgt_sysinfo::uptime
int32_t uptime
Definition: linux.hh:357
MipsISA::ptc
Bitfield< 7, 0 > ptc
Definition: mt_constants.hh:53
X86Linux64::TGT_MAP_EXECUTABLE
static const unsigned TGT_MAP_EXECUTABLE
Definition: linux.hh:206
X86Linux32::mmapFlagTable
static SyscallFlagTransTable mmapFlagTable[]
Definition: linux.hh:327
X86Linux64::TGT_SIGPROF
static const int TGT_SIGPROF
Definition: linux.hh:161
X86Linux64::TGT_SIGBUS
static const int TGT_SIGBUS
Definition: linux.hh:141
X86Linux64::TGT_O_LARGEFILE
static const int TGT_O_LARGEFILE
Definition: linux.hh:183
X86Linux32::TGT_SIGVTALRM
static const int TGT_SIGVTALRM
Definition: linux.hh:294
X86Linux64::TGT_O_NOCTTY
static const int TGT_O_NOCTTY
O_NOCTTY.
Definition: linux.hh:176
X86Linux32::__attribute__::__st_ino
uint32_t __st_ino
Definition: linux.hh:249
X86Linux32::TGT_O_CLOEXEC
static const int TGT_O_CLOEXEC
Definition: linux.hh:321
X86Linux64::tgt_stat64::st_ctimeX
uint64_t st_ctimeX
Definition: linux.hh:111
X86Linux64::tgt_sysinfo::procs
uint16_t procs
Definition: linux.hh:234
X86Linux64
Definition: linux.hh:91
X86Linux32::tgt_sysinfo::mem_unit
uint32_t mem_unit
Definition: linux.hh:368
X86Linux32::tgt_sysinfo
Definition: linux.hh:356
X86Linux32::TGT_SIGXCPU
static const int TGT_SIGXCPU
Definition: linux.hh:292
GuestABI::Result
Definition: definition.hh:58
X86Linux64::TGT_SIGTERM
static const int TGT_SIGTERM
Definition: linux.hh:149
X86Linux64::TGT_MAP_PRIVATE
static const unsigned TGT_MAP_PRIVATE
Definition: linux.hh:202
X86Linux64::TGT_SIGPWR
static const int TGT_SIGPWR
Definition: linux.hh:165
X86Linux64::TGT_SIGKILL
static const int TGT_SIGKILL
Definition: linux.hh:143
X86Linux32::openFlagTable
static SyscallFlagTransTable openFlagTable[]
Definition: linux.hh:303
std
Overload hash function for BasicBlockRange type.
Definition: vec_reg.hh:587
X86Linux64::TGT_SIGTSTP
static const int TGT_SIGTSTP
Definition: linux.hh:154
X86Linux64::tgt_stat64::__pad0
uint32_t __pad0
Definition: linux.hh:102
X86Linux32::TGT_O_RDONLY
static const int TGT_O_RDONLY
O_RDONLY.
Definition: linux.hh:305
X86Linux32::TGT_SIGBUS
static const int TGT_SIGBUS
Definition: linux.hh:275
X86Linux64::TGT_SIGINT
static const int TGT_SIGINT
Definition: linux.hh:135
X86Linux64::tgt_statfs::f_frsize
long f_frsize
Definition: linux.hh:130
X86Linux32::tgt_sysinfo::totalram
uint32_t totalram
Definition: linux.hh:359
X86Linux32::TGT_MAP_DENYWRITE
static const unsigned TGT_MAP_DENYWRITE
Definition: linux.hh:341
X86Linux32::__attribute__::st_uid
uint32_t st_uid
Definition: linux.hh:252
X86Linux32
Definition: linux.hh:242
X86ISA::MISCREG_FS_EFF_BASE
@ MISCREG_FS_EFF_BASE
Definition: misc.hh:334
SyscallReturn::encodedValue
int64_t encodedValue() const
The encoded value (as described above)
Definition: syscall_return.hh:119
X86Linux32::clock_t
int32_t clock_t
Definition: linux.hh:334
guest_abi.hh
X86Linux32::TGT_O_RDWR
static const int TGT_O_RDWR
O_RDWR.
Definition: linux.hh:307
X86Linux64::TGT_MAP_NORESERVE
static const unsigned TGT_MAP_NORESERVE
Definition: linux.hh:212
X86Linux64::TGT_SIGSYS
static const int TGT_SIGSYS
Definition: linux.hh:166
X86Linux32::TGT_O_NOFOLLOW
static const int TGT_O_NOFOLLOW
Definition: linux.hh:319
X86Linux64::TGT_MAP_FIXED
static const unsigned TGT_MAP_FIXED
Definition: linux.hh:216
X86Linux32::__attribute__::st_ctime_nsec
uint32_t st_ctime_nsec
Definition: linux.hh:264
X86Linux32::TGT_SIGTRAP
static const int TGT_SIGTRAP
Definition: linux.hh:272
X86Linux64::TGT_SIGUSR2
static const int TGT_SIGUSR2
Definition: linux.hh:146
X86Linux32::TGT_SIGTTIN
static const int TGT_SIGTTIN
Definition: linux.hh:289
X86Linux64::tgt_stat64::st_uid
uint32_t st_uid
Definition: linux.hh:100
X86Linux64::TGT_O_RDWR
static const int TGT_O_RDWR
O_RDWR.
Definition: linux.hh:173
X86Linux32::TGT_MAP_POPULATE
static const unsigned TGT_MAP_POPULATE
Definition: linux.hh:349
X86Linux64::TGT_SIGXFSZ
static const int TGT_SIGXFSZ
Definition: linux.hh:159
X86Linux32::TGT_O_EXCL
static const int TGT_O_EXCL
O_EXCL.
Definition: linux.hh:309
X86Linux32::TGT_SIGWINCH
static const int TGT_SIGWINCH
Definition: linux.hh:296
X86Linux32::TGT_MAP_FIXED
static const unsigned TGT_MAP_FIXED
Definition: linux.hh:352
X86Linux64::TGT_SIGSTKFLT
static const int TGT_SIGSTKFLT
Definition: linux.hh:150
X86Linux64::TGT_SIGCONT
static const int TGT_SIGCONT
Definition: linux.hh:152
ThreadContext::setMiscRegNoEffect
virtual void setMiscRegNoEffect(RegIndex misc_reg, RegVal val)=0
X86Linux64::tgt_stat64::st_mode
uint32_t st_mode
Definition: linux.hh:99
X86Linux64::TGT_SIGFPE
static const int TGT_SIGFPE
Definition: linux.hh:142
X86Linux64::openFlagTable
static SyscallFlagTransTable openFlagTable[]
Definition: linux.hh:169
X86Linux64::TGT_SIGPIPE
static const int TGT_SIGPIPE
Definition: linux.hh:147
X86Linux32::TGT_SIGUSR1
static const int TGT_SIGUSR1
Definition: linux.hh:278
X86Linux64::tgt_sysinfo::sharedram
uint64_t sharedram
Definition: linux.hh:230
X86Linux32::TGT_SIGUSR2
static const int TGT_SIGUSR2
Definition: linux.hh:280
X86Linux64::TGT_SIGTTOU
static const int TGT_SIGTTOU
Definition: linux.hh:156
X86Linux32::TGT_O_LARGEFILE
static const int TGT_O_LARGEFILE
Definition: linux.hh:317
Linux
Definition: threadinfo.hh:35
X86Linux64::TGT_SIGXCPU
static const int TGT_SIGXCPU
Definition: linux.hh:158
X86Linux32::__attribute__::st_dev
uint64_t st_dev
Definition: linux.hh:247
X86Linux64::tgt_sysinfo::totalram
uint64_t totalram
Definition: linux.hh:228
__attribute__
const char * __attribute__((weak)) m5MainCommands[]
X86Linux32::TGT_SIGABRT
static const int TGT_SIGABRT
Definition: linux.hh:273
X86ISA::MISCREG_FS_BASE
@ MISCREG_FS_BASE
Definition: misc.hh:316
X86Linux64::tgt_stat64::st_mtimeX
uint64_t st_mtimeX
Definition: linux.hh:109
X86Linux32::TGT_O_DSYNC
static const int TGT_O_DSYNC
O_DSYNC.
Definition: linux.hh:314
X86Linux::archClone
static void archClone(uint64_t flags, Process *pp, Process *cp, ThreadContext *ptc, ThreadContext *ctc, uint64_t stack, uint64_t tls)
Definition: linux.hh:52
X86Linux64::TGT_MAP_LOCKED
static const unsigned TGT_MAP_LOCKED
Definition: linux.hh:210
X86Linux32::TGT_SIGTERM
static const int TGT_SIGTERM
Definition: linux.hh:283
X86Linux32::TGT_O_CREAT
static const int TGT_O_CREAT
O_CREAT.
Definition: linux.hh:308
X86Linux64::TGT_SIGVTALRM
static const int TGT_SIGVTALRM
Definition: linux.hh:160
X86Linux64::tgt_statfs::f_bavail
long f_bavail
Definition: linux.hh:125
X86ISA::StackPointerReg
const int StackPointerReg
Definition: registers.hh:85
X86Linux64::tgt_sysinfo::bufferram
uint64_t bufferram
Definition: linux.hh:231
X86Linux32::TGT_SIGXFSZ
static const int TGT_SIGXFSZ
Definition: linux.hh:293
X86Linux32::TGT_SIGPROF
static const int TGT_SIGPROF
Definition: linux.hh:295
X86Linux64::TGT_SIGTTIN
static const int TGT_SIGTTIN
Definition: linux.hh:155
X86Linux32::TGT_MAP_NONBLOCK
static const unsigned TGT_MAP_NONBLOCK
Definition: linux.hh:347

Generated on Wed Sep 30 2020 14:02:00 for gem5 by doxygen 1.8.17