faults.hh revision 2239
12SN/A/* 21762SN/A * Copyright (c) 2003-2005 The Regents of The University of Michigan 32SN/A * All rights reserved. 42SN/A * 52SN/A * Redistribution and use in source and binary forms, with or without 62SN/A * modification, are permitted provided that the following conditions are 72SN/A * met: redistributions of source code must retain the above copyright 82SN/A * notice, this list of conditions and the following disclaimer; 92SN/A * redistributions in binary form must reproduce the above copyright 102SN/A * notice, this list of conditions and the following disclaimer in the 112SN/A * documentation and/or other materials provided with the distribution; 122SN/A * neither the name of the copyright holders nor the names of its 132SN/A * contributors may be used to endorse or promote products derived from 142SN/A * this software without specific prior written permission. 152SN/A * 162SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 172SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 182SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 192SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 202SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 212SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 222SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 232SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 242SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 252SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 262SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 272665Ssaidi@eecs.umich.edu */ 282665Ssaidi@eecs.umich.edu 292665Ssaidi@eecs.umich.edu#ifndef __MIPS_FAULTS_HH__ 302665Ssaidi@eecs.umich.edu#define __MIPS_FAULTS_HH__ 312SN/A 322SN/A#include "sim/faults.hh" 332SN/A#include "arch/isa_traits.hh" //For the Addr type 342SN/A 352SN/Aclass MipsFault : public FaultBase 362984Sgblack@eecs.umich.edu{ 372171SN/A public: 382984Sgblack@eecs.umich.edu MipsFault(char * newName, int newId, Addr newVect) 39146SN/A : FaultBase(newName, newId), vect(newVect) 40146SN/A {;} 41146SN/A 421858SN/A Addr vect; 432680Sktlim@umich.edu}; 444762Snate@binkert.org 454762Snate@binkert.orgextern class ResetFaultType : public MipsFault 462SN/A{ 472SN/A public: 481147SN/A ResetFaultType(char * newName, int newId, Addr newVect) 492SN/A : MipsFault(newName, newId, newVect) 504088Sbinkertn@umich.edu {;} 513838Shsul@eecs.umich.edu} * const ResetFault; 523838Shsul@eecs.umich.edu 533838Shsul@eecs.umich.eduextern class ArithmeticFaultType : public MipsFault 543838Shsul@eecs.umich.edu{ 55860SN/A public: 563838Shsul@eecs.umich.edu ArithmeticFaultType(char * newName, int newId, Addr newVect) 573838Shsul@eecs.umich.edu : MipsFault(newName, newId, newVect) 58860SN/A {;} 59860SN/A} * const ArithmeticFault; 601147SN/A 611147SN/Aextern class InterruptFaultType : public MipsFault 623838Shsul@eecs.umich.edu{ 633838Shsul@eecs.umich.edu public: 643838Shsul@eecs.umich.edu InterruptFaultType(char * newName, int newId, Addr newVect) 653838Shsul@eecs.umich.edu : MipsFault(newName, newId, newVect) 663838Shsul@eecs.umich.edu {;} 673838Shsul@eecs.umich.edu} * const InterruptFault; 682SN/A 693838Shsul@eecs.umich.eduextern class NDtbMissFaultType : public MipsFault 703838Shsul@eecs.umich.edu{ 713838Shsul@eecs.umich.edu public: 723838Shsul@eecs.umich.edu NDtbMissFaultType(char * newName, int newId, Addr newVect) 733838Shsul@eecs.umich.edu : MipsFault(newName, newId, newVect) 742SN/A {;} 753838Shsul@eecs.umich.edu} * const NDtbMissFault; 763838Shsul@eecs.umich.edu 773838Shsul@eecs.umich.eduextern class PDtbMissFaultType : public MipsFault 783838Shsul@eecs.umich.edu{ 793838Shsul@eecs.umich.edu public: 803838Shsul@eecs.umich.edu PDtbMissFaultType(char * newName, int newId, Addr newVect) 812SN/A : MipsFault(newName, newId, newVect) 823838Shsul@eecs.umich.edu {;} 833838Shsul@eecs.umich.edu} * const PDtbMissFault; 843838Shsul@eecs.umich.edu 851413SN/Aextern class DtbPageFaultType : public MipsFault 863453Sgblack@eecs.umich.edu{ 871413SN/A public: 883838Shsul@eecs.umich.edu DtbPageFaultType(char * newName, int newId, Addr newVect) 893838Shsul@eecs.umich.edu : MipsFault(newName, newId, newVect) 903838Shsul@eecs.umich.edu {;} 911413SN/A} * const DtbPageFault; 922SN/A 931413SN/Aextern class DtbAcvFaultType : public MipsFault 941413SN/A{ 952SN/A public: 962SN/A DtbAcvFaultType(char * newName, int newId, Addr newVect) 973838Shsul@eecs.umich.edu : MipsFault(newName, newId, newVect) 983838Shsul@eecs.umich.edu {;} 993838Shsul@eecs.umich.edu} * const DtbAcvFault; 1003838Shsul@eecs.umich.edu 1012SN/Aextern class ItbMissFaultType : public MipsFault 1022SN/A{ 1033838Shsul@eecs.umich.edu public: 1043838Shsul@eecs.umich.edu ItbMissFaultType(char * newName, int newId, Addr newVect) 1053838Shsul@eecs.umich.edu : MipsFault(newName, newId, newVect) 1063838Shsul@eecs.umich.edu {;} 1073838Shsul@eecs.umich.edu} * const ItbMissFault; 1083838Shsul@eecs.umich.edu 1093838Shsul@eecs.umich.eduextern class ItbPageFaultType : public MipsFault 1103838Shsul@eecs.umich.edu{ 1113838Shsul@eecs.umich.edu public: 1123838Shsul@eecs.umich.edu ItbPageFaultType(char * newName, int newId, Addr newVect) 1133838Shsul@eecs.umich.edu : MipsFault(newName, newId, newVect) 1143838Shsul@eecs.umich.edu {;} 1153838Shsul@eecs.umich.edu} * const ItbPageFault; 1163838Shsul@eecs.umich.edu 1173838Shsul@eecs.umich.eduextern class ItbAcvFaultType : public MipsFault 1183838Shsul@eecs.umich.edu{ 1194088Sbinkertn@umich.edu public: 1203838Shsul@eecs.umich.edu ItbAcvFaultType(char * newName, int newId, Addr newVect) 1214088Sbinkertn@umich.edu : MipsFault(newName, newId, newVect) 1223838Shsul@eecs.umich.edu {;} 1234088Sbinkertn@umich.edu} * const ItbAcvFault; 1243838Shsul@eecs.umich.edu 1253838Shsul@eecs.umich.eduextern class UnimplementedOpcodeFaultType : public MipsFault 1263838Shsul@eecs.umich.edu{ 1273838Shsul@eecs.umich.edu public: 1283838Shsul@eecs.umich.edu UnimplementedOpcodeFaultType(char * newName, int newId, Addr newVect) 1293838Shsul@eecs.umich.edu : MipsFault(newName, newId, newVect) 1303838Shsul@eecs.umich.edu {;} 1313838Shsul@eecs.umich.edu} * const UnimplementedOpcodeFault; 1323838Shsul@eecs.umich.edu 1333838Shsul@eecs.umich.eduextern class FloatEnableFaultType : public MipsFault 1343838Shsul@eecs.umich.edu{ 135924SN/A public: 1362SN/A FloatEnableFaultType(char * newName, int newId, Addr newVect) 1373838Shsul@eecs.umich.edu : MipsFault(newName, newId, newVect) 1383838Shsul@eecs.umich.edu {;} 1392SN/A} * const FloatEnableFault; 1402SN/A 1413838Shsul@eecs.umich.eduextern class PalFaultType : public MipsFault 1423838Shsul@eecs.umich.edu{ 1433838Shsul@eecs.umich.edu public: 1443838Shsul@eecs.umich.edu PalFaultType(char * newName, int newId, Addr newVect) 1453838Shsul@eecs.umich.edu : MipsFault(newName, newId, newVect) 1463838Shsul@eecs.umich.edu {;} 1473838Shsul@eecs.umich.edu} * const PalFault; 1483838Shsul@eecs.umich.edu 1493838Shsul@eecs.umich.eduextern class IntegerOverflowFaultType : public MipsFault 1503838Shsul@eecs.umich.edu{ 1513838Shsul@eecs.umich.edu public: 1523838Shsul@eecs.umich.edu IntegerOverflowFaultType(char * newName, int newId, Addr newVect) 1533838Shsul@eecs.umich.edu : MipsFault(newName, newId, newVect) 1543838Shsul@eecs.umich.edu {;} 1553838Shsul@eecs.umich.edu} * const IntegerOverflowFault; 1563838Shsul@eecs.umich.edu 1573838Shsul@eecs.umich.eduextern Fault ** ListOfFaults[]; 1583838Shsul@eecs.umich.eduextern int NumFaults; 1593838Shsul@eecs.umich.edu 1603838Shsul@eecs.umich.edu#endif // __FAULTS_HH__ 1613838Shsul@eecs.umich.edu