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"
34 // The design of the "name" and "vect" functions is in sim/faults.hh
39 typedef const Addr FaultVect;
41 class AlphaFault : public FaultBase
44 static FaultName _name;
45 static FaultVect _vect;
46 static FaultStat _stat;
48 FaultName name() {return _name;}
49 virtual FaultVect vect() {return _vect;}
50 virtual FaultStat & stat() {return _stat;}
53 class AlphaMachineCheckFault : public MachineCheckFault
56 static FaultVect _vect;
57 static FaultStat _stat;
59 FaultVect vect() {return _vect;}
60 FaultStat & stat() {return _stat;}
63 class AlphaAlignmentFault : public AlignmentFault
66 static FaultVect _vect;
67 static FaultStat _stat;
69 FaultVect vect() {return _vect;}
70 FaultStat & stat() {return _stat;}
73 static inline Fault genMachineCheckFault()
75 return new AlphaMachineCheckFault;
78 static inline Fault genAlignmentFault()
80 return new AlphaAlignmentFault;
83 class ResetFault : public AlphaFault
86 static FaultName _name;
87 static FaultVect _vect;
88 static FaultStat _stat;
90 FaultName name() {return _name;}
91 FaultVect vect() {return _vect;}
92 FaultStat & stat() {return _stat;}
95 class ArithmeticFault : public AlphaFault
98 static FaultName _name;
99 static FaultVect _vect;
100 static FaultStat _stat;
102 FaultName name() {return _name;}
103 FaultVect vect() {return _vect;}
104 FaultStat & stat() {return _stat;}
107 class InterruptFault : public AlphaFault
110 static FaultName _name;
111 static FaultVect _vect;
112 static FaultStat _stat;
114 FaultName name() {return _name;}
115 FaultVect vect() {return _vect;}
116 FaultStat & stat() {return _stat;}
119 class NDtbMissFault : public AlphaFault
122 static FaultName _name;
123 static FaultVect _vect;
124 static FaultStat _stat;
126 FaultName name() {return _name;}
127 FaultVect vect() {return _vect;}
128 FaultStat & stat() {return _stat;}
131 class PDtbMissFault : public AlphaFault
134 static FaultName _name;
135 static FaultVect _vect;
136 static FaultStat _stat;
138 FaultName name() {return _name;}
139 FaultVect vect() {return _vect;}
140 FaultStat & stat() {return _stat;}
143 class DtbPageFault : public AlphaFault
146 static FaultName _name;
147 static FaultVect _vect;
148 static FaultStat _stat;
150 FaultName name() {return _name;}
151 FaultVect vect() {return _vect;}
152 FaultStat & stat() {return _stat;}
155 class DtbAcvFault : public AlphaFault
158 static FaultName _name;
159 static FaultVect _vect;
160 static FaultStat _stat;
162 FaultName name() {return _name;}
163 FaultVect vect() {return _vect;}
164 FaultStat & stat() {return _stat;}
167 class ItbMissFault : public AlphaFault
170 static FaultName _name;
171 static FaultVect _vect;
172 static FaultStat _stat;
174 FaultName name() {return _name;}
175 FaultVect vect() {return _vect;}
176 FaultStat & stat() {return _stat;}
179 class ItbPageFault : public AlphaFault
182 static FaultName _name;
183 static FaultVect _vect;
184 static FaultStat _stat;
186 FaultName name() {return _name;}
187 FaultVect vect() {return _vect;}
188 FaultStat & stat() {return _stat;}
191 class ItbAcvFault : public AlphaFault
194 static FaultName _name;
195 static FaultVect _vect;
196 static FaultStat _stat;
198 FaultName name() {return _name;}
199 FaultVect vect() {return _vect;}
200 FaultStat & stat() {return _stat;}
203 class UnimplementedOpcodeFault : public AlphaFault
206 static FaultName _name;
207 static FaultVect _vect;
208 static FaultStat _stat;
210 FaultName name() {return _name;}
211 FaultVect vect() {return _vect;}
212 FaultStat & stat() {return _stat;}
215 class FloatEnableFault : public AlphaFault
218 static FaultName _name;
219 static FaultVect _vect;
220 static FaultStat _stat;
222 FaultName name() {return _name;}
223 FaultVect vect() {return _vect;}
224 FaultStat & stat() {return _stat;}
227 class PalFault : public AlphaFault
230 static FaultName _name;
231 static FaultVect _vect;
232 static FaultStat _stat;
234 FaultName name() {return _name;}
235 FaultVect vect() {return _vect;}
236 FaultStat & stat() {return _stat;}
239 class IntegerOverflowFault : public AlphaFault
242 static FaultName _name;
243 static FaultVect _vect;
244 static FaultStat _stat;
246 FaultName name() {return _name;}
247 FaultVect vect() {return _vect;}
248 FaultStat & stat() {return _stat;}
251 } // AlphaISA namespace
253 #endif // __FAULTS_HH__