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" |
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 |
53 void invoke(ThreadContext * tc, 54 StaticInstPtr inst = StaticInst::nullStaticInstPtr); |
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 |
121 void invoke(ThreadContext * tc, 122 StaticInstPtr inst = StaticInst::nullStaticInstPtr); |
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 |
157 void invoke(ThreadContext * tc, 158 StaticInstPtr inst = StaticInst::nullStaticInstPtr); |
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 |
177 void invoke(ThreadContext * tc, 178 StaticInstPtr inst = StaticInst::nullStaticInstPtr); |
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 |
257 void invoke(ThreadContext * tc, 258 StaticInstPtr inst = StaticInst::nullStaticInstPtr); |
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 |
275 void invoke(ThreadContext * tc, 276 StaticInstPtr inst = StaticInst::nullStaticInstPtr); |
277#endif 278}; 279 280class ItbAcvFault : public ItbFault 281{ 282 private: 283 static FaultName _name; 284 static FaultVect _vect; --- 67 unchanged lines hidden --- |