faults.hh revision 2112
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; 9 * redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution; 12 * neither the name of the copyright holders nor the names of its 13 * contributors may be used to endorse or promote products derived from 14 * this software without specific prior written permission. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#ifndef __ALPHA_FAULTS_HH__ 30#define __ALPHA_FAULTS_HH__ 31 32#include "sim/faults.hh" 33#include "arch/isa_traits.hh" //For the Addr type 34 35class AlphaFault : public Fault 36{ 37 public: 38 AlphaFault(char * newName, int newId, Addr newVect) 39 : Fault(newName, newId), vect(newVect) 40 {;} 41 42 TheISA::Addr vect; 43}; 44 45extern class ResetFaultType : public AlphaFault 46{ 47 public: 48 ResetFaultType(char * newName, int newId, Addr newVect) 49 : AlphaFault(newName, newId, newVect) 50 {;} 51} * const ResetFault; 52 53extern class ArithmeticFaultType : public AlphaFault 54{ 55 public: 56 ArithmeticFaultType(char * newName, int newId, Addr newVect) 57 : AlphaFault(newName, newId, newVect) 58 {;} 59} * const ArithmeticFault; 60 61extern class InterruptFaultType : public AlphaFault 62{ 63 public: 64 InterruptFaultType(char * newName, int newId, Addr newVect) 65 : AlphaFault(newName, newId, newVect) 66 {;} 67} * const InterruptFault; 68 69extern class NDtbMissFaultType : public AlphaFault 70{ 71 public: 72 NDtbMissFaultType(char * newName, int newId, Addr newVect) 73 : AlphaFault(newName, newId, newVect) 74 {;} 75} * const NDtbMissFault; 76 77extern class PDtbMissFaultType : public AlphaFault 78{ 79 public: 80 PDtbMissFaultType(char * newName, int newId, Addr newVect) 81 : AlphaFault(newName, newId, newVect) 82 {;} 83} * const PDtbMissFault; 84 85extern class DtbPageFaultType : public AlphaFault 86{ 87 public: 88 DtbPageFaultType(char * newName, int newId, Addr newVect) 89 : AlphaFault(newName, newId, newVect) 90 {;} 91} * const DtbPageFault; 92 93extern class DtbAcvFaultType : public AlphaFault 94{ 95 public: 96 DtbAcvFaultType(char * newName, int newId, Addr newVect) 97 : AlphaFault(newName, newId, newVect) 98 {;} 99} * const DtbAcvFault; 100 101extern class ItbMissFaultType : public AlphaFault 102{ 103 public: 104 ItbMissFaultType(char * newName, int newId, Addr newVect) 105 : AlphaFault(newName, newId, newVect) 106 {;} 107} * const ItbMissFault; 108 109extern class ItbPageFaultType : public AlphaFault 110{ 111 public: 112 ItbPageFaultType(char * newName, int newId, Addr newVect) 113 : AlphaFault(newName, newId, newVect) 114 {;} 115} * const ItbPageFault; 116 117extern class ItbAcvFaultType : public AlphaFault 118{ 119 public: 120 ItbAcvFaultType(char * newName, int newId, Addr newVect) 121 : AlphaFault(newName, newId, newVect) 122 {;} 123} * const ItbAcvFault; 124 125extern class UnimplementedOpcodeFaultType : public AlphaFault 126{ 127 public: 128 UnimplementedOpcodeFaultType(char * newName, int newId, Addr newVect) 129 : AlphaFault(newName, newId, newVect) 130 {;} 131} * const UnimplementedOpcodeFault; 132 133extern class FloatEnableFaultType : public AlphaFault 134{ 135 public: 136 FloatEnableFaultType(char * newName, int newId, Addr newVect) 137 : AlphaFault(newName, newId, newVect) 138 {;} 139} * const FloatEnableFault; 140 141extern class PalFaultType : public AlphaFault 142{ 143 public: 144 PalFaultType(char * newName, int newId, Addr newVect) 145 : AlphaFault(newName, newId, newVect) 146 {;} 147} * const PalFault; 148 149extern class IntegerOverflowFaultType : public AlphaFault 150{ 151 public: 152 IntegerOverflowFaultType(char * newName, int newId, Addr newVect) 153 : AlphaFault(newName, newId, newVect) 154 {;} 155} * const IntegerOverflowFault; 156 157extern Fault ** ListOfFaults[]; 158extern int NumFaults; 159 160#endif // __FAULTS_HH__ 161