faults.hh revision 5222
12131SN/A/*
25222Sksewell@umich.edu * Copyright N) 2007 MIPS Technologies, Inc.  All Rights Reserved
32131SN/A *
45222Sksewell@umich.edu * This software is part of the M5 simulator.
52131SN/A *
65222Sksewell@umich.edu * THIS IS A LEGAL AGREEMENT.  BY DOWNLOADING, USING, COPYING, CREATING
75222Sksewell@umich.edu * DERIVATIVE WORKS, AND/OR DISTRIBUTING THIS SOFTWARE YOU ARE AGREEING
85222Sksewell@umich.edu * TO THESE TERMS AND CONDITIONS.
92665Ssaidi@eecs.umich.edu *
105222Sksewell@umich.edu * Permission is granted to use, copy, create derivative works and
115222Sksewell@umich.edu * distribute this software and such derivative works for any purpose,
125222Sksewell@umich.edu * so long as (1) the copyright notice above, this grant of permission,
135222Sksewell@umich.edu * and the disclaimer below appear in all copies and derivative works
145222Sksewell@umich.edu * made, (2) the copyright notice above is augmented as appropriate to
155222Sksewell@umich.edu * reflect the addition of any new copyrightable work in a derivative
165222Sksewell@umich.edu * work (e.g., Copyright N) <Publication Year> Copyright Owner), and (3)
175222Sksewell@umich.edu * the name of MIPS Technologies, Inc. ($(B!H(BMIPS$(B!I(B) is not used in any
185222Sksewell@umich.edu * advertising or publicity pertaining to the use or distribution of
195222Sksewell@umich.edu * this software without specific, written prior authorization.
205222Sksewell@umich.edu *
215222Sksewell@umich.edu * THIS SOFTWARE IS PROVIDED $(B!H(BAS IS.$(B!I(B  MIPS MAKES NO WARRANTIES AND
225222Sksewell@umich.edu * DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, STATUTORY, IMPLIED OR
235222Sksewell@umich.edu * OTHERWISE, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
245222Sksewell@umich.edu * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
255222Sksewell@umich.edu * NON-INFRINGEMENT OF THIRD PARTY RIGHTS, REGARDING THIS SOFTWARE.
265222Sksewell@umich.edu * IN NO EVENT SHALL MIPS BE LIABLE FOR ANY DAMAGES, INCLUDING DIRECT,
275222Sksewell@umich.edu * INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL, OR PUNITIVE DAMAGES OF
285222Sksewell@umich.edu * ANY KIND OR NATURE, ARISING OUT OF OR IN CONNECTION WITH THIS AGREEMENT,
295222Sksewell@umich.edu * THIS SOFTWARE AND/OR THE USE OF THIS SOFTWARE, WHETHER SUCH LIABILITY
305222Sksewell@umich.edu * IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE OR
315222Sksewell@umich.edu * STRICT LIABILITY), OR OTHERWISE, EVEN IF MIPS HAS BEEN WARNED OF THE
325222Sksewell@umich.edu * POSSIBILITY OF ANY SUCH LOSS OR DAMAGE IN ADVANCE.
335222Sksewell@umich.edu *
345222Sksewell@umich.edu * Authors: Gabe M. Black
355222Sksewell@umich.edu *          Korey L. Sewell
365222Sksewell@umich.edu *          Jaidev Patwardhan
372131SN/A */
382131SN/A
392239SN/A#ifndef __MIPS_FAULTS_HH__
402239SN/A#define __MIPS_FAULTS_HH__
412131SN/A
422131SN/A#include "sim/faults.hh"
432447SN/A
442447SN/A// The design of the "name" and "vect" functions is in sim/faults.hh
452447SN/A
462447SN/Anamespace MipsISA
472447SN/A{
482447SN/Atypedef const Addr FaultVect;
492131SN/A
502239SN/Aclass MipsFault : public FaultBase
512131SN/A{
522447SN/A  protected:
532447SN/A    virtual bool skipFaultingInstruction() {return false;}
542447SN/A    virtual bool setRestartAddress() {return true;}
552131SN/A  public:
565222Sksewell@umich.edu    Addr BadVAddr;
575222Sksewell@umich.edu    Addr EntryHi_Asid;
585222Sksewell@umich.edu    Addr EntryHi_VPN2;
595222Sksewell@umich.edu    Addr EntryHi_VPN2X;
605222Sksewell@umich.edu    Addr Context_BadVPN2;
612447SN/A#if FULL_SYSTEM
625222Sksewell@umich.edu  void invoke(ThreadContext * tc) {};
635222Sksewell@umich.edu  void setExceptionState(ThreadContext *,uint8_t);
645222Sksewell@umich.edu  void setHandlerPC(Addr,ThreadContext *);
652447SN/A#endif
662447SN/A    virtual FaultVect vect() = 0;
672447SN/A    virtual FaultStat & countStat() = 0;
682131SN/A};
692131SN/A
702447SN/Aclass MachineCheckFault : public MipsFault
712131SN/A{
722447SN/A  private:
732447SN/A    static FaultName _name;
742447SN/A    static FaultVect _vect;
752447SN/A    static FaultStat _count;
762131SN/A  public:
774695Sgblack@eecs.umich.edu    FaultName name() const {return _name;}
782447SN/A    FaultVect vect() {return _vect;}
792447SN/A    FaultStat & countStat() {return _count;}
805222Sksewell@umich.edu    bool isMachineCheckFault() {return true;}
815222Sksewell@umich.edu};
825222Sksewell@umich.edu
835222Sksewell@umich.educlass NonMaskableInterrupt : public MipsFault
845222Sksewell@umich.edu{
855222Sksewell@umich.edu  private:
865222Sksewell@umich.edu    static FaultName _name;
875222Sksewell@umich.edu    static FaultVect _vect;
885222Sksewell@umich.edu    static FaultStat _count;
895222Sksewell@umich.edu  public:
905222Sksewell@umich.edu    FaultName name() const {return _name;}
915222Sksewell@umich.edu    FaultVect vect() {return _vect;}
925222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
935222Sksewell@umich.edu    bool isNonMaskableInterrupt() {return true;}
942447SN/A};
952131SN/A
962447SN/Aclass AlignmentFault : public MipsFault
972131SN/A{
982447SN/A  private:
992447SN/A    static FaultName _name;
1002447SN/A    static FaultVect _vect;
1012447SN/A    static FaultStat _count;
1022131SN/A  public:
1034695Sgblack@eecs.umich.edu    FaultName name() const {return _name;}
1042447SN/A    FaultVect vect() {return _vect;}
1052447SN/A    FaultStat & countStat() {return _count;}
1065222Sksewell@umich.edu    bool isAlignmentFault() {return true;}
1072447SN/A};
1082131SN/A
1095222Sksewell@umich.educlass AddressErrorFault : public MipsFault
1105222Sksewell@umich.edu{
1115222Sksewell@umich.edu  private:
1125222Sksewell@umich.edu    static FaultName _name;
1135222Sksewell@umich.edu    static FaultVect _vect;
1145222Sksewell@umich.edu    static FaultStat _count;
1155222Sksewell@umich.edu  public:
1165222Sksewell@umich.edu    FaultName name() const {return _name;}
1175222Sksewell@umich.edu    FaultVect vect() {return _vect;}
1185222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
1195222Sksewell@umich.edu#if FULL_SYSTEM
1205222Sksewell@umich.edu    void invoke(ThreadContext * tc);
1215222Sksewell@umich.edu#endif
1225222Sksewell@umich.edu
1235222Sksewell@umich.edu};
1245222Sksewell@umich.educlass StoreAddressErrorFault : public MipsFault
1255222Sksewell@umich.edu{
1265222Sksewell@umich.edu  private:
1275222Sksewell@umich.edu    static FaultName _name;
1285222Sksewell@umich.edu    static FaultVect _vect;
1295222Sksewell@umich.edu    static FaultStat _count;
1305222Sksewell@umich.edu  public:
1315222Sksewell@umich.edu    FaultName name() const {return _name;}
1325222Sksewell@umich.edu    FaultVect vect() {return _vect;}
1335222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
1345222Sksewell@umich.edu#if FULL_SYSTEM
1355222Sksewell@umich.edu    void invoke(ThreadContext * tc);
1365222Sksewell@umich.edu#endif
1375222Sksewell@umich.edu
1385222Sksewell@umich.edu};
1394661Sksewell@umich.educlass UnimplementedOpcodeFault : public MipsFault
1404661Sksewell@umich.edu{
1414661Sksewell@umich.edu  private:
1424661Sksewell@umich.edu    static FaultName _name;
1434661Sksewell@umich.edu    static FaultVect _vect;
1444661Sksewell@umich.edu    static FaultStat _count;
1454661Sksewell@umich.edu  public:
1464695Sgblack@eecs.umich.edu    FaultName name() const {return _name;}
1474661Sksewell@umich.edu    FaultVect vect() {return _vect;}
1484661Sksewell@umich.edu    FaultStat & countStat() {return _count;}
1494661Sksewell@umich.edu};
1504661Sksewell@umich.edu
1512447SN/A
1525222Sksewell@umich.educlass TLBRefillIFetchFault : public MipsFault
1532447SN/A{
1542447SN/A  private:
1555222Sksewell@umich.edu    Addr vaddr;
1562447SN/A    static FaultName _name;
1572447SN/A    static FaultVect _vect;
1582447SN/A    static FaultStat _count;
1592131SN/A  public:
1604695Sgblack@eecs.umich.edu    FaultName name() const {return _name;}
1612447SN/A    FaultVect vect() {return _vect;}
1622447SN/A    FaultStat & countStat() {return _count;}
1634661Sksewell@umich.edu    void invoke(ThreadContext * tc);
1642447SN/A};
1655222Sksewell@umich.educlass TLBInvalidIFetchFault : public MipsFault
1664661Sksewell@umich.edu{
1674661Sksewell@umich.edu  private:
1685222Sksewell@umich.edu    Addr vaddr;
1694661Sksewell@umich.edu    static FaultName _name;
1704661Sksewell@umich.edu    static FaultVect _vect;
1714661Sksewell@umich.edu    static FaultStat _count;
1724661Sksewell@umich.edu  public:
1734695Sgblack@eecs.umich.edu    FaultName name() const {return _name;}
1744661Sksewell@umich.edu    FaultVect vect() {return _vect;}
1754661Sksewell@umich.edu    FaultStat & countStat() {return _count;}
1764661Sksewell@umich.edu    void invoke(ThreadContext * tc);
1774661Sksewell@umich.edu};
1784661Sksewell@umich.edu
1792447SN/Aclass NDtbMissFault : public MipsFault
1802131SN/A{
1812447SN/A  private:
1822447SN/A    static FaultName _name;
1832447SN/A    static FaultVect _vect;
1842447SN/A    static FaultStat _count;
1852131SN/A  public:
1864695Sgblack@eecs.umich.edu    FaultName name() const {return _name;}
1872447SN/A    FaultVect vect() {return _vect;}
1882447SN/A    FaultStat & countStat() {return _count;}
1892447SN/A};
1902131SN/A
1912447SN/Aclass PDtbMissFault : public MipsFault
1922131SN/A{
1932447SN/A  private:
1942447SN/A    static FaultName _name;
1952447SN/A    static FaultVect _vect;
1962447SN/A    static FaultStat _count;
1972131SN/A  public:
1984695Sgblack@eecs.umich.edu    FaultName name() const {return _name;}
1992447SN/A    FaultVect vect() {return _vect;}
2002447SN/A    FaultStat & countStat() {return _count;}
2012447SN/A};
2022131SN/A
2032447SN/Aclass DtbPageFault : public MipsFault
2042131SN/A{
2052447SN/A  private:
2062447SN/A    static FaultName _name;
2072447SN/A    static FaultVect _vect;
2082447SN/A    static FaultStat _count;
2092131SN/A  public:
2104695Sgblack@eecs.umich.edu    FaultName name() const {return _name;}
2112447SN/A    FaultVect vect() {return _vect;}
2122447SN/A    FaultStat & countStat() {return _count;}
2132447SN/A};
2142131SN/A
2152447SN/Aclass DtbAcvFault : public MipsFault
2162131SN/A{
2172447SN/A  private:
2182447SN/A    static FaultName _name;
2192447SN/A    static FaultVect _vect;
2202447SN/A    static FaultStat _count;
2212131SN/A  public:
2224695Sgblack@eecs.umich.edu    FaultName name() const {return _name;}
2232447SN/A    FaultVect vect() {return _vect;}
2242447SN/A    FaultStat & countStat() {return _count;}
2252447SN/A};
2262131SN/A
2275222Sksewell@umich.educlass CacheErrorFault : public MipsFault
2285222Sksewell@umich.edu{
2295222Sksewell@umich.edu  private:
2305222Sksewell@umich.edu    Addr vaddr;
2315222Sksewell@umich.edu    static FaultName _name;
2325222Sksewell@umich.edu    static FaultVect _vect;
2335222Sksewell@umich.edu    static FaultStat _count;
2345222Sksewell@umich.edu  public:
2355222Sksewell@umich.edu    FaultName name() const {return _name;}
2365222Sksewell@umich.edu    FaultVect vect() {return _vect;}
2375222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
2385222Sksewell@umich.edu    void invoke(ThreadContext * tc);
2395222Sksewell@umich.edu};
2405222Sksewell@umich.edu
2415222Sksewell@umich.edu
2425222Sksewell@umich.edu
2435222Sksewell@umich.edu
2445222Sksewell@umich.edustatic inline Fault genMachineCheckFault()
2455222Sksewell@umich.edu{
2465222Sksewell@umich.edu    return new MachineCheckFault;
2475222Sksewell@umich.edu}
2485222Sksewell@umich.edu
2495222Sksewell@umich.edustatic inline Fault genAlignmentFault()
2505222Sksewell@umich.edu{
2515222Sksewell@umich.edu    return new AlignmentFault;
2525222Sksewell@umich.edu}
2535222Sksewell@umich.edu
2545222Sksewell@umich.educlass ResetFault : public MipsFault
2555222Sksewell@umich.edu{
2565222Sksewell@umich.edu  private:
2575222Sksewell@umich.edu    static FaultName _name;
2585222Sksewell@umich.edu    static FaultVect _vect;
2595222Sksewell@umich.edu    static FaultStat _count;
2605222Sksewell@umich.edu  public:
2615222Sksewell@umich.edu    FaultName name() const {return _name;}
2625222Sksewell@umich.edu    FaultVect vect() {return _vect;}
2635222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
2645222Sksewell@umich.edu    void invoke(ThreadContext * tc);
2655222Sksewell@umich.edu
2665222Sksewell@umich.edu};
2675222Sksewell@umich.educlass SystemCallFault : public MipsFault
2685222Sksewell@umich.edu{
2695222Sksewell@umich.edu  private:
2705222Sksewell@umich.edu    static FaultName _name;
2715222Sksewell@umich.edu    static FaultVect _vect;
2725222Sksewell@umich.edu    static FaultStat _count;
2735222Sksewell@umich.edu  public:
2745222Sksewell@umich.edu    FaultName name() const {return _name;}
2755222Sksewell@umich.edu    FaultVect vect() {return _vect;}
2765222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
2775222Sksewell@umich.edu    void invoke(ThreadContext * tc);
2785222Sksewell@umich.edu};
2795222Sksewell@umich.edu
2805222Sksewell@umich.educlass SoftResetFault : public MipsFault
2815222Sksewell@umich.edu{
2825222Sksewell@umich.edu  private:
2835222Sksewell@umich.edu    static FaultName _name;
2845222Sksewell@umich.edu    static FaultVect _vect;
2855222Sksewell@umich.edu    static FaultStat _count;
2865222Sksewell@umich.edu  public:
2875222Sksewell@umich.edu    FaultName name() const {return _name;}
2885222Sksewell@umich.edu    FaultVect vect() {return _vect;}
2895222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
2905222Sksewell@umich.edu    void invoke(ThreadContext * tc);
2915222Sksewell@umich.edu};
2925222Sksewell@umich.educlass DebugSingleStep : public MipsFault
2935222Sksewell@umich.edu{
2945222Sksewell@umich.edu  private:
2955222Sksewell@umich.edu    static FaultName _name;
2965222Sksewell@umich.edu    static FaultVect _vect;
2975222Sksewell@umich.edu    static FaultStat _count;
2985222Sksewell@umich.edu  public:
2995222Sksewell@umich.edu    FaultName name() const {return _name;}
3005222Sksewell@umich.edu    FaultVect vect() {return _vect;}
3015222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
3025222Sksewell@umich.edu    void invoke(ThreadContext * tc);
3035222Sksewell@umich.edu};
3045222Sksewell@umich.educlass DebugInterrupt : public MipsFault
3055222Sksewell@umich.edu{
3065222Sksewell@umich.edu  private:
3075222Sksewell@umich.edu    static FaultName _name;
3085222Sksewell@umich.edu    static FaultVect _vect;
3095222Sksewell@umich.edu    static FaultStat _count;
3105222Sksewell@umich.edu  public:
3115222Sksewell@umich.edu    FaultName name() const {return _name;}
3125222Sksewell@umich.edu    FaultVect vect() {return _vect;}
3135222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
3145222Sksewell@umich.edu    void invoke(ThreadContext * tc);
3155222Sksewell@umich.edu};
3165222Sksewell@umich.edu
3175222Sksewell@umich.educlass CoprocessorUnusableFault : public MipsFault
3185222Sksewell@umich.edu{
3195222Sksewell@umich.edu  private:
3205222Sksewell@umich.edu    static FaultName _name;
3215222Sksewell@umich.edu    static FaultVect _vect;
3225222Sksewell@umich.edu    static FaultStat _count;
3235222Sksewell@umich.edu    int coProcID;
3245222Sksewell@umich.edu  public:
3255222Sksewell@umich.edu    FaultName name() const {return _name;}
3265222Sksewell@umich.edu    FaultVect vect() {return _vect;}
3275222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
3285222Sksewell@umich.edu    void invoke(ThreadContext * tc);
3295222Sksewell@umich.edu    CoprocessorUnusableFault(int _procid){ coProcID = _procid;}
3305222Sksewell@umich.edu};
3315222Sksewell@umich.edu
3325222Sksewell@umich.educlass ReservedInstructionFault : public MipsFault
3335222Sksewell@umich.edu{
3345222Sksewell@umich.edu  private:
3355222Sksewell@umich.edu    static FaultName _name;
3365222Sksewell@umich.edu    static FaultVect _vect;
3375222Sksewell@umich.edu    static FaultStat _count;
3385222Sksewell@umich.edu  public:
3395222Sksewell@umich.edu    FaultName name() const {return _name;}
3405222Sksewell@umich.edu    FaultVect vect() {return _vect;}
3415222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
3425222Sksewell@umich.edu    void invoke(ThreadContext * tc);
3435222Sksewell@umich.edu};
3445222Sksewell@umich.edu
3455222Sksewell@umich.educlass ThreadFault : public MipsFault
3465222Sksewell@umich.edu{
3475222Sksewell@umich.edu  private:
3485222Sksewell@umich.edu    static FaultName _name;
3495222Sksewell@umich.edu    static FaultVect _vect;
3505222Sksewell@umich.edu    static FaultStat _count;
3515222Sksewell@umich.edu  public:
3525222Sksewell@umich.edu    FaultName name() const {return _name;}
3535222Sksewell@umich.edu    FaultVect vect() {return _vect;}
3545222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
3555222Sksewell@umich.edu    void invoke(ThreadContext * tc);
3565222Sksewell@umich.edu};
3575222Sksewell@umich.edu
3585222Sksewell@umich.edu
3595222Sksewell@umich.educlass ArithmeticFault : public MipsFault
3605222Sksewell@umich.edu{
3615222Sksewell@umich.edu  protected:
3625222Sksewell@umich.edu    bool skipFaultingInstruction() {return true;}
3635222Sksewell@umich.edu  private:
3645222Sksewell@umich.edu    static FaultName _name;
3655222Sksewell@umich.edu    static FaultVect _vect;
3665222Sksewell@umich.edu    static FaultStat _count;
3675222Sksewell@umich.edu  public:
3685222Sksewell@umich.edu    FaultName name() const {return _name;}
3695222Sksewell@umich.edu    FaultVect vect() {return _vect;}
3705222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
3715222Sksewell@umich.edu#if FULL_SYSTEM
3725222Sksewell@umich.edu    void invoke(ThreadContext * tc);
3735222Sksewell@umich.edu#endif
3745222Sksewell@umich.edu};
3755222Sksewell@umich.edu
3765222Sksewell@umich.educlass InterruptFault : public MipsFault
3775222Sksewell@umich.edu{
3785222Sksewell@umich.edu  protected:
3795222Sksewell@umich.edu    bool setRestartAddress() {return false;}
3805222Sksewell@umich.edu  private:
3815222Sksewell@umich.edu    static FaultName _name;
3825222Sksewell@umich.edu    static FaultVect _vect;
3835222Sksewell@umich.edu    static FaultStat _count;
3845222Sksewell@umich.edu  public:
3855222Sksewell@umich.edu    FaultName name() const {return _name;}
3865222Sksewell@umich.edu    FaultVect vect() {return _vect;}
3875222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
3885222Sksewell@umich.edu
3895222Sksewell@umich.edu#if FULL_SYSTEM
3905222Sksewell@umich.edu    void invoke(ThreadContext * tc);
3915222Sksewell@umich.edu#endif
3925222Sksewell@umich.edu
3935222Sksewell@umich.edu    //void invoke(ThreadContext * tc);
3945222Sksewell@umich.edu};
3955222Sksewell@umich.edu
3965222Sksewell@umich.educlass TrapFault : public MipsFault
3975222Sksewell@umich.edu{
3985222Sksewell@umich.edu  private:
3995222Sksewell@umich.edu    static FaultName _name;
4005222Sksewell@umich.edu    static FaultVect _vect;
4015222Sksewell@umich.edu    static FaultStat _count;
4025222Sksewell@umich.edu  public:
4035222Sksewell@umich.edu    FaultName name() const {return _name;}
4045222Sksewell@umich.edu    FaultVect vect() {return _vect;}
4055222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
4065222Sksewell@umich.edu#if FULL_SYSTEM
4075222Sksewell@umich.edu    void invoke(ThreadContext * tc);
4085222Sksewell@umich.edu#endif
4095222Sksewell@umich.edu};
4105222Sksewell@umich.edu
4115222Sksewell@umich.educlass BreakpointFault : public MipsFault
4125222Sksewell@umich.edu{
4135222Sksewell@umich.edu  private:
4145222Sksewell@umich.edu    static FaultName _name;
4155222Sksewell@umich.edu    static FaultVect _vect;
4165222Sksewell@umich.edu    static FaultStat _count;
4175222Sksewell@umich.edu  public:
4185222Sksewell@umich.edu    FaultName name() const {return _name;}
4195222Sksewell@umich.edu    FaultVect vect() {return _vect;}
4205222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
4215222Sksewell@umich.edu#if FULL_SYSTEM
4225222Sksewell@umich.edu    void invoke(ThreadContext * tc);
4235222Sksewell@umich.edu#endif
4245222Sksewell@umich.edu};
4255222Sksewell@umich.edu
4265222Sksewell@umich.educlass ItbRefillFault : public MipsFault
4275222Sksewell@umich.edu{
4285222Sksewell@umich.edu  private:
4295222Sksewell@umich.edu    static FaultName _name;
4305222Sksewell@umich.edu    static FaultVect _vect;
4315222Sksewell@umich.edu    static FaultStat _count;
4325222Sksewell@umich.edu  public:
4335222Sksewell@umich.edu    FaultName name() const {return _name;}
4345222Sksewell@umich.edu    FaultVect vect() {return _vect;}
4355222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
4365222Sksewell@umich.edu#if FULL_SYSTEM
4375222Sksewell@umich.edu    void invoke(ThreadContext * tc);
4385222Sksewell@umich.edu#endif
4395222Sksewell@umich.edu};
4405222Sksewell@umich.educlass DtbRefillFault : public MipsFault
4415222Sksewell@umich.edu{
4425222Sksewell@umich.edu  private:
4435222Sksewell@umich.edu    static FaultName _name;
4445222Sksewell@umich.edu    static FaultVect _vect;
4455222Sksewell@umich.edu    static FaultStat _count;
4465222Sksewell@umich.edu  public:
4475222Sksewell@umich.edu    FaultName name() const {return _name;}
4485222Sksewell@umich.edu    FaultVect vect() {return _vect;}
4495222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
4505222Sksewell@umich.edu#if FULL_SYSTEM
4515222Sksewell@umich.edu    void invoke(ThreadContext * tc);
4525222Sksewell@umich.edu#endif
4535222Sksewell@umich.edu};
4545222Sksewell@umich.edu
4555222Sksewell@umich.educlass ItbPageFault : public MipsFault
4565222Sksewell@umich.edu{
4575222Sksewell@umich.edu  private:
4585222Sksewell@umich.edu    static FaultName _name;
4595222Sksewell@umich.edu    static FaultVect _vect;
4605222Sksewell@umich.edu    static FaultStat _count;
4615222Sksewell@umich.edu  public:
4625222Sksewell@umich.edu    FaultName name() const {return _name;}
4635222Sksewell@umich.edu    FaultVect vect() {return _vect;}
4645222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
4655222Sksewell@umich.edu#if FULL_SYSTEM
4665222Sksewell@umich.edu    void invoke(ThreadContext * tc);
4675222Sksewell@umich.edu#endif
4685222Sksewell@umich.edu};
4695222Sksewell@umich.edu
4705222Sksewell@umich.educlass ItbInvalidFault : public MipsFault
4715222Sksewell@umich.edu{
4725222Sksewell@umich.edu  private:
4735222Sksewell@umich.edu    static FaultName _name;
4745222Sksewell@umich.edu    static FaultVect _vect;
4755222Sksewell@umich.edu    static FaultStat _count;
4765222Sksewell@umich.edu  public:
4775222Sksewell@umich.edu    FaultName name() const {return _name;}
4785222Sksewell@umich.edu    FaultVect vect() {return _vect;}
4795222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
4805222Sksewell@umich.edu#if FULL_SYSTEM
4815222Sksewell@umich.edu    void invoke(ThreadContext * tc);
4825222Sksewell@umich.edu#endif
4835222Sksewell@umich.edu
4845222Sksewell@umich.edu};
4855222Sksewell@umich.educlass TLBModifiedFault : public MipsFault
4865222Sksewell@umich.edu{
4875222Sksewell@umich.edu  private:
4885222Sksewell@umich.edu    static FaultName _name;
4895222Sksewell@umich.edu    static FaultVect _vect;
4905222Sksewell@umich.edu    static FaultStat _count;
4915222Sksewell@umich.edu  public:
4925222Sksewell@umich.edu    FaultName name() const {return _name;}
4935222Sksewell@umich.edu    FaultVect vect() {return _vect;}
4945222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
4955222Sksewell@umich.edu#if FULL_SYSTEM
4965222Sksewell@umich.edu    void invoke(ThreadContext * tc);
4975222Sksewell@umich.edu#endif
4985222Sksewell@umich.edu
4995222Sksewell@umich.edu};
5005222Sksewell@umich.edu
5015222Sksewell@umich.educlass DtbInvalidFault : public MipsFault
5025222Sksewell@umich.edu{
5035222Sksewell@umich.edu  private:
5045222Sksewell@umich.edu    static FaultName _name;
5055222Sksewell@umich.edu    static FaultVect _vect;
5065222Sksewell@umich.edu    static FaultStat _count;
5075222Sksewell@umich.edu  public:
5085222Sksewell@umich.edu    FaultName name() const {return _name;}
5095222Sksewell@umich.edu    FaultVect vect() {return _vect;}
5105222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
5115222Sksewell@umich.edu#if FULL_SYSTEM
5125222Sksewell@umich.edu    void invoke(ThreadContext * tc);
5135222Sksewell@umich.edu#endif
5145222Sksewell@umich.edu
5155222Sksewell@umich.edu};
5165222Sksewell@umich.edu
5175222Sksewell@umich.educlass FloatEnableFault : public MipsFault
5185222Sksewell@umich.edu{
5195222Sksewell@umich.edu  private:
5205222Sksewell@umich.edu    static FaultName _name;
5215222Sksewell@umich.edu    static FaultVect _vect;
5225222Sksewell@umich.edu    static FaultStat _count;
5235222Sksewell@umich.edu  public:
5245222Sksewell@umich.edu    FaultName name() const {return _name;}
5255222Sksewell@umich.edu    FaultVect vect() {return _vect;}
5265222Sksewell@umich.edu    FaultStat & countStat() {return _count;}
5275222Sksewell@umich.edu};
5285222Sksewell@umich.edu
5292447SN/Aclass ItbMissFault : public MipsFault
5302131SN/A{
5312447SN/A  private:
5322447SN/A    static FaultName _name;
5332447SN/A    static FaultVect _vect;
5342447SN/A    static FaultStat _count;
5352131SN/A  public:
5364695Sgblack@eecs.umich.edu    FaultName name() const {return _name;}
5372447SN/A    FaultVect vect() {return _vect;}
5382447SN/A    FaultStat & countStat() {return _count;}
5392447SN/A};
5402131SN/A
5412447SN/Aclass ItbAcvFault : public MipsFault
5422131SN/A{
5432447SN/A  private:
5442447SN/A    static FaultName _name;
5452447SN/A    static FaultVect _vect;
5462447SN/A    static FaultStat _count;
5472131SN/A  public:
5484695Sgblack@eecs.umich.edu    FaultName name() const {return _name;}
5492447SN/A    FaultVect vect() {return _vect;}
5502447SN/A    FaultStat & countStat() {return _count;}
5512447SN/A};
5522131SN/A
5532447SN/Aclass IntegerOverflowFault : public MipsFault
5542447SN/A{
5552447SN/A  private:
5562447SN/A    static FaultName _name;
5572447SN/A    static FaultVect _vect;
5582447SN/A    static FaultStat _count;
5592447SN/A  public:
5604695Sgblack@eecs.umich.edu    FaultName name() const {return _name;}
5612447SN/A    FaultVect vect() {return _vect;}
5622447SN/A    FaultStat & countStat() {return _count;}
5632447SN/A};
5642447SN/A
5654661Sksewell@umich.educlass DspStateDisabledFault : public MipsFault
5664661Sksewell@umich.edu{
5674661Sksewell@umich.edu  private:
5684661Sksewell@umich.edu    static FaultName _name;
5694661Sksewell@umich.edu    static FaultVect _vect;
5704661Sksewell@umich.edu    static FaultStat _count;
5714661Sksewell@umich.edu  public:
5724695Sgblack@eecs.umich.edu    FaultName name() const {return _name;}
5734661Sksewell@umich.edu    FaultVect vect() {return _vect;}
5744661Sksewell@umich.edu    FaultStat & countStat() {return _count;}
5754661Sksewell@umich.edu    void invoke(ThreadContext * tc);
5764661Sksewell@umich.edu};
5774661Sksewell@umich.edu
5782447SN/A} // MipsISA namespace
5792131SN/A
5805222Sksewell@umich.edu#endif // __MIPS_FAULTS_HH__
581