faults.hh revision 2131
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 Garbage; 36class Fault; 37 38class AlphaFault : public Fault 39{ 40 public: 41 AlphaFault(char * newName, int newId, Addr newVect) 42 : Fault(newName, newId), vect(newVect) 43 {;} 44 45 Addr vect; 46}; 47 48extern class ResetFaultType : public AlphaFault 49{ 50 public: 51 ResetFaultType(char * newName, int newId, Addr newVect) 52 : AlphaFault(newName, newId, newVect) 53 {;} 54} * const ResetFault; 55 56extern class ArithmeticFaultType : public AlphaFault 57{ 58 public: 59 ArithmeticFaultType(char * newName, int newId, Addr newVect) 60 : AlphaFault(newName, newId, newVect) 61 {;} 62} * const ArithmeticFault; 63 64extern class InterruptFaultType : public AlphaFault 65{ 66 public: 67 InterruptFaultType(char * newName, int newId, Addr newVect) 68 : AlphaFault(newName, newId, newVect) 69 {;} 70} * const InterruptFault; 71 72extern class NDtbMissFaultType : public AlphaFault 73{ 74 public: 75 NDtbMissFaultType(char * newName, int newId, Addr newVect) 76 : AlphaFault(newName, newId, newVect) 77 {;} 78} * const NDtbMissFault; 79 80extern class PDtbMissFaultType : public AlphaFault 81{ 82 public: 83 PDtbMissFaultType(char * newName, int newId, Addr newVect) 84 : AlphaFault(newName, newId, newVect) 85 {;} 86} * const PDtbMissFault; 87 88extern class DtbPageFaultType : public AlphaFault 89{ 90 public: 91 DtbPageFaultType(char * newName, int newId, Addr newVect) 92 : AlphaFault(newName, newId, newVect) 93 {;} 94} * const DtbPageFault; 95 96extern class DtbAcvFaultType : public AlphaFault 97{ 98 public: 99 DtbAcvFaultType(char * newName, int newId, Addr newVect) 100 : AlphaFault(newName, newId, newVect) 101 {;} 102} * const DtbAcvFault; 103 104extern class ItbMissFaultType : public AlphaFault 105{ 106 public: 107 ItbMissFaultType(char * newName, int newId, Addr newVect) 108 : AlphaFault(newName, newId, newVect) 109 {;} 110} * const ItbMissFault; 111 112extern class ItbPageFaultType : public AlphaFault 113{ 114 public: 115 ItbPageFaultType(char * newName, int newId, Addr newVect) 116 : AlphaFault(newName, newId, newVect) 117 {;} 118} * const ItbPageFault; 119 120extern class ItbAcvFaultType : public AlphaFault 121{ 122 public: 123 ItbAcvFaultType(char * newName, int newId, Addr newVect) 124 : AlphaFault(newName, newId, newVect) 125 {;} 126} * const ItbAcvFault; 127 128extern class UnimplementedOpcodeFaultType : public AlphaFault 129{ 130 public: 131 UnimplementedOpcodeFaultType(char * newName, int newId, Addr newVect) 132 : AlphaFault(newName, newId, newVect) 133 {;} 134} * const UnimplementedOpcodeFault; 135 136extern class FloatEnableFaultType : public AlphaFault 137{ 138 public: 139 FloatEnableFaultType(char * newName, int newId, Addr newVect) 140 : AlphaFault(newName, newId, newVect) 141 {;} 142} * const FloatEnableFault; 143 144extern class PalFaultType : public AlphaFault 145{ 146 public: 147 PalFaultType(char * newName, int newId, Addr newVect) 148 : AlphaFault(newName, newId, newVect) 149 {;} 150} * const PalFault; 151 152extern class IntegerOverflowFaultType : public AlphaFault 153{ 154 public: 155 IntegerOverflowFaultType(char * newName, int newId, Addr newVect) 156 : AlphaFault(newName, newId, newVect) 157 {;} 158} * const IntegerOverflowFault; 159 160extern Fault ** ListOfFaults[]; 161extern int NumFaults; 162 163#endif // __FAULTS_HH__ 164