gem5 v24.1.0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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#include "base/bitfield.hh"
38
39namespace gem5
40{
41
42class RiscvLinux : public Linux
43{
44 public:
45 static const ByteOrder byteOrder = ByteOrder::little;
46
60
61 /* Increase RISCV_HWPROBE_MAX_KEY when adding items. */
62 #define RISCV_HWPROBE_MAX_KEY 9
63
64 BitUnion64(key_base_behavior_t)
65 Bitfield<0> ima;
66 EndBitUnion(key_base_behavior_t)
67
68 BitUnion64(key_ima_ext_0_t)
69 Bitfield<49> ZAWRS;
70 Bitfield<48> ZCMOP;
71 Bitfield<47> ZCF;
72 Bitfield<46> ZCD;
73 Bitfield<45> ZCB;
74 Bitfield<44> ZCA;
75 Bitfield<43> ZIMOP;
76 Bitfield<42> ZVE64D;
77 Bitfield<41> ZVE64F;
78 Bitfield<40> ZVE64X;
79 Bitfield<39> ZVE32F;
80 Bitfield<38> ZVE32X;
81 Bitfield<37> ZIHINTPAUSE;
82 Bitfield<36> ZICOND;
83 Bitfield<35> ZACAS;
84 Bitfield<34> ZTSO;
85 Bitfield<33> ZFA;
86 Bitfield<32> ZVFHMIN;
87 Bitfield<31> ZVFH;
88 Bitfield<30> ZIHINTNTL;
89 Bitfield<29> ZFHMIN;
90 Bitfield<28> ZFH;
91 Bitfield<27> ZVKT;
92 Bitfield<26> ZVKSH;
93 Bitfield<25> ZVKSED;
94 Bitfield<24> ZVKNHB;
95 Bitfield<22> ZVKNHA;
96 Bitfield<21> ZVKNED;
97 Bitfield<20> ZVKG;
98 Bitfield<19> ZVKB;
99 Bitfield<18> ZVBC;
100 Bitfield<17> ZVBB;
101 Bitfield<16> ZKT;
102 Bitfield<15> ZKSH;
103 Bitfield<14> ZKSED;
104 Bitfield<13> ZKNH;
105 Bitfield<12> ZKNE;
106 Bitfield<11> ZKND;
107 Bitfield<10> ZBKX;
108 Bitfield<9> ZBKC;
109 Bitfield<8> ZBKB;
110 Bitfield<7> ZBC;
111 Bitfield<6> ZICBOZ;
112 Bitfield<5> ZBS;
113 Bitfield<4> ZBB;
114 Bitfield<3> ZBA;
115 Bitfield<2> V;
116 Bitfield<1> C;
117 Bitfield<0> FD;
118 EndBitUnion(key_ima_ext_0_t)
119
121 {
122 Unknown,
123 Emulated,
124 Slow,
125 Fast,
126 Unsupported
127 };
128
129 /* Flags */
130 #define RISCV_HWPROBE_WHICH_CPUS (1 << 0)
131
133 int64_t key;
134 uint64_t value;
135 };
136
137 typedef struct cpumask {
138 size_t size;
139 uint64_t bits[];
141};
142
143class RiscvLinux64 : public RiscvLinux, public OpenFlagTable<RiscvLinux64>
144{
145 public:
146 static const int TGT_SIGHUP = 1;
147 static const int TGT_SIGINT = 2;
148 static const int TGT_SIGQUIT = 3;
149 static const int TGT_SIGILL = 4;
150 static const int TGT_SIGTRAP = 5;
151 static const int TGT_SIGABRT = 6;
152 static const int TGT_SIGIOT = 6;
153 static const int TGT_SIGEMT = 7;
154 static const int TGT_SIGFPE = 8;
155 static const int TGT_SIGKILL = 9;
156 static const int TGT_SIGBUS = 10;
157 static const int TGT_SIGSEGV = 11;
158 static const int TGT_SIGSYS = 12;
159 static const int TGT_SIGPIPE = 13;
160 static const int TGT_SIGALRM = 14;
161 static const int TGT_SIGTERM = 15;
162 static const int TGT_SIGURG = 16;
163 static const int TGT_SIGSTOP = 17;
164 static const int TGT_SIGTSTP = 18;
165 static const int TGT_SIGCONT = 19;
166 static const int TGT_SIGCHLD = 20;
167 static const int TGT_SIGCLD = 20;
168 static const int TGT_SIGTTIN = 21;
169 static const int TGT_SIGTTOU = 22;
170 static const int TGT_SIGPOLL = 23;
171 static const int TGT_SIGIO = 23;
172 static const int TGT_SIGXCPU = 24;
173 static const int TGT_SIGXFSZ = 25;
174 static const int TGT_SIGVTALRM = 26;
175 static const int TGT_SIGPROF = 27;
176 static const int TGT_SIGWINCH = 28;
177 static const int TGT_SIGLOST = 29;
178 static const int TGT_SIGPWR = 29;
179 static const int TGT_SIGUSR1 = 30;
180 static const int TGT_SIGUSR2 = 31;
181
183
184 static constexpr int TGT_O_RDONLY = 0x000000;
185 static constexpr int TGT_O_WRONLY = 0x000001;
186 static constexpr int TGT_O_RDWR = 0x000002;
187 static constexpr int TGT_O_CREAT = 0x000040;
188 static constexpr int TGT_O_EXCL = 0x000080;
189 static constexpr int TGT_O_NOCTTY = 0x000100;
190 static constexpr int TGT_O_TRUNC = 0x000200;
191 static constexpr int TGT_O_APPEND = 0x000400;
192 static constexpr int TGT_O_NONBLOCK = 0x000800;
193 static constexpr int TGT_O_SYNC = 0x101000;
194 static constexpr int TGT_FSYNC = 0x001000;
195 static constexpr int TGT_FASYNC = 0x002000;
196 // The following are not present in riscv64-unknown-elf <fcntl.h>
197 static constexpr int TGT_O_DSYNC = 0x001000;
198 static constexpr int TGT_O_CLOEXEC = 0x080000;
199 static constexpr int TGT_O_NOINHERIT = 0x040000;
200 static constexpr int TGT_O_DIRECT = 0x004000;
201 static constexpr int TGT_O_NOFOLLOW = 0x020000;
202 static constexpr int TGT_O_DIRECTORY = 0x010000;
203 // The following are not defined by riscv64-unknown-elf
204 static constexpr int TGT_O_LARGEFILE = 0x000000;
205 static constexpr int TGT_O_NOATIME = 0x040000;
206 static constexpr int TGT_O_PATH = 0x200000;
208
209 // Only defined in riscv-unknown-elf for proxy kernel and not linux kernel
210 static constexpr unsigned TGT_MAP_SHARED = 0x0001;
211 static constexpr unsigned TGT_MAP_PRIVATE = 0x0002;
212 static constexpr unsigned TGT_MAP_FIXED = 0x0010;
213 static constexpr unsigned TGT_MAP_ANONYMOUS = 0x0020;
214 static constexpr unsigned TGT_MAP_POPULATE = 0x1000;
215 static constexpr unsigned TGT_MREMAP_FIXED = 0x0020;
216
217 typedef int64_t time_t;
218 typedef uint64_t dev_t;
219 typedef uint64_t ino_t;
220 typedef uint32_t mode_t;
221 typedef uint32_t nlink_t;
222 typedef uint32_t uid_t;
223 typedef uint32_t gid_t;
224 typedef int64_t off_t;
225 typedef uint64_t blksize_t;
226 typedef uint64_t blkcnt_t;
227
228 struct timespec
229 {
231 int64_t tv_nsec;
232 };
233
255
257 {
258 int32_t val[2];
259 };
260
262 {
263 uint64_t f_type;
264 uint64_t f_bsize;
265 uint64_t f_blocks;
266 uint64_t f_bfree;
267 uint64_t f_bavail;
268 uint64_t f_files;
269 uint64_t f_ffree;
271 uint64_t f_namelen;
272 uint64_t f_frsize;
273 uint64_t f_flags;
274 uint64_t f_spare[4];
275 };
276
278 {
279 int64_t uptime;
280 uint64_t loads[3];
281 uint64_t totalram;
282 uint64_t freeram;
283 uint64_t sharedram;
284 uint64_t bufferram;
285 uint64_t totalswap;
286 uint64_t freeswap;
287 uint16_t procs;
288 uint16_t pad;
289 uint64_t totalhigh;
290 uint64_t freehigh;
291 uint32_t mem_unit;
292 };
293
295 {
296 uint64_t flags;
297 uint64_t pidfd;
298 uint64_t child_tid;
299 uint64_t parent_tid;
300 uint64_t exit_signal;
301 uint64_t stack;
302 uint64_t stack_size;
303 uint64_t tls;
304 uint64_t set_tid;
305 uint64_t set_tid_size;
306 uint64_t cgroup;
307 };
308
309 static void
310 archClone(uint64_t flags,
311 Process *pp, Process *cp,
313 uint64_t stack, uint64_t tls)
314 {
315 ctc->getIsaPtr()->copyRegsFrom(ptc);
318 if (stack)
320 }
321};
322
323class RiscvLinux32 : public RiscvLinux, public OpenFlagTable<RiscvLinux32>
324{
325 public:
326 static const int TGT_SIGHUP = 1;
327 static const int TGT_SIGINT = 2;
328 static const int TGT_SIGQUIT = 3;
329 static const int TGT_SIGILL = 4;
330 static const int TGT_SIGTRAP = 5;
331 static const int TGT_SIGABRT = 6;
332 static const int TGT_SIGIOT = 6;
333 static const int TGT_SIGEMT = 7;
334 static const int TGT_SIGFPE = 8;
335 static const int TGT_SIGKILL = 9;
336 static const int TGT_SIGBUS = 10;
337 static const int TGT_SIGSEGV = 11;
338 static const int TGT_SIGSYS = 12;
339 static const int TGT_SIGPIPE = 13;
340 static const int TGT_SIGALRM = 14;
341 static const int TGT_SIGTERM = 15;
342 static const int TGT_SIGURG = 16;
343 static const int TGT_SIGSTOP = 17;
344 static const int TGT_SIGTSTP = 18;
345 static const int TGT_SIGCONT = 19;
346 static const int TGT_SIGCHLD = 20;
347 static const int TGT_SIGCLD = 20;
348 static const int TGT_SIGTTIN = 21;
349 static const int TGT_SIGTTOU = 22;
350 static const int TGT_SIGPOLL = 23;
351 static const int TGT_SIGIO = 23;
352 static const int TGT_SIGXCPU = 24;
353 static const int TGT_SIGXFSZ = 25;
354 static const int TGT_SIGVTALRM = 26;
355 static const int TGT_SIGPROF = 27;
356 static const int TGT_SIGWINCH = 28;
357 static const int TGT_SIGLOST = 29;
358 static const int TGT_SIGPWR = 29;
359 static const int TGT_SIGUSR1 = 30;
360 static const int TGT_SIGUSR2 = 31;
361
363
364 // The following values match newlib 3.0.0.
365 // Note that glibc has different values.
366 static constexpr int TGT_O_RDONLY = 0x000000;
367 static constexpr int TGT_O_WRONLY = 0x000001;
368 static constexpr int TGT_O_RDWR = 0x000002;
369 static constexpr int TGT_O_CREAT = 0x000200;
370 static constexpr int TGT_O_EXCL = 0x000800;
371 static constexpr int TGT_O_NOCTTY = 0x008000;
372 static constexpr int TGT_O_TRUNC = 0x000400;
373 static constexpr int TGT_O_APPEND = 0x000008;
374 static constexpr int TGT_O_NONBLOCK = 0x004000;
375 static constexpr int TGT_O_SYNC = 0x002000;
376 static constexpr int TGT_FSYNC = 0x002000;
377 static constexpr int TGT_FASYNC = 0x000040;
378 // The following are not present in riscv32-unknown-elf <fcntl.h>
379 static constexpr int TGT_O_DSYNC = 0x010000;
380 static constexpr int TGT_O_CLOEXEC = 0x040000;
381 static constexpr int TGT_O_NOINHERIT = 0x040000;
382 static constexpr int TGT_O_DIRECT = 0x080000;
383 static constexpr int TGT_O_NOFOLLOW = 0x100000;
384 static constexpr int TGT_O_DIRECTORY = 0x200000;
385 // The following are not defined by riscv32-unknown-elf
386 static constexpr int TGT_O_LARGEFILE = 0x020000;
387 static constexpr int TGT_O_NOATIME = 0x800000;
388 static constexpr int TGT_O_PATH = 0x400000;
390
391 // Only defined in riscv-unknown-elf for proxy kernel and not linux kernel
392 static constexpr unsigned TGT_MAP_SHARED = 0x0001;
393 static constexpr unsigned TGT_MAP_PRIVATE = 0x0002;
394 static constexpr unsigned TGT_MAP_FIXED = 0x0010;
395 static constexpr unsigned TGT_MAP_ANONYMOUS = 0x0020;
396 static constexpr unsigned TGT_MAP_POPULATE = 0x1000;
397 static constexpr unsigned TGT_MREMAP_FIXED = 0x0020;
398
399 // Newlib 3.0.0 defaults to 64-bits for time_t.
400 // Currently time_t in glibc for riscv32 is 32-bits, but will be changed.
401 typedef int64_t time_t;
402
403 // Linux types for RV32
404 typedef uint32_t size_t;
405 typedef int64_t off_t;
406
408 struct rlimit
409 {
410 uint32_t rlim_cur;
411 uint32_t rlim_max;
412 };
413
414 struct timespec
415 {
417 int32_t tv_nsec;
418 };
419
421 {
422 int32_t val[2];
423 };
424
425 struct tgt_stat
426 {
427 uint64_t st_dev;
428 uint64_t st_ino;
429 uint32_t st_mode;
430 uint32_t st_nlink;
431 uint32_t st_uid;
432 uint32_t st_gid;
433 uint64_t st_rdev;
434 uint64_t __pad1;
435 int64_t st_size;
436 int32_t st_blksize;
437 int32_t __pad2;
438 int64_t st_blocks;
445 int32_t __unused4;
446 int32_t __unused5;
447 };
448
450 {
451 uint32_t f_type;
452 uint32_t f_bsize;
453 uint32_t f_blocks;
454 uint32_t f_bfree;
455 uint32_t f_bavail;
456 uint32_t f_files;
457 uint32_t f_ffree;
459 uint32_t f_namelen;
460 uint32_t f_frsize;
461 uint32_t f_flags;
462 uint32_t f_spare[4];
463 };
464
466 {
467 int32_t uptime;
468 uint32_t loads[3];
469 uint32_t totalram;
470 uint32_t freeram;
471 uint32_t sharedram;
472 uint32_t bufferram;
473 uint32_t totalswap;
474 uint32_t freeswap;
475 uint16_t procs;
476 uint16_t pad;
477 uint32_t totalhigh;
478 uint32_t freehigh;
479 uint32_t mem_unit;
480 };
481
482 static void
483 archClone(uint64_t flags,
484 Process *pp, Process *cp,
486 uint64_t stack, uint64_t tls)
487 {
488 ctc->getIsaPtr()->copyRegsFrom(ptc);
490 ctc->setReg(RiscvISA::ThreadPointerReg, sext<32>(tls));
491 if (stack)
492 ctc->setReg(RiscvISA::StackPointerReg, sext<32>(stack));
493 }
494};
495
496} // namespace gem5
497
498#endif
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
Static instruction class for unknown (illegal) instructions.
Definition unknown.hh:53
static const int TGT_SIGWINCH
Definition linux.hh:356
static const int TGT_SIGCHLD
Definition linux.hh:346
static const int TGT_SIGIOT
Definition linux.hh:332
static const int TGT_SIGSEGV
Definition linux.hh:337
static constexpr int TGT_O_CLOEXEC
O_CLOEXEC.
Definition linux.hh:380
static const int TGT_SIGURG
Definition linux.hh:342
static const int TGT_SIGCONT
Definition linux.hh:345
static const int TGT_SIGCLD
Definition linux.hh:347
static constexpr int TGT_O_NOFOLLOW
O_NOFOLLOW.
Definition linux.hh:383
static constexpr int TGT_O_RDONLY
open(2) flag values.
Definition linux.hh:366
static const int TGT_SIGBUS
Definition linux.hh:336
static const int TGT_SIGXFSZ
Definition linux.hh:353
static constexpr unsigned TGT_MAP_ANONYMOUS
Definition linux.hh:395
static constexpr int TGT_O_RDWR
O_RDWR.
Definition linux.hh:368
static const int TGT_SIGKILL
Definition linux.hh:335
static const int TGT_SIGINT
Definition linux.hh:327
static void archClone(uint64_t flags, Process *pp, Process *cp, ThreadContext *ptc, ThreadContext *ctc, uint64_t stack, uint64_t tls)
Definition linux.hh:483
static const int TGT_SIGUSR2
Definition linux.hh:360
static const int TGT_SIGTTIN
Definition linux.hh:348
static const int TGT_SIGTSTP
Definition linux.hh:344
static constexpr int TGT_FASYNC
FASYNC.
Definition linux.hh:377
static constexpr unsigned TGT_MAP_SHARED
Definition linux.hh:392
static const int TGT_SIGILL
Definition linux.hh:329
static const int TGT_SIGHUP
Definition linux.hh:326
static const int TGT_SIGTERM
Definition linux.hh:341
static constexpr unsigned TGT_MAP_FIXED
Definition linux.hh:394
static constexpr int TGT_O_DSYNC
O_DSYNC.
Definition linux.hh:379
static constexpr int TGT_O_EXCL
O_EXCL.
Definition linux.hh:370
static const int TGT_SIGXCPU
Definition linux.hh:352
static constexpr int TGT_O_NONBLOCK
O_NONBLOCK.
Definition linux.hh:374
static constexpr int TGT_O_APPEND
O_APPEND.
Definition linux.hh:373
static constexpr int TGT_FSYNC
FSYNC.
Definition linux.hh:376
static const int TGT_SIGPROF
Definition linux.hh:355
static constexpr unsigned TGT_MREMAP_FIXED
Definition linux.hh:397
static const int TGT_SIGQUIT
Definition linux.hh:328
static constexpr int TGT_O_SYNC
O_SYNC.
Definition linux.hh:375
static const int TGT_SIGEMT
Definition linux.hh:333
static const int TGT_SIGSTOP
Definition linux.hh:343
static const int TGT_SIGLOST
Definition linux.hh:357
static constexpr int TGT_O_CREAT
O_CREAT.
Definition linux.hh:369
static const int TGT_SIGIO
Definition linux.hh:351
static constexpr int TGT_O_PATH
O_PATH.
Definition linux.hh:388
static const int TGT_SIGALRM
Definition linux.hh:340
static const int TGT_SIGPIPE
Definition linux.hh:339
static const int TGT_SIGSYS
Definition linux.hh:338
static constexpr unsigned TGT_MAP_POPULATE
Definition linux.hh:396
static constexpr int TGT_O_NOCTTY
O_NOCTTY.
Definition linux.hh:371
static constexpr int TGT_O_LARGEFILE
O_LARGEFILE.
Definition linux.hh:386
static const int TGT_SIGVTALRM
Definition linux.hh:354
static const int TGT_SIGPWR
Definition linux.hh:358
static constexpr int TGT_O_DIRECTORY
O_DIRECTORY.
Definition linux.hh:384
static const int TGT_SIGTTOU
Definition linux.hh:349
static const int TGT_SIGFPE
Definition linux.hh:334
static constexpr int TGT_O_NOINHERIT
O_NOINHERIT.
Definition linux.hh:381
static const int TGT_SIGUSR1
Definition linux.hh:359
static constexpr unsigned TGT_MAP_PRIVATE
Definition linux.hh:393
static const int TGT_SIGABRT
Definition linux.hh:331
static constexpr int TGT_O_WRONLY
O_WRONLY.
Definition linux.hh:367
static const int TGT_SIGTRAP
Definition linux.hh:330
static constexpr int TGT_O_TRUNC
O_TRUNC.
Definition linux.hh:372
static const int TGT_SIGPOLL
Definition linux.hh:350
static constexpr int TGT_O_NOATIME
O_NOATIME.
Definition linux.hh:387
uint32_t size_t
Definition linux.hh:404
static constexpr int TGT_O_DIRECT
O_DIRECT.
Definition linux.hh:382
static const int TGT_SIGPIPE
Definition linux.hh:159
static const int TGT_SIGABRT
Definition linux.hh:151
static const int TGT_SIGSYS
Definition linux.hh:158
static constexpr unsigned TGT_MAP_SHARED
Definition linux.hh:210
static const int TGT_SIGSTOP
Definition linux.hh:163
static constexpr int TGT_O_RDONLY
open(2) flag values.
Definition linux.hh:184
static const int TGT_SIGURG
Definition linux.hh:162
static const int TGT_SIGWINCH
Definition linux.hh:176
uint64_t dev_t
Definition linux.hh:218
static constexpr int TGT_O_NOCTTY
O_NOCTTY.
Definition linux.hh:189
static const int TGT_SIGUSR1
Definition linux.hh:179
static const int TGT_SIGPWR
Definition linux.hh:178
static const int TGT_SIGKILL
Definition linux.hh:155
static constexpr int TGT_O_APPEND
O_APPEND.
Definition linux.hh:191
static const int TGT_SIGXCPU
Definition linux.hh:172
static const int TGT_SIGPOLL
Definition linux.hh:170
static const int TGT_SIGUSR2
Definition linux.hh:180
static constexpr unsigned TGT_MAP_PRIVATE
Definition linux.hh:211
static const int TGT_SIGCONT
Definition linux.hh:165
static void archClone(uint64_t flags, Process *pp, Process *cp, ThreadContext *ptc, ThreadContext *ctc, uint64_t stack, uint64_t tls)
Definition linux.hh:310
static const int TGT_SIGCLD
Definition linux.hh:167
static const int TGT_SIGHUP
Definition linux.hh:146
static constexpr unsigned TGT_MREMAP_FIXED
Definition linux.hh:215
static const int TGT_SIGILL
Definition linux.hh:149
static const int TGT_SIGFPE
Definition linux.hh:154
static constexpr int TGT_O_DIRECTORY
O_DIRECTORY.
Definition linux.hh:202
static constexpr int TGT_O_TRUNC
O_TRUNC.
Definition linux.hh:190
static constexpr unsigned TGT_MAP_POPULATE
Definition linux.hh:214
static constexpr int TGT_FASYNC
FASYNC.
Definition linux.hh:195
static const int TGT_SIGTTIN
Definition linux.hh:168
static constexpr int TGT_O_DSYNC
O_DSYNC.
Definition linux.hh:197
static constexpr int TGT_O_SYNC
O_SYNC.
Definition linux.hh:193
static constexpr int TGT_O_NONBLOCK
O_NONBLOCK.
Definition linux.hh:192
static const int TGT_SIGLOST
Definition linux.hh:177
static const int TGT_SIGVTALRM
Definition linux.hh:174
uint32_t mode_t
Definition linux.hh:220
uint32_t uid_t
Definition linux.hh:222
static constexpr int TGT_O_EXCL
O_EXCL.
Definition linux.hh:188
static const int TGT_SIGALRM
Definition linux.hh:160
static const int TGT_SIGIOT
Definition linux.hh:152
static constexpr int TGT_O_PATH
O_PATH.
Definition linux.hh:206
static constexpr int TGT_O_CREAT
O_CREAT.
Definition linux.hh:187
uint64_t blkcnt_t
Definition linux.hh:226
static const int TGT_SIGINT
Definition linux.hh:147
static const int TGT_SIGCHLD
Definition linux.hh:166
static constexpr unsigned TGT_MAP_FIXED
Definition linux.hh:212
static constexpr unsigned TGT_MAP_ANONYMOUS
Definition linux.hh:213
uint64_t blksize_t
Definition linux.hh:225
static const int TGT_SIGTSTP
Definition linux.hh:164
static constexpr int TGT_O_DIRECT
O_DIRECT.
Definition linux.hh:200
static constexpr int TGT_O_NOFOLLOW
O_NOFOLLOW.
Definition linux.hh:201
static const int TGT_SIGBUS
Definition linux.hh:156
static const int TGT_SIGTTOU
Definition linux.hh:169
uint32_t nlink_t
Definition linux.hh:221
static const int TGT_SIGIO
Definition linux.hh:171
static constexpr int TGT_O_NOINHERIT
O_NOINHERIT.
Definition linux.hh:199
static constexpr int TGT_O_NOATIME
O_NOATIME.
Definition linux.hh:205
static const int TGT_SIGEMT
Definition linux.hh:153
static const int TGT_SIGTRAP
Definition linux.hh:150
static constexpr int TGT_O_RDWR
O_RDWR.
Definition linux.hh:186
static const int TGT_SIGSEGV
Definition linux.hh:157
uint32_t gid_t
Definition linux.hh:223
static constexpr int TGT_FSYNC
FSYNC.
Definition linux.hh:194
static const int TGT_SIGPROF
Definition linux.hh:175
static const int TGT_SIGQUIT
Definition linux.hh:148
static const int TGT_SIGTERM
Definition linux.hh:161
uint64_t ino_t
Definition linux.hh:219
static constexpr int TGT_O_WRONLY
O_WRONLY.
Definition linux.hh:185
static const int TGT_SIGXFSZ
Definition linux.hh:173
static constexpr int TGT_O_LARGEFILE
O_LARGEFILE.
Definition linux.hh:204
static constexpr int TGT_O_CLOEXEC
O_CLOEXEC.
Definition linux.hh:198
Bitfield< 7 > ZBC
Definition linux.hh:110
Bitfield< 14 > ZKSED
Definition linux.hh:103
Bitfield< 18 > ZVBC
Definition linux.hh:99
Bitfield< 48 > ZCMOP
Definition linux.hh:70
Bitfield< 35 > ZACAS
Definition linux.hh:83
BitUnion64(key_base_behavior_t) Bitfield< 0 > ima
Bitfield< 20 > ZVKG
Definition linux.hh:97
Bitfield< 47 > ZCF
Definition linux.hh:71
Bitfield< 22 > ZVKNHA
Definition linux.hh:95
Bitfield< 38 > ZVE32X
Definition linux.hh:80
Bitfield< 28 > ZFH
Definition linux.hh:90
Bitfield< 4 > ZBB
Definition linux.hh:113
Bitfield< 1 > C
Definition linux.hh:116
Bitfield< 45 > ZCB
Definition linux.hh:73
Bitfield< 31 > ZVFH
Definition linux.hh:87
Bitfield< 21 > ZVKNED
Definition linux.hh:96
Bitfield< 32 > ZVFHMIN
Definition linux.hh:86
EndBitUnion(key_ima_ext_0_t) enum MisalignedScalarPerf
Definition linux.hh:118
Bitfield< 26 > ZVKSH
Definition linux.hh:92
Bitfield< 46 > ZCD
Definition linux.hh:72
Bitfield< 0 > FD
Definition linux.hh:117
Bitfield< 25 > ZVKSED
Definition linux.hh:93
Bitfield< 19 > ZVKB
Definition linux.hh:98
static const ByteOrder byteOrder
Definition linux.hh:45
Bitfield< 24 > ZVKNHB
Definition linux.hh:94
Bitfield< 33 > ZFA
Definition linux.hh:85
Bitfield< 39 > ZVE32F
Definition linux.hh:79
Bitfield< 44 > ZCA
Definition linux.hh:74
struct gem5::RiscvLinux::cpumask cpumask_t
Bitfield< 37 > ZIHINTPAUSE
Definition linux.hh:81
Bitfield< 8 > ZBKB
Definition linux.hh:109
@ MisalignedScalarPerf
Definition linux.hh:58
Bitfield< 11 > ZKND
Definition linux.hh:106
Bitfield< 43 > ZIMOP
Definition linux.hh:75
Bitfield< 5 > ZBS
Definition linux.hh:112
Bitfield< 36 > ZICOND
Definition linux.hh:82
Bitfield< 30 > ZIHINTNTL
Definition linux.hh:88
Bitfield< 40 > ZVE64X
Definition linux.hh:78
Bitfield< 13 > ZKNH
Definition linux.hh:104
Bitfield< 16 > ZKT
Definition linux.hh:101
Bitfield< 9 > ZBKC
Definition linux.hh:108
Bitfield< 3 > ZBA
Definition linux.hh:114
EndBitUnion(key_base_behavior_t) BitUnion64(key_ima_ext_0_t) Bitfield< 49 > ZAWRS
Bitfield< 17 > ZVBB
Definition linux.hh:100
Bitfield< 27 > ZVKT
Definition linux.hh:91
Bitfield< 6 > ZICBOZ
Definition linux.hh:111
Bitfield< 10 > ZBKX
Definition linux.hh:107
Bitfield< 34 > ZTSO
Definition linux.hh:84
Bitfield< 41 > ZVE64F
Definition linux.hh:77
Bitfield< 15 > ZKSH
Definition linux.hh:102
Bitfield< 42 > ZVE64D
Definition linux.hh:76
Bitfield< 2 > V
Definition linux.hh:115
Bitfield< 12 > ZKNE
Definition linux.hh:105
Bitfield< 29 > ZFHMIN
Definition linux.hh:89
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual BaseISA * getIsaPtr() const =0
virtual void setReg(const RegId &reg, RegVal val)
#define BitUnion64(name)
Use this to define conveniently sized values overlayed with bitfields.
Definition bitunion.hh:494
uint8_t flags
Definition helpers.cc:87
Bitfield< 7, 0 > ptc
constexpr auto & StackPointerReg
Definition int.hh:141
constexpr auto & ThreadPointerReg
Definition int.hh:142
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:409
uint32_t rlim_cur
soft limit
Definition linux.hh:410
uint32_t rlim_max
hard limit
Definition linux.hh:411

Generated on Mon Jan 13 2025 04:28:22 for gem5 by doxygen 1.9.8