faults.hh revision 6379
12131SN/A/* 25268Sksewell@umich.edu * Copyright (c) 2003-2005 The Regents of The University of Michigan 35224Sksewell@umich.edu * Copyright (c) 2007 MIPS Technologies, Inc. 45224Sksewell@umich.edu * All rights reserved. 52131SN/A * 65224Sksewell@umich.edu * Redistribution and use in source and binary forms, with or without 75224Sksewell@umich.edu * modification, are permitted provided that the following conditions are 85224Sksewell@umich.edu * met: redistributions of source code must retain the above copyright 95224Sksewell@umich.edu * notice, this list of conditions and the following disclaimer; 105224Sksewell@umich.edu * redistributions in binary form must reproduce the above copyright 115224Sksewell@umich.edu * notice, this list of conditions and the following disclaimer in the 125224Sksewell@umich.edu * documentation and/or other materials provided with the distribution; 135224Sksewell@umich.edu * neither the name of the copyright holders nor the names of its 145224Sksewell@umich.edu * contributors may be used to endorse or promote products derived from 155224Sksewell@umich.edu * this software without specific prior written permission. 162131SN/A * 175224Sksewell@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 185224Sksewell@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 195224Sksewell@umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 205224Sksewell@umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 215224Sksewell@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 225224Sksewell@umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 235224Sksewell@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 245224Sksewell@umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 255224Sksewell@umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 265224Sksewell@umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 275224Sksewell@umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282665Ssaidi@eecs.umich.edu * 295224Sksewell@umich.edu * Authors: Gabe Black 305224Sksewell@umich.edu * Korey Sewell 315222Sksewell@umich.edu * Jaidev Patwardhan 322131SN/A */ 332131SN/A 342239SN/A#ifndef __MIPS_FAULTS_HH__ 352239SN/A#define __MIPS_FAULTS_HH__ 362131SN/A 372131SN/A#include "sim/faults.hh" 382447SN/A 392447SN/Anamespace MipsISA 402447SN/A{ 416378Sgblack@eecs.umich.edu 422447SN/Atypedef const Addr FaultVect; 432131SN/A 442239SN/Aclass MipsFault : public FaultBase 452131SN/A{ 462447SN/A protected: 472447SN/A virtual bool skipFaultingInstruction() {return false;} 482447SN/A virtual bool setRestartAddress() {return true;} 492131SN/A public: 506379Sgblack@eecs.umich.edu Addr badVAddr; 516379Sgblack@eecs.umich.edu Addr entryHiAsid; 526379Sgblack@eecs.umich.edu Addr entryHiVPN2; 536379Sgblack@eecs.umich.edu Addr entryHiVPN2X; 546379Sgblack@eecs.umich.edu Addr contextBadVPN2; 552447SN/A#if FULL_SYSTEM 566378Sgblack@eecs.umich.edu void invoke(ThreadContext * tc) {}; 576378Sgblack@eecs.umich.edu void setExceptionState(ThreadContext *, uint8_t); 586378Sgblack@eecs.umich.edu void setHandlerPC(Addr, ThreadContext *); 592447SN/A#endif 602447SN/A virtual FaultVect vect() = 0; 612447SN/A virtual FaultStat & countStat() = 0; 622131SN/A}; 632131SN/A 642447SN/Aclass MachineCheckFault : public MipsFault 652131SN/A{ 662447SN/A private: 672447SN/A static FaultName _name; 682447SN/A static FaultVect _vect; 692447SN/A static FaultStat _count; 702131SN/A public: 714695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 722447SN/A FaultVect vect() {return _vect;} 732447SN/A FaultStat & countStat() {return _count;} 745222Sksewell@umich.edu bool isMachineCheckFault() {return true;} 755222Sksewell@umich.edu}; 765222Sksewell@umich.edu 775222Sksewell@umich.educlass NonMaskableInterrupt : public MipsFault 785222Sksewell@umich.edu{ 795222Sksewell@umich.edu private: 805222Sksewell@umich.edu static FaultName _name; 815222Sksewell@umich.edu static FaultVect _vect; 825222Sksewell@umich.edu static FaultStat _count; 835222Sksewell@umich.edu public: 845222Sksewell@umich.edu FaultName name() const {return _name;} 855222Sksewell@umich.edu FaultVect vect() {return _vect;} 865222Sksewell@umich.edu FaultStat & countStat() {return _count;} 875222Sksewell@umich.edu bool isNonMaskableInterrupt() {return true;} 882447SN/A}; 892131SN/A 902447SN/Aclass AlignmentFault : public MipsFault 912131SN/A{ 922447SN/A private: 932447SN/A static FaultName _name; 942447SN/A static FaultVect _vect; 952447SN/A static FaultStat _count; 962131SN/A public: 974695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 982447SN/A FaultVect vect() {return _vect;} 992447SN/A FaultStat & countStat() {return _count;} 1005222Sksewell@umich.edu bool isAlignmentFault() {return true;} 1012447SN/A}; 1022131SN/A 1035222Sksewell@umich.educlass AddressErrorFault : public MipsFault 1045222Sksewell@umich.edu{ 1055222Sksewell@umich.edu private: 1065222Sksewell@umich.edu static FaultName _name; 1075222Sksewell@umich.edu static FaultVect _vect; 1085222Sksewell@umich.edu static FaultStat _count; 1095222Sksewell@umich.edu public: 1105222Sksewell@umich.edu FaultName name() const {return _name;} 1115222Sksewell@umich.edu FaultVect vect() {return _vect;} 1125222Sksewell@umich.edu FaultStat & countStat() {return _count;} 1135222Sksewell@umich.edu#if FULL_SYSTEM 1145222Sksewell@umich.edu void invoke(ThreadContext * tc); 1155222Sksewell@umich.edu#endif 1165222Sksewell@umich.edu 1175222Sksewell@umich.edu}; 1186378Sgblack@eecs.umich.edu 1195222Sksewell@umich.educlass StoreAddressErrorFault : public MipsFault 1205222Sksewell@umich.edu{ 1215222Sksewell@umich.edu private: 1225222Sksewell@umich.edu static FaultName _name; 1235222Sksewell@umich.edu static FaultVect _vect; 1245222Sksewell@umich.edu static FaultStat _count; 1255222Sksewell@umich.edu public: 1265222Sksewell@umich.edu FaultName name() const {return _name;} 1275222Sksewell@umich.edu FaultVect vect() {return _vect;} 1285222Sksewell@umich.edu FaultStat & countStat() {return _count;} 1295222Sksewell@umich.edu#if FULL_SYSTEM 1305222Sksewell@umich.edu void invoke(ThreadContext * tc); 1315222Sksewell@umich.edu#endif 1326378Sgblack@eecs.umich.edu}; 1335222Sksewell@umich.edu 1344661Sksewell@umich.educlass UnimplementedOpcodeFault : public MipsFault 1354661Sksewell@umich.edu{ 1364661Sksewell@umich.edu private: 1374661Sksewell@umich.edu static FaultName _name; 1384661Sksewell@umich.edu static FaultVect _vect; 1394661Sksewell@umich.edu static FaultStat _count; 1404661Sksewell@umich.edu public: 1414695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 1424661Sksewell@umich.edu FaultVect vect() {return _vect;} 1434661Sksewell@umich.edu FaultStat & countStat() {return _count;} 1444661Sksewell@umich.edu}; 1454661Sksewell@umich.edu 1462447SN/A 1475222Sksewell@umich.educlass TLBRefillIFetchFault : public MipsFault 1482447SN/A{ 1492447SN/A private: 1505222Sksewell@umich.edu Addr vaddr; 1512447SN/A static FaultName _name; 1522447SN/A static FaultVect _vect; 1532447SN/A static FaultStat _count; 1542131SN/A public: 1554695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 1562447SN/A FaultVect vect() {return _vect;} 1572447SN/A FaultStat & countStat() {return _count;} 1584661Sksewell@umich.edu void invoke(ThreadContext * tc); 1592447SN/A}; 1606378Sgblack@eecs.umich.edu 1615222Sksewell@umich.educlass TLBInvalidIFetchFault : public MipsFault 1624661Sksewell@umich.edu{ 1634661Sksewell@umich.edu private: 1645222Sksewell@umich.edu Addr vaddr; 1654661Sksewell@umich.edu static FaultName _name; 1664661Sksewell@umich.edu static FaultVect _vect; 1674661Sksewell@umich.edu static FaultStat _count; 1684661Sksewell@umich.edu public: 1694695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 1704661Sksewell@umich.edu FaultVect vect() {return _vect;} 1714661Sksewell@umich.edu FaultStat & countStat() {return _count;} 1724661Sksewell@umich.edu void invoke(ThreadContext * tc); 1734661Sksewell@umich.edu}; 1744661Sksewell@umich.edu 1752447SN/Aclass NDtbMissFault : public MipsFault 1762131SN/A{ 1772447SN/A private: 1782447SN/A static FaultName _name; 1792447SN/A static FaultVect _vect; 1802447SN/A static FaultStat _count; 1812131SN/A public: 1824695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 1832447SN/A FaultVect vect() {return _vect;} 1842447SN/A FaultStat & countStat() {return _count;} 1852447SN/A}; 1862131SN/A 1872447SN/Aclass PDtbMissFault : public MipsFault 1882131SN/A{ 1892447SN/A private: 1902447SN/A static FaultName _name; 1912447SN/A static FaultVect _vect; 1922447SN/A static FaultStat _count; 1932131SN/A public: 1944695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 1952447SN/A FaultVect vect() {return _vect;} 1962447SN/A FaultStat & countStat() {return _count;} 1972447SN/A}; 1982131SN/A 1992447SN/Aclass DtbPageFault : public MipsFault 2002131SN/A{ 2012447SN/A private: 2022447SN/A static FaultName _name; 2032447SN/A static FaultVect _vect; 2042447SN/A static FaultStat _count; 2052131SN/A public: 2064695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 2072447SN/A FaultVect vect() {return _vect;} 2082447SN/A FaultStat & countStat() {return _count;} 2092447SN/A}; 2102131SN/A 2112447SN/Aclass DtbAcvFault : public MipsFault 2122131SN/A{ 2132447SN/A private: 2142447SN/A static FaultName _name; 2152447SN/A static FaultVect _vect; 2162447SN/A static FaultStat _count; 2172131SN/A public: 2184695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 2192447SN/A FaultVect vect() {return _vect;} 2202447SN/A FaultStat & countStat() {return _count;} 2212447SN/A}; 2222131SN/A 2235222Sksewell@umich.educlass CacheErrorFault : public MipsFault 2245222Sksewell@umich.edu{ 2255222Sksewell@umich.edu private: 2265222Sksewell@umich.edu Addr vaddr; 2275222Sksewell@umich.edu static FaultName _name; 2285222Sksewell@umich.edu static FaultVect _vect; 2295222Sksewell@umich.edu static FaultStat _count; 2305222Sksewell@umich.edu public: 2315222Sksewell@umich.edu FaultName name() const {return _name;} 2325222Sksewell@umich.edu FaultVect vect() {return _vect;} 2335222Sksewell@umich.edu FaultStat & countStat() {return _count;} 2345222Sksewell@umich.edu void invoke(ThreadContext * tc); 2355222Sksewell@umich.edu}; 2365222Sksewell@umich.edu 2375222Sksewell@umich.edu 2385222Sksewell@umich.edu 2395222Sksewell@umich.edu 2405222Sksewell@umich.edustatic inline Fault genMachineCheckFault() 2415222Sksewell@umich.edu{ 2425222Sksewell@umich.edu return new MachineCheckFault; 2435222Sksewell@umich.edu} 2445222Sksewell@umich.edu 2455222Sksewell@umich.edustatic inline Fault genAlignmentFault() 2465222Sksewell@umich.edu{ 2475222Sksewell@umich.edu return new AlignmentFault; 2485222Sksewell@umich.edu} 2495222Sksewell@umich.edu 2505222Sksewell@umich.educlass ResetFault : public MipsFault 2515222Sksewell@umich.edu{ 2525222Sksewell@umich.edu private: 2535222Sksewell@umich.edu static FaultName _name; 2545222Sksewell@umich.edu static FaultVect _vect; 2555222Sksewell@umich.edu static FaultStat _count; 2565222Sksewell@umich.edu public: 2575222Sksewell@umich.edu FaultName name() const {return _name;} 2585222Sksewell@umich.edu FaultVect vect() {return _vect;} 2595222Sksewell@umich.edu FaultStat & countStat() {return _count;} 2605222Sksewell@umich.edu void invoke(ThreadContext * tc); 2615222Sksewell@umich.edu 2625222Sksewell@umich.edu}; 2636378Sgblack@eecs.umich.edu 2645222Sksewell@umich.educlass SystemCallFault : public MipsFault 2655222Sksewell@umich.edu{ 2665222Sksewell@umich.edu private: 2675222Sksewell@umich.edu static FaultName _name; 2685222Sksewell@umich.edu static FaultVect _vect; 2695222Sksewell@umich.edu static FaultStat _count; 2705222Sksewell@umich.edu public: 2715222Sksewell@umich.edu FaultName name() const {return _name;} 2725222Sksewell@umich.edu FaultVect vect() {return _vect;} 2735222Sksewell@umich.edu FaultStat & countStat() {return _count;} 2745222Sksewell@umich.edu void invoke(ThreadContext * tc); 2755222Sksewell@umich.edu}; 2765222Sksewell@umich.edu 2775222Sksewell@umich.educlass SoftResetFault : public MipsFault 2785222Sksewell@umich.edu{ 2795222Sksewell@umich.edu private: 2805222Sksewell@umich.edu static FaultName _name; 2815222Sksewell@umich.edu static FaultVect _vect; 2825222Sksewell@umich.edu static FaultStat _count; 2835222Sksewell@umich.edu public: 2845222Sksewell@umich.edu FaultName name() const {return _name;} 2855222Sksewell@umich.edu FaultVect vect() {return _vect;} 2865222Sksewell@umich.edu FaultStat & countStat() {return _count;} 2875222Sksewell@umich.edu void invoke(ThreadContext * tc); 2885222Sksewell@umich.edu}; 2896378Sgblack@eecs.umich.edu 2905222Sksewell@umich.educlass DebugSingleStep : public MipsFault 2915222Sksewell@umich.edu{ 2925222Sksewell@umich.edu private: 2935222Sksewell@umich.edu static FaultName _name; 2945222Sksewell@umich.edu static FaultVect _vect; 2955222Sksewell@umich.edu static FaultStat _count; 2965222Sksewell@umich.edu public: 2975222Sksewell@umich.edu FaultName name() const {return _name;} 2985222Sksewell@umich.edu FaultVect vect() {return _vect;} 2995222Sksewell@umich.edu FaultStat & countStat() {return _count;} 3005222Sksewell@umich.edu void invoke(ThreadContext * tc); 3015222Sksewell@umich.edu}; 3026378Sgblack@eecs.umich.edu 3035222Sksewell@umich.educlass DebugInterrupt : public MipsFault 3045222Sksewell@umich.edu{ 3055222Sksewell@umich.edu private: 3065222Sksewell@umich.edu static FaultName _name; 3075222Sksewell@umich.edu static FaultVect _vect; 3085222Sksewell@umich.edu static FaultStat _count; 3095222Sksewell@umich.edu public: 3105222Sksewell@umich.edu FaultName name() const {return _name;} 3115222Sksewell@umich.edu FaultVect vect() {return _vect;} 3125222Sksewell@umich.edu FaultStat & countStat() {return _count;} 3135222Sksewell@umich.edu void invoke(ThreadContext * tc); 3145222Sksewell@umich.edu}; 3155222Sksewell@umich.edu 3165222Sksewell@umich.educlass CoprocessorUnusableFault : public MipsFault 3175222Sksewell@umich.edu{ 3185222Sksewell@umich.edu private: 3195222Sksewell@umich.edu static FaultName _name; 3205222Sksewell@umich.edu static FaultVect _vect; 3215222Sksewell@umich.edu static FaultStat _count; 3225222Sksewell@umich.edu int coProcID; 3235222Sksewell@umich.edu public: 3245222Sksewell@umich.edu FaultName name() const {return _name;} 3255222Sksewell@umich.edu FaultVect vect() {return _vect;} 3265222Sksewell@umich.edu FaultStat & countStat() {return _count;} 3275222Sksewell@umich.edu void invoke(ThreadContext * tc); 3285222Sksewell@umich.edu CoprocessorUnusableFault(int _procid){ coProcID = _procid;} 3295222Sksewell@umich.edu}; 3305222Sksewell@umich.edu 3315222Sksewell@umich.educlass ReservedInstructionFault : public MipsFault 3325222Sksewell@umich.edu{ 3335222Sksewell@umich.edu private: 3345222Sksewell@umich.edu static FaultName _name; 3355222Sksewell@umich.edu static FaultVect _vect; 3365222Sksewell@umich.edu static FaultStat _count; 3375222Sksewell@umich.edu public: 3385222Sksewell@umich.edu FaultName name() const {return _name;} 3395222Sksewell@umich.edu FaultVect vect() {return _vect;} 3405222Sksewell@umich.edu FaultStat & countStat() {return _count;} 3415222Sksewell@umich.edu void invoke(ThreadContext * tc); 3425222Sksewell@umich.edu}; 3435222Sksewell@umich.edu 3445222Sksewell@umich.educlass ThreadFault : public MipsFault 3455222Sksewell@umich.edu{ 3465222Sksewell@umich.edu private: 3475222Sksewell@umich.edu static FaultName _name; 3485222Sksewell@umich.edu static FaultVect _vect; 3495222Sksewell@umich.edu static FaultStat _count; 3505222Sksewell@umich.edu public: 3515222Sksewell@umich.edu FaultName name() const {return _name;} 3525222Sksewell@umich.edu FaultVect vect() {return _vect;} 3535222Sksewell@umich.edu FaultStat & countStat() {return _count;} 3545222Sksewell@umich.edu void invoke(ThreadContext * tc); 3555222Sksewell@umich.edu}; 3565222Sksewell@umich.edu 3575222Sksewell@umich.educlass ArithmeticFault : public MipsFault 3585222Sksewell@umich.edu{ 3595222Sksewell@umich.edu protected: 3605222Sksewell@umich.edu bool skipFaultingInstruction() {return true;} 3615222Sksewell@umich.edu private: 3625222Sksewell@umich.edu static FaultName _name; 3635222Sksewell@umich.edu static FaultVect _vect; 3645222Sksewell@umich.edu static FaultStat _count; 3655222Sksewell@umich.edu public: 3665222Sksewell@umich.edu FaultName name() const {return _name;} 3675222Sksewell@umich.edu FaultVect vect() {return _vect;} 3685222Sksewell@umich.edu FaultStat & countStat() {return _count;} 3695222Sksewell@umich.edu#if FULL_SYSTEM 3705222Sksewell@umich.edu void invoke(ThreadContext * tc); 3715222Sksewell@umich.edu#endif 3725222Sksewell@umich.edu}; 3735222Sksewell@umich.edu 3745222Sksewell@umich.educlass InterruptFault : public MipsFault 3755222Sksewell@umich.edu{ 3765222Sksewell@umich.edu protected: 3775222Sksewell@umich.edu bool setRestartAddress() {return false;} 3785222Sksewell@umich.edu private: 3795222Sksewell@umich.edu static FaultName _name; 3805222Sksewell@umich.edu static FaultVect _vect; 3815222Sksewell@umich.edu static FaultStat _count; 3825222Sksewell@umich.edu public: 3835222Sksewell@umich.edu FaultName name() const {return _name;} 3845222Sksewell@umich.edu FaultVect vect() {return _vect;} 3855222Sksewell@umich.edu FaultStat & countStat() {return _count;} 3865222Sksewell@umich.edu 3875222Sksewell@umich.edu#if FULL_SYSTEM 3885222Sksewell@umich.edu void invoke(ThreadContext * tc); 3895222Sksewell@umich.edu#endif 3905222Sksewell@umich.edu}; 3915222Sksewell@umich.edu 3925222Sksewell@umich.educlass TrapFault : public MipsFault 3935222Sksewell@umich.edu{ 3945222Sksewell@umich.edu private: 3955222Sksewell@umich.edu static FaultName _name; 3965222Sksewell@umich.edu static FaultVect _vect; 3975222Sksewell@umich.edu static FaultStat _count; 3985222Sksewell@umich.edu public: 3995222Sksewell@umich.edu FaultName name() const {return _name;} 4005222Sksewell@umich.edu FaultVect vect() {return _vect;} 4015222Sksewell@umich.edu FaultStat & countStat() {return _count;} 4025222Sksewell@umich.edu#if FULL_SYSTEM 4035222Sksewell@umich.edu void invoke(ThreadContext * tc); 4045222Sksewell@umich.edu#endif 4055222Sksewell@umich.edu}; 4065222Sksewell@umich.edu 4075222Sksewell@umich.educlass BreakpointFault : public MipsFault 4085222Sksewell@umich.edu{ 4095222Sksewell@umich.edu private: 4105222Sksewell@umich.edu static FaultName _name; 4115222Sksewell@umich.edu static FaultVect _vect; 4125222Sksewell@umich.edu static FaultStat _count; 4135222Sksewell@umich.edu public: 4145222Sksewell@umich.edu FaultName name() const {return _name;} 4155222Sksewell@umich.edu FaultVect vect() {return _vect;} 4165222Sksewell@umich.edu FaultStat & countStat() {return _count;} 4175222Sksewell@umich.edu#if FULL_SYSTEM 4185222Sksewell@umich.edu void invoke(ThreadContext * tc); 4195222Sksewell@umich.edu#endif 4205222Sksewell@umich.edu}; 4215222Sksewell@umich.edu 4225222Sksewell@umich.educlass ItbRefillFault : public MipsFault 4235222Sksewell@umich.edu{ 4245222Sksewell@umich.edu private: 4255222Sksewell@umich.edu static FaultName _name; 4265222Sksewell@umich.edu static FaultVect _vect; 4275222Sksewell@umich.edu static FaultStat _count; 4285222Sksewell@umich.edu public: 4295222Sksewell@umich.edu FaultName name() const {return _name;} 4305222Sksewell@umich.edu FaultVect vect() {return _vect;} 4315222Sksewell@umich.edu FaultStat & countStat() {return _count;} 4325222Sksewell@umich.edu#if FULL_SYSTEM 4335222Sksewell@umich.edu void invoke(ThreadContext * tc); 4345222Sksewell@umich.edu#endif 4355222Sksewell@umich.edu}; 4366378Sgblack@eecs.umich.edu 4375222Sksewell@umich.educlass DtbRefillFault : public MipsFault 4385222Sksewell@umich.edu{ 4395222Sksewell@umich.edu private: 4405222Sksewell@umich.edu static FaultName _name; 4415222Sksewell@umich.edu static FaultVect _vect; 4425222Sksewell@umich.edu static FaultStat _count; 4435222Sksewell@umich.edu public: 4445222Sksewell@umich.edu FaultName name() const {return _name;} 4455222Sksewell@umich.edu FaultVect vect() {return _vect;} 4465222Sksewell@umich.edu FaultStat & countStat() {return _count;} 4475222Sksewell@umich.edu#if FULL_SYSTEM 4485222Sksewell@umich.edu void invoke(ThreadContext * tc); 4495222Sksewell@umich.edu#endif 4505222Sksewell@umich.edu}; 4515222Sksewell@umich.edu 4525222Sksewell@umich.educlass ItbPageFault : public MipsFault 4535222Sksewell@umich.edu{ 4545222Sksewell@umich.edu private: 4555222Sksewell@umich.edu static FaultName _name; 4565222Sksewell@umich.edu static FaultVect _vect; 4575222Sksewell@umich.edu static FaultStat _count; 4585222Sksewell@umich.edu public: 4595222Sksewell@umich.edu FaultName name() const {return _name;} 4605222Sksewell@umich.edu FaultVect vect() {return _vect;} 4615222Sksewell@umich.edu FaultStat & countStat() {return _count;} 4625222Sksewell@umich.edu#if FULL_SYSTEM 4635222Sksewell@umich.edu void invoke(ThreadContext * tc); 4645222Sksewell@umich.edu#endif 4655222Sksewell@umich.edu}; 4665222Sksewell@umich.edu 4675222Sksewell@umich.educlass ItbInvalidFault : public MipsFault 4685222Sksewell@umich.edu{ 4695222Sksewell@umich.edu private: 4705222Sksewell@umich.edu static FaultName _name; 4715222Sksewell@umich.edu static FaultVect _vect; 4725222Sksewell@umich.edu static FaultStat _count; 4735222Sksewell@umich.edu public: 4745222Sksewell@umich.edu FaultName name() const {return _name;} 4755222Sksewell@umich.edu FaultVect vect() {return _vect;} 4765222Sksewell@umich.edu FaultStat & countStat() {return _count;} 4775222Sksewell@umich.edu#if FULL_SYSTEM 4785222Sksewell@umich.edu void invoke(ThreadContext * tc); 4795222Sksewell@umich.edu#endif 4806378Sgblack@eecs.umich.edu}; 4815222Sksewell@umich.edu 4825222Sksewell@umich.educlass TLBModifiedFault : public MipsFault 4835222Sksewell@umich.edu{ 4845222Sksewell@umich.edu private: 4855222Sksewell@umich.edu static FaultName _name; 4865222Sksewell@umich.edu static FaultVect _vect; 4875222Sksewell@umich.edu static FaultStat _count; 4885222Sksewell@umich.edu public: 4895222Sksewell@umich.edu FaultName name() const {return _name;} 4905222Sksewell@umich.edu FaultVect vect() {return _vect;} 4915222Sksewell@umich.edu FaultStat & countStat() {return _count;} 4925222Sksewell@umich.edu#if FULL_SYSTEM 4935222Sksewell@umich.edu void invoke(ThreadContext * tc); 4945222Sksewell@umich.edu#endif 4955222Sksewell@umich.edu}; 4965222Sksewell@umich.edu 4975222Sksewell@umich.educlass DtbInvalidFault : public MipsFault 4985222Sksewell@umich.edu{ 4995222Sksewell@umich.edu private: 5005222Sksewell@umich.edu static FaultName _name; 5015222Sksewell@umich.edu static FaultVect _vect; 5025222Sksewell@umich.edu static FaultStat _count; 5035222Sksewell@umich.edu public: 5045222Sksewell@umich.edu FaultName name() const {return _name;} 5055222Sksewell@umich.edu FaultVect vect() {return _vect;} 5065222Sksewell@umich.edu FaultStat & countStat() {return _count;} 5075222Sksewell@umich.edu#if FULL_SYSTEM 5085222Sksewell@umich.edu void invoke(ThreadContext * tc); 5095222Sksewell@umich.edu#endif 5105222Sksewell@umich.edu}; 5115222Sksewell@umich.edu 5125222Sksewell@umich.educlass FloatEnableFault : public MipsFault 5135222Sksewell@umich.edu{ 5145222Sksewell@umich.edu private: 5155222Sksewell@umich.edu static FaultName _name; 5165222Sksewell@umich.edu static FaultVect _vect; 5175222Sksewell@umich.edu static FaultStat _count; 5185222Sksewell@umich.edu public: 5195222Sksewell@umich.edu FaultName name() const {return _name;} 5205222Sksewell@umich.edu FaultVect vect() {return _vect;} 5215222Sksewell@umich.edu FaultStat & countStat() {return _count;} 5225222Sksewell@umich.edu}; 5235222Sksewell@umich.edu 5242447SN/Aclass ItbMissFault : public MipsFault 5252131SN/A{ 5262447SN/A private: 5272447SN/A static FaultName _name; 5282447SN/A static FaultVect _vect; 5292447SN/A static FaultStat _count; 5302131SN/A public: 5314695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 5322447SN/A FaultVect vect() {return _vect;} 5332447SN/A FaultStat & countStat() {return _count;} 5342447SN/A}; 5352131SN/A 5362447SN/Aclass ItbAcvFault : public MipsFault 5372131SN/A{ 5382447SN/A private: 5392447SN/A static FaultName _name; 5402447SN/A static FaultVect _vect; 5412447SN/A static FaultStat _count; 5422131SN/A public: 5434695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 5442447SN/A FaultVect vect() {return _vect;} 5452447SN/A FaultStat & countStat() {return _count;} 5462447SN/A}; 5472131SN/A 5482447SN/Aclass IntegerOverflowFault : public MipsFault 5492447SN/A{ 5502447SN/A private: 5512447SN/A static FaultName _name; 5522447SN/A static FaultVect _vect; 5532447SN/A static FaultStat _count; 5542447SN/A public: 5554695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 5562447SN/A FaultVect vect() {return _vect;} 5572447SN/A FaultStat & countStat() {return _count;} 5582447SN/A}; 5592447SN/A 5604661Sksewell@umich.educlass DspStateDisabledFault : public MipsFault 5614661Sksewell@umich.edu{ 5624661Sksewell@umich.edu private: 5634661Sksewell@umich.edu static FaultName _name; 5644661Sksewell@umich.edu static FaultVect _vect; 5654661Sksewell@umich.edu static FaultStat _count; 5664661Sksewell@umich.edu public: 5674695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 5684661Sksewell@umich.edu FaultVect vect() {return _vect;} 5694661Sksewell@umich.edu FaultStat & countStat() {return _count;} 5704661Sksewell@umich.edu void invoke(ThreadContext * tc); 5714661Sksewell@umich.edu}; 5724661Sksewell@umich.edu 5732447SN/A} // MipsISA namespace 5742131SN/A 5755222Sksewell@umich.edu#endif // __MIPS_FAULTS_HH__ 576