gem5 v24.0.0.0
Loading...
Searching...
No Matches
linux.hh
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010, 2011-2012, 2015 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) 2003-2005 The Regents of The University of Michigan
15 * Copyright (c) 2007-2008 The Florida State University
16 * All rights reserved.
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions are
20 * met: redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer;
22 * redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the
24 * documentation and/or other materials provided with the distribution;
25 * neither the name of the copyright holders nor the names of its
26 * contributors may be used to endorse or promote products derived from
27 * this software without specific prior written permission.
28 *
29 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 */
41
42#ifndef __ARCH_ARM_LINUX_LINUX_HH__
43#define __ARCH_ARM_LINUX_LINUX_HH__
44
45#include <map>
46
47#include "arch/arm/utility.hh"
48#include "base/compiler.hh"
50#include "kern/linux/linux.hh"
51
52namespace gem5
53{
54
55class ArmLinux : public Linux
56{
57 public:
58 static const ByteOrder byteOrder = ByteOrder::little;
59
60 static void
61 archClone(uint64_t flags,
62 Process *pp, Process *cp,
64 uint64_t stack, uint64_t tls)
65 {
66 ctc->getIsaPtr()->copyRegsFrom(ptc);
67
68 if (flags & TGT_CLONE_SETTLS) {
69 /* TPIDR_EL0 is architecturally mapped to TPIDRURW, so
70 * this works for both aarch32 and aarch64. */
72 }
73 }
74};
75
76class ArmLinux32 : public ArmLinux, public OpenFlagTable<ArmLinux32>
77{
78 public:
79
80 static const int TGT_SIGHUP = 0x000001;
81 static const int TGT_SIGINT = 0x000002;
82 static const int TGT_SIGQUIT = 0x000003;
83 static const int TGT_SIGILL = 0x000004;
84 static const int TGT_SIGTRAP = 0x000005;
85 static const int TGT_SIGABRT = 0x000006;
86 static const int TGT_SIGIOT = 0x000006;
87 static const int TGT_SIGBUS = 0x000007;
88 static const int TGT_SIGFPE = 0x000008;
89 static const int TGT_SIGKILL = 0x000009;
90 static const int TGT_SIGUSR1 = 0x00000a;
91 static const int TGT_SIGSEGV = 0x00000b;
92 static const int TGT_SIGUSR2 = 0x00000c;
93 static const int TGT_SIGPIPE = 0x00000d;
94 static const int TGT_SIGALRM = 0x00000e;
95 static const int TGT_SIGTERM = 0x00000f;
96 static const int TGT_SIGSTKFLT = 0x000010;
97 static const int TGT_SIGCHLD = 0x000011;
98 static const int TGT_SIGCONT = 0x000012;
99 static const int TGT_SIGSTOP = 0x000013;
100 static const int TGT_SIGTSTP = 0x000014;
101 static const int TGT_SIGTTIN = 0x000015;
102 static const int TGT_SIGTTOU = 0x000016;
103 static const int TGT_SIGURG = 0x000017;
104 static const int TGT_SIGXCPU = 0x000018;
105 static const int TGT_SIGXFSZ = 0x000019;
106 static const int TGT_SIGVTALRM = 0x00001a;
107 static const int TGT_SIGPROF = 0x00001b;
108 static const int TGT_SIGWINCH = 0x00001c;
109 static const int TGT_SIGIO = 0x00001d;
110 static const int TGT_SIGPOLL = 0x00001d;
111 static const int TGT_SIGPWR = 0x00001e;
112 static const int TGT_SIGSYS = 0x00001f;
113 static const int TGT_SIGUNUSED = 0x00001f;
114
116
117 typedef uint32_t size_t;
118 typedef uint32_t off_t;
119 typedef int32_t time_t;
120 typedef int32_t clock_t;
122
124
125 static constexpr int TGT_O_RDONLY = 000000000;
126 static constexpr int TGT_O_WRONLY = 000000001;
127 static constexpr int TGT_O_RDWR = 000000002;
128 static constexpr int TGT_O_CREAT = 000000100;
129 static constexpr int TGT_O_EXCL = 000000200;
130 static constexpr int TGT_O_NOCTTY = 000000400;
131 static constexpr int TGT_O_TRUNC = 000001000;
132 static constexpr int TGT_O_APPEND = 000002000;
133 static constexpr int TGT_O_NONBLOCK = 000004000;
134 static constexpr int TGT_O_DSYNC = 000010000;
135 static constexpr int TGT_FASYNC = 000020000;
136 static constexpr int TGT_O_DIRECT = 000200000;
137 static constexpr int TGT_O_LARGEFILE = 000400000;
138 static constexpr int TGT_O_DIRECTORY = 000040000;
139 static constexpr int TGT_O_NOFOLLOW = 000100000;
140 static constexpr int TGT_O_NOATIME = 001000000;
141 static constexpr int TGT_O_CLOEXEC = 002000000;
142 static constexpr int TGT_O_SYNC = 004010000;
143 static constexpr int TGT_O_PATH = 010000000;
145
146 static constexpr unsigned TGT_MAP_SHARED = 0x00001;
147 static constexpr unsigned TGT_MAP_PRIVATE = 0x00002;
148 static constexpr unsigned TGT_MAP_ANON = 0x00020;
149 static constexpr unsigned TGT_MAP_DENYWRITE = 0x00800;
150 static constexpr unsigned TGT_MAP_EXECUTABLE = 0x01000;
151 static constexpr unsigned TGT_MAP_FILE = 0x00000;
152 static constexpr unsigned TGT_MAP_GROWSDOWN = 0x00100;
153 static constexpr unsigned TGT_MAP_HUGETLB = 0x40000;
154 static constexpr unsigned TGT_MAP_LOCKED = 0x02000;
155 static constexpr unsigned TGT_MAP_NONBLOCK = 0x10000;
156 static constexpr unsigned TGT_MAP_NORESERVE = 0x04000;
157 static constexpr unsigned TGT_MAP_POPULATE = 0x08000;
158 static constexpr unsigned TGT_MAP_STACK = 0x20000;
159 static constexpr unsigned TGT_MAP_ANONYMOUS = 0x00020;
160 static constexpr unsigned TGT_MAP_FIXED = 0x00010;
161
163 static const int TBL_SYSINFO = 12;
164
166 struct rlimit
167 {
168 uint32_t rlim_cur;
169 uint32_t rlim_max;
170 };
171
173 struct timeval
174 {
175 int32_t tv_sec;
176 int32_t tv_usec;
177 };
178
179 struct timespec
180 {
181 int32_t tv_sec;
182 int32_t tv_nsec;
183 };
184
185 // For writev/readv
187 {
188 uint32_t iov_base; // void *
189 uint32_t iov_len;
190 };
191
192
193 struct tgt_stat
194 {
195 uint32_t st_dev;
196 uint32_t st_ino;
197 uint16_t st_mode;
198 uint16_t st_nlink;
199 uint16_t st_uid;
200 uint16_t st_gid;
201 uint32_t st_rdev;
202 uint32_t __pad1;
203 uint32_t st_size;
204 uint32_t st_blksize;
205 uint32_t __pad2;
206 uint32_t st_blocks;
207 uint32_t st_atimeX;
209 uint32_t st_mtimeX;
211 uint32_t st_ctimeX;
213 };
214
216 {
217 uint64_t st_dev;
218 uint8_t __pad0[4];
219 uint32_t __st_ino;
220 uint32_t st_mode;
221 uint32_t st_nlink;
222 uint32_t st_uid;
223 uint32_t st_gid;
224 uint64_t st_rdev;
225 uint8_t __pad3[4];
226 GEM5_ALIGNED(8) int64_t st_size;
227 uint32_t st_blksize;
228 GEM5_ALIGNED(8) uint64_t st_blocks;
229 uint32_t st_atimeX;
231 uint32_t st_mtimeX;
233 uint32_t st_ctimeX;
235 uint64_t st_ino;
236 };
237
239 {
240 int32_t uptime; /* Seconds since boot */
241 uint32_t loads[3]; /* 1, 5, and 15 minute load averages */
242 uint32_t totalram; /* Total usable main memory size */
243 uint32_t freeram; /* Available memory size */
244 uint32_t sharedram; /* Amount of shared memory */
245 uint32_t bufferram; /* Memory used by buffers */
246 uint32_t totalswap; /* Total swap space size */
247 uint32_t freeswap; /* swap space still available */
248 uint16_t procs; /* Number of current processes */
249 uint32_t totalhigh; /* Total high memory size */
250 uint32_t freehigh; /* Available high memory size */
251 uint32_t mem_unit; /* Memory unit size in bytes */
252 };
253
255 struct rusage
256 {
257 struct timeval ru_utime;
258 struct timeval ru_stime;
259 int32_t ru_maxrss;
260 int32_t ru_ixrss;
261 int32_t ru_idrss;
262 int32_t ru_isrss;
263 int32_t ru_minflt;
264 int32_t ru_majflt;
265 int32_t ru_nswap;
266 int32_t ru_inblock;
267 int32_t ru_oublock;
268 int32_t ru_msgsnd;
269 int32_t ru_msgrcv;
270 int32_t ru_nsignals;
271 int32_t ru_nvcsw;
272 int32_t ru_nivcsw;
273 };
274
276 struct tms
277 {
278 int32_t tms_utime;
279 int32_t tms_stime;
280 int32_t tms_cutime;
281 int32_t tms_cstime;
282 };
283
284 static void
285 archClone(uint64_t flags,
286 Process *pp, Process *cp,
288 uint64_t stack, uint64_t tls)
289 {
290 ArmLinux::archClone(flags, pp, cp, ptc, ctc, stack, tls);
291
292 if (stack)
294 }
295};
296
297class ArmLinux64 : public ArmLinux, public OpenFlagTable<ArmLinux64>
298{
299 public:
300
301 static const int TGT_SIGHUP = 0x000001;
302 static const int TGT_SIGINT = 0x000002;
303 static const int TGT_SIGQUIT = 0x000003;
304 static const int TGT_SIGILL = 0x000004;
305 static const int TGT_SIGTRAP = 0x000005;
306 static const int TGT_SIGABRT = 0x000006;
307 static const int TGT_SIGIOT = 0x000006;
308 static const int TGT_SIGBUS = 0x000007;
309 static const int TGT_SIGFPE = 0x000008;
310 static const int TGT_SIGKILL = 0x000009;
311 static const int TGT_SIGUSR1 = 0x00000a;
312 static const int TGT_SIGSEGV = 0x00000b;
313 static const int TGT_SIGUSR2 = 0x00000c;
314 static const int TGT_SIGPIPE = 0x00000d;
315 static const int TGT_SIGALRM = 0x00000e;
316 static const int TGT_SIGTERM = 0x00000f;
317 static const int TGT_SIGSTKFLT = 0x000010;
318 static const int TGT_SIGCHLD = 0x000011;
319 static const int TGT_SIGCONT = 0x000012;
320 static const int TGT_SIGSTOP = 0x000013;
321 static const int TGT_SIGTSTP = 0x000014;
322 static const int TGT_SIGTTIN = 0x000015;
323 static const int TGT_SIGTTOU = 0x000016;
324 static const int TGT_SIGURG = 0x000017;
325 static const int TGT_SIGXCPU = 0x000018;
326 static const int TGT_SIGXFSZ = 0x000019;
327 static const int TGT_SIGVTALRM = 0x00001a;
328 static const int TGT_SIGPROF = 0x00001b;
329 static const int TGT_SIGWINCH = 0x00001c;
330 static const int TGT_SIGIO = 0x00001d;
331 static const int TGT_SIGPOLL = 0x00001d;
332 static const int TGT_SIGPWR = 0x00001e;
333 static const int TGT_SIGSYS = 0x00001f;
334 static const int TGT_SIGUNUSED = 0x00001f;
335
337
338 typedef uint64_t size_t;
339 typedef uint64_t off_t;
340 typedef int64_t time_t;
341 typedef int64_t clock_t;
343
345
346 static constexpr int TGT_O_RDONLY = 000000000;
347 static constexpr int TGT_O_WRONLY = 000000001;
348 static constexpr int TGT_O_RDWR = 000000002;
349 static constexpr int TGT_O_CREAT = 000000100;
350 static constexpr int TGT_O_EXCL = 000000200;
351 static constexpr int TGT_O_NOCTTY = 000000400;
352 static constexpr int TGT_O_TRUNC = 000001000;
353 static constexpr int TGT_O_APPEND = 000002000;
354 static constexpr int TGT_O_NONBLOCK = 000004000;
355 static constexpr int TGT_O_DSYNC = 000010000;
356 static constexpr int TGT_FASYNC = 000020000;
357 static constexpr int TGT_O_DIRECT = 000200000;
358 static constexpr int TGT_O_LARGEFILE = 000400000;
359 static constexpr int TGT_O_DIRECTORY = 000040000;
360 static constexpr int TGT_O_NOFOLLOW = 000100000;
361 static constexpr int TGT_O_NOATIME = 001000000;
362 static constexpr int TGT_O_CLOEXEC = 002000000;
363 static constexpr int TGT_O_SYNC = 004010000;
364 static constexpr int TGT_O_PATH = 010000000;
366
367 static constexpr unsigned TGT_MAP_SHARED = 0x00001;
368 static constexpr unsigned TGT_MAP_PRIVATE = 0x00002;
369 static constexpr unsigned TGT_MAP_ANON = 0x00020;
370 static constexpr unsigned TGT_MAP_DENYWRITE = 0x00800;
371 static constexpr unsigned TGT_MAP_EXECUTABLE = 0x01000;
372 static constexpr unsigned TGT_MAP_FILE = 0x00000;
373 static constexpr unsigned TGT_MAP_GROWSDOWN = 0x00100;
374 static constexpr unsigned TGT_MAP_HUGETLB = 0x40000;
375 static constexpr unsigned TGT_MAP_LOCKED = 0x02000;
376 static constexpr unsigned TGT_MAP_NONBLOCK = 0x10000;
377 static constexpr unsigned TGT_MAP_NORESERVE = 0x04000;
378 static constexpr unsigned TGT_MAP_POPULATE = 0x08000;
379 static constexpr unsigned TGT_MAP_STACK = 0x20000;
380 static constexpr unsigned TGT_MAP_ANONYMOUS = 0x00020;
381 static constexpr unsigned TGT_MAP_FIXED = 0x00010;
382
384
385 static const int TGT_RUSAGE_SELF = 0;
386 static const int TGT_RUSAGE_CHILDREN = -1;
387 static const int TGT_RUSAGE_BOTH = -2;
389
391
392 static const unsigned TIOCGETP_ = 0x5401;
393 static const unsigned TIOCSETP_ = 0x80067409;
394 static const unsigned TIOCSETN_ = 0x8006740a;
395 static const unsigned TIOCSETC_ = 0x80067411;
396 static const unsigned TIOCGETC_ = 0x40067412;
397 static const unsigned FIONREAD_ = 0x4004667f;
398 static const unsigned TIOCISATTY_ = 0x2000745e;
399 static const unsigned TIOCGETS_ = 0x402c7413;
400 static const unsigned TIOCGETA_ = 0x5405;
401 static const unsigned TCSETAW_ = 0x5407; // 2.6.15 kernel
403
405 static const int TBL_SYSINFO = 12;
406
409 {
410 TGT_RLIMIT_CPU = 0,
411 TGT_RLIMIT_FSIZE = 1,
412 TGT_RLIMIT_DATA = 2,
413 TGT_RLIMIT_STACK = 3,
414 TGT_RLIMIT_CORE = 4,
415 TGT_RLIMIT_RSS = 5,
416 TGT_RLIMIT_NPROC = 6,
417 TGT_RLIMIT_NOFILE = 7,
418 TGT_RLIMIT_MEMLOCK = 8,
419 TGT_RLIMIT_AS = 9,
420 TGT_RLIMIT_LOCKS = 10
421 };
422
424 struct rlimit
425 {
426 uint64_t rlim_cur;
427 uint64_t rlim_max;
428 };
429
431 struct timeval
432 {
433 int64_t tv_sec;
434 int64_t tv_usec;
435 };
436
437 struct timespec
438 {
439 int64_t tv_sec;
440 int64_t tv_nsec;
441 };
442
443 // For writev/readv
445 {
446 uint64_t iov_base; // void *
447 uint64_t iov_len;
448 };
449
450 struct tgt_stat
451 {
452 uint64_t st_dev;
453 uint64_t st_ino;
454 uint64_t st_nlink;
455 uint32_t st_mode;
456 uint32_t st_uid;
457 uint32_t st_gid;
458 uint32_t __pad0;
459 uint64_t st_rdev;
460 uint64_t st_size;
461 uint64_t st_blksize;
462 uint64_t st_blocks;
463 uint64_t st_atimeX;
465 uint64_t st_mtimeX;
467 uint64_t st_ctimeX;
469 };
470
472 {
473 uint64_t st_dev;
474 uint64_t st_ino;
475 uint32_t st_mode;
476 uint32_t st_nlink;
477 uint32_t st_uid;
478 uint32_t st_gid;
479 uint32_t __pad0;
480 uint64_t st_rdev;
481 uint64_t st_size;
482 uint64_t st_blksize;
483 uint64_t st_blocks;
484 uint64_t st_atimeX;
486 uint64_t st_mtimeX;
488 uint64_t st_ctimeX;
490 };
491
493 {
494 int64_t uptime; /* Seconds since boot */
495 uint64_t loads[3]; /* 1, 5, and 15 minute load averages */
496 uint64_t totalram; /* Total usable main memory size */
497 uint64_t freeram; /* Available memory size */
498 uint64_t sharedram; /* Amount of shared memory */
499 uint64_t bufferram; /* Memory used by buffers */
500 uint64_t totalswap; /* Total swap space size */
501 uint64_t freeswap; /* swap space still available */
502 uint16_t procs; /* Number of current processes */
503 uint16_t pad;
504 uint64_t totalhigh; /* Total high memory size */
505 uint64_t freehigh; /* Available high memory size */
506 uint32_t mem_unit; /* Memory unit size in bytes */
507 };
508
510 struct rusage
511 {
512 struct timeval ru_utime;
513 struct timeval ru_stime;
514 int64_t ru_maxrss;
515 int64_t ru_ixrss;
516 int64_t ru_idrss;
517 int64_t ru_isrss;
518 int64_t ru_minflt;
519 int64_t ru_majflt;
520 int64_t ru_nswap;
521 int64_t ru_inblock;
522 int64_t ru_oublock;
523 int64_t ru_msgsnd;
524 int64_t ru_msgrcv;
525 int64_t ru_nsignals;
526 int64_t ru_nvcsw;
527 int64_t ru_nivcsw;
528 };
529
531 struct tms
532 {
533 int64_t tms_utime;
534 int64_t tms_stime;
535 int64_t tms_cutime;
536 int64_t tms_cstime;
537 };
538
539 static void archClone(uint64_t flags,
540 Process *pp, Process *cp,
541 ThreadContext *ptc, ThreadContext *ctc,
542 uint64_t stack, uint64_t tls)
543 {
544 ArmLinux::archClone(flags, pp, cp, ptc, ctc, stack, tls);
545
546 if (stack)
547 ctc->setReg(ArmISA::int_reg::Sp0, stack);
548 }
549};
550
551} // namespace gem5
552
553#endif
static constexpr int TGT_O_SYNC
O_SYNC.
Definition linux.hh:142
static constexpr int TGT_O_DSYNC
O_DSYNC.
Definition linux.hh:134
uint32_t size_t
Basic ARM Linux types.
Definition linux.hh:117
static constexpr unsigned TGT_MAP_POPULATE
Definition linux.hh:157
static const int TGT_SIGBUS
Definition linux.hh:87
static constexpr int TGT_O_LARGEFILE
O_LARGEFILE.
Definition linux.hh:137
static const int TGT_SIGABRT
Definition linux.hh:85
static constexpr unsigned TGT_MAP_DENYWRITE
Definition linux.hh:149
static const int TBL_SYSINFO
For table().
Definition linux.hh:163
static constexpr unsigned TGT_MAP_HUGETLB
Definition linux.hh:153
static const int TGT_SIGTSTP
Definition linux.hh:100
static constexpr int TGT_O_DIRECTORY
O_DIRECTORY.
Definition linux.hh:138
static const int TGT_SIGXCPU
Definition linux.hh:104
static constexpr int TGT_O_DIRECT
O_DIRECT.
Definition linux.hh:136
static constexpr unsigned TGT_MAP_NONBLOCK
Definition linux.hh:155
static const int TGT_SIGPOLL
Definition linux.hh:110
static const int TGT_SIGQUIT
Definition linux.hh:82
static constexpr unsigned TGT_MAP_PRIVATE
Definition linux.hh:147
static constexpr int TGT_O_NOATIME
O_NOATIME.
Definition linux.hh:140
static constexpr int TGT_O_NOCTTY
O_NOCTTY.
Definition linux.hh:130
static const int TGT_SIGTRAP
Definition linux.hh:84
static const int TGT_SIGILL
Definition linux.hh:83
static const int TGT_SIGCONT
Definition linux.hh:98
static const int TGT_SIGUNUSED
Definition linux.hh:113
uint32_t off_t
Definition linux.hh:118
static const int TGT_SIGWINCH
Definition linux.hh:108
static const int TGT_SIGPWR
Definition linux.hh:111
static const int TGT_SIGPROF
Definition linux.hh:107
static const int TGT_SIGTTOU
Definition linux.hh:102
static const int TGT_SIGSTKFLT
Definition linux.hh:96
int32_t time_t
Definition linux.hh:119
static void archClone(uint64_t flags, Process *pp, Process *cp, ThreadContext *ptc, ThreadContext *ctc, uint64_t stack, uint64_t tls)
Definition linux.hh:285
static constexpr unsigned TGT_MAP_STACK
Definition linux.hh:158
static const int TGT_SIGINT
Definition linux.hh:81
static constexpr unsigned TGT_MAP_ANON
Definition linux.hh:148
static const int TGT_SIGUSR2
Definition linux.hh:92
static constexpr int TGT_O_TRUNC
O_TRUNC.
Definition linux.hh:131
static constexpr int TGT_O_NONBLOCK
O_NONBLOCK.
Definition linux.hh:133
static const int TGT_SIGIOT
Definition linux.hh:86
static const int TGT_SIGTTIN
Definition linux.hh:101
static const int TGT_SIGPIPE
Definition linux.hh:93
static constexpr unsigned TGT_MAP_SHARED
Definition linux.hh:146
static constexpr int TGT_O_RDWR
O_RDWR.
Definition linux.hh:127
static constexpr unsigned TGT_MAP_NORESERVE
Definition linux.hh:156
static const int TGT_SIGURG
Definition linux.hh:103
static const int TGT_SIGHUP
Definition linux.hh:80
static const int TGT_SIGKILL
Definition linux.hh:89
static const int TGT_SIGSEGV
Definition linux.hh:91
static constexpr unsigned TGT_MAP_ANONYMOUS
Definition linux.hh:159
int32_t clock_t
Definition linux.hh:120
static constexpr unsigned TGT_MAP_LOCKED
Definition linux.hh:154
static constexpr int TGT_O_RDONLY
open(2) flag values.
Definition linux.hh:125
static constexpr int TGT_O_CREAT
O_CREAT.
Definition linux.hh:128
static const int TGT_SIGXFSZ
Definition linux.hh:105
static constexpr int TGT_O_CLOEXEC
O_NOATIME.
Definition linux.hh:141
static constexpr unsigned TGT_MAP_GROWSDOWN
Definition linux.hh:152
static const int TGT_SIGTERM
Definition linux.hh:95
static constexpr int TGT_O_WRONLY
O_WRONLY.
Definition linux.hh:126
static constexpr int TGT_O_NOFOLLOW
O_NOFOLLOW.
Definition linux.hh:139
static constexpr unsigned TGT_MAP_EXECUTABLE
Definition linux.hh:150
static const int TGT_SIGUSR1
Definition linux.hh:90
static const int TGT_SIGALRM
Definition linux.hh:94
static const int TGT_SIGCHLD
Definition linux.hh:97
static constexpr int TGT_O_PATH
O_PATH.
Definition linux.hh:143
static constexpr int TGT_FASYNC
FASYNC.
Definition linux.hh:135
static const int TGT_SIGSTOP
Definition linux.hh:99
static const int TGT_SIGIO
Definition linux.hh:109
static const int TGT_SIGFPE
Definition linux.hh:88
static constexpr unsigned TGT_MAP_FIXED
Definition linux.hh:160
static constexpr unsigned TGT_MAP_FILE
Definition linux.hh:151
static const int TGT_SIGVTALRM
Definition linux.hh:106
static const int TGT_SIGSYS
Definition linux.hh:112
static constexpr int TGT_O_EXCL
O_EXCL.
Definition linux.hh:129
static constexpr int TGT_O_APPEND
O_APPEND.
Definition linux.hh:132
uint64_t off_t
Definition linux.hh:339
uint64_t size_t
Basic ARM Linux types.
Definition linux.hh:338
rlimit_resources
Resource enumeration for getrlimit().
Definition linux.hh:409
int64_t clock_t
Definition linux.hh:341
int64_t time_t
Definition linux.hh:340
static void archClone(uint64_t flags, Process *pp, Process *cp, ThreadContext *ptc, ThreadContext *ctc, uint64_t stack, uint64_t tls)
Definition linux.hh:539
static void archClone(uint64_t flags, Process *pp, Process *cp, ThreadContext *ptc, ThreadContext *ctc, uint64_t stack, uint64_t tls)
Definition linux.hh:61
static const ByteOrder byteOrder
Definition linux.hh:58
virtual void copyRegsFrom(ThreadContext *src)=0
This class encapsulates the types, structures, constants, functions, and syscall-number mappings spec...
Definition linux.hh:62
static const unsigned TGT_CLONE_SETTLS
Definition linux.hh:319
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
virtual BaseISA * getIsaPtr() const =0
virtual void setReg(const RegId &reg, RegVal val)
uint8_t flags
Definition helpers.cc:87
constexpr auto & Sp
Definition int.hh:274
@ MISCREG_TPIDR_EL0
Definition misc.hh:808
Bitfield< 7, 0 > ptc
Bitfield< 17, 16 > stack
Definition misc.hh:602
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
Limit struct for getrlimit/setrlimit.
Definition linux.hh:167
uint32_t rlim_max
hard limit
Definition linux.hh:169
uint32_t rlim_cur
soft limit
Definition linux.hh:168
For getrusage().
Definition linux.hh:256
int32_t ru_oublock
block output operations
Definition linux.hh:267
int32_t ru_nivcsw
involuntary "
Definition linux.hh:272
int32_t ru_maxrss
max rss
Definition linux.hh:259
int32_t ru_isrss
integral unshared stack "
Definition linux.hh:262
int32_t ru_idrss
integral unshared data "
Definition linux.hh:261
int32_t ru_nswap
swaps
Definition linux.hh:265
int32_t ru_msgrcv
messages received
Definition linux.hh:269
int32_t ru_minflt
page reclaims - total vmfaults
Definition linux.hh:263
int32_t ru_ixrss
integral shared memory size
Definition linux.hh:260
int32_t ru_nsignals
signals received
Definition linux.hh:270
int32_t ru_nvcsw
voluntary context switches
Definition linux.hh:271
int32_t ru_majflt
page faults
Definition linux.hh:264
int32_t ru_msgsnd
messages sent
Definition linux.hh:268
int32_t ru_inblock
block input operations
Definition linux.hh:266
GEM5_ALIGNED(8) int64_t st_size
int32_t tv_sec
seconds
Definition linux.hh:181
int32_t tv_nsec
nanoseconds
Definition linux.hh:182
For gettimeofday().
Definition linux.hh:174
int32_t tv_sec
seconds
Definition linux.hh:175
int32_t tv_usec
microseconds
Definition linux.hh:176
For times().
Definition linux.hh:277
int32_t tms_stime
system time
Definition linux.hh:279
int32_t tms_cutime
user time of children
Definition linux.hh:280
int32_t tms_utime
user time
Definition linux.hh:278
int32_t tms_cstime
system time of children
Definition linux.hh:281
Limit struct for getrlimit/setrlimit.
Definition linux.hh:425
uint64_t rlim_cur
soft limit
Definition linux.hh:426
uint64_t rlim_max
hard limit
Definition linux.hh:427
For getrusage().
Definition linux.hh:511
int64_t ru_idrss
integral unshared data "
Definition linux.hh:516
int64_t ru_msgrcv
messages received
Definition linux.hh:524
int64_t ru_msgsnd
messages sent
Definition linux.hh:523
int64_t ru_majflt
page faults
Definition linux.hh:519
int64_t ru_minflt
page reclaims - total vmfaults
Definition linux.hh:518
int64_t ru_nivcsw
involuntary "
Definition linux.hh:527
int64_t ru_inblock
block input operations
Definition linux.hh:521
int64_t ru_ixrss
integral shared memory size
Definition linux.hh:515
int64_t ru_nvcsw
voluntary context switches
Definition linux.hh:526
int64_t ru_nsignals
signals received
Definition linux.hh:525
int64_t ru_nswap
swaps
Definition linux.hh:520
int64_t ru_isrss
integral unshared stack "
Definition linux.hh:517
int64_t ru_oublock
block output operations
Definition linux.hh:522
int64_t ru_maxrss
max rss
Definition linux.hh:514
int64_t tv_sec
seconds
Definition linux.hh:439
int64_t tv_nsec
nanoseconds
Definition linux.hh:440
For gettimeofday().
Definition linux.hh:432
int64_t tv_sec
seconds
Definition linux.hh:433
int64_t tv_usec
microseconds
Definition linux.hh:434
For times().
Definition linux.hh:532
int64_t tms_cstime
system time of children
Definition linux.hh:536
int64_t tms_cutime
user time of children
Definition linux.hh:535
int64_t tms_stime
system time
Definition linux.hh:534
int64_t tms_utime
user time
Definition linux.hh:533

Generated on Tue Jun 18 2024 16:24:04 for gem5 by doxygen 1.11.0