2 * Copyright (c) 2010-2020 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<63, 60> ecv;
119 Bitfield<47, 44> exs;
120 Bitfield<43, 40> tgran4_2;
121 Bitfield<39, 36> tgran64_2;
122 Bitfield<35, 32> tgran16_2;
123 Bitfield<31, 28> tgran4;
124 Bitfield<27, 24> tgran64;
125 Bitfield<23, 20> tgran16;
126 Bitfield<19, 16> bigendEL0;
127 Bitfield<15, 12> snsmem;
128 Bitfield<11, 8> bigend;
129 Bitfield<7, 4> asidbits;
130 Bitfield<3, 0> parange;
131 EndBitUnion(AA64MMFR0)
133 BitUnion64(AA64MMFR1)
134 Bitfield<31, 28> xnx;
135 Bitfield<27, 24> specsei;
136 Bitfield<23, 20> pan;
138 Bitfield<15, 12> hpds;
140 Bitfield<7, 4> vmidbits;
141 Bitfield<3, 0> hafdbs;
142 EndBitUnion(AA64MMFR1)
144 BitUnion64(AA64MMFR2)
145 Bitfield<63, 60> e0pd;
146 Bitfield<59, 56> evt;
147 Bitfield<55, 52> bbm;
148 Bitfield<51, 48> ttl;
149 Bitfield<43, 40> fwb;
150 Bitfield<39, 36> ids;
154 Bitfield<23, 20> ccidx;
155 Bitfield<19, 16> varange;
156 Bitfield<15, 12> iesb;
160 EndBitUnion(AA64MMFR2)
163 Bitfield<63, 60> csv3;
164 Bitfield<59, 56> csv2;
165 Bitfield<51, 48> dit;
166 Bitfield<47, 44> amu;
167 Bitfield<43, 40> mpam;
168 Bitfield<39, 36> sel2;
169 Bitfield<35, 32> sve;
170 Bitfield<31, 28> ras;
171 Bitfield<27, 24> gic;
172 Bitfield<23, 20> advsimd;
174 Bitfield<15, 12> el3;
178 EndBitUnion(AA64PFR0)
199 Bitfield<10> tfp; // AArch64
202 Bitfield<8> tz; // SVE
242 Bitfield<38> miocnce;
246 Bitfield<34> e2h; // AArch64
249 Bitfield<31> rw; // AArch64
250 Bitfield<30> trvm; // AArch64
251 Bitfield<29> hcd; // AArch64
252 Bitfield<28> tdz; // AArch64
260 Bitfield<21> tacr; // AArch64
270 Bitfield<11, 10> bsu;
273 Bitfield<8> vse; // AArch64
285 Bitfield<20> nstrcdis;
287 Bitfield<15> nsasedis;
288 Bitfield<14> nsd32dis;
309 Bitfield<18> eel2; // AArch64 (Armv8.4-SecEL2)
316 Bitfield<11> st; // AArch64
317 Bitfield<10> rw; // AArch64
321 Bitfield<7> smd; // AArch64
332 Bitfield<31> enia; // ARMv8.3 PAuth
333 Bitfield<30> enib; // ARMv8.3 PAuth
334 Bitfield<30> te; // Thumb Exception Enable (AArch32 only)
335 Bitfield<29> afe; // Access flag enable (AArch32 only)
336 Bitfield<28> tre; // TEX remap enable (AArch32 only)
337 Bitfield<27> nmfi; // Non-maskable FIQ support (ARMv7 only)
338 Bitfield<27> enda; // ARMv8.3 PAuth
339 Bitfield<26> uci; // Enable EL0 access to DC CVAU, DC CIVAC,
340 // DC CVAC and IC IVAU instructions
341 // (AArch64 SCTLR_EL1 only)
342 Bitfield<25> ee; // Exception Endianness
343 Bitfield<24> e0e; // Endianness of explicit data accesses at EL0
344 // (AArch64 SCTLR_EL1 only)
345 Bitfield<23> span; // Set Priviledge Access Never on taking
347 Bitfield<23> xp; // Extended page table enable (dropped in ARMv7)
348 Bitfield<22> u; // Alignment (dropped in ARMv7)
349 Bitfield<21> fi; // Fast interrupts configuration enable
351 Bitfield<20> uwxn; // Unprivileged write permission implies EL1 XN
353 Bitfield<19> dz; // Divide by Zero fault enable
354 // (dropped in ARMv7)
355 Bitfield<19> wxn; // Write permission implies XN
356 Bitfield<18> ntwe; // Not trap WFE
357 // (ARMv8 AArch32 and AArch64 SCTLR_EL1 only)
358 Bitfield<18> rao2; // Read as one
359 Bitfield<16> ntwi; // Not trap WFI
360 // (ARMv8 AArch32 and AArch64 SCTLR_EL1 only)
361 Bitfield<16> rao3; // Read as one
362 Bitfield<15> uct; // Enable EL0 access to CTR_EL0
363 // (AArch64 SCTLR_EL1 only)
364 Bitfield<14> rr; // Round Robin select (ARMv7 only)
365 Bitfield<14> dze; // Enable EL0 access to DC ZVA
366 // (AArch64 SCTLR_EL1 only)
367 Bitfield<13> v; // Vectors bit (AArch32 only)
368 Bitfield<13> endb; // ARMv8.3 PAuth
369 Bitfield<12> i; // Instruction cache enable
370 Bitfield<11> z; // Branch prediction enable (ARMv7 only)
371 Bitfield<10> sw; // SWP/SWPB enable (ARMv7 only)
372 Bitfield<9, 8> rs; // Deprecated protection bits (dropped in ARMv7)
373 Bitfield<9> uma; // User mask access (AArch64 SCTLR_EL1 only)
374 Bitfield<8> sed; // SETEND disable
375 // (ARMv8 AArch32 and AArch64 SCTLR_EL1 only)
376 Bitfield<7> b; // Endianness support (dropped in ARMv7)
377 Bitfield<7> itd; // IT disable
378 // (ARMv8 AArch32 and AArch64 SCTLR_EL1 only)
379 Bitfield<6, 3> rao4; // Read as one
380 Bitfield<6> thee; // ThumbEE enable
381 // (ARMv8 AArch32 and AArch64 SCTLR_EL1 only)
382 Bitfield<5> cp15ben; // CP15 barrier enable
383 // (AArch32 and AArch64 SCTLR_EL1 only)
384 Bitfield<4> sa0; // Stack Alignment Check Enable for EL0
385 // (AArch64 SCTLR_EL1 only)
386 Bitfield<3> sa; // Stack Alignment Check Enable (AArch64 only)
387 Bitfield<2> c; // Cache enable
388 Bitfield<1> a; // Alignment check enable
389 Bitfield<0> m; // MMU enable
398 Bitfield<11, 10> cp5;
399 Bitfield<13, 12> cp6;
400 Bitfield<15, 14> cp7;
401 Bitfield<17, 16> cp8;
402 Bitfield<17, 16> zen; // SVE
403 Bitfield<19, 18> cp9;
404 Bitfield<21, 20> cp10;
405 Bitfield<21, 20> fpen; // AArch64
406 Bitfield<23, 22> cp11;
407 Bitfield<25, 24> cp12;
408 Bitfield<27, 26> cp13;
409 Bitfield<29, 28> rsvd;
410 Bitfield<28> tta; // AArch64
416 Bitfield<3, 0> fsLow;
417 Bitfield<5, 0> status; // LPAE
418 Bitfield<7, 4> domain;
423 Bitfield<13> cm; // LPAE
439 Bitfield<18, 16> len;
441 Bitfield<21, 20> stride;
442 Bitfield<23, 22> rMode;
456 Bitfield<29, 0> subArchDefined;
460 Bitfield<3, 0> advSimdRegisters;
461 Bitfield<7, 4> singlePrecision;
462 Bitfield<11, 8> doublePrecision;
463 Bitfield<15, 12> vfpExceptionTrapping;
464 Bitfield<19, 16> divide;
465 Bitfield<23, 20> squareRoot;
466 Bitfield<27, 24> shortVectors;
467 Bitfield<31, 28> roundingModes;
471 Bitfield<3, 0> flushToZero;
472 Bitfield<7, 4> defaultNaN;
473 Bitfield<11, 8> advSimdLoadStore;
474 Bitfield<15, 12> advSimdInteger;
475 Bitfield<19, 16> advSimdSinglePrecision;
476 Bitfield<23, 20> advSimdHalfPrecision;
477 Bitfield<27, 24> vfpHalfPrecision;
478 Bitfield<31, 28> raz;
482 // Short-descriptor translation table format
486 // Long-descriptor translation table format
490 Bitfield<9, 8> irgn0;
491 Bitfield<11, 10> orgn0;
492 Bitfield<13, 12> sh0;
494 Bitfield<18, 16> t1sz;
497 Bitfield<25, 24> irgn1;
498 Bitfield<27, 26> orgn1;
499 Bitfield<29, 28> sh1;
501 Bitfield<34, 32> ips;
507 // TCR_EL2/3 (AArch64)
514 // Fields of TCR_EL{1,2,3} (mostly overlapping)
515 // TCR_EL1 is natively 64 bits, the others are 32 bits
518 Bitfield<7> epd0; // EL1
519 Bitfield<9, 8> irgn0;
520 Bitfield<11, 10> orgn0;
521 Bitfield<13, 12> sh0;
522 Bitfield<15, 14> tg0;
524 Bitfield<20> tbi; // EL2/EL3
525 Bitfield<21, 16> t1sz; // EL1
526 Bitfield<22> a1; // EL1
527 Bitfield<23> epd1; // EL1
528 Bitfield<24> hpd; // EL2/EL3, E2H=0
529 Bitfield<25, 24> irgn1; // EL1
530 Bitfield<27, 26> orgn1; // EL1
531 Bitfield<29, 28> sh1; // EL1
532 Bitfield<29> tbid; // EL2
533 Bitfield<31, 30> tg1; // EL1
534 Bitfield<34, 32> ips; // EL1
535 Bitfield<36> as; // EL1
536 Bitfield<37> tbi0; // EL1
537 Bitfield<38> tbi1; // EL1
542 Bitfield<51> tbid0; // EL1
543 Bitfield<52> tbid1; // EL1
548 Bitfield<9, 8> irgn0;
549 Bitfield<11, 10> orgn0;
550 Bitfield<13, 12> sh0;
557 Bitfield<5, 0> t0sz64;
559 Bitfield<9, 8> irgn0;
560 Bitfield<11, 10> orgn0;
561 Bitfield<13, 12> sh0;
562 Bitfield<15, 14> tg0;
563 Bitfield<18, 16> ps; // Only defined for VTCR_EL2
564 Bitfield<21> ha; // Only defined for VTCR_EL2
565 Bitfield<22> hd; // Only defined for VTCR_EL2
610 BitUnion32(CONTEXTIDR)
612 Bitfield<31,8> procid;
613 EndBitUnion(CONTEXTIDR)
616 Bitfield<2,0> sataRAMLatency;
617 Bitfield<4,3> reserved_4_3;
618 Bitfield<5> dataRAMSetup;
619 Bitfield<8,6> tagRAMLatency;
620 Bitfield<9> tagRAMSetup;
621 Bitfield<11,10> dataRAMSlice;
622 Bitfield<12> tagRAMSlice;
623 Bitfield<20,13> reserved_20_13;
624 Bitfield<21> eccandParityEnable;
625 Bitfield<22> reserved_22;
626 Bitfield<23> interptCtrlPresent;
627 Bitfield<25,24> numCPUs;
628 Bitfield<30,26> reserved_30_26;
629 Bitfield<31> l2rstDISABLE_monitor;
633 Bitfield<3,0> iCacheLineSize;
634 Bitfield<13,4> raz_13_4;
635 Bitfield<15,14> l1IndexPolicy;
636 Bitfield<19,16> dCacheLineSize;
640 Bitfield<31,29> format;
649 Bitfield<63, 56> attr;
658 Bitfield<5, 1> fs4_0;
665 Bitfield<15, 0> imm16;
671 Bitfield<28> tta_e2h;
672 Bitfield<21, 20> fpen;
674 Bitfield<17, 16> zen;
675 Bitfield<13, 12> res1_13_12_el2;
677 Bitfield<9> res1_9_el2;
678 Bitfield<8> res1_8_el2;
679 Bitfield<8> ez; // SVE (CPTR_EL3)
680 Bitfield<8> tz; // SVE (CPTR_EL2)
681 Bitfield<7, 0> res1_7_0_el2;
689 Bitfield<64, 4> res0;
697 Bitfield<63, 24> res0_2;
699 Bitfield<19, 16> lbn;
700 Bitfield<15, 14> ssc;
702 Bitfield<12, 9> res0_1;
704 Bitfield<4, 3> res0_0;
710 Bitfield<63, 29> res0_2;
711 Bitfield<28, 24> mask;
712 Bitfield<23, 21> res0_1;
714 Bitfield<19, 16> lbn;
715 Bitfield<15, 14> ssc;
730 Bitfield<25, 24> res0_4;
731 Bitfield<23, 22> intdis;
736 Bitfield<17> spniddis;
737 Bitfield<16> spiddis;
741 Bitfield<12> udccdis;
743 Bitfield<11, 7> res0_2;
746 Bitfield<1, 0> res0_1;
757 Bitfield<24, 16> res0_4;
764 Bitfield<9,8> res0_2;
776 Bitfield<31,28> cidmask;
777 Bitfield<27,24> auxregs;
778 Bitfield<23,20> doublelock;
779 Bitfield<19,16> virtextns;
780 Bitfield<15,12> vectorcatch;
781 Bitfield<11,8> bpaddremask;
782 Bitfield<7,4> wpaddrmask;
783 Bitfield<3,0> pcsample;
788 #endif // __ARCH_ARM_MISCREGS_TYPES_HH__