miscregs.cc revision 12499
17259Sgblack@eecs.umich.edu/* 211939Snikos.nikoleris@arm.com * Copyright (c) 2010-2013, 2015-2017 ARM Limited 37259Sgblack@eecs.umich.edu * All rights reserved 47259Sgblack@eecs.umich.edu * 57259Sgblack@eecs.umich.edu * The license below extends only to copyright in the software and shall 67259Sgblack@eecs.umich.edu * not be construed as granting a license to any other intellectual 77259Sgblack@eecs.umich.edu * property including but not limited to intellectual property relating 87259Sgblack@eecs.umich.edu * to a hardware implementation of the functionality of the software 97259Sgblack@eecs.umich.edu * licensed hereunder. You may use the software subject to the license 107259Sgblack@eecs.umich.edu * terms below provided that you ensure that this notice is replicated 117259Sgblack@eecs.umich.edu * unmodified and in its entirety in all distributions of the software, 127259Sgblack@eecs.umich.edu * modified or unmodified, in source code or in binary form. 137259Sgblack@eecs.umich.edu * 147259Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without 157259Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are 167259Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright 177259Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer; 187259Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright 197259Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the 207259Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution; 217259Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its 227259Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from 237259Sgblack@eecs.umich.edu * this software without specific prior written permission. 247259Sgblack@eecs.umich.edu * 257259Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 267259Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 277259Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 287259Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 297259Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 307259Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 317259Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 327259Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 337259Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 347259Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 357259Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 367259Sgblack@eecs.umich.edu * 377259Sgblack@eecs.umich.edu * Authors: Gabe Black 387405SAli.Saidi@ARM.com * Ali Saidi 3910037SARM gem5 Developers * Giacomo Gabrielli 407259Sgblack@eecs.umich.edu */ 417259Sgblack@eecs.umich.edu 4211793Sbrandon.potter@amd.com#include "arch/arm/miscregs.hh" 4311793Sbrandon.potter@amd.com 4411939Snikos.nikoleris@arm.com#include <tuple> 4511939Snikos.nikoleris@arm.com 467405SAli.Saidi@ARM.com#include "arch/arm/isa.hh" 4712334Sgabeblack@google.com#include "base/logging.hh" 4810037SARM gem5 Developers#include "cpu/thread_context.hh" 4910828SGiacomo.Gabrielli@arm.com#include "sim/full_system.hh" 507259Sgblack@eecs.umich.edu 517259Sgblack@eecs.umich.edunamespace ArmISA 527259Sgblack@eecs.umich.edu{ 537259Sgblack@eecs.umich.edu 547259Sgblack@eecs.umich.eduMiscRegIndex 558868SMatt.Horsnell@arm.comdecodeCP14Reg(unsigned crn, unsigned opc1, unsigned crm, unsigned opc2) 568868SMatt.Horsnell@arm.com{ 578868SMatt.Horsnell@arm.com switch(crn) { 588868SMatt.Horsnell@arm.com case 0: 5910037SARM gem5 Developers switch (opc1) { 608868SMatt.Horsnell@arm.com case 0: 6110037SARM gem5 Developers switch (opc2) { 628868SMatt.Horsnell@arm.com case 0: 6310037SARM gem5 Developers switch (crm) { 6410037SARM gem5 Developers case 0: 6510037SARM gem5 Developers return MISCREG_DBGDIDR; 6610037SARM gem5 Developers case 1: 6710037SARM gem5 Developers return MISCREG_DBGDSCRint; 6810037SARM gem5 Developers } 6910037SARM gem5 Developers break; 708868SMatt.Horsnell@arm.com } 7110037SARM gem5 Developers break; 7210037SARM gem5 Developers case 7: 7310037SARM gem5 Developers switch (opc2) { 7410037SARM gem5 Developers case 0: 7510037SARM gem5 Developers switch (crm) { 7610037SARM gem5 Developers case 0: 7710037SARM gem5 Developers return MISCREG_JIDR; 7810037SARM gem5 Developers } 7910037SARM gem5 Developers break; 8010037SARM gem5 Developers } 8110037SARM gem5 Developers break; 829959Schander.sudanthi@arm.com } 8310037SARM gem5 Developers break; 849959Schander.sudanthi@arm.com case 1: 859959Schander.sudanthi@arm.com switch (opc1) { 869959Schander.sudanthi@arm.com case 6: 879959Schander.sudanthi@arm.com switch (crm) { 889959Schander.sudanthi@arm.com case 0: 899959Schander.sudanthi@arm.com switch (opc2) { 909959Schander.sudanthi@arm.com case 0: 919959Schander.sudanthi@arm.com return MISCREG_TEEHBR; 929959Schander.sudanthi@arm.com } 9310037SARM gem5 Developers break; 949959Schander.sudanthi@arm.com } 9510037SARM gem5 Developers break; 9610037SARM gem5 Developers case 7: 9710037SARM gem5 Developers switch (crm) { 9810037SARM gem5 Developers case 0: 9910037SARM gem5 Developers switch (opc2) { 10010037SARM gem5 Developers case 0: 10110037SARM gem5 Developers return MISCREG_JOSCR; 10210037SARM gem5 Developers } 10310037SARM gem5 Developers break; 10410037SARM gem5 Developers } 10510037SARM gem5 Developers break; 1068868SMatt.Horsnell@arm.com } 10710037SARM gem5 Developers break; 10810037SARM gem5 Developers case 2: 10910037SARM gem5 Developers switch (opc1) { 11010037SARM gem5 Developers case 7: 11110037SARM gem5 Developers switch (crm) { 11210037SARM gem5 Developers case 0: 11310037SARM gem5 Developers switch (opc2) { 11410037SARM gem5 Developers case 0: 11510037SARM gem5 Developers return MISCREG_JMCR; 11610037SARM gem5 Developers } 11710037SARM gem5 Developers break; 11810037SARM gem5 Developers } 11910037SARM gem5 Developers break; 12010037SARM gem5 Developers } 12110037SARM gem5 Developers break; 1228868SMatt.Horsnell@arm.com } 12310037SARM gem5 Developers // If we get here then it must be a register that we haven't implemented 12410037SARM gem5 Developers warn("CP14 unimplemented crn[%d], opc1[%d], crm[%d], opc2[%d]", 12510037SARM gem5 Developers crn, opc1, crm, opc2); 12610037SARM gem5 Developers return MISCREG_CP14_UNIMPL; 12710037SARM gem5 Developers} 1288868SMatt.Horsnell@arm.com 12910037SARM gem5 Developersusing namespace std; 13010037SARM gem5 Developers 1318868SMatt.Horsnell@arm.comMiscRegIndex 1327259Sgblack@eecs.umich.edudecodeCP15Reg(unsigned crn, unsigned opc1, unsigned crm, unsigned opc2) 1337259Sgblack@eecs.umich.edu{ 1347259Sgblack@eecs.umich.edu switch (crn) { 1357259Sgblack@eecs.umich.edu case 0: 1367259Sgblack@eecs.umich.edu switch (opc1) { 1377259Sgblack@eecs.umich.edu case 0: 1387259Sgblack@eecs.umich.edu switch (crm) { 1397259Sgblack@eecs.umich.edu case 0: 1407259Sgblack@eecs.umich.edu switch (opc2) { 1417259Sgblack@eecs.umich.edu case 1: 1427259Sgblack@eecs.umich.edu return MISCREG_CTR; 1437259Sgblack@eecs.umich.edu case 2: 1447259Sgblack@eecs.umich.edu return MISCREG_TCMTR; 1457351Sgblack@eecs.umich.edu case 3: 1467351Sgblack@eecs.umich.edu return MISCREG_TLBTR; 1477259Sgblack@eecs.umich.edu case 5: 1487259Sgblack@eecs.umich.edu return MISCREG_MPIDR; 14910037SARM gem5 Developers case 6: 15010037SARM gem5 Developers return MISCREG_REVIDR; 1517259Sgblack@eecs.umich.edu default: 1527259Sgblack@eecs.umich.edu return MISCREG_MIDR; 1537259Sgblack@eecs.umich.edu } 1547259Sgblack@eecs.umich.edu break; 1557259Sgblack@eecs.umich.edu case 1: 1567259Sgblack@eecs.umich.edu switch (opc2) { 1577259Sgblack@eecs.umich.edu case 0: 1587259Sgblack@eecs.umich.edu return MISCREG_ID_PFR0; 1597259Sgblack@eecs.umich.edu case 1: 1607259Sgblack@eecs.umich.edu return MISCREG_ID_PFR1; 1617259Sgblack@eecs.umich.edu case 2: 1627259Sgblack@eecs.umich.edu return MISCREG_ID_DFR0; 1637259Sgblack@eecs.umich.edu case 3: 1647259Sgblack@eecs.umich.edu return MISCREG_ID_AFR0; 1657259Sgblack@eecs.umich.edu case 4: 1667259Sgblack@eecs.umich.edu return MISCREG_ID_MMFR0; 1677259Sgblack@eecs.umich.edu case 5: 1687259Sgblack@eecs.umich.edu return MISCREG_ID_MMFR1; 1697259Sgblack@eecs.umich.edu case 6: 1707259Sgblack@eecs.umich.edu return MISCREG_ID_MMFR2; 1717259Sgblack@eecs.umich.edu case 7: 1727259Sgblack@eecs.umich.edu return MISCREG_ID_MMFR3; 1737259Sgblack@eecs.umich.edu } 1747259Sgblack@eecs.umich.edu break; 1757259Sgblack@eecs.umich.edu case 2: 1767259Sgblack@eecs.umich.edu switch (opc2) { 1777259Sgblack@eecs.umich.edu case 0: 1787259Sgblack@eecs.umich.edu return MISCREG_ID_ISAR0; 1797259Sgblack@eecs.umich.edu case 1: 1807259Sgblack@eecs.umich.edu return MISCREG_ID_ISAR1; 1817259Sgblack@eecs.umich.edu case 2: 1827259Sgblack@eecs.umich.edu return MISCREG_ID_ISAR2; 1837259Sgblack@eecs.umich.edu case 3: 1847259Sgblack@eecs.umich.edu return MISCREG_ID_ISAR3; 1857259Sgblack@eecs.umich.edu case 4: 1867259Sgblack@eecs.umich.edu return MISCREG_ID_ISAR4; 1877259Sgblack@eecs.umich.edu case 5: 1887259Sgblack@eecs.umich.edu return MISCREG_ID_ISAR5; 1897259Sgblack@eecs.umich.edu case 6: 1907259Sgblack@eecs.umich.edu case 7: 1917259Sgblack@eecs.umich.edu return MISCREG_RAZ; // read as zero 1927259Sgblack@eecs.umich.edu } 1937259Sgblack@eecs.umich.edu break; 1947259Sgblack@eecs.umich.edu default: 1957259Sgblack@eecs.umich.edu return MISCREG_RAZ; // read as zero 1967259Sgblack@eecs.umich.edu } 1977259Sgblack@eecs.umich.edu break; 1987259Sgblack@eecs.umich.edu case 1: 1997259Sgblack@eecs.umich.edu if (crm == 0) { 2007259Sgblack@eecs.umich.edu switch (opc2) { 2017259Sgblack@eecs.umich.edu case 0: 2027259Sgblack@eecs.umich.edu return MISCREG_CCSIDR; 2037259Sgblack@eecs.umich.edu case 1: 2047259Sgblack@eecs.umich.edu return MISCREG_CLIDR; 2057259Sgblack@eecs.umich.edu case 7: 2067259Sgblack@eecs.umich.edu return MISCREG_AIDR; 2077259Sgblack@eecs.umich.edu } 2087259Sgblack@eecs.umich.edu } 2097259Sgblack@eecs.umich.edu break; 2107259Sgblack@eecs.umich.edu case 2: 2117259Sgblack@eecs.umich.edu if (crm == 0 && opc2 == 0) { 2127259Sgblack@eecs.umich.edu return MISCREG_CSSELR; 2137259Sgblack@eecs.umich.edu } 2147259Sgblack@eecs.umich.edu break; 21510037SARM gem5 Developers case 4: 21610037SARM gem5 Developers if (crm == 0) { 21710037SARM gem5 Developers if (opc2 == 0) 21810037SARM gem5 Developers return MISCREG_VPIDR; 21910037SARM gem5 Developers else if (opc2 == 5) 22010037SARM gem5 Developers return MISCREG_VMPIDR; 22110037SARM gem5 Developers } 22210037SARM gem5 Developers break; 2237259Sgblack@eecs.umich.edu } 2247259Sgblack@eecs.umich.edu break; 2257259Sgblack@eecs.umich.edu case 1: 2267351Sgblack@eecs.umich.edu if (opc1 == 0) { 2277351Sgblack@eecs.umich.edu if (crm == 0) { 2287351Sgblack@eecs.umich.edu switch (opc2) { 2297351Sgblack@eecs.umich.edu case 0: 2307351Sgblack@eecs.umich.edu return MISCREG_SCTLR; 2317351Sgblack@eecs.umich.edu case 1: 2327351Sgblack@eecs.umich.edu return MISCREG_ACTLR; 2337351Sgblack@eecs.umich.edu case 0x2: 2347351Sgblack@eecs.umich.edu return MISCREG_CPACR; 2357351Sgblack@eecs.umich.edu } 2367351Sgblack@eecs.umich.edu } else if (crm == 1) { 2377351Sgblack@eecs.umich.edu switch (opc2) { 2387351Sgblack@eecs.umich.edu case 0: 2397351Sgblack@eecs.umich.edu return MISCREG_SCR; 2407351Sgblack@eecs.umich.edu case 1: 2417351Sgblack@eecs.umich.edu return MISCREG_SDER; 2427351Sgblack@eecs.umich.edu case 2: 2437351Sgblack@eecs.umich.edu return MISCREG_NSACR; 2447351Sgblack@eecs.umich.edu } 2457351Sgblack@eecs.umich.edu } 24610037SARM gem5 Developers } else if (opc1 == 4) { 24710037SARM gem5 Developers if (crm == 0) { 24810037SARM gem5 Developers if (opc2 == 0) 24910037SARM gem5 Developers return MISCREG_HSCTLR; 25010037SARM gem5 Developers else if (opc2 == 1) 25110037SARM gem5 Developers return MISCREG_HACTLR; 25210037SARM gem5 Developers } else if (crm == 1) { 25310037SARM gem5 Developers switch (opc2) { 25410037SARM gem5 Developers case 0: 25510037SARM gem5 Developers return MISCREG_HCR; 25610037SARM gem5 Developers case 1: 25710037SARM gem5 Developers return MISCREG_HDCR; 25810037SARM gem5 Developers case 2: 25910037SARM gem5 Developers return MISCREG_HCPTR; 26010037SARM gem5 Developers case 3: 26110037SARM gem5 Developers return MISCREG_HSTR; 26210037SARM gem5 Developers case 7: 26310037SARM gem5 Developers return MISCREG_HACR; 26410037SARM gem5 Developers } 26510037SARM gem5 Developers } 2667351Sgblack@eecs.umich.edu } 2677351Sgblack@eecs.umich.edu break; 2687351Sgblack@eecs.umich.edu case 2: 2697406SAli.Saidi@ARM.com if (opc1 == 0 && crm == 0) { 2707259Sgblack@eecs.umich.edu switch (opc2) { 2717259Sgblack@eecs.umich.edu case 0: 2727351Sgblack@eecs.umich.edu return MISCREG_TTBR0; 2737259Sgblack@eecs.umich.edu case 1: 2747351Sgblack@eecs.umich.edu return MISCREG_TTBR1; 2757351Sgblack@eecs.umich.edu case 2: 2767351Sgblack@eecs.umich.edu return MISCREG_TTBCR; 2777259Sgblack@eecs.umich.edu } 27810037SARM gem5 Developers } else if (opc1 == 4) { 27910037SARM gem5 Developers if (crm == 0 && opc2 == 2) 28010037SARM gem5 Developers return MISCREG_HTCR; 28110037SARM gem5 Developers else if (crm == 1 && opc2 == 2) 28210037SARM gem5 Developers return MISCREG_VTCR; 2837259Sgblack@eecs.umich.edu } 2847259Sgblack@eecs.umich.edu break; 2857351Sgblack@eecs.umich.edu case 3: 2867351Sgblack@eecs.umich.edu if (opc1 == 0 && crm == 0 && opc2 == 0) { 2877351Sgblack@eecs.umich.edu return MISCREG_DACR; 2887351Sgblack@eecs.umich.edu } 2897351Sgblack@eecs.umich.edu break; 2907259Sgblack@eecs.umich.edu case 5: 2917259Sgblack@eecs.umich.edu if (opc1 == 0) { 2927259Sgblack@eecs.umich.edu if (crm == 0) { 2937259Sgblack@eecs.umich.edu if (opc2 == 0) { 2947259Sgblack@eecs.umich.edu return MISCREG_DFSR; 2957259Sgblack@eecs.umich.edu } else if (opc2 == 1) { 2967259Sgblack@eecs.umich.edu return MISCREG_IFSR; 2977259Sgblack@eecs.umich.edu } 2987259Sgblack@eecs.umich.edu } else if (crm == 1) { 2997259Sgblack@eecs.umich.edu if (opc2 == 0) { 3007259Sgblack@eecs.umich.edu return MISCREG_ADFSR; 3017259Sgblack@eecs.umich.edu } else if (opc2 == 1) { 3027259Sgblack@eecs.umich.edu return MISCREG_AIFSR; 3037259Sgblack@eecs.umich.edu } 3047259Sgblack@eecs.umich.edu } 30510037SARM gem5 Developers } else if (opc1 == 4) { 30610037SARM gem5 Developers if (crm == 1) { 30710037SARM gem5 Developers if (opc2 == 0) 30810037SARM gem5 Developers return MISCREG_HADFSR; 30910037SARM gem5 Developers else if (opc2 == 1) 31010037SARM gem5 Developers return MISCREG_HAIFSR; 31110037SARM gem5 Developers } else if (crm == 2 && opc2 == 0) { 31210037SARM gem5 Developers return MISCREG_HSR; 31310037SARM gem5 Developers } 3147259Sgblack@eecs.umich.edu } 3157259Sgblack@eecs.umich.edu break; 3167259Sgblack@eecs.umich.edu case 6: 3177351Sgblack@eecs.umich.edu if (opc1 == 0 && crm == 0) { 3187351Sgblack@eecs.umich.edu switch (opc2) { 3197259Sgblack@eecs.umich.edu case 0: 3207351Sgblack@eecs.umich.edu return MISCREG_DFAR; 3217259Sgblack@eecs.umich.edu case 2: 3227351Sgblack@eecs.umich.edu return MISCREG_IFAR; 3237259Sgblack@eecs.umich.edu } 32410037SARM gem5 Developers } else if (opc1 == 4 && crm == 0) { 32510037SARM gem5 Developers switch (opc2) { 32610037SARM gem5 Developers case 0: 32710037SARM gem5 Developers return MISCREG_HDFAR; 32810037SARM gem5 Developers case 2: 32910037SARM gem5 Developers return MISCREG_HIFAR; 33010037SARM gem5 Developers case 4: 33110037SARM gem5 Developers return MISCREG_HPFAR; 33210037SARM gem5 Developers } 3337259Sgblack@eecs.umich.edu } 3347259Sgblack@eecs.umich.edu break; 3357259Sgblack@eecs.umich.edu case 7: 3367259Sgblack@eecs.umich.edu if (opc1 == 0) { 3377259Sgblack@eecs.umich.edu switch (crm) { 3387259Sgblack@eecs.umich.edu case 0: 3397259Sgblack@eecs.umich.edu if (opc2 == 4) { 3407259Sgblack@eecs.umich.edu return MISCREG_NOP; 3417259Sgblack@eecs.umich.edu } 3427259Sgblack@eecs.umich.edu break; 3437259Sgblack@eecs.umich.edu case 1: 3447259Sgblack@eecs.umich.edu switch (opc2) { 3457259Sgblack@eecs.umich.edu case 0: 3467259Sgblack@eecs.umich.edu return MISCREG_ICIALLUIS; 3477259Sgblack@eecs.umich.edu case 6: 3487259Sgblack@eecs.umich.edu return MISCREG_BPIALLIS; 3497259Sgblack@eecs.umich.edu } 3507259Sgblack@eecs.umich.edu break; 3517351Sgblack@eecs.umich.edu case 4: 3527351Sgblack@eecs.umich.edu if (opc2 == 0) { 3537351Sgblack@eecs.umich.edu return MISCREG_PAR; 3547351Sgblack@eecs.umich.edu } 3557351Sgblack@eecs.umich.edu break; 3567259Sgblack@eecs.umich.edu case 5: 3577259Sgblack@eecs.umich.edu switch (opc2) { 3587259Sgblack@eecs.umich.edu case 0: 3597259Sgblack@eecs.umich.edu return MISCREG_ICIALLU; 3607259Sgblack@eecs.umich.edu case 1: 3617259Sgblack@eecs.umich.edu return MISCREG_ICIMVAU; 3627259Sgblack@eecs.umich.edu case 4: 3637259Sgblack@eecs.umich.edu return MISCREG_CP15ISB; 3647259Sgblack@eecs.umich.edu case 6: 3657259Sgblack@eecs.umich.edu return MISCREG_BPIALL; 3667259Sgblack@eecs.umich.edu case 7: 3677259Sgblack@eecs.umich.edu return MISCREG_BPIMVA; 3687259Sgblack@eecs.umich.edu } 3697259Sgblack@eecs.umich.edu break; 3707259Sgblack@eecs.umich.edu case 6: 3717259Sgblack@eecs.umich.edu if (opc2 == 1) { 3727259Sgblack@eecs.umich.edu return MISCREG_DCIMVAC; 3737259Sgblack@eecs.umich.edu } else if (opc2 == 2) { 3747259Sgblack@eecs.umich.edu return MISCREG_DCISW; 3757259Sgblack@eecs.umich.edu } 3767259Sgblack@eecs.umich.edu break; 3777351Sgblack@eecs.umich.edu case 8: 3787351Sgblack@eecs.umich.edu switch (opc2) { 3797351Sgblack@eecs.umich.edu case 0: 38010037SARM gem5 Developers return MISCREG_ATS1CPR; 3817351Sgblack@eecs.umich.edu case 1: 38210037SARM gem5 Developers return MISCREG_ATS1CPW; 3837351Sgblack@eecs.umich.edu case 2: 38410037SARM gem5 Developers return MISCREG_ATS1CUR; 3857351Sgblack@eecs.umich.edu case 3: 38610037SARM gem5 Developers return MISCREG_ATS1CUW; 3877351Sgblack@eecs.umich.edu case 4: 38810037SARM gem5 Developers return MISCREG_ATS12NSOPR; 3897351Sgblack@eecs.umich.edu case 5: 39010037SARM gem5 Developers return MISCREG_ATS12NSOPW; 3917351Sgblack@eecs.umich.edu case 6: 39210037SARM gem5 Developers return MISCREG_ATS12NSOUR; 3937351Sgblack@eecs.umich.edu case 7: 39410037SARM gem5 Developers return MISCREG_ATS12NSOUW; 3957351Sgblack@eecs.umich.edu } 3967351Sgblack@eecs.umich.edu break; 3977259Sgblack@eecs.umich.edu case 10: 3987259Sgblack@eecs.umich.edu switch (opc2) { 3997259Sgblack@eecs.umich.edu case 1: 4007259Sgblack@eecs.umich.edu return MISCREG_DCCMVAC; 4017259Sgblack@eecs.umich.edu case 2: 40210037SARM gem5 Developers return MISCREG_DCCSW; 4037259Sgblack@eecs.umich.edu case 4: 4047259Sgblack@eecs.umich.edu return MISCREG_CP15DSB; 4057259Sgblack@eecs.umich.edu case 5: 4067259Sgblack@eecs.umich.edu return MISCREG_CP15DMB; 4077259Sgblack@eecs.umich.edu } 4087259Sgblack@eecs.umich.edu break; 4097259Sgblack@eecs.umich.edu case 11: 4107259Sgblack@eecs.umich.edu if (opc2 == 1) { 4117259Sgblack@eecs.umich.edu return MISCREG_DCCMVAU; 4127259Sgblack@eecs.umich.edu } 4137259Sgblack@eecs.umich.edu break; 4147259Sgblack@eecs.umich.edu case 13: 4157259Sgblack@eecs.umich.edu if (opc2 == 1) { 4167259Sgblack@eecs.umich.edu return MISCREG_NOP; 4177259Sgblack@eecs.umich.edu } 4187259Sgblack@eecs.umich.edu break; 4197259Sgblack@eecs.umich.edu case 14: 4207259Sgblack@eecs.umich.edu if (opc2 == 1) { 4217259Sgblack@eecs.umich.edu return MISCREG_DCCIMVAC; 4227259Sgblack@eecs.umich.edu } else if (opc2 == 2) { 4237259Sgblack@eecs.umich.edu return MISCREG_DCCISW; 4247259Sgblack@eecs.umich.edu } 4257259Sgblack@eecs.umich.edu break; 4267259Sgblack@eecs.umich.edu } 42710037SARM gem5 Developers } else if (opc1 == 4 && crm == 8) { 42810037SARM gem5 Developers if (opc2 == 0) 42910037SARM gem5 Developers return MISCREG_ATS1HR; 43010037SARM gem5 Developers else if (opc2 == 1) 43110037SARM gem5 Developers return MISCREG_ATS1HW; 4327259Sgblack@eecs.umich.edu } 4337259Sgblack@eecs.umich.edu break; 4347351Sgblack@eecs.umich.edu case 8: 4357351Sgblack@eecs.umich.edu if (opc1 == 0) { 4367351Sgblack@eecs.umich.edu switch (crm) { 4377351Sgblack@eecs.umich.edu case 3: 4387351Sgblack@eecs.umich.edu switch (opc2) { 4397351Sgblack@eecs.umich.edu case 0: 4407351Sgblack@eecs.umich.edu return MISCREG_TLBIALLIS; 4417351Sgblack@eecs.umich.edu case 1: 4427351Sgblack@eecs.umich.edu return MISCREG_TLBIMVAIS; 4437351Sgblack@eecs.umich.edu case 2: 4447351Sgblack@eecs.umich.edu return MISCREG_TLBIASIDIS; 4457351Sgblack@eecs.umich.edu case 3: 4467351Sgblack@eecs.umich.edu return MISCREG_TLBIMVAAIS; 4477351Sgblack@eecs.umich.edu } 4487351Sgblack@eecs.umich.edu break; 4497351Sgblack@eecs.umich.edu case 5: 4507351Sgblack@eecs.umich.edu switch (opc2) { 4517351Sgblack@eecs.umich.edu case 0: 4527351Sgblack@eecs.umich.edu return MISCREG_ITLBIALL; 4537351Sgblack@eecs.umich.edu case 1: 4547351Sgblack@eecs.umich.edu return MISCREG_ITLBIMVA; 4557351Sgblack@eecs.umich.edu case 2: 4567351Sgblack@eecs.umich.edu return MISCREG_ITLBIASID; 4577351Sgblack@eecs.umich.edu } 4587351Sgblack@eecs.umich.edu break; 4597351Sgblack@eecs.umich.edu case 6: 4607351Sgblack@eecs.umich.edu switch (opc2) { 4617351Sgblack@eecs.umich.edu case 0: 4627351Sgblack@eecs.umich.edu return MISCREG_DTLBIALL; 4637351Sgblack@eecs.umich.edu case 1: 4647351Sgblack@eecs.umich.edu return MISCREG_DTLBIMVA; 4657351Sgblack@eecs.umich.edu case 2: 4667351Sgblack@eecs.umich.edu return MISCREG_DTLBIASID; 4677351Sgblack@eecs.umich.edu } 4687351Sgblack@eecs.umich.edu break; 4697351Sgblack@eecs.umich.edu case 7: 4707351Sgblack@eecs.umich.edu switch (opc2) { 4717351Sgblack@eecs.umich.edu case 0: 4727351Sgblack@eecs.umich.edu return MISCREG_TLBIALL; 4737351Sgblack@eecs.umich.edu case 1: 4747351Sgblack@eecs.umich.edu return MISCREG_TLBIMVA; 4757351Sgblack@eecs.umich.edu case 2: 4767351Sgblack@eecs.umich.edu return MISCREG_TLBIASID; 4777351Sgblack@eecs.umich.edu case 3: 4787351Sgblack@eecs.umich.edu return MISCREG_TLBIMVAA; 4797351Sgblack@eecs.umich.edu } 4807351Sgblack@eecs.umich.edu break; 4817351Sgblack@eecs.umich.edu } 48210037SARM gem5 Developers } else if (opc1 == 4) { 48310037SARM gem5 Developers if (crm == 3) { 48410037SARM gem5 Developers switch (opc2) { 48510037SARM gem5 Developers case 0: 48610037SARM gem5 Developers return MISCREG_TLBIALLHIS; 48710037SARM gem5 Developers case 1: 48810037SARM gem5 Developers return MISCREG_TLBIMVAHIS; 48910037SARM gem5 Developers case 4: 49010037SARM gem5 Developers return MISCREG_TLBIALLNSNHIS; 49110037SARM gem5 Developers } 49210037SARM gem5 Developers } else if (crm == 7) { 49310037SARM gem5 Developers switch (opc2) { 49410037SARM gem5 Developers case 0: 49510037SARM gem5 Developers return MISCREG_TLBIALLH; 49610037SARM gem5 Developers case 1: 49710037SARM gem5 Developers return MISCREG_TLBIMVAH; 49810037SARM gem5 Developers case 4: 49910037SARM gem5 Developers return MISCREG_TLBIALLNSNH; 50010037SARM gem5 Developers } 50110037SARM gem5 Developers } 5027351Sgblack@eecs.umich.edu } 5037351Sgblack@eecs.umich.edu break; 5047259Sgblack@eecs.umich.edu case 9: 5057583SAli.Saidi@arm.com if (opc1 == 0) { 5067259Sgblack@eecs.umich.edu switch (crm) { 5077259Sgblack@eecs.umich.edu case 12: 5087583SAli.Saidi@arm.com switch (opc2) { 5097583SAli.Saidi@arm.com case 0: 5107583SAli.Saidi@arm.com return MISCREG_PMCR; 5117583SAli.Saidi@arm.com case 1: 5127583SAli.Saidi@arm.com return MISCREG_PMCNTENSET; 5137583SAli.Saidi@arm.com case 2: 5147583SAli.Saidi@arm.com return MISCREG_PMCNTENCLR; 5157583SAli.Saidi@arm.com case 3: 5167583SAli.Saidi@arm.com return MISCREG_PMOVSR; 5177583SAli.Saidi@arm.com case 4: 5187583SAli.Saidi@arm.com return MISCREG_PMSWINC; 5197583SAli.Saidi@arm.com case 5: 5207583SAli.Saidi@arm.com return MISCREG_PMSELR; 5217583SAli.Saidi@arm.com case 6: 5227583SAli.Saidi@arm.com return MISCREG_PMCEID0; 5237583SAli.Saidi@arm.com case 7: 5247583SAli.Saidi@arm.com return MISCREG_PMCEID1; 5257583SAli.Saidi@arm.com } 5268988SAli.Saidi@ARM.com break; 5277259Sgblack@eecs.umich.edu case 13: 5287583SAli.Saidi@arm.com switch (opc2) { 5297583SAli.Saidi@arm.com case 0: 5307583SAli.Saidi@arm.com return MISCREG_PMCCNTR; 5317583SAli.Saidi@arm.com case 1: 53210037SARM gem5 Developers // Selector is PMSELR.SEL 53310037SARM gem5 Developers return MISCREG_PMXEVTYPER_PMCCFILTR; 5347583SAli.Saidi@arm.com case 2: 5357583SAli.Saidi@arm.com return MISCREG_PMXEVCNTR; 5367583SAli.Saidi@arm.com } 5378988SAli.Saidi@ARM.com break; 5387259Sgblack@eecs.umich.edu case 14: 5397583SAli.Saidi@arm.com switch (opc2) { 5407583SAli.Saidi@arm.com case 0: 5417583SAli.Saidi@arm.com return MISCREG_PMUSERENR; 5427583SAli.Saidi@arm.com case 1: 5437583SAli.Saidi@arm.com return MISCREG_PMINTENSET; 5447583SAli.Saidi@arm.com case 2: 5457583SAli.Saidi@arm.com return MISCREG_PMINTENCLR; 54610037SARM gem5 Developers case 3: 54710037SARM gem5 Developers return MISCREG_PMOVSSET; 5487583SAli.Saidi@arm.com } 5498988SAli.Saidi@ARM.com break; 5507259Sgblack@eecs.umich.edu } 5518058SAli.Saidi@ARM.com } else if (opc1 == 1) { 5528549Sdaniel.johnson@arm.com switch (crm) { 5538549Sdaniel.johnson@arm.com case 0: 5548549Sdaniel.johnson@arm.com switch (opc2) { 5558549Sdaniel.johnson@arm.com case 2: // L2CTLR, L2 Control Register 5568549Sdaniel.johnson@arm.com return MISCREG_L2CTLR; 55710037SARM gem5 Developers case 3: 55810037SARM gem5 Developers return MISCREG_L2ECTLR; 5598549Sdaniel.johnson@arm.com } 5608988SAli.Saidi@ARM.com break; 56110037SARM gem5 Developers break; 5628549Sdaniel.johnson@arm.com } 5637259Sgblack@eecs.umich.edu } 5647259Sgblack@eecs.umich.edu break; 5657351Sgblack@eecs.umich.edu case 10: 5667351Sgblack@eecs.umich.edu if (opc1 == 0) { 5677351Sgblack@eecs.umich.edu // crm 0, 1, 4, and 8, with op2 0 - 7, reserved for TLB lockdown 5687351Sgblack@eecs.umich.edu if (crm == 2) { // TEX Remap Registers 5697351Sgblack@eecs.umich.edu if (opc2 == 0) { 57010037SARM gem5 Developers // Selector is TTBCR.EAE 57110037SARM gem5 Developers return MISCREG_PRRR_MAIR0; 5727351Sgblack@eecs.umich.edu } else if (opc2 == 1) { 57310037SARM gem5 Developers // Selector is TTBCR.EAE 57410037SARM gem5 Developers return MISCREG_NMRR_MAIR1; 5757351Sgblack@eecs.umich.edu } 57610037SARM gem5 Developers } else if (crm == 3) { 57710037SARM gem5 Developers if (opc2 == 0) { 57810037SARM gem5 Developers return MISCREG_AMAIR0; 57910037SARM gem5 Developers } else if (opc2 == 1) { 58010037SARM gem5 Developers return MISCREG_AMAIR1; 58110037SARM gem5 Developers } 58210037SARM gem5 Developers } 58310037SARM gem5 Developers } else if (opc1 == 4) { 58410037SARM gem5 Developers // crm 0, 1, 4, and 8, with op2 0 - 7, reserved for TLB lockdown 58510037SARM gem5 Developers if (crm == 2) { 58610037SARM gem5 Developers if (opc2 == 0) 58710037SARM gem5 Developers return MISCREG_HMAIR0; 58810037SARM gem5 Developers else if (opc2 == 1) 58910037SARM gem5 Developers return MISCREG_HMAIR1; 59010037SARM gem5 Developers } else if (crm == 3) { 59110037SARM gem5 Developers if (opc2 == 0) 59210037SARM gem5 Developers return MISCREG_HAMAIR0; 59310037SARM gem5 Developers else if (opc2 == 1) 59410037SARM gem5 Developers return MISCREG_HAMAIR1; 5957351Sgblack@eecs.umich.edu } 5967351Sgblack@eecs.umich.edu } 5977351Sgblack@eecs.umich.edu break; 5987259Sgblack@eecs.umich.edu case 11: 5998737Skoansin.tan@gmail.com if (opc1 <=7) { 6007259Sgblack@eecs.umich.edu switch (crm) { 6017259Sgblack@eecs.umich.edu case 0: 6027259Sgblack@eecs.umich.edu case 1: 6037259Sgblack@eecs.umich.edu case 2: 6047259Sgblack@eecs.umich.edu case 3: 6057259Sgblack@eecs.umich.edu case 4: 6067259Sgblack@eecs.umich.edu case 5: 6077259Sgblack@eecs.umich.edu case 6: 6087259Sgblack@eecs.umich.edu case 7: 6097259Sgblack@eecs.umich.edu case 8: 6107259Sgblack@eecs.umich.edu case 15: 6117259Sgblack@eecs.umich.edu // Reserved for DMA operations for TCM access 6127259Sgblack@eecs.umich.edu break; 6137259Sgblack@eecs.umich.edu } 6147259Sgblack@eecs.umich.edu } 6157259Sgblack@eecs.umich.edu break; 6167351Sgblack@eecs.umich.edu case 12: 6177351Sgblack@eecs.umich.edu if (opc1 == 0) { 6187351Sgblack@eecs.umich.edu if (crm == 0) { 6197351Sgblack@eecs.umich.edu if (opc2 == 0) { 6207351Sgblack@eecs.umich.edu return MISCREG_VBAR; 6217351Sgblack@eecs.umich.edu } else if (opc2 == 1) { 6227351Sgblack@eecs.umich.edu return MISCREG_MVBAR; 6237351Sgblack@eecs.umich.edu } 6247351Sgblack@eecs.umich.edu } else if (crm == 1) { 6257351Sgblack@eecs.umich.edu if (opc2 == 0) { 6267351Sgblack@eecs.umich.edu return MISCREG_ISR; 6277351Sgblack@eecs.umich.edu } 6287351Sgblack@eecs.umich.edu } 62910037SARM gem5 Developers } else if (opc1 == 4) { 63010037SARM gem5 Developers if (crm == 0 && opc2 == 0) 63110037SARM gem5 Developers return MISCREG_HVBAR; 6327351Sgblack@eecs.umich.edu } 6337351Sgblack@eecs.umich.edu break; 6347259Sgblack@eecs.umich.edu case 13: 6357259Sgblack@eecs.umich.edu if (opc1 == 0) { 6367259Sgblack@eecs.umich.edu if (crm == 0) { 6377406SAli.Saidi@ARM.com switch (opc2) { 6387351Sgblack@eecs.umich.edu case 0: 63910037SARM gem5 Developers return MISCREG_FCSEIDR; 6407259Sgblack@eecs.umich.edu case 1: 6417259Sgblack@eecs.umich.edu return MISCREG_CONTEXTIDR; 6427259Sgblack@eecs.umich.edu case 2: 6437259Sgblack@eecs.umich.edu return MISCREG_TPIDRURW; 6447259Sgblack@eecs.umich.edu case 3: 6457259Sgblack@eecs.umich.edu return MISCREG_TPIDRURO; 6467259Sgblack@eecs.umich.edu case 4: 6477259Sgblack@eecs.umich.edu return MISCREG_TPIDRPRW; 6487259Sgblack@eecs.umich.edu } 6497259Sgblack@eecs.umich.edu } 65010037SARM gem5 Developers } else if (opc1 == 4) { 65110037SARM gem5 Developers if (crm == 0 && opc2 == 2) 65210037SARM gem5 Developers return MISCREG_HTPIDR; 65310037SARM gem5 Developers } 65410037SARM gem5 Developers break; 65510037SARM gem5 Developers case 14: 65610037SARM gem5 Developers if (opc1 == 0) { 65710037SARM gem5 Developers switch (crm) { 65810037SARM gem5 Developers case 0: 65910037SARM gem5 Developers if (opc2 == 0) 66010037SARM gem5 Developers return MISCREG_CNTFRQ; 66110037SARM gem5 Developers break; 66210037SARM gem5 Developers case 1: 66310037SARM gem5 Developers if (opc2 == 0) 66410037SARM gem5 Developers return MISCREG_CNTKCTL; 66510037SARM gem5 Developers break; 66610037SARM gem5 Developers case 2: 66710037SARM gem5 Developers if (opc2 == 0) 66810037SARM gem5 Developers return MISCREG_CNTP_TVAL; 66910037SARM gem5 Developers else if (opc2 == 1) 67010037SARM gem5 Developers return MISCREG_CNTP_CTL; 67110037SARM gem5 Developers break; 67210037SARM gem5 Developers case 3: 67310037SARM gem5 Developers if (opc2 == 0) 67410037SARM gem5 Developers return MISCREG_CNTV_TVAL; 67510037SARM gem5 Developers else if (opc2 == 1) 67610037SARM gem5 Developers return MISCREG_CNTV_CTL; 67710037SARM gem5 Developers break; 67810037SARM gem5 Developers } 67910037SARM gem5 Developers } else if (opc1 == 4) { 68010037SARM gem5 Developers if (crm == 1 && opc2 == 0) { 68110037SARM gem5 Developers return MISCREG_CNTHCTL; 68210037SARM gem5 Developers } else if (crm == 2) { 68310037SARM gem5 Developers if (opc2 == 0) 68410037SARM gem5 Developers return MISCREG_CNTHP_TVAL; 68510037SARM gem5 Developers else if (opc2 == 1) 68610037SARM gem5 Developers return MISCREG_CNTHP_CTL; 68710037SARM gem5 Developers } 6887259Sgblack@eecs.umich.edu } 6897259Sgblack@eecs.umich.edu break; 6907259Sgblack@eecs.umich.edu case 15: 6917259Sgblack@eecs.umich.edu // Implementation defined 69210037SARM gem5 Developers return MISCREG_CP15_UNIMPL; 6937259Sgblack@eecs.umich.edu } 6947259Sgblack@eecs.umich.edu // Unrecognized register 69510037SARM gem5 Developers return MISCREG_CP15_UNIMPL; 6967259Sgblack@eecs.umich.edu} 6977259Sgblack@eecs.umich.edu 69810037SARM gem5 DevelopersMiscRegIndex 69910037SARM gem5 DevelopersdecodeCP15Reg64(unsigned crm, unsigned opc1) 70010037SARM gem5 Developers{ 70110037SARM gem5 Developers switch (crm) { 70210037SARM gem5 Developers case 2: 70310037SARM gem5 Developers switch (opc1) { 70410037SARM gem5 Developers case 0: 70510037SARM gem5 Developers return MISCREG_TTBR0; 70610037SARM gem5 Developers case 1: 70710037SARM gem5 Developers return MISCREG_TTBR1; 70810037SARM gem5 Developers case 4: 70910037SARM gem5 Developers return MISCREG_HTTBR; 71010037SARM gem5 Developers case 6: 71110037SARM gem5 Developers return MISCREG_VTTBR; 71210037SARM gem5 Developers } 71310037SARM gem5 Developers break; 71410037SARM gem5 Developers case 7: 71510037SARM gem5 Developers if (opc1 == 0) 71610037SARM gem5 Developers return MISCREG_PAR; 71710037SARM gem5 Developers break; 71810037SARM gem5 Developers case 14: 71910037SARM gem5 Developers switch (opc1) { 72010037SARM gem5 Developers case 0: 72110037SARM gem5 Developers return MISCREG_CNTPCT; 72210037SARM gem5 Developers case 1: 72310037SARM gem5 Developers return MISCREG_CNTVCT; 72410037SARM gem5 Developers case 2: 72510037SARM gem5 Developers return MISCREG_CNTP_CVAL; 72610037SARM gem5 Developers case 3: 72710037SARM gem5 Developers return MISCREG_CNTV_CVAL; 72810037SARM gem5 Developers case 4: 72910037SARM gem5 Developers return MISCREG_CNTVOFF; 73010037SARM gem5 Developers case 6: 73110037SARM gem5 Developers return MISCREG_CNTHP_CVAL; 73210037SARM gem5 Developers } 73310037SARM gem5 Developers break; 73410037SARM gem5 Developers case 15: 73510037SARM gem5 Developers if (opc1 == 0) 73610037SARM gem5 Developers return MISCREG_CPUMERRSR; 73710037SARM gem5 Developers else if (opc1 == 1) 73810037SARM gem5 Developers return MISCREG_L2MERRSR; 73910037SARM gem5 Developers break; 74010037SARM gem5 Developers } 74110037SARM gem5 Developers // Unrecognized register 74210037SARM gem5 Developers return MISCREG_CP15_UNIMPL; 7438902Sandreas.hansson@arm.com} 74410037SARM gem5 Developers 74511939Snikos.nikoleris@arm.comstd::tuple<bool, bool> 74611939Snikos.nikoleris@arm.comcanReadCoprocReg(MiscRegIndex reg, SCR scr, CPSR cpsr) 74710037SARM gem5 Developers{ 74810037SARM gem5 Developers bool secure = !scr.ns; 74911939Snikos.nikoleris@arm.com bool canRead = false; 75011939Snikos.nikoleris@arm.com bool undefined = false; 75110037SARM gem5 Developers 75210037SARM gem5 Developers switch (cpsr.mode) { 75310037SARM gem5 Developers case MODE_USER: 75410037SARM gem5 Developers canRead = secure ? miscRegInfo[reg][MISCREG_USR_S_RD] : 75510037SARM gem5 Developers miscRegInfo[reg][MISCREG_USR_NS_RD]; 75610037SARM gem5 Developers break; 75710037SARM gem5 Developers case MODE_FIQ: 75810037SARM gem5 Developers case MODE_IRQ: 75910037SARM gem5 Developers case MODE_SVC: 76010037SARM gem5 Developers case MODE_ABORT: 76110037SARM gem5 Developers case MODE_UNDEFINED: 76210037SARM gem5 Developers case MODE_SYSTEM: 76310037SARM gem5 Developers canRead = secure ? miscRegInfo[reg][MISCREG_PRI_S_RD] : 76410037SARM gem5 Developers miscRegInfo[reg][MISCREG_PRI_NS_RD]; 76510037SARM gem5 Developers break; 76610037SARM gem5 Developers case MODE_MON: 76710037SARM gem5 Developers canRead = secure ? miscRegInfo[reg][MISCREG_MON_NS0_RD] : 76810037SARM gem5 Developers miscRegInfo[reg][MISCREG_MON_NS1_RD]; 76910037SARM gem5 Developers break; 77010037SARM gem5 Developers case MODE_HYP: 77110037SARM gem5 Developers canRead = miscRegInfo[reg][MISCREG_HYP_RD]; 77210037SARM gem5 Developers break; 77310037SARM gem5 Developers default: 77411939Snikos.nikoleris@arm.com undefined = true; 77510037SARM gem5 Developers } 77610037SARM gem5 Developers // can't do permissions checkes on the root of a banked pair of regs 77710037SARM gem5 Developers assert(!miscRegInfo[reg][MISCREG_BANKED]); 77811939Snikos.nikoleris@arm.com return std::make_tuple(canRead, undefined); 77910037SARM gem5 Developers} 78010037SARM gem5 Developers 78111939Snikos.nikoleris@arm.comstd::tuple<bool, bool> 78211939Snikos.nikoleris@arm.comcanWriteCoprocReg(MiscRegIndex reg, SCR scr, CPSR cpsr) 78310037SARM gem5 Developers{ 78410037SARM gem5 Developers bool secure = !scr.ns; 78511939Snikos.nikoleris@arm.com bool canWrite = false; 78611939Snikos.nikoleris@arm.com bool undefined = false; 78710037SARM gem5 Developers 78810037SARM gem5 Developers switch (cpsr.mode) { 78910037SARM gem5 Developers case MODE_USER: 79010037SARM gem5 Developers canWrite = secure ? miscRegInfo[reg][MISCREG_USR_S_WR] : 79110037SARM gem5 Developers miscRegInfo[reg][MISCREG_USR_NS_WR]; 79210037SARM gem5 Developers break; 79310037SARM gem5 Developers case MODE_FIQ: 79410037SARM gem5 Developers case MODE_IRQ: 79510037SARM gem5 Developers case MODE_SVC: 79610037SARM gem5 Developers case MODE_ABORT: 79710037SARM gem5 Developers case MODE_UNDEFINED: 79810037SARM gem5 Developers case MODE_SYSTEM: 79910037SARM gem5 Developers canWrite = secure ? miscRegInfo[reg][MISCREG_PRI_S_WR] : 80010037SARM gem5 Developers miscRegInfo[reg][MISCREG_PRI_NS_WR]; 80110037SARM gem5 Developers break; 80210037SARM gem5 Developers case MODE_MON: 80310037SARM gem5 Developers canWrite = secure ? miscRegInfo[reg][MISCREG_MON_NS0_WR] : 80410037SARM gem5 Developers miscRegInfo[reg][MISCREG_MON_NS1_WR]; 80510037SARM gem5 Developers break; 80610037SARM gem5 Developers case MODE_HYP: 80710037SARM gem5 Developers canWrite = miscRegInfo[reg][MISCREG_HYP_WR]; 80810037SARM gem5 Developers break; 80910037SARM gem5 Developers default: 81011939Snikos.nikoleris@arm.com undefined = true; 81110037SARM gem5 Developers } 81210037SARM gem5 Developers // can't do permissions checkes on the root of a banked pair of regs 81310037SARM gem5 Developers assert(!miscRegInfo[reg][MISCREG_BANKED]); 81411939Snikos.nikoleris@arm.com return std::make_tuple(canWrite, undefined); 81510037SARM gem5 Developers} 81610037SARM gem5 Developers 81710037SARM gem5 Developersint 81812499Sgiacomo.travaglini@arm.comsnsBankedIndex(MiscRegIndex reg, ThreadContext *tc) 81910037SARM gem5 Developers{ 82011771SCurtis.Dunham@arm.com SCR scr = tc->readMiscReg(MISCREG_SCR); 82112499Sgiacomo.travaglini@arm.com return snsBankedIndex(reg, tc, scr.ns); 82210037SARM gem5 Developers} 82310037SARM gem5 Developers 82410037SARM gem5 Developersint 82512499Sgiacomo.travaglini@arm.comsnsBankedIndex(MiscRegIndex reg, ThreadContext *tc, bool ns) 82610037SARM gem5 Developers{ 82710421Sandreas.hansson@arm.com int reg_as_int = static_cast<int>(reg); 82810037SARM gem5 Developers if (miscRegInfo[reg][MISCREG_BANKED]) { 82911771SCurtis.Dunham@arm.com reg_as_int += (ArmSystem::haveSecurity(tc) && 83011771SCurtis.Dunham@arm.com !ArmSystem::highestELIs64(tc) && !ns) ? 2 : 1; 83110037SARM gem5 Developers } 83210421Sandreas.hansson@arm.com return reg_as_int; 83310037SARM gem5 Developers} 83410037SARM gem5 Developers 83510037SARM gem5 Developers 83610037SARM gem5 Developers/** 83710037SARM gem5 Developers * If the reg is a child reg of a banked set, then the parent is the last 83810037SARM gem5 Developers * banked one in the list. This is messy, and the wish is to eventually have 83910037SARM gem5 Developers * the bitmap replaced with a better data structure. the preUnflatten function 84010037SARM gem5 Developers * initializes a lookup table to speed up the search for these banked 84110037SARM gem5 Developers * registers. 84210037SARM gem5 Developers */ 84310037SARM gem5 Developers 84410037SARM gem5 Developersint unflattenResultMiscReg[NUM_MISCREGS]; 84510037SARM gem5 Developers 84610037SARM gem5 Developersvoid 84710037SARM gem5 DeveloperspreUnflattenMiscReg() 84810037SARM gem5 Developers{ 84910037SARM gem5 Developers int reg = -1; 85010037SARM gem5 Developers for (int i = 0 ; i < NUM_MISCREGS; i++){ 85110037SARM gem5 Developers if (miscRegInfo[i][MISCREG_BANKED]) 85210037SARM gem5 Developers reg = i; 85310037SARM gem5 Developers if (miscRegInfo[i][MISCREG_BANKED_CHILD]) 85410037SARM gem5 Developers unflattenResultMiscReg[i] = reg; 85510037SARM gem5 Developers else 85610037SARM gem5 Developers unflattenResultMiscReg[i] = i; 85710037SARM gem5 Developers // if this assert fails, no parent was found, and something is broken 85810037SARM gem5 Developers assert(unflattenResultMiscReg[i] > -1); 85910037SARM gem5 Developers } 86010037SARM gem5 Developers} 86110037SARM gem5 Developers 86210037SARM gem5 Developersint 86310037SARM gem5 DevelopersunflattenMiscReg(int reg) 86410037SARM gem5 Developers{ 86510037SARM gem5 Developers return unflattenResultMiscReg[reg]; 86610037SARM gem5 Developers} 86710037SARM gem5 Developers 86810037SARM gem5 Developersbool 86910037SARM gem5 DeveloperscanReadAArch64SysReg(MiscRegIndex reg, SCR scr, CPSR cpsr, ThreadContext *tc) 87010037SARM gem5 Developers{ 87110037SARM gem5 Developers // Check for SP_EL0 access while SPSEL == 0 87210037SARM gem5 Developers if ((reg == MISCREG_SP_EL0) && (tc->readMiscReg(MISCREG_SPSEL) == 0)) 87310037SARM gem5 Developers return false; 87410037SARM gem5 Developers 87510037SARM gem5 Developers // Check for RVBAR access 87610037SARM gem5 Developers if (reg == MISCREG_RVBAR_EL1) { 87710037SARM gem5 Developers ExceptionLevel highest_el = ArmSystem::highestEL(tc); 87810037SARM gem5 Developers if (highest_el == EL2 || highest_el == EL3) 87910037SARM gem5 Developers return false; 88010037SARM gem5 Developers } 88110037SARM gem5 Developers if (reg == MISCREG_RVBAR_EL2) { 88210037SARM gem5 Developers ExceptionLevel highest_el = ArmSystem::highestEL(tc); 88310037SARM gem5 Developers if (highest_el == EL3) 88410037SARM gem5 Developers return false; 88510037SARM gem5 Developers } 88610037SARM gem5 Developers 88710037SARM gem5 Developers bool secure = ArmSystem::haveSecurity(tc) && !scr.ns; 88810037SARM gem5 Developers 88910037SARM gem5 Developers switch (opModeToEL((OperatingMode) (uint8_t) cpsr.mode)) { 89010037SARM gem5 Developers case EL0: 89110037SARM gem5 Developers return secure ? miscRegInfo[reg][MISCREG_USR_S_RD] : 89210037SARM gem5 Developers miscRegInfo[reg][MISCREG_USR_NS_RD]; 89310037SARM gem5 Developers case EL1: 89410037SARM gem5 Developers return secure ? miscRegInfo[reg][MISCREG_PRI_S_RD] : 89510037SARM gem5 Developers miscRegInfo[reg][MISCREG_PRI_NS_RD]; 89611574SCurtis.Dunham@arm.com case EL2: 89711574SCurtis.Dunham@arm.com return miscRegInfo[reg][MISCREG_HYP_RD]; 89810037SARM gem5 Developers case EL3: 89910037SARM gem5 Developers return secure ? miscRegInfo[reg][MISCREG_MON_NS0_RD] : 90010037SARM gem5 Developers miscRegInfo[reg][MISCREG_MON_NS1_RD]; 90110037SARM gem5 Developers default: 90210037SARM gem5 Developers panic("Invalid exception level"); 90310037SARM gem5 Developers } 90410037SARM gem5 Developers} 90510037SARM gem5 Developers 90610037SARM gem5 Developersbool 90710037SARM gem5 DeveloperscanWriteAArch64SysReg(MiscRegIndex reg, SCR scr, CPSR cpsr, ThreadContext *tc) 90810037SARM gem5 Developers{ 90910037SARM gem5 Developers // Check for SP_EL0 access while SPSEL == 0 91010037SARM gem5 Developers if ((reg == MISCREG_SP_EL0) && (tc->readMiscReg(MISCREG_SPSEL) == 0)) 91110037SARM gem5 Developers return false; 91210037SARM gem5 Developers ExceptionLevel el = opModeToEL((OperatingMode) (uint8_t) cpsr.mode); 91310037SARM gem5 Developers if (reg == MISCREG_DAIF) { 91410037SARM gem5 Developers SCTLR sctlr = tc->readMiscReg(MISCREG_SCTLR_EL1); 91510037SARM gem5 Developers if (el == EL0 && !sctlr.uma) 91610037SARM gem5 Developers return false; 91710037SARM gem5 Developers } 91810828SGiacomo.Gabrielli@arm.com if (FullSystem && reg == MISCREG_DC_ZVA_Xt) { 91910828SGiacomo.Gabrielli@arm.com // In syscall-emulation mode, this test is skipped and DCZVA is always 92010828SGiacomo.Gabrielli@arm.com // allowed at EL0 92110037SARM gem5 Developers SCTLR sctlr = tc->readMiscReg(MISCREG_SCTLR_EL1); 92210037SARM gem5 Developers if (el == EL0 && !sctlr.dze) 92310037SARM gem5 Developers return false; 92410037SARM gem5 Developers } 92512240Snikos.nikoleris@arm.com if (reg == MISCREG_DC_CVAC_Xt || reg == MISCREG_DC_CIVAC_Xt || 92612240Snikos.nikoleris@arm.com reg == MISCREG_DC_IVAC_Xt) { 92710037SARM gem5 Developers SCTLR sctlr = tc->readMiscReg(MISCREG_SCTLR_EL1); 92810037SARM gem5 Developers if (el == EL0 && !sctlr.uci) 92910037SARM gem5 Developers return false; 93010037SARM gem5 Developers } 93110037SARM gem5 Developers 93210037SARM gem5 Developers bool secure = ArmSystem::haveSecurity(tc) && !scr.ns; 93310037SARM gem5 Developers 93410037SARM gem5 Developers switch (el) { 93510037SARM gem5 Developers case EL0: 93610037SARM gem5 Developers return secure ? miscRegInfo[reg][MISCREG_USR_S_WR] : 93710037SARM gem5 Developers miscRegInfo[reg][MISCREG_USR_NS_WR]; 93810037SARM gem5 Developers case EL1: 93910037SARM gem5 Developers return secure ? miscRegInfo[reg][MISCREG_PRI_S_WR] : 94010037SARM gem5 Developers miscRegInfo[reg][MISCREG_PRI_NS_WR]; 94111574SCurtis.Dunham@arm.com case EL2: 94211574SCurtis.Dunham@arm.com return miscRegInfo[reg][MISCREG_HYP_WR]; 94310037SARM gem5 Developers case EL3: 94410037SARM gem5 Developers return secure ? miscRegInfo[reg][MISCREG_MON_NS0_WR] : 94510037SARM gem5 Developers miscRegInfo[reg][MISCREG_MON_NS1_WR]; 94610037SARM gem5 Developers default: 94710037SARM gem5 Developers panic("Invalid exception level"); 94810037SARM gem5 Developers } 94910037SARM gem5 Developers} 95010037SARM gem5 Developers 95110037SARM gem5 DevelopersMiscRegIndex 95210037SARM gem5 DevelopersdecodeAArch64SysReg(unsigned op0, unsigned op1, 95310037SARM gem5 Developers unsigned crn, unsigned crm, 95410037SARM gem5 Developers unsigned op2) 95510037SARM gem5 Developers{ 95610037SARM gem5 Developers switch (op0) { 95710037SARM gem5 Developers case 1: 95810037SARM gem5 Developers switch (crn) { 95910037SARM gem5 Developers case 7: 96010037SARM gem5 Developers switch (op1) { 96110037SARM gem5 Developers case 0: 96210037SARM gem5 Developers switch (crm) { 96310037SARM gem5 Developers case 1: 96410037SARM gem5 Developers switch (op2) { 96510037SARM gem5 Developers case 0: 96610037SARM gem5 Developers return MISCREG_IC_IALLUIS; 96710037SARM gem5 Developers } 96810037SARM gem5 Developers break; 96910037SARM gem5 Developers case 5: 97010037SARM gem5 Developers switch (op2) { 97110037SARM gem5 Developers case 0: 97210037SARM gem5 Developers return MISCREG_IC_IALLU; 97310037SARM gem5 Developers } 97410037SARM gem5 Developers break; 97510037SARM gem5 Developers case 6: 97610037SARM gem5 Developers switch (op2) { 97710037SARM gem5 Developers case 1: 97810037SARM gem5 Developers return MISCREG_DC_IVAC_Xt; 97910037SARM gem5 Developers case 2: 98010037SARM gem5 Developers return MISCREG_DC_ISW_Xt; 98110037SARM gem5 Developers } 98210037SARM gem5 Developers break; 98310037SARM gem5 Developers case 8: 98410037SARM gem5 Developers switch (op2) { 98510037SARM gem5 Developers case 0: 98610037SARM gem5 Developers return MISCREG_AT_S1E1R_Xt; 98710037SARM gem5 Developers case 1: 98810037SARM gem5 Developers return MISCREG_AT_S1E1W_Xt; 98910037SARM gem5 Developers case 2: 99010037SARM gem5 Developers return MISCREG_AT_S1E0R_Xt; 99110037SARM gem5 Developers case 3: 99210037SARM gem5 Developers return MISCREG_AT_S1E0W_Xt; 99310037SARM gem5 Developers } 99410037SARM gem5 Developers break; 99510037SARM gem5 Developers case 10: 99610037SARM gem5 Developers switch (op2) { 99710037SARM gem5 Developers case 2: 99810037SARM gem5 Developers return MISCREG_DC_CSW_Xt; 99910037SARM gem5 Developers } 100010037SARM gem5 Developers break; 100110037SARM gem5 Developers case 14: 100210037SARM gem5 Developers switch (op2) { 100310037SARM gem5 Developers case 2: 100410037SARM gem5 Developers return MISCREG_DC_CISW_Xt; 100510037SARM gem5 Developers } 100610037SARM gem5 Developers break; 100710037SARM gem5 Developers } 100810037SARM gem5 Developers break; 100910037SARM gem5 Developers case 3: 101010037SARM gem5 Developers switch (crm) { 101110037SARM gem5 Developers case 4: 101210037SARM gem5 Developers switch (op2) { 101310037SARM gem5 Developers case 1: 101410037SARM gem5 Developers return MISCREG_DC_ZVA_Xt; 101510037SARM gem5 Developers } 101610037SARM gem5 Developers break; 101710037SARM gem5 Developers case 5: 101810037SARM gem5 Developers switch (op2) { 101910037SARM gem5 Developers case 1: 102010037SARM gem5 Developers return MISCREG_IC_IVAU_Xt; 102110037SARM gem5 Developers } 102210037SARM gem5 Developers break; 102310037SARM gem5 Developers case 10: 102410037SARM gem5 Developers switch (op2) { 102510037SARM gem5 Developers case 1: 102610037SARM gem5 Developers return MISCREG_DC_CVAC_Xt; 102710037SARM gem5 Developers } 102810037SARM gem5 Developers break; 102910037SARM gem5 Developers case 11: 103010037SARM gem5 Developers switch (op2) { 103110037SARM gem5 Developers case 1: 103210037SARM gem5 Developers return MISCREG_DC_CVAU_Xt; 103310037SARM gem5 Developers } 103410037SARM gem5 Developers break; 103510037SARM gem5 Developers case 14: 103610037SARM gem5 Developers switch (op2) { 103710037SARM gem5 Developers case 1: 103810037SARM gem5 Developers return MISCREG_DC_CIVAC_Xt; 103910037SARM gem5 Developers } 104010037SARM gem5 Developers break; 104110037SARM gem5 Developers } 104210037SARM gem5 Developers break; 104310037SARM gem5 Developers case 4: 104410037SARM gem5 Developers switch (crm) { 104510037SARM gem5 Developers case 8: 104610037SARM gem5 Developers switch (op2) { 104710037SARM gem5 Developers case 0: 104810037SARM gem5 Developers return MISCREG_AT_S1E2R_Xt; 104910037SARM gem5 Developers case 1: 105010037SARM gem5 Developers return MISCREG_AT_S1E2W_Xt; 105110037SARM gem5 Developers case 4: 105210037SARM gem5 Developers return MISCREG_AT_S12E1R_Xt; 105310037SARM gem5 Developers case 5: 105410037SARM gem5 Developers return MISCREG_AT_S12E1W_Xt; 105510037SARM gem5 Developers case 6: 105610037SARM gem5 Developers return MISCREG_AT_S12E0R_Xt; 105710037SARM gem5 Developers case 7: 105810037SARM gem5 Developers return MISCREG_AT_S12E0W_Xt; 105910037SARM gem5 Developers } 106010037SARM gem5 Developers break; 106110037SARM gem5 Developers } 106210037SARM gem5 Developers break; 106310037SARM gem5 Developers case 6: 106410037SARM gem5 Developers switch (crm) { 106510037SARM gem5 Developers case 8: 106610037SARM gem5 Developers switch (op2) { 106710037SARM gem5 Developers case 0: 106810037SARM gem5 Developers return MISCREG_AT_S1E3R_Xt; 106910037SARM gem5 Developers case 1: 107010037SARM gem5 Developers return MISCREG_AT_S1E3W_Xt; 107110037SARM gem5 Developers } 107210037SARM gem5 Developers break; 107310037SARM gem5 Developers } 107410037SARM gem5 Developers break; 107510037SARM gem5 Developers } 107610037SARM gem5 Developers break; 107710037SARM gem5 Developers case 8: 107810037SARM gem5 Developers switch (op1) { 107910037SARM gem5 Developers case 0: 108010037SARM gem5 Developers switch (crm) { 108110037SARM gem5 Developers case 3: 108210037SARM gem5 Developers switch (op2) { 108310037SARM gem5 Developers case 0: 108410037SARM gem5 Developers return MISCREG_TLBI_VMALLE1IS; 108510037SARM gem5 Developers case 1: 108610037SARM gem5 Developers return MISCREG_TLBI_VAE1IS_Xt; 108710037SARM gem5 Developers case 2: 108810037SARM gem5 Developers return MISCREG_TLBI_ASIDE1IS_Xt; 108910037SARM gem5 Developers case 3: 109010037SARM gem5 Developers return MISCREG_TLBI_VAAE1IS_Xt; 109110037SARM gem5 Developers case 5: 109210037SARM gem5 Developers return MISCREG_TLBI_VALE1IS_Xt; 109310037SARM gem5 Developers case 7: 109410037SARM gem5 Developers return MISCREG_TLBI_VAALE1IS_Xt; 109510037SARM gem5 Developers } 109610037SARM gem5 Developers break; 109710037SARM gem5 Developers case 7: 109810037SARM gem5 Developers switch (op2) { 109910037SARM gem5 Developers case 0: 110010037SARM gem5 Developers return MISCREG_TLBI_VMALLE1; 110110037SARM gem5 Developers case 1: 110210037SARM gem5 Developers return MISCREG_TLBI_VAE1_Xt; 110310037SARM gem5 Developers case 2: 110410037SARM gem5 Developers return MISCREG_TLBI_ASIDE1_Xt; 110510037SARM gem5 Developers case 3: 110610037SARM gem5 Developers return MISCREG_TLBI_VAAE1_Xt; 110710037SARM gem5 Developers case 5: 110810037SARM gem5 Developers return MISCREG_TLBI_VALE1_Xt; 110910037SARM gem5 Developers case 7: 111010037SARM gem5 Developers return MISCREG_TLBI_VAALE1_Xt; 111110037SARM gem5 Developers } 111210037SARM gem5 Developers break; 111310037SARM gem5 Developers } 111410037SARM gem5 Developers break; 111510037SARM gem5 Developers case 4: 111610037SARM gem5 Developers switch (crm) { 111710037SARM gem5 Developers case 0: 111810037SARM gem5 Developers switch (op2) { 111910037SARM gem5 Developers case 1: 112010037SARM gem5 Developers return MISCREG_TLBI_IPAS2E1IS_Xt; 112110037SARM gem5 Developers case 5: 112210037SARM gem5 Developers return MISCREG_TLBI_IPAS2LE1IS_Xt; 112310037SARM gem5 Developers } 112410037SARM gem5 Developers break; 112510037SARM gem5 Developers case 3: 112610037SARM gem5 Developers switch (op2) { 112710037SARM gem5 Developers case 0: 112810037SARM gem5 Developers return MISCREG_TLBI_ALLE2IS; 112910037SARM gem5 Developers case 1: 113010037SARM gem5 Developers return MISCREG_TLBI_VAE2IS_Xt; 113110037SARM gem5 Developers case 4: 113210037SARM gem5 Developers return MISCREG_TLBI_ALLE1IS; 113310037SARM gem5 Developers case 5: 113410037SARM gem5 Developers return MISCREG_TLBI_VALE2IS_Xt; 113510037SARM gem5 Developers case 6: 113610037SARM gem5 Developers return MISCREG_TLBI_VMALLS12E1IS; 113710037SARM gem5 Developers } 113810037SARM gem5 Developers break; 113910037SARM gem5 Developers case 4: 114010037SARM gem5 Developers switch (op2) { 114110037SARM gem5 Developers case 1: 114210037SARM gem5 Developers return MISCREG_TLBI_IPAS2E1_Xt; 114310037SARM gem5 Developers case 5: 114410037SARM gem5 Developers return MISCREG_TLBI_IPAS2LE1_Xt; 114510037SARM gem5 Developers } 114610037SARM gem5 Developers break; 114710037SARM gem5 Developers case 7: 114810037SARM gem5 Developers switch (op2) { 114910037SARM gem5 Developers case 0: 115010037SARM gem5 Developers return MISCREG_TLBI_ALLE2; 115110037SARM gem5 Developers case 1: 115210037SARM gem5 Developers return MISCREG_TLBI_VAE2_Xt; 115310037SARM gem5 Developers case 4: 115410037SARM gem5 Developers return MISCREG_TLBI_ALLE1; 115510037SARM gem5 Developers case 5: 115610037SARM gem5 Developers return MISCREG_TLBI_VALE2_Xt; 115710037SARM gem5 Developers case 6: 115810037SARM gem5 Developers return MISCREG_TLBI_VMALLS12E1; 115910037SARM gem5 Developers } 116010037SARM gem5 Developers break; 116110037SARM gem5 Developers } 116210037SARM gem5 Developers break; 116310037SARM gem5 Developers case 6: 116410037SARM gem5 Developers switch (crm) { 116510037SARM gem5 Developers case 3: 116610037SARM gem5 Developers switch (op2) { 116710037SARM gem5 Developers case 0: 116810037SARM gem5 Developers return MISCREG_TLBI_ALLE3IS; 116910037SARM gem5 Developers case 1: 117010037SARM gem5 Developers return MISCREG_TLBI_VAE3IS_Xt; 117110037SARM gem5 Developers case 5: 117210037SARM gem5 Developers return MISCREG_TLBI_VALE3IS_Xt; 117310037SARM gem5 Developers } 117410037SARM gem5 Developers break; 117510037SARM gem5 Developers case 7: 117610037SARM gem5 Developers switch (op2) { 117710037SARM gem5 Developers case 0: 117810037SARM gem5 Developers return MISCREG_TLBI_ALLE3; 117910037SARM gem5 Developers case 1: 118010037SARM gem5 Developers return MISCREG_TLBI_VAE3_Xt; 118110037SARM gem5 Developers case 5: 118210037SARM gem5 Developers return MISCREG_TLBI_VALE3_Xt; 118310037SARM gem5 Developers } 118410037SARM gem5 Developers break; 118510037SARM gem5 Developers } 118610037SARM gem5 Developers break; 118710037SARM gem5 Developers } 118810037SARM gem5 Developers break; 118910037SARM gem5 Developers } 119010037SARM gem5 Developers break; 119110037SARM gem5 Developers case 2: 119210037SARM gem5 Developers switch (crn) { 119310037SARM gem5 Developers case 0: 119410037SARM gem5 Developers switch (op1) { 119510037SARM gem5 Developers case 0: 119610037SARM gem5 Developers switch (crm) { 119710037SARM gem5 Developers case 0: 119810037SARM gem5 Developers switch (op2) { 119910037SARM gem5 Developers case 2: 120010037SARM gem5 Developers return MISCREG_OSDTRRX_EL1; 120110037SARM gem5 Developers case 4: 120210037SARM gem5 Developers return MISCREG_DBGBVR0_EL1; 120310037SARM gem5 Developers case 5: 120410037SARM gem5 Developers return MISCREG_DBGBCR0_EL1; 120510037SARM gem5 Developers case 6: 120610037SARM gem5 Developers return MISCREG_DBGWVR0_EL1; 120710037SARM gem5 Developers case 7: 120810037SARM gem5 Developers return MISCREG_DBGWCR0_EL1; 120910037SARM gem5 Developers } 121010037SARM gem5 Developers break; 121110037SARM gem5 Developers case 1: 121210037SARM gem5 Developers switch (op2) { 121310037SARM gem5 Developers case 4: 121410037SARM gem5 Developers return MISCREG_DBGBVR1_EL1; 121510037SARM gem5 Developers case 5: 121610037SARM gem5 Developers return MISCREG_DBGBCR1_EL1; 121710037SARM gem5 Developers case 6: 121810037SARM gem5 Developers return MISCREG_DBGWVR1_EL1; 121910037SARM gem5 Developers case 7: 122010037SARM gem5 Developers return MISCREG_DBGWCR1_EL1; 122110037SARM gem5 Developers } 122210037SARM gem5 Developers break; 122310037SARM gem5 Developers case 2: 122410037SARM gem5 Developers switch (op2) { 122510037SARM gem5 Developers case 0: 122610037SARM gem5 Developers return MISCREG_MDCCINT_EL1; 122710037SARM gem5 Developers case 2: 122810037SARM gem5 Developers return MISCREG_MDSCR_EL1; 122910037SARM gem5 Developers case 4: 123010037SARM gem5 Developers return MISCREG_DBGBVR2_EL1; 123110037SARM gem5 Developers case 5: 123210037SARM gem5 Developers return MISCREG_DBGBCR2_EL1; 123310037SARM gem5 Developers case 6: 123410037SARM gem5 Developers return MISCREG_DBGWVR2_EL1; 123510037SARM gem5 Developers case 7: 123610037SARM gem5 Developers return MISCREG_DBGWCR2_EL1; 123710037SARM gem5 Developers } 123810037SARM gem5 Developers break; 123910037SARM gem5 Developers case 3: 124010037SARM gem5 Developers switch (op2) { 124110037SARM gem5 Developers case 2: 124210037SARM gem5 Developers return MISCREG_OSDTRTX_EL1; 124310037SARM gem5 Developers case 4: 124410037SARM gem5 Developers return MISCREG_DBGBVR3_EL1; 124510037SARM gem5 Developers case 5: 124610037SARM gem5 Developers return MISCREG_DBGBCR3_EL1; 124710037SARM gem5 Developers case 6: 124810037SARM gem5 Developers return MISCREG_DBGWVR3_EL1; 124910037SARM gem5 Developers case 7: 125010037SARM gem5 Developers return MISCREG_DBGWCR3_EL1; 125110037SARM gem5 Developers } 125210037SARM gem5 Developers break; 125310037SARM gem5 Developers case 4: 125410037SARM gem5 Developers switch (op2) { 125510037SARM gem5 Developers case 4: 125610037SARM gem5 Developers return MISCREG_DBGBVR4_EL1; 125710037SARM gem5 Developers case 5: 125810037SARM gem5 Developers return MISCREG_DBGBCR4_EL1; 125910037SARM gem5 Developers } 126010037SARM gem5 Developers break; 126110037SARM gem5 Developers case 5: 126210037SARM gem5 Developers switch (op2) { 126310037SARM gem5 Developers case 4: 126410037SARM gem5 Developers return MISCREG_DBGBVR5_EL1; 126510037SARM gem5 Developers case 5: 126610037SARM gem5 Developers return MISCREG_DBGBCR5_EL1; 126710037SARM gem5 Developers } 126810037SARM gem5 Developers break; 126910037SARM gem5 Developers case 6: 127010037SARM gem5 Developers switch (op2) { 127110037SARM gem5 Developers case 2: 127210037SARM gem5 Developers return MISCREG_OSECCR_EL1; 127310037SARM gem5 Developers } 127410037SARM gem5 Developers break; 127510037SARM gem5 Developers } 127610037SARM gem5 Developers break; 127710037SARM gem5 Developers case 2: 127810037SARM gem5 Developers switch (crm) { 127910037SARM gem5 Developers case 0: 128010037SARM gem5 Developers switch (op2) { 128110037SARM gem5 Developers case 0: 128210037SARM gem5 Developers return MISCREG_TEECR32_EL1; 128310037SARM gem5 Developers } 128410037SARM gem5 Developers break; 128510037SARM gem5 Developers } 128610037SARM gem5 Developers break; 128710037SARM gem5 Developers case 3: 128810037SARM gem5 Developers switch (crm) { 128910037SARM gem5 Developers case 1: 129010037SARM gem5 Developers switch (op2) { 129110037SARM gem5 Developers case 0: 129210037SARM gem5 Developers return MISCREG_MDCCSR_EL0; 129310037SARM gem5 Developers } 129410037SARM gem5 Developers break; 129510037SARM gem5 Developers case 4: 129610037SARM gem5 Developers switch (op2) { 129710037SARM gem5 Developers case 0: 129810037SARM gem5 Developers return MISCREG_MDDTR_EL0; 129910037SARM gem5 Developers } 130010037SARM gem5 Developers break; 130110037SARM gem5 Developers case 5: 130210037SARM gem5 Developers switch (op2) { 130310037SARM gem5 Developers case 0: 130410037SARM gem5 Developers return MISCREG_MDDTRRX_EL0; 130510037SARM gem5 Developers } 130610037SARM gem5 Developers break; 130710037SARM gem5 Developers } 130810037SARM gem5 Developers break; 130910037SARM gem5 Developers case 4: 131010037SARM gem5 Developers switch (crm) { 131110037SARM gem5 Developers case 7: 131210037SARM gem5 Developers switch (op2) { 131310037SARM gem5 Developers case 0: 131410037SARM gem5 Developers return MISCREG_DBGVCR32_EL2; 131510037SARM gem5 Developers } 131610037SARM gem5 Developers break; 131710037SARM gem5 Developers } 131810037SARM gem5 Developers break; 131910037SARM gem5 Developers } 132010037SARM gem5 Developers break; 132110037SARM gem5 Developers case 1: 132210037SARM gem5 Developers switch (op1) { 132310037SARM gem5 Developers case 0: 132410037SARM gem5 Developers switch (crm) { 132510037SARM gem5 Developers case 0: 132610037SARM gem5 Developers switch (op2) { 132710037SARM gem5 Developers case 0: 132810037SARM gem5 Developers return MISCREG_MDRAR_EL1; 132910037SARM gem5 Developers case 4: 133010037SARM gem5 Developers return MISCREG_OSLAR_EL1; 133110037SARM gem5 Developers } 133210037SARM gem5 Developers break; 133310037SARM gem5 Developers case 1: 133410037SARM gem5 Developers switch (op2) { 133510037SARM gem5 Developers case 4: 133610037SARM gem5 Developers return MISCREG_OSLSR_EL1; 133710037SARM gem5 Developers } 133810037SARM gem5 Developers break; 133910037SARM gem5 Developers case 3: 134010037SARM gem5 Developers switch (op2) { 134110037SARM gem5 Developers case 4: 134210037SARM gem5 Developers return MISCREG_OSDLR_EL1; 134310037SARM gem5 Developers } 134410037SARM gem5 Developers break; 134510037SARM gem5 Developers case 4: 134610037SARM gem5 Developers switch (op2) { 134710037SARM gem5 Developers case 4: 134810037SARM gem5 Developers return MISCREG_DBGPRCR_EL1; 134910037SARM gem5 Developers } 135010037SARM gem5 Developers break; 135110037SARM gem5 Developers } 135210037SARM gem5 Developers break; 135310037SARM gem5 Developers case 2: 135410037SARM gem5 Developers switch (crm) { 135510037SARM gem5 Developers case 0: 135610037SARM gem5 Developers switch (op2) { 135710037SARM gem5 Developers case 0: 135810037SARM gem5 Developers return MISCREG_TEEHBR32_EL1; 135910037SARM gem5 Developers } 136010037SARM gem5 Developers break; 136110037SARM gem5 Developers } 136210037SARM gem5 Developers break; 136310037SARM gem5 Developers } 136410037SARM gem5 Developers break; 136510037SARM gem5 Developers case 7: 136610037SARM gem5 Developers switch (op1) { 136710037SARM gem5 Developers case 0: 136810037SARM gem5 Developers switch (crm) { 136910037SARM gem5 Developers case 8: 137010037SARM gem5 Developers switch (op2) { 137110037SARM gem5 Developers case 6: 137210037SARM gem5 Developers return MISCREG_DBGCLAIMSET_EL1; 137310037SARM gem5 Developers } 137410037SARM gem5 Developers break; 137510037SARM gem5 Developers case 9: 137610037SARM gem5 Developers switch (op2) { 137710037SARM gem5 Developers case 6: 137810037SARM gem5 Developers return MISCREG_DBGCLAIMCLR_EL1; 137910037SARM gem5 Developers } 138010037SARM gem5 Developers break; 138110037SARM gem5 Developers case 14: 138210037SARM gem5 Developers switch (op2) { 138310037SARM gem5 Developers case 6: 138410037SARM gem5 Developers return MISCREG_DBGAUTHSTATUS_EL1; 138510037SARM gem5 Developers } 138610037SARM gem5 Developers break; 138710037SARM gem5 Developers } 138810037SARM gem5 Developers break; 138910037SARM gem5 Developers } 139010037SARM gem5 Developers break; 139110037SARM gem5 Developers } 139210037SARM gem5 Developers break; 139310037SARM gem5 Developers case 3: 139410037SARM gem5 Developers switch (crn) { 139510037SARM gem5 Developers case 0: 139610037SARM gem5 Developers switch (op1) { 139710037SARM gem5 Developers case 0: 139810037SARM gem5 Developers switch (crm) { 139910037SARM gem5 Developers case 0: 140010037SARM gem5 Developers switch (op2) { 140110037SARM gem5 Developers case 0: 140210037SARM gem5 Developers return MISCREG_MIDR_EL1; 140310037SARM gem5 Developers case 5: 140410037SARM gem5 Developers return MISCREG_MPIDR_EL1; 140510037SARM gem5 Developers case 6: 140610037SARM gem5 Developers return MISCREG_REVIDR_EL1; 140710037SARM gem5 Developers } 140810037SARM gem5 Developers break; 140910037SARM gem5 Developers case 1: 141010037SARM gem5 Developers switch (op2) { 141110037SARM gem5 Developers case 0: 141210037SARM gem5 Developers return MISCREG_ID_PFR0_EL1; 141310037SARM gem5 Developers case 1: 141410037SARM gem5 Developers return MISCREG_ID_PFR1_EL1; 141510037SARM gem5 Developers case 2: 141610037SARM gem5 Developers return MISCREG_ID_DFR0_EL1; 141710037SARM gem5 Developers case 3: 141810037SARM gem5 Developers return MISCREG_ID_AFR0_EL1; 141910037SARM gem5 Developers case 4: 142010037SARM gem5 Developers return MISCREG_ID_MMFR0_EL1; 142110037SARM gem5 Developers case 5: 142210037SARM gem5 Developers return MISCREG_ID_MMFR1_EL1; 142310037SARM gem5 Developers case 6: 142410037SARM gem5 Developers return MISCREG_ID_MMFR2_EL1; 142510037SARM gem5 Developers case 7: 142610037SARM gem5 Developers return MISCREG_ID_MMFR3_EL1; 142710037SARM gem5 Developers } 142810037SARM gem5 Developers break; 142910037SARM gem5 Developers case 2: 143010037SARM gem5 Developers switch (op2) { 143110037SARM gem5 Developers case 0: 143210037SARM gem5 Developers return MISCREG_ID_ISAR0_EL1; 143310037SARM gem5 Developers case 1: 143410037SARM gem5 Developers return MISCREG_ID_ISAR1_EL1; 143510037SARM gem5 Developers case 2: 143610037SARM gem5 Developers return MISCREG_ID_ISAR2_EL1; 143710037SARM gem5 Developers case 3: 143810037SARM gem5 Developers return MISCREG_ID_ISAR3_EL1; 143910037SARM gem5 Developers case 4: 144010037SARM gem5 Developers return MISCREG_ID_ISAR4_EL1; 144110037SARM gem5 Developers case 5: 144210037SARM gem5 Developers return MISCREG_ID_ISAR5_EL1; 144310037SARM gem5 Developers } 144410037SARM gem5 Developers break; 144510037SARM gem5 Developers case 3: 144610037SARM gem5 Developers switch (op2) { 144710037SARM gem5 Developers case 0: 144810037SARM gem5 Developers return MISCREG_MVFR0_EL1; 144910037SARM gem5 Developers case 1: 145010037SARM gem5 Developers return MISCREG_MVFR1_EL1; 145110037SARM gem5 Developers case 2: 145210037SARM gem5 Developers return MISCREG_MVFR2_EL1; 145310037SARM gem5 Developers case 3 ... 7: 145410037SARM gem5 Developers return MISCREG_RAZ; 145510037SARM gem5 Developers } 145610037SARM gem5 Developers break; 145710037SARM gem5 Developers case 4: 145810037SARM gem5 Developers switch (op2) { 145910037SARM gem5 Developers case 0: 146010037SARM gem5 Developers return MISCREG_ID_AA64PFR0_EL1; 146110037SARM gem5 Developers case 1: 146210037SARM gem5 Developers return MISCREG_ID_AA64PFR1_EL1; 146310037SARM gem5 Developers case 2 ... 7: 146410037SARM gem5 Developers return MISCREG_RAZ; 146510037SARM gem5 Developers } 146610037SARM gem5 Developers break; 146710037SARM gem5 Developers case 5: 146810037SARM gem5 Developers switch (op2) { 146910037SARM gem5 Developers case 0: 147010037SARM gem5 Developers return MISCREG_ID_AA64DFR0_EL1; 147110037SARM gem5 Developers case 1: 147210037SARM gem5 Developers return MISCREG_ID_AA64DFR1_EL1; 147310037SARM gem5 Developers case 4: 147410037SARM gem5 Developers return MISCREG_ID_AA64AFR0_EL1; 147510037SARM gem5 Developers case 5: 147610037SARM gem5 Developers return MISCREG_ID_AA64AFR1_EL1; 147710037SARM gem5 Developers case 2: 147810037SARM gem5 Developers case 3: 147910037SARM gem5 Developers case 6: 148010037SARM gem5 Developers case 7: 148110037SARM gem5 Developers return MISCREG_RAZ; 148210037SARM gem5 Developers } 148310037SARM gem5 Developers break; 148410037SARM gem5 Developers case 6: 148510037SARM gem5 Developers switch (op2) { 148610037SARM gem5 Developers case 0: 148710037SARM gem5 Developers return MISCREG_ID_AA64ISAR0_EL1; 148810037SARM gem5 Developers case 1: 148910037SARM gem5 Developers return MISCREG_ID_AA64ISAR1_EL1; 149010037SARM gem5 Developers case 2 ... 7: 149110037SARM gem5 Developers return MISCREG_RAZ; 149210037SARM gem5 Developers } 149310037SARM gem5 Developers break; 149410037SARM gem5 Developers case 7: 149510037SARM gem5 Developers switch (op2) { 149610037SARM gem5 Developers case 0: 149710037SARM gem5 Developers return MISCREG_ID_AA64MMFR0_EL1; 149810037SARM gem5 Developers case 1: 149910037SARM gem5 Developers return MISCREG_ID_AA64MMFR1_EL1; 150010037SARM gem5 Developers case 2 ... 7: 150110037SARM gem5 Developers return MISCREG_RAZ; 150210037SARM gem5 Developers } 150310037SARM gem5 Developers break; 150410037SARM gem5 Developers } 150510037SARM gem5 Developers break; 150610037SARM gem5 Developers case 1: 150710037SARM gem5 Developers switch (crm) { 150810037SARM gem5 Developers case 0: 150910037SARM gem5 Developers switch (op2) { 151010037SARM gem5 Developers case 0: 151110037SARM gem5 Developers return MISCREG_CCSIDR_EL1; 151210037SARM gem5 Developers case 1: 151310037SARM gem5 Developers return MISCREG_CLIDR_EL1; 151410037SARM gem5 Developers case 7: 151510037SARM gem5 Developers return MISCREG_AIDR_EL1; 151610037SARM gem5 Developers } 151710037SARM gem5 Developers break; 151810037SARM gem5 Developers } 151910037SARM gem5 Developers break; 152010037SARM gem5 Developers case 2: 152110037SARM gem5 Developers switch (crm) { 152210037SARM gem5 Developers case 0: 152310037SARM gem5 Developers switch (op2) { 152410037SARM gem5 Developers case 0: 152510037SARM gem5 Developers return MISCREG_CSSELR_EL1; 152610037SARM gem5 Developers } 152710037SARM gem5 Developers break; 152810037SARM gem5 Developers } 152910037SARM gem5 Developers break; 153010037SARM gem5 Developers case 3: 153110037SARM gem5 Developers switch (crm) { 153210037SARM gem5 Developers case 0: 153310037SARM gem5 Developers switch (op2) { 153410037SARM gem5 Developers case 1: 153510037SARM gem5 Developers return MISCREG_CTR_EL0; 153610037SARM gem5 Developers case 7: 153710037SARM gem5 Developers return MISCREG_DCZID_EL0; 153810037SARM gem5 Developers } 153910037SARM gem5 Developers break; 154010037SARM gem5 Developers } 154110037SARM gem5 Developers break; 154210037SARM gem5 Developers case 4: 154310037SARM gem5 Developers switch (crm) { 154410037SARM gem5 Developers case 0: 154510037SARM gem5 Developers switch (op2) { 154610037SARM gem5 Developers case 0: 154710037SARM gem5 Developers return MISCREG_VPIDR_EL2; 154810037SARM gem5 Developers case 5: 154910037SARM gem5 Developers return MISCREG_VMPIDR_EL2; 155010037SARM gem5 Developers } 155110037SARM gem5 Developers break; 155210037SARM gem5 Developers } 155310037SARM gem5 Developers break; 155410037SARM gem5 Developers } 155510037SARM gem5 Developers break; 155610037SARM gem5 Developers case 1: 155710037SARM gem5 Developers switch (op1) { 155810037SARM gem5 Developers case 0: 155910037SARM gem5 Developers switch (crm) { 156010037SARM gem5 Developers case 0: 156110037SARM gem5 Developers switch (op2) { 156210037SARM gem5 Developers case 0: 156310037SARM gem5 Developers return MISCREG_SCTLR_EL1; 156410037SARM gem5 Developers case 1: 156510037SARM gem5 Developers return MISCREG_ACTLR_EL1; 156610037SARM gem5 Developers case 2: 156710037SARM gem5 Developers return MISCREG_CPACR_EL1; 156810037SARM gem5 Developers } 156910037SARM gem5 Developers break; 157010037SARM gem5 Developers } 157110037SARM gem5 Developers break; 157210037SARM gem5 Developers case 4: 157310037SARM gem5 Developers switch (crm) { 157410037SARM gem5 Developers case 0: 157510037SARM gem5 Developers switch (op2) { 157610037SARM gem5 Developers case 0: 157710037SARM gem5 Developers return MISCREG_SCTLR_EL2; 157810037SARM gem5 Developers case 1: 157910037SARM gem5 Developers return MISCREG_ACTLR_EL2; 158010037SARM gem5 Developers } 158110037SARM gem5 Developers break; 158210037SARM gem5 Developers case 1: 158310037SARM gem5 Developers switch (op2) { 158410037SARM gem5 Developers case 0: 158510037SARM gem5 Developers return MISCREG_HCR_EL2; 158610037SARM gem5 Developers case 1: 158710037SARM gem5 Developers return MISCREG_MDCR_EL2; 158810037SARM gem5 Developers case 2: 158910037SARM gem5 Developers return MISCREG_CPTR_EL2; 159010037SARM gem5 Developers case 3: 159110037SARM gem5 Developers return MISCREG_HSTR_EL2; 159210037SARM gem5 Developers case 7: 159310037SARM gem5 Developers return MISCREG_HACR_EL2; 159410037SARM gem5 Developers } 159510037SARM gem5 Developers break; 159610037SARM gem5 Developers } 159710037SARM gem5 Developers break; 159810037SARM gem5 Developers case 6: 159910037SARM gem5 Developers switch (crm) { 160010037SARM gem5 Developers case 0: 160110037SARM gem5 Developers switch (op2) { 160210037SARM gem5 Developers case 0: 160310037SARM gem5 Developers return MISCREG_SCTLR_EL3; 160410037SARM gem5 Developers case 1: 160510037SARM gem5 Developers return MISCREG_ACTLR_EL3; 160610037SARM gem5 Developers } 160710037SARM gem5 Developers break; 160810037SARM gem5 Developers case 1: 160910037SARM gem5 Developers switch (op2) { 161010037SARM gem5 Developers case 0: 161110037SARM gem5 Developers return MISCREG_SCR_EL3; 161210037SARM gem5 Developers case 1: 161310037SARM gem5 Developers return MISCREG_SDER32_EL3; 161410037SARM gem5 Developers case 2: 161510037SARM gem5 Developers return MISCREG_CPTR_EL3; 161610037SARM gem5 Developers } 161710037SARM gem5 Developers break; 161810037SARM gem5 Developers case 3: 161910037SARM gem5 Developers switch (op2) { 162010037SARM gem5 Developers case 1: 162110037SARM gem5 Developers return MISCREG_MDCR_EL3; 162210037SARM gem5 Developers } 162310037SARM gem5 Developers break; 162410037SARM gem5 Developers } 162510037SARM gem5 Developers break; 162610037SARM gem5 Developers } 162710037SARM gem5 Developers break; 162810037SARM gem5 Developers case 2: 162910037SARM gem5 Developers switch (op1) { 163010037SARM gem5 Developers case 0: 163110037SARM gem5 Developers switch (crm) { 163210037SARM gem5 Developers case 0: 163310037SARM gem5 Developers switch (op2) { 163410037SARM gem5 Developers case 0: 163510037SARM gem5 Developers return MISCREG_TTBR0_EL1; 163610037SARM gem5 Developers case 1: 163710037SARM gem5 Developers return MISCREG_TTBR1_EL1; 163810037SARM gem5 Developers case 2: 163910037SARM gem5 Developers return MISCREG_TCR_EL1; 164010037SARM gem5 Developers } 164110037SARM gem5 Developers break; 164210037SARM gem5 Developers } 164310037SARM gem5 Developers break; 164410037SARM gem5 Developers case 4: 164510037SARM gem5 Developers switch (crm) { 164610037SARM gem5 Developers case 0: 164710037SARM gem5 Developers switch (op2) { 164810037SARM gem5 Developers case 0: 164910037SARM gem5 Developers return MISCREG_TTBR0_EL2; 165010037SARM gem5 Developers case 2: 165110037SARM gem5 Developers return MISCREG_TCR_EL2; 165210037SARM gem5 Developers } 165310037SARM gem5 Developers break; 165410037SARM gem5 Developers case 1: 165510037SARM gem5 Developers switch (op2) { 165610037SARM gem5 Developers case 0: 165710037SARM gem5 Developers return MISCREG_VTTBR_EL2; 165810037SARM gem5 Developers case 2: 165910037SARM gem5 Developers return MISCREG_VTCR_EL2; 166010037SARM gem5 Developers } 166110037SARM gem5 Developers break; 166210037SARM gem5 Developers } 166310037SARM gem5 Developers break; 166410037SARM gem5 Developers case 6: 166510037SARM gem5 Developers switch (crm) { 166610037SARM gem5 Developers case 0: 166710037SARM gem5 Developers switch (op2) { 166810037SARM gem5 Developers case 0: 166910037SARM gem5 Developers return MISCREG_TTBR0_EL3; 167010037SARM gem5 Developers case 2: 167110037SARM gem5 Developers return MISCREG_TCR_EL3; 167210037SARM gem5 Developers } 167310037SARM gem5 Developers break; 167410037SARM gem5 Developers } 167510037SARM gem5 Developers break; 167610037SARM gem5 Developers } 167710037SARM gem5 Developers break; 167810037SARM gem5 Developers case 3: 167910037SARM gem5 Developers switch (op1) { 168010037SARM gem5 Developers case 4: 168110037SARM gem5 Developers switch (crm) { 168210037SARM gem5 Developers case 0: 168310037SARM gem5 Developers switch (op2) { 168410037SARM gem5 Developers case 0: 168510037SARM gem5 Developers return MISCREG_DACR32_EL2; 168610037SARM gem5 Developers } 168710037SARM gem5 Developers break; 168810037SARM gem5 Developers } 168910037SARM gem5 Developers break; 169010037SARM gem5 Developers } 169110037SARM gem5 Developers break; 169210037SARM gem5 Developers case 4: 169310037SARM gem5 Developers switch (op1) { 169410037SARM gem5 Developers case 0: 169510037SARM gem5 Developers switch (crm) { 169610037SARM gem5 Developers case 0: 169710037SARM gem5 Developers switch (op2) { 169810037SARM gem5 Developers case 0: 169910037SARM gem5 Developers return MISCREG_SPSR_EL1; 170010037SARM gem5 Developers case 1: 170110037SARM gem5 Developers return MISCREG_ELR_EL1; 170210037SARM gem5 Developers } 170310037SARM gem5 Developers break; 170410037SARM gem5 Developers case 1: 170510037SARM gem5 Developers switch (op2) { 170610037SARM gem5 Developers case 0: 170710037SARM gem5 Developers return MISCREG_SP_EL0; 170810037SARM gem5 Developers } 170910037SARM gem5 Developers break; 171010037SARM gem5 Developers case 2: 171110037SARM gem5 Developers switch (op2) { 171210037SARM gem5 Developers case 0: 171310037SARM gem5 Developers return MISCREG_SPSEL; 171410037SARM gem5 Developers case 2: 171510037SARM gem5 Developers return MISCREG_CURRENTEL; 171610037SARM gem5 Developers } 171710037SARM gem5 Developers break; 171810037SARM gem5 Developers } 171910037SARM gem5 Developers break; 172010037SARM gem5 Developers case 3: 172110037SARM gem5 Developers switch (crm) { 172210037SARM gem5 Developers case 2: 172310037SARM gem5 Developers switch (op2) { 172410037SARM gem5 Developers case 0: 172510037SARM gem5 Developers return MISCREG_NZCV; 172610037SARM gem5 Developers case 1: 172710037SARM gem5 Developers return MISCREG_DAIF; 172810037SARM gem5 Developers } 172910037SARM gem5 Developers break; 173010037SARM gem5 Developers case 4: 173110037SARM gem5 Developers switch (op2) { 173210037SARM gem5 Developers case 0: 173310037SARM gem5 Developers return MISCREG_FPCR; 173410037SARM gem5 Developers case 1: 173510037SARM gem5 Developers return MISCREG_FPSR; 173610037SARM gem5 Developers } 173710037SARM gem5 Developers break; 173810037SARM gem5 Developers case 5: 173910037SARM gem5 Developers switch (op2) { 174010037SARM gem5 Developers case 0: 174110037SARM gem5 Developers return MISCREG_DSPSR_EL0; 174210037SARM gem5 Developers case 1: 174310037SARM gem5 Developers return MISCREG_DLR_EL0; 174410037SARM gem5 Developers } 174510037SARM gem5 Developers break; 174610037SARM gem5 Developers } 174710037SARM gem5 Developers break; 174810037SARM gem5 Developers case 4: 174910037SARM gem5 Developers switch (crm) { 175010037SARM gem5 Developers case 0: 175110037SARM gem5 Developers switch (op2) { 175210037SARM gem5 Developers case 0: 175310037SARM gem5 Developers return MISCREG_SPSR_EL2; 175410037SARM gem5 Developers case 1: 175510037SARM gem5 Developers return MISCREG_ELR_EL2; 175610037SARM gem5 Developers } 175710037SARM gem5 Developers break; 175810037SARM gem5 Developers case 1: 175910037SARM gem5 Developers switch (op2) { 176010037SARM gem5 Developers case 0: 176110037SARM gem5 Developers return MISCREG_SP_EL1; 176210037SARM gem5 Developers } 176310037SARM gem5 Developers break; 176410037SARM gem5 Developers case 3: 176510037SARM gem5 Developers switch (op2) { 176610037SARM gem5 Developers case 0: 176710037SARM gem5 Developers return MISCREG_SPSR_IRQ_AA64; 176810037SARM gem5 Developers case 1: 176910037SARM gem5 Developers return MISCREG_SPSR_ABT_AA64; 177010037SARM gem5 Developers case 2: 177110037SARM gem5 Developers return MISCREG_SPSR_UND_AA64; 177210037SARM gem5 Developers case 3: 177310037SARM gem5 Developers return MISCREG_SPSR_FIQ_AA64; 177410037SARM gem5 Developers } 177510037SARM gem5 Developers break; 177610037SARM gem5 Developers } 177710037SARM gem5 Developers break; 177810037SARM gem5 Developers case 6: 177910037SARM gem5 Developers switch (crm) { 178010037SARM gem5 Developers case 0: 178110037SARM gem5 Developers switch (op2) { 178210037SARM gem5 Developers case 0: 178310037SARM gem5 Developers return MISCREG_SPSR_EL3; 178410037SARM gem5 Developers case 1: 178510037SARM gem5 Developers return MISCREG_ELR_EL3; 178610037SARM gem5 Developers } 178710037SARM gem5 Developers break; 178810037SARM gem5 Developers case 1: 178910037SARM gem5 Developers switch (op2) { 179010037SARM gem5 Developers case 0: 179110037SARM gem5 Developers return MISCREG_SP_EL2; 179210037SARM gem5 Developers } 179310037SARM gem5 Developers break; 179410037SARM gem5 Developers } 179510037SARM gem5 Developers break; 179610037SARM gem5 Developers } 179710037SARM gem5 Developers break; 179810037SARM gem5 Developers case 5: 179910037SARM gem5 Developers switch (op1) { 180010037SARM gem5 Developers case 0: 180110037SARM gem5 Developers switch (crm) { 180210037SARM gem5 Developers case 1: 180310037SARM gem5 Developers switch (op2) { 180410037SARM gem5 Developers case 0: 180510037SARM gem5 Developers return MISCREG_AFSR0_EL1; 180610037SARM gem5 Developers case 1: 180710037SARM gem5 Developers return MISCREG_AFSR1_EL1; 180810037SARM gem5 Developers } 180910037SARM gem5 Developers break; 181010037SARM gem5 Developers case 2: 181110037SARM gem5 Developers switch (op2) { 181210037SARM gem5 Developers case 0: 181310037SARM gem5 Developers return MISCREG_ESR_EL1; 181410037SARM gem5 Developers } 181510037SARM gem5 Developers break; 181610037SARM gem5 Developers } 181710037SARM gem5 Developers break; 181810037SARM gem5 Developers case 4: 181910037SARM gem5 Developers switch (crm) { 182010037SARM gem5 Developers case 0: 182110037SARM gem5 Developers switch (op2) { 182210037SARM gem5 Developers case 1: 182310037SARM gem5 Developers return MISCREG_IFSR32_EL2; 182410037SARM gem5 Developers } 182510037SARM gem5 Developers break; 182610037SARM gem5 Developers case 1: 182710037SARM gem5 Developers switch (op2) { 182810037SARM gem5 Developers case 0: 182910037SARM gem5 Developers return MISCREG_AFSR0_EL2; 183010037SARM gem5 Developers case 1: 183110037SARM gem5 Developers return MISCREG_AFSR1_EL2; 183210037SARM gem5 Developers } 183310037SARM gem5 Developers break; 183410037SARM gem5 Developers case 2: 183510037SARM gem5 Developers switch (op2) { 183610037SARM gem5 Developers case 0: 183710037SARM gem5 Developers return MISCREG_ESR_EL2; 183810037SARM gem5 Developers } 183910037SARM gem5 Developers break; 184010037SARM gem5 Developers case 3: 184110037SARM gem5 Developers switch (op2) { 184210037SARM gem5 Developers case 0: 184310037SARM gem5 Developers return MISCREG_FPEXC32_EL2; 184410037SARM gem5 Developers } 184510037SARM gem5 Developers break; 184610037SARM gem5 Developers } 184710037SARM gem5 Developers break; 184810037SARM gem5 Developers case 6: 184910037SARM gem5 Developers switch (crm) { 185010037SARM gem5 Developers case 1: 185110037SARM gem5 Developers switch (op2) { 185210037SARM gem5 Developers case 0: 185310037SARM gem5 Developers return MISCREG_AFSR0_EL3; 185410037SARM gem5 Developers case 1: 185510037SARM gem5 Developers return MISCREG_AFSR1_EL3; 185610037SARM gem5 Developers } 185710037SARM gem5 Developers break; 185810037SARM gem5 Developers case 2: 185910037SARM gem5 Developers switch (op2) { 186010037SARM gem5 Developers case 0: 186110037SARM gem5 Developers return MISCREG_ESR_EL3; 186210037SARM gem5 Developers } 186310037SARM gem5 Developers break; 186410037SARM gem5 Developers } 186510037SARM gem5 Developers break; 186610037SARM gem5 Developers } 186710037SARM gem5 Developers break; 186810037SARM gem5 Developers case 6: 186910037SARM gem5 Developers switch (op1) { 187010037SARM gem5 Developers case 0: 187110037SARM gem5 Developers switch (crm) { 187210037SARM gem5 Developers case 0: 187310037SARM gem5 Developers switch (op2) { 187410037SARM gem5 Developers case 0: 187510037SARM gem5 Developers return MISCREG_FAR_EL1; 187610037SARM gem5 Developers } 187710037SARM gem5 Developers break; 187810037SARM gem5 Developers } 187910037SARM gem5 Developers break; 188010037SARM gem5 Developers case 4: 188110037SARM gem5 Developers switch (crm) { 188210037SARM gem5 Developers case 0: 188310037SARM gem5 Developers switch (op2) { 188410037SARM gem5 Developers case 0: 188510037SARM gem5 Developers return MISCREG_FAR_EL2; 188610037SARM gem5 Developers case 4: 188710037SARM gem5 Developers return MISCREG_HPFAR_EL2; 188810037SARM gem5 Developers } 188910037SARM gem5 Developers break; 189010037SARM gem5 Developers } 189110037SARM gem5 Developers break; 189210037SARM gem5 Developers case 6: 189310037SARM gem5 Developers switch (crm) { 189410037SARM gem5 Developers case 0: 189510037SARM gem5 Developers switch (op2) { 189610037SARM gem5 Developers case 0: 189710037SARM gem5 Developers return MISCREG_FAR_EL3; 189810037SARM gem5 Developers } 189910037SARM gem5 Developers break; 190010037SARM gem5 Developers } 190110037SARM gem5 Developers break; 190210037SARM gem5 Developers } 190310037SARM gem5 Developers break; 190410037SARM gem5 Developers case 7: 190510037SARM gem5 Developers switch (op1) { 190610037SARM gem5 Developers case 0: 190710037SARM gem5 Developers switch (crm) { 190810037SARM gem5 Developers case 4: 190910037SARM gem5 Developers switch (op2) { 191010037SARM gem5 Developers case 0: 191110037SARM gem5 Developers return MISCREG_PAR_EL1; 191210037SARM gem5 Developers } 191310037SARM gem5 Developers break; 191410037SARM gem5 Developers } 191510037SARM gem5 Developers break; 191610037SARM gem5 Developers } 191710037SARM gem5 Developers break; 191810037SARM gem5 Developers case 9: 191910037SARM gem5 Developers switch (op1) { 192010037SARM gem5 Developers case 0: 192110037SARM gem5 Developers switch (crm) { 192210037SARM gem5 Developers case 14: 192310037SARM gem5 Developers switch (op2) { 192410037SARM gem5 Developers case 1: 192510037SARM gem5 Developers return MISCREG_PMINTENSET_EL1; 192610037SARM gem5 Developers case 2: 192710037SARM gem5 Developers return MISCREG_PMINTENCLR_EL1; 192810037SARM gem5 Developers } 192910037SARM gem5 Developers break; 193010037SARM gem5 Developers } 193110037SARM gem5 Developers break; 193210037SARM gem5 Developers case 3: 193310037SARM gem5 Developers switch (crm) { 193410037SARM gem5 Developers case 12: 193510037SARM gem5 Developers switch (op2) { 193610037SARM gem5 Developers case 0: 193710037SARM gem5 Developers return MISCREG_PMCR_EL0; 193810037SARM gem5 Developers case 1: 193910037SARM gem5 Developers return MISCREG_PMCNTENSET_EL0; 194010037SARM gem5 Developers case 2: 194110037SARM gem5 Developers return MISCREG_PMCNTENCLR_EL0; 194210037SARM gem5 Developers case 3: 194310037SARM gem5 Developers return MISCREG_PMOVSCLR_EL0; 194410037SARM gem5 Developers case 4: 194510037SARM gem5 Developers return MISCREG_PMSWINC_EL0; 194610037SARM gem5 Developers case 5: 194710037SARM gem5 Developers return MISCREG_PMSELR_EL0; 194810037SARM gem5 Developers case 6: 194910037SARM gem5 Developers return MISCREG_PMCEID0_EL0; 195010037SARM gem5 Developers case 7: 195110037SARM gem5 Developers return MISCREG_PMCEID1_EL0; 195210037SARM gem5 Developers } 195310037SARM gem5 Developers break; 195410037SARM gem5 Developers case 13: 195510037SARM gem5 Developers switch (op2) { 195610037SARM gem5 Developers case 0: 195710037SARM gem5 Developers return MISCREG_PMCCNTR_EL0; 195810037SARM gem5 Developers case 1: 195910604SAndreas.Sandberg@ARM.com return MISCREG_PMXEVTYPER_EL0; 196010037SARM gem5 Developers case 2: 196110037SARM gem5 Developers return MISCREG_PMXEVCNTR_EL0; 196210037SARM gem5 Developers } 196310037SARM gem5 Developers break; 196410037SARM gem5 Developers case 14: 196510037SARM gem5 Developers switch (op2) { 196610037SARM gem5 Developers case 0: 196710037SARM gem5 Developers return MISCREG_PMUSERENR_EL0; 196810037SARM gem5 Developers case 3: 196910037SARM gem5 Developers return MISCREG_PMOVSSET_EL0; 197010037SARM gem5 Developers } 197110037SARM gem5 Developers break; 197210037SARM gem5 Developers } 197310037SARM gem5 Developers break; 197410037SARM gem5 Developers } 197510037SARM gem5 Developers break; 197610037SARM gem5 Developers case 10: 197710037SARM gem5 Developers switch (op1) { 197810037SARM gem5 Developers case 0: 197910037SARM gem5 Developers switch (crm) { 198010037SARM gem5 Developers case 2: 198110037SARM gem5 Developers switch (op2) { 198210037SARM gem5 Developers case 0: 198310037SARM gem5 Developers return MISCREG_MAIR_EL1; 198410037SARM gem5 Developers } 198510037SARM gem5 Developers break; 198610037SARM gem5 Developers case 3: 198710037SARM gem5 Developers switch (op2) { 198810037SARM gem5 Developers case 0: 198910037SARM gem5 Developers return MISCREG_AMAIR_EL1; 199010037SARM gem5 Developers } 199110037SARM gem5 Developers break; 199210037SARM gem5 Developers } 199310037SARM gem5 Developers break; 199410037SARM gem5 Developers case 4: 199510037SARM gem5 Developers switch (crm) { 199610037SARM gem5 Developers case 2: 199710037SARM gem5 Developers switch (op2) { 199810037SARM gem5 Developers case 0: 199910037SARM gem5 Developers return MISCREG_MAIR_EL2; 200010037SARM gem5 Developers } 200110037SARM gem5 Developers break; 200210037SARM gem5 Developers case 3: 200310037SARM gem5 Developers switch (op2) { 200410037SARM gem5 Developers case 0: 200510037SARM gem5 Developers return MISCREG_AMAIR_EL2; 200610037SARM gem5 Developers } 200710037SARM gem5 Developers break; 200810037SARM gem5 Developers } 200910037SARM gem5 Developers break; 201010037SARM gem5 Developers case 6: 201110037SARM gem5 Developers switch (crm) { 201210037SARM gem5 Developers case 2: 201310037SARM gem5 Developers switch (op2) { 201410037SARM gem5 Developers case 0: 201510037SARM gem5 Developers return MISCREG_MAIR_EL3; 201610037SARM gem5 Developers } 201710037SARM gem5 Developers break; 201810037SARM gem5 Developers case 3: 201910037SARM gem5 Developers switch (op2) { 202010037SARM gem5 Developers case 0: 202110037SARM gem5 Developers return MISCREG_AMAIR_EL3; 202210037SARM gem5 Developers } 202310037SARM gem5 Developers break; 202410037SARM gem5 Developers } 202510037SARM gem5 Developers break; 202610037SARM gem5 Developers } 202710037SARM gem5 Developers break; 202810037SARM gem5 Developers case 11: 202910037SARM gem5 Developers switch (op1) { 203010037SARM gem5 Developers case 1: 203110037SARM gem5 Developers switch (crm) { 203210037SARM gem5 Developers case 0: 203310037SARM gem5 Developers switch (op2) { 203410037SARM gem5 Developers case 2: 203510037SARM gem5 Developers return MISCREG_L2CTLR_EL1; 203610037SARM gem5 Developers case 3: 203710037SARM gem5 Developers return MISCREG_L2ECTLR_EL1; 203810037SARM gem5 Developers } 203910037SARM gem5 Developers break; 204010037SARM gem5 Developers } 204110037SARM gem5 Developers break; 204210037SARM gem5 Developers } 204310037SARM gem5 Developers break; 204410037SARM gem5 Developers case 12: 204510037SARM gem5 Developers switch (op1) { 204610037SARM gem5 Developers case 0: 204710037SARM gem5 Developers switch (crm) { 204810037SARM gem5 Developers case 0: 204910037SARM gem5 Developers switch (op2) { 205010037SARM gem5 Developers case 0: 205110037SARM gem5 Developers return MISCREG_VBAR_EL1; 205210037SARM gem5 Developers case 1: 205310037SARM gem5 Developers return MISCREG_RVBAR_EL1; 205410037SARM gem5 Developers } 205510037SARM gem5 Developers break; 205610037SARM gem5 Developers case 1: 205710037SARM gem5 Developers switch (op2) { 205810037SARM gem5 Developers case 0: 205910037SARM gem5 Developers return MISCREG_ISR_EL1; 206010037SARM gem5 Developers } 206110037SARM gem5 Developers break; 206210037SARM gem5 Developers } 206310037SARM gem5 Developers break; 206410037SARM gem5 Developers case 4: 206510037SARM gem5 Developers switch (crm) { 206610037SARM gem5 Developers case 0: 206710037SARM gem5 Developers switch (op2) { 206810037SARM gem5 Developers case 0: 206910037SARM gem5 Developers return MISCREG_VBAR_EL2; 207010037SARM gem5 Developers case 1: 207110037SARM gem5 Developers return MISCREG_RVBAR_EL2; 207210037SARM gem5 Developers } 207310037SARM gem5 Developers break; 207410037SARM gem5 Developers } 207510037SARM gem5 Developers break; 207610037SARM gem5 Developers case 6: 207710037SARM gem5 Developers switch (crm) { 207810037SARM gem5 Developers case 0: 207910037SARM gem5 Developers switch (op2) { 208010037SARM gem5 Developers case 0: 208110037SARM gem5 Developers return MISCREG_VBAR_EL3; 208210037SARM gem5 Developers case 1: 208310037SARM gem5 Developers return MISCREG_RVBAR_EL3; 208410037SARM gem5 Developers case 2: 208510037SARM gem5 Developers return MISCREG_RMR_EL3; 208610037SARM gem5 Developers } 208710037SARM gem5 Developers break; 208810037SARM gem5 Developers } 208910037SARM gem5 Developers break; 209010037SARM gem5 Developers } 209110037SARM gem5 Developers break; 209210037SARM gem5 Developers case 13: 209310037SARM gem5 Developers switch (op1) { 209410037SARM gem5 Developers case 0: 209510037SARM gem5 Developers switch (crm) { 209610037SARM gem5 Developers case 0: 209710037SARM gem5 Developers switch (op2) { 209810037SARM gem5 Developers case 1: 209910037SARM gem5 Developers return MISCREG_CONTEXTIDR_EL1; 210010037SARM gem5 Developers case 4: 210110037SARM gem5 Developers return MISCREG_TPIDR_EL1; 210210037SARM gem5 Developers } 210310037SARM gem5 Developers break; 210410037SARM gem5 Developers } 210510037SARM gem5 Developers break; 210610037SARM gem5 Developers case 3: 210710037SARM gem5 Developers switch (crm) { 210810037SARM gem5 Developers case 0: 210910037SARM gem5 Developers switch (op2) { 211010037SARM gem5 Developers case 2: 211110037SARM gem5 Developers return MISCREG_TPIDR_EL0; 211210037SARM gem5 Developers case 3: 211310037SARM gem5 Developers return MISCREG_TPIDRRO_EL0; 211410037SARM gem5 Developers } 211510037SARM gem5 Developers break; 211610037SARM gem5 Developers } 211710037SARM gem5 Developers break; 211810037SARM gem5 Developers case 4: 211910037SARM gem5 Developers switch (crm) { 212010037SARM gem5 Developers case 0: 212110037SARM gem5 Developers switch (op2) { 212210856SCurtis.Dunham@arm.com case 1: 212310856SCurtis.Dunham@arm.com return MISCREG_CONTEXTIDR_EL2; 212410037SARM gem5 Developers case 2: 212510037SARM gem5 Developers return MISCREG_TPIDR_EL2; 212610037SARM gem5 Developers } 212710037SARM gem5 Developers break; 212810037SARM gem5 Developers } 212910037SARM gem5 Developers break; 213010037SARM gem5 Developers case 6: 213110037SARM gem5 Developers switch (crm) { 213210037SARM gem5 Developers case 0: 213310037SARM gem5 Developers switch (op2) { 213410037SARM gem5 Developers case 2: 213510037SARM gem5 Developers return MISCREG_TPIDR_EL3; 213610037SARM gem5 Developers } 213710037SARM gem5 Developers break; 213810037SARM gem5 Developers } 213910037SARM gem5 Developers break; 214010037SARM gem5 Developers } 214110037SARM gem5 Developers break; 214210037SARM gem5 Developers case 14: 214310037SARM gem5 Developers switch (op1) { 214410037SARM gem5 Developers case 0: 214510037SARM gem5 Developers switch (crm) { 214610037SARM gem5 Developers case 1: 214710037SARM gem5 Developers switch (op2) { 214810037SARM gem5 Developers case 0: 214910037SARM gem5 Developers return MISCREG_CNTKCTL_EL1; 215010037SARM gem5 Developers } 215110037SARM gem5 Developers break; 215210037SARM gem5 Developers } 215310037SARM gem5 Developers break; 215410037SARM gem5 Developers case 3: 215510037SARM gem5 Developers switch (crm) { 215610037SARM gem5 Developers case 0: 215710037SARM gem5 Developers switch (op2) { 215810037SARM gem5 Developers case 0: 215910037SARM gem5 Developers return MISCREG_CNTFRQ_EL0; 216010037SARM gem5 Developers case 1: 216110037SARM gem5 Developers return MISCREG_CNTPCT_EL0; 216210037SARM gem5 Developers case 2: 216310037SARM gem5 Developers return MISCREG_CNTVCT_EL0; 216410037SARM gem5 Developers } 216510037SARM gem5 Developers break; 216610037SARM gem5 Developers case 2: 216710037SARM gem5 Developers switch (op2) { 216810037SARM gem5 Developers case 0: 216910037SARM gem5 Developers return MISCREG_CNTP_TVAL_EL0; 217010037SARM gem5 Developers case 1: 217110037SARM gem5 Developers return MISCREG_CNTP_CTL_EL0; 217210037SARM gem5 Developers case 2: 217310037SARM gem5 Developers return MISCREG_CNTP_CVAL_EL0; 217410037SARM gem5 Developers } 217510037SARM gem5 Developers break; 217610037SARM gem5 Developers case 3: 217710037SARM gem5 Developers switch (op2) { 217810037SARM gem5 Developers case 0: 217910037SARM gem5 Developers return MISCREG_CNTV_TVAL_EL0; 218010037SARM gem5 Developers case 1: 218110037SARM gem5 Developers return MISCREG_CNTV_CTL_EL0; 218210037SARM gem5 Developers case 2: 218310037SARM gem5 Developers return MISCREG_CNTV_CVAL_EL0; 218410037SARM gem5 Developers } 218510037SARM gem5 Developers break; 218610037SARM gem5 Developers case 8: 218710037SARM gem5 Developers switch (op2) { 218810037SARM gem5 Developers case 0: 218910037SARM gem5 Developers return MISCREG_PMEVCNTR0_EL0; 219010037SARM gem5 Developers case 1: 219110037SARM gem5 Developers return MISCREG_PMEVCNTR1_EL0; 219210037SARM gem5 Developers case 2: 219310037SARM gem5 Developers return MISCREG_PMEVCNTR2_EL0; 219410037SARM gem5 Developers case 3: 219510037SARM gem5 Developers return MISCREG_PMEVCNTR3_EL0; 219610037SARM gem5 Developers case 4: 219710037SARM gem5 Developers return MISCREG_PMEVCNTR4_EL0; 219810037SARM gem5 Developers case 5: 219910037SARM gem5 Developers return MISCREG_PMEVCNTR5_EL0; 220010037SARM gem5 Developers } 220110037SARM gem5 Developers break; 220210037SARM gem5 Developers case 12: 220310037SARM gem5 Developers switch (op2) { 220410037SARM gem5 Developers case 0: 220510037SARM gem5 Developers return MISCREG_PMEVTYPER0_EL0; 220610037SARM gem5 Developers case 1: 220710037SARM gem5 Developers return MISCREG_PMEVTYPER1_EL0; 220810037SARM gem5 Developers case 2: 220910037SARM gem5 Developers return MISCREG_PMEVTYPER2_EL0; 221010037SARM gem5 Developers case 3: 221110037SARM gem5 Developers return MISCREG_PMEVTYPER3_EL0; 221210037SARM gem5 Developers case 4: 221310037SARM gem5 Developers return MISCREG_PMEVTYPER4_EL0; 221410037SARM gem5 Developers case 5: 221510037SARM gem5 Developers return MISCREG_PMEVTYPER5_EL0; 221610037SARM gem5 Developers } 221710037SARM gem5 Developers break; 221810604SAndreas.Sandberg@ARM.com case 15: 221910604SAndreas.Sandberg@ARM.com switch (op2) { 222010604SAndreas.Sandberg@ARM.com case 7: 222110604SAndreas.Sandberg@ARM.com return MISCREG_PMCCFILTR_EL0; 222210604SAndreas.Sandberg@ARM.com } 222310037SARM gem5 Developers } 222410037SARM gem5 Developers break; 222510037SARM gem5 Developers case 4: 222610037SARM gem5 Developers switch (crm) { 222710037SARM gem5 Developers case 0: 222810037SARM gem5 Developers switch (op2) { 222910037SARM gem5 Developers case 3: 223010037SARM gem5 Developers return MISCREG_CNTVOFF_EL2; 223110037SARM gem5 Developers } 223210037SARM gem5 Developers break; 223310037SARM gem5 Developers case 1: 223410037SARM gem5 Developers switch (op2) { 223510037SARM gem5 Developers case 0: 223610037SARM gem5 Developers return MISCREG_CNTHCTL_EL2; 223710037SARM gem5 Developers } 223810037SARM gem5 Developers break; 223910037SARM gem5 Developers case 2: 224010037SARM gem5 Developers switch (op2) { 224110037SARM gem5 Developers case 0: 224210037SARM gem5 Developers return MISCREG_CNTHP_TVAL_EL2; 224310037SARM gem5 Developers case 1: 224410037SARM gem5 Developers return MISCREG_CNTHP_CTL_EL2; 224510037SARM gem5 Developers case 2: 224610037SARM gem5 Developers return MISCREG_CNTHP_CVAL_EL2; 224710037SARM gem5 Developers } 224810037SARM gem5 Developers break; 224910037SARM gem5 Developers } 225010037SARM gem5 Developers break; 225110037SARM gem5 Developers case 7: 225210037SARM gem5 Developers switch (crm) { 225310037SARM gem5 Developers case 2: 225410037SARM gem5 Developers switch (op2) { 225510037SARM gem5 Developers case 0: 225610037SARM gem5 Developers return MISCREG_CNTPS_TVAL_EL1; 225710037SARM gem5 Developers case 1: 225810037SARM gem5 Developers return MISCREG_CNTPS_CTL_EL1; 225910037SARM gem5 Developers case 2: 226010037SARM gem5 Developers return MISCREG_CNTPS_CVAL_EL1; 226110037SARM gem5 Developers } 226210037SARM gem5 Developers break; 226310037SARM gem5 Developers } 226410037SARM gem5 Developers break; 226510037SARM gem5 Developers } 226610037SARM gem5 Developers break; 226710037SARM gem5 Developers case 15: 226810037SARM gem5 Developers switch (op1) { 226910037SARM gem5 Developers case 0: 227010037SARM gem5 Developers switch (crm) { 227110037SARM gem5 Developers case 0: 227210037SARM gem5 Developers switch (op2) { 227310037SARM gem5 Developers case 0: 227410037SARM gem5 Developers return MISCREG_IL1DATA0_EL1; 227510037SARM gem5 Developers case 1: 227610037SARM gem5 Developers return MISCREG_IL1DATA1_EL1; 227710037SARM gem5 Developers case 2: 227810037SARM gem5 Developers return MISCREG_IL1DATA2_EL1; 227910037SARM gem5 Developers case 3: 228010037SARM gem5 Developers return MISCREG_IL1DATA3_EL1; 228110037SARM gem5 Developers } 228210037SARM gem5 Developers break; 228310037SARM gem5 Developers case 1: 228410037SARM gem5 Developers switch (op2) { 228510037SARM gem5 Developers case 0: 228610037SARM gem5 Developers return MISCREG_DL1DATA0_EL1; 228710037SARM gem5 Developers case 1: 228810037SARM gem5 Developers return MISCREG_DL1DATA1_EL1; 228910037SARM gem5 Developers case 2: 229010037SARM gem5 Developers return MISCREG_DL1DATA2_EL1; 229110037SARM gem5 Developers case 3: 229210037SARM gem5 Developers return MISCREG_DL1DATA3_EL1; 229310037SARM gem5 Developers case 4: 229410037SARM gem5 Developers return MISCREG_DL1DATA4_EL1; 229510037SARM gem5 Developers } 229610037SARM gem5 Developers break; 229710037SARM gem5 Developers } 229810037SARM gem5 Developers break; 229910037SARM gem5 Developers case 1: 230010037SARM gem5 Developers switch (crm) { 230110037SARM gem5 Developers case 0: 230210037SARM gem5 Developers switch (op2) { 230310037SARM gem5 Developers case 0: 230410037SARM gem5 Developers return MISCREG_L2ACTLR_EL1; 230510037SARM gem5 Developers } 230610037SARM gem5 Developers break; 230710037SARM gem5 Developers case 2: 230810037SARM gem5 Developers switch (op2) { 230910037SARM gem5 Developers case 0: 231010037SARM gem5 Developers return MISCREG_CPUACTLR_EL1; 231110037SARM gem5 Developers case 1: 231210037SARM gem5 Developers return MISCREG_CPUECTLR_EL1; 231310037SARM gem5 Developers case 2: 231410037SARM gem5 Developers return MISCREG_CPUMERRSR_EL1; 231510037SARM gem5 Developers case 3: 231610037SARM gem5 Developers return MISCREG_L2MERRSR_EL1; 231710037SARM gem5 Developers } 231810037SARM gem5 Developers break; 231910037SARM gem5 Developers case 3: 232010037SARM gem5 Developers switch (op2) { 232110037SARM gem5 Developers case 0: 232210037SARM gem5 Developers return MISCREG_CBAR_EL1; 232310037SARM gem5 Developers 232410037SARM gem5 Developers } 232510037SARM gem5 Developers break; 232610037SARM gem5 Developers } 232710037SARM gem5 Developers break; 232810037SARM gem5 Developers } 232910037SARM gem5 Developers break; 233010037SARM gem5 Developers } 233110037SARM gem5 Developers break; 233210037SARM gem5 Developers } 233310037SARM gem5 Developers 233410037SARM gem5 Developers return MISCREG_UNKNOWN; 233510037SARM gem5 Developers} 233610037SARM gem5 Developers 233712479SCurtis.Dunham@arm.combitset<NUM_MISCREG_INFOS> miscRegInfo[NUM_MISCREGS]; // initialized below 233812479SCurtis.Dunham@arm.com 233912479SCurtis.Dunham@arm.comvoid 234012479SCurtis.Dunham@arm.comISA::initializeMiscRegMetadata() 234112479SCurtis.Dunham@arm.com{ 234212479SCurtis.Dunham@arm.com // the MiscReg metadata tables are shared across all instances of the 234312479SCurtis.Dunham@arm.com // ISA object, so there's no need to initialize them multiple times. 234412479SCurtis.Dunham@arm.com static bool completed = false; 234512479SCurtis.Dunham@arm.com if (completed) 234612479SCurtis.Dunham@arm.com return; 234712479SCurtis.Dunham@arm.com 234812479SCurtis.Dunham@arm.com /** 234912479SCurtis.Dunham@arm.com * Some registers alias with others, and therefore need to be translated. 235012479SCurtis.Dunham@arm.com * When two mapping registers are given, they are the 32b lower and 235112479SCurtis.Dunham@arm.com * upper halves, respectively, of the 64b register being mapped. 235212479SCurtis.Dunham@arm.com * aligned with reference documentation ARM DDI 0487A.i pp 1540-1543 235312479SCurtis.Dunham@arm.com * 235412479SCurtis.Dunham@arm.com * NAM = "not architecturally mandated", 235512479SCurtis.Dunham@arm.com * from ARM DDI 0487A.i, template text 235612479SCurtis.Dunham@arm.com * "AArch64 System register ___ can be mapped to 235712479SCurtis.Dunham@arm.com * AArch32 System register ___, but this is not 235812479SCurtis.Dunham@arm.com * architecturally mandated." 235912479SCurtis.Dunham@arm.com */ 236012479SCurtis.Dunham@arm.com 236112479SCurtis.Dunham@arm.com InitReg(MISCREG_CPSR) 236212479SCurtis.Dunham@arm.com .allPrivileges(); 236312479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSR) 236412479SCurtis.Dunham@arm.com .allPrivileges(); 236512479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSR_FIQ) 236612479SCurtis.Dunham@arm.com .allPrivileges(); 236712479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSR_IRQ) 236812479SCurtis.Dunham@arm.com .allPrivileges(); 236912479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSR_SVC) 237012479SCurtis.Dunham@arm.com .allPrivileges(); 237112479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSR_MON) 237212479SCurtis.Dunham@arm.com .allPrivileges(); 237312479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSR_ABT) 237412479SCurtis.Dunham@arm.com .allPrivileges(); 237512479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSR_HYP) 237612479SCurtis.Dunham@arm.com .allPrivileges(); 237712479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSR_UND) 237812479SCurtis.Dunham@arm.com .allPrivileges(); 237912479SCurtis.Dunham@arm.com InitReg(MISCREG_ELR_HYP) 238012479SCurtis.Dunham@arm.com .allPrivileges(); 238112479SCurtis.Dunham@arm.com InitReg(MISCREG_FPSID) 238212479SCurtis.Dunham@arm.com .allPrivileges(); 238312479SCurtis.Dunham@arm.com InitReg(MISCREG_FPSCR) 238412479SCurtis.Dunham@arm.com .allPrivileges(); 238512479SCurtis.Dunham@arm.com InitReg(MISCREG_MVFR1) 238612479SCurtis.Dunham@arm.com .allPrivileges(); 238712479SCurtis.Dunham@arm.com InitReg(MISCREG_MVFR0) 238812479SCurtis.Dunham@arm.com .allPrivileges(); 238912479SCurtis.Dunham@arm.com InitReg(MISCREG_FPEXC) 239012479SCurtis.Dunham@arm.com .allPrivileges(); 239112479SCurtis.Dunham@arm.com 239212479SCurtis.Dunham@arm.com // Helper registers 239312479SCurtis.Dunham@arm.com InitReg(MISCREG_CPSR_MODE) 239412479SCurtis.Dunham@arm.com .allPrivileges(); 239512479SCurtis.Dunham@arm.com InitReg(MISCREG_CPSR_Q) 239612479SCurtis.Dunham@arm.com .allPrivileges(); 239712479SCurtis.Dunham@arm.com InitReg(MISCREG_FPSCR_EXC) 239812479SCurtis.Dunham@arm.com .allPrivileges(); 239912479SCurtis.Dunham@arm.com InitReg(MISCREG_FPSCR_QC) 240012479SCurtis.Dunham@arm.com .allPrivileges(); 240112479SCurtis.Dunham@arm.com InitReg(MISCREG_LOCKADDR) 240212479SCurtis.Dunham@arm.com .allPrivileges(); 240312479SCurtis.Dunham@arm.com InitReg(MISCREG_LOCKFLAG) 240412479SCurtis.Dunham@arm.com .allPrivileges(); 240512479SCurtis.Dunham@arm.com InitReg(MISCREG_PRRR_MAIR0) 240612479SCurtis.Dunham@arm.com .mutex() 240712479SCurtis.Dunham@arm.com .banked(); 240812479SCurtis.Dunham@arm.com InitReg(MISCREG_PRRR_MAIR0_NS) 240912479SCurtis.Dunham@arm.com .mutex() 241012479SCurtis.Dunham@arm.com .bankedChild(); 241112479SCurtis.Dunham@arm.com InitReg(MISCREG_PRRR_MAIR0_S) 241212479SCurtis.Dunham@arm.com .mutex() 241312479SCurtis.Dunham@arm.com .bankedChild(); 241412479SCurtis.Dunham@arm.com InitReg(MISCREG_NMRR_MAIR1) 241512479SCurtis.Dunham@arm.com .mutex() 241612479SCurtis.Dunham@arm.com .banked(); 241712479SCurtis.Dunham@arm.com InitReg(MISCREG_NMRR_MAIR1_NS) 241812479SCurtis.Dunham@arm.com .mutex() 241912479SCurtis.Dunham@arm.com .bankedChild(); 242012479SCurtis.Dunham@arm.com InitReg(MISCREG_NMRR_MAIR1_S) 242112479SCurtis.Dunham@arm.com .mutex() 242212479SCurtis.Dunham@arm.com .bankedChild(); 242312479SCurtis.Dunham@arm.com InitReg(MISCREG_PMXEVTYPER_PMCCFILTR) 242412479SCurtis.Dunham@arm.com .mutex(); 242512479SCurtis.Dunham@arm.com InitReg(MISCREG_SCTLR_RST) 242612479SCurtis.Dunham@arm.com .allPrivileges(); 242712479SCurtis.Dunham@arm.com InitReg(MISCREG_SEV_MAILBOX) 242812479SCurtis.Dunham@arm.com .allPrivileges(); 242912479SCurtis.Dunham@arm.com 243012479SCurtis.Dunham@arm.com // AArch32 CP14 registers 243112479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGDIDR) 243212479SCurtis.Dunham@arm.com .allPrivileges().monSecureWrite(0).monNonSecureWrite(0); 243312479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGDSCRint) 243412479SCurtis.Dunham@arm.com .allPrivileges().monSecureWrite(0).monNonSecureWrite(0); 243512479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGDCCINT) 243612479SCurtis.Dunham@arm.com .unimplemented() 243712479SCurtis.Dunham@arm.com .allPrivileges(); 243812479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGDTRTXint) 243912479SCurtis.Dunham@arm.com .unimplemented() 244012479SCurtis.Dunham@arm.com .allPrivileges(); 244112479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGDTRRXint) 244212479SCurtis.Dunham@arm.com .unimplemented() 244312479SCurtis.Dunham@arm.com .allPrivileges(); 244412479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWFAR) 244512479SCurtis.Dunham@arm.com .unimplemented() 244612479SCurtis.Dunham@arm.com .allPrivileges(); 244712479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGVCR) 244812479SCurtis.Dunham@arm.com .unimplemented() 244912479SCurtis.Dunham@arm.com .allPrivileges(); 245012479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGDTRRXext) 245112479SCurtis.Dunham@arm.com .unimplemented() 245212479SCurtis.Dunham@arm.com .allPrivileges(); 245312479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGDSCRext) 245412479SCurtis.Dunham@arm.com .unimplemented() 245512479SCurtis.Dunham@arm.com .warnNotFail() 245612479SCurtis.Dunham@arm.com .allPrivileges(); 245712479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGDTRTXext) 245812479SCurtis.Dunham@arm.com .unimplemented() 245912479SCurtis.Dunham@arm.com .allPrivileges(); 246012479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGOSECCR) 246112479SCurtis.Dunham@arm.com .unimplemented() 246212479SCurtis.Dunham@arm.com .allPrivileges(); 246312479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBVR0) 246412479SCurtis.Dunham@arm.com .unimplemented() 246512479SCurtis.Dunham@arm.com .allPrivileges(); 246612479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBVR1) 246712479SCurtis.Dunham@arm.com .unimplemented() 246812479SCurtis.Dunham@arm.com .allPrivileges(); 246912479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBVR2) 247012479SCurtis.Dunham@arm.com .unimplemented() 247112479SCurtis.Dunham@arm.com .allPrivileges(); 247212479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBVR3) 247312479SCurtis.Dunham@arm.com .unimplemented() 247412479SCurtis.Dunham@arm.com .allPrivileges(); 247512479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBVR4) 247612479SCurtis.Dunham@arm.com .unimplemented() 247712479SCurtis.Dunham@arm.com .allPrivileges(); 247812479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBVR5) 247912479SCurtis.Dunham@arm.com .unimplemented() 248012479SCurtis.Dunham@arm.com .allPrivileges(); 248112479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBCR0) 248212479SCurtis.Dunham@arm.com .unimplemented() 248312479SCurtis.Dunham@arm.com .allPrivileges(); 248412479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBCR1) 248512479SCurtis.Dunham@arm.com .unimplemented() 248612479SCurtis.Dunham@arm.com .allPrivileges(); 248712479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBCR2) 248812479SCurtis.Dunham@arm.com .unimplemented() 248912479SCurtis.Dunham@arm.com .allPrivileges(); 249012479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBCR3) 249112479SCurtis.Dunham@arm.com .unimplemented() 249212479SCurtis.Dunham@arm.com .allPrivileges(); 249312479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBCR4) 249412479SCurtis.Dunham@arm.com .unimplemented() 249512479SCurtis.Dunham@arm.com .allPrivileges(); 249612479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBCR5) 249712479SCurtis.Dunham@arm.com .unimplemented() 249812479SCurtis.Dunham@arm.com .allPrivileges(); 249912479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWVR0) 250012479SCurtis.Dunham@arm.com .unimplemented() 250112479SCurtis.Dunham@arm.com .allPrivileges(); 250212479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWVR1) 250312479SCurtis.Dunham@arm.com .unimplemented() 250412479SCurtis.Dunham@arm.com .allPrivileges(); 250512479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWVR2) 250612479SCurtis.Dunham@arm.com .unimplemented() 250712479SCurtis.Dunham@arm.com .allPrivileges(); 250812479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWVR3) 250912479SCurtis.Dunham@arm.com .unimplemented() 251012479SCurtis.Dunham@arm.com .allPrivileges(); 251112479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWCR0) 251212479SCurtis.Dunham@arm.com .unimplemented() 251312479SCurtis.Dunham@arm.com .allPrivileges(); 251412479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWCR1) 251512479SCurtis.Dunham@arm.com .unimplemented() 251612479SCurtis.Dunham@arm.com .allPrivileges(); 251712479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWCR2) 251812479SCurtis.Dunham@arm.com .unimplemented() 251912479SCurtis.Dunham@arm.com .allPrivileges(); 252012479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWCR3) 252112479SCurtis.Dunham@arm.com .unimplemented() 252212479SCurtis.Dunham@arm.com .allPrivileges(); 252312479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGDRAR) 252412479SCurtis.Dunham@arm.com .unimplemented() 252512479SCurtis.Dunham@arm.com .allPrivileges().monSecureWrite(0).monNonSecureWrite(0); 252612479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBXVR4) 252712479SCurtis.Dunham@arm.com .unimplemented() 252812479SCurtis.Dunham@arm.com .allPrivileges(); 252912479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBXVR5) 253012479SCurtis.Dunham@arm.com .unimplemented() 253112479SCurtis.Dunham@arm.com .allPrivileges(); 253212479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGOSLAR) 253312479SCurtis.Dunham@arm.com .unimplemented() 253412479SCurtis.Dunham@arm.com .allPrivileges().monSecureRead(0).monNonSecureRead(0); 253512479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGOSLSR) 253612479SCurtis.Dunham@arm.com .unimplemented() 253712479SCurtis.Dunham@arm.com .allPrivileges().monSecureWrite(0).monNonSecureWrite(0); 253812479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGOSDLR) 253912479SCurtis.Dunham@arm.com .unimplemented() 254012479SCurtis.Dunham@arm.com .allPrivileges(); 254112479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGPRCR) 254212479SCurtis.Dunham@arm.com .unimplemented() 254312479SCurtis.Dunham@arm.com .allPrivileges(); 254412479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGDSAR) 254512479SCurtis.Dunham@arm.com .unimplemented() 254612479SCurtis.Dunham@arm.com .allPrivileges().monSecureWrite(0).monNonSecureWrite(0); 254712479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGCLAIMSET) 254812479SCurtis.Dunham@arm.com .unimplemented() 254912479SCurtis.Dunham@arm.com .allPrivileges(); 255012479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGCLAIMCLR) 255112479SCurtis.Dunham@arm.com .unimplemented() 255212479SCurtis.Dunham@arm.com .allPrivileges(); 255312479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGAUTHSTATUS) 255412479SCurtis.Dunham@arm.com .unimplemented() 255512479SCurtis.Dunham@arm.com .allPrivileges().monSecureWrite(0).monNonSecureWrite(0); 255612479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGDEVID2) 255712479SCurtis.Dunham@arm.com .unimplemented() 255812479SCurtis.Dunham@arm.com .allPrivileges().monSecureWrite(0).monNonSecureWrite(0); 255912479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGDEVID1) 256012479SCurtis.Dunham@arm.com .unimplemented() 256112479SCurtis.Dunham@arm.com .allPrivileges().monSecureWrite(0).monNonSecureWrite(0); 256212479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGDEVID0) 256312479SCurtis.Dunham@arm.com .unimplemented() 256412479SCurtis.Dunham@arm.com .allPrivileges().monSecureWrite(0).monNonSecureWrite(0); 256512479SCurtis.Dunham@arm.com InitReg(MISCREG_TEECR) 256612479SCurtis.Dunham@arm.com .unimplemented() 256712479SCurtis.Dunham@arm.com .allPrivileges(); 256812479SCurtis.Dunham@arm.com InitReg(MISCREG_JIDR) 256912479SCurtis.Dunham@arm.com .allPrivileges(); 257012479SCurtis.Dunham@arm.com InitReg(MISCREG_TEEHBR) 257112479SCurtis.Dunham@arm.com .allPrivileges(); 257212479SCurtis.Dunham@arm.com InitReg(MISCREG_JOSCR) 257312479SCurtis.Dunham@arm.com .allPrivileges(); 257412479SCurtis.Dunham@arm.com InitReg(MISCREG_JMCR) 257512479SCurtis.Dunham@arm.com .allPrivileges(); 257612479SCurtis.Dunham@arm.com 257712479SCurtis.Dunham@arm.com // AArch32 CP15 registers 257812479SCurtis.Dunham@arm.com InitReg(MISCREG_MIDR) 257912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 258012479SCurtis.Dunham@arm.com InitReg(MISCREG_CTR) 258112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 258212479SCurtis.Dunham@arm.com InitReg(MISCREG_TCMTR) 258312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 258412479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBTR) 258512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 258612479SCurtis.Dunham@arm.com InitReg(MISCREG_MPIDR) 258712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 258812479SCurtis.Dunham@arm.com InitReg(MISCREG_REVIDR) 258912479SCurtis.Dunham@arm.com .unimplemented() 259012479SCurtis.Dunham@arm.com .warnNotFail() 259112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 259212479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_PFR0) 259312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 259412479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_PFR1) 259512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 259612479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_DFR0) 259712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 259812479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_AFR0) 259912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 260012479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_MMFR0) 260112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 260212479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_MMFR1) 260312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 260412479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_MMFR2) 260512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 260612479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_MMFR3) 260712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 260812479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_ISAR0) 260912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 261012479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_ISAR1) 261112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 261212479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_ISAR2) 261312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 261412479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_ISAR3) 261512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 261612479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_ISAR4) 261712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 261812479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_ISAR5) 261912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 262012479SCurtis.Dunham@arm.com InitReg(MISCREG_CCSIDR) 262112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 262212479SCurtis.Dunham@arm.com InitReg(MISCREG_CLIDR) 262312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 262412479SCurtis.Dunham@arm.com InitReg(MISCREG_AIDR) 262512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 262612479SCurtis.Dunham@arm.com InitReg(MISCREG_CSSELR) 262712479SCurtis.Dunham@arm.com .banked(); 262812479SCurtis.Dunham@arm.com InitReg(MISCREG_CSSELR_NS) 262912479SCurtis.Dunham@arm.com .bankedChild() 263012479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 263112479SCurtis.Dunham@arm.com InitReg(MISCREG_CSSELR_S) 263212479SCurtis.Dunham@arm.com .bankedChild() 263312479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 263412479SCurtis.Dunham@arm.com InitReg(MISCREG_VPIDR) 263512479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 263612479SCurtis.Dunham@arm.com InitReg(MISCREG_VMPIDR) 263712479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 263812479SCurtis.Dunham@arm.com InitReg(MISCREG_SCTLR) 263912479SCurtis.Dunham@arm.com .banked(); 264012479SCurtis.Dunham@arm.com InitReg(MISCREG_SCTLR_NS) 264112479SCurtis.Dunham@arm.com .bankedChild() 264212479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 264312479SCurtis.Dunham@arm.com InitReg(MISCREG_SCTLR_S) 264412479SCurtis.Dunham@arm.com .bankedChild() 264512479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 264612479SCurtis.Dunham@arm.com InitReg(MISCREG_ACTLR) 264712479SCurtis.Dunham@arm.com .banked(); 264812479SCurtis.Dunham@arm.com InitReg(MISCREG_ACTLR_NS) 264912479SCurtis.Dunham@arm.com .bankedChild() 265012479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 265112479SCurtis.Dunham@arm.com InitReg(MISCREG_ACTLR_S) 265212479SCurtis.Dunham@arm.com .bankedChild() 265312479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 265412479SCurtis.Dunham@arm.com InitReg(MISCREG_CPACR) 265512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 265612479SCurtis.Dunham@arm.com InitReg(MISCREG_SCR) 265712479SCurtis.Dunham@arm.com .mon().secure().exceptUserMode() 265812479SCurtis.Dunham@arm.com .res0(0xff40) // [31:16], [6] 265912479SCurtis.Dunham@arm.com .res1(0x0030); // [5:4] 266012479SCurtis.Dunham@arm.com InitReg(MISCREG_SDER) 266112479SCurtis.Dunham@arm.com .mon(); 266212479SCurtis.Dunham@arm.com InitReg(MISCREG_NSACR) 266312479SCurtis.Dunham@arm.com .allPrivileges().hypWrite(0).privNonSecureWrite(0).exceptUserMode(); 266412479SCurtis.Dunham@arm.com InitReg(MISCREG_HSCTLR) 266512479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 266612479SCurtis.Dunham@arm.com InitReg(MISCREG_HACTLR) 266712479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 266812479SCurtis.Dunham@arm.com InitReg(MISCREG_HCR) 266912479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 267012479SCurtis.Dunham@arm.com InitReg(MISCREG_HDCR) 267112479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 267212479SCurtis.Dunham@arm.com InitReg(MISCREG_HCPTR) 267312479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 267412479SCurtis.Dunham@arm.com InitReg(MISCREG_HSTR) 267512479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 267612479SCurtis.Dunham@arm.com InitReg(MISCREG_HACR) 267712479SCurtis.Dunham@arm.com .unimplemented() 267812479SCurtis.Dunham@arm.com .warnNotFail() 267912479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 268012479SCurtis.Dunham@arm.com InitReg(MISCREG_TTBR0) 268112479SCurtis.Dunham@arm.com .banked(); 268212479SCurtis.Dunham@arm.com InitReg(MISCREG_TTBR0_NS) 268312479SCurtis.Dunham@arm.com .bankedChild() 268412479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 268512479SCurtis.Dunham@arm.com InitReg(MISCREG_TTBR0_S) 268612479SCurtis.Dunham@arm.com .bankedChild() 268712479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 268812479SCurtis.Dunham@arm.com InitReg(MISCREG_TTBR1) 268912479SCurtis.Dunham@arm.com .banked(); 269012479SCurtis.Dunham@arm.com InitReg(MISCREG_TTBR1_NS) 269112479SCurtis.Dunham@arm.com .bankedChild() 269212479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 269312479SCurtis.Dunham@arm.com InitReg(MISCREG_TTBR1_S) 269412479SCurtis.Dunham@arm.com .bankedChild() 269512479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 269612479SCurtis.Dunham@arm.com InitReg(MISCREG_TTBCR) 269712479SCurtis.Dunham@arm.com .banked(); 269812479SCurtis.Dunham@arm.com InitReg(MISCREG_TTBCR_NS) 269912479SCurtis.Dunham@arm.com .bankedChild() 270012479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 270112479SCurtis.Dunham@arm.com InitReg(MISCREG_TTBCR_S) 270212479SCurtis.Dunham@arm.com .bankedChild() 270312479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 270412479SCurtis.Dunham@arm.com InitReg(MISCREG_HTCR) 270512479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 270612479SCurtis.Dunham@arm.com InitReg(MISCREG_VTCR) 270712479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 270812479SCurtis.Dunham@arm.com InitReg(MISCREG_DACR) 270912479SCurtis.Dunham@arm.com .banked(); 271012479SCurtis.Dunham@arm.com InitReg(MISCREG_DACR_NS) 271112479SCurtis.Dunham@arm.com .bankedChild() 271212479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 271312479SCurtis.Dunham@arm.com InitReg(MISCREG_DACR_S) 271412479SCurtis.Dunham@arm.com .bankedChild() 271512479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 271612479SCurtis.Dunham@arm.com InitReg(MISCREG_DFSR) 271712479SCurtis.Dunham@arm.com .banked(); 271812479SCurtis.Dunham@arm.com InitReg(MISCREG_DFSR_NS) 271912479SCurtis.Dunham@arm.com .bankedChild() 272012479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 272112479SCurtis.Dunham@arm.com InitReg(MISCREG_DFSR_S) 272212479SCurtis.Dunham@arm.com .bankedChild() 272312479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 272412479SCurtis.Dunham@arm.com InitReg(MISCREG_IFSR) 272512479SCurtis.Dunham@arm.com .banked(); 272612479SCurtis.Dunham@arm.com InitReg(MISCREG_IFSR_NS) 272712479SCurtis.Dunham@arm.com .bankedChild() 272812479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 272912479SCurtis.Dunham@arm.com InitReg(MISCREG_IFSR_S) 273012479SCurtis.Dunham@arm.com .bankedChild() 273112479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 273212479SCurtis.Dunham@arm.com InitReg(MISCREG_ADFSR) 273312479SCurtis.Dunham@arm.com .unimplemented() 273412479SCurtis.Dunham@arm.com .warnNotFail() 273512479SCurtis.Dunham@arm.com .banked(); 273612479SCurtis.Dunham@arm.com InitReg(MISCREG_ADFSR_NS) 273712479SCurtis.Dunham@arm.com .unimplemented() 273812479SCurtis.Dunham@arm.com .warnNotFail() 273912479SCurtis.Dunham@arm.com .bankedChild() 274012479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 274112479SCurtis.Dunham@arm.com InitReg(MISCREG_ADFSR_S) 274212479SCurtis.Dunham@arm.com .unimplemented() 274312479SCurtis.Dunham@arm.com .warnNotFail() 274412479SCurtis.Dunham@arm.com .bankedChild() 274512479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 274612479SCurtis.Dunham@arm.com InitReg(MISCREG_AIFSR) 274712479SCurtis.Dunham@arm.com .unimplemented() 274812479SCurtis.Dunham@arm.com .warnNotFail() 274912479SCurtis.Dunham@arm.com .banked(); 275012479SCurtis.Dunham@arm.com InitReg(MISCREG_AIFSR_NS) 275112479SCurtis.Dunham@arm.com .unimplemented() 275212479SCurtis.Dunham@arm.com .warnNotFail() 275312479SCurtis.Dunham@arm.com .bankedChild() 275412479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 275512479SCurtis.Dunham@arm.com InitReg(MISCREG_AIFSR_S) 275612479SCurtis.Dunham@arm.com .unimplemented() 275712479SCurtis.Dunham@arm.com .warnNotFail() 275812479SCurtis.Dunham@arm.com .bankedChild() 275912479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 276012479SCurtis.Dunham@arm.com InitReg(MISCREG_HADFSR) 276112479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 276212479SCurtis.Dunham@arm.com InitReg(MISCREG_HAIFSR) 276312479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 276412479SCurtis.Dunham@arm.com InitReg(MISCREG_HSR) 276512479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 276612479SCurtis.Dunham@arm.com InitReg(MISCREG_DFAR) 276712479SCurtis.Dunham@arm.com .banked(); 276812479SCurtis.Dunham@arm.com InitReg(MISCREG_DFAR_NS) 276912479SCurtis.Dunham@arm.com .bankedChild() 277012479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 277112479SCurtis.Dunham@arm.com InitReg(MISCREG_DFAR_S) 277212479SCurtis.Dunham@arm.com .bankedChild() 277312479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 277412479SCurtis.Dunham@arm.com InitReg(MISCREG_IFAR) 277512479SCurtis.Dunham@arm.com .banked(); 277612479SCurtis.Dunham@arm.com InitReg(MISCREG_IFAR_NS) 277712479SCurtis.Dunham@arm.com .bankedChild() 277812479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 277912479SCurtis.Dunham@arm.com InitReg(MISCREG_IFAR_S) 278012479SCurtis.Dunham@arm.com .bankedChild() 278112479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 278212479SCurtis.Dunham@arm.com InitReg(MISCREG_HDFAR) 278312479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 278412479SCurtis.Dunham@arm.com InitReg(MISCREG_HIFAR) 278512479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 278612479SCurtis.Dunham@arm.com InitReg(MISCREG_HPFAR) 278712479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 278812479SCurtis.Dunham@arm.com InitReg(MISCREG_ICIALLUIS) 278912479SCurtis.Dunham@arm.com .unimplemented() 279012479SCurtis.Dunham@arm.com .warnNotFail() 279112479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 279212479SCurtis.Dunham@arm.com InitReg(MISCREG_BPIALLIS) 279312479SCurtis.Dunham@arm.com .unimplemented() 279412479SCurtis.Dunham@arm.com .warnNotFail() 279512479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 279612479SCurtis.Dunham@arm.com InitReg(MISCREG_PAR) 279712479SCurtis.Dunham@arm.com .banked(); 279812479SCurtis.Dunham@arm.com InitReg(MISCREG_PAR_NS) 279912479SCurtis.Dunham@arm.com .bankedChild() 280012479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 280112479SCurtis.Dunham@arm.com InitReg(MISCREG_PAR_S) 280212479SCurtis.Dunham@arm.com .bankedChild() 280312479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 280412479SCurtis.Dunham@arm.com InitReg(MISCREG_ICIALLU) 280512479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 280612479SCurtis.Dunham@arm.com InitReg(MISCREG_ICIMVAU) 280712479SCurtis.Dunham@arm.com .unimplemented() 280812479SCurtis.Dunham@arm.com .warnNotFail() 280912479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 281012479SCurtis.Dunham@arm.com InitReg(MISCREG_CP15ISB) 281112479SCurtis.Dunham@arm.com .writes(1); 281212479SCurtis.Dunham@arm.com InitReg(MISCREG_BPIALL) 281312479SCurtis.Dunham@arm.com .unimplemented() 281412479SCurtis.Dunham@arm.com .warnNotFail() 281512479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 281612479SCurtis.Dunham@arm.com InitReg(MISCREG_BPIMVA) 281712479SCurtis.Dunham@arm.com .unimplemented() 281812479SCurtis.Dunham@arm.com .warnNotFail() 281912479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 282012479SCurtis.Dunham@arm.com InitReg(MISCREG_DCIMVAC) 282112479SCurtis.Dunham@arm.com .unimplemented() 282212479SCurtis.Dunham@arm.com .warnNotFail() 282312479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 282412479SCurtis.Dunham@arm.com InitReg(MISCREG_DCISW) 282512479SCurtis.Dunham@arm.com .unimplemented() 282612479SCurtis.Dunham@arm.com .warnNotFail() 282712479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 282812479SCurtis.Dunham@arm.com InitReg(MISCREG_ATS1CPR) 282912479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 283012479SCurtis.Dunham@arm.com InitReg(MISCREG_ATS1CPW) 283112479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 283212479SCurtis.Dunham@arm.com InitReg(MISCREG_ATS1CUR) 283312479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 283412479SCurtis.Dunham@arm.com InitReg(MISCREG_ATS1CUW) 283512479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 283612479SCurtis.Dunham@arm.com InitReg(MISCREG_ATS12NSOPR) 283712479SCurtis.Dunham@arm.com .privSecureWrite().hypWrite().monSecureWrite().monNonSecureWrite(); 283812479SCurtis.Dunham@arm.com InitReg(MISCREG_ATS12NSOPW) 283912479SCurtis.Dunham@arm.com .privSecureWrite().hypWrite().monSecureWrite().monNonSecureWrite(); 284012479SCurtis.Dunham@arm.com InitReg(MISCREG_ATS12NSOUR) 284112479SCurtis.Dunham@arm.com .privSecureWrite().hypWrite().monSecureWrite().monNonSecureWrite(); 284212479SCurtis.Dunham@arm.com InitReg(MISCREG_ATS12NSOUW) 284312479SCurtis.Dunham@arm.com .privSecureWrite().hypWrite().monSecureWrite().monNonSecureWrite(); 284412479SCurtis.Dunham@arm.com InitReg(MISCREG_DCCMVAC) 284512479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 284612479SCurtis.Dunham@arm.com InitReg(MISCREG_DCCSW) 284712479SCurtis.Dunham@arm.com .unimplemented() 284812479SCurtis.Dunham@arm.com .warnNotFail() 284912479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 285012479SCurtis.Dunham@arm.com InitReg(MISCREG_CP15DSB) 285112479SCurtis.Dunham@arm.com .writes(1); 285212479SCurtis.Dunham@arm.com InitReg(MISCREG_CP15DMB) 285312479SCurtis.Dunham@arm.com .writes(1); 285412479SCurtis.Dunham@arm.com InitReg(MISCREG_DCCMVAU) 285512479SCurtis.Dunham@arm.com .unimplemented() 285612479SCurtis.Dunham@arm.com .warnNotFail() 285712479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 285812479SCurtis.Dunham@arm.com InitReg(MISCREG_DCCIMVAC) 285912479SCurtis.Dunham@arm.com .unimplemented() 286012479SCurtis.Dunham@arm.com .warnNotFail() 286112479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 286212479SCurtis.Dunham@arm.com InitReg(MISCREG_DCCISW) 286312479SCurtis.Dunham@arm.com .unimplemented() 286412479SCurtis.Dunham@arm.com .warnNotFail() 286512479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 286612479SCurtis.Dunham@arm.com InitReg(MISCREG_ATS1HR) 286712479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 286812479SCurtis.Dunham@arm.com InitReg(MISCREG_ATS1HW) 286912479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 287012479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIALLIS) 287112479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 287212479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIMVAIS) 287312479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 287412479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIASIDIS) 287512479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 287612479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIMVAAIS) 287712479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 287812479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIMVALIS) 287912479SCurtis.Dunham@arm.com .unimplemented() 288012479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 288112479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIMVAALIS) 288212479SCurtis.Dunham@arm.com .unimplemented() 288312479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 288412479SCurtis.Dunham@arm.com InitReg(MISCREG_ITLBIALL) 288512479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 288612479SCurtis.Dunham@arm.com InitReg(MISCREG_ITLBIMVA) 288712479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 288812479SCurtis.Dunham@arm.com InitReg(MISCREG_ITLBIASID) 288912479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 289012479SCurtis.Dunham@arm.com InitReg(MISCREG_DTLBIALL) 289112479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 289212479SCurtis.Dunham@arm.com InitReg(MISCREG_DTLBIMVA) 289312479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 289412479SCurtis.Dunham@arm.com InitReg(MISCREG_DTLBIASID) 289512479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 289612479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIALL) 289712479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 289812479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIMVA) 289912479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 290012479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIASID) 290112479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 290212479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIMVAA) 290312479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 290412479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIMVAL) 290512479SCurtis.Dunham@arm.com .unimplemented() 290612479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 290712479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIMVAAL) 290812479SCurtis.Dunham@arm.com .unimplemented() 290912479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 291012479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIIPAS2IS) 291112479SCurtis.Dunham@arm.com .unimplemented() 291212479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 291312479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIIPAS2LIS) 291412479SCurtis.Dunham@arm.com .unimplemented() 291512479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 291612479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIALLHIS) 291712479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 291812479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIMVAHIS) 291912479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 292012479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIALLNSNHIS) 292112479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 292212479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIMVALHIS) 292312479SCurtis.Dunham@arm.com .unimplemented() 292412479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 292512479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIIPAS2) 292612479SCurtis.Dunham@arm.com .unimplemented() 292712479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 292812479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIIPAS2L) 292912479SCurtis.Dunham@arm.com .unimplemented() 293012479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 293112479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIALLH) 293212479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 293312479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIMVAH) 293412479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 293512479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIALLNSNH) 293612479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 293712479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBIMVALH) 293812479SCurtis.Dunham@arm.com .unimplemented() 293912479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 294012479SCurtis.Dunham@arm.com InitReg(MISCREG_PMCR) 294112479SCurtis.Dunham@arm.com .allPrivileges(); 294212479SCurtis.Dunham@arm.com InitReg(MISCREG_PMCNTENSET) 294312479SCurtis.Dunham@arm.com .allPrivileges(); 294412479SCurtis.Dunham@arm.com InitReg(MISCREG_PMCNTENCLR) 294512479SCurtis.Dunham@arm.com .allPrivileges(); 294612479SCurtis.Dunham@arm.com InitReg(MISCREG_PMOVSR) 294712479SCurtis.Dunham@arm.com .allPrivileges(); 294812479SCurtis.Dunham@arm.com InitReg(MISCREG_PMSWINC) 294912479SCurtis.Dunham@arm.com .allPrivileges(); 295012479SCurtis.Dunham@arm.com InitReg(MISCREG_PMSELR) 295112479SCurtis.Dunham@arm.com .allPrivileges(); 295212479SCurtis.Dunham@arm.com InitReg(MISCREG_PMCEID0) 295312479SCurtis.Dunham@arm.com .allPrivileges(); 295412479SCurtis.Dunham@arm.com InitReg(MISCREG_PMCEID1) 295512479SCurtis.Dunham@arm.com .allPrivileges(); 295612479SCurtis.Dunham@arm.com InitReg(MISCREG_PMCCNTR) 295712479SCurtis.Dunham@arm.com .allPrivileges(); 295812479SCurtis.Dunham@arm.com InitReg(MISCREG_PMXEVTYPER) 295912479SCurtis.Dunham@arm.com .allPrivileges(); 296012479SCurtis.Dunham@arm.com InitReg(MISCREG_PMCCFILTR) 296112479SCurtis.Dunham@arm.com .allPrivileges(); 296212479SCurtis.Dunham@arm.com InitReg(MISCREG_PMXEVCNTR) 296312479SCurtis.Dunham@arm.com .allPrivileges(); 296412479SCurtis.Dunham@arm.com InitReg(MISCREG_PMUSERENR) 296512479SCurtis.Dunham@arm.com .allPrivileges().userNonSecureWrite(0).userSecureWrite(0); 296612479SCurtis.Dunham@arm.com InitReg(MISCREG_PMINTENSET) 296712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 296812479SCurtis.Dunham@arm.com InitReg(MISCREG_PMINTENCLR) 296912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 297012479SCurtis.Dunham@arm.com InitReg(MISCREG_PMOVSSET) 297112479SCurtis.Dunham@arm.com .unimplemented() 297212479SCurtis.Dunham@arm.com .allPrivileges(); 297312479SCurtis.Dunham@arm.com InitReg(MISCREG_L2CTLR) 297412479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 297512479SCurtis.Dunham@arm.com InitReg(MISCREG_L2ECTLR) 297612479SCurtis.Dunham@arm.com .unimplemented() 297712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 297812479SCurtis.Dunham@arm.com InitReg(MISCREG_PRRR) 297912479SCurtis.Dunham@arm.com .banked(); 298012479SCurtis.Dunham@arm.com InitReg(MISCREG_PRRR_NS) 298112479SCurtis.Dunham@arm.com .bankedChild() 298212479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 298312479SCurtis.Dunham@arm.com InitReg(MISCREG_PRRR_S) 298412479SCurtis.Dunham@arm.com .bankedChild() 298512479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 298612479SCurtis.Dunham@arm.com InitReg(MISCREG_MAIR0) 298712479SCurtis.Dunham@arm.com .banked(); 298812479SCurtis.Dunham@arm.com InitReg(MISCREG_MAIR0_NS) 298912479SCurtis.Dunham@arm.com .bankedChild() 299012479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 299112479SCurtis.Dunham@arm.com InitReg(MISCREG_MAIR0_S) 299212479SCurtis.Dunham@arm.com .bankedChild() 299312479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 299412479SCurtis.Dunham@arm.com InitReg(MISCREG_NMRR) 299512479SCurtis.Dunham@arm.com .banked(); 299612479SCurtis.Dunham@arm.com InitReg(MISCREG_NMRR_NS) 299712479SCurtis.Dunham@arm.com .bankedChild() 299812479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 299912479SCurtis.Dunham@arm.com InitReg(MISCREG_NMRR_S) 300012479SCurtis.Dunham@arm.com .bankedChild() 300112479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 300212479SCurtis.Dunham@arm.com InitReg(MISCREG_MAIR1) 300312479SCurtis.Dunham@arm.com .banked(); 300412479SCurtis.Dunham@arm.com InitReg(MISCREG_MAIR1_NS) 300512479SCurtis.Dunham@arm.com .bankedChild() 300612479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 300712479SCurtis.Dunham@arm.com InitReg(MISCREG_MAIR1_S) 300812479SCurtis.Dunham@arm.com .bankedChild() 300912479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 301012479SCurtis.Dunham@arm.com InitReg(MISCREG_AMAIR0) 301112479SCurtis.Dunham@arm.com .banked(); 301212479SCurtis.Dunham@arm.com InitReg(MISCREG_AMAIR0_NS) 301312479SCurtis.Dunham@arm.com .bankedChild() 301412479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 301512479SCurtis.Dunham@arm.com InitReg(MISCREG_AMAIR0_S) 301612479SCurtis.Dunham@arm.com .bankedChild() 301712479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 301812479SCurtis.Dunham@arm.com InitReg(MISCREG_AMAIR1) 301912479SCurtis.Dunham@arm.com .banked(); 302012479SCurtis.Dunham@arm.com InitReg(MISCREG_AMAIR1_NS) 302112479SCurtis.Dunham@arm.com .bankedChild() 302212479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 302312479SCurtis.Dunham@arm.com InitReg(MISCREG_AMAIR1_S) 302412479SCurtis.Dunham@arm.com .bankedChild() 302512479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 302612479SCurtis.Dunham@arm.com InitReg(MISCREG_HMAIR0) 302712479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 302812479SCurtis.Dunham@arm.com InitReg(MISCREG_HMAIR1) 302912479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 303012479SCurtis.Dunham@arm.com InitReg(MISCREG_HAMAIR0) 303112479SCurtis.Dunham@arm.com .unimplemented() 303212479SCurtis.Dunham@arm.com .warnNotFail() 303312479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 303412479SCurtis.Dunham@arm.com InitReg(MISCREG_HAMAIR1) 303512479SCurtis.Dunham@arm.com .unimplemented() 303612479SCurtis.Dunham@arm.com .warnNotFail() 303712479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 303812479SCurtis.Dunham@arm.com InitReg(MISCREG_VBAR) 303912479SCurtis.Dunham@arm.com .banked(); 304012479SCurtis.Dunham@arm.com InitReg(MISCREG_VBAR_NS) 304112479SCurtis.Dunham@arm.com .bankedChild() 304212479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 304312479SCurtis.Dunham@arm.com InitReg(MISCREG_VBAR_S) 304412479SCurtis.Dunham@arm.com .bankedChild() 304512479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 304612479SCurtis.Dunham@arm.com InitReg(MISCREG_MVBAR) 304712479SCurtis.Dunham@arm.com .mon().secure().exceptUserMode(); 304812479SCurtis.Dunham@arm.com InitReg(MISCREG_RMR) 304912479SCurtis.Dunham@arm.com .unimplemented() 305012479SCurtis.Dunham@arm.com .mon().secure().exceptUserMode(); 305112479SCurtis.Dunham@arm.com InitReg(MISCREG_ISR) 305212479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 305312479SCurtis.Dunham@arm.com InitReg(MISCREG_HVBAR) 305412479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 305512479SCurtis.Dunham@arm.com InitReg(MISCREG_FCSEIDR) 305612479SCurtis.Dunham@arm.com .unimplemented() 305712479SCurtis.Dunham@arm.com .warnNotFail() 305812479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 305912479SCurtis.Dunham@arm.com InitReg(MISCREG_CONTEXTIDR) 306012479SCurtis.Dunham@arm.com .banked(); 306112479SCurtis.Dunham@arm.com InitReg(MISCREG_CONTEXTIDR_NS) 306212479SCurtis.Dunham@arm.com .bankedChild() 306312479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 306412479SCurtis.Dunham@arm.com InitReg(MISCREG_CONTEXTIDR_S) 306512479SCurtis.Dunham@arm.com .bankedChild() 306612479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 306712479SCurtis.Dunham@arm.com InitReg(MISCREG_TPIDRURW) 306812479SCurtis.Dunham@arm.com .banked(); 306912479SCurtis.Dunham@arm.com InitReg(MISCREG_TPIDRURW_NS) 307012479SCurtis.Dunham@arm.com .bankedChild() 307112479SCurtis.Dunham@arm.com .allPrivileges().monSecure(0).privSecure(0); 307212479SCurtis.Dunham@arm.com InitReg(MISCREG_TPIDRURW_S) 307312479SCurtis.Dunham@arm.com .bankedChild() 307412479SCurtis.Dunham@arm.com .secure(); 307512479SCurtis.Dunham@arm.com InitReg(MISCREG_TPIDRURO) 307612479SCurtis.Dunham@arm.com .banked(); 307712479SCurtis.Dunham@arm.com InitReg(MISCREG_TPIDRURO_NS) 307812479SCurtis.Dunham@arm.com .bankedChild() 307912479SCurtis.Dunham@arm.com .allPrivileges().secure(0).userNonSecureWrite(0).userSecureRead(1); 308012479SCurtis.Dunham@arm.com InitReg(MISCREG_TPIDRURO_S) 308112479SCurtis.Dunham@arm.com .bankedChild() 308212479SCurtis.Dunham@arm.com .secure().userSecureWrite(0); 308312479SCurtis.Dunham@arm.com InitReg(MISCREG_TPIDRPRW) 308412479SCurtis.Dunham@arm.com .banked(); 308512479SCurtis.Dunham@arm.com InitReg(MISCREG_TPIDRPRW_NS) 308612479SCurtis.Dunham@arm.com .bankedChild() 308712479SCurtis.Dunham@arm.com .nonSecure().exceptUserMode(); 308812479SCurtis.Dunham@arm.com InitReg(MISCREG_TPIDRPRW_S) 308912479SCurtis.Dunham@arm.com .bankedChild() 309012479SCurtis.Dunham@arm.com .secure().exceptUserMode(); 309112479SCurtis.Dunham@arm.com InitReg(MISCREG_HTPIDR) 309212479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 309312479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTFRQ) 309412479SCurtis.Dunham@arm.com .unverifiable() 309512479SCurtis.Dunham@arm.com .reads(1).mon(); 309612479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTKCTL) 309712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 309812479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTP_TVAL) 309912479SCurtis.Dunham@arm.com .banked(); 310012479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTP_TVAL_NS) 310112479SCurtis.Dunham@arm.com .bankedChild() 310212479SCurtis.Dunham@arm.com .allPrivileges().monSecure(0).privSecure(0); 310312479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTP_TVAL_S) 310412479SCurtis.Dunham@arm.com .unimplemented() 310512479SCurtis.Dunham@arm.com .bankedChild() 310612479SCurtis.Dunham@arm.com .secure().user(1); 310712479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTP_CTL) 310812479SCurtis.Dunham@arm.com .banked(); 310912479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTP_CTL_NS) 311012479SCurtis.Dunham@arm.com .bankedChild() 311112479SCurtis.Dunham@arm.com .allPrivileges().monSecure(0).privSecure(0); 311212479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTP_CTL_S) 311312479SCurtis.Dunham@arm.com .unimplemented() 311412479SCurtis.Dunham@arm.com .bankedChild() 311512479SCurtis.Dunham@arm.com .secure().user(1); 311612479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTV_TVAL) 311712479SCurtis.Dunham@arm.com .allPrivileges(); 311812479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTV_CTL) 311912479SCurtis.Dunham@arm.com .allPrivileges(); 312012479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTHCTL) 312112479SCurtis.Dunham@arm.com .unimplemented() 312212479SCurtis.Dunham@arm.com .hypWrite().monNonSecureRead(); 312312479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTHP_TVAL) 312412479SCurtis.Dunham@arm.com .unimplemented() 312512479SCurtis.Dunham@arm.com .hypWrite().monNonSecureRead(); 312612479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTHP_CTL) 312712479SCurtis.Dunham@arm.com .unimplemented() 312812479SCurtis.Dunham@arm.com .hypWrite().monNonSecureRead(); 312912479SCurtis.Dunham@arm.com InitReg(MISCREG_IL1DATA0) 313012479SCurtis.Dunham@arm.com .unimplemented() 313112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 313212479SCurtis.Dunham@arm.com InitReg(MISCREG_IL1DATA1) 313312479SCurtis.Dunham@arm.com .unimplemented() 313412479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 313512479SCurtis.Dunham@arm.com InitReg(MISCREG_IL1DATA2) 313612479SCurtis.Dunham@arm.com .unimplemented() 313712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 313812479SCurtis.Dunham@arm.com InitReg(MISCREG_IL1DATA3) 313912479SCurtis.Dunham@arm.com .unimplemented() 314012479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 314112479SCurtis.Dunham@arm.com InitReg(MISCREG_DL1DATA0) 314212479SCurtis.Dunham@arm.com .unimplemented() 314312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 314412479SCurtis.Dunham@arm.com InitReg(MISCREG_DL1DATA1) 314512479SCurtis.Dunham@arm.com .unimplemented() 314612479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 314712479SCurtis.Dunham@arm.com InitReg(MISCREG_DL1DATA2) 314812479SCurtis.Dunham@arm.com .unimplemented() 314912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 315012479SCurtis.Dunham@arm.com InitReg(MISCREG_DL1DATA3) 315112479SCurtis.Dunham@arm.com .unimplemented() 315212479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 315312479SCurtis.Dunham@arm.com InitReg(MISCREG_DL1DATA4) 315412479SCurtis.Dunham@arm.com .unimplemented() 315512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 315612479SCurtis.Dunham@arm.com InitReg(MISCREG_RAMINDEX) 315712479SCurtis.Dunham@arm.com .unimplemented() 315812479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 315912479SCurtis.Dunham@arm.com InitReg(MISCREG_L2ACTLR) 316012479SCurtis.Dunham@arm.com .unimplemented() 316112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 316212479SCurtis.Dunham@arm.com InitReg(MISCREG_CBAR) 316312479SCurtis.Dunham@arm.com .unimplemented() 316412479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 316512479SCurtis.Dunham@arm.com InitReg(MISCREG_HTTBR) 316612479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 316712479SCurtis.Dunham@arm.com InitReg(MISCREG_VTTBR) 316812479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 316912479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTPCT) 317012479SCurtis.Dunham@arm.com .reads(1); 317112479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTVCT) 317212479SCurtis.Dunham@arm.com .unverifiable() 317312479SCurtis.Dunham@arm.com .reads(1); 317412479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTP_CVAL) 317512479SCurtis.Dunham@arm.com .banked(); 317612479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTP_CVAL_NS) 317712479SCurtis.Dunham@arm.com .bankedChild() 317812479SCurtis.Dunham@arm.com .allPrivileges().monSecure(0).privSecure(0); 317912479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTP_CVAL_S) 318012479SCurtis.Dunham@arm.com .unimplemented() 318112479SCurtis.Dunham@arm.com .bankedChild() 318212479SCurtis.Dunham@arm.com .secure().user(1); 318312479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTV_CVAL) 318412479SCurtis.Dunham@arm.com .allPrivileges(); 318512479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTVOFF) 318612479SCurtis.Dunham@arm.com .hyp().monNonSecure(); 318712479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTHP_CVAL) 318812479SCurtis.Dunham@arm.com .unimplemented() 318912479SCurtis.Dunham@arm.com .hypWrite().monNonSecureRead(); 319012479SCurtis.Dunham@arm.com InitReg(MISCREG_CPUMERRSR) 319112479SCurtis.Dunham@arm.com .unimplemented() 319212479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 319312479SCurtis.Dunham@arm.com InitReg(MISCREG_L2MERRSR) 319412479SCurtis.Dunham@arm.com .unimplemented() 319512479SCurtis.Dunham@arm.com .warnNotFail() 319612479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 319712479SCurtis.Dunham@arm.com 319812479SCurtis.Dunham@arm.com // AArch64 registers (Op0=2); 319912479SCurtis.Dunham@arm.com InitReg(MISCREG_MDCCINT_EL1) 320012479SCurtis.Dunham@arm.com .allPrivileges(); 320112479SCurtis.Dunham@arm.com InitReg(MISCREG_OSDTRRX_EL1) 320212479SCurtis.Dunham@arm.com .allPrivileges() 320312479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGDTRRXext); 320412479SCurtis.Dunham@arm.com InitReg(MISCREG_MDSCR_EL1) 320512479SCurtis.Dunham@arm.com .allPrivileges() 320612479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGDSCRext); 320712479SCurtis.Dunham@arm.com InitReg(MISCREG_OSDTRTX_EL1) 320812479SCurtis.Dunham@arm.com .allPrivileges() 320912479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGDTRTXext); 321012479SCurtis.Dunham@arm.com InitReg(MISCREG_OSECCR_EL1) 321112479SCurtis.Dunham@arm.com .allPrivileges() 321212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGOSECCR); 321312479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBVR0_EL1) 321412479SCurtis.Dunham@arm.com .allPrivileges() 321512479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGBVR0 /*, MISCREG_DBGBXVR0 */); 321612479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBVR1_EL1) 321712479SCurtis.Dunham@arm.com .allPrivileges() 321812479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGBVR1 /*, MISCREG_DBGBXVR1 */); 321912479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBVR2_EL1) 322012479SCurtis.Dunham@arm.com .allPrivileges() 322112479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGBVR2 /*, MISCREG_DBGBXVR2 */); 322212479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBVR3_EL1) 322312479SCurtis.Dunham@arm.com .allPrivileges() 322412479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGBVR3 /*, MISCREG_DBGBXVR3 */); 322512479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBVR4_EL1) 322612479SCurtis.Dunham@arm.com .allPrivileges() 322712479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGBVR4 /*, MISCREG_DBGBXVR4 */); 322812479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBVR5_EL1) 322912479SCurtis.Dunham@arm.com .allPrivileges() 323012479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGBVR5 /*, MISCREG_DBGBXVR5 */); 323112479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBCR0_EL1) 323212479SCurtis.Dunham@arm.com .allPrivileges() 323312479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGBCR0); 323412479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBCR1_EL1) 323512479SCurtis.Dunham@arm.com .allPrivileges() 323612479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGBCR1); 323712479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBCR2_EL1) 323812479SCurtis.Dunham@arm.com .allPrivileges() 323912479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGBCR2); 324012479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBCR3_EL1) 324112479SCurtis.Dunham@arm.com .allPrivileges() 324212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGBCR3); 324312479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBCR4_EL1) 324412479SCurtis.Dunham@arm.com .allPrivileges() 324512479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGBCR4); 324612479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGBCR5_EL1) 324712479SCurtis.Dunham@arm.com .allPrivileges() 324812479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGBCR5); 324912479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWVR0_EL1) 325012479SCurtis.Dunham@arm.com .allPrivileges() 325112479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGWVR0); 325212479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWVR1_EL1) 325312479SCurtis.Dunham@arm.com .allPrivileges() 325412479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGWVR1); 325512479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWVR2_EL1) 325612479SCurtis.Dunham@arm.com .allPrivileges() 325712479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGWVR2); 325812479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWVR3_EL1) 325912479SCurtis.Dunham@arm.com .allPrivileges() 326012479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGWVR3); 326112479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWCR0_EL1) 326212479SCurtis.Dunham@arm.com .allPrivileges() 326312479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGWCR0); 326412479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWCR1_EL1) 326512479SCurtis.Dunham@arm.com .allPrivileges() 326612479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGWCR1); 326712479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWCR2_EL1) 326812479SCurtis.Dunham@arm.com .allPrivileges() 326912479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGWCR2); 327012479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGWCR3_EL1) 327112479SCurtis.Dunham@arm.com .allPrivileges() 327212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGWCR3); 327312479SCurtis.Dunham@arm.com InitReg(MISCREG_MDCCSR_EL0) 327412479SCurtis.Dunham@arm.com .allPrivileges().monSecureWrite(0).monNonSecureWrite(0) 327512479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGDSCRint); 327612479SCurtis.Dunham@arm.com InitReg(MISCREG_MDDTR_EL0) 327712479SCurtis.Dunham@arm.com .allPrivileges(); 327812479SCurtis.Dunham@arm.com InitReg(MISCREG_MDDTRTX_EL0) 327912479SCurtis.Dunham@arm.com .allPrivileges(); 328012479SCurtis.Dunham@arm.com InitReg(MISCREG_MDDTRRX_EL0) 328112479SCurtis.Dunham@arm.com .allPrivileges(); 328212479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGVCR32_EL2) 328312479SCurtis.Dunham@arm.com .allPrivileges() 328412479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGVCR); 328512479SCurtis.Dunham@arm.com InitReg(MISCREG_MDRAR_EL1) 328612479SCurtis.Dunham@arm.com .allPrivileges().monSecureWrite(0).monNonSecureWrite(0) 328712479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGDRAR); 328812479SCurtis.Dunham@arm.com InitReg(MISCREG_OSLAR_EL1) 328912479SCurtis.Dunham@arm.com .allPrivileges().monSecureRead(0).monNonSecureRead(0) 329012479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGOSLAR); 329112479SCurtis.Dunham@arm.com InitReg(MISCREG_OSLSR_EL1) 329212479SCurtis.Dunham@arm.com .allPrivileges().monSecureWrite(0).monNonSecureWrite(0) 329312479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGOSLSR); 329412479SCurtis.Dunham@arm.com InitReg(MISCREG_OSDLR_EL1) 329512479SCurtis.Dunham@arm.com .allPrivileges() 329612479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGOSDLR); 329712479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGPRCR_EL1) 329812479SCurtis.Dunham@arm.com .allPrivileges() 329912479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGPRCR); 330012479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGCLAIMSET_EL1) 330112479SCurtis.Dunham@arm.com .allPrivileges() 330212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGCLAIMSET); 330312479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGCLAIMCLR_EL1) 330412479SCurtis.Dunham@arm.com .allPrivileges() 330512479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGCLAIMCLR); 330612479SCurtis.Dunham@arm.com InitReg(MISCREG_DBGAUTHSTATUS_EL1) 330712479SCurtis.Dunham@arm.com .allPrivileges().monSecureWrite(0).monNonSecureWrite(0) 330812479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DBGAUTHSTATUS); 330912479SCurtis.Dunham@arm.com InitReg(MISCREG_TEECR32_EL1); 331012479SCurtis.Dunham@arm.com InitReg(MISCREG_TEEHBR32_EL1); 331112479SCurtis.Dunham@arm.com 331212479SCurtis.Dunham@arm.com // AArch64 registers (Op0=1,3); 331312479SCurtis.Dunham@arm.com InitReg(MISCREG_MIDR_EL1) 331412479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 331512479SCurtis.Dunham@arm.com InitReg(MISCREG_MPIDR_EL1) 331612479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 331712479SCurtis.Dunham@arm.com InitReg(MISCREG_REVIDR_EL1) 331812479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 331912479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_PFR0_EL1) 332012479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 332112479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_PFR1_EL1) 332212479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 332312479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_DFR0_EL1) 332412479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0) 332512479SCurtis.Dunham@arm.com .mapsTo(MISCREG_ID_DFR0); 332612479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_AFR0_EL1) 332712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 332812479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_MMFR0_EL1) 332912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 333012479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_MMFR1_EL1) 333112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 333212479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_MMFR2_EL1) 333312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 333412479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_MMFR3_EL1) 333512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 333612479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_ISAR0_EL1) 333712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 333812479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_ISAR1_EL1) 333912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 334012479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_ISAR2_EL1) 334112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 334212479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_ISAR3_EL1) 334312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 334412479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_ISAR4_EL1) 334512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 334612479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_ISAR5_EL1) 334712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 334812479SCurtis.Dunham@arm.com InitReg(MISCREG_MVFR0_EL1) 334912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 335012479SCurtis.Dunham@arm.com InitReg(MISCREG_MVFR1_EL1) 335112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 335212479SCurtis.Dunham@arm.com InitReg(MISCREG_MVFR2_EL1) 335312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 335412479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_AA64PFR0_EL1) 335512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 335612479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_AA64PFR1_EL1) 335712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 335812479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_AA64DFR0_EL1) 335912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 336012479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_AA64DFR1_EL1) 336112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 336212479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_AA64AFR0_EL1) 336312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 336412479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_AA64AFR1_EL1) 336512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 336612479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_AA64ISAR0_EL1) 336712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 336812479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_AA64ISAR1_EL1) 336912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 337012479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_AA64MMFR0_EL1) 337112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 337212479SCurtis.Dunham@arm.com InitReg(MISCREG_ID_AA64MMFR1_EL1) 337312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 337412479SCurtis.Dunham@arm.com InitReg(MISCREG_CCSIDR_EL1) 337512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 337612479SCurtis.Dunham@arm.com InitReg(MISCREG_CLIDR_EL1) 337712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 337812479SCurtis.Dunham@arm.com InitReg(MISCREG_AIDR_EL1) 337912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 338012479SCurtis.Dunham@arm.com InitReg(MISCREG_CSSELR_EL1) 338112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 338212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CSSELR_NS); 338312479SCurtis.Dunham@arm.com InitReg(MISCREG_CTR_EL0) 338412479SCurtis.Dunham@arm.com .reads(1); 338512479SCurtis.Dunham@arm.com InitReg(MISCREG_DCZID_EL0) 338612479SCurtis.Dunham@arm.com .reads(1); 338712479SCurtis.Dunham@arm.com InitReg(MISCREG_VPIDR_EL2) 338812479SCurtis.Dunham@arm.com .hyp().mon() 338912479SCurtis.Dunham@arm.com .mapsTo(MISCREG_VPIDR); 339012479SCurtis.Dunham@arm.com InitReg(MISCREG_VMPIDR_EL2) 339112479SCurtis.Dunham@arm.com .hyp().mon() 339212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_VMPIDR); 339312479SCurtis.Dunham@arm.com InitReg(MISCREG_SCTLR_EL1) 339412479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 339512479SCurtis.Dunham@arm.com .mapsTo(MISCREG_SCTLR_NS); 339612479SCurtis.Dunham@arm.com InitReg(MISCREG_ACTLR_EL1) 339712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 339812479SCurtis.Dunham@arm.com .mapsTo(MISCREG_ACTLR_NS); 339912479SCurtis.Dunham@arm.com InitReg(MISCREG_CPACR_EL1) 340012479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 340112479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CPACR); 340212479SCurtis.Dunham@arm.com InitReg(MISCREG_SCTLR_EL2) 340312479SCurtis.Dunham@arm.com .hyp().mon() 340412479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HSCTLR); 340512479SCurtis.Dunham@arm.com InitReg(MISCREG_ACTLR_EL2) 340612479SCurtis.Dunham@arm.com .hyp().mon() 340712479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HACTLR); 340812479SCurtis.Dunham@arm.com InitReg(MISCREG_HCR_EL2) 340912479SCurtis.Dunham@arm.com .hyp().mon() 341012479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HCR /*, MISCREG_HCR2*/); 341112479SCurtis.Dunham@arm.com InitReg(MISCREG_MDCR_EL2) 341212479SCurtis.Dunham@arm.com .hyp().mon() 341312479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HDCR); 341412479SCurtis.Dunham@arm.com InitReg(MISCREG_CPTR_EL2) 341512479SCurtis.Dunham@arm.com .hyp().mon() 341612479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HCPTR); 341712479SCurtis.Dunham@arm.com InitReg(MISCREG_HSTR_EL2) 341812479SCurtis.Dunham@arm.com .hyp().mon() 341912479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HSTR); 342012479SCurtis.Dunham@arm.com InitReg(MISCREG_HACR_EL2) 342112479SCurtis.Dunham@arm.com .hyp().mon() 342212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HACR); 342312479SCurtis.Dunham@arm.com InitReg(MISCREG_SCTLR_EL3) 342412479SCurtis.Dunham@arm.com .mon(); 342512479SCurtis.Dunham@arm.com InitReg(MISCREG_ACTLR_EL3) 342612479SCurtis.Dunham@arm.com .mon(); 342712479SCurtis.Dunham@arm.com InitReg(MISCREG_SCR_EL3) 342812479SCurtis.Dunham@arm.com .mon() 342912479SCurtis.Dunham@arm.com .mapsTo(MISCREG_SCR); // NAM D7-2005 343012479SCurtis.Dunham@arm.com InitReg(MISCREG_SDER32_EL3) 343112479SCurtis.Dunham@arm.com .mon() 343212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_SDER); 343312479SCurtis.Dunham@arm.com InitReg(MISCREG_CPTR_EL3) 343412479SCurtis.Dunham@arm.com .mon(); 343512479SCurtis.Dunham@arm.com InitReg(MISCREG_MDCR_EL3) 343612479SCurtis.Dunham@arm.com .mon(); 343712479SCurtis.Dunham@arm.com InitReg(MISCREG_TTBR0_EL1) 343812479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 343912479SCurtis.Dunham@arm.com .mapsTo(MISCREG_TTBR0_NS); 344012479SCurtis.Dunham@arm.com InitReg(MISCREG_TTBR1_EL1) 344112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 344212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_TTBR1_NS); 344312479SCurtis.Dunham@arm.com InitReg(MISCREG_TCR_EL1) 344412479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 344512479SCurtis.Dunham@arm.com .mapsTo(MISCREG_TTBCR_NS); 344612479SCurtis.Dunham@arm.com InitReg(MISCREG_TTBR0_EL2) 344712479SCurtis.Dunham@arm.com .hyp().mon() 344812479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HTTBR); 344912479SCurtis.Dunham@arm.com InitReg(MISCREG_TCR_EL2) 345012479SCurtis.Dunham@arm.com .hyp().mon() 345112479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HTCR); 345212479SCurtis.Dunham@arm.com InitReg(MISCREG_VTTBR_EL2) 345312479SCurtis.Dunham@arm.com .hyp().mon() 345412479SCurtis.Dunham@arm.com .mapsTo(MISCREG_VTTBR); 345512479SCurtis.Dunham@arm.com InitReg(MISCREG_VTCR_EL2) 345612479SCurtis.Dunham@arm.com .hyp().mon() 345712479SCurtis.Dunham@arm.com .mapsTo(MISCREG_VTCR); 345812479SCurtis.Dunham@arm.com InitReg(MISCREG_TTBR0_EL3) 345912479SCurtis.Dunham@arm.com .mon(); 346012479SCurtis.Dunham@arm.com InitReg(MISCREG_TCR_EL3) 346112479SCurtis.Dunham@arm.com .mon(); 346212479SCurtis.Dunham@arm.com InitReg(MISCREG_DACR32_EL2) 346312479SCurtis.Dunham@arm.com .hyp().mon() 346412479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DACR_NS); 346512479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSR_EL1) 346612479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 346712479SCurtis.Dunham@arm.com .mapsTo(MISCREG_SPSR_SVC); // NAM C5.2.17 SPSR_EL1 346812479SCurtis.Dunham@arm.com InitReg(MISCREG_ELR_EL1) 346912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 347012479SCurtis.Dunham@arm.com InitReg(MISCREG_SP_EL0) 347112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 347212479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSEL) 347312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 347412479SCurtis.Dunham@arm.com InitReg(MISCREG_CURRENTEL) 347512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 347612479SCurtis.Dunham@arm.com InitReg(MISCREG_NZCV) 347712479SCurtis.Dunham@arm.com .allPrivileges(); 347812479SCurtis.Dunham@arm.com InitReg(MISCREG_DAIF) 347912479SCurtis.Dunham@arm.com .allPrivileges(); 348012479SCurtis.Dunham@arm.com InitReg(MISCREG_FPCR) 348112479SCurtis.Dunham@arm.com .allPrivileges(); 348212479SCurtis.Dunham@arm.com InitReg(MISCREG_FPSR) 348312479SCurtis.Dunham@arm.com .allPrivileges(); 348412479SCurtis.Dunham@arm.com InitReg(MISCREG_DSPSR_EL0) 348512479SCurtis.Dunham@arm.com .allPrivileges(); 348612479SCurtis.Dunham@arm.com InitReg(MISCREG_DLR_EL0) 348712479SCurtis.Dunham@arm.com .allPrivileges(); 348812479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSR_EL2) 348912479SCurtis.Dunham@arm.com .hyp().mon() 349012479SCurtis.Dunham@arm.com .mapsTo(MISCREG_SPSR_HYP); // NAM C5.2.18 SPSR_EL2 349112479SCurtis.Dunham@arm.com InitReg(MISCREG_ELR_EL2) 349212479SCurtis.Dunham@arm.com .hyp().mon(); 349312479SCurtis.Dunham@arm.com InitReg(MISCREG_SP_EL1) 349412479SCurtis.Dunham@arm.com .hyp().mon(); 349512479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSR_IRQ_AA64) 349612479SCurtis.Dunham@arm.com .hyp().mon(); 349712479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSR_ABT_AA64) 349812479SCurtis.Dunham@arm.com .hyp().mon(); 349912479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSR_UND_AA64) 350012479SCurtis.Dunham@arm.com .hyp().mon(); 350112479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSR_FIQ_AA64) 350212479SCurtis.Dunham@arm.com .hyp().mon(); 350312479SCurtis.Dunham@arm.com InitReg(MISCREG_SPSR_EL3) 350412479SCurtis.Dunham@arm.com .mon() 350512479SCurtis.Dunham@arm.com .mapsTo(MISCREG_SPSR_MON); // NAM C5.2.19 SPSR_EL3 350612479SCurtis.Dunham@arm.com InitReg(MISCREG_ELR_EL3) 350712479SCurtis.Dunham@arm.com .mon(); 350812479SCurtis.Dunham@arm.com InitReg(MISCREG_SP_EL2) 350912479SCurtis.Dunham@arm.com .mon(); 351012479SCurtis.Dunham@arm.com InitReg(MISCREG_AFSR0_EL1) 351112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 351212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_ADFSR_NS); 351312479SCurtis.Dunham@arm.com InitReg(MISCREG_AFSR1_EL1) 351412479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 351512479SCurtis.Dunham@arm.com .mapsTo(MISCREG_AIFSR_NS); 351612479SCurtis.Dunham@arm.com InitReg(MISCREG_ESR_EL1) 351712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 351812479SCurtis.Dunham@arm.com InitReg(MISCREG_IFSR32_EL2) 351912479SCurtis.Dunham@arm.com .hyp().mon() 352012479SCurtis.Dunham@arm.com .mapsTo(MISCREG_IFSR_NS); 352112479SCurtis.Dunham@arm.com InitReg(MISCREG_AFSR0_EL2) 352212479SCurtis.Dunham@arm.com .hyp().mon() 352312479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HADFSR); 352412479SCurtis.Dunham@arm.com InitReg(MISCREG_AFSR1_EL2) 352512479SCurtis.Dunham@arm.com .hyp().mon() 352612479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HAIFSR); 352712479SCurtis.Dunham@arm.com InitReg(MISCREG_ESR_EL2) 352812479SCurtis.Dunham@arm.com .hyp().mon() 352912479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HSR); 353012479SCurtis.Dunham@arm.com InitReg(MISCREG_FPEXC32_EL2) 353112479SCurtis.Dunham@arm.com .hyp().mon(); 353212479SCurtis.Dunham@arm.com InitReg(MISCREG_AFSR0_EL3) 353312479SCurtis.Dunham@arm.com .mon(); 353412479SCurtis.Dunham@arm.com InitReg(MISCREG_AFSR1_EL3) 353512479SCurtis.Dunham@arm.com .mon(); 353612479SCurtis.Dunham@arm.com InitReg(MISCREG_ESR_EL3) 353712479SCurtis.Dunham@arm.com .mon(); 353812479SCurtis.Dunham@arm.com InitReg(MISCREG_FAR_EL1) 353912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 354012479SCurtis.Dunham@arm.com .mapsTo(MISCREG_DFAR_NS, MISCREG_IFAR_NS); 354112479SCurtis.Dunham@arm.com InitReg(MISCREG_FAR_EL2) 354212479SCurtis.Dunham@arm.com .hyp().mon() 354312479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HDFAR, MISCREG_HIFAR); 354412479SCurtis.Dunham@arm.com InitReg(MISCREG_HPFAR_EL2) 354512479SCurtis.Dunham@arm.com .hyp().mon() 354612479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HPFAR); 354712479SCurtis.Dunham@arm.com InitReg(MISCREG_FAR_EL3) 354812479SCurtis.Dunham@arm.com .mon(); 354912479SCurtis.Dunham@arm.com InitReg(MISCREG_IC_IALLUIS) 355012479SCurtis.Dunham@arm.com .warnNotFail() 355112479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 355212479SCurtis.Dunham@arm.com InitReg(MISCREG_PAR_EL1) 355312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 355412479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PAR_NS); 355512479SCurtis.Dunham@arm.com InitReg(MISCREG_IC_IALLU) 355612479SCurtis.Dunham@arm.com .warnNotFail() 355712479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 355812479SCurtis.Dunham@arm.com InitReg(MISCREG_DC_IVAC_Xt) 355912479SCurtis.Dunham@arm.com .warnNotFail() 356012479SCurtis.Dunham@arm.com .writes(1); 356112479SCurtis.Dunham@arm.com InitReg(MISCREG_DC_ISW_Xt) 356212479SCurtis.Dunham@arm.com .warnNotFail() 356312479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 356412479SCurtis.Dunham@arm.com InitReg(MISCREG_AT_S1E1R_Xt) 356512479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 356612479SCurtis.Dunham@arm.com InitReg(MISCREG_AT_S1E1W_Xt) 356712479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 356812479SCurtis.Dunham@arm.com InitReg(MISCREG_AT_S1E0R_Xt) 356912479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 357012479SCurtis.Dunham@arm.com InitReg(MISCREG_AT_S1E0W_Xt) 357112479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 357212479SCurtis.Dunham@arm.com InitReg(MISCREG_DC_CSW_Xt) 357312479SCurtis.Dunham@arm.com .warnNotFail() 357412479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 357512479SCurtis.Dunham@arm.com InitReg(MISCREG_DC_CISW_Xt) 357612479SCurtis.Dunham@arm.com .warnNotFail() 357712479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 357812479SCurtis.Dunham@arm.com InitReg(MISCREG_DC_ZVA_Xt) 357912479SCurtis.Dunham@arm.com .warnNotFail() 358012479SCurtis.Dunham@arm.com .writes(1).userSecureWrite(0); 358112479SCurtis.Dunham@arm.com InitReg(MISCREG_IC_IVAU_Xt) 358212479SCurtis.Dunham@arm.com .writes(1); 358312479SCurtis.Dunham@arm.com InitReg(MISCREG_DC_CVAC_Xt) 358412479SCurtis.Dunham@arm.com .warnNotFail() 358512479SCurtis.Dunham@arm.com .writes(1); 358612479SCurtis.Dunham@arm.com InitReg(MISCREG_DC_CVAU_Xt) 358712479SCurtis.Dunham@arm.com .warnNotFail() 358812479SCurtis.Dunham@arm.com .writes(1); 358912479SCurtis.Dunham@arm.com InitReg(MISCREG_DC_CIVAC_Xt) 359012479SCurtis.Dunham@arm.com .warnNotFail() 359112479SCurtis.Dunham@arm.com .writes(1); 359212479SCurtis.Dunham@arm.com InitReg(MISCREG_AT_S1E2R_Xt) 359312479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 359412479SCurtis.Dunham@arm.com InitReg(MISCREG_AT_S1E2W_Xt) 359512479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 359612479SCurtis.Dunham@arm.com InitReg(MISCREG_AT_S12E1R_Xt) 359712479SCurtis.Dunham@arm.com .hypWrite().monSecureWrite().monNonSecureWrite(); 359812479SCurtis.Dunham@arm.com InitReg(MISCREG_AT_S12E1W_Xt) 359912479SCurtis.Dunham@arm.com .hypWrite().monSecureWrite().monNonSecureWrite(); 360012479SCurtis.Dunham@arm.com InitReg(MISCREG_AT_S12E0R_Xt) 360112479SCurtis.Dunham@arm.com .hypWrite().monSecureWrite().monNonSecureWrite(); 360212479SCurtis.Dunham@arm.com InitReg(MISCREG_AT_S12E0W_Xt) 360312479SCurtis.Dunham@arm.com .hypWrite().monSecureWrite().monNonSecureWrite(); 360412479SCurtis.Dunham@arm.com InitReg(MISCREG_AT_S1E3R_Xt) 360512479SCurtis.Dunham@arm.com .monSecureWrite().monNonSecureWrite(); 360612479SCurtis.Dunham@arm.com InitReg(MISCREG_AT_S1E3W_Xt) 360712479SCurtis.Dunham@arm.com .monSecureWrite().monNonSecureWrite(); 360812479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VMALLE1IS) 360912479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 361012479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VAE1IS_Xt) 361112479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 361212479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_ASIDE1IS_Xt) 361312479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 361412479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VAAE1IS_Xt) 361512479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 361612479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VALE1IS_Xt) 361712479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 361812479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VAALE1IS_Xt) 361912479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 362012479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VMALLE1) 362112479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 362212479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VAE1_Xt) 362312479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 362412479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_ASIDE1_Xt) 362512479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 362612479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VAAE1_Xt) 362712479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 362812479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VALE1_Xt) 362912479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 363012479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VAALE1_Xt) 363112479SCurtis.Dunham@arm.com .writes(1).exceptUserMode(); 363212479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_IPAS2E1IS_Xt) 363312479SCurtis.Dunham@arm.com .hypWrite().monSecureWrite().monNonSecureWrite(); 363412479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_IPAS2LE1IS_Xt) 363512479SCurtis.Dunham@arm.com .hypWrite().monSecureWrite().monNonSecureWrite(); 363612479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_ALLE2IS) 363712479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 363812479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VAE2IS_Xt) 363912479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 364012479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_ALLE1IS) 364112479SCurtis.Dunham@arm.com .hypWrite().monSecureWrite().monNonSecureWrite(); 364212479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VALE2IS_Xt) 364312479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 364412479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VMALLS12E1IS) 364512479SCurtis.Dunham@arm.com .hypWrite().monSecureWrite().monNonSecureWrite(); 364612479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_IPAS2E1_Xt) 364712479SCurtis.Dunham@arm.com .hypWrite().monSecureWrite().monNonSecureWrite(); 364812479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_IPAS2LE1_Xt) 364912479SCurtis.Dunham@arm.com .hypWrite().monSecureWrite().monNonSecureWrite(); 365012479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_ALLE2) 365112479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 365212479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VAE2_Xt) 365312479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 365412479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_ALLE1) 365512479SCurtis.Dunham@arm.com .hypWrite().monSecureWrite().monNonSecureWrite(); 365612479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VALE2_Xt) 365712479SCurtis.Dunham@arm.com .monNonSecureWrite().hypWrite(); 365812479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VMALLS12E1) 365912479SCurtis.Dunham@arm.com .hypWrite().monSecureWrite().monNonSecureWrite(); 366012479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_ALLE3IS) 366112479SCurtis.Dunham@arm.com .monSecureWrite().monNonSecureWrite(); 366212479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VAE3IS_Xt) 366312479SCurtis.Dunham@arm.com .monSecureWrite().monNonSecureWrite(); 366412479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VALE3IS_Xt) 366512479SCurtis.Dunham@arm.com .monSecureWrite().monNonSecureWrite(); 366612479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_ALLE3) 366712479SCurtis.Dunham@arm.com .monSecureWrite().monNonSecureWrite(); 366812479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VAE3_Xt) 366912479SCurtis.Dunham@arm.com .monSecureWrite().monNonSecureWrite(); 367012479SCurtis.Dunham@arm.com InitReg(MISCREG_TLBI_VALE3_Xt) 367112479SCurtis.Dunham@arm.com .monSecureWrite().monNonSecureWrite(); 367212479SCurtis.Dunham@arm.com InitReg(MISCREG_PMINTENSET_EL1) 367312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 367412479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PMINTENSET); 367512479SCurtis.Dunham@arm.com InitReg(MISCREG_PMINTENCLR_EL1) 367612479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 367712479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PMINTENCLR); 367812479SCurtis.Dunham@arm.com InitReg(MISCREG_PMCR_EL0) 367912479SCurtis.Dunham@arm.com .allPrivileges() 368012479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PMCR); 368112479SCurtis.Dunham@arm.com InitReg(MISCREG_PMCNTENSET_EL0) 368212479SCurtis.Dunham@arm.com .allPrivileges() 368312479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PMCNTENSET); 368412479SCurtis.Dunham@arm.com InitReg(MISCREG_PMCNTENCLR_EL0) 368512479SCurtis.Dunham@arm.com .allPrivileges() 368612479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PMCNTENCLR); 368712479SCurtis.Dunham@arm.com InitReg(MISCREG_PMOVSCLR_EL0) 368812479SCurtis.Dunham@arm.com .allPrivileges(); 368912479SCurtis.Dunham@arm.com// .mapsTo(MISCREG_PMOVSCLR); 369012479SCurtis.Dunham@arm.com InitReg(MISCREG_PMSWINC_EL0) 369112479SCurtis.Dunham@arm.com .writes(1).user() 369212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PMSWINC); 369312479SCurtis.Dunham@arm.com InitReg(MISCREG_PMSELR_EL0) 369412479SCurtis.Dunham@arm.com .allPrivileges() 369512479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PMSELR); 369612479SCurtis.Dunham@arm.com InitReg(MISCREG_PMCEID0_EL0) 369712479SCurtis.Dunham@arm.com .reads(1).user() 369812479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PMCEID0); 369912479SCurtis.Dunham@arm.com InitReg(MISCREG_PMCEID1_EL0) 370012479SCurtis.Dunham@arm.com .reads(1).user() 370112479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PMCEID1); 370212479SCurtis.Dunham@arm.com InitReg(MISCREG_PMCCNTR_EL0) 370312479SCurtis.Dunham@arm.com .allPrivileges() 370412479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PMCCNTR); 370512479SCurtis.Dunham@arm.com InitReg(MISCREG_PMXEVTYPER_EL0) 370612479SCurtis.Dunham@arm.com .allPrivileges() 370712479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PMXEVTYPER); 370812479SCurtis.Dunham@arm.com InitReg(MISCREG_PMCCFILTR_EL0) 370912479SCurtis.Dunham@arm.com .allPrivileges(); 371012479SCurtis.Dunham@arm.com InitReg(MISCREG_PMXEVCNTR_EL0) 371112479SCurtis.Dunham@arm.com .allPrivileges() 371212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PMXEVCNTR); 371312479SCurtis.Dunham@arm.com InitReg(MISCREG_PMUSERENR_EL0) 371412479SCurtis.Dunham@arm.com .allPrivileges().userNonSecureWrite(0).userSecureWrite(0) 371512479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PMUSERENR); 371612479SCurtis.Dunham@arm.com InitReg(MISCREG_PMOVSSET_EL0) 371712479SCurtis.Dunham@arm.com .allPrivileges() 371812479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PMOVSSET); 371912479SCurtis.Dunham@arm.com InitReg(MISCREG_MAIR_EL1) 372012479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 372112479SCurtis.Dunham@arm.com .mapsTo(MISCREG_PRRR_NS, MISCREG_NMRR_NS); 372212479SCurtis.Dunham@arm.com InitReg(MISCREG_AMAIR_EL1) 372312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 372412479SCurtis.Dunham@arm.com .mapsTo(MISCREG_AMAIR0_NS, MISCREG_AMAIR1_NS); 372512479SCurtis.Dunham@arm.com InitReg(MISCREG_MAIR_EL2) 372612479SCurtis.Dunham@arm.com .hyp().mon() 372712479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HMAIR0, MISCREG_HMAIR1); 372812479SCurtis.Dunham@arm.com InitReg(MISCREG_AMAIR_EL2) 372912479SCurtis.Dunham@arm.com .hyp().mon() 373012479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HAMAIR0, MISCREG_HAMAIR1); 373112479SCurtis.Dunham@arm.com InitReg(MISCREG_MAIR_EL3) 373212479SCurtis.Dunham@arm.com .mon(); 373312479SCurtis.Dunham@arm.com InitReg(MISCREG_AMAIR_EL3) 373412479SCurtis.Dunham@arm.com .mon(); 373512479SCurtis.Dunham@arm.com InitReg(MISCREG_L2CTLR_EL1) 373612479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 373712479SCurtis.Dunham@arm.com InitReg(MISCREG_L2ECTLR_EL1) 373812479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 373912479SCurtis.Dunham@arm.com InitReg(MISCREG_VBAR_EL1) 374012479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 374112479SCurtis.Dunham@arm.com .mapsTo(MISCREG_VBAR_NS); 374212479SCurtis.Dunham@arm.com InitReg(MISCREG_RVBAR_EL1) 374312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 374412479SCurtis.Dunham@arm.com InitReg(MISCREG_ISR_EL1) 374512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 374612479SCurtis.Dunham@arm.com InitReg(MISCREG_VBAR_EL2) 374712479SCurtis.Dunham@arm.com .hyp().mon() 374812479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HVBAR); 374912479SCurtis.Dunham@arm.com InitReg(MISCREG_RVBAR_EL2) 375012479SCurtis.Dunham@arm.com .mon().hyp().writes(0); 375112479SCurtis.Dunham@arm.com InitReg(MISCREG_VBAR_EL3) 375212479SCurtis.Dunham@arm.com .mon(); 375312479SCurtis.Dunham@arm.com InitReg(MISCREG_RVBAR_EL3) 375412479SCurtis.Dunham@arm.com .mon().writes(0); 375512479SCurtis.Dunham@arm.com InitReg(MISCREG_RMR_EL3) 375612479SCurtis.Dunham@arm.com .mon(); 375712479SCurtis.Dunham@arm.com InitReg(MISCREG_CONTEXTIDR_EL1) 375812479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 375912479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CONTEXTIDR_NS); 376012479SCurtis.Dunham@arm.com InitReg(MISCREG_TPIDR_EL1) 376112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 376212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_TPIDRPRW_NS); 376312479SCurtis.Dunham@arm.com InitReg(MISCREG_TPIDR_EL0) 376412479SCurtis.Dunham@arm.com .allPrivileges() 376512479SCurtis.Dunham@arm.com .mapsTo(MISCREG_TPIDRURW_NS); 376612479SCurtis.Dunham@arm.com InitReg(MISCREG_TPIDRRO_EL0) 376712479SCurtis.Dunham@arm.com .allPrivileges().userNonSecureWrite(0).userSecureWrite(0) 376812479SCurtis.Dunham@arm.com .mapsTo(MISCREG_TPIDRURO_NS); 376912479SCurtis.Dunham@arm.com InitReg(MISCREG_TPIDR_EL2) 377012479SCurtis.Dunham@arm.com .hyp().mon() 377112479SCurtis.Dunham@arm.com .mapsTo(MISCREG_HTPIDR); 377212479SCurtis.Dunham@arm.com InitReg(MISCREG_TPIDR_EL3) 377312479SCurtis.Dunham@arm.com .mon(); 377412479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTKCTL_EL1) 377512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode() 377612479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CNTKCTL); 377712479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTFRQ_EL0) 377812479SCurtis.Dunham@arm.com .reads(1).mon() 377912479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CNTFRQ); 378012479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTPCT_EL0) 378112479SCurtis.Dunham@arm.com .reads(1) 378212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CNTPCT); /* 64b */ 378312479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTVCT_EL0) 378412479SCurtis.Dunham@arm.com .unverifiable() 378512479SCurtis.Dunham@arm.com .reads(1) 378612479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CNTVCT); /* 64b */ 378712479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTP_TVAL_EL0) 378812479SCurtis.Dunham@arm.com .allPrivileges() 378912479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CNTP_TVAL_NS); 379012479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTP_CTL_EL0) 379112479SCurtis.Dunham@arm.com .allPrivileges() 379212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CNTP_CTL_NS); 379312479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTP_CVAL_EL0) 379412479SCurtis.Dunham@arm.com .allPrivileges() 379512479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CNTP_CVAL_NS); /* 64b */ 379612479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTV_TVAL_EL0) 379712479SCurtis.Dunham@arm.com .allPrivileges() 379812479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CNTV_TVAL); 379912479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTV_CTL_EL0) 380012479SCurtis.Dunham@arm.com .allPrivileges() 380112479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CNTV_CTL); 380212479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTV_CVAL_EL0) 380312479SCurtis.Dunham@arm.com .allPrivileges() 380412479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CNTV_CVAL); /* 64b */ 380512479SCurtis.Dunham@arm.com InitReg(MISCREG_PMEVCNTR0_EL0) 380612479SCurtis.Dunham@arm.com .allPrivileges(); 380712479SCurtis.Dunham@arm.com// .mapsTo(MISCREG_PMEVCNTR0); 380812479SCurtis.Dunham@arm.com InitReg(MISCREG_PMEVCNTR1_EL0) 380912479SCurtis.Dunham@arm.com .allPrivileges(); 381012479SCurtis.Dunham@arm.com// .mapsTo(MISCREG_PMEVCNTR1); 381112479SCurtis.Dunham@arm.com InitReg(MISCREG_PMEVCNTR2_EL0) 381212479SCurtis.Dunham@arm.com .allPrivileges(); 381312479SCurtis.Dunham@arm.com// .mapsTo(MISCREG_PMEVCNTR2); 381412479SCurtis.Dunham@arm.com InitReg(MISCREG_PMEVCNTR3_EL0) 381512479SCurtis.Dunham@arm.com .allPrivileges(); 381612479SCurtis.Dunham@arm.com// .mapsTo(MISCREG_PMEVCNTR3); 381712479SCurtis.Dunham@arm.com InitReg(MISCREG_PMEVCNTR4_EL0) 381812479SCurtis.Dunham@arm.com .allPrivileges(); 381912479SCurtis.Dunham@arm.com// .mapsTo(MISCREG_PMEVCNTR4); 382012479SCurtis.Dunham@arm.com InitReg(MISCREG_PMEVCNTR5_EL0) 382112479SCurtis.Dunham@arm.com .allPrivileges(); 382212479SCurtis.Dunham@arm.com// .mapsTo(MISCREG_PMEVCNTR5); 382312479SCurtis.Dunham@arm.com InitReg(MISCREG_PMEVTYPER0_EL0) 382412479SCurtis.Dunham@arm.com .allPrivileges(); 382512479SCurtis.Dunham@arm.com// .mapsTo(MISCREG_PMEVTYPER0); 382612479SCurtis.Dunham@arm.com InitReg(MISCREG_PMEVTYPER1_EL0) 382712479SCurtis.Dunham@arm.com .allPrivileges(); 382812479SCurtis.Dunham@arm.com// .mapsTo(MISCREG_PMEVTYPER1); 382912479SCurtis.Dunham@arm.com InitReg(MISCREG_PMEVTYPER2_EL0) 383012479SCurtis.Dunham@arm.com .allPrivileges(); 383112479SCurtis.Dunham@arm.com// .mapsTo(MISCREG_PMEVTYPER2); 383212479SCurtis.Dunham@arm.com InitReg(MISCREG_PMEVTYPER3_EL0) 383312479SCurtis.Dunham@arm.com .allPrivileges(); 383412479SCurtis.Dunham@arm.com// .mapsTo(MISCREG_PMEVTYPER3); 383512479SCurtis.Dunham@arm.com InitReg(MISCREG_PMEVTYPER4_EL0) 383612479SCurtis.Dunham@arm.com .allPrivileges(); 383712479SCurtis.Dunham@arm.com// .mapsTo(MISCREG_PMEVTYPER4); 383812479SCurtis.Dunham@arm.com InitReg(MISCREG_PMEVTYPER5_EL0) 383912479SCurtis.Dunham@arm.com .allPrivileges(); 384012479SCurtis.Dunham@arm.com// .mapsTo(MISCREG_PMEVTYPER5); 384112479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTVOFF_EL2) 384212479SCurtis.Dunham@arm.com .hyp().mon() 384312479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CNTVOFF); /* 64b */ 384412479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTHCTL_EL2) 384512479SCurtis.Dunham@arm.com .unimplemented() 384612479SCurtis.Dunham@arm.com .warnNotFail() 384712479SCurtis.Dunham@arm.com .mon().monNonSecureWrite(0).hypWrite() 384812479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CNTHCTL); 384912479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTHP_TVAL_EL2) 385012479SCurtis.Dunham@arm.com .unimplemented() 385112479SCurtis.Dunham@arm.com .mon().monNonSecureWrite(0).hypWrite() 385212479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CNTHP_TVAL); 385312479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTHP_CTL_EL2) 385412479SCurtis.Dunham@arm.com .unimplemented() 385512479SCurtis.Dunham@arm.com .mon().monNonSecureWrite(0).hypWrite() 385612479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CNTHP_CTL); 385712479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTHP_CVAL_EL2) 385812479SCurtis.Dunham@arm.com .unimplemented() 385912479SCurtis.Dunham@arm.com .mon().monNonSecureWrite(0).hypWrite() 386012479SCurtis.Dunham@arm.com .mapsTo(MISCREG_CNTHP_CVAL); /* 64b */ 386112479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTPS_TVAL_EL1) 386212479SCurtis.Dunham@arm.com .unimplemented() 386312479SCurtis.Dunham@arm.com .mon().monNonSecureWrite(0).hypWrite(); 386412479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTPS_CTL_EL1) 386512479SCurtis.Dunham@arm.com .unimplemented() 386612479SCurtis.Dunham@arm.com .mon().monNonSecureWrite(0).hypWrite(); 386712479SCurtis.Dunham@arm.com InitReg(MISCREG_CNTPS_CVAL_EL1) 386812479SCurtis.Dunham@arm.com .unimplemented() 386912479SCurtis.Dunham@arm.com .mon().monNonSecureWrite(0).hypWrite(); 387012479SCurtis.Dunham@arm.com InitReg(MISCREG_IL1DATA0_EL1) 387112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 387212479SCurtis.Dunham@arm.com InitReg(MISCREG_IL1DATA1_EL1) 387312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 387412479SCurtis.Dunham@arm.com InitReg(MISCREG_IL1DATA2_EL1) 387512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 387612479SCurtis.Dunham@arm.com InitReg(MISCREG_IL1DATA3_EL1) 387712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 387812479SCurtis.Dunham@arm.com InitReg(MISCREG_DL1DATA0_EL1) 387912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 388012479SCurtis.Dunham@arm.com InitReg(MISCREG_DL1DATA1_EL1) 388112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 388212479SCurtis.Dunham@arm.com InitReg(MISCREG_DL1DATA2_EL1) 388312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 388412479SCurtis.Dunham@arm.com InitReg(MISCREG_DL1DATA3_EL1) 388512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 388612479SCurtis.Dunham@arm.com InitReg(MISCREG_DL1DATA4_EL1) 388712479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 388812479SCurtis.Dunham@arm.com InitReg(MISCREG_L2ACTLR_EL1) 388912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 389012479SCurtis.Dunham@arm.com InitReg(MISCREG_CPUACTLR_EL1) 389112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 389212479SCurtis.Dunham@arm.com InitReg(MISCREG_CPUECTLR_EL1) 389312479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 389412479SCurtis.Dunham@arm.com InitReg(MISCREG_CPUMERRSR_EL1) 389512479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 389612479SCurtis.Dunham@arm.com InitReg(MISCREG_L2MERRSR_EL1) 389712479SCurtis.Dunham@arm.com .unimplemented() 389812479SCurtis.Dunham@arm.com .warnNotFail() 389912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode(); 390012479SCurtis.Dunham@arm.com InitReg(MISCREG_CBAR_EL1) 390112479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 390212479SCurtis.Dunham@arm.com InitReg(MISCREG_CONTEXTIDR_EL2) 390312479SCurtis.Dunham@arm.com .mon().hyp(); 390412479SCurtis.Dunham@arm.com 390512479SCurtis.Dunham@arm.com // Dummy registers 390612479SCurtis.Dunham@arm.com InitReg(MISCREG_NOP) 390712479SCurtis.Dunham@arm.com .allPrivileges(); 390812479SCurtis.Dunham@arm.com InitReg(MISCREG_RAZ) 390912479SCurtis.Dunham@arm.com .allPrivileges().exceptUserMode().writes(0); 391012479SCurtis.Dunham@arm.com InitReg(MISCREG_CP14_UNIMPL) 391112479SCurtis.Dunham@arm.com .unimplemented() 391212479SCurtis.Dunham@arm.com .warnNotFail(); 391312479SCurtis.Dunham@arm.com InitReg(MISCREG_CP15_UNIMPL) 391412479SCurtis.Dunham@arm.com .unimplemented() 391512479SCurtis.Dunham@arm.com .warnNotFail(); 391612479SCurtis.Dunham@arm.com InitReg(MISCREG_A64_UNIMPL) 391712479SCurtis.Dunham@arm.com .unimplemented() 391812479SCurtis.Dunham@arm.com .warnNotFail(); 391912479SCurtis.Dunham@arm.com InitReg(MISCREG_UNKNOWN); 392012479SCurtis.Dunham@arm.com 392112479SCurtis.Dunham@arm.com // Register mappings for some unimplemented registers: 392212479SCurtis.Dunham@arm.com // ESR_EL1 -> DFSR 392312479SCurtis.Dunham@arm.com // RMR_EL1 -> RMR 392412479SCurtis.Dunham@arm.com // RMR_EL2 -> HRMR 392512479SCurtis.Dunham@arm.com // DBGDTR_EL0 -> DBGDTR{R or T}Xint 392612479SCurtis.Dunham@arm.com // DBGDTRRX_EL0 -> DBGDTRRXint 392712479SCurtis.Dunham@arm.com // DBGDTRTX_EL0 -> DBGDTRRXint 392812479SCurtis.Dunham@arm.com // MDCR_EL3 -> SDCR, NAM D7-2108 (the latter is unimpl. in gem5) 392912479SCurtis.Dunham@arm.com 393012479SCurtis.Dunham@arm.com completed = true; 393112479SCurtis.Dunham@arm.com} 393212479SCurtis.Dunham@arm.com 393310037SARM gem5 Developers} // namespace ArmISA 3934