2006-02-22 04:02:05 +01:00
|
|
|
/*
|
2007-11-17 03:32:22 +01:00
|
|
|
* Copyright (c) 2003-2005 The Regents of The University of Michigan
|
2007-11-14 12:24:47 +01:00
|
|
|
* Copyright (c) 2007 MIPS Technologies, Inc.
|
|
|
|
* All rights reserved.
|
2006-02-22 04:02:05 +01:00
|
|
|
*
|
2007-11-14 12:24:47 +01:00
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions are
|
|
|
|
* met: redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer;
|
|
|
|
* redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution;
|
|
|
|
* neither the name of the copyright holders nor the names of its
|
|
|
|
* contributors may be used to endorse or promote products derived from
|
|
|
|
* this software without specific prior written permission.
|
2006-02-22 04:02:05 +01:00
|
|
|
*
|
2007-11-14 12:24:47 +01:00
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2006-06-01 01:26:56 +02:00
|
|
|
*
|
2007-11-14 12:24:47 +01:00
|
|
|
* Authors: Gabe Black
|
|
|
|
* Korey Sewell
|
2007-11-13 22:58:16 +01:00
|
|
|
* Jaidev Patwardhan
|
2006-02-22 04:02:05 +01:00
|
|
|
*/
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
#ifndef __MIPS_FAULTS_HH__
|
|
|
|
#define __MIPS_FAULTS_HH__
|
2006-02-22 04:02:05 +01:00
|
|
|
|
|
|
|
#include "sim/faults.hh"
|
2006-03-12 11:57:34 +01:00
|
|
|
|
|
|
|
namespace MipsISA
|
|
|
|
{
|
2009-07-21 10:08:53 +02:00
|
|
|
|
2006-03-12 11:57:34 +01:00
|
|
|
typedef const Addr FaultVect;
|
2006-02-22 04:02:05 +01:00
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
class MipsFault : public FaultBase
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
2006-03-12 11:57:34 +01:00
|
|
|
protected:
|
|
|
|
virtual bool skipFaultingInstruction() {return false;}
|
|
|
|
virtual bool setRestartAddress() {return true;}
|
2006-02-22 04:02:05 +01:00
|
|
|
public:
|
2009-07-21 10:09:05 +02:00
|
|
|
Addr badVAddr;
|
|
|
|
Addr entryHiAsid;
|
|
|
|
Addr entryHiVPN2;
|
|
|
|
Addr entryHiVPN2X;
|
|
|
|
Addr contextBadVPN2;
|
2006-03-12 11:57:34 +01:00
|
|
|
#if FULL_SYSTEM
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInst::StaticInstPtr inst = StaticInst::nullStaticInstPtr)
|
|
|
|
{}
|
2009-07-21 10:08:53 +02:00
|
|
|
void setExceptionState(ThreadContext *, uint8_t);
|
|
|
|
void setHandlerPC(Addr, ThreadContext *);
|
2006-03-12 11:57:34 +01:00
|
|
|
#endif
|
|
|
|
virtual FaultVect vect() = 0;
|
|
|
|
virtual FaultStat & countStat() = 0;
|
|
|
|
};
|
2006-02-22 04:02:05 +01:00
|
|
|
|
2006-03-12 11:57:34 +01:00
|
|
|
class MachineCheckFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2006-03-12 11:57:34 +01:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2007-11-13 22:58:16 +01:00
|
|
|
bool isMachineCheckFault() {return true;}
|
|
|
|
};
|
|
|
|
|
|
|
|
class NonMaskableInterrupt : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
|
|
|
bool isNonMaskableInterrupt() {return true;}
|
2006-02-22 04:02:05 +01:00
|
|
|
};
|
|
|
|
|
2006-03-12 11:57:34 +01:00
|
|
|
class AlignmentFault : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
2006-03-12 11:57:34 +01:00
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
2006-02-22 04:02:05 +01:00
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2006-03-12 11:57:34 +01:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2007-11-13 22:58:16 +01:00
|
|
|
bool isAlignmentFault() {return true;}
|
|
|
|
};
|
|
|
|
|
|
|
|
class AddressErrorFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
|
|
|
#if FULL_SYSTEM
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
#endif
|
|
|
|
|
2006-03-12 11:57:34 +01:00
|
|
|
};
|
2009-07-21 10:08:53 +02:00
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
class StoreAddressErrorFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
|
|
|
#if FULL_SYSTEM
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
#endif
|
|
|
|
};
|
2009-07-21 10:08:53 +02:00
|
|
|
|
2007-06-23 01:03:42 +02:00
|
|
|
class UnimplementedOpcodeFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2007-06-23 01:03:42 +02:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
|
|
|
};
|
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
|
|
|
|
class TLBRefillIFetchFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
Addr vaddr;
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
};
|
2009-07-21 10:08:53 +02:00
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
class TLBInvalidIFetchFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
Addr vaddr;
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
class NDtbMissFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
|
|
|
};
|
|
|
|
|
|
|
|
class PDtbMissFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
|
|
|
};
|
|
|
|
|
|
|
|
class DtbPageFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
|
|
|
};
|
|
|
|
|
|
|
|
class DtbAcvFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-03-12 11:57:34 +01:00
|
|
|
static inline Fault genMachineCheckFault()
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
2006-03-12 11:57:34 +01:00
|
|
|
return new MachineCheckFault;
|
|
|
|
}
|
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
static inline Fault genAlignmentFault()
|
|
|
|
{
|
|
|
|
return new AlignmentFault;
|
|
|
|
}
|
|
|
|
|
2006-03-12 11:57:34 +01:00
|
|
|
class ResetFault : public MipsFault
|
2007-11-13 22:58:16 +01:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
|
|
|
|
};
|
2009-07-21 10:08:53 +02:00
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
class SystemCallFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2011-09-19 15:09:15 +02:00
|
|
|
#if FULL_SYSTEM
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2011-09-19 15:09:15 +02:00
|
|
|
#endif
|
2007-11-13 22:58:16 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
class SoftResetFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
};
|
2009-07-21 10:08:53 +02:00
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
class DebugSingleStep : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
};
|
2009-07-21 10:08:53 +02:00
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
class DebugInterrupt : public MipsFault
|
2006-03-12 11:57:34 +01:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
2006-02-22 04:02:05 +01:00
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2006-03-12 11:57:34 +01:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2006-03-12 11:57:34 +01:00
|
|
|
};
|
2006-02-22 04:02:05 +01:00
|
|
|
|
2007-06-23 01:03:42 +02:00
|
|
|
class CoprocessorUnusableFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
2007-11-13 22:58:16 +01:00
|
|
|
int coProcID;
|
2007-06-23 01:03:42 +02:00
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2007-06-23 01:03:42 +02:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
CoprocessorUnusableFault(int _procid){ coProcID = _procid;}
|
2007-06-23 01:03:42 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class ReservedInstructionFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2007-06-23 01:03:42 +02:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-06-23 01:03:42 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class ThreadFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2007-06-23 01:03:42 +02:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-06-23 01:03:42 +02:00
|
|
|
};
|
|
|
|
|
2006-03-12 11:57:34 +01:00
|
|
|
class ArithmeticFault : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
2006-03-12 11:57:34 +01:00
|
|
|
protected:
|
|
|
|
bool skipFaultingInstruction() {return true;}
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
2006-02-22 04:02:05 +01:00
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2006-03-12 11:57:34 +01:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
|
|
|
#if FULL_SYSTEM
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2006-03-12 11:57:34 +01:00
|
|
|
#endif
|
|
|
|
};
|
2006-02-22 04:02:05 +01:00
|
|
|
|
2006-03-12 11:57:34 +01:00
|
|
|
class InterruptFault : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
2006-03-12 11:57:34 +01:00
|
|
|
protected:
|
|
|
|
bool setRestartAddress() {return false;}
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
2006-02-22 04:02:05 +01:00
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2006-03-12 11:57:34 +01:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2007-11-13 22:58:16 +01:00
|
|
|
|
|
|
|
#if FULL_SYSTEM
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
#endif
|
2006-03-12 11:57:34 +01:00
|
|
|
};
|
2006-02-22 04:02:05 +01:00
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
class TrapFault : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
2006-03-12 11:57:34 +01:00
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
2006-02-22 04:02:05 +01:00
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2006-03-12 11:57:34 +01:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2007-11-13 22:58:16 +01:00
|
|
|
#if FULL_SYSTEM
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
#endif
|
2006-03-12 11:57:34 +01:00
|
|
|
};
|
2006-02-22 04:02:05 +01:00
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
class BreakpointFault : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
2006-03-12 11:57:34 +01:00
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
2006-02-22 04:02:05 +01:00
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2006-03-12 11:57:34 +01:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2007-11-13 22:58:16 +01:00
|
|
|
#if FULL_SYSTEM
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
#endif
|
2006-03-12 11:57:34 +01:00
|
|
|
};
|
2006-02-22 04:02:05 +01:00
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
class ItbRefillFault : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
2006-03-12 11:57:34 +01:00
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
2006-02-22 04:02:05 +01:00
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2006-03-12 11:57:34 +01:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2007-11-13 22:58:16 +01:00
|
|
|
#if FULL_SYSTEM
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
#endif
|
2006-03-12 11:57:34 +01:00
|
|
|
};
|
2009-07-21 10:08:53 +02:00
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
class DtbRefillFault : public MipsFault
|
2006-03-12 11:57:34 +01:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2006-03-12 11:57:34 +01:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2007-11-13 22:58:16 +01:00
|
|
|
#if FULL_SYSTEM
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
#endif
|
2006-03-12 11:57:34 +01:00
|
|
|
};
|
2006-02-22 04:02:05 +01:00
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
class ItbPageFault : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
2006-03-12 11:57:34 +01:00
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
2006-02-22 04:02:05 +01:00
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2006-03-12 11:57:34 +01:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2007-11-13 22:58:16 +01:00
|
|
|
#if FULL_SYSTEM
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
#endif
|
2006-03-12 11:57:34 +01:00
|
|
|
};
|
2006-02-22 04:02:05 +01:00
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
class ItbInvalidFault : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
2006-03-12 11:57:34 +01:00
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
2006-02-22 04:02:05 +01:00
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2006-03-12 11:57:34 +01:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2007-11-13 22:58:16 +01:00
|
|
|
#if FULL_SYSTEM
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
#endif
|
2006-03-12 11:57:34 +01:00
|
|
|
};
|
2009-07-21 10:08:53 +02:00
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
class TLBModifiedFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
|
|
|
#if FULL_SYSTEM
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
class DtbInvalidFault : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
2006-03-12 11:57:34 +01:00
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
2006-02-22 04:02:05 +01:00
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2006-03-12 11:57:34 +01:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2007-11-13 22:58:16 +01:00
|
|
|
#if FULL_SYSTEM
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInst::StaticInstPtr inst = nullStaticInstPtr);
|
2007-11-13 22:58:16 +01:00
|
|
|
#endif
|
2006-03-12 11:57:34 +01:00
|
|
|
};
|
2006-02-22 04:02:05 +01:00
|
|
|
|
2006-03-12 11:57:34 +01:00
|
|
|
class FloatEnableFault : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
2006-03-12 11:57:34 +01:00
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
2006-02-22 04:02:05 +01:00
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2006-03-12 11:57:34 +01:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
|
|
|
};
|
2006-02-22 04:02:05 +01:00
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
class ItbMissFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
|
|
|
};
|
|
|
|
|
|
|
|
class ItbAcvFault : public MipsFault
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
|
|
|
public:
|
|
|
|
FaultName name() const {return _name;}
|
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
|
|
|
};
|
|
|
|
|
2007-06-23 01:03:42 +02:00
|
|
|
class IntegerOverflowFault : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
2006-03-12 11:57:34 +01:00
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
2006-02-22 04:02:05 +01:00
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2006-03-12 11:57:34 +01:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
|
|
|
};
|
2006-02-22 04:02:05 +01:00
|
|
|
|
2007-06-23 01:03:42 +02:00
|
|
|
class DspStateDisabledFault : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
2006-03-12 11:57:34 +01:00
|
|
|
private:
|
|
|
|
static FaultName _name;
|
|
|
|
static FaultVect _vect;
|
|
|
|
static FaultStat _count;
|
2006-02-22 04:02:05 +01:00
|
|
|
public:
|
2007-07-19 01:09:00 +02:00
|
|
|
FaultName name() const {return _name;}
|
2006-03-12 11:57:34 +01:00
|
|
|
FaultVect vect() {return _vect;}
|
|
|
|
FaultStat & countStat() {return _count;}
|
2010-09-14 04:26:03 +02:00
|
|
|
void invoke(ThreadContext * tc,
|
|
|
|
StaticInstPtr inst = StaticInst::nullStaticInstPtr);
|
2006-03-12 11:57:34 +01:00
|
|
|
};
|
2006-02-22 04:02:05 +01:00
|
|
|
|
2011-01-03 23:35:43 +01:00
|
|
|
} // namespace MipsISA
|
2006-02-22 04:02:05 +01:00
|
|
|
|
2007-11-13 22:58:16 +01:00
|
|
|
#endif // __MIPS_FAULTS_HH__
|