gem5  v22.0.0.2
linux.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021 Arm Limited
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  * Copyright (c) 2004-2009 The Regents of The University of Michigan
15  * All rights reserved.
16  *
17  * Redistribution and use in source and binary forms, with or without
18  * modification, are permitted provided that the following conditions are
19  * met: redistributions of source code must retain the above copyright
20  * notice, this list of conditions and the following disclaimer;
21  * redistributions in binary form must reproduce the above copyright
22  * notice, this list of conditions and the following disclaimer in the
23  * documentation and/or other materials provided with the distribution;
24  * neither the name of the copyright holders nor the names of its
25  * contributors may be used to endorse or promote products derived from
26  * this software without specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  */
40 
41 #ifndef __LINUX_HH__
42 #define __LINUX_HH__
43 
44 #include <string>
45 
46 #include "base/random.hh"
47 #include "base/types.hh"
48 #include "kern/operatingsystem.hh"
49 #include "sim/process.hh"
50 
51 namespace gem5
52 {
53 
54 class ThreadContext;
55 
61 class Linux : public OperatingSystem
62 {
63 
64  public:
65 
67  typedef uint64_t size_t;
69  typedef uint64_t off_t;
70  typedef int64_t time_t;
71  typedef int64_t clock_t;
72  typedef uint32_t uid_t;
73  typedef uint32_t gid_t;
75 
79  struct tgt_stat
80  {
81  uint32_t st_dev;
82  uint32_t st_ino;
83  uint32_t st_mode;
84  uint32_t st_nlink;
85  uint32_t st_uid;
86  uint32_t st_gid;
87  uint32_t st_rdev;
88  int32_t _pad1;
89  int64_t st_size;
90  uint64_t st_atimeX;
91  uint64_t st_mtimeX;
92  uint64_t st_ctimeX;
93  uint32_t st_blksize;
94  int32_t st_blocks;
95  uint32_t st_flags;
96  uint32_t st_gen;
97  };
98 
99  // same for stat64
100  struct tgt_stat64
101  {
102  uint64_t st_dev;
103  uint64_t st_ino;
104  uint64_t st_rdev;
105  int64_t st_size;
106  uint64_t st_blocks;
107 
108  uint32_t st_mode;
109  uint32_t st_uid;
110  uint32_t st_gid;
111  uint32_t st_blksize;
112  uint32_t st_nlink;
113  uint32_t __pad0;
114 
115  uint64_t st_atimeX;
116  uint64_t st_atime_nsec;
117  uint64_t st_mtimeX;
118  uint64_t st_mtime_nsec;
119  uint64_t st_ctimeX;
120  uint64_t st_ctime_nsec;
121  int64_t ___unused[3];
122  };
123 
125  static const int _SYS_NMLN = 65;
126 
128  struct utsname
129  {
135  };
136 
138  struct rlimit
139  {
140  uint64_t rlim_cur;
141  uint64_t rlim_max;
142  };
143 
145  struct timeval
146  {
147  int64_t tv_sec;
148  int64_t tv_usec;
149  };
150 
152  struct timespec
153  {
155  int64_t tv_nsec;
156  };
157 
159  static const int M5_SC_CLK_TCK = 100;
160 
162  struct tms
163  {
164  int64_t tms_utime;
165  int64_t tms_stime;
166  int64_t tms_cutime;
167  int64_t tms_cstime;
168  };
169 
170  // For writev/readv
171  struct tgt_iovec
172  {
173  uint64_t iov_base; // void *
174  uint64_t iov_len;
175  };
176 
177  // For select().
178  // linux-3.14-src/include/uapi/linux/posix_types.h
179  struct fd_set
180  {
181 #ifndef LINUX__FD_SETSIZE
182 #define LINUX__FD_SETSIZE 1024
183  unsigned long fds_bits[LINUX__FD_SETSIZE / (8 * sizeof(long))];
184 #endif
185  };
186 
188  static const unsigned TGT_TCGETS = 0x5401;
190  static const unsigned TGT_TCGETA = 0x5405;
191  static const unsigned TGT_TCSETAW = 0x5407;
192  static const unsigned TGT_FIONREAD = 0x541B;
194 
199  static bool
200  isTtyReq(unsigned req)
201  {
202  switch (req) {
203  case TGT_FIONREAD:
204  case TGT_TCSETAW:
205  case TGT_TCGETS:
206  case TGT_TCGETA:
207  return true;
208  default:
209  return false;
210  }
211  }
212 
213 
215  static const unsigned TGT_RLIMIT_CPU = 0;
216  static const unsigned TGT_RLIMIT_FSIZE = 1;
217  static const unsigned TGT_RLIMIT_DATA = 2;
218  static const unsigned TGT_RLIMIT_STACK = 3;
219  static const unsigned TGT_RLIMIT_CORE = 4;
220  static const unsigned TGT_RLIMIT_RSS = 5;
221  static const unsigned TGT_RLIMIT_NPROC = 6;
222  static const unsigned TGT_RLIMIT_NOFILE = 7;
223  static const unsigned TGT_RLIMIT_MEMLOCK = 8;
224  static const unsigned TGT_RLIMIT_AS = 9;
225  static const unsigned TGT_RLIMIT_LOCKS = 10;
226  static const unsigned TGT_RLIMIT_SIGPENDING = 11;
227  static const unsigned TGT_RLIMIT_MSGQUEUE = 12;
228  static const unsigned TGT_RLIMIT_NICE = 13;
229  static const unsigned TGT_RLIMIT_RTPRIO = 14;
230  static const unsigned TGT_RLIMIT_RTTIME = 15;
231  static const unsigned TGT_RLIM_NLIMITS = 16;
232 
234  static const int TGT_RUSAGE_SELF = 0;
235  static const int TGT_RUSAGE_CHILDREN = -1;
236  static const int TGT_RUSAGE_BOTH = -2;
237 
238  struct rusage
239  {
240  struct timeval ru_utime;
241  struct timeval ru_stime;
242  int64_t ru_maxrss;
243  int64_t ru_ixrss;
244  int64_t ru_idrss;
245  int64_t ru_isrss;
246  int64_t ru_minflt;
247  int64_t ru_majflt;
248  int64_t ru_nswap;
249  int64_t ru_inblock;
250  int64_t ru_oublock;
251  int64_t ru_msgsnd;
252  int64_t ru_msgrcv;
253  int64_t ru_nsignals;
254  int64_t ru_nvcsw;
255  int64_t ru_nivcsw;
256  };
257 
258  // For /dev/urandom accesses
259  static Random random;
260 
261  static int openSpecialFile(std::string path, Process *process,
262  ThreadContext *tc);
263  static std::string procMeminfo(Process *process, ThreadContext *tc);
264  static std::string etcPasswd(Process *process, ThreadContext *tc);
265  static std::string procSelfMaps(Process *process, ThreadContext *tc);
266  static std::string cpuOnline(Process *process, ThreadContext *tc);
267  static std::string devRandom(Process *process, ThreadContext *tc);
268 
269  // For futex system call
270  static const unsigned TGT_FUTEX_WAIT = 0;
271  static const unsigned TGT_FUTEX_WAKE = 1;
272  static const unsigned TGT_FUTEX_REQUEUE = 3;
273  static const unsigned TGT_FUTEX_CMP_REQUEUE = 4;
274  static const unsigned TGT_FUTEX_WAKE_OP = 5;
275  static const unsigned TGT_FUTEX_WAIT_BITSET = 9;
276  static const unsigned TGT_FUTEX_WAKE_BITSET = 10;
277  static const unsigned TGT_EAGAIN = 11;
278  static const unsigned TGT_EWOULDBLOCK = TGT_EAGAIN;
279  static const unsigned TGT_FUTEX_PRIVATE_FLAG = 128;
280  static const unsigned TGT_FUTEX_CLOCK_REALTIME_FLAG = 256;
281  // op field of futex_wake_op operation
282  static const unsigned TGT_FUTEX_OP_SET = 0; // uaddr2 = oparg;
283  static const unsigned TGT_FUTEX_OP_ADD = 1; // uaddr2 += oparg;
284  static const unsigned TGT_FUTEX_OP_OR = 2; // uaddr2 |= oparg;
285  static const unsigned TGT_FUTEX_OP_ANDN = 3; // uaddr2 &= ~oparg;
286  static const unsigned TGT_FUTEX_OP_XOR = 4; // uaddr2 ^= oparg;
287  // Use (1 << oparg) as operand
288  static const unsigned TGT_FUTEX_OP_ARG_SHIFT = 8;
289  // cmp field of futex_wake_op operation
290  static const unsigned TGT_FUTEX_OP_CMP_EQ = 0;
291  static const unsigned TGT_FUTEX_OP_CMP_NE = 1;
292  static const unsigned TGT_FUTEX_OP_CMP_LT = 2;
293  static const unsigned TGT_FUTEX_OP_CMP_LE = 3;
294  static const unsigned TGT_FUTEX_OP_CMP_GT = 4;
295  static const unsigned TGT_FUTEX_OP_CMP_GE = 5;
296 
297  // for *at syscalls
298  static const int TGT_AT_FDCWD = -100;
299  static const int TGT_AT_REMOVEDIR = 0x200;
300  static const int TGT_AT_SYMLINK_FOLLOW = 0x400;
301  static const int TGT_AT_NO_AUTOMOUNT = 0x800;
302  static const int TGT_AT_EMPTY_PATH = 0x1000;
303 
304  // for MREMAP
305  static const unsigned TGT_MREMAP_MAYMOVE = 0x1;
306  static const unsigned TGT_MREMAP_FIXED = 0x2;
307 
308  static const unsigned TGT_CLONE_VM = 0x00000100;
309  static const unsigned TGT_CLONE_FS = 0x00000200;
310  static const unsigned TGT_CLONE_FILES = 0x00000400;
311  static const unsigned TGT_CLONE_SIGHAND = 0x00000800;
312  static const unsigned TGT_CLONE_PTRACE = 0x00002000;
313  static const unsigned TGT_CLONE_VFORK = 0x00004000;
314  static const unsigned TGT_CLONE_PARENT = 0x00008000;
315  static const unsigned TGT_CLONE_THREAD = 0x00010000;
316  static const unsigned TGT_CLONE_NEWNS = 0x00020000;
317  static const unsigned TGT_CLONE_SYSVSEM = 0x00040000;
318  static const unsigned TGT_CLONE_SETTLS = 0x00080000;
319  static const unsigned TGT_CLONE_PARENT_SETTID = 0x00100000;
320  static const unsigned TGT_CLONE_CHILD_CLEARTID = 0x00200000;
321  static const unsigned TGT_CLONE_DETACHED = 0x00400000;
322  static const unsigned TGT_CLONE_UNTRACED = 0x00800000;
323  static const unsigned TGT_CLONE_CHILD_SETTID = 0x01000000;
324  static const unsigned TGT_CLONE_NEWUTS = 0x04000000;
325  static const unsigned TGT_CLONE_NEWIPC = 0x08000000;
326  static const unsigned TGT_CLONE_NEWUSER = 0x10000000;
327  static const unsigned TGT_CLONE_NEWPID = 0x20000000;
328  static const unsigned TGT_CLONE_NEWNET = 0x40000000;
329  static const unsigned TGT_CLONE_IO = 0x80000000;
330 
331  // linux-3.13-src/include/uapi/linux/wait.h
332  static const unsigned TGT_WNOHANG = 0x00000001;
333  static const unsigned TGT_WUNTRACED = 0x00000002;
334  static const unsigned TGT_WSTOPPED = TGT_WUNTRACED;
335  static const unsigned TGT_WEXITED = 0x00000004;
336  static const unsigned TGT_WCONTINUED = 0x00000008;
337  static const unsigned TGT_WNOWAIT = 0x01000000;
338 }; // class Linux
339 
340 } // namespace gem5
341 
342 #endif // __LINUX_HH__
gem5::Linux::TGT_TCGETA
static const unsigned TGT_TCGETA
Definition: linux.hh:190
gem5::Linux::tgt_stat64::st_rdev
uint64_t st_rdev
Definition: linux.hh:104
gem5::Linux::rusage::ru_inblock
int64_t ru_inblock
block input operations
Definition: linux.hh:249
gem5::Linux::rusage::ru_nvcsw
int64_t ru_nvcsw
voluntary context switches
Definition: linux.hh:254
gem5::Linux::tgt_stat::st_flags
uint32_t st_flags
flags
Definition: linux.hh:95
gem5::Linux::TGT_RUSAGE_SELF
static const int TGT_RUSAGE_SELF
For getrusage().
Definition: linux.hh:234
gem5::Linux::tms::tms_utime
int64_t tms_utime
user time
Definition: linux.hh:164
gem5::Linux::TGT_WUNTRACED
static const unsigned TGT_WUNTRACED
Definition: linux.hh:333
gem5::Linux::TGT_WNOWAIT
static const unsigned TGT_WNOWAIT
Definition: linux.hh:337
gem5::Linux::TGT_TCSETAW
static const unsigned TGT_TCSETAW
Definition: linux.hh:191
gem5::Linux::TGT_FUTEX_OP_CMP_EQ
static const unsigned TGT_FUTEX_OP_CMP_EQ
Definition: linux.hh:290
gem5::Linux::tgt_stat64::st_mtimeX
uint64_t st_mtimeX
Definition: linux.hh:117
gem5::Linux::tgt_stat::st_gen
uint32_t st_gen
unknown
Definition: linux.hh:96
gem5::Linux::uid_t
uint32_t uid_t
Definition: linux.hh:72
gem5::Linux::_SYS_NMLN
static const int _SYS_NMLN
Length of strings in struct utsname (plus 1 for null char).
Definition: linux.hh:125
gem5::Linux::tgt_stat64::st_dev
uint64_t st_dev
Definition: linux.hh:102
gem5::Linux::utsname::sysname
char sysname[_SYS_NMLN]
System name.
Definition: linux.hh:130
gem5::Linux::openSpecialFile
static int openSpecialFile(std::string path, Process *process, ThreadContext *tc)
Definition: linux.cc:51
gem5::Linux::TGT_RLIMIT_RSS
static const unsigned TGT_RLIMIT_RSS
Definition: linux.hh:220
gem5::Linux::tgt_stat::_pad1
int32_t _pad1
for alignment
Definition: linux.hh:88
gem5::Linux::isTtyReq
static bool isTtyReq(unsigned req)
Return true for the ioctl codes for which we return ENOTTY without printing a warning,...
Definition: linux.hh:200
gem5::Linux::gid_t
uint32_t gid_t
Definition: linux.hh:73
gem5::Linux::rusage::ru_minflt
int64_t ru_minflt
page reclaims - total vmfaults
Definition: linux.hh:246
gem5::Linux::TGT_AT_FDCWD
static const int TGT_AT_FDCWD
Definition: linux.hh:298
gem5::Linux::timespec
For clock_gettime().
Definition: linux.hh:152
gem5::Linux::TGT_CLONE_FS
static const unsigned TGT_CLONE_FS
Definition: linux.hh:309
gem5::Linux::rusage::ru_msgsnd
int64_t ru_msgsnd
messages sent
Definition: linux.hh:251
gem5::Linux::utsname::release
char release[_SYS_NMLN]
OS release.
Definition: linux.hh:132
gem5::Linux::tgt_iovec
Definition: linux.hh:171
gem5::Linux::TGT_RLIMIT_STACK
static const unsigned TGT_RLIMIT_STACK
Definition: linux.hh:218
gem5::Linux::procSelfMaps
static std::string procSelfMaps(Process *process, ThreadContext *tc)
Definition: linux.cc:110
gem5::Linux::TGT_FUTEX_WAKE_OP
static const unsigned TGT_FUTEX_WAKE_OP
Definition: linux.hh:274
gem5::Linux::tgt_stat::st_mode
uint32_t st_mode
mode
Definition: linux.hh:83
gem5::Linux::TGT_FUTEX_WAKE
static const unsigned TGT_FUTEX_WAKE
Definition: linux.hh:271
random.hh
gem5::Linux::TGT_CLONE_UNTRACED
static const unsigned TGT_CLONE_UNTRACED
Definition: linux.hh:322
gem5::Linux::rusage::ru_majflt
int64_t ru_majflt
page faults
Definition: linux.hh:247
gem5::Linux::TGT_FUTEX_CLOCK_REALTIME_FLAG
static const unsigned TGT_FUTEX_CLOCK_REALTIME_FLAG
Definition: linux.hh:280
gem5::Linux::rusage::ru_nivcsw
int64_t ru_nivcsw
involuntary "
Definition: linux.hh:255
gem5::Linux::tgt_stat64::st_size
int64_t st_size
Definition: linux.hh:105
gem5::Linux::tms
For times().
Definition: linux.hh:162
gem5::Linux::TGT_RLIMIT_RTTIME
static const unsigned TGT_RLIMIT_RTTIME
Definition: linux.hh:230
gem5::Linux::TGT_AT_SYMLINK_FOLLOW
static const int TGT_AT_SYMLINK_FOLLOW
Definition: linux.hh:300
gem5::Linux::rusage::ru_utime
struct timeval ru_utime
user time used
Definition: linux.hh:240
gem5::Linux::TGT_FIONREAD
static const unsigned TGT_FIONREAD
Definition: linux.hh:192
gem5::Linux::TGT_CLONE_SIGHAND
static const unsigned TGT_CLONE_SIGHAND
Definition: linux.hh:311
gem5::Linux::tgt_stat::st_uid
uint32_t st_uid
owner's user ID
Definition: linux.hh:85
gem5::Linux::tgt_stat64::___unused
int64_t ___unused[3]
Definition: linux.hh:121
gem5::Linux::TGT_FUTEX_CMP_REQUEUE
static const unsigned TGT_FUTEX_CMP_REQUEUE
Definition: linux.hh:273
gem5::Linux::tgt_stat64::st_blocks
uint64_t st_blocks
Definition: linux.hh:106
gem5::Linux::rusage::ru_msgrcv
int64_t ru_msgrcv
messages received
Definition: linux.hh:252
gem5::Linux::TGT_CLONE_NEWNS
static const unsigned TGT_CLONE_NEWNS
Definition: linux.hh:316
gem5::Linux::TGT_RLIMIT_MSGQUEUE
static const unsigned TGT_RLIMIT_MSGQUEUE
Definition: linux.hh:227
gem5::Linux::TGT_FUTEX_PRIVATE_FLAG
static const unsigned TGT_FUTEX_PRIVATE_FLAG
Definition: linux.hh:279
gem5::Linux::TGT_MREMAP_FIXED
static const unsigned TGT_MREMAP_FIXED
Definition: linux.hh:306
gem5::Linux::tgt_stat64::st_atime_nsec
uint64_t st_atime_nsec
Definition: linux.hh:116
gem5::Linux::rusage::ru_ixrss
int64_t ru_ixrss
integral shared memory size
Definition: linux.hh:243
gem5::Linux::tgt_stat::st_nlink
uint32_t st_nlink
link count
Definition: linux.hh:84
gem5::Linux::rlimit::rlim_cur
uint64_t rlim_cur
soft limit
Definition: linux.hh:140
gem5::Linux::tgt_stat64::st_ctime_nsec
uint64_t st_ctime_nsec
Definition: linux.hh:120
gem5::Linux::TGT_FUTEX_WAKE_BITSET
static const unsigned TGT_FUTEX_WAKE_BITSET
Definition: linux.hh:276
gem5::Linux::tgt_stat::st_ino
uint32_t st_ino
inode
Definition: linux.hh:82
gem5::Linux::tgt_stat::st_dev
uint32_t st_dev
device
Definition: linux.hh:81
gem5::Linux::TGT_CLONE_VM
static const unsigned TGT_CLONE_VM
Definition: linux.hh:308
gem5::Linux::timespec::tv_nsec
int64_t tv_nsec
nanoseconds
Definition: linux.hh:155
gem5::Linux::timespec::tv_sec
time_t tv_sec
seconds
Definition: linux.hh:154
gem5::Linux::TGT_RLIMIT_NOFILE
static const unsigned TGT_RLIMIT_NOFILE
Definition: linux.hh:222
gem5::Linux::TGT_AT_NO_AUTOMOUNT
static const int TGT_AT_NO_AUTOMOUNT
Definition: linux.hh:301
gem5::Linux::TGT_WEXITED
static const unsigned TGT_WEXITED
Definition: linux.hh:335
gem5::Linux::TGT_RLIMIT_RTPRIO
static const unsigned TGT_RLIMIT_RTPRIO
Definition: linux.hh:229
gem5::Linux::TGT_CLONE_CHILD_SETTID
static const unsigned TGT_CLONE_CHILD_SETTID
Definition: linux.hh:323
gem5::Linux::TGT_FUTEX_OP_ANDN
static const unsigned TGT_FUTEX_OP_ANDN
Definition: linux.hh:285
gem5::Linux::rusage
Definition: linux.hh:238
gem5::Linux::TGT_RLIMIT_SIGPENDING
static const unsigned TGT_RLIMIT_SIGPENDING
Definition: linux.hh:226
gem5::Linux::tms::tms_cutime
int64_t tms_cutime
user time of children
Definition: linux.hh:166
gem5::Linux::TGT_WSTOPPED
static const unsigned TGT_WSTOPPED
Definition: linux.hh:334
gem5::Linux::TGT_RLIMIT_FSIZE
static const unsigned TGT_RLIMIT_FSIZE
Definition: linux.hh:216
gem5::Linux::TGT_RLIMIT_CORE
static const unsigned TGT_RLIMIT_CORE
Definition: linux.hh:219
gem5::Linux::random
static Random random
Definition: linux.hh:259
gem5::Linux::TGT_FUTEX_OP_SET
static const unsigned TGT_FUTEX_OP_SET
Definition: linux.hh:282
gem5::Linux::TGT_FUTEX_WAIT
static const unsigned TGT_FUTEX_WAIT
Definition: linux.hh:270
gem5::Linux::TGT_FUTEX_OP_ADD
static const unsigned TGT_FUTEX_OP_ADD
Definition: linux.hh:283
gem5::ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:94
gem5::Linux::utsname::version
char version[_SYS_NMLN]
OS version.
Definition: linux.hh:133
gem5::Linux::utsname
Interface struct for uname().
Definition: linux.hh:128
gem5::Linux::tgt_stat64
Definition: linux.hh:100
gem5::Linux::tgt_stat64::st_gid
uint32_t st_gid
Definition: linux.hh:110
gem5::Linux::time_t
int64_t time_t
Definition: linux.hh:70
gem5::OperatingSystem
This class encapsulates the types, structures, constants, functions, and syscall-number mappings spec...
Definition: operatingsystem.hh:47
gem5::Linux::TGT_CLONE_NEWNET
static const unsigned TGT_CLONE_NEWNET
Definition: linux.hh:328
gem5::Linux::TGT_FUTEX_WAIT_BITSET
static const unsigned TGT_FUTEX_WAIT_BITSET
Definition: linux.hh:275
gem5::Linux::rusage::ru_maxrss
int64_t ru_maxrss
max rss
Definition: linux.hh:242
gem5::Linux::TGT_FUTEX_OP_CMP_GT
static const unsigned TGT_FUTEX_OP_CMP_GT
Definition: linux.hh:294
gem5::Linux::tms::tms_stime
int64_t tms_stime
system time
Definition: linux.hh:165
gem5::Linux::tgt_stat::st_blksize
uint32_t st_blksize
optimal I/O block size
Definition: linux.hh:93
gem5::Linux::TGT_CLONE_SYSVSEM
static const unsigned TGT_CLONE_SYSVSEM
Definition: linux.hh:317
gem5::Linux::tgt_stat::st_size
int64_t st_size
file size in bytes
Definition: linux.hh:89
gem5::Linux::fd_set::fds_bits
unsigned long fds_bits[LINUX__FD_SETSIZE/(8 *sizeof(long))]
Definition: linux.hh:183
gem5::Linux::TGT_EAGAIN
static const unsigned TGT_EAGAIN
Definition: linux.hh:277
gem5::Linux
This class encapsulates the types, structures, constants, functions, and syscall-number mappings spec...
Definition: linux.hh:61
gem5::Linux::tgt_stat::st_atimeX
uint64_t st_atimeX
time of last access
Definition: linux.hh:90
gem5::Linux::etcPasswd
static std::string etcPasswd(Process *process, ThreadContext *tc)
Definition: linux.cc:103
process.hh
gem5::Linux::rlimit::rlim_max
uint64_t rlim_max
hard limit
Definition: linux.hh:141
gem5::Linux::TGT_TCGETS
static const unsigned TGT_TCGETS
ioctl() command codes.
Definition: linux.hh:189
gem5::Linux::tgt_stat64::__pad0
uint32_t __pad0
Definition: linux.hh:113
gem5::Linux::TGT_RUSAGE_BOTH
static const int TGT_RUSAGE_BOTH
Definition: linux.hh:236
gem5::Linux::TGT_FUTEX_OP_XOR
static const unsigned TGT_FUTEX_OP_XOR
Definition: linux.hh:286
gem5::Linux::TGT_RLIMIT_LOCKS
static const unsigned TGT_RLIMIT_LOCKS
Definition: linux.hh:225
gem5::Linux::tgt_iovec::iov_len
uint64_t iov_len
Definition: linux.hh:174
operatingsystem.hh
gem5::Linux::TGT_RLIMIT_AS
static const unsigned TGT_RLIMIT_AS
Definition: linux.hh:224
gem5::Linux::cpuOnline
static std::string cpuOnline(Process *process, ThreadContext *tc)
Definition: linux.cc:116
gem5::Linux::tgt_stat::st_ctimeX
uint64_t st_ctimeX
time of last status change
Definition: linux.hh:92
gem5::Linux::tgt_stat::st_mtimeX
uint64_t st_mtimeX
time of last modification
Definition: linux.hh:91
gem5::Linux::TGT_CLONE_SETTLS
static const unsigned TGT_CLONE_SETTLS
Definition: linux.hh:318
gem5::Linux::tgt_stat
Stat buffer.
Definition: linux.hh:79
gem5::Linux::utsname::nodename
char nodename[_SYS_NMLN]
Node name.
Definition: linux.hh:131
gem5::Linux::off_t
uint64_t off_t
Definition: linux.hh:69
gem5::Linux::TGT_CLONE_DETACHED
static const unsigned TGT_CLONE_DETACHED
Definition: linux.hh:321
gem5::Linux::utsname::machine
char machine[_SYS_NMLN]
Machine type.
Definition: linux.hh:134
gem5::Linux::TGT_CLONE_CHILD_CLEARTID
static const unsigned TGT_CLONE_CHILD_CLEARTID
Definition: linux.hh:320
gem5::Linux::TGT_CLONE_PARENT
static const unsigned TGT_CLONE_PARENT
Definition: linux.hh:314
gem5::Linux::tgt_iovec::iov_base
uint64_t iov_base
Definition: linux.hh:173
gem5::Linux::TGT_RLIMIT_NICE
static const unsigned TGT_RLIMIT_NICE
Definition: linux.hh:228
gem5::Linux::procMeminfo
static std::string procMeminfo(Process *process, ThreadContext *tc)
Definition: linux.cc:95
gem5::Linux::TGT_FUTEX_REQUEUE
static const unsigned TGT_FUTEX_REQUEUE
Definition: linux.hh:272
gem5::Linux::TGT_FUTEX_OP_CMP_NE
static const unsigned TGT_FUTEX_OP_CMP_NE
Definition: linux.hh:291
gem5::Linux::TGT_CLONE_NEWIPC
static const unsigned TGT_CLONE_NEWIPC
Definition: linux.hh:325
gem5::Linux::TGT_RLIMIT_CPU
static const unsigned TGT_RLIMIT_CPU
Resource constants for getrlimit().
Definition: linux.hh:215
gem5::Linux::TGT_FUTEX_OP_ARG_SHIFT
static const unsigned TGT_FUTEX_OP_ARG_SHIFT
Definition: linux.hh:288
gem5::Linux::rusage::ru_oublock
int64_t ru_oublock
block output operations
Definition: linux.hh:250
gem5::Random
Definition: random.hh:61
gem5::Linux::TGT_FUTEX_OP_CMP_GE
static const unsigned TGT_FUTEX_OP_CMP_GE
Definition: linux.hh:295
gem5::Process
Definition: process.hh:68
gem5::Linux::tms::tms_cstime
int64_t tms_cstime
system time of children
Definition: linux.hh:167
gem5::Linux::M5_SC_CLK_TCK
static const int M5_SC_CLK_TCK
Clock ticks per second, for times().
Definition: linux.hh:159
gem5::Linux::TGT_FUTEX_OP_CMP_LT
static const unsigned TGT_FUTEX_OP_CMP_LT
Definition: linux.hh:292
gem5::Linux::tgt_stat::st_gid
uint32_t st_gid
owner's group ID
Definition: linux.hh:86
gem5::Linux::TGT_CLONE_NEWUSER
static const unsigned TGT_CLONE_NEWUSER
Definition: linux.hh:326
gem5::Linux::tgt_stat64::st_mtime_nsec
uint64_t st_mtime_nsec
Definition: linux.hh:118
gem5::Linux::tgt_stat64::st_uid
uint32_t st_uid
Definition: linux.hh:109
gem5::Linux::tgt_stat64::st_mode
uint32_t st_mode
Definition: linux.hh:108
gem5::Linux::clock_t
int64_t clock_t
Definition: linux.hh:71
gem5::Linux::rusage::ru_nsignals
int64_t ru_nsignals
signals received
Definition: linux.hh:253
gem5::Linux::tgt_stat::st_blocks
int32_t st_blocks
number of blocks allocated
Definition: linux.hh:94
gem5::Linux::TGT_CLONE_THREAD
static const unsigned TGT_CLONE_THREAD
Definition: linux.hh:315
types.hh
gem5::Linux::tgt_stat64::st_nlink
uint32_t st_nlink
Definition: linux.hh:112
gem5::Linux::TGT_RLIM_NLIMITS
static const unsigned TGT_RLIM_NLIMITS
Definition: linux.hh:231
gem5::Linux::TGT_RLIMIT_MEMLOCK
static const unsigned TGT_RLIMIT_MEMLOCK
Definition: linux.hh:223
gem5::Linux::devRandom
static std::string devRandom(Process *process, ThreadContext *tc)
Definition: linux.cc:122
gem5::Linux::TGT_CLONE_PTRACE
static const unsigned TGT_CLONE_PTRACE
Definition: linux.hh:312
gem5::Linux::TGT_CLONE_VFORK
static const unsigned TGT_CLONE_VFORK
Definition: linux.hh:313
gem5::Linux::TGT_MREMAP_MAYMOVE
static const unsigned TGT_MREMAP_MAYMOVE
Definition: linux.hh:305
gem5::Linux::TGT_CLONE_NEWPID
static const unsigned TGT_CLONE_NEWPID
Definition: linux.hh:327
gem5::Linux::tgt_stat64::st_ino
uint64_t st_ino
Definition: linux.hh:103
gem5::Linux::TGT_EWOULDBLOCK
static const unsigned TGT_EWOULDBLOCK
Definition: linux.hh:278
gem5::Linux::TGT_AT_EMPTY_PATH
static const int TGT_AT_EMPTY_PATH
Definition: linux.hh:302
gem5::Linux::TGT_CLONE_IO
static const unsigned TGT_CLONE_IO
Definition: linux.hh:329
gem5::Linux::rlimit
Limit struct for getrlimit/setrlimit.
Definition: linux.hh:138
LINUX__FD_SETSIZE
#define LINUX__FD_SETSIZE
Definition: linux.hh:182
gem5::Linux::tgt_stat::st_rdev
uint32_t st_rdev
device number
Definition: linux.hh:87
gem5::Linux::tgt_stat64::st_ctimeX
uint64_t st_ctimeX
Definition: linux.hh:119
gem5::Linux::TGT_AT_REMOVEDIR
static const int TGT_AT_REMOVEDIR
Definition: linux.hh:299
gem5::Linux::rusage::ru_nswap
int64_t ru_nswap
swaps
Definition: linux.hh:248
gem5::Linux::TGT_CLONE_NEWUTS
static const unsigned TGT_CLONE_NEWUTS
Definition: linux.hh:324
gem5::Linux::TGT_WCONTINUED
static const unsigned TGT_WCONTINUED
Definition: linux.hh:336
gem5::Linux::size_t
uint64_t size_t
Basic Linux types.
Definition: linux.hh:68
gem5::Linux::rusage::ru_idrss
int64_t ru_idrss
integral unshared data "
Definition: linux.hh:244
gem5::Linux::TGT_RUSAGE_CHILDREN
static const int TGT_RUSAGE_CHILDREN
Definition: linux.hh:235
gem5::Linux::TGT_FUTEX_OP_CMP_LE
static const unsigned TGT_FUTEX_OP_CMP_LE
Definition: linux.hh:293
gem5::Linux::TGT_CLONE_PARENT_SETTID
static const unsigned TGT_CLONE_PARENT_SETTID
Definition: linux.hh:319
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
gem5::Linux::tgt_stat64::st_blksize
uint32_t st_blksize
Definition: linux.hh:111
gem5::Linux::rusage::ru_isrss
int64_t ru_isrss
integral unshared stack "
Definition: linux.hh:245
gem5::Linux::timeval::tv_sec
int64_t tv_sec
seconds
Definition: linux.hh:147
gem5::Linux::timeval::tv_usec
int64_t tv_usec
microseconds
Definition: linux.hh:148
gem5::Linux::timeval
For gettimeofday().
Definition: linux.hh:145
gem5::Linux::TGT_WNOHANG
static const unsigned TGT_WNOHANG
Definition: linux.hh:332
gem5::Linux::rusage::ru_stime
struct timeval ru_stime
system time used
Definition: linux.hh:241
gem5::Linux::TGT_RLIMIT_DATA
static const unsigned TGT_RLIMIT_DATA
Definition: linux.hh:217
gem5::Linux::TGT_FUTEX_OP_OR
static const unsigned TGT_FUTEX_OP_OR
Definition: linux.hh:284
gem5::Linux::tgt_stat64::st_atimeX
uint64_t st_atimeX
Definition: linux.hh:115
gem5::Linux::TGT_CLONE_FILES
static const unsigned TGT_CLONE_FILES
Definition: linux.hh:310
gem5::Linux::fd_set
Definition: linux.hh:179
gem5::Linux::TGT_RLIMIT_NPROC
static const unsigned TGT_RLIMIT_NPROC
Definition: linux.hh:221

Generated on Thu Jul 28 2022 13:32:24 for gem5 by doxygen 1.8.17