2006-02-22 04:02:05 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2003-2005 The Regents of The University of Michigan
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* 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-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"
|
|
|
|
#include "arch/isa_traits.hh" //For the Addr type
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
class MipsFault : public FaultBase
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
|
|
|
public:
|
2006-03-08 08:05:38 +01:00
|
|
|
MipsFault(char * newName, int newId, Addr newVect)
|
|
|
|
: FaultBase(newName, newId), vect(newVect)
|
2006-02-22 04:02:05 +01:00
|
|
|
{;}
|
|
|
|
|
|
|
|
Addr vect;
|
|
|
|
};
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
extern class ResetFaultType : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ResetFaultType(char * newName, int newId, Addr newVect)
|
2006-03-08 08:05:38 +01:00
|
|
|
: MipsFault(newName, newId, newVect)
|
2006-02-22 04:02:05 +01:00
|
|
|
{;}
|
|
|
|
} * const ResetFault;
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
extern class ArithmeticFaultType : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ArithmeticFaultType(char * newName, int newId, Addr newVect)
|
2006-03-08 08:05:38 +01:00
|
|
|
: MipsFault(newName, newId, newVect)
|
2006-02-22 04:02:05 +01:00
|
|
|
{;}
|
|
|
|
} * const ArithmeticFault;
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
extern class InterruptFaultType : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
InterruptFaultType(char * newName, int newId, Addr newVect)
|
2006-03-08 08:05:38 +01:00
|
|
|
: MipsFault(newName, newId, newVect)
|
2006-02-22 04:02:05 +01:00
|
|
|
{;}
|
|
|
|
} * const InterruptFault;
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
extern class NDtbMissFaultType : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NDtbMissFaultType(char * newName, int newId, Addr newVect)
|
2006-03-08 08:05:38 +01:00
|
|
|
: MipsFault(newName, newId, newVect)
|
2006-02-22 04:02:05 +01:00
|
|
|
{;}
|
|
|
|
} * const NDtbMissFault;
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
extern class PDtbMissFaultType : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
PDtbMissFaultType(char * newName, int newId, Addr newVect)
|
2006-03-08 08:05:38 +01:00
|
|
|
: MipsFault(newName, newId, newVect)
|
2006-02-22 04:02:05 +01:00
|
|
|
{;}
|
|
|
|
} * const PDtbMissFault;
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
extern class DtbPageFaultType : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
DtbPageFaultType(char * newName, int newId, Addr newVect)
|
2006-03-08 08:05:38 +01:00
|
|
|
: MipsFault(newName, newId, newVect)
|
2006-02-22 04:02:05 +01:00
|
|
|
{;}
|
|
|
|
} * const DtbPageFault;
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
extern class DtbAcvFaultType : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
DtbAcvFaultType(char * newName, int newId, Addr newVect)
|
2006-03-08 08:05:38 +01:00
|
|
|
: MipsFault(newName, newId, newVect)
|
2006-02-22 04:02:05 +01:00
|
|
|
{;}
|
|
|
|
} * const DtbAcvFault;
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
extern class ItbMissFaultType : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ItbMissFaultType(char * newName, int newId, Addr newVect)
|
2006-03-08 08:05:38 +01:00
|
|
|
: MipsFault(newName, newId, newVect)
|
2006-02-22 04:02:05 +01:00
|
|
|
{;}
|
|
|
|
} * const ItbMissFault;
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
extern class ItbPageFaultType : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ItbPageFaultType(char * newName, int newId, Addr newVect)
|
2006-03-08 08:05:38 +01:00
|
|
|
: MipsFault(newName, newId, newVect)
|
2006-02-22 04:02:05 +01:00
|
|
|
{;}
|
|
|
|
} * const ItbPageFault;
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
extern class ItbAcvFaultType : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ItbAcvFaultType(char * newName, int newId, Addr newVect)
|
2006-03-08 08:05:38 +01:00
|
|
|
: MipsFault(newName, newId, newVect)
|
2006-02-22 04:02:05 +01:00
|
|
|
{;}
|
|
|
|
} * const ItbAcvFault;
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
extern class UnimplementedOpcodeFaultType : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
UnimplementedOpcodeFaultType(char * newName, int newId, Addr newVect)
|
2006-03-08 08:05:38 +01:00
|
|
|
: MipsFault(newName, newId, newVect)
|
2006-02-22 04:02:05 +01:00
|
|
|
{;}
|
|
|
|
} * const UnimplementedOpcodeFault;
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
extern class FloatEnableFaultType : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
FloatEnableFaultType(char * newName, int newId, Addr newVect)
|
2006-03-08 08:05:38 +01:00
|
|
|
: MipsFault(newName, newId, newVect)
|
2006-02-22 04:02:05 +01:00
|
|
|
{;}
|
|
|
|
} * const FloatEnableFault;
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
extern class PalFaultType : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
PalFaultType(char * newName, int newId, Addr newVect)
|
2006-03-08 08:05:38 +01:00
|
|
|
: MipsFault(newName, newId, newVect)
|
2006-02-22 04:02:05 +01:00
|
|
|
{;}
|
|
|
|
} * const PalFault;
|
|
|
|
|
2006-03-08 08:05:38 +01:00
|
|
|
extern class IntegerOverflowFaultType : public MipsFault
|
2006-02-22 04:02:05 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
IntegerOverflowFaultType(char * newName, int newId, Addr newVect)
|
2006-03-08 08:05:38 +01:00
|
|
|
: MipsFault(newName, newId, newVect)
|
2006-02-22 04:02:05 +01:00
|
|
|
{;}
|
|
|
|
} * const IntegerOverflowFault;
|
|
|
|
|
|
|
|
extern Fault ** ListOfFaults[];
|
|
|
|
extern int NumFaults;
|
|
|
|
|
|
|
|
#endif // __FAULTS_HH__
|