gem5 [DEVELOP-FOR-25.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 {
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 // For clone(3)
286 {
287 uint64_t flags;
288 uint64_t pidfd;
289 uint64_t child_tid;
290 uint64_t parent_tid;
291 uint64_t exit_signal;
292 uint64_t stack;
293 uint64_t stack_size;
294 uint64_t tls;
295 uint64_t set_tid;
296 uint64_t set_tid_size;
297 uint64_t cgroup;
298 };
299
300 static void
301 archClone(uint64_t flags,
302 Process *pp, Process *cp,
304 uint64_t stack, uint64_t tls)
305 {
306 ArmLinux::archClone(flags, pp, cp, ptc, ctc, stack, tls);
307
308 if (stack)
310 }
311};
312
313class ArmLinux64 : public ArmLinux, public OpenFlagTable<ArmLinux64>
314{
315 public:
316
317 static const int TGT_SIGHUP = 0x000001;
318 static const int TGT_SIGINT = 0x000002;
319 static const int TGT_SIGQUIT = 0x000003;
320 static const int TGT_SIGILL = 0x000004;
321 static const int TGT_SIGTRAP = 0x000005;
322 static const int TGT_SIGABRT = 0x000006;
323 static const int TGT_SIGIOT = 0x000006;
324 static const int TGT_SIGBUS = 0x000007;
325 static const int TGT_SIGFPE = 0x000008;
326 static const int TGT_SIGKILL = 0x000009;
327 static const int TGT_SIGUSR1 = 0x00000a;
328 static const int TGT_SIGSEGV = 0x00000b;
329 static const int TGT_SIGUSR2 = 0x00000c;
330 static const int TGT_SIGPIPE = 0x00000d;
331 static const int TGT_SIGALRM = 0x00000e;
332 static const int TGT_SIGTERM = 0x00000f;
333 static const int TGT_SIGSTKFLT = 0x000010;
334 static const int TGT_SIGCHLD = 0x000011;
335 static const int TGT_SIGCONT = 0x000012;
336 static const int TGT_SIGSTOP = 0x000013;
337 static const int TGT_SIGTSTP = 0x000014;
338 static const int TGT_SIGTTIN = 0x000015;
339 static const int TGT_SIGTTOU = 0x000016;
340 static const int TGT_SIGURG = 0x000017;
341 static const int TGT_SIGXCPU = 0x000018;
342 static const int TGT_SIGXFSZ = 0x000019;
343 static const int TGT_SIGVTALRM = 0x00001a;
344 static const int TGT_SIGPROF = 0x00001b;
345 static const int TGT_SIGWINCH = 0x00001c;
346 static const int TGT_SIGIO = 0x00001d;
347 static const int TGT_SIGPOLL = 0x00001d;
348 static const int TGT_SIGPWR = 0x00001e;
349 static const int TGT_SIGSYS = 0x00001f;
350 static const int TGT_SIGUNUSED = 0x00001f;
351
353
354 typedef uint64_t size_t;
355 typedef uint64_t off_t;
356 typedef int64_t time_t;
357 typedef int64_t clock_t;
359
361
362 static constexpr int TGT_O_RDONLY = 000000000;
363 static constexpr int TGT_O_WRONLY = 000000001;
364 static constexpr int TGT_O_RDWR = 000000002;
365 static constexpr int TGT_O_CREAT = 000000100;
366 static constexpr int TGT_O_EXCL = 000000200;
367 static constexpr int TGT_O_NOCTTY = 000000400;
368 static constexpr int TGT_O_TRUNC = 000001000;
369 static constexpr int TGT_O_APPEND = 000002000;
370 static constexpr int TGT_O_NONBLOCK = 000004000;
371 static constexpr int TGT_O_DSYNC = 000010000;
372 static constexpr int TGT_FASYNC = 000020000;
373 static constexpr int TGT_O_DIRECT = 000200000;
374 static constexpr int TGT_O_LARGEFILE = 000400000;
375 static constexpr int TGT_O_DIRECTORY = 000040000;
376 static constexpr int TGT_O_NOFOLLOW = 000100000;
377 static constexpr int TGT_O_NOATIME = 001000000;
378 static constexpr int TGT_O_CLOEXEC = 002000000;
379 static constexpr int TGT_O_SYNC = 004010000;
380 static constexpr int TGT_O_PATH = 010000000;
382
383 static constexpr unsigned TGT_MAP_SHARED = 0x00001;
384 static constexpr unsigned TGT_MAP_PRIVATE = 0x00002;
385 static constexpr unsigned TGT_MAP_ANON = 0x00020;
386 static constexpr unsigned TGT_MAP_DENYWRITE = 0x00800;
387 static constexpr unsigned TGT_MAP_EXECUTABLE = 0x01000;
388 static constexpr unsigned TGT_MAP_FILE = 0x00000;
389 static constexpr unsigned TGT_MAP_GROWSDOWN = 0x00100;
390 static constexpr unsigned TGT_MAP_HUGETLB = 0x40000;
391 static constexpr unsigned TGT_MAP_LOCKED = 0x02000;
392 static constexpr unsigned TGT_MAP_NONBLOCK = 0x10000;
393 static constexpr unsigned TGT_MAP_NORESERVE = 0x04000;
394 static constexpr unsigned TGT_MAP_POPULATE = 0x08000;
395 static constexpr unsigned TGT_MAP_STACK = 0x20000;
396 static constexpr unsigned TGT_MAP_ANONYMOUS = 0x00020;
397 static constexpr unsigned TGT_MAP_FIXED = 0x00010;
398
400
401 static const int TGT_RUSAGE_SELF = 0;
402 static const int TGT_RUSAGE_CHILDREN = -1;
403 static const int TGT_RUSAGE_BOTH = -2;
405
407
408 static const unsigned TIOCGETP_ = 0x5401;
409 static const unsigned TIOCSETP_ = 0x80067409;
410 static const unsigned TIOCSETN_ = 0x8006740a;
411 static const unsigned TIOCSETC_ = 0x80067411;
412 static const unsigned TIOCGETC_ = 0x40067412;
413 static const unsigned FIONREAD_ = 0x4004667f;
414 static const unsigned TIOCISATTY_ = 0x2000745e;
415 static const unsigned TIOCGETS_ = 0x402c7413;
416 static const unsigned TIOCGETA_ = 0x5405;
417 static const unsigned TCSETAW_ = 0x5407; // 2.6.15 kernel
419
421 static const int TBL_SYSINFO = 12;
422
438
440 struct rlimit
441 {
442 uint64_t rlim_cur;
443 uint64_t rlim_max;
444 };
445
447 struct timeval
448 {
449 int64_t tv_sec;
450 int64_t tv_usec;
451 };
452
453 struct timespec
454 {
455 int64_t tv_sec;
456 int64_t tv_nsec;
457 };
458
459 // For writev/readv
461 {
462 uint64_t iov_base; // void *
463 uint64_t iov_len;
464 };
465
466 struct tgt_stat
467 {
468 uint64_t st_dev;
469 uint64_t st_ino;
470 uint64_t st_nlink;
471 uint32_t st_mode;
472 uint32_t st_uid;
473 uint32_t st_gid;
474 uint32_t __pad0;
475 uint64_t st_rdev;
476 uint64_t st_size;
477 uint64_t st_blksize;
478 uint64_t st_blocks;
479 uint64_t st_atimeX;
481 uint64_t st_mtimeX;
483 uint64_t st_ctimeX;
485 };
486
488 {
489 uint64_t st_dev;
490 uint64_t st_ino;
491 uint32_t st_mode;
492 uint32_t st_nlink;
493 uint32_t st_uid;
494 uint32_t st_gid;
495 uint32_t __pad0;
496 uint64_t st_rdev;
497 uint64_t st_size;
498 uint64_t st_blksize;
499 uint64_t st_blocks;
500 uint64_t st_atimeX;
502 uint64_t st_mtimeX;
504 uint64_t st_ctimeX;
506 };
507
509 {
510 int64_t uptime; /* Seconds since boot */
511 uint64_t loads[3]; /* 1, 5, and 15 minute load averages */
512 uint64_t totalram; /* Total usable main memory size */
513 uint64_t freeram; /* Available memory size */
514 uint64_t sharedram; /* Amount of shared memory */
515 uint64_t bufferram; /* Memory used by buffers */
516 uint64_t totalswap; /* Total swap space size */
517 uint64_t freeswap; /* swap space still available */
518 uint16_t procs; /* Number of current processes */
519 uint16_t pad;
520 uint64_t totalhigh; /* Total high memory size */
521 uint64_t freehigh; /* Available high memory size */
522 uint32_t mem_unit; /* Memory unit size in bytes */
523 };
524
526 struct rusage
527 {
530 int64_t ru_maxrss;
531 int64_t ru_ixrss;
532 int64_t ru_idrss;
533 int64_t ru_isrss;
534 int64_t ru_minflt;
535 int64_t ru_majflt;
536 int64_t ru_nswap;
537 int64_t ru_inblock;
538 int64_t ru_oublock;
539 int64_t ru_msgsnd;
540 int64_t ru_msgrcv;
541 int64_t ru_nsignals;
542 int64_t ru_nvcsw;
543 int64_t ru_nivcsw;
544 };
545
547 struct tms
548 {
549 int64_t tms_utime;
550 int64_t tms_stime;
551 int64_t tms_cutime;
552 int64_t tms_cstime;
553 };
554
555 // For clone(3)
557 {
558 uint64_t flags;
559 uint64_t pidfd;
560 uint64_t child_tid;
561 uint64_t parent_tid;
562 uint64_t exit_signal;
563 uint64_t stack;
564 uint64_t stack_size;
565 uint64_t tls;
566 uint64_t set_tid;
567 uint64_t set_tid_size;
568 uint64_t cgroup;
569 };
570
571 static void archClone(uint64_t flags,
572 Process *pp, Process *cp,
574 uint64_t stack, uint64_t tls)
575 {
576 ArmLinux::archClone(flags, pp, cp, ptc, ctc, stack, tls);
577
578 if (stack)
580 }
581};
582
583} // namespace gem5
584
585#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:301
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
static constexpr int TGT_O_DIRECT
O_DIRECT.
Definition linux.hh:373
static const int TGT_SIGTSTP
Definition linux.hh:337
static constexpr unsigned TGT_MAP_POPULATE
Definition linux.hh:394
static constexpr unsigned TGT_MAP_DENYWRITE
Definition linux.hh:386
static constexpr int TGT_O_NOATIME
O_NOATIME.
Definition linux.hh:377
static const int TGT_SIGSTKFLT
Definition linux.hh:333
static const int TGT_SIGBUS
Definition linux.hh:324
static const int TGT_SIGTERM
Definition linux.hh:332
static const int TGT_SIGWINCH
Definition linux.hh:345
static const int TGT_SIGCHLD
Definition linux.hh:334
static constexpr unsigned TGT_MAP_PRIVATE
Definition linux.hh:384
static const unsigned TCSETAW_
Definition linux.hh:417
static const int TGT_SIGSTOP
Definition linux.hh:336
static const int TGT_SIGSYS
Definition linux.hh:349
static constexpr int TGT_O_RDONLY
open(2) flag values.
Definition linux.hh:362
static const int TGT_SIGCONT
Definition linux.hh:335
static const int TGT_SIGXCPU
Definition linux.hh:341
static const int TGT_SIGXFSZ
Definition linux.hh:342
static constexpr unsigned TGT_MAP_FIXED
Definition linux.hh:397
static constexpr int TGT_O_APPEND
O_APPEND.
Definition linux.hh:369
static const int TGT_SIGPWR
Definition linux.hh:348
static const int TGT_SIGTTIN
Definition linux.hh:338
static const int TGT_SIGTTOU
Definition linux.hh:339
static constexpr unsigned TGT_MAP_HUGETLB
Definition linux.hh:390
static constexpr int TGT_O_CREAT
O_CREAT.
Definition linux.hh:365
static const int TGT_SIGKILL
Definition linux.hh:326
static const int TGT_SIGPOLL
Definition linux.hh:347
static constexpr int TGT_O_CLOEXEC
O_NOATIME.
Definition linux.hh:378
static constexpr int TGT_O_EXCL
O_EXCL.
Definition linux.hh:366
static constexpr unsigned TGT_MAP_ANONYMOUS
Definition linux.hh:396
static const unsigned FIONREAD_
Definition linux.hh:413
static constexpr int TGT_O_NOFOLLOW
O_NOFOLLOW.
Definition linux.hh:376
static const int TGT_RUSAGE_BOTH
Definition linux.hh:403
static constexpr unsigned TGT_MAP_SHARED
Definition linux.hh:383
static const unsigned TIOCGETC_
Definition linux.hh:412
static const int TGT_SIGUSR2
Definition linux.hh:329
static constexpr int TGT_O_LARGEFILE
O_LARGEFILE.
Definition linux.hh:374
static constexpr int TGT_FASYNC
FASYNC.
Definition linux.hh:372
static const int TGT_RUSAGE_SELF
For getrusage().
Definition linux.hh:401
static constexpr unsigned TGT_MAP_EXECUTABLE
Definition linux.hh:387
static const int TGT_SIGURG
Definition linux.hh:340
static const unsigned TIOCGETP_
ioctl() command codes.
Definition linux.hh:408
static constexpr unsigned TGT_MAP_NORESERVE
Definition linux.hh:393
static const int TGT_SIGIOT
Definition linux.hh:323
static constexpr int TGT_O_NONBLOCK
O_NONBLOCK.
Definition linux.hh:370
static const int TGT_SIGPROF
Definition linux.hh:344
static const int TGT_SIGPIPE
Definition linux.hh:330
static const unsigned TIOCSETC_
Definition linux.hh:411
static const int TGT_SIGVTALRM
Definition linux.hh:343
static const int TGT_SIGQUIT
Definition linux.hh:319
static const int TGT_RUSAGE_CHILDREN
Definition linux.hh:402
static const unsigned TIOCISATTY_
Definition linux.hh:414
static const unsigned TIOCSETN_
Definition linux.hh:410
static const int TGT_SIGFPE
Definition linux.hh:325
static const int TGT_SIGALRM
Definition linux.hh:331
uint64_t off_t
Definition linux.hh:355
static constexpr int TGT_O_WRONLY
O_WRONLY.
Definition linux.hh:363
uint64_t size_t
Basic ARM Linux types.
Definition linux.hh:354
static const int TGT_SIGSEGV
Definition linux.hh:328
static constexpr unsigned TGT_MAP_LOCKED
Definition linux.hh:391
rlimit_resources
Resource enumeration for getrlimit().
Definition linux.hh:425
static const int TGT_SIGUNUSED
Definition linux.hh:350
static const int TGT_SIGILL
Definition linux.hh:320
static const unsigned TIOCGETA_
Definition linux.hh:416
static constexpr int TGT_O_PATH
O_PATH.
Definition linux.hh:380
static const int TGT_SIGUSR1
Definition linux.hh:327
static constexpr int TGT_O_NOCTTY
O_NOCTTY.
Definition linux.hh:367
static constexpr int TGT_O_DSYNC
O_DSYNC.
Definition linux.hh:371
static constexpr unsigned TGT_MAP_FILE
Definition linux.hh:388
static const int TGT_SIGIO
Definition linux.hh:346
static constexpr unsigned TGT_MAP_ANON
Definition linux.hh:385
static const unsigned TIOCGETS_
Definition linux.hh:415
static const unsigned TIOCSETP_
Definition linux.hh:409
static constexpr int TGT_O_TRUNC
O_TRUNC.
Definition linux.hh:368
static constexpr int TGT_O_SYNC
O_SYNC.
Definition linux.hh:379
static const int TGT_SIGINT
Definition linux.hh:318
int64_t clock_t
Definition linux.hh:357
int64_t time_t
Definition linux.hh:356
static const int TBL_SYSINFO
For table().
Definition linux.hh:421
static const int TGT_SIGHUP
Definition linux.hh:317
static constexpr int TGT_O_RDWR
O_RDWR.
Definition linux.hh:364
static constexpr unsigned TGT_MAP_GROWSDOWN
Definition linux.hh:389
static void archClone(uint64_t flags, Process *pp, Process *cp, ThreadContext *ptc, ThreadContext *ctc, uint64_t stack, uint64_t tls)
Definition linux.hh:571
static const int TGT_SIGTRAP
Definition linux.hh:321
static constexpr unsigned TGT_MAP_STACK
Definition linux.hh:395
static constexpr unsigned TGT_MAP_NONBLOCK
Definition linux.hh:392
static constexpr int TGT_O_DIRECTORY
O_DIRECTORY.
Definition linux.hh:375
static const int TGT_SIGABRT
Definition linux.hh:322
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)
constexpr auto & Sp
Definition int.hh:274
constexpr RegId Sp0
Definition int.hh:233
@ MISCREG_TPIDR_EL0
Definition misc.hh:832
Bitfield< 7, 0 > ptc
Bitfield< 17, 16 > stack
Definition misc.hh:602
Copyright (c) 2024 Arm Limited 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
struct timeval ru_utime
user time used
Definition linux.hh:257
int32_t ru_maxrss
max rss
Definition linux.hh:259
int32_t ru_isrss
integral unshared stack "
Definition linux.hh:262
struct timeval ru_stime
system time used
Definition linux.hh:258
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:441
uint64_t rlim_cur
soft limit
Definition linux.hh:442
uint64_t rlim_max
hard limit
Definition linux.hh:443
For getrusage().
Definition linux.hh:527
int64_t ru_idrss
integral unshared data "
Definition linux.hh:532
int64_t ru_msgrcv
messages received
Definition linux.hh:540
int64_t ru_msgsnd
messages sent
Definition linux.hh:539
int64_t ru_majflt
page faults
Definition linux.hh:535
struct timeval ru_utime
user time used
Definition linux.hh:528
int64_t ru_minflt
page reclaims - total vmfaults
Definition linux.hh:534
int64_t ru_nivcsw
involuntary "
Definition linux.hh:543
int64_t ru_inblock
block input operations
Definition linux.hh:537
int64_t ru_ixrss
integral shared memory size
Definition linux.hh:531
int64_t ru_nvcsw
voluntary context switches
Definition linux.hh:542
int64_t ru_nsignals
signals received
Definition linux.hh:541
int64_t ru_nswap
swaps
Definition linux.hh:536
int64_t ru_isrss
integral unshared stack "
Definition linux.hh:533
int64_t ru_oublock
block output operations
Definition linux.hh:538
struct timeval ru_stime
system time used
Definition linux.hh:529
int64_t ru_maxrss
max rss
Definition linux.hh:530
int64_t tv_sec
seconds
Definition linux.hh:455
int64_t tv_nsec
nanoseconds
Definition linux.hh:456
For gettimeofday().
Definition linux.hh:448
int64_t tv_sec
seconds
Definition linux.hh:449
int64_t tv_usec
microseconds
Definition linux.hh:450
For times().
Definition linux.hh:548
int64_t tms_cstime
system time of children
Definition linux.hh:552
int64_t tms_cutime
user time of children
Definition linux.hh:551
int64_t tms_stime
system time
Definition linux.hh:550
int64_t tms_utime
user time
Definition linux.hh:549

Generated on Mon May 26 2025 09:19:11 for gem5 by doxygen 1.13.2