dt_constants.hh revision 4661
12131SN/A/* 22131SN/A * Copyright (c) 2006 The Regents of The University of Michigan 32131SN/A * All rights reserved. 42131SN/A * 52131SN/A * Redistribution and use in source and binary forms, with or without 62131SN/A * modification, are permitted provided that the following conditions are 72131SN/A * met: redistributions of source code must retain the above copyright 82131SN/A * notice, this list of conditions and the following disclaimer; 92131SN/A * redistributions in binary form must reproduce the above copyright 102131SN/A * notice, this list of conditions and the following disclaimer in the 112131SN/A * documentation and/or other materials provided with the distribution; 122131SN/A * neither the name of the copyright holders nor the names of its 132131SN/A * contributors may be used to endorse or promote products derived from 142131SN/A * this software without specific prior written permission. 152131SN/A * 162131SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 172131SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 182131SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 192131SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 202131SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 212131SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 222131SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 232131SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 242131SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 252131SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 262131SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 272665Ssaidi@eecs.umich.edu * 282935Sksewell@umich.edu * Authors: Jaidev Patwardhan 292935Sksewell@umich.edu */ 302131SN/A 312131SN/A#ifndef __ARCH_MIPS_DT_CONSTANTS_HH__ 322239SN/A#define __ARCH_MIPS_DT_CONSTANTS_HH__ 332239SN/A 342131SN/A#include "arch/mips/types.hh" 352131SN/A//#include "config/full_system.hh" 362447SN/A 372447SN/Anamespace MipsISA 382447SN/A{ 392447SN/A // See the EJTAG Specification - Revision 4.10 402447SN/A // Also see PDTrace Specification - Revision 4.30 412447SN/A 422447SN/A // Debug Register - CP0 Reg 23, Sel 0 432131SN/A const unsigned Debug_DBD = 31; 442239SN/A const unsigned Debug_DM_HI = 30; 452131SN/A const unsigned Debug_DM_LO = 30; 462447SN/A const unsigned Debug_NODCR = 29; 472447SN/A const unsigned Debug_LSNM = 28; 482447SN/A const unsigned Debug_DOZE = 27; 492131SN/A const unsigned Debug_HALT = 26; 502447SN/A const unsigned Debug_COUNTDM = 25; 512680Sktlim@umich.edu const unsigned Debug_IBUSEP = 24; 522447SN/A const unsigned Debug_MCHECKEP = 23; 532447SN/A const unsigned Debug_CACHEEP = 22; 542447SN/A const unsigned Debug_DBUSEP = 21; 552131SN/A const unsigned Debug_IEXI_HI = 20; 562131SN/A const unsigned Debug_IEXI_LO = 20; 572447SN/A const unsigned Debug_DDBS_IMPR = 19; 582131SN/A const unsigned Debug_DDBL_IMPR = 18; 592447SN/A const unsigned Debug_EJTAGVER_2 =17; 602447SN/A const unsigned Debug_EJTAGVER_1 =16; 612447SN/A const unsigned Debug_EJTAGVER_0 =15; 622447SN/A const unsigned Debug_EJTAGVER_HI = 17; 632131SN/A const unsigned Debug_EJTAGVER_LO = 15; 642447SN/A const unsigned Debug_DEXC_CODE_HI = 14; 652447SN/A const unsigned Debug_DEXC_CODE_LO = 10; 662447SN/A const unsigned Debug_NOSST = 9; 672447SN/A const unsigned Debug_SST = 8; 682447SN/A const unsigned Debug_OFFLINE = 7; 692131SN/A const unsigned Debug_DIBIMPR = 6; 702447SN/A const unsigned Debug_DINT = 5; 712131SN/A const unsigned Debug_DIB = 4; 722447SN/A const unsigned Debug_DDBS = 3; 732447SN/A const unsigned Debug_DDBL = 2; 742447SN/A const unsigned Debug_DBp = 1; 752447SN/A const unsigned Debug_DSS = 0; 762131SN/A 772447SN/A 782447SN/A // TraceControl Register - CP0 Reg 23, Sel 1 792447SN/A const unsigned TraceControl_TS = 31; 802447SN/A const unsigned TraceControl_UT = 30; 812447SN/A const unsigned TraceControl_TB = 27; 822131SN/A const unsigned TraceControl_IO = 26; 834661Sksewell@umich.edu const unsigned TraceControl_D = 25; 844661Sksewell@umich.edu const unsigned TraceControl_E = 24; 854661Sksewell@umich.edu const unsigned TraceControl_K = 23; 864661Sksewell@umich.edu const unsigned TraceControl_S = 22; 874661Sksewell@umich.edu const unsigned TraceControl_U = 21; 884661Sksewell@umich.edu const unsigned TraceControl_ASID_M_HI = 20; 894661Sksewell@umich.edu const unsigned TraceControl_ASID_M_LO = 13; 904661Sksewell@umich.edu const unsigned TraceControl_ASID_HI = 12; 914661Sksewell@umich.edu const unsigned TraceControl_ASID_LO = 5; 924661Sksewell@umich.edu const unsigned TraceControl_G = 4; 934661Sksewell@umich.edu const unsigned TraceControl_TFCR = 3; 944661Sksewell@umich.edu const unsigned TraceControl_TLSM = 2; 954661Sksewell@umich.edu const unsigned TraceControl_TIM = 1; 964661Sksewell@umich.edu const unsigned TraceControl_ON = 0; 974661Sksewell@umich.edu 984661Sksewell@umich.edu // TraceControl2 Register - CP0 Reg 23, Sel 2 994661Sksewell@umich.edu const unsigned TraceControl2_CPUIDV = 29; 1004661Sksewell@umich.edu const unsigned TraceControl2_CPUID_HI = 28; 1014661Sksewell@umich.edu const unsigned TraceControl2_CPUID_LO = 21; 1024661Sksewell@umich.edu const unsigned TraceControl2_TCV = 20; 1034661Sksewell@umich.edu const unsigned TraceControl2_TCNUM_HI = 19; 1044661Sksewell@umich.edu const unsigned TraceControl2_TCNUM_LO = 12; 1054661Sksewell@umich.edu const unsigned TraceControl2_MODE_HI = 11; 1064661Sksewell@umich.edu const unsigned TraceControl2_MODE_LO = 7; 1074661Sksewell@umich.edu const unsigned TraceControl2_VALIDMODES_HI = 6; 1084661Sksewell@umich.edu const unsigned TraceControl2_VALIDMODES_LO = 5; 1094661Sksewell@umich.edu const unsigned TraceControl2_TBI = 4; 1104661Sksewell@umich.edu const unsigned TraceControl2_TBU = 3; 1114661Sksewell@umich.edu const unsigned TraceControl2_SYP_HI = 2; 1124661Sksewell@umich.edu const unsigned TraceControl2_SYP_LO = 0; 1134661Sksewell@umich.edu 1144661Sksewell@umich.edu // UserTraceData Register - CP0 Reg 23, Sel 3 1154661Sksewell@umich.edu // Just holds 32-bits (or 64-bits) of data 1164661Sksewell@umich.edu 1174661Sksewell@umich.edu // TraceIBPC Register - CP0 Reg 23, Sel 4 1184661Sksewell@umich.edu const unsigned TraceIBPC_MB = 31; 1192447SN/A const unsigned TraceIBPC_IE = 28; 1202131SN/A const unsigned TraceIBPC_ATE = 27; 1212447SN/A const unsigned TraceIBPC_IBPC8_HI = 26; 1222447SN/A const unsigned TraceIBPC_IBPC8_LO = 24; 1232447SN/A const unsigned TraceIBPC_IBPC7_HI = 23; 1242447SN/A const unsigned TraceIBPC_IBPC7_LO = 21; 1252447SN/A const unsigned TraceIBPC_IBPC6_HI = 20; 1262447SN/A const unsigned TraceIBPC_IBPC6_LO = 18; 1272447SN/A const unsigned TraceIBPC_IBPC5_HI = 17; 1282447SN/A const unsigned TraceIBPC_IBPC5_LO = 15; 1292447SN/A const unsigned TraceIBPC_IBPC4_HI = 14; 1302447SN/A const unsigned TraceIBPC_IBPC4_LO = 12; 1312447SN/A const unsigned TraceIBPC_IBPC3_HI = 11; 1322447SN/A const unsigned TraceIBPC_IBPC3_LO = 9; 1332447SN/A const unsigned TraceIBPC_IBPC2_HI = 8; 1342447SN/A const unsigned TraceIBPC_IBPC2_LO = 6; 1352131SN/A const unsigned TraceIBPC_IBPC1_HI = 5; 1362447SN/A const unsigned TraceIBPC_IBPC1_LO = 3; 1372447SN/A const unsigned TraceIBPC_IBPC0_HI = 2; 1382447SN/A const unsigned TraceIBPC_IBPC0_LO = 0; 1394661Sksewell@umich.edu 1402447SN/A 1412131SN/A // TraceDBPC Register - CP0 Reg 23, Sel 5 1424661Sksewell@umich.edu const unsigned TRACEDBPC_MB = 31; 1434661Sksewell@umich.edu const unsigned TRACEDBPC_DE = 28; 1444661Sksewell@umich.edu const unsigned TRACEDBPC_ATE = 27; 1454661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC8_HI = 26; 1464661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC8_LO = 24; 1474661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC7_HI = 23; 1484661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC7_LO = 21; 1494661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC6_HI = 20; 1504661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC6_LO = 18; 1514661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC5_HI = 17; 1524661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC5_LO = 15; 1534661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC4_HI = 14; 1544661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC4_LO = 12; 1554661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC3_HI = 11; 1564661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC3_LO = 9; 1574661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC2_HI = 8; 1584661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC2_LO = 6; 1594661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC1_HI = 5; 1604661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC1_LO = 3; 1614661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC0_HI = 2; 1624661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC0_LO = 0; 1634661Sksewell@umich.edu 1644661Sksewell@umich.edu // TraceIBPC2 - Not part of CP0, but part of TRACE 1654661Sksewell@umich.edu const unsigned TraceIBPC_IBPC14_HI = 17; 1664661Sksewell@umich.edu const unsigned TraceIBPC_IBPC14_LO = 15; 1674661Sksewell@umich.edu const unsigned TraceIBPC_IBPC13_HI = 14; 1684661Sksewell@umich.edu const unsigned TraceIBPC_IBPC13_LO = 12; 1694661Sksewell@umich.edu const unsigned TraceIBPC_IBPC12_HI = 11; 1704661Sksewell@umich.edu const unsigned TraceIBPC_IBPC12_LO = 9; 1714661Sksewell@umich.edu const unsigned TraceIBPC_IBPC11_HI = 8; 1724661Sksewell@umich.edu const unsigned TraceIBPC_IBPC11_LO = 6; 1734661Sksewell@umich.edu const unsigned TraceIBPC_IBPC10_HI = 5; 1744661Sksewell@umich.edu const unsigned TraceIBPC_IBPC10_LO = 3; 1754661Sksewell@umich.edu const unsigned TraceIBPC_IBPC9_HI = 2; 1764661Sksewell@umich.edu const unsigned TraceIBPC_IBPC9_LO = 0; 1774661Sksewell@umich.edu 1784661Sksewell@umich.edu 1794661Sksewell@umich.edu // TraceDBPC2 - Not part of CP0, but part of TRACE 1804661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC14_HI = 17; 1814661Sksewell@umich.edu const unsigned TRACEDBPC_DBPC14_LO = 15; 1822447SN/A const unsigned TRACEDBPC_DBPC13_HI = 14; 1832131SN/A const unsigned TRACEDBPC_DBPC13_LO = 12; 1842447SN/A const unsigned TRACEDBPC_DBPC12_HI = 11; 1852447SN/A const unsigned TRACEDBPC_DBPC12_LO = 9; 1862447SN/A const unsigned TRACEDBPC_DBPC11_HI = 8; 1872447SN/A const unsigned TRACEDBPC_DBPC11_LO = 6; 1882447SN/A const unsigned TRACEDBPC_DBPC10_HI = 5; 1892447SN/A const unsigned TRACEDBPC_DBPC10_LO = 3; 1902131SN/A const unsigned TRACEDBPC_DBPC9_HI = 2; 1912447SN/A const unsigned TRACEDBPC_DBPC9_LO = 0; 1922447SN/A 1932447SN/A 1942447SN/A // Debug Register 2 - CP0 Reg 23, Sel 6 1952680Sktlim@umich.edu const unsigned DEBUG2_PRM = 3; 1962447SN/A const unsigned DEBUG2_DQ = 2; 1972447SN/A const unsigned DEBUG2_TUP = 1; 1982131SN/A const unsigned DEBUG2_PACO = 0; 1992447SN/A 2002131SN/A // DEPC Register - CP0 Reg 24, Sel 0 2012447SN/A // Debug Exception Program Counter 2022447SN/A const unsigned DEPC_HI = 31; 2032447SN/A const unsigned DEPC_LO = 0; 2042447SN/A 2052447SN/A 2062447SN/A 2072131SN/A // DESAVE - CP0 Reg 31, Sel 0 2082447SN/A // Debug Exception Save Register 2092447SN/A const unsigned DESAVE_HI = 31; 2102447SN/A const unsigned DESAVE_LO = 0; 2112447SN/A 2122131SN/A 2132447SN/A 2142131SN/A} // namespace MipsISA 2152447SN/A 2162447SN/A#endif 2172447SN/A