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 #include "arch/alpha/faults.hh"
30 #include "cpu/exec_context.hh"
35 FaultVect
AlphaMachineCheckFault::_vect
= 0x0401;
36 FaultStat
AlphaMachineCheckFault::_stat
;
38 FaultVect
AlphaAlignmentFault::_vect
= 0x0301;
39 FaultStat
AlphaAlignmentFault::_stat
;
41 FaultName
ResetFault::_name
= "reset";
42 FaultVect
ResetFault::_vect
= 0x0001;
43 FaultStat
ResetFault::_stat
;
45 FaultName
ArithmeticFault::_name
= "arith";
46 FaultVect
ArithmeticFault::_vect
= 0x0501;
47 FaultStat
ArithmeticFault::_stat
;
49 FaultName
InterruptFault::_name
= "interrupt";
50 FaultVect
InterruptFault::_vect
= 0x0101;
51 FaultStat
InterruptFault::_stat
;
53 FaultName
NDtbMissFault::_name
= "dtb_miss_single";
54 FaultVect
NDtbMissFault::_vect
= 0x0201;
55 FaultStat
NDtbMissFault::_stat
;
57 FaultName
PDtbMissFault::_name
= "dtb_miss_double";
58 FaultVect
PDtbMissFault::_vect
= 0x0281;
59 FaultStat
PDtbMissFault::_stat
;
61 FaultName
DtbPageFault::_name
= "dfault";
62 FaultVect
DtbPageFault::_vect
= 0x0381;
63 FaultStat
DtbPageFault::_stat
;
65 FaultName
DtbAcvFault::_name
= "dfault";
66 FaultVect
DtbAcvFault::_vect
= 0x0381;
67 FaultStat
DtbAcvFault::_stat
;
69 FaultName
ItbMissFault::_name
= "itbmiss";
70 FaultVect
ItbMissFault::_vect
= 0x0181;
71 FaultStat
ItbMissFault::_stat
;
73 FaultName
ItbPageFault::_name
= "itbmiss";
74 FaultVect
ItbPageFault::_vect
= 0x0181;
75 FaultStat
ItbPageFault::_stat
;
77 FaultName
ItbAcvFault::_name
= "iaccvio";
78 FaultVect
ItbAcvFault::_vect
= 0x0081;
79 FaultStat
ItbAcvFault::_stat
;
81 FaultName
UnimplementedOpcodeFault::_name
= "opdec";
82 FaultVect
UnimplementedOpcodeFault::_vect
= 0x0481;
83 FaultStat
UnimplementedOpcodeFault::_stat
;
85 FaultName
FloatEnableFault::_name
= "fen";
86 FaultVect
FloatEnableFault::_vect
= 0x0581;
87 FaultStat
FloatEnableFault::_stat
;
89 FaultName
PalFault::_name
= "pal";
90 FaultVect
PalFault::_vect
= 0x2001;
91 FaultStat
PalFault::_stat
;
93 FaultName
IntegerOverflowFault::_name
= "intover";
94 FaultVect
IntegerOverflowFault::_vect
= 0x0501;
95 FaultStat
IntegerOverflowFault::_stat
;
99 void AlphaFault::ev5_trap(ExecContext
* xc
)
101 xc
->ev5_temp_trap(this);
104 void AlphaMachineCheckFault::ev5_trap(ExecContext
* xc
)
106 xc
->ev5_temp_trap(this);
109 void AlphaAlignmentFault::ev5_trap(ExecContext
* xc
)
111 xc
->ev5_temp_trap(this);
116 } // namespace AlphaISA
118 /*Fault * ListOfFaults[] = {
120 (Fault *)&ResetFault,
121 (Fault *)&MachineCheckFault,
122 (Fault *)&ArithmeticFault,
123 (Fault *)&InterruptFault,
124 (Fault *)&NDtbMissFault,
125 (Fault *)&PDtbMissFault,
126 (Fault *)&AlignmentFault,
127 (Fault *)&DtbPageFault,
128 (Fault *)&DtbAcvFault,
129 (Fault *)&ItbMissFault,
130 (Fault *)&ItbPageFault,
131 (Fault *)&ItbAcvFault,
132 (Fault *)&UnimplementedOpcodeFault,
133 (Fault *)&FloatEnableFault,
135 (Fault *)&IntegerOverflowFault,
138 int NumFaults = sizeof(ListOfFaults) / sizeof(Fault *);*/