Deleted Added
sdiff udiff text old ( 5736:426510e758ad ) new ( 7678:f19b6a3a8cec )
full compact
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 "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
52 void invoke(ThreadContext * tc);
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
119 void invoke(ThreadContext * tc);
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
154 void invoke(ThreadContext * tc);
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
173 void invoke(ThreadContext * tc);
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
252 void invoke(ThreadContext * tc);
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
269 void invoke(ThreadContext * tc);
270#endif
271};
272
273class ItbAcvFault : public ItbFault
274{
275 private:
276 static FaultName _name;
277 static FaultVect _vect;

--- 67 unchanged lines hidden ---