2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
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.
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.
29 #ifndef __ALPHA_FAULTS_HH__
30 #define __ALPHA_FAULTS_HH__
32 #include "sim/faults.hh"
33 #include "arch/isa_traits.hh" //For the Addr type
35 class AlphaFault : public Fault
38 AlphaFault(char * newName, int newId, Addr newVect)
39 : Fault(newName, newId), vect(newVect)
45 extern class ResetFaultType : public AlphaFault
48 ResetFaultType(char * newName, int newId, Addr newVect)
49 : AlphaFault(newName, newId, newVect)
53 extern class ArithmeticFaultType : public AlphaFault
56 ArithmeticFaultType(char * newName, int newId, Addr newVect)
57 : AlphaFault(newName, newId, newVect)
59 } * const ArithmeticFault;
61 extern class InterruptFaultType : public AlphaFault
64 InterruptFaultType(char * newName, int newId, Addr newVect)
65 : AlphaFault(newName, newId, newVect)
67 } * const InterruptFault;
69 extern class NDtbMissFaultType : public AlphaFault
72 NDtbMissFaultType(char * newName, int newId, Addr newVect)
73 : AlphaFault(newName, newId, newVect)
75 } * const NDtbMissFault;
77 extern class PDtbMissFaultType : public AlphaFault
80 PDtbMissFaultType(char * newName, int newId, Addr newVect)
81 : AlphaFault(newName, newId, newVect)
83 } * const PDtbMissFault;
85 extern class DtbPageFaultType : public AlphaFault
88 DtbPageFaultType(char * newName, int newId, Addr newVect)
89 : AlphaFault(newName, newId, newVect)
91 } * const DtbPageFault;
93 extern class DtbAcvFaultType : public AlphaFault
96 DtbAcvFaultType(char * newName, int newId, Addr newVect)
97 : AlphaFault(newName, newId, newVect)
99 } * const DtbAcvFault;
101 extern class ItbMissFaultType : public AlphaFault
104 ItbMissFaultType(char * newName, int newId, Addr newVect)
105 : AlphaFault(newName, newId, newVect)
107 } * const ItbMissFault;
109 extern class ItbPageFaultType : public AlphaFault
112 ItbPageFaultType(char * newName, int newId, Addr newVect)
113 : AlphaFault(newName, newId, newVect)
115 } * const ItbPageFault;
117 extern class ItbAcvFaultType : public AlphaFault
120 ItbAcvFaultType(char * newName, int newId, Addr newVect)
121 : AlphaFault(newName, newId, newVect)
123 } * const ItbAcvFault;
125 extern class UnimplementedOpcodeFaultType : public AlphaFault
128 UnimplementedOpcodeFaultType(char * newName, int newId, Addr newVect)
129 : AlphaFault(newName, newId, newVect)
131 } * const UnimplementedOpcodeFault;
133 extern class FloatEnableFaultType : public AlphaFault
136 FloatEnableFaultType(char * newName, int newId, Addr newVect)
137 : AlphaFault(newName, newId, newVect)
139 } * const FloatEnableFault;
141 extern class PalFaultType : public AlphaFault
144 PalFaultType(char * newName, int newId, Addr newVect)
145 : AlphaFault(newName, newId, newVect)
149 extern class IntegerOverflowFaultType : public AlphaFault
152 IntegerOverflowFaultType(char * newName, int newId, Addr newVect)
153 : AlphaFault(newName, newId, newVect)
155 } * const IntegerOverflowFault;
157 extern Fault ** ListOfFaults[];
158 extern int NumFaults;
160 #endif // __FAULTS_HH__