faults.hh revision 7811
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 567678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 577678Sgblack@eecs.umich.edu StaticInst::StaticInstPtr inst = StaticInst::nullStaticInstPtr) 587678Sgblack@eecs.umich.edu {} 596378Sgblack@eecs.umich.edu void setExceptionState(ThreadContext *, uint8_t); 606378Sgblack@eecs.umich.edu void setHandlerPC(Addr, ThreadContext *); 612447SN/A#endif 622447SN/A virtual FaultVect vect() = 0; 632447SN/A virtual FaultStat & countStat() = 0; 642131SN/A}; 652131SN/A 662447SN/Aclass MachineCheckFault : public MipsFault 672131SN/A{ 682447SN/A private: 692447SN/A static FaultName _name; 702447SN/A static FaultVect _vect; 712447SN/A static FaultStat _count; 722131SN/A public: 734695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 742447SN/A FaultVect vect() {return _vect;} 752447SN/A FaultStat & countStat() {return _count;} 765222Sksewell@umich.edu bool isMachineCheckFault() {return true;} 775222Sksewell@umich.edu}; 785222Sksewell@umich.edu 795222Sksewell@umich.educlass NonMaskableInterrupt : public MipsFault 805222Sksewell@umich.edu{ 815222Sksewell@umich.edu private: 825222Sksewell@umich.edu static FaultName _name; 835222Sksewell@umich.edu static FaultVect _vect; 845222Sksewell@umich.edu static FaultStat _count; 855222Sksewell@umich.edu public: 865222Sksewell@umich.edu FaultName name() const {return _name;} 875222Sksewell@umich.edu FaultVect vect() {return _vect;} 885222Sksewell@umich.edu FaultStat & countStat() {return _count;} 895222Sksewell@umich.edu bool isNonMaskableInterrupt() {return true;} 902447SN/A}; 912131SN/A 922447SN/Aclass AlignmentFault : public MipsFault 932131SN/A{ 942447SN/A private: 952447SN/A static FaultName _name; 962447SN/A static FaultVect _vect; 972447SN/A static FaultStat _count; 982131SN/A public: 994695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 1002447SN/A FaultVect vect() {return _vect;} 1012447SN/A FaultStat & countStat() {return _count;} 1025222Sksewell@umich.edu bool isAlignmentFault() {return true;} 1032447SN/A}; 1042131SN/A 1055222Sksewell@umich.educlass AddressErrorFault : public MipsFault 1065222Sksewell@umich.edu{ 1075222Sksewell@umich.edu private: 1085222Sksewell@umich.edu static FaultName _name; 1095222Sksewell@umich.edu static FaultVect _vect; 1105222Sksewell@umich.edu static FaultStat _count; 1115222Sksewell@umich.edu public: 1125222Sksewell@umich.edu FaultName name() const {return _name;} 1135222Sksewell@umich.edu FaultVect vect() {return _vect;} 1145222Sksewell@umich.edu FaultStat & countStat() {return _count;} 1155222Sksewell@umich.edu#if FULL_SYSTEM 1167678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 1177678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 1185222Sksewell@umich.edu#endif 1195222Sksewell@umich.edu 1205222Sksewell@umich.edu}; 1216378Sgblack@eecs.umich.edu 1225222Sksewell@umich.educlass StoreAddressErrorFault : public MipsFault 1235222Sksewell@umich.edu{ 1245222Sksewell@umich.edu private: 1255222Sksewell@umich.edu static FaultName _name; 1265222Sksewell@umich.edu static FaultVect _vect; 1275222Sksewell@umich.edu static FaultStat _count; 1285222Sksewell@umich.edu public: 1295222Sksewell@umich.edu FaultName name() const {return _name;} 1305222Sksewell@umich.edu FaultVect vect() {return _vect;} 1315222Sksewell@umich.edu FaultStat & countStat() {return _count;} 1325222Sksewell@umich.edu#if FULL_SYSTEM 1337678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 1347678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 1355222Sksewell@umich.edu#endif 1366378Sgblack@eecs.umich.edu}; 1375222Sksewell@umich.edu 1384661Sksewell@umich.educlass UnimplementedOpcodeFault : public MipsFault 1394661Sksewell@umich.edu{ 1404661Sksewell@umich.edu private: 1414661Sksewell@umich.edu static FaultName _name; 1424661Sksewell@umich.edu static FaultVect _vect; 1434661Sksewell@umich.edu static FaultStat _count; 1444661Sksewell@umich.edu public: 1454695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 1464661Sksewell@umich.edu FaultVect vect() {return _vect;} 1474661Sksewell@umich.edu FaultStat & countStat() {return _count;} 1484661Sksewell@umich.edu}; 1494661Sksewell@umich.edu 1502447SN/A 1515222Sksewell@umich.educlass TLBRefillIFetchFault : public MipsFault 1522447SN/A{ 1532447SN/A private: 1545222Sksewell@umich.edu Addr vaddr; 1552447SN/A static FaultName _name; 1562447SN/A static FaultVect _vect; 1572447SN/A static FaultStat _count; 1582131SN/A public: 1594695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 1602447SN/A FaultVect vect() {return _vect;} 1612447SN/A FaultStat & countStat() {return _count;} 1627678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 1637678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 1642447SN/A}; 1656378Sgblack@eecs.umich.edu 1665222Sksewell@umich.educlass TLBInvalidIFetchFault : public MipsFault 1674661Sksewell@umich.edu{ 1684661Sksewell@umich.edu private: 1695222Sksewell@umich.edu Addr vaddr; 1704661Sksewell@umich.edu static FaultName _name; 1714661Sksewell@umich.edu static FaultVect _vect; 1724661Sksewell@umich.edu static FaultStat _count; 1734661Sksewell@umich.edu public: 1744695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 1754661Sksewell@umich.edu FaultVect vect() {return _vect;} 1764661Sksewell@umich.edu FaultStat & countStat() {return _count;} 1777678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 1787678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 1794661Sksewell@umich.edu}; 1804661Sksewell@umich.edu 1812447SN/Aclass NDtbMissFault : public MipsFault 1822131SN/A{ 1832447SN/A private: 1842447SN/A static FaultName _name; 1852447SN/A static FaultVect _vect; 1862447SN/A static FaultStat _count; 1872131SN/A public: 1884695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 1892447SN/A FaultVect vect() {return _vect;} 1902447SN/A FaultStat & countStat() {return _count;} 1912447SN/A}; 1922131SN/A 1932447SN/Aclass PDtbMissFault : public MipsFault 1942131SN/A{ 1952447SN/A private: 1962447SN/A static FaultName _name; 1972447SN/A static FaultVect _vect; 1982447SN/A static FaultStat _count; 1992131SN/A public: 2004695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 2012447SN/A FaultVect vect() {return _vect;} 2022447SN/A FaultStat & countStat() {return _count;} 2032447SN/A}; 2042131SN/A 2052447SN/Aclass DtbPageFault : public MipsFault 2062131SN/A{ 2072447SN/A private: 2082447SN/A static FaultName _name; 2092447SN/A static FaultVect _vect; 2102447SN/A static FaultStat _count; 2112131SN/A public: 2124695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 2132447SN/A FaultVect vect() {return _vect;} 2142447SN/A FaultStat & countStat() {return _count;} 2152447SN/A}; 2162131SN/A 2172447SN/Aclass DtbAcvFault : public MipsFault 2182131SN/A{ 2192447SN/A private: 2202447SN/A static FaultName _name; 2212447SN/A static FaultVect _vect; 2222447SN/A static FaultStat _count; 2232131SN/A public: 2244695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 2252447SN/A FaultVect vect() {return _vect;} 2262447SN/A FaultStat & countStat() {return _count;} 2272447SN/A}; 2282131SN/A 2295222Sksewell@umich.educlass CacheErrorFault : public MipsFault 2305222Sksewell@umich.edu{ 2315222Sksewell@umich.edu private: 2325222Sksewell@umich.edu Addr vaddr; 2335222Sksewell@umich.edu static FaultName _name; 2345222Sksewell@umich.edu static FaultVect _vect; 2355222Sksewell@umich.edu static FaultStat _count; 2365222Sksewell@umich.edu public: 2375222Sksewell@umich.edu FaultName name() const {return _name;} 2385222Sksewell@umich.edu FaultVect vect() {return _vect;} 2395222Sksewell@umich.edu FaultStat & countStat() {return _count;} 2407678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 2417678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 2425222Sksewell@umich.edu}; 2435222Sksewell@umich.edu 2445222Sksewell@umich.edu 2455222Sksewell@umich.edu 2465222Sksewell@umich.edu 2475222Sksewell@umich.edustatic inline Fault genMachineCheckFault() 2485222Sksewell@umich.edu{ 2495222Sksewell@umich.edu return new MachineCheckFault; 2505222Sksewell@umich.edu} 2515222Sksewell@umich.edu 2525222Sksewell@umich.edustatic inline Fault genAlignmentFault() 2535222Sksewell@umich.edu{ 2545222Sksewell@umich.edu return new AlignmentFault; 2555222Sksewell@umich.edu} 2565222Sksewell@umich.edu 2575222Sksewell@umich.educlass ResetFault : public MipsFault 2585222Sksewell@umich.edu{ 2595222Sksewell@umich.edu private: 2605222Sksewell@umich.edu static FaultName _name; 2615222Sksewell@umich.edu static FaultVect _vect; 2625222Sksewell@umich.edu static FaultStat _count; 2635222Sksewell@umich.edu public: 2645222Sksewell@umich.edu FaultName name() const {return _name;} 2655222Sksewell@umich.edu FaultVect vect() {return _vect;} 2665222Sksewell@umich.edu FaultStat & countStat() {return _count;} 2677678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 2687678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 2695222Sksewell@umich.edu 2705222Sksewell@umich.edu}; 2716378Sgblack@eecs.umich.edu 2725222Sksewell@umich.educlass SystemCallFault : public MipsFault 2735222Sksewell@umich.edu{ 2745222Sksewell@umich.edu private: 2755222Sksewell@umich.edu static FaultName _name; 2765222Sksewell@umich.edu static FaultVect _vect; 2775222Sksewell@umich.edu static FaultStat _count; 2785222Sksewell@umich.edu public: 2795222Sksewell@umich.edu FaultName name() const {return _name;} 2805222Sksewell@umich.edu FaultVect vect() {return _vect;} 2815222Sksewell@umich.edu FaultStat & countStat() {return _count;} 2827678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 2837678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 2845222Sksewell@umich.edu}; 2855222Sksewell@umich.edu 2865222Sksewell@umich.educlass SoftResetFault : public MipsFault 2875222Sksewell@umich.edu{ 2885222Sksewell@umich.edu private: 2895222Sksewell@umich.edu static FaultName _name; 2905222Sksewell@umich.edu static FaultVect _vect; 2915222Sksewell@umich.edu static FaultStat _count; 2925222Sksewell@umich.edu public: 2935222Sksewell@umich.edu FaultName name() const {return _name;} 2945222Sksewell@umich.edu FaultVect vect() {return _vect;} 2955222Sksewell@umich.edu FaultStat & countStat() {return _count;} 2967678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 2977678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 2985222Sksewell@umich.edu}; 2996378Sgblack@eecs.umich.edu 3005222Sksewell@umich.educlass DebugSingleStep : public MipsFault 3015222Sksewell@umich.edu{ 3025222Sksewell@umich.edu private: 3035222Sksewell@umich.edu static FaultName _name; 3045222Sksewell@umich.edu static FaultVect _vect; 3055222Sksewell@umich.edu static FaultStat _count; 3065222Sksewell@umich.edu public: 3075222Sksewell@umich.edu FaultName name() const {return _name;} 3085222Sksewell@umich.edu FaultVect vect() {return _vect;} 3095222Sksewell@umich.edu FaultStat & countStat() {return _count;} 3107678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 3117678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 3125222Sksewell@umich.edu}; 3136378Sgblack@eecs.umich.edu 3145222Sksewell@umich.educlass DebugInterrupt : public MipsFault 3155222Sksewell@umich.edu{ 3165222Sksewell@umich.edu private: 3175222Sksewell@umich.edu static FaultName _name; 3185222Sksewell@umich.edu static FaultVect _vect; 3195222Sksewell@umich.edu static FaultStat _count; 3205222Sksewell@umich.edu public: 3215222Sksewell@umich.edu FaultName name() const {return _name;} 3225222Sksewell@umich.edu FaultVect vect() {return _vect;} 3235222Sksewell@umich.edu FaultStat & countStat() {return _count;} 3247678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 3257678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 3265222Sksewell@umich.edu}; 3275222Sksewell@umich.edu 3285222Sksewell@umich.educlass CoprocessorUnusableFault : public MipsFault 3295222Sksewell@umich.edu{ 3305222Sksewell@umich.edu private: 3315222Sksewell@umich.edu static FaultName _name; 3325222Sksewell@umich.edu static FaultVect _vect; 3335222Sksewell@umich.edu static FaultStat _count; 3345222Sksewell@umich.edu int coProcID; 3355222Sksewell@umich.edu public: 3365222Sksewell@umich.edu FaultName name() const {return _name;} 3375222Sksewell@umich.edu FaultVect vect() {return _vect;} 3385222Sksewell@umich.edu FaultStat & countStat() {return _count;} 3397678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 3407678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 3415222Sksewell@umich.edu CoprocessorUnusableFault(int _procid){ coProcID = _procid;} 3425222Sksewell@umich.edu}; 3435222Sksewell@umich.edu 3445222Sksewell@umich.educlass ReservedInstructionFault : 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;} 3547678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 3557678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 3565222Sksewell@umich.edu}; 3575222Sksewell@umich.edu 3585222Sksewell@umich.educlass ThreadFault : public MipsFault 3595222Sksewell@umich.edu{ 3605222Sksewell@umich.edu private: 3615222Sksewell@umich.edu static FaultName _name; 3625222Sksewell@umich.edu static FaultVect _vect; 3635222Sksewell@umich.edu static FaultStat _count; 3645222Sksewell@umich.edu public: 3655222Sksewell@umich.edu FaultName name() const {return _name;} 3665222Sksewell@umich.edu FaultVect vect() {return _vect;} 3675222Sksewell@umich.edu FaultStat & countStat() {return _count;} 3687678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 3697678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 3705222Sksewell@umich.edu}; 3715222Sksewell@umich.edu 3725222Sksewell@umich.educlass ArithmeticFault : public MipsFault 3735222Sksewell@umich.edu{ 3745222Sksewell@umich.edu protected: 3755222Sksewell@umich.edu bool skipFaultingInstruction() {return true;} 3765222Sksewell@umich.edu private: 3775222Sksewell@umich.edu static FaultName _name; 3785222Sksewell@umich.edu static FaultVect _vect; 3795222Sksewell@umich.edu static FaultStat _count; 3805222Sksewell@umich.edu public: 3815222Sksewell@umich.edu FaultName name() const {return _name;} 3825222Sksewell@umich.edu FaultVect vect() {return _vect;} 3835222Sksewell@umich.edu FaultStat & countStat() {return _count;} 3845222Sksewell@umich.edu#if FULL_SYSTEM 3857678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 3867678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 3875222Sksewell@umich.edu#endif 3885222Sksewell@umich.edu}; 3895222Sksewell@umich.edu 3905222Sksewell@umich.educlass InterruptFault : public MipsFault 3915222Sksewell@umich.edu{ 3925222Sksewell@umich.edu protected: 3935222Sksewell@umich.edu bool setRestartAddress() {return false;} 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 4035222Sksewell@umich.edu#if FULL_SYSTEM 4047678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 4057678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 4065222Sksewell@umich.edu#endif 4075222Sksewell@umich.edu}; 4085222Sksewell@umich.edu 4095222Sksewell@umich.educlass TrapFault : public MipsFault 4105222Sksewell@umich.edu{ 4115222Sksewell@umich.edu private: 4125222Sksewell@umich.edu static FaultName _name; 4135222Sksewell@umich.edu static FaultVect _vect; 4145222Sksewell@umich.edu static FaultStat _count; 4155222Sksewell@umich.edu public: 4165222Sksewell@umich.edu FaultName name() const {return _name;} 4175222Sksewell@umich.edu FaultVect vect() {return _vect;} 4185222Sksewell@umich.edu FaultStat & countStat() {return _count;} 4195222Sksewell@umich.edu#if FULL_SYSTEM 4207678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 4217678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 4225222Sksewell@umich.edu#endif 4235222Sksewell@umich.edu}; 4245222Sksewell@umich.edu 4255222Sksewell@umich.educlass BreakpointFault : public MipsFault 4265222Sksewell@umich.edu{ 4275222Sksewell@umich.edu private: 4285222Sksewell@umich.edu static FaultName _name; 4295222Sksewell@umich.edu static FaultVect _vect; 4305222Sksewell@umich.edu static FaultStat _count; 4315222Sksewell@umich.edu public: 4325222Sksewell@umich.edu FaultName name() const {return _name;} 4335222Sksewell@umich.edu FaultVect vect() {return _vect;} 4345222Sksewell@umich.edu FaultStat & countStat() {return _count;} 4355222Sksewell@umich.edu#if FULL_SYSTEM 4367678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 4377678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 4385222Sksewell@umich.edu#endif 4395222Sksewell@umich.edu}; 4405222Sksewell@umich.edu 4415222Sksewell@umich.educlass ItbRefillFault : public MipsFault 4425222Sksewell@umich.edu{ 4435222Sksewell@umich.edu private: 4445222Sksewell@umich.edu static FaultName _name; 4455222Sksewell@umich.edu static FaultVect _vect; 4465222Sksewell@umich.edu static FaultStat _count; 4475222Sksewell@umich.edu public: 4485222Sksewell@umich.edu FaultName name() const {return _name;} 4495222Sksewell@umich.edu FaultVect vect() {return _vect;} 4505222Sksewell@umich.edu FaultStat & countStat() {return _count;} 4515222Sksewell@umich.edu#if FULL_SYSTEM 4527678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 4537678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 4545222Sksewell@umich.edu#endif 4555222Sksewell@umich.edu}; 4566378Sgblack@eecs.umich.edu 4575222Sksewell@umich.educlass DtbRefillFault : public MipsFault 4585222Sksewell@umich.edu{ 4595222Sksewell@umich.edu private: 4605222Sksewell@umich.edu static FaultName _name; 4615222Sksewell@umich.edu static FaultVect _vect; 4625222Sksewell@umich.edu static FaultStat _count; 4635222Sksewell@umich.edu public: 4645222Sksewell@umich.edu FaultName name() const {return _name;} 4655222Sksewell@umich.edu FaultVect vect() {return _vect;} 4665222Sksewell@umich.edu FaultStat & countStat() {return _count;} 4675222Sksewell@umich.edu#if FULL_SYSTEM 4687678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 4697678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 4705222Sksewell@umich.edu#endif 4715222Sksewell@umich.edu}; 4725222Sksewell@umich.edu 4735222Sksewell@umich.educlass ItbPageFault : public MipsFault 4745222Sksewell@umich.edu{ 4755222Sksewell@umich.edu private: 4765222Sksewell@umich.edu static FaultName _name; 4775222Sksewell@umich.edu static FaultVect _vect; 4785222Sksewell@umich.edu static FaultStat _count; 4795222Sksewell@umich.edu public: 4805222Sksewell@umich.edu FaultName name() const {return _name;} 4815222Sksewell@umich.edu FaultVect vect() {return _vect;} 4825222Sksewell@umich.edu FaultStat & countStat() {return _count;} 4835222Sksewell@umich.edu#if FULL_SYSTEM 4847678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 4857678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 4865222Sksewell@umich.edu#endif 4875222Sksewell@umich.edu}; 4885222Sksewell@umich.edu 4895222Sksewell@umich.educlass ItbInvalidFault : public MipsFault 4905222Sksewell@umich.edu{ 4915222Sksewell@umich.edu private: 4925222Sksewell@umich.edu static FaultName _name; 4935222Sksewell@umich.edu static FaultVect _vect; 4945222Sksewell@umich.edu static FaultStat _count; 4955222Sksewell@umich.edu public: 4965222Sksewell@umich.edu FaultName name() const {return _name;} 4975222Sksewell@umich.edu FaultVect vect() {return _vect;} 4985222Sksewell@umich.edu FaultStat & countStat() {return _count;} 4995222Sksewell@umich.edu#if FULL_SYSTEM 5007678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 5017678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 5025222Sksewell@umich.edu#endif 5036378Sgblack@eecs.umich.edu}; 5045222Sksewell@umich.edu 5055222Sksewell@umich.educlass TLBModifiedFault : public MipsFault 5065222Sksewell@umich.edu{ 5075222Sksewell@umich.edu private: 5085222Sksewell@umich.edu static FaultName _name; 5095222Sksewell@umich.edu static FaultVect _vect; 5105222Sksewell@umich.edu static FaultStat _count; 5115222Sksewell@umich.edu public: 5125222Sksewell@umich.edu FaultName name() const {return _name;} 5135222Sksewell@umich.edu FaultVect vect() {return _vect;} 5145222Sksewell@umich.edu FaultStat & countStat() {return _count;} 5155222Sksewell@umich.edu#if FULL_SYSTEM 5167678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 5177678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 5185222Sksewell@umich.edu#endif 5195222Sksewell@umich.edu}; 5205222Sksewell@umich.edu 5215222Sksewell@umich.educlass DtbInvalidFault : public MipsFault 5225222Sksewell@umich.edu{ 5235222Sksewell@umich.edu private: 5245222Sksewell@umich.edu static FaultName _name; 5255222Sksewell@umich.edu static FaultVect _vect; 5265222Sksewell@umich.edu static FaultStat _count; 5275222Sksewell@umich.edu public: 5285222Sksewell@umich.edu FaultName name() const {return _name;} 5295222Sksewell@umich.edu FaultVect vect() {return _vect;} 5305222Sksewell@umich.edu FaultStat & countStat() {return _count;} 5315222Sksewell@umich.edu#if FULL_SYSTEM 5327678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 5337678Sgblack@eecs.umich.edu StaticInst::StaticInstPtr inst = nullStaticInstPtr); 5345222Sksewell@umich.edu#endif 5355222Sksewell@umich.edu}; 5365222Sksewell@umich.edu 5375222Sksewell@umich.educlass FloatEnableFault : public MipsFault 5385222Sksewell@umich.edu{ 5395222Sksewell@umich.edu private: 5405222Sksewell@umich.edu static FaultName _name; 5415222Sksewell@umich.edu static FaultVect _vect; 5425222Sksewell@umich.edu static FaultStat _count; 5435222Sksewell@umich.edu public: 5445222Sksewell@umich.edu FaultName name() const {return _name;} 5455222Sksewell@umich.edu FaultVect vect() {return _vect;} 5465222Sksewell@umich.edu FaultStat & countStat() {return _count;} 5475222Sksewell@umich.edu}; 5485222Sksewell@umich.edu 5492447SN/Aclass ItbMissFault : public MipsFault 5502131SN/A{ 5512447SN/A private: 5522447SN/A static FaultName _name; 5532447SN/A static FaultVect _vect; 5542447SN/A static FaultStat _count; 5552131SN/A public: 5564695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 5572447SN/A FaultVect vect() {return _vect;} 5582447SN/A FaultStat & countStat() {return _count;} 5592447SN/A}; 5602131SN/A 5612447SN/Aclass ItbAcvFault : public MipsFault 5622131SN/A{ 5632447SN/A private: 5642447SN/A static FaultName _name; 5652447SN/A static FaultVect _vect; 5662447SN/A static FaultStat _count; 5672131SN/A public: 5684695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 5692447SN/A FaultVect vect() {return _vect;} 5702447SN/A FaultStat & countStat() {return _count;} 5712447SN/A}; 5722131SN/A 5732447SN/Aclass IntegerOverflowFault : public MipsFault 5742447SN/A{ 5752447SN/A private: 5762447SN/A static FaultName _name; 5772447SN/A static FaultVect _vect; 5782447SN/A static FaultStat _count; 5792447SN/A public: 5804695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 5812447SN/A FaultVect vect() {return _vect;} 5822447SN/A FaultStat & countStat() {return _count;} 5832447SN/A}; 5842447SN/A 5854661Sksewell@umich.educlass DspStateDisabledFault : public MipsFault 5864661Sksewell@umich.edu{ 5874661Sksewell@umich.edu private: 5884661Sksewell@umich.edu static FaultName _name; 5894661Sksewell@umich.edu static FaultVect _vect; 5904661Sksewell@umich.edu static FaultStat _count; 5914661Sksewell@umich.edu public: 5924695Sgblack@eecs.umich.edu FaultName name() const {return _name;} 5934661Sksewell@umich.edu FaultVect vect() {return _vect;} 5944661Sksewell@umich.edu FaultStat & countStat() {return _count;} 5957678Sgblack@eecs.umich.edu void invoke(ThreadContext * tc, 5967678Sgblack@eecs.umich.edu StaticInstPtr inst = StaticInst::nullStaticInstPtr); 5974661Sksewell@umich.edu}; 5984661Sksewell@umich.edu 5997811Ssteve.reinhardt@amd.com} // namespace MipsISA 6002131SN/A 6015222Sksewell@umich.edu#endif // __MIPS_FAULTS_HH__ 602