gem5  v21.2.1.1
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 <map>
42 
43 #include "arch/x86/utility.hh"
44 #include "base/compiler.hh"
46 #include "kern/linux/linux.hh"
47 #include "sim/guest_abi.hh"
48 #include "sim/syscall_return.hh"
49 
50 namespace gem5
51 {
52 
53 class X86Linux : public Linux
54 {
55  public:
56  static const ByteOrder byteOrder = ByteOrder::little;
57 
58  static void
59  archClone(uint64_t flags,
60  Process *pp, Process *cp,
62  uint64_t stack, uint64_t tls)
63  {
64  ctc->getIsaPtr()->copyRegsFrom(ptc);
65 
66  if (flags & TGT_CLONE_SETTLS) {
69  }
70 
71  if (stack)
72  ctc->setIntReg(X86ISA::INTREG_RSP, stack);
73  }
74 
75  class SyscallABI {};
76 };
77 
78 GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi);
79 namespace guest_abi
80 {
81 
82 template <typename ABI>
83 struct Result<ABI, SyscallReturn,
84  typename std::enable_if_t<std::is_base_of_v<X86Linux::SyscallABI, ABI>>>
85 {
86  static void
88  {
89  tc->setIntReg(X86ISA::INTREG_RAX, ret.encodedValue());
90  }
91 };
92 
93 } // namespace guest_abi
94 
95 class X86Linux64 : public X86Linux, public OpenFlagTable<X86Linux64>
96 {
97  public:
98 
99  struct tgt_stat64
100  {
101  uint64_t st_dev;
102  uint64_t st_ino;
103  uint64_t st_nlink;
104  uint32_t st_mode;
105  uint32_t st_uid;
106  uint32_t st_gid;
107  uint32_t __pad0;
108  uint64_t st_rdev;
109  int64_t st_size;
110  int64_t st_blksize;
111  int64_t st_blocks;
112  uint64_t st_atimeX;
113  uint64_t st_atime_nsec;
114  uint64_t st_mtimeX;
115  uint64_t st_mtime_nsec;
116  uint64_t st_ctimeX;
117  uint64_t st_ctime_nsec;
118  int64_t unused0[3];
119  };
120 
121  struct tgt_fsid
122  {
123  long val[2];
124  };
125 
126  struct tgt_statfs
127  {
128  long f_type;
129  long f_bsize;
130  long f_blocks;
131  long f_bfree;
132  long f_bavail;
133  long f_files;
134  long f_ffree;
136  long f_namelen;
137  long f_frsize;
138  long f_spare[5];
139  };
140 
141  static const int TGT_SIGHUP = 0x000001;
142  static const int TGT_SIGINT = 0x000002;
143  static const int TGT_SIGQUIT = 0x000003;
144  static const int TGT_SIGILL = 0x000004;
145  static const int TGT_SIGTRAP = 0x000005;
146  static const int TGT_SIGABRT = 0x000006;
147  static const int TGT_SIGIOT = 0x000006;
148  static const int TGT_SIGBUS = 0x000007;
149  static const int TGT_SIGFPE = 0x000008;
150  static const int TGT_SIGKILL = 0x000009;
151  static const int TGT_SIGUSR1 = 0x00000a;
152  static const int TGT_SIGSEGV = 0x00000b;
153  static const int TGT_SIGUSR2 = 0x00000c;
154  static const int TGT_SIGPIPE = 0x00000d;
155  static const int TGT_SIGALRM = 0x00000e;
156  static const int TGT_SIGTERM = 0x00000f;
157  static const int TGT_SIGSTKFLT = 0x000010;
158  static const int TGT_SIGCHLD = 0x000011;
159  static const int TGT_SIGCONT = 0x000012;
160  static const int TGT_SIGSTOP = 0x000013;
161  static const int TGT_SIGTSTP = 0x000014;
162  static const int TGT_SIGTTIN = 0x000015;
163  static const int TGT_SIGTTOU = 0x000016;
164  static const int TGT_SIGURG = 0x000017;
165  static const int TGT_SIGXCPU = 0x000018;
166  static const int TGT_SIGXFSZ = 0x000019;
167  static const int TGT_SIGVTALRM = 0x00001a;
168  static const int TGT_SIGPROF = 0x00001b;
169  static const int TGT_SIGWINCH = 0x00001c;
170  static const int TGT_SIGIO = 0x00001d;
171  static const int TGT_SIGPOLL = 0x00001d;
172  static const int TGT_SIGPWR = 0x00001e;
173  static const int TGT_SIGSYS = 0x00001f;
174  static const int TGT_SIGUNUSED = 0x00001f;
175 
176  static constexpr int TGT_O_RDONLY = 000000000;
177  static constexpr int TGT_O_WRONLY = 000000001;
178  static constexpr int TGT_O_RDWR = 000000002;
179  static constexpr int TGT_O_CREAT = 000000100;
180  static constexpr int TGT_O_EXCL = 000000200;
181  static constexpr int TGT_O_NOCTTY = 000000400;
182  static constexpr int TGT_O_TRUNC = 000001000;
183  static constexpr int TGT_O_APPEND = 000002000;
184  static constexpr int TGT_O_NONBLOCK = 000004000;
185  static constexpr int TGT_O_DSYNC = 000010000;
186  static constexpr int TGT_FASYNC = 000020000;
187  static constexpr int TGT_O_DIRECT = 000040000;
188  static constexpr int TGT_O_LARGEFILE = 000100000;
189  static constexpr int TGT_O_DIRECTORY = 000200000;
190  static constexpr int TGT_O_NOFOLLOW = 000400000;
191  static constexpr int TGT_O_NOATIME = 001000000;
192  static constexpr int TGT_O_CLOEXEC = 002000000;
193  static constexpr int TGT_O_SYNC = 004010000;
194  static constexpr int TGT_O_PATH = 010000000;
195 
197  typedef uint64_t size_t;
199  typedef uint64_t off_t;
200  typedef int64_t time_t;
201  typedef int64_t clock_t;
203 
204  static constexpr unsigned TGT_MAP_SHARED = 0x00001;
205  static constexpr unsigned TGT_MAP_PRIVATE = 0x00002;
206  static constexpr unsigned TGT_MAP_32BIT = 0x00040;
207  static constexpr unsigned TGT_MAP_ANON = 0x00020;
208  static constexpr unsigned TGT_MAP_DENYWRITE = 0x00800;
209  static constexpr unsigned TGT_MAP_EXECUTABLE = 0x01000;
210  static constexpr unsigned TGT_MAP_FILE = 0x00000;
211  static constexpr unsigned TGT_MAP_GROWSDOWN = 0x00100;
212  static constexpr unsigned TGT_MAP_HUGETLB = 0x40000;
213  static constexpr unsigned TGT_MAP_LOCKED = 0x02000;
214  static constexpr unsigned TGT_MAP_NONBLOCK = 0x10000;
215  static constexpr unsigned TGT_MAP_NORESERVE = 0x04000;
216  static constexpr unsigned TGT_MAP_POPULATE = 0x08000;
217  static constexpr unsigned TGT_MAP_STACK = 0x20000;
218  static constexpr unsigned TGT_MAP_ANONYMOUS = 0x00020;
219  static constexpr unsigned TGT_MAP_FIXED = 0x00010;
220 
221  struct tgt_iovec
222  {
223  uint64_t iov_base; // void *
224  uint64_t iov_len; // size_t
225  };
226 
227  struct tgt_sysinfo
228  {
229  int64_t uptime; /* Seconds since boot */
230  uint64_t loads[3]; /* 1, 5, and 15 minute load averages */
231  uint64_t totalram; /* Total usable main memory size */
232  uint64_t freeram; /* Available memory size */
233  uint64_t sharedram; /* Amount of shared memory */
234  uint64_t bufferram; /* Memory used by buffers */
235  uint64_t totalswap; /* Total swap space size */
236  uint64_t freeswap; /* swap space still available */
237  uint16_t procs; /* Number of current processes */
238  uint64_t totalhigh; /* Total high memory size */
239  uint64_t freehigh; /* Available high memory size */
240  uint64_t mem_unit; /* Memory unit size in bytes */
241  };
242 
243 };
244 
245 class X86Linux32 : public X86Linux, public OpenFlagTable<X86Linux32>
246 {
247  public:
248  struct GEM5_PACKED tgt_stat64
249  {
250  uint64_t st_dev;
251  uint8_t __pad0[4];
252  uint32_t __st_ino;
253  uint32_t st_mode;
254  uint32_t st_nlink;
255  uint32_t st_uid;
256  uint32_t st_gid;
257  uint64_t st_rdev;
258  uint8_t __pad3[4];
259  int64_t st_size;
260  uint32_t st_blksize;
261  uint64_t st_blocks;
262  uint32_t st_atimeX;
263  uint32_t st_atime_nsec;
264  uint32_t st_mtimeX;
265  uint32_t st_mtime_nsec;
266  uint32_t st_ctimeX;
267  uint32_t st_ctime_nsec;
268  uint64_t st_ino;
269  };
270 
271  static const int TGT_SIGHUP = 0x000001;
272  static const int TGT_SIGINT = 0x000002;
273  static const int TGT_SIGQUIT = 0x000003;
274  static const int TGT_SIGILL = 0x000004;
275  static const int TGT_SIGTRAP = 0x000005;
276  static const int TGT_SIGABRT = 0x000006;
277  static const int TGT_SIGIOT = 0x000006;
278  static const int TGT_SIGBUS = 0x000007;
279  static const int TGT_SIGFPE = 0x000008;
280  static const int TGT_SIGKILL = 0x000009;
281  static const int TGT_SIGUSR1 = 0x00000a;
282  static const int TGT_SIGSEGV = 0x00000b;
283  static const int TGT_SIGUSR2 = 0x00000c;
284  static const int TGT_SIGPIPE = 0x00000d;
285  static const int TGT_SIGALRM = 0x00000e;
286  static const int TGT_SIGTERM = 0x00000f;
287  static const int TGT_SIGSTKFLT = 0x000010;
288  static const int TGT_SIGCHLD = 0x000011;
289  static const int TGT_SIGCONT = 0x000012;
290  static const int TGT_SIGSTOP = 0x000013;
291  static const int TGT_SIGTSTP = 0x000014;
292  static const int TGT_SIGTTIN = 0x000015;
293  static const int TGT_SIGTTOU = 0x000016;
294  static const int TGT_SIGURG = 0x000017;
295  static const int TGT_SIGXCPU = 0x000018;
296  static const int TGT_SIGXFSZ = 0x000019;
297  static const int TGT_SIGVTALRM = 0x00001a;
298  static const int TGT_SIGPROF = 0x00001b;
299  static const int TGT_SIGWINCH = 0x00001c;
300  static const int TGT_SIGIO = 0x00001d;
301  static const int TGT_SIGPOLL = 0x00001d;
302  static const int TGT_SIGPWR = 0x00001e;
303  static const int TGT_SIGSYS = 0x00001f;
304  static const int TGT_SIGUNUSED = 0x00001f;
305 
306  static constexpr int TGT_O_RDONLY = 000000000;
307  static constexpr int TGT_O_WRONLY = 000000001;
308  static constexpr int TGT_O_RDWR = 000000002;
309  static constexpr int TGT_O_CREAT = 000000100;
310  static constexpr int TGT_O_EXCL = 000000200;
311  static constexpr int TGT_O_NOCTTY = 000000400;
312  static constexpr int TGT_O_TRUNC = 000001000;
313  static constexpr int TGT_O_APPEND = 000002000;
314  static constexpr int TGT_O_NONBLOCK = 000004000;
315  static constexpr int TGT_O_DSYNC = 000010000;
316  static constexpr int TGT_FASYNC = 000020000;
317  static constexpr int TGT_O_DIRECT = 000040000;
318  static constexpr int TGT_O_LARGEFILE = 000100000;
319  static constexpr int TGT_O_DIRECTORY = 000200000;
320  static constexpr int TGT_O_NOFOLLOW = 000400000;
321  static constexpr int TGT_O_NOATIME = 001000000;
322  static constexpr int TGT_O_CLOEXEC = 002000000;
323  static constexpr int TGT_O_SYNC = 004010000;
324  static constexpr int TGT_O_PATH = 010000000;
325 
326  static const std::map<int, int> mmapFlagTable;
327 
329  typedef uint32_t size_t;
331  typedef uint32_t off_t;
332  typedef int32_t time_t;
333  typedef int32_t clock_t;
335 
336  static constexpr unsigned TGT_MAP_SHARED = 0x00001;
337  static constexpr unsigned TGT_MAP_PRIVATE = 0x00002;
338  static constexpr unsigned TGT_MAP_32BIT = 0x00040;
339  static constexpr unsigned TGT_MAP_ANON = 0x00020;
340  static constexpr unsigned TGT_MAP_DENYWRITE = 0x00800;
341  static constexpr unsigned TGT_MAP_EXECUTABLE = 0x01000;
342  static constexpr unsigned TGT_MAP_FILE = 0x00000;
343  static constexpr unsigned TGT_MAP_GROWSDOWN = 0x00100;
344  static constexpr unsigned TGT_MAP_HUGETLB = 0x40000;
345  static constexpr unsigned TGT_MAP_LOCKED = 0x02000;
346  static constexpr unsigned TGT_MAP_NONBLOCK = 0x10000;
347  static constexpr unsigned TGT_MAP_NORESERVE = 0x04000;
348  static constexpr unsigned TGT_MAP_POPULATE = 0x08000;
349  static constexpr unsigned TGT_MAP_STACK = 0x20000;
350  static constexpr unsigned TGT_MAP_ANONYMOUS = 0x00020;
351  static constexpr unsigned TGT_MAP_FIXED = 0x00010;
352 
353  struct tgt_sysinfo
354  {
355  int32_t uptime; /* Seconds since boot */
356  uint32_t loads[3]; /* 1, 5, and 15 minute load averages */
357  uint32_t totalram; /* Total usable main memory size */
358  uint32_t freeram; /* Available memory size */
359  uint32_t sharedram; /* Amount of shared memory */
360  uint32_t bufferram; /* Memory used by buffers */
361  uint32_t totalswap; /* Total swap space size */
362  uint32_t freeswap; /* swap space still available */
363  uint16_t procs; /* Number of current processes */
364  uint32_t totalhigh; /* Total high memory size */
365  uint32_t freehigh; /* Available high memory size */
366  uint32_t mem_unit; /* Memory unit size in bytes */
367  };
368 };
369 
370 } // namespace gem5
371 
372 #endif
gem5::ThreadContext::setIntReg
virtual void setIntReg(RegIndex reg_idx, RegVal val)=0
gem5::X86Linux64::tgt_stat64::st_mtime_nsec
uint64_t st_mtime_nsec
Definition: linux.hh:115
gem5::X86Linux32::TGT_MAP_NONBLOCK
static constexpr unsigned TGT_MAP_NONBLOCK
Definition: linux.hh:346
gem5::X86Linux32::TGT_SIGKILL
static const int TGT_SIGKILL
Definition: linux.hh:280
gem5::X86Linux32::tgt_sysinfo::sharedram
uint32_t sharedram
Definition: linux.hh:359
gem5::X86Linux64::TGT_MAP_LOCKED
static constexpr unsigned TGT_MAP_LOCKED
Definition: linux.hh:213
gem5::X86Linux64::tgt_stat64::st_ctime_nsec
uint64_t st_ctime_nsec
Definition: linux.hh:117
gem5::X86ISA::MISCREG_FS_BASE
@ MISCREG_FS_BASE
Definition: misc.hh:322
gem5::X86Linux32::TGT_SIGBUS
static const int TGT_SIGBUS
Definition: linux.hh:278
gem5::X86Linux64::TGT_MAP_GROWSDOWN
static constexpr unsigned TGT_MAP_GROWSDOWN
Definition: linux.hh:211
gem5::X86Linux64::TGT_O_TRUNC
static constexpr int TGT_O_TRUNC
O_TRUNC.
Definition: linux.hh:182
gem5::X86Linux64::tgt_fsid::val
long val[2]
Definition: linux.hh:123
gem5::X86Linux32::TGT_SIGPWR
static const int TGT_SIGPWR
Definition: linux.hh:302
linux.hh
gem5::X86Linux64::TGT_SIGSEGV
static const int TGT_SIGSEGV
Definition: linux.hh:152
gem5::X86Linux64::TGT_SIGCONT
static const int TGT_SIGCONT
Definition: linux.hh:159
gem5::X86Linux64::TGT_O_SYNC
static constexpr int TGT_O_SYNC
O_SYNC.
Definition: linux.hh:193
gem5::X86Linux64::TGT_O_DIRECT
static constexpr int TGT_O_DIRECT
O_DIRECTIO.
Definition: linux.hh:187
gem5::X86Linux64::TGT_O_RDONLY
static constexpr int TGT_O_RDONLY
O_RDONLY.
Definition: linux.hh:176
gem5::BaseISA::copyRegsFrom
virtual void copyRegsFrom(ThreadContext *src)=0
gem5::X86Linux64::clock_t
int64_t clock_t
Definition: linux.hh:201
gem5::X86Linux64::tgt_statfs::f_bavail
long f_bavail
Definition: linux.hh:132
gem5::SyscallReturn
This class represents the return value from an emulated system call, including any errno setting.
Definition: syscall_return.hh:55
gem5::X86Linux32::tgt_stat64::st_gid
uint32_t st_gid
Definition: linux.hh:256
gem5::X86Linux32::TGT_SIGSTOP
static const int TGT_SIGSTOP
Definition: linux.hh:290
gem5::X86Linux64::TGT_O_WRONLY
static constexpr int TGT_O_WRONLY
O_WRONLY.
Definition: linux.hh:177
gem5::X86Linux64::tgt_statfs::f_spare
long f_spare[5]
Definition: linux.hh:138
gem5::X86Linux32::tgt_stat64::st_blocks
uint64_t st_blocks
Definition: linux.hh:261
gem5::X86Linux64::TGT_SIGXCPU
static const int TGT_SIGXCPU
Definition: linux.hh:165
gem5::X86Linux64::TGT_MAP_SHARED
static constexpr unsigned TGT_MAP_SHARED
Definition: linux.hh:204
gem5::X86Linux32::tgt_sysinfo::freeswap
uint32_t freeswap
Definition: linux.hh:362
gem5::X86Linux64::tgt_iovec::iov_base
uint64_t iov_base
Definition: linux.hh:223
gem5::X86Linux64::TGT_SIGIOT
static const int TGT_SIGIOT
Definition: linux.hh:147
gem5::X86Linux64::tgt_stat64::st_uid
uint32_t st_uid
Definition: linux.hh:105
gem5::X86Linux32::TGT_O_SYNC
static constexpr int TGT_O_SYNC
O_SYNC.
Definition: linux.hh:323
gem5::X86Linux32::TGT_SIGXFSZ
static const int TGT_SIGXFSZ
Definition: linux.hh:296
gem5::X86Linux64::tgt_sysinfo::totalswap
uint64_t totalswap
Definition: linux.hh:235
gem5::X86Linux64::tgt_stat64::st_mtimeX
uint64_t st_mtimeX
Definition: linux.hh:114
gem5::X86Linux64::tgt_stat64::st_ctimeX
uint64_t st_ctimeX
Definition: linux.hh:116
gem5::X86Linux32::TGT_MAP_FIXED
static constexpr unsigned TGT_MAP_FIXED
Definition: linux.hh:351
gem5::X86Linux32::TGT_SIGUNUSED
static const int TGT_SIGUNUSED
Definition: linux.hh:304
gem5::X86Linux64::tgt_sysinfo::loads
uint64_t loads[3]
Definition: linux.hh:230
gem5::X86Linux32::TGT_SIGTRAP
static const int TGT_SIGTRAP
Definition: linux.hh:275
gem5::X86Linux64::TGT_SIGWINCH
static const int TGT_SIGWINCH
Definition: linux.hh:169
gem5::X86Linux32::tgt_stat64::st_blksize
uint32_t st_blksize
Definition: linux.hh:260
gem5::X86Linux64::TGT_SIGFPE
static const int TGT_SIGFPE
Definition: linux.hh:149
gem5::X86Linux32::tgt_stat64
Definition: linux.hh:248
gem5::X86Linux64::TGT_SIGQUIT
static const int TGT_SIGQUIT
Definition: linux.hh:143
gem5::X86Linux64::tgt_statfs::f_bfree
long f_bfree
Definition: linux.hh:131
gem5::X86Linux32::TGT_O_CREAT
static constexpr int TGT_O_CREAT
O_CREAT.
Definition: linux.hh:309
gem5::X86Linux32::tgt_sysinfo::procs
uint16_t procs
Definition: linux.hh:363
gem5::X86Linux32::TGT_SIGINT
static const int TGT_SIGINT
Definition: linux.hh:272
gem5::X86Linux64::TGT_SIGTERM
static const int TGT_SIGTERM
Definition: linux.hh:156
gem5::X86Linux64::TGT_MAP_STACK
static constexpr unsigned TGT_MAP_STACK
Definition: linux.hh:217
gem5::X86Linux64::TGT_SIGTSTP
static const int TGT_SIGTSTP
Definition: linux.hh:161
gem5::X86Linux32::TGT_MAP_DENYWRITE
static constexpr unsigned TGT_MAP_DENYWRITE
Definition: linux.hh:340
gem5::X86Linux32::tgt_stat64::st_ctime_nsec
uint32_t st_ctime_nsec
Definition: linux.hh:267
gem5::X86Linux64::tgt_sysinfo
Definition: linux.hh:227
gem5::X86Linux64::tgt_sysinfo::freeswap
uint64_t freeswap
Definition: linux.hh:236
gem5::X86Linux64::TGT_SIGINT
static const int TGT_SIGINT
Definition: linux.hh:142
gem5::X86Linux32::TGT_O_NOFOLLOW
static constexpr int TGT_O_NOFOLLOW
Definition: linux.hh:320
gem5::X86Linux64::TGT_MAP_HUGETLB
static constexpr unsigned TGT_MAP_HUGETLB
Definition: linux.hh:212
gem5::X86Linux32::TGT_SIGPOLL
static const int TGT_SIGPOLL
Definition: linux.hh:301
gem5::X86Linux32::tgt_stat64::st_ctimeX
uint32_t st_ctimeX
Definition: linux.hh:266
gem5::X86Linux64::TGT_MAP_FIXED
static constexpr unsigned TGT_MAP_FIXED
Definition: linux.hh:219
gem5::X86Linux64::TGT_O_CLOEXEC
static constexpr int TGT_O_CLOEXEC
Definition: linux.hh:192
gem5::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:59
gem5::X86Linux64::tgt_stat64
Definition: linux.hh:99
gem5::X86Linux32::tgt_sysinfo::totalhigh
uint32_t totalhigh
Definition: linux.hh:364
gem5::X86Linux32::TGT_MAP_ANONYMOUS
static constexpr unsigned TGT_MAP_ANONYMOUS
Definition: linux.hh:350
gem5::X86Linux64::TGT_O_CREAT
static constexpr int TGT_O_CREAT
O_CREAT.
Definition: linux.hh:179
gem5::X86Linux32::TGT_O_EXCL
static constexpr int TGT_O_EXCL
O_EXCL.
Definition: linux.hh:310
gem5::X86Linux32::TGT_SIGURG
static const int TGT_SIGURG
Definition: linux.hh:294
gem5::X86Linux64::TGT_SIGSYS
static const int TGT_SIGSYS
Definition: linux.hh:173
gem5::X86Linux32::tgt_stat64::st_dev
uint64_t st_dev
Definition: linux.hh:250
gem5::X86Linux32::TGT_MAP_SHARED
static constexpr unsigned TGT_MAP_SHARED
Definition: linux.hh:336
gem5::X86Linux64::TGT_SIGPOLL
static const int TGT_SIGPOLL
Definition: linux.hh:171
gem5::X86Linux64
Definition: linux.hh:95
gem5::X86Linux32::TGT_MAP_HUGETLB
static constexpr unsigned TGT_MAP_HUGETLB
Definition: linux.hh:344
gem5::X86Linux32::TGT_O_PATH
static constexpr int TGT_O_PATH
Definition: linux.hh:324
gem5::X86Linux32::TGT_SIGSTKFLT
static const int TGT_SIGSTKFLT
Definition: linux.hh:287
gem5::X86Linux32::TGT_MAP_STACK
static constexpr unsigned TGT_MAP_STACK
Definition: linux.hh:349
gem5::X86Linux64::tgt_statfs::f_frsize
long f_frsize
Definition: linux.hh:137
gem5::X86Linux32::tgt_sysinfo::mem_unit
uint32_t mem_unit
Definition: linux.hh:366
gem5::X86Linux32::TGT_O_NOATIME
static constexpr int TGT_O_NOATIME
Definition: linux.hh:321
gem5::X86Linux64::TGT_O_APPEND
static constexpr int TGT_O_APPEND
O_APPEND.
Definition: linux.hh:183
gem5::X86Linux32::tgt_stat64::st_atimeX
uint32_t st_atimeX
Definition: linux.hh:262
gem5::X86Linux64::TGT_O_RDWR
static constexpr int TGT_O_RDWR
O_RDWR.
Definition: linux.hh:178
gem5::X86Linux32::TGT_O_NONBLOCK
static constexpr int TGT_O_NONBLOCK
O_NONBLOCK.
Definition: linux.hh:314
gem5::X86Linux64::tgt_stat64::st_blocks
int64_t st_blocks
Definition: linux.hh:111
gem5::X86Linux64::TGT_MAP_32BIT
static constexpr unsigned TGT_MAP_32BIT
Definition: linux.hh:206
gem5::X86Linux32::TGT_SIGUSR1
static const int TGT_SIGUSR1
Definition: linux.hh:281
gem5::X86Linux64::TGT_SIGIO
static const int TGT_SIGIO
Definition: linux.hh:170
gem5::OpenFlagTable
Definition: flag_tables.hh:60
gem5::X86Linux64::TGT_SIGSTKFLT
static const int TGT_SIGSTKFLT
Definition: linux.hh:157
gem5::X86Linux64::TGT_SIGSTOP
static const int TGT_SIGSTOP
Definition: linux.hh:160
gem5::X86Linux64::tgt_fsid
Definition: linux.hh:121
gem5::X86Linux32::mmapFlagTable
static const std::map< int, int > mmapFlagTable
Definition: linux.hh:326
syscall_return.hh
gem5::X86Linux32::clock_t
int32_t clock_t
Definition: linux.hh:333
gem5::X86Linux64::tgt_statfs::f_bsize
long f_bsize
Definition: linux.hh:129
gem5::ThreadContext::getIsaPtr
virtual BaseISA * getIsaPtr()=0
gem5::X86Linux64::TGT_SIGHUP
static const int TGT_SIGHUP
Definition: linux.hh:141
gem5::X86Linux64::TGT_MAP_ANONYMOUS
static constexpr unsigned TGT_MAP_ANONYMOUS
Definition: linux.hh:218
gem5::ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:94
gem5::X86ISA::stack
Bitfield< 17, 16 > stack
Definition: misc.hh:593
gem5::X86Linux64::tgt_sysinfo::freehigh
uint64_t freehigh
Definition: linux.hh:239
gem5::X86Linux32::TGT_MAP_GROWSDOWN
static constexpr unsigned TGT_MAP_GROWSDOWN
Definition: linux.hh:343
gem5::X86Linux64::tgt_stat64::st_atimeX
uint64_t st_atimeX
Definition: linux.hh:112
gem5::X86Linux64::TGT_MAP_EXECUTABLE
static constexpr unsigned TGT_MAP_EXECUTABLE
Definition: linux.hh:209
gem5::X86Linux64::tgt_stat64::st_mode
uint32_t st_mode
Definition: linux.hh:104
gem5::X86ISA::MISCREG_FS_EFF_BASE
@ MISCREG_FS_EFF_BASE
Definition: misc.hh:340
gem5::X86Linux64::tgt_sysinfo::freeram
uint64_t freeram
Definition: linux.hh:232
gem5::X86Linux32::TGT_SIGABRT
static const int TGT_SIGABRT
Definition: linux.hh:276
gem5::X86Linux32::tgt_stat64::st_size
int64_t st_size
Definition: linux.hh:259
gem5::X86Linux32::TGT_SIGTTOU
static const int TGT_SIGTTOU
Definition: linux.hh:293
gem5::X86Linux64::TGT_SIGTTOU
static const int TGT_SIGTTOU
Definition: linux.hh:163
gem5::X86Linux64::tgt_stat64::st_nlink
uint64_t st_nlink
Definition: linux.hh:103
gem5::X86Linux64::tgt_stat64::st_dev
uint64_t st_dev
Definition: linux.hh:101
gem5::X86Linux64::tgt_statfs::f_namelen
long f_namelen
Definition: linux.hh:136
gem5::X86Linux32::TGT_SIGTERM
static const int TGT_SIGTERM
Definition: linux.hh:286
gem5::X86Linux64::tgt_statfs::f_ffree
long f_ffree
Definition: linux.hh:134
gem5::X86Linux64::TGT_SIGUNUSED
static const int TGT_SIGUNUSED
Definition: linux.hh:174
gem5::Linux
This class encapsulates the types, structures, constants, functions, and syscall-number mappings spec...
Definition: linux.hh:61
gem5::X86Linux64::TGT_SIGURG
static const int TGT_SIGURG
Definition: linux.hh:164
gem5::X86Linux64::TGT_O_NOFOLLOW
static constexpr int TGT_O_NOFOLLOW
Definition: linux.hh:190
gem5::guest_abi::Result< ABI, SyscallReturn, typename std::enable_if_t< std::is_base_of_v< X86Linux::SyscallABI, ABI > > >::store
static void store(ThreadContext *tc, const SyscallReturn &ret)
Definition: linux.hh:87
gem5::X86Linux64::off_t
uint64_t off_t
Definition: linux.hh:199
gem5::X86Linux32::tgt_stat64::st_mode
uint32_t st_mode
Definition: linux.hh:253
gem5::X86Linux32::TGT_MAP_EXECUTABLE
static constexpr unsigned TGT_MAP_EXECUTABLE
Definition: linux.hh:341
gem5::X86Linux64::TGT_SIGABRT
static const int TGT_SIGABRT
Definition: linux.hh:146
gem5::X86Linux64::TGT_MAP_POPULATE
static constexpr unsigned TGT_MAP_POPULATE
Definition: linux.hh:216
gem5::X86Linux32::TGT_SIGCHLD
static const int TGT_SIGCHLD
Definition: linux.hh:288
gem5::X86Linux32::TGT_SIGSYS
static const int TGT_SIGSYS
Definition: linux.hh:303
gem5::X86Linux32::TGT_MAP_POPULATE
static constexpr unsigned TGT_MAP_POPULATE
Definition: linux.hh:348
utility.hh
gem5::X86Linux32::TGT_SIGWINCH
static const int TGT_SIGWINCH
Definition: linux.hh:299
gem5::Linux::TGT_CLONE_SETTLS
static const unsigned TGT_CLONE_SETTLS
Definition: linux.hh:318
gem5::X86Linux32
Definition: linux.hh:245
gem5::X86Linux64::tgt_sysinfo::bufferram
uint64_t bufferram
Definition: linux.hh:234
compiler.hh
gem5::X86Linux64::tgt_sysinfo::totalram
uint64_t totalram
Definition: linux.hh:231
gem5::X86Linux64::TGT_O_EXCL
static constexpr int TGT_O_EXCL
O_EXCL.
Definition: linux.hh:180
gem5::X86Linux32::TGT_O_DIRECTORY
static constexpr int TGT_O_DIRECTORY
Definition: linux.hh:319
gem5::X86Linux64::TGT_FASYNC
static constexpr int TGT_FASYNC
Definition: linux.hh:186
gem5::SyscallReturn::encodedValue
int64_t encodedValue() const
The encoded value (as described above)
Definition: syscall_return.hh:122
gem5::X86Linux64::TGT_SIGILL
static const int TGT_SIGILL
Definition: linux.hh:144
gem5::X86Linux64::TGT_SIGKILL
static const int TGT_SIGKILL
Definition: linux.hh:150
gem5::X86Linux64::tgt_sysinfo::mem_unit
uint64_t mem_unit
Definition: linux.hh:240
gem5::X86Linux64::TGT_MAP_FILE
static constexpr unsigned TGT_MAP_FILE
Definition: linux.hh:210
gem5::X86Linux64::tgt_stat64::st_atime_nsec
uint64_t st_atime_nsec
Definition: linux.hh:113
gem5::X86Linux64::TGT_O_NOCTTY
static constexpr int TGT_O_NOCTTY
O_NOCTTY.
Definition: linux.hh:181
gem5::X86Linux32::TGT_MAP_LOCKED
static constexpr unsigned TGT_MAP_LOCKED
Definition: linux.hh:345
gem5::X86Linux64::TGT_SIGUSR2
static const int TGT_SIGUSR2
Definition: linux.hh:153
gem5::GEM5_DEPRECATED_NAMESPACE
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
gem5::X86Linux64::tgt_sysinfo::procs
uint16_t procs
Definition: linux.hh:237
gem5::X86Linux32::TGT_SIGVTALRM
static const int TGT_SIGVTALRM
Definition: linux.hh:297
gem5::MipsISA::ptc
Bitfield< 7, 0 > ptc
Definition: mt_constants.hh:56
gem5::X86Linux32::tgt_stat64::st_atime_nsec
uint32_t st_atime_nsec
Definition: linux.hh:263
gem5::X86Linux64::TGT_MAP_DENYWRITE
static constexpr unsigned TGT_MAP_DENYWRITE
Definition: linux.hh:208
gem5::X86Linux32::time_t
int32_t time_t
Definition: linux.hh:332
gem5::X86Linux32::TGT_O_DSYNC
static constexpr int TGT_O_DSYNC
O_DSYNC.
Definition: linux.hh:315
gem5::X86Linux64::TGT_SIGTRAP
static const int TGT_SIGTRAP
Definition: linux.hh:145
gem5::X86Linux64::TGT_SIGPIPE
static const int TGT_SIGPIPE
Definition: linux.hh:154
gem5::X86Linux64::tgt_statfs::f_files
long f_files
Definition: linux.hh:133
gem5::X86Linux64::tgt_statfs
Definition: linux.hh:126
gem5::X86Linux32::tgt_stat64::st_mtimeX
uint32_t st_mtimeX
Definition: linux.hh:264
gem5::X86Linux64::TGT_SIGUSR1
static const int TGT_SIGUSR1
Definition: linux.hh:151
gem5::X86Linux32::TGT_O_TRUNC
static constexpr int TGT_O_TRUNC
O_TRUNC.
Definition: linux.hh:312
gem5::X86Linux32::TGT_MAP_PRIVATE
static constexpr unsigned TGT_MAP_PRIVATE
Definition: linux.hh:337
gem5::X86Linux64::tgt_statfs::f_blocks
long f_blocks
Definition: linux.hh:130
gem5::X86Linux64::TGT_SIGCHLD
static const int TGT_SIGCHLD
Definition: linux.hh:158
gem5::X86Linux64::size_t
uint64_t size_t
Basic X86_64 Linux types.
Definition: linux.hh:198
gem5::X86Linux64::TGT_SIGVTALRM
static const int TGT_SIGVTALRM
Definition: linux.hh:167
gem5::X86Linux64::TGT_MAP_NORESERVE
static constexpr unsigned TGT_MAP_NORESERVE
Definition: linux.hh:215
gem5::Process
Definition: process.hh:68
gem5::X86Linux32::TGT_SIGUSR2
static const int TGT_SIGUSR2
Definition: linux.hh:283
gem5::X86Linux32::TGT_MAP_FILE
static constexpr unsigned TGT_MAP_FILE
Definition: linux.hh:342
gem5::X86Linux64::tgt_iovec
Definition: linux.hh:221
gem5::X86Linux
Definition: linux.hh:53
gem5::X86Linux64::TGT_O_PATH
static constexpr int TGT_O_PATH
Definition: linux.hh:194
gem5::X86Linux::SyscallABI
Definition: linux.hh:75
gem5::X86Linux64::tgt_statfs::f_type
long f_type
Definition: linux.hh:128
gem5::X86Linux32::TGT_O_LARGEFILE
static constexpr int TGT_O_LARGEFILE
Definition: linux.hh:318
gem5::X86Linux32::TGT_SIGTSTP
static const int TGT_SIGTSTP
Definition: linux.hh:291
gem5::X86Linux32::TGT_SIGILL
static const int TGT_SIGILL
Definition: linux.hh:274
gem5::X86Linux64::TGT_O_LARGEFILE
static constexpr int TGT_O_LARGEFILE
Definition: linux.hh:188
gem5::X86Linux64::tgt_sysinfo::uptime
int64_t uptime
Definition: linux.hh:229
gem5::X86Linux64::TGT_O_DIRECTORY
static constexpr int TGT_O_DIRECTORY
Definition: linux.hh:189
gem5::X86Linux32::tgt_sysinfo::uptime
int32_t uptime
Definition: linux.hh:355
gem5::X86Linux64::TGT_O_NONBLOCK
static constexpr int TGT_O_NONBLOCK
O_NONBLOCK.
Definition: linux.hh:184
gem5::X86Linux32::TGT_MAP_ANON
static constexpr unsigned TGT_MAP_ANON
Definition: linux.hh:339
gem5::X86Linux64::TGT_MAP_ANON
static constexpr unsigned TGT_MAP_ANON
Definition: linux.hh:207
std
Overload hash function for BasicBlockRange type.
Definition: types.hh:111
gem5::X86Linux::byteOrder
static const ByteOrder byteOrder
Definition: linux.hh:56
gem5::X86Linux32::TGT_SIGIOT
static const int TGT_SIGIOT
Definition: linux.hh:277
gem5::X86Linux32::TGT_SIGTTIN
static const int TGT_SIGTTIN
Definition: linux.hh:292
gem5::X86Linux32::tgt_sysinfo::totalswap
uint32_t totalswap
Definition: linux.hh:361
gem5::X86Linux32::TGT_FASYNC
static constexpr int TGT_FASYNC
Definition: linux.hh:316
gem5::X86Linux64::tgt_iovec::iov_len
uint64_t iov_len
Definition: linux.hh:224
gem5::X86Linux64::tgt_stat64::__pad0
uint32_t __pad0
Definition: linux.hh:107
guest_abi.hh
gem5::X86Linux32::TGT_O_RDWR
static constexpr int TGT_O_RDWR
O_RDWR.
Definition: linux.hh:308
gem5::X86Linux64::TGT_O_DSYNC
static constexpr int TGT_O_DSYNC
Definition: linux.hh:185
gem5::X86Linux32::off_t
uint32_t off_t
Definition: linux.hh:331
gem5::X86Linux32::TGT_O_WRONLY
static constexpr int TGT_O_WRONLY
O_WRONLY.
Definition: linux.hh:307
gem5::X86Linux32::TGT_SIGPIPE
static const int TGT_SIGPIPE
Definition: linux.hh:284
gem5::X86Linux64::tgt_sysinfo::totalhigh
uint64_t totalhigh
Definition: linux.hh:238
gem5::X86Linux64::tgt_sysinfo::sharedram
uint64_t sharedram
Definition: linux.hh:233
gem5::X86Linux32::TGT_SIGCONT
static const int TGT_SIGCONT
Definition: linux.hh:289
gem5::X86Linux32::TGT_O_NOCTTY
static constexpr int TGT_O_NOCTTY
O_NOCTTY.
Definition: linux.hh:311
gem5::X86Linux64::TGT_O_NOATIME
static constexpr int TGT_O_NOATIME
Definition: linux.hh:191
gem5::X86Linux32::tgt_stat64::st_ino
uint64_t st_ino
Definition: linux.hh:268
gem5::X86Linux64::tgt_stat64::unused0
int64_t unused0[3]
Definition: linux.hh:118
gem5::X86Linux32::tgt_stat64::st_nlink
uint32_t st_nlink
Definition: linux.hh:254
gem5::X86Linux64::tgt_stat64::st_size
int64_t st_size
Definition: linux.hh:109
gem5::X86Linux64::TGT_MAP_PRIVATE
static constexpr unsigned TGT_MAP_PRIVATE
Definition: linux.hh:205
gem5::X86Linux64::TGT_SIGTTIN
static const int TGT_SIGTTIN
Definition: linux.hh:162
gem5::X86Linux64::TGT_SIGALRM
static const int TGT_SIGALRM
Definition: linux.hh:155
gem5::X86Linux64::tgt_stat64::st_blksize
int64_t st_blksize
Definition: linux.hh:110
gem5::X86Linux32::TGT_SIGQUIT
static const int TGT_SIGQUIT
Definition: linux.hh:273
gem5::X86Linux32::TGT_SIGSEGV
static const int TGT_SIGSEGV
Definition: linux.hh:282
gem5::X86Linux64::TGT_SIGPWR
static const int TGT_SIGPWR
Definition: linux.hh:172
gem5::X86Linux32::tgt_stat64::st_mtime_nsec
uint32_t st_mtime_nsec
Definition: linux.hh:265
gem5::X86Linux32::TGT_O_DIRECT
static constexpr int TGT_O_DIRECT
O_DIRECTIO.
Definition: linux.hh:317
gem5::X86Linux32::TGT_SIGFPE
static const int TGT_SIGFPE
Definition: linux.hh:279
gem5::X86Linux32::TGT_SIGXCPU
static const int TGT_SIGXCPU
Definition: linux.hh:295
gem5::X86Linux64::TGT_SIGBUS
static const int TGT_SIGBUS
Definition: linux.hh:148
gem5::X86Linux32::tgt_sysinfo::freeram
uint32_t freeram
Definition: linux.hh:358
gem5::X86Linux32::TGT_MAP_NORESERVE
static constexpr unsigned TGT_MAP_NORESERVE
Definition: linux.hh:347
gem5::X86Linux32::tgt_stat64::st_rdev
uint64_t st_rdev
Definition: linux.hh:257
gem5::guest_abi::Result
Definition: definition.hh:64
gem5::X86Linux32::tgt_stat64::__st_ino
uint32_t __st_ino
Definition: linux.hh:252
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: tlb.cc:60
gem5::X86Linux64::time_t
int64_t time_t
Definition: linux.hh:200
gem5::X86Linux32::TGT_SIGPROF
static const int TGT_SIGPROF
Definition: linux.hh:298
gem5::X86Linux32::tgt_sysinfo::loads
uint32_t loads[3]
Definition: linux.hh:356
gem5::X86Linux32::TGT_O_APPEND
static constexpr int TGT_O_APPEND
O_APPEND.
Definition: linux.hh:313
gem5::X86Linux64::tgt_stat64::st_ino
uint64_t st_ino
Definition: linux.hh:102
gem5::X86Linux32::size_t
uint32_t size_t
Basic X86 Linux types.
Definition: linux.hh:330
gem5::X86Linux32::TGT_O_RDONLY
static constexpr int TGT_O_RDONLY
O_RDONLY.
Definition: linux.hh:306
gem5::X86Linux32::tgt_sysinfo::freehigh
uint32_t freehigh
Definition: linux.hh:365
gem5::X86Linux64::tgt_statfs::f_fsid
tgt_fsid f_fsid
Definition: linux.hh:135
gem5::X86Linux64::TGT_SIGPROF
static const int TGT_SIGPROF
Definition: linux.hh:168
gem5::X86Linux32::tgt_sysinfo::bufferram
uint32_t bufferram
Definition: linux.hh:360
gem5::X86Linux32::tgt_sysinfo::totalram
uint32_t totalram
Definition: linux.hh:357
gem5::X86Linux64::TGT_SIGXFSZ
static const int TGT_SIGXFSZ
Definition: linux.hh:166
gem5::X86Linux64::tgt_stat64::st_rdev
uint64_t st_rdev
Definition: linux.hh:108
gem5::X86Linux32::tgt_sysinfo
Definition: linux.hh:353
gem5::X86Linux32::tgt_stat64::st_uid
uint32_t st_uid
Definition: linux.hh:255
gem5::X86Linux32::TGT_SIGALRM
static const int TGT_SIGALRM
Definition: linux.hh:285
gem5::X86Linux32::TGT_O_CLOEXEC
static constexpr int TGT_O_CLOEXEC
Definition: linux.hh:322
gem5::X86Linux64::TGT_MAP_NONBLOCK
static constexpr unsigned TGT_MAP_NONBLOCK
Definition: linux.hh:214
gem5::ThreadContext::setMiscRegNoEffect
virtual void setMiscRegNoEffect(RegIndex misc_reg, RegVal val)=0
flag_tables.hh
gem5::X86Linux32::TGT_SIGHUP
static const int TGT_SIGHUP
Definition: linux.hh:271
gem5::X86Linux32::TGT_MAP_32BIT
static constexpr unsigned TGT_MAP_32BIT
Definition: linux.hh:338
gem5::X86Linux32::TGT_SIGIO
static const int TGT_SIGIO
Definition: linux.hh:300
gem5::X86Linux64::tgt_stat64::st_gid
uint32_t st_gid
Definition: linux.hh:106

Generated on Wed May 4 2022 12:13:48 for gem5 by doxygen 1.8.17