2 * Copyright (c) 2010-2019 ARM Limited
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.
14 * Copyright (c) 2009 The Regents of The University of Michigan
15 * All rights reserved.
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.
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.
41 #ifndef __ARCH_ARM_MISCREGS_TYPES_HH__
42 #define __ARCH_ARM_MISCREGS_TYPES_HH__
44 #include "base/bitunion.hh"
56 Bitfield<21> ss; // AArch64
57 Bitfield<20> il; // AArch64
60 Bitfield<9> d; // AArch64
66 Bitfield<9, 6> daif; // AArch64
68 Bitfield<4> width; // AArch64
69 Bitfield<3, 2> el; // AArch64
71 Bitfield<0> sp; // AArch64
75 Bitfield<43, 40> tracefilt;
76 Bitfield<39, 36> doublelock;
77 Bitfield<35, 32> pmsver;
78 Bitfield<31, 28> ctx_cmps;
79 Bitfield<23, 20> wrps;
80 Bitfield<15, 12> brps;
81 Bitfield<11, 8> pmuver;
82 Bitfield<7, 4> tracever;
83 Bitfield<3, 0> debugver;
87 Bitfield<63, 60> rndr;
94 Bitfield<35, 32> sha3;
96 Bitfield<23, 20> atomic;
97 Bitfield<19, 16> crc32;
98 Bitfield<15, 12> sha2;
101 EndBitUnion(AA64ISAR0)
103 BitUnion64(AA64ISAR1)
104 Bitfield<43, 40> specres;
106 Bitfield<35, 32> frintts;
107 Bitfield<31, 28> gpi;
108 Bitfield<27, 24> gpa;
109 Bitfield<23, 20> lrcpc;
110 Bitfield<19, 16> fcma;
111 Bitfield<15, 12> jscvt;
115 EndBitUnion(AA64ISAR1)
117 BitUnion64(AA64MMFR0)
118 Bitfield<47, 44> exs;
119 Bitfield<43, 40> tgran4_2;
120 Bitfield<39, 36> tgran64_2;
121 Bitfield<35, 32> tgran16_2;
122 Bitfield<31, 28> tgran4;
123 Bitfield<27, 24> tgran64;
124 Bitfield<23, 20> tgran16;
125 Bitfield<19, 16> bigendEL0;
126 Bitfield<15, 12> snsmem;
127 Bitfield<11, 8> bigend;
128 Bitfield<7, 4> asidbits;
129 Bitfield<3, 0> parange;
130 EndBitUnion(AA64MMFR0)
132 BitUnion64(AA64MMFR1)
133 Bitfield<31, 28> xnx;
134 Bitfield<27, 24> specsei;
135 Bitfield<23, 20> pan;
137 Bitfield<15, 12> hpds;
139 Bitfield<7, 4> vmidbits;
140 Bitfield<3, 0> hafdbs;
141 EndBitUnion(AA64MMFR1)
143 BitUnion64(AA64MMFR2)
144 Bitfield<63, 60> e0pd;
145 Bitfield<59, 56> evt;
146 Bitfield<55, 52> bbm;
147 Bitfield<51, 48> ttl;
148 Bitfield<43, 40> fwb;
149 Bitfield<39, 36> ids;
153 Bitfield<23, 20> ccidx;
154 Bitfield<19, 16> varange;
155 Bitfield<15, 12> iesb;
159 EndBitUnion(AA64MMFR2)
162 Bitfield<63, 60> csv3;
163 Bitfield<59, 56> csv2;
164 Bitfield<51, 48> dit;
165 Bitfield<47, 44> amu;
166 Bitfield<43, 40> mpam;
167 Bitfield<39, 36> sel2;
168 Bitfield<35, 32> sve;
169 Bitfield<31, 28> ras;
170 Bitfield<27, 24> gic;
171 Bitfield<23, 20> advsimd;
173 Bitfield<15, 12> el3;
177 EndBitUnion(AA64PFR0)
198 Bitfield<10> tfp; // AArch64
201 Bitfield<8> tz; // SVE
241 Bitfield<38> miocnce;
245 Bitfield<34> e2h; // AArch64
248 Bitfield<31> rw; // AArch64
249 Bitfield<30> trvm; // AArch64
250 Bitfield<29> hcd; // AArch64
251 Bitfield<28> tdz; // AArch64
259 Bitfield<21> tacr; // AArch64
269 Bitfield<11, 10> bsu;
272 Bitfield<8> vse; // AArch64
284 Bitfield<20> nstrcdis;
286 Bitfield<15> nsasedis;
287 Bitfield<14> nsd32dis;
308 Bitfield<18> eel2; // AArch64 (Armv8.4-SecEL2)
315 Bitfield<11> st; // AArch64
316 Bitfield<10> rw; // AArch64
320 Bitfield<7> smd; // AArch64
331 Bitfield<31> enia; // ARMv8.3 PAuth
332 Bitfield<30> enib; // ARMv8.3 PAuth
333 Bitfield<30> te; // Thumb Exception Enable (AArch32 only)
334 Bitfield<29> afe; // Access flag enable (AArch32 only)
335 Bitfield<28> tre; // TEX remap enable (AArch32 only)
336 Bitfield<27> nmfi; // Non-maskable FIQ support (ARMv7 only)
337 Bitfield<27> enda; // ARMv8.3 PAuth
338 Bitfield<26> uci; // Enable EL0 access to DC CVAU, DC CIVAC,
339 // DC CVAC and IC IVAU instructions
340 // (AArch64 SCTLR_EL1 only)
341 Bitfield<25> ee; // Exception Endianness
342 Bitfield<24> e0e; // Endianness of explicit data accesses at EL0
343 // (AArch64 SCTLR_EL1 only)
344 Bitfield<23> span; // Set Priviledge Access Never on taking
346 Bitfield<23> xp; // Extended page table enable (dropped in ARMv7)
347 Bitfield<22> u; // Alignment (dropped in ARMv7)
348 Bitfield<21> fi; // Fast interrupts configuration enable
350 Bitfield<20> uwxn; // Unprivileged write permission implies EL1 XN
352 Bitfield<19> dz; // Divide by Zero fault enable
353 // (dropped in ARMv7)
354 Bitfield<19> wxn; // Write permission implies XN
355 Bitfield<18> ntwe; // Not trap WFE
356 // (ARMv8 AArch32 and AArch64 SCTLR_EL1 only)
357 Bitfield<18> rao2; // Read as one
358 Bitfield<16> ntwi; // Not trap WFI
359 // (ARMv8 AArch32 and AArch64 SCTLR_EL1 only)
360 Bitfield<16> rao3; // Read as one
361 Bitfield<15> uct; // Enable EL0 access to CTR_EL0
362 // (AArch64 SCTLR_EL1 only)
363 Bitfield<14> rr; // Round Robin select (ARMv7 only)
364 Bitfield<14> dze; // Enable EL0 access to DC ZVA
365 // (AArch64 SCTLR_EL1 only)
366 Bitfield<13> v; // Vectors bit (AArch32 only)
367 Bitfield<13> endb; // ARMv8.3 PAuth
368 Bitfield<12> i; // Instruction cache enable
369 Bitfield<11> z; // Branch prediction enable (ARMv7 only)
370 Bitfield<10> sw; // SWP/SWPB enable (ARMv7 only)
371 Bitfield<9, 8> rs; // Deprecated protection bits (dropped in ARMv7)
372 Bitfield<9> uma; // User mask access (AArch64 SCTLR_EL1 only)
373 Bitfield<8> sed; // SETEND disable
374 // (ARMv8 AArch32 and AArch64 SCTLR_EL1 only)
375 Bitfield<7> b; // Endianness support (dropped in ARMv7)
376 Bitfield<7> itd; // IT disable
377 // (ARMv8 AArch32 and AArch64 SCTLR_EL1 only)
378 Bitfield<6, 3> rao4; // Read as one
379 Bitfield<6> thee; // ThumbEE enable
380 // (ARMv8 AArch32 and AArch64 SCTLR_EL1 only)
381 Bitfield<5> cp15ben; // CP15 barrier enable
382 // (AArch32 and AArch64 SCTLR_EL1 only)
383 Bitfield<4> sa0; // Stack Alignment Check Enable for EL0
384 // (AArch64 SCTLR_EL1 only)
385 Bitfield<3> sa; // Stack Alignment Check Enable (AArch64 only)
386 Bitfield<2> c; // Cache enable
387 Bitfield<1> a; // Alignment check enable
388 Bitfield<0> m; // MMU enable
397 Bitfield<11, 10> cp5;
398 Bitfield<13, 12> cp6;
399 Bitfield<15, 14> cp7;
400 Bitfield<17, 16> cp8;
401 Bitfield<17, 16> zen; // SVE
402 Bitfield<19, 18> cp9;
403 Bitfield<21, 20> cp10;
404 Bitfield<21, 20> fpen; // AArch64
405 Bitfield<23, 22> cp11;
406 Bitfield<25, 24> cp12;
407 Bitfield<27, 26> cp13;
408 Bitfield<29, 28> rsvd;
409 Bitfield<28> tta; // AArch64
415 Bitfield<3, 0> fsLow;
416 Bitfield<5, 0> status; // LPAE
417 Bitfield<7, 4> domain;
422 Bitfield<13> cm; // LPAE
438 Bitfield<18, 16> len;
440 Bitfield<21, 20> stride;
441 Bitfield<23, 22> rMode;
455 Bitfield<29, 0> subArchDefined;
459 Bitfield<3, 0> advSimdRegisters;
460 Bitfield<7, 4> singlePrecision;
461 Bitfield<11, 8> doublePrecision;
462 Bitfield<15, 12> vfpExceptionTrapping;
463 Bitfield<19, 16> divide;
464 Bitfield<23, 20> squareRoot;
465 Bitfield<27, 24> shortVectors;
466 Bitfield<31, 28> roundingModes;
470 Bitfield<3, 0> flushToZero;
471 Bitfield<7, 4> defaultNaN;
472 Bitfield<11, 8> advSimdLoadStore;
473 Bitfield<15, 12> advSimdInteger;
474 Bitfield<19, 16> advSimdSinglePrecision;
475 Bitfield<23, 20> advSimdHalfPrecision;
476 Bitfield<27, 24> vfpHalfPrecision;
477 Bitfield<31, 28> raz;
481 // Short-descriptor translation table format
485 // Long-descriptor translation table format
489 Bitfield<9, 8> irgn0;
490 Bitfield<11, 10> orgn0;
491 Bitfield<13, 12> sh0;
493 Bitfield<18, 16> t1sz;
496 Bitfield<25, 24> irgn1;
497 Bitfield<27, 26> orgn1;
498 Bitfield<29, 28> sh1;
500 Bitfield<34, 32> ips;
506 // TCR_EL2/3 (AArch64)
513 // Fields of TCR_EL{1,2,3} (mostly overlapping)
514 // TCR_EL1 is natively 64 bits, the others are 32 bits
517 Bitfield<7> epd0; // EL1
518 Bitfield<9, 8> irgn0;
519 Bitfield<11, 10> orgn0;
520 Bitfield<13, 12> sh0;
521 Bitfield<15, 14> tg0;
523 Bitfield<20> tbi; // EL2/EL3
524 Bitfield<21, 16> t1sz; // EL1
525 Bitfield<22> a1; // EL1
526 Bitfield<23> epd1; // EL1
527 Bitfield<24> hpd; // EL2/EL3, E2H=0
528 Bitfield<25, 24> irgn1; // EL1
529 Bitfield<27, 26> orgn1; // EL1
530 Bitfield<29, 28> sh1; // EL1
531 Bitfield<29> tbid; // EL2
532 Bitfield<31, 30> tg1; // EL1
533 Bitfield<34, 32> ips; // EL1
534 Bitfield<36> as; // EL1
535 Bitfield<37> tbi0; // EL1
536 Bitfield<38> tbi1; // EL1
541 Bitfield<51> tbid0; // EL1
542 Bitfield<52> tbid1; // EL1
547 Bitfield<9, 8> irgn0;
548 Bitfield<11, 10> orgn0;
549 Bitfield<13, 12> sh0;
556 Bitfield<5, 0> t0sz64;
558 Bitfield<9, 8> irgn0;
559 Bitfield<11, 10> orgn0;
560 Bitfield<13, 12> sh0;
561 Bitfield<15, 14> tg0;
562 Bitfield<18, 16> ps; // Only defined for VTCR_EL2
563 Bitfield<21> ha; // Only defined for VTCR_EL2
564 Bitfield<22> hd; // Only defined for VTCR_EL2
609 BitUnion32(CONTEXTIDR)
611 Bitfield<31,8> procid;
612 EndBitUnion(CONTEXTIDR)
615 Bitfield<2,0> sataRAMLatency;
616 Bitfield<4,3> reserved_4_3;
617 Bitfield<5> dataRAMSetup;
618 Bitfield<8,6> tagRAMLatency;
619 Bitfield<9> tagRAMSetup;
620 Bitfield<11,10> dataRAMSlice;
621 Bitfield<12> tagRAMSlice;
622 Bitfield<20,13> reserved_20_13;
623 Bitfield<21> eccandParityEnable;
624 Bitfield<22> reserved_22;
625 Bitfield<23> interptCtrlPresent;
626 Bitfield<25,24> numCPUs;
627 Bitfield<30,26> reserved_30_26;
628 Bitfield<31> l2rstDISABLE_monitor;
632 Bitfield<3,0> iCacheLineSize;
633 Bitfield<13,4> raz_13_4;
634 Bitfield<15,14> l1IndexPolicy;
635 Bitfield<19,16> dCacheLineSize;
639 Bitfield<31,29> format;
648 Bitfield<63, 56> attr;
659 Bitfield<15, 0> imm16;
665 Bitfield<13, 12> res1_13_12_el2;
667 Bitfield<9> res1_9_el2;
668 Bitfield<8> res1_8_el2;
669 Bitfield<8> ez; // SVE (CPTR_EL3)
670 Bitfield<8> tz; // SVE (CPTR_EL2)
671 Bitfield<7, 0> res1_7_0_el2;
680 #endif // __ARCH_ARM_MISCREGS_TYPES_HH__