gem5  v21.1.0.2
linux.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2006 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 
29 #ifndef __ARCH_RISCV_LINUX_LINUX_HH__
30 #define __ARCH_RISCV_LINUX_LINUX_HH__
31 
32 #include <map>
33 
34 #include "arch/riscv/utility.hh"
36 #include "kern/linux/linux.hh"
37 
38 namespace gem5
39 {
40 
41 class RiscvLinux : public Linux
42 {
43  public:
44  static const ByteOrder byteOrder = ByteOrder::little;
45 };
46 
47 class RiscvLinux64 : public RiscvLinux, public OpenFlagTable<RiscvLinux64>
48 {
49  public:
50  static const int TGT_SIGHUP = 1;
51  static const int TGT_SIGINT = 2;
52  static const int TGT_SIGQUIT = 3;
53  static const int TGT_SIGILL = 4;
54  static const int TGT_SIGTRAP = 5;
55  static const int TGT_SIGABRT = 6;
56  static const int TGT_SIGIOT = 6;
57  static const int TGT_SIGEMT = 7;
58  static const int TGT_SIGFPE = 8;
59  static const int TGT_SIGKILL = 9;
60  static const int TGT_SIGBUS = 10;
61  static const int TGT_SIGSEGV = 11;
62  static const int TGT_SIGSYS = 12;
63  static const int TGT_SIGPIPE = 13;
64  static const int TGT_SIGALRM = 14;
65  static const int TGT_SIGTERM = 15;
66  static const int TGT_SIGURG = 16;
67  static const int TGT_SIGSTOP = 17;
68  static const int TGT_SIGTSTP = 18;
69  static const int TGT_SIGCONT = 19;
70  static const int TGT_SIGCHLD = 20;
71  static const int TGT_SIGCLD = 20;
72  static const int TGT_SIGTTIN = 21;
73  static const int TGT_SIGTTOU = 22;
74  static const int TGT_SIGPOLL = 23;
75  static const int TGT_SIGIO = 23;
76  static const int TGT_SIGXCPU = 24;
77  static const int TGT_SIGXFSZ = 25;
78  static const int TGT_SIGVTALRM = 26;
79  static const int TGT_SIGPROF = 27;
80  static const int TGT_SIGWINCH = 28;
81  static const int TGT_SIGLOST = 29;
82  static const int TGT_SIGPWR = 29;
83  static const int TGT_SIGUSR1 = 30;
84  static const int TGT_SIGUSR2 = 31;
85 
87  static constexpr int TGT_O_RDONLY = 0x000000;
89  static constexpr int TGT_O_WRONLY = 0x000001;
90  static constexpr int TGT_O_RDWR = 0x000002;
91  static constexpr int TGT_O_CREAT = 0x000040;
92  static constexpr int TGT_O_EXCL = 0x000080;
93  static constexpr int TGT_O_NOCTTY = 0x000100;
94  static constexpr int TGT_O_TRUNC = 0x000200;
95  static constexpr int TGT_O_APPEND = 0x000400;
96  static constexpr int TGT_O_NONBLOCK = 0x000800;
97  static constexpr int TGT_O_SYNC = 0x001000;
98  static constexpr int TGT_FSYNC = 0x001000;
99  static constexpr int TGT_FASYNC = 0x008000;
100  // The following are not present in riscv64-unknown-elf <fcntl.h>
101  static constexpr int TGT_O_DSYNC = 0x010000;
102  static constexpr int TGT_O_CLOEXEC = 0x040000;
103  static constexpr int TGT_O_NOINHERIT = 0x040000;
104  static constexpr int TGT_O_DIRECT = 0x080000;
105  static constexpr int TGT_O_NOFOLLOW = 0x100000;
106  static constexpr int TGT_O_DIRECTORY = 0x200000;
107  // The following are not defined by riscv64-unknown-elf
108  static constexpr int TGT_O_LARGEFILE = 0x020000;
109  static constexpr int TGT_O_NOATIME = 0x800000;
110  static constexpr int TGT_O_PATH = 0x400000;
111 
112 
113  // Only defined in riscv-unknown-elf for proxy kernel and not linux kernel
114  static constexpr unsigned TGT_MAP_SHARED = 0x0001;
115  static constexpr unsigned TGT_MAP_PRIVATE = 0x0002;
116  static constexpr unsigned TGT_MAP_FIXED = 0x0010;
117  static constexpr unsigned TGT_MAP_ANONYMOUS = 0x0020;
118  static constexpr unsigned TGT_MAP_POPULATE = 0x1000;
119  static constexpr unsigned TGT_MREMAP_FIXED = 0x0020;
120 
121  typedef int64_t time_t;
122  typedef uint64_t dev_t;
123  typedef uint64_t ino_t;
124  typedef uint32_t mode_t;
125  typedef uint32_t nlink_t;
126  typedef uint32_t uid_t;
127  typedef uint32_t gid_t;
128  typedef int64_t off_t;
129  typedef uint64_t blksize_t;
130  typedef uint64_t blkcnt_t;
131 
132  struct timespec
133  {
135  int64_t tv_nsec;
136  };
137 
138  struct tgt_stat64
139  {
151  uint64_t st_atimeX;
152  uint64_t st_atime_nsec;
153  uint64_t st_mtimeX;
154  uint64_t st_mtime_nsec;
155  uint64_t st_ctimeX;
156  uint64_t st_ctime_nsec;
157  int32_t ___glibc_reserved[2];
158  };
159 
160  struct tgt_fsid_t
161  {
162  int32_t val[2];
163  };
164 
165  struct tgt_statfs
166  {
167  uint64_t f_type;
168  uint64_t f_bsize;
169  uint64_t f_blocks;
170  uint64_t f_bfree;
171  uint64_t f_bavail;
172  uint64_t f_files;
173  uint64_t f_ffree;
175  uint64_t f_namelen;
176  uint64_t f_frsize;
177  uint64_t f_flags;
178  uint64_t f_spare[4];
179  };
180 
181  struct tgt_sysinfo
182  {
183  int64_t uptime;
184  uint64_t loads[3];
185  uint64_t totalram;
186  uint64_t freeram;
187  uint64_t sharedram;
188  uint64_t bufferram;
189  uint64_t totalswap;
190  uint64_t freeswap;
191  uint16_t procs;
192  uint16_t pad;
193  uint64_t totalhigh;
194  uint64_t freehigh;
195  uint32_t mem_unit;
196  };
197 
198  static void
199  archClone(uint64_t flags,
200  Process *pp, Process *cp,
202  uint64_t stack, uint64_t tls)
203  {
204  ctc->getIsaPtr()->copyRegsFrom(ptc);
205  if (flags & TGT_CLONE_SETTLS)
207  if (stack)
209  }
210 };
211 
212 class RiscvLinux32 : public RiscvLinux, public OpenFlagTable<RiscvLinux32>
213 {
214  public:
215  static const int TGT_SIGHUP = 1;
216  static const int TGT_SIGINT = 2;
217  static const int TGT_SIGQUIT = 3;
218  static const int TGT_SIGILL = 4;
219  static const int TGT_SIGTRAP = 5;
220  static const int TGT_SIGABRT = 6;
221  static const int TGT_SIGIOT = 6;
222  static const int TGT_SIGEMT = 7;
223  static const int TGT_SIGFPE = 8;
224  static const int TGT_SIGKILL = 9;
225  static const int TGT_SIGBUS = 10;
226  static const int TGT_SIGSEGV = 11;
227  static const int TGT_SIGSYS = 12;
228  static const int TGT_SIGPIPE = 13;
229  static const int TGT_SIGALRM = 14;
230  static const int TGT_SIGTERM = 15;
231  static const int TGT_SIGURG = 16;
232  static const int TGT_SIGSTOP = 17;
233  static const int TGT_SIGTSTP = 18;
234  static const int TGT_SIGCONT = 19;
235  static const int TGT_SIGCHLD = 20;
236  static const int TGT_SIGCLD = 20;
237  static const int TGT_SIGTTIN = 21;
238  static const int TGT_SIGTTOU = 22;
239  static const int TGT_SIGPOLL = 23;
240  static const int TGT_SIGIO = 23;
241  static const int TGT_SIGXCPU = 24;
242  static const int TGT_SIGXFSZ = 25;
243  static const int TGT_SIGVTALRM = 26;
244  static const int TGT_SIGPROF = 27;
245  static const int TGT_SIGWINCH = 28;
246  static const int TGT_SIGLOST = 29;
247  static const int TGT_SIGPWR = 29;
248  static const int TGT_SIGUSR1 = 30;
249  static const int TGT_SIGUSR2 = 31;
250 
252  // The following values match newlib 3.0.0.
254  // Note that glibc has different values.
255  static constexpr int TGT_O_RDONLY = 0x000000;
256  static constexpr int TGT_O_WRONLY = 0x000001;
257  static constexpr int TGT_O_RDWR = 0x000002;
258  static constexpr int TGT_O_CREAT = 0x000200;
259  static constexpr int TGT_O_EXCL = 0x000800;
260  static constexpr int TGT_O_NOCTTY = 0x008000;
261  static constexpr int TGT_O_TRUNC = 0x000400;
262  static constexpr int TGT_O_APPEND = 0x000008;
263  static constexpr int TGT_O_NONBLOCK = 0x004000;
264  static constexpr int TGT_O_SYNC = 0x002000;
265  static constexpr int TGT_FSYNC = 0x002000;
266  static constexpr int TGT_FASYNC = 0x000040;
267  // The following are not present in riscv32-unknown-elf <fcntl.h>
268  static constexpr int TGT_O_DSYNC = 0x010000;
269  static constexpr int TGT_O_CLOEXEC = 0x040000;
270  static constexpr int TGT_O_NOINHERIT = 0x040000;
271  static constexpr int TGT_O_DIRECT = 0x080000;
272  static constexpr int TGT_O_NOFOLLOW = 0x100000;
273  static constexpr int TGT_O_DIRECTORY = 0x200000;
274  // The following are not defined by riscv32-unknown-elf
275  static constexpr int TGT_O_LARGEFILE = 0x020000;
276  static constexpr int TGT_O_NOATIME = 0x800000;
277  static constexpr int TGT_O_PATH = 0x400000;
278 
279 
280  // Only defined in riscv-unknown-elf for proxy kernel and not linux kernel
281  static constexpr unsigned TGT_MAP_SHARED = 0x0001;
282  static constexpr unsigned TGT_MAP_PRIVATE = 0x0002;
283  static constexpr unsigned TGT_MAP_FIXED = 0x0010;
284  static constexpr unsigned TGT_MAP_ANONYMOUS = 0x0020;
285  static constexpr unsigned TGT_MAP_POPULATE = 0x1000;
286  static constexpr unsigned TGT_MREMAP_FIXED = 0x0020;
287 
288  // Newlib 3.0.0 defaults to 64-bits for time_t.
289  // Currently time_t in glibc for riscv32 is 32-bits, but will be changed.
290  typedef int64_t time_t;
291 
293  struct rlimit
294  {
295  uint32_t rlim_cur;
296  uint32_t rlim_max;
297  };
298 
299  struct timespec
300  {
302  int32_t tv_nsec;
303  };
304 
305  struct tgt_fsid_t
306  {
307  int32_t val[2];
308  };
309 
310  struct tgt_stat
311  {
312  uint64_t st_dev;
313  uint64_t st_ino;
314  uint32_t st_mode;
315  uint32_t st_nlink;
316  uint32_t st_uid;
317  uint32_t st_gid;
318  uint64_t st_rdev;
319  uint64_t __pad1;
320  int64_t st_size;
321  int32_t st_blksize;
322  int32_t __pad2;
323  int64_t st_blocks;
325  int32_t st_atime_nsec;
327  int32_t st_mtime_nsec;
329  int32_t st_ctime_nsec;
330  int32_t __unused4;
331  int32_t __unused5;
332  };
333 
334  struct tgt_statfs
335  {
336  uint32_t f_type;
337  uint32_t f_bsize;
338  uint32_t f_blocks;
339  uint32_t f_bfree;
340  uint32_t f_bavail;
341  uint32_t f_files;
342  uint32_t f_ffree;
344  uint32_t f_namelen;
345  uint32_t f_frsize;
346  uint32_t f_flags;
347  uint32_t f_spare[4];
348  };
349 
350  struct tgt_sysinfo
351  {
352  int32_t uptime;
353  uint32_t loads[3];
354  uint32_t totalram;
355  uint32_t freeram;
356  uint32_t sharedram;
357  uint32_t bufferram;
358  uint32_t totalswap;
359  uint32_t freeswap;
360  uint16_t procs;
361  uint16_t pad;
362  uint32_t totalhigh;
363  uint32_t freehigh;
364  uint32_t mem_unit;
365  };
366 
367  static void
368  archClone(uint64_t flags,
369  Process *pp, Process *cp,
371  uint64_t stack, uint64_t tls)
372  {
373  ctc->getIsaPtr()->copyRegsFrom(ptc);
374  if (stack)
376  }
377 };
378 
379 } // namespace gem5
380 
381 #endif
gem5::ThreadContext::setIntReg
virtual void setIntReg(RegIndex reg_idx, RegVal val)=0
gem5::RiscvLinux64::TGT_O_CLOEXEC
static constexpr int TGT_O_CLOEXEC
O_CLOEXEC.
Definition: linux.hh:102
gem5::RiscvLinux32::TGT_O_NOFOLLOW
static constexpr int TGT_O_NOFOLLOW
O_NOFOLLOW.
Definition: linux.hh:272
gem5::RiscvLinux32::TGT_O_RDWR
static constexpr int TGT_O_RDWR
O_RDWR.
Definition: linux.hh:257
gem5::RiscvLinux64::TGT_SIGVTALRM
static const int TGT_SIGVTALRM
Definition: linux.hh:78
gem5::RiscvLinux64::TGT_SIGBUS
static const int TGT_SIGBUS
Definition: linux.hh:60
gem5::RiscvLinux64::tgt_statfs::f_frsize
uint64_t f_frsize
Definition: linux.hh:176
gem5::RiscvLinux32::tgt_stat::st_nlink
uint32_t st_nlink
Definition: linux.hh:315
gem5::RiscvLinux32::archClone
static void archClone(uint64_t flags, Process *pp, Process *cp, ThreadContext *ptc, ThreadContext *ctc, uint64_t stack, uint64_t tls)
Definition: linux.hh:368
gem5::RiscvLinux64::TGT_O_NOATIME
static constexpr int TGT_O_NOATIME
O_NOATIME.
Definition: linux.hh:109
gem5::RiscvLinux32::TGT_SIGUSR1
static const int TGT_SIGUSR1
Definition: linux.hh:248
gem5::RiscvLinux64::off_t
int64_t off_t
Definition: linux.hh:128
gem5::RiscvLinux32::tgt_statfs::f_frsize
uint32_t f_frsize
Definition: linux.hh:345
gem5::RiscvLinux32::tgt_stat::st_atime_nsec
int32_t st_atime_nsec
Definition: linux.hh:325
gem5::RiscvLinux32::tgt_sysinfo::procs
uint16_t procs
Definition: linux.hh:360
gem5::RiscvLinux32::tgt_statfs::f_files
uint32_t f_files
Definition: linux.hh:341
gem5::RiscvLinux64::timespec::tv_nsec
int64_t tv_nsec
Definition: linux.hh:135
gem5::RiscvLinux32::TGT_O_APPEND
static constexpr int TGT_O_APPEND
O_APPEND.
Definition: linux.hh:262
gem5::RiscvLinux32::TGT_O_DSYNC
static constexpr int TGT_O_DSYNC
O_DSYNC.
Definition: linux.hh:268
linux.hh
gem5::RiscvLinux64::tgt_sysinfo::totalswap
uint64_t totalswap
Definition: linux.hh:189
gem5::RiscvLinux64::TGT_SIGSTOP
static const int TGT_SIGSTOP
Definition: linux.hh:67
gem5::RiscvLinux64::tgt_stat64::st_mtimeX
uint64_t st_mtimeX
Definition: linux.hh:153
gem5::RiscvLinux64::tgt_stat64::___glibc_reserved
int32_t ___glibc_reserved[2]
Definition: linux.hh:157
gem5::BaseISA::copyRegsFrom
virtual void copyRegsFrom(ThreadContext *src)=0
gem5::RiscvLinux64::TGT_SIGPROF
static const int TGT_SIGPROF
Definition: linux.hh:79
gem5::RiscvLinux64::TGT_MAP_FIXED
static constexpr unsigned TGT_MAP_FIXED
Definition: linux.hh:116
gem5::RiscvLinux32::TGT_SIGIOT
static const int TGT_SIGIOT
Definition: linux.hh:221
gem5::RiscvLinux64::tgt_stat64::st_uid
uid_t st_uid
Definition: linux.hh:144
gem5::RiscvLinux32::tgt_stat::st_ino
uint64_t st_ino
Definition: linux.hh:313
gem5::RiscvLinux32::TGT_SIGPWR
static const int TGT_SIGPWR
Definition: linux.hh:247
gem5::RiscvLinux64::TGT_SIGXFSZ
static const int TGT_SIGXFSZ
Definition: linux.hh:77
gem5::RiscvLinux64::tgt_stat64::st_nlink
nlink_t st_nlink
Definition: linux.hh:143
gem5::RiscvLinux64::TGT_FSYNC
static constexpr int TGT_FSYNC
FSYNC.
Definition: linux.hh:98
gem5::RiscvLinux64::tgt_stat64::st_ino
ino_t st_ino
Definition: linux.hh:141
gem5::RiscvLinux64::tgt_stat64::st_mtime_nsec
uint64_t st_mtime_nsec
Definition: linux.hh:154
gem5::RiscvLinux64::TGT_SIGURG
static const int TGT_SIGURG
Definition: linux.hh:66
gem5::RiscvLinux32::TGT_SIGPROF
static const int TGT_SIGPROF
Definition: linux.hh:244
gem5::RiscvLinux32::TGT_SIGSEGV
static const int TGT_SIGSEGV
Definition: linux.hh:226
gem5::RiscvLinux32::tgt_sysinfo::sharedram
uint32_t sharedram
Definition: linux.hh:356
gem5::RiscvLinux64::tgt_sysinfo::pad
uint16_t pad
Definition: linux.hh:192
gem5::RiscvLinux32::tgt_sysinfo::totalswap
uint32_t totalswap
Definition: linux.hh:358
gem5::RiscvLinux64::tgt_sysinfo::freehigh
uint64_t freehigh
Definition: linux.hh:194
gem5::RiscvLinux32::TGT_SIGWINCH
static const int TGT_SIGWINCH
Definition: linux.hh:245
gem5::RiscvLinux32
Definition: linux.hh:212
gem5::RiscvLinux32::TGT_O_PATH
static constexpr int TGT_O_PATH
O_PATH.
Definition: linux.hh:277
gem5::RiscvLinux32::TGT_SIGTERM
static const int TGT_SIGTERM
Definition: linux.hh:230
gem5::RiscvLinux32::tgt_fsid_t
Definition: linux.hh:305
gem5::RiscvLinux64::time_t
int64_t time_t
Definition: linux.hh:121
gem5::RiscvLinux64::ino_t
uint64_t ino_t
Definition: linux.hh:123
gem5::RiscvLinux64::tgt_stat64::st_ctimeX
uint64_t st_ctimeX
Definition: linux.hh:155
gem5::RiscvLinux64::TGT_SIGUSR1
static const int TGT_SIGUSR1
Definition: linux.hh:83
gem5::RiscvLinux64::TGT_SIGCLD
static const int TGT_SIGCLD
Definition: linux.hh:71
gem5::RiscvLinux32::tgt_statfs::f_spare
uint32_t f_spare[4]
Definition: linux.hh:347
gem5::RiscvLinux32::tgt_stat::st_size
int64_t st_size
Definition: linux.hh:320
gem5::RiscvLinux32::tgt_statfs
Definition: linux.hh:334
gem5::RiscvLinux32::TGT_O_EXCL
static constexpr int TGT_O_EXCL
O_EXCL.
Definition: linux.hh:259
gem5::RiscvLinux32::tgt_sysinfo::mem_unit
uint32_t mem_unit
Definition: linux.hh:364
gem5::RiscvLinux64::tgt_sysinfo
Definition: linux.hh:181
gem5::RiscvLinux64::TGT_SIGKILL
static const int TGT_SIGKILL
Definition: linux.hh:59
gem5::RiscvLinux64::TGT_SIGTTIN
static const int TGT_SIGTTIN
Definition: linux.hh:72
gem5::RiscvLinux32::tgt_statfs::f_bavail
uint32_t f_bavail
Definition: linux.hh:340
gem5::RiscvLinux32::TGT_MAP_POPULATE
static constexpr unsigned TGT_MAP_POPULATE
Definition: linux.hh:285
gem5::RiscvLinux64::tgt_sysinfo::totalram
uint64_t totalram
Definition: linux.hh:185
gem5::RiscvLinux32::tgt_stat::st_mtimeX
time_t st_mtimeX
Definition: linux.hh:326
gem5::RiscvLinux32::tgt_stat::st_gid
uint32_t st_gid
Definition: linux.hh:317
gem5::RiscvLinux64::TGT_O_RDWR
static constexpr int TGT_O_RDWR
O_RDWR.
Definition: linux.hh:90
gem5::RiscvLinux64::TGT_SIGXCPU
static const int TGT_SIGXCPU
Definition: linux.hh:76
gem5::RiscvLinux64::TGT_O_CREAT
static constexpr int TGT_O_CREAT
O_CREAT.
Definition: linux.hh:91
gem5::RiscvLinux64::TGT_SIGTERM
static const int TGT_SIGTERM
Definition: linux.hh:65
gem5::RiscvLinux64::gid_t
uint32_t gid_t
Definition: linux.hh:127
gem5::RiscvLinux32::TGT_O_LARGEFILE
static constexpr int TGT_O_LARGEFILE
O_LARGEFILE.
Definition: linux.hh:275
gem5::RiscvLinux64::tgt_sysinfo::freeram
uint64_t freeram
Definition: linux.hh:186
gem5::RiscvLinux64::TGT_SIGQUIT
static const int TGT_SIGQUIT
Definition: linux.hh:52
gem5::RiscvLinux32::TGT_O_NONBLOCK
static constexpr int TGT_O_NONBLOCK
O_NONBLOCK.
Definition: linux.hh:263
gem5::RiscvLinux64::tgt_stat64::st_dev
dev_t st_dev
Definition: linux.hh:140
gem5::RiscvLinux32::tgt_stat::__pad1
uint64_t __pad1
Definition: linux.hh:319
gem5::RiscvLinux64::TGT_O_LARGEFILE
static constexpr int TGT_O_LARGEFILE
O_LARGEFILE.
Definition: linux.hh:108
gem5::RiscvLinux32::tgt_sysinfo::freeswap
uint32_t freeswap
Definition: linux.hh:359
gem5::RiscvLinux64::TGT_SIGHUP
static const int TGT_SIGHUP
Definition: linux.hh:50
gem5::RiscvLinux32::tgt_sysinfo::pad
uint16_t pad
Definition: linux.hh:361
gem5::RiscvLinux32::tgt_sysinfo::freehigh
uint32_t freehigh
Definition: linux.hh:363
gem5::RiscvLinux32::tgt_sysinfo
Definition: linux.hh:350
gem5::RiscvLinux64::TGT_SIGPOLL
static const int TGT_SIGPOLL
Definition: linux.hh:74
gem5::RiscvLinux64::tgt_fsid_t
Definition: linux.hh:160
gem5::RiscvLinux64::TGT_O_DIRECTORY
static constexpr int TGT_O_DIRECTORY
O_DIRECTORY.
Definition: linux.hh:106
gem5::RiscvLinux64::tgt_sysinfo::freeswap
uint64_t freeswap
Definition: linux.hh:190
gem5::RiscvLinux32::tgt_stat::st_atimeX
time_t st_atimeX
Definition: linux.hh:324
gem5::RiscvLinux64::TGT_O_TRUNC
static constexpr int TGT_O_TRUNC
O_TRUNC.
Definition: linux.hh:94
gem5::RiscvLinux32::tgt_sysinfo::bufferram
uint32_t bufferram
Definition: linux.hh:357
gem5::RiscvLinux32::TGT_SIGCHLD
static const int TGT_SIGCHLD
Definition: linux.hh:235
gem5::RiscvLinux32::timespec::tv_sec
time_t tv_sec
Definition: linux.hh:301
gem5::OpenFlagTable
Definition: flag_tables.hh:60
gem5::RiscvLinux32::TGT_SIGTTIN
static const int TGT_SIGTTIN
Definition: linux.hh:237
gem5::RiscvLinux32::TGT_SIGPIPE
static const int TGT_SIGPIPE
Definition: linux.hh:228
gem5::RiscvLinux64::archClone
static void archClone(uint64_t flags, Process *pp, Process *cp, ThreadContext *ptc, ThreadContext *ctc, uint64_t stack, uint64_t tls)
Definition: linux.hh:199
gem5::RiscvLinux64::TGT_SIGTRAP
static const int TGT_SIGTRAP
Definition: linux.hh:54
gem5::RiscvLinux64::mode_t
uint32_t mode_t
Definition: linux.hh:124
gem5::RiscvLinux64::TGT_MAP_SHARED
static constexpr unsigned TGT_MAP_SHARED
Definition: linux.hh:114
gem5::RiscvLinux32::TGT_SIGCONT
static const int TGT_SIGCONT
Definition: linux.hh:234
gem5::RiscvLinux64::TGT_SIGALRM
static const int TGT_SIGALRM
Definition: linux.hh:64
gem5::RiscvLinux64::TGT_SIGINT
static const int TGT_SIGINT
Definition: linux.hh:51
gem5::ThreadContext::getIsaPtr
virtual BaseISA * getIsaPtr()=0
gem5::RiscvLinux32::TGT_MAP_PRIVATE
static constexpr unsigned TGT_MAP_PRIVATE
Definition: linux.hh:282
gem5::RiscvLinux64::TGT_SIGSEGV
static const int TGT_SIGSEGV
Definition: linux.hh:61
gem5::RiscvLinux32::tgt_stat::st_ctime_nsec
int32_t st_ctime_nsec
Definition: linux.hh:329
gem5::ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:93
gem5::X86ISA::stack
Bitfield< 17, 16 > stack
Definition: misc.hh:593
gem5::RiscvLinux64::TGT_MAP_ANONYMOUS
static constexpr unsigned TGT_MAP_ANONYMOUS
Definition: linux.hh:117
gem5::RiscvLinux32::TGT_SIGURG
static const int TGT_SIGURG
Definition: linux.hh:231
gem5::RiscvLinux32::TGT_SIGPOLL
static const int TGT_SIGPOLL
Definition: linux.hh:239
gem5::RiscvLinux32::TGT_O_NOINHERIT
static constexpr int TGT_O_NOINHERIT
O_NOINHERIT.
Definition: linux.hh:270
gem5::RiscvLinux64::TGT_SIGTTOU
static const int TGT_SIGTTOU
Definition: linux.hh:73
gem5::RiscvLinux32::TGT_SIGQUIT
static const int TGT_SIGQUIT
Definition: linux.hh:217
gem5::RiscvLinux64::TGT_SIGWINCH
static const int TGT_SIGWINCH
Definition: linux.hh:80
gem5::RiscvISA::StackPointerReg
const int StackPointerReg
Definition: int.hh:64
gem5::RiscvLinux32::TGT_O_DIRECTORY
static constexpr int TGT_O_DIRECTORY
O_DIRECTORY.
Definition: linux.hh:273
gem5::RiscvLinux32::tgt_statfs::f_fsid
tgt_fsid_t f_fsid
Definition: linux.hh:343
gem5::RiscvLinux32::TGT_O_RDONLY
static constexpr int TGT_O_RDONLY
open(2) flag values.
Definition: linux.hh:255
gem5::RiscvLinux64::tgt_stat64::st_atime_nsec
uint64_t st_atime_nsec
Definition: linux.hh:152
gem5::RiscvLinux32::TGT_SIGCLD
static const int TGT_SIGCLD
Definition: linux.hh:236
gem5::RiscvLinux64::TGT_SIGSYS
static const int TGT_SIGSYS
Definition: linux.hh:62
gem5::RiscvLinux64::tgt_stat64::st_rdev
dev_t st_rdev
Definition: linux.hh:146
gem5::RiscvISA::ThreadPointerReg
const int ThreadPointerReg
Definition: int.hh:65
gem5::Linux
This class encapsulates the types, structures, constants, functions, and syscall-number mappings spec...
Definition: linux.hh:49
gem5::RiscvLinux
Definition: linux.hh:41
gem5::RiscvLinux64::TGT_SIGIO
static const int TGT_SIGIO
Definition: linux.hh:75
gem5::RiscvLinux64::TGT_SIGIOT
static const int TGT_SIGIOT
Definition: linux.hh:56
gem5::RiscvLinux32::tgt_stat::__pad2
int32_t __pad2
Definition: linux.hh:322
gem5::RiscvLinux32::rlimit
Limit struct for getrlimit/setrlimit.
Definition: linux.hh:293
gem5::RiscvLinux64::tgt_statfs::f_ffree
uint64_t f_ffree
Definition: linux.hh:173
gem5::RiscvLinux64::TGT_SIGUSR2
static const int TGT_SIGUSR2
Definition: linux.hh:84
gem5::RiscvLinux32::tgt_sysinfo::freeram
uint32_t freeram
Definition: linux.hh:355
gem5::RiscvLinux32::TGT_SIGVTALRM
static const int TGT_SIGVTALRM
Definition: linux.hh:243
gem5::RiscvLinux64::tgt_statfs::f_bfree
uint64_t f_bfree
Definition: linux.hh:170
gem5::RiscvLinux64::blksize_t
uint64_t blksize_t
Definition: linux.hh:129
gem5::RiscvLinux64::tgt_stat64::st_mode
mode_t st_mode
Definition: linux.hh:142
gem5::RiscvLinux32::tgt_statfs::f_ffree
uint32_t f_ffree
Definition: linux.hh:342
gem5::RiscvLinux32::tgt_stat::__unused4
int32_t __unused4
Definition: linux.hh:330
gem5::RiscvLinux32::TGT_SIGUSR2
static const int TGT_SIGUSR2
Definition: linux.hh:249
gem5::Linux::TGT_CLONE_SETTLS
static const unsigned TGT_CLONE_SETTLS
Definition: linux.hh:302
gem5::RiscvLinux64::TGT_O_RDONLY
static constexpr int TGT_O_RDONLY
open(2) flag values.
Definition: linux.hh:88
gem5::RiscvLinux64::tgt_stat64::__pad1
dev_t __pad1
Definition: linux.hh:147
gem5::RiscvLinux32::tgt_sysinfo::totalhigh
uint32_t totalhigh
Definition: linux.hh:362
gem5::RiscvLinux32::TGT_O_DIRECT
static constexpr int TGT_O_DIRECT
O_DIRECT.
Definition: linux.hh:271
gem5::RiscvLinux32::TGT_O_CLOEXEC
static constexpr int TGT_O_CLOEXEC
O_CLOEXEC.
Definition: linux.hh:269
gem5::RiscvLinux64::tgt_statfs::f_bavail
uint64_t f_bavail
Definition: linux.hh:171
gem5::RiscvLinux32::timespec::tv_nsec
int32_t tv_nsec
Definition: linux.hh:302
gem5::RiscvLinux64::TGT_O_DIRECT
static constexpr int TGT_O_DIRECT
O_DIRECT.
Definition: linux.hh:104
gem5::RiscvLinux32::TGT_SIGHUP
static const int TGT_SIGHUP
Definition: linux.hh:215
gem5::RiscvLinux32::tgt_statfs::f_namelen
uint32_t f_namelen
Definition: linux.hh:344
gem5::RiscvLinux::byteOrder
static const ByteOrder byteOrder
Definition: linux.hh:44
gem5::RiscvLinux32::TGT_SIGILL
static const int TGT_SIGILL
Definition: linux.hh:218
gem5::RiscvLinux64::tgt_stat64
Definition: linux.hh:138
gem5::RiscvLinux32::TGT_SIGLOST
static const int TGT_SIGLOST
Definition: linux.hh:246
gem5::RiscvLinux32::TGT_SIGXFSZ
static const int TGT_SIGXFSZ
Definition: linux.hh:242
gem5::RiscvLinux32::TGT_FASYNC
static constexpr int TGT_FASYNC
FASYNC.
Definition: linux.hh:266
gem5::RiscvLinux32::TGT_MAP_ANONYMOUS
static constexpr unsigned TGT_MAP_ANONYMOUS
Definition: linux.hh:284
gem5::RiscvLinux32::timespec
Definition: linux.hh:299
gem5::RiscvLinux64::tgt_sysinfo::procs
uint16_t procs
Definition: linux.hh:191
gem5::RiscvLinux32::TGT_O_CREAT
static constexpr int TGT_O_CREAT
O_CREAT.
Definition: linux.hh:258
gem5::MipsISA::ptc
Bitfield< 7, 0 > ptc
Definition: mt_constants.hh:56
gem5::RiscvLinux32::tgt_stat
Definition: linux.hh:310
gem5::RiscvLinux32::TGT_MAP_SHARED
static constexpr unsigned TGT_MAP_SHARED
Definition: linux.hh:281
gem5::RiscvLinux64::tgt_statfs::f_spare
uint64_t f_spare[4]
Definition: linux.hh:178
gem5::RiscvLinux64::TGT_SIGTSTP
static const int TGT_SIGTSTP
Definition: linux.hh:68
gem5::RiscvLinux32::TGT_SIGTSTP
static const int TGT_SIGTSTP
Definition: linux.hh:233
gem5::RiscvLinux64::tgt_sysinfo::totalhigh
uint64_t totalhigh
Definition: linux.hh:193
gem5::RiscvLinux32::tgt_statfs::f_bfree
uint32_t f_bfree
Definition: linux.hh:339
gem5::RiscvLinux64::tgt_statfs::f_type
uint64_t f_type
Definition: linux.hh:167
gem5::RiscvLinux64::tgt_statfs
Definition: linux.hh:165
gem5::RiscvLinux64::timespec::tv_sec
time_t tv_sec
Definition: linux.hh:134
gem5::RiscvLinux64::tgt_stat64::st_blocks
blkcnt_t st_blocks
Definition: linux.hh:150
gem5::RiscvLinux64::tgt_sysinfo::bufferram
uint64_t bufferram
Definition: linux.hh:188
gem5::RiscvLinux32::tgt_stat::st_ctimeX
time_t st_ctimeX
Definition: linux.hh:328
gem5::RiscvLinux64::TGT_SIGFPE
static const int TGT_SIGFPE
Definition: linux.hh:58
gem5::RiscvLinux32::TGT_FSYNC
static constexpr int TGT_FSYNC
FSYNC.
Definition: linux.hh:265
gem5::RiscvLinux64::TGT_SIGABRT
static const int TGT_SIGABRT
Definition: linux.hh:55
gem5::RiscvLinux32::tgt_stat::st_mode
uint32_t st_mode
Definition: linux.hh:314
gem5::Process
Definition: process.hh:67
gem5::RiscvLinux64::TGT_SIGLOST
static const int TGT_SIGLOST
Definition: linux.hh:81
gem5::RiscvLinux32::TGT_SIGEMT
static const int TGT_SIGEMT
Definition: linux.hh:222
gem5::RiscvLinux64::TGT_SIGCHLD
static const int TGT_SIGCHLD
Definition: linux.hh:70
gem5::RiscvLinux32::TGT_MREMAP_FIXED
static constexpr unsigned TGT_MREMAP_FIXED
Definition: linux.hh:286
gem5::RiscvLinux32::rlimit::rlim_cur
uint32_t rlim_cur
soft limit
Definition: linux.hh:295
gem5::RiscvLinux64::tgt_sysinfo::loads
uint64_t loads[3]
Definition: linux.hh:184
gem5::RiscvLinux64::TGT_FASYNC
static constexpr int TGT_FASYNC
FASYNC.
Definition: linux.hh:99
gem5::RiscvLinux64::tgt_stat64::st_ctime_nsec
uint64_t st_ctime_nsec
Definition: linux.hh:156
gem5::RiscvLinux32::TGT_SIGINT
static const int TGT_SIGINT
Definition: linux.hh:216
gem5::RiscvLinux64::uid_t
uint32_t uid_t
Definition: linux.hh:126
gem5::RiscvLinux32::TGT_SIGSTOP
static const int TGT_SIGSTOP
Definition: linux.hh:232
gem5::RiscvLinux32::tgt_sysinfo::loads
uint32_t loads[3]
Definition: linux.hh:353
gem5::RiscvLinux32::time_t
int64_t time_t
Definition: linux.hh:290
gem5::RiscvLinux32::rlimit::rlim_max
uint32_t rlim_max
hard limit
Definition: linux.hh:296
gem5::RiscvLinux32::tgt_stat::st_mtime_nsec
int32_t st_mtime_nsec
Definition: linux.hh:327
gem5::RiscvLinux64::nlink_t
uint32_t nlink_t
Definition: linux.hh:125
gem5::RiscvLinux64::TGT_O_PATH
static constexpr int TGT_O_PATH
O_PATH.
Definition: linux.hh:110
gem5::RiscvLinux64::TGT_O_NOCTTY
static constexpr int TGT_O_NOCTTY
O_NOCTTY.
Definition: linux.hh:93
gem5::RiscvLinux64::dev_t
uint64_t dev_t
Definition: linux.hh:122
gem5::RiscvLinux32::tgt_statfs::f_blocks
uint32_t f_blocks
Definition: linux.hh:338
gem5::RiscvLinux64::TGT_O_NOINHERIT
static constexpr int TGT_O_NOINHERIT
O_NOINHERIT.
Definition: linux.hh:103
gem5::RiscvLinux64::TGT_O_EXCL
static constexpr int TGT_O_EXCL
O_EXCL.
Definition: linux.hh:92
gem5::RiscvLinux64::TGT_SIGPIPE
static const int TGT_SIGPIPE
Definition: linux.hh:63
gem5::RiscvLinux64::TGT_O_APPEND
static constexpr int TGT_O_APPEND
O_APPEND.
Definition: linux.hh:95
gem5::RiscvLinux64::tgt_sysinfo::uptime
int64_t uptime
Definition: linux.hh:183
gem5::RiscvLinux64::TGT_O_NONBLOCK
static constexpr int TGT_O_NONBLOCK
O_NONBLOCK.
Definition: linux.hh:96
gem5::RiscvLinux32::TGT_SIGTRAP
static const int TGT_SIGTRAP
Definition: linux.hh:219
gem5::RiscvLinux32::tgt_statfs::f_bsize
uint32_t f_bsize
Definition: linux.hh:337
gem5::RiscvLinux64::tgt_fsid_t::val
int32_t val[2]
Definition: linux.hh:162
gem5::RiscvLinux64::tgt_stat64::st_gid
gid_t st_gid
Definition: linux.hh:145
gem5::RiscvLinux64::TGT_O_SYNC
static constexpr int TGT_O_SYNC
O_SYNC.
Definition: linux.hh:97
gem5::RiscvLinux64::TGT_SIGILL
static const int TGT_SIGILL
Definition: linux.hh:53
gem5::RiscvLinux32::tgt_sysinfo::totalram
uint32_t totalram
Definition: linux.hh:354
gem5::RiscvLinux64::TGT_MAP_PRIVATE
static constexpr unsigned TGT_MAP_PRIVATE
Definition: linux.hh:115
gem5::RiscvLinux64::TGT_O_DSYNC
static constexpr int TGT_O_DSYNC
O_DSYNC.
Definition: linux.hh:101
gem5::RiscvLinux64::TGT_O_NOFOLLOW
static constexpr int TGT_O_NOFOLLOW
O_NOFOLLOW.
Definition: linux.hh:105
gem5::RiscvLinux32::TGT_SIGALRM
static const int TGT_SIGALRM
Definition: linux.hh:229
gem5::RiscvLinux32::tgt_fsid_t::val
int32_t val[2]
Definition: linux.hh:307
gem5::RiscvLinux32::tgt_stat::st_blksize
int32_t st_blksize
Definition: linux.hh:321
gem5::RiscvLinux64::tgt_stat64::st_blksize
blksize_t st_blksize
Definition: linux.hh:149
gem5::RiscvLinux64::tgt_sysinfo::mem_unit
uint32_t mem_unit
Definition: linux.hh:195
gem5::RiscvLinux64::TGT_SIGCONT
static const int TGT_SIGCONT
Definition: linux.hh:69
gem5::RiscvLinux32::tgt_stat::st_blocks
int64_t st_blocks
Definition: linux.hh:323
utility.hh
gem5::RiscvLinux64::TGT_O_WRONLY
static constexpr int TGT_O_WRONLY
O_WRONLY.
Definition: linux.hh:89
gem5::RiscvLinux64::tgt_stat64::st_size
off_t st_size
Definition: linux.hh:148
gem5::RiscvLinux32::tgt_statfs::f_type
uint32_t f_type
Definition: linux.hh:336
gem5::RiscvLinux64::tgt_statfs::f_blocks
uint64_t f_blocks
Definition: linux.hh:169
gem5::RiscvLinux32::tgt_stat::st_dev
uint64_t st_dev
Definition: linux.hh:312
gem5::RiscvLinux64::tgt_statfs::f_namelen
uint64_t f_namelen
Definition: linux.hh:175
gem5::RiscvLinux32::TGT_O_SYNC
static constexpr int TGT_O_SYNC
O_SYNC.
Definition: linux.hh:264
gem5::RiscvLinux32::TGT_SIGTTOU
static const int TGT_SIGTTOU
Definition: linux.hh:238
gem5::RiscvLinux32::TGT_SIGXCPU
static const int TGT_SIGXCPU
Definition: linux.hh:241
gem5::RiscvLinux32::tgt_sysinfo::uptime
int32_t uptime
Definition: linux.hh:352
gem5::RiscvLinux64::timespec
Definition: linux.hh:132
gem5::RiscvLinux64::tgt_stat64::st_atimeX
uint64_t st_atimeX
Definition: linux.hh:151
gem5::RiscvLinux32::TGT_SIGSYS
static const int TGT_SIGSYS
Definition: linux.hh:227
gem5::RiscvLinux64::tgt_statfs::f_bsize
uint64_t f_bsize
Definition: linux.hh:168
gem5::RiscvLinux32::TGT_SIGIO
static const int TGT_SIGIO
Definition: linux.hh:240
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::RiscvLinux32::TGT_O_WRONLY
static constexpr int TGT_O_WRONLY
O_WRONLY.
Definition: linux.hh:256
gem5::RiscvLinux32::tgt_stat::st_rdev
uint64_t st_rdev
Definition: linux.hh:318
gem5::RiscvLinux32::tgt_stat::__unused5
int32_t __unused5
Definition: linux.hh:331
gem5::RiscvLinux32::TGT_O_NOCTTY
static constexpr int TGT_O_NOCTTY
O_NOCTTY.
Definition: linux.hh:260
gem5::RiscvLinux32::TGT_SIGKILL
static const int TGT_SIGKILL
Definition: linux.hh:224
gem5::RiscvLinux64::TGT_MAP_POPULATE
static constexpr unsigned TGT_MAP_POPULATE
Definition: linux.hh:118
gem5::RiscvLinux64
Definition: linux.hh:47
gem5::RiscvLinux64::blkcnt_t
uint64_t blkcnt_t
Definition: linux.hh:130
gem5::RiscvLinux32::tgt_stat::st_uid
uint32_t st_uid
Definition: linux.hh:316
gem5::RiscvLinux32::TGT_O_NOATIME
static constexpr int TGT_O_NOATIME
O_NOATIME.
Definition: linux.hh:276
gem5::RiscvLinux64::tgt_statfs::f_fsid
tgt_fsid_t f_fsid
Definition: linux.hh:174
gem5::RiscvLinux64::TGT_SIGPWR
static const int TGT_SIGPWR
Definition: linux.hh:82
gem5::RiscvLinux64::tgt_sysinfo::sharedram
uint64_t sharedram
Definition: linux.hh:187
gem5::RiscvLinux32::TGT_SIGABRT
static const int TGT_SIGABRT
Definition: linux.hh:220
gem5::RiscvLinux32::TGT_MAP_FIXED
static constexpr unsigned TGT_MAP_FIXED
Definition: linux.hh:283
gem5::RiscvLinux32::TGT_SIGBUS
static const int TGT_SIGBUS
Definition: linux.hh:225
gem5::RiscvLinux32::TGT_SIGFPE
static const int TGT_SIGFPE
Definition: linux.hh:223
gem5::RiscvLinux32::tgt_statfs::f_flags
uint32_t f_flags
Definition: linux.hh:346
gem5::RiscvLinux32::TGT_O_TRUNC
static constexpr int TGT_O_TRUNC
O_TRUNC.
Definition: linux.hh:261
gem5::RiscvLinux64::tgt_statfs::f_files
uint64_t f_files
Definition: linux.hh:172
flag_tables.hh
gem5::RiscvLinux64::TGT_SIGEMT
static const int TGT_SIGEMT
Definition: linux.hh:57
gem5::RiscvLinux64::tgt_statfs::f_flags
uint64_t f_flags
Definition: linux.hh:177
gem5::RiscvLinux64::TGT_MREMAP_FIXED
static constexpr unsigned TGT_MREMAP_FIXED
Definition: linux.hh:119

Generated on Tue Sep 21 2021 12:24:36 for gem5 by doxygen 1.8.17