faults.hh (5736:426510e758ad) faults.hh (7678:f19b6a3a8cec)
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;

--- 20 unchanged lines hidden (view full) ---

29 * Kevin Lim
30 */
31
32#ifndef __ARCH_ALPHA_FAULTS_HH__
33#define __ARCH_ALPHA_FAULTS_HH__
34
35#include "arch/alpha/pagetable.hh"
36#include "config/full_system.hh"
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;

--- 20 unchanged lines hidden (view full) ---

29 * Kevin Lim
30 */
31
32#ifndef __ARCH_ALPHA_FAULTS_HH__
33#define __ARCH_ALPHA_FAULTS_HH__
34
35#include "arch/alpha/pagetable.hh"
36#include "config/full_system.hh"
37#include "mem/request.hh"
37#include "sim/faults.hh"
38
39// The design of the "name" and "vect" functions is in sim/faults.hh
40
41namespace AlphaISA {
42
43typedef const Addr FaultVect;
44
45class AlphaFault : public FaultBase
46{
47 protected:
48 virtual bool skipFaultingInstruction() {return false;}
49 virtual bool setRestartAddress() {return true;}
50 public:
51#if FULL_SYSTEM
38#include "sim/faults.hh"
39
40// The design of the "name" and "vect" functions is in sim/faults.hh
41
42namespace AlphaISA {
43
44typedef const Addr FaultVect;
45
46class AlphaFault : public FaultBase
47{
48 protected:
49 virtual bool skipFaultingInstruction() {return false;}
50 virtual bool setRestartAddress() {return true;}
51 public:
52#if FULL_SYSTEM
52 void invoke(ThreadContext * tc);
53 void invoke(ThreadContext * tc,
54 StaticInstPtr inst = StaticInst::nullStaticInstPtr);
53#endif
54 virtual FaultVect vect() = 0;
55 virtual FaultStat & countStat() = 0;
56};
57
58class MachineCheckFault : public AlphaFault
59{
60 private:

--- 50 unchanged lines hidden (view full) ---

111 protected:
112 bool skipFaultingInstruction() {return true;}
113
114 public:
115 FaultName name() const {return _name;}
116 FaultVect vect() {return _vect;}
117 FaultStat & countStat() {return _count;}
118#if FULL_SYSTEM
55#endif
56 virtual FaultVect vect() = 0;
57 virtual FaultStat & countStat() = 0;
58};
59
60class MachineCheckFault : public AlphaFault
61{
62 private:

--- 50 unchanged lines hidden (view full) ---

113 protected:
114 bool skipFaultingInstruction() {return true;}
115
116 public:
117 FaultName name() const {return _name;}
118 FaultVect vect() {return _vect;}
119 FaultStat & countStat() {return _count;}
120#if FULL_SYSTEM
119 void invoke(ThreadContext * tc);
121 void invoke(ThreadContext * tc,
122 StaticInstPtr inst = StaticInst::nullStaticInstPtr);
120#endif
121};
122
123class InterruptFault : public AlphaFault
124{
125 private:
126 static FaultName _name;
127 static FaultVect _vect;

--- 18 unchanged lines hidden (view full) ---

146 public:
147 DtbFault(VAddr _vaddr, Request::Flags _reqFlags, uint64_t _flags)
148 : vaddr(_vaddr), reqFlags(_reqFlags), flags(_flags)
149 { }
150 FaultName name() const = 0;
151 FaultVect vect() = 0;
152 FaultStat & countStat() = 0;
153#if FULL_SYSTEM
123#endif
124};
125
126class InterruptFault : public AlphaFault
127{
128 private:
129 static FaultName _name;
130 static FaultVect _vect;

--- 18 unchanged lines hidden (view full) ---

149 public:
150 DtbFault(VAddr _vaddr, Request::Flags _reqFlags, uint64_t _flags)
151 : vaddr(_vaddr), reqFlags(_reqFlags), flags(_flags)
152 { }
153 FaultName name() const = 0;
154 FaultVect vect() = 0;
155 FaultStat & countStat() = 0;
156#if FULL_SYSTEM
154 void invoke(ThreadContext * tc);
157 void invoke(ThreadContext * tc,
158 StaticInstPtr inst = StaticInst::nullStaticInstPtr);
155#endif
156};
157
158class NDtbMissFault : public DtbFault
159{
160 private:
161 static FaultName _name;
162 static FaultVect _vect;
163 static FaultStat _count;
164
165 public:
166 NDtbMissFault(VAddr vaddr, Request::Flags reqFlags, uint64_t flags)
167 : DtbFault(vaddr, reqFlags, flags)
168 { }
169 FaultName name() const {return _name;}
170 FaultVect vect() {return _vect;}
171 FaultStat & countStat() {return _count;}
172#if !FULL_SYSTEM
159#endif
160};
161
162class NDtbMissFault : public DtbFault
163{
164 private:
165 static FaultName _name;
166 static FaultVect _vect;
167 static FaultStat _count;
168
169 public:
170 NDtbMissFault(VAddr vaddr, Request::Flags reqFlags, uint64_t flags)
171 : DtbFault(vaddr, reqFlags, flags)
172 { }
173 FaultName name() const {return _name;}
174 FaultVect vect() {return _vect;}
175 FaultStat & countStat() {return _count;}
176#if !FULL_SYSTEM
173 void invoke(ThreadContext * tc);
177 void invoke(ThreadContext * tc,
178 StaticInstPtr inst = StaticInst::nullStaticInstPtr);
174#endif
175};
176
177class PDtbMissFault : public DtbFault
178{
179 private:
180 static FaultName _name;
181 static FaultVect _vect;

--- 62 unchanged lines hidden (view full) ---

244 Addr pc;
245
246 public:
247 ItbFault(Addr _pc) : pc(_pc) { }
248 FaultName name() const = 0;
249 FaultVect vect() = 0;
250 FaultStat & countStat() = 0;
251#if FULL_SYSTEM
179#endif
180};
181
182class PDtbMissFault : public DtbFault
183{
184 private:
185 static FaultName _name;
186 static FaultVect _vect;

--- 62 unchanged lines hidden (view full) ---

249 Addr pc;
250
251 public:
252 ItbFault(Addr _pc) : pc(_pc) { }
253 FaultName name() const = 0;
254 FaultVect vect() = 0;
255 FaultStat & countStat() = 0;
256#if FULL_SYSTEM
252 void invoke(ThreadContext * tc);
257 void invoke(ThreadContext * tc,
258 StaticInstPtr inst = StaticInst::nullStaticInstPtr);
253#endif
254};
255
256class ItbPageFault : public ItbFault
257{
258 private:
259 static FaultName _name;
260 static FaultVect _vect;
261 static FaultStat _count;
262
263 public:
264 ItbPageFault(Addr pc) : ItbFault(pc) { }
265 FaultName name() const {return _name;}
266 FaultVect vect() {return _vect;}
267 FaultStat & countStat() {return _count;}
268#if !FULL_SYSTEM
259#endif
260};
261
262class ItbPageFault : public ItbFault
263{
264 private:
265 static FaultName _name;
266 static FaultVect _vect;
267 static FaultStat _count;
268
269 public:
270 ItbPageFault(Addr pc) : ItbFault(pc) { }
271 FaultName name() const {return _name;}
272 FaultVect vect() {return _vect;}
273 FaultStat & countStat() {return _count;}
274#if !FULL_SYSTEM
269 void invoke(ThreadContext * tc);
275 void invoke(ThreadContext * tc,
276 StaticInstPtr inst = StaticInst::nullStaticInstPtr);
270#endif
271};
272
273class ItbAcvFault : public ItbFault
274{
275 private:
276 static FaultName _name;
277 static FaultVect _vect;

--- 67 unchanged lines hidden ---
277#endif
278};
279
280class ItbAcvFault : public ItbFault
281{
282 private:
283 static FaultName _name;
284 static FaultVect _vect;

--- 67 unchanged lines hidden ---