Merge zeep.eecs.umich.edu:/home/gblack/m5/newmem
into zeep.eecs.umich.edu:/home/gblack/m5/newmemmemops src/arch/sparc/faults.hh: Hand merged. --HG-- extra : convert_revision : 1bcefe47fa98e878a0dfbcfa5869b5b171927911
This commit is contained in:
commit
b82fa633bb
2 changed files with 152 additions and 610 deletions
|
@ -49,192 +49,119 @@ using namespace std;
|
||||||
namespace SparcISA
|
namespace SparcISA
|
||||||
{
|
{
|
||||||
|
|
||||||
FaultName InternalProcessorError::_name = "intprocerr";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType InternalProcessorError::_trapType = 0x029;
|
SparcFault<InternalProcessorError>::vals = {"intprocerr", 0x029, 4};
|
||||||
FaultPriority InternalProcessorError::_priority = 4;
|
|
||||||
FaultStat InternalProcessorError::_count;
|
|
||||||
|
|
||||||
FaultName MemAddressNotAligned::_name = "unalign";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType MemAddressNotAligned::_trapType = 0x034;
|
SparcFault<MemAddressNotAligned>::vals = {"unalign", 0x034, 10};
|
||||||
FaultPriority MemAddressNotAligned::_priority = 10;
|
|
||||||
FaultStat MemAddressNotAligned::_count;
|
|
||||||
|
|
||||||
FaultName PowerOnReset::_name = "pow_reset";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType PowerOnReset::_trapType = 0x001;
|
SparcFault<PowerOnReset>::vals = {"pow_reset", 0x001, 0};
|
||||||
FaultPriority PowerOnReset::_priority = 0;
|
|
||||||
FaultStat PowerOnReset::_count;
|
|
||||||
|
|
||||||
FaultName WatchDogReset::_name = "watch_dog_reset";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType WatchDogReset::_trapType = 0x002;
|
SparcFault<WatchDogReset>::vals = {"watch_dog_reset", 0x002, 1};
|
||||||
FaultPriority WatchDogReset::_priority = 1;
|
|
||||||
FaultStat WatchDogReset::_count;
|
|
||||||
|
|
||||||
FaultName ExternallyInitiatedReset::_name = "extern_reset";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType ExternallyInitiatedReset::_trapType = 0x003;
|
SparcFault<ExternallyInitiatedReset>::vals = {"extern_reset", 0x003, 1};
|
||||||
FaultPriority ExternallyInitiatedReset::_priority = 1;
|
|
||||||
FaultStat ExternallyInitiatedReset::_count;
|
|
||||||
|
|
||||||
FaultName SoftwareInitiatedReset::_name = "software_reset";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType SoftwareInitiatedReset::_trapType = 0x004;
|
SparcFault<SoftwareInitiatedReset>::vals = {"software_reset", 0x004, 1};
|
||||||
FaultPriority SoftwareInitiatedReset::_priority = 1;
|
|
||||||
FaultStat SoftwareInitiatedReset::_count;
|
|
||||||
|
|
||||||
FaultName REDStateException::_name = "red_counte";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType REDStateException::_trapType = 0x005;
|
SparcFault<REDStateException>::vals = {"red_counte", 0x005, 1};
|
||||||
FaultPriority REDStateException::_priority = 1;
|
|
||||||
FaultStat REDStateException::_count;
|
|
||||||
|
|
||||||
FaultName InstructionAccessException::_name = "inst_access";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType InstructionAccessException::_trapType = 0x008;
|
SparcFault<InstructionAccessException>::vals = {"inst_access", 0x008, 5};
|
||||||
FaultPriority InstructionAccessException::_priority = 5;
|
|
||||||
FaultStat InstructionAccessException::_count;
|
|
||||||
|
|
||||||
FaultName InstructionAccessMMUMiss::_name = "inst_mmu";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType InstructionAccessMMUMiss::_trapType = 0x009;
|
SparcFault<InstructionAccessMMUMiss>::vals = {"inst_mmu", 0x009, 2};
|
||||||
FaultPriority InstructionAccessMMUMiss::_priority = 2;
|
|
||||||
FaultStat InstructionAccessMMUMiss::_count;
|
|
||||||
|
|
||||||
FaultName InstructionAccessError::_name = "inst_error";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType InstructionAccessError::_trapType = 0x00A;
|
SparcFault<InstructionAccessError>::vals = {"inst_error", 0x00A, 3};
|
||||||
FaultPriority InstructionAccessError::_priority = 3;
|
|
||||||
FaultStat InstructionAccessError::_count;
|
|
||||||
|
|
||||||
FaultName IllegalInstruction::_name = "illegal_inst";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType IllegalInstruction::_trapType = 0x010;
|
SparcFault<IllegalInstruction>::vals = {"illegal_inst", 0x010, 7};
|
||||||
FaultPriority IllegalInstruction::_priority = 7;
|
|
||||||
FaultStat IllegalInstruction::_count;
|
|
||||||
|
|
||||||
FaultName PrivilegedOpcode::_name = "priv_opcode";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType PrivilegedOpcode::_trapType = 0x011;
|
SparcFault<PrivilegedOpcode>::vals = {"priv_opcode", 0x011, 6};
|
||||||
FaultPriority PrivilegedOpcode::_priority = 6;
|
|
||||||
FaultStat PrivilegedOpcode::_count;
|
|
||||||
|
|
||||||
FaultName UnimplementedLDD::_name = "unimp_ldd";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType UnimplementedLDD::_trapType = 0x012;
|
SparcFault<UnimplementedLDD>::vals = {"unimp_ldd", 0x012, 6};
|
||||||
FaultPriority UnimplementedLDD::_priority = 6;
|
|
||||||
FaultStat UnimplementedLDD::_count;
|
|
||||||
|
|
||||||
FaultName UnimplementedSTD::_name = "unimp_std";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType UnimplementedSTD::_trapType = 0x013;
|
SparcFault<UnimplementedSTD>::vals = {"unimp_std", 0x013, 6};
|
||||||
FaultPriority UnimplementedSTD::_priority = 6;
|
|
||||||
FaultStat UnimplementedSTD::_count;
|
|
||||||
|
|
||||||
FaultName FpDisabled::_name = "fp_disabled";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType FpDisabled::_trapType = 0x020;
|
SparcFault<FpDisabled>::vals = {"fp_disabled", 0x020, 8};
|
||||||
FaultPriority FpDisabled::_priority = 8;
|
|
||||||
FaultStat FpDisabled::_count;
|
|
||||||
|
|
||||||
FaultName FpExceptionIEEE754::_name = "fp_754";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType FpExceptionIEEE754::_trapType = 0x021;
|
SparcFault<FpExceptionIEEE754>::vals = {"fp_754", 0x021, 11};
|
||||||
FaultPriority FpExceptionIEEE754::_priority = 11;
|
|
||||||
FaultStat FpExceptionIEEE754::_count;
|
|
||||||
|
|
||||||
FaultName FpExceptionOther::_name = "fp_other";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType FpExceptionOther::_trapType = 0x022;
|
SparcFault<FpExceptionOther>::vals = {"fp_other", 0x022, 11};
|
||||||
FaultPriority FpExceptionOther::_priority = 11;
|
|
||||||
FaultStat FpExceptionOther::_count;
|
|
||||||
|
|
||||||
FaultName TagOverflow::_name = "tag_overflow";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType TagOverflow::_trapType = 0x023;
|
SparcFault<TagOverflow>::vals = {"tag_overflow", 0x023, 14};
|
||||||
FaultPriority TagOverflow::_priority = 14;
|
|
||||||
FaultStat TagOverflow::_count;
|
|
||||||
|
|
||||||
FaultName DivisionByZero::_name = "div_by_zero";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType DivisionByZero::_trapType = 0x028;
|
SparcFault<DivisionByZero>::vals = {"div_by_zero", 0x028, 15};
|
||||||
FaultPriority DivisionByZero::_priority = 15;
|
|
||||||
FaultStat DivisionByZero::_count;
|
|
||||||
|
|
||||||
FaultName DataAccessException::_name = "data_access";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType DataAccessException::_trapType = 0x030;
|
SparcFault<DataAccessException>::vals = {"data_access", 0x030, 12};
|
||||||
FaultPriority DataAccessException::_priority = 12;
|
|
||||||
FaultStat DataAccessException::_count;
|
|
||||||
|
|
||||||
FaultName DataAccessMMUMiss::_name = "data_mmu";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType DataAccessMMUMiss::_trapType = 0x031;
|
SparcFault<DataAccessMMUMiss>::vals = {"data_mmu", 0x031, 12};
|
||||||
FaultPriority DataAccessMMUMiss::_priority = 12;
|
|
||||||
FaultStat DataAccessMMUMiss::_count;
|
|
||||||
|
|
||||||
FaultName DataAccessError::_name = "data_error";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType DataAccessError::_trapType = 0x032;
|
SparcFault<DataAccessError>::vals = {"data_error", 0x032, 12};
|
||||||
FaultPriority DataAccessError::_priority = 12;
|
|
||||||
FaultStat DataAccessError::_count;
|
|
||||||
|
|
||||||
FaultName DataAccessProtection::_name = "data_protection";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType DataAccessProtection::_trapType = 0x033;
|
SparcFault<DataAccessProtection>::vals = {"data_protection", 0x033, 12};
|
||||||
FaultPriority DataAccessProtection::_priority = 12;
|
|
||||||
FaultStat DataAccessProtection::_count;
|
|
||||||
|
|
||||||
FaultName LDDFMemAddressNotAligned::_name = "unalign_lddf";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType LDDFMemAddressNotAligned::_trapType = 0x035;
|
SparcFault<LDDFMemAddressNotAligned>::vals = {"unalign_lddf", 0x035, 10};
|
||||||
FaultPriority LDDFMemAddressNotAligned::_priority = 10;
|
|
||||||
FaultStat LDDFMemAddressNotAligned::_count;
|
|
||||||
|
|
||||||
FaultName STDFMemAddressNotAligned::_name = "unalign_stdf";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType STDFMemAddressNotAligned::_trapType = 0x036;
|
SparcFault<STDFMemAddressNotAligned>::vals = {"unalign_stdf", 0x036, 10};
|
||||||
FaultPriority STDFMemAddressNotAligned::_priority = 10;
|
|
||||||
FaultStat STDFMemAddressNotAligned::_count;
|
|
||||||
|
|
||||||
FaultName PrivilegedAction::_name = "priv_action";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType PrivilegedAction::_trapType = 0x037;
|
SparcFault<PrivilegedAction>::vals = {"priv_action", 0x037, 11};
|
||||||
FaultPriority PrivilegedAction::_priority = 11;
|
|
||||||
FaultStat PrivilegedAction::_count;
|
|
||||||
|
|
||||||
FaultName LDQFMemAddressNotAligned::_name = "unalign_ldqf";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType LDQFMemAddressNotAligned::_trapType = 0x038;
|
SparcFault<LDQFMemAddressNotAligned>::vals = {"unalign_ldqf", 0x038, 10};
|
||||||
FaultPriority LDQFMemAddressNotAligned::_priority = 10;
|
|
||||||
FaultStat LDQFMemAddressNotAligned::_count;
|
|
||||||
|
|
||||||
FaultName STQFMemAddressNotAligned::_name = "unalign_stqf";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType STQFMemAddressNotAligned::_trapType = 0x039;
|
SparcFault<STQFMemAddressNotAligned>::vals = {"unalign_stqf", 0x039, 10};
|
||||||
FaultPriority STQFMemAddressNotAligned::_priority = 10;
|
|
||||||
FaultStat STQFMemAddressNotAligned::_count;
|
|
||||||
|
|
||||||
FaultName AsyncDataError::_name = "async_data";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType AsyncDataError::_trapType = 0x040;
|
SparcFault<AsyncDataError>::vals = {"async_data", 0x040, 2};
|
||||||
FaultPriority AsyncDataError::_priority = 2;
|
|
||||||
FaultStat AsyncDataError::_count;
|
|
||||||
|
|
||||||
FaultName CleanWindow::_name = "clean_win";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType CleanWindow::_trapType = 0x024;
|
SparcFault<CleanWindow>::vals = {"clean_win", 0x024, 10};
|
||||||
FaultPriority CleanWindow::_priority = 10;
|
|
||||||
FaultStat CleanWindow::_count;
|
|
||||||
|
|
||||||
//The enumerated faults
|
//The enumerated faults
|
||||||
|
|
||||||
FaultName InterruptLevelN::_name = "interrupt_n";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType InterruptLevelN::_baseTrapType = 0x041;
|
SparcFault<InterruptLevelN>::vals = {"interrupt_n", 0x041, 0};
|
||||||
FaultStat InterruptLevelN::_count;
|
|
||||||
|
|
||||||
FaultName SpillNNormal::_name = "spill_n_normal";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType SpillNNormal::_baseTrapType = 0x080;
|
SparcFault<SpillNNormal>::vals = {"spill_n_normal", 0x080, 9};
|
||||||
FaultPriority SpillNNormal::_priority = 9;
|
|
||||||
FaultStat SpillNNormal::_count;
|
|
||||||
|
|
||||||
FaultName SpillNOther::_name = "spill_n_other";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType SpillNOther::_baseTrapType = 0x0A0;
|
SparcFault<SpillNOther>::vals = {"spill_n_other", 0x0A0, 9};
|
||||||
FaultPriority SpillNOther::_priority = 9;
|
|
||||||
FaultStat SpillNOther::_count;
|
|
||||||
|
|
||||||
FaultName FillNNormal::_name = "fill_n_normal";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType FillNNormal::_baseTrapType = 0x0C0;
|
SparcFault<FillNNormal>::vals = {"fill_n_normal", 0x0C0, 9};
|
||||||
FaultPriority FillNNormal::_priority = 9;
|
|
||||||
FaultStat FillNNormal::_count;
|
|
||||||
|
|
||||||
FaultName FillNOther::_name = "fill_n_other";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType FillNOther::_baseTrapType = 0x0E0;
|
SparcFault<FillNOther>::vals = {"fill_n_other", 0x0E0, 9};
|
||||||
FaultPriority FillNOther::_priority = 9;
|
|
||||||
FaultStat FillNOther::_count;
|
|
||||||
|
|
||||||
FaultName TrapInstruction::_name = "trap_inst_n";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType TrapInstruction::_baseTrapType = 0x100;
|
SparcFault<TrapInstruction>::vals = {"trap_inst_n", 0x100, 16};
|
||||||
FaultPriority TrapInstruction::_priority = 16;
|
|
||||||
FaultStat TrapInstruction::_count;
|
|
||||||
|
|
||||||
#if !FULL_SYSTEM
|
#if !FULL_SYSTEM
|
||||||
FaultName PageTableFault::_name = "page_table_fault";
|
template<> SparcFaultBase::FaultVals
|
||||||
TrapType PageTableFault::_trapType = 0x0000;
|
SparcFault<PageTableFault>::vals = {"page_table_fault", 0x0000, 0};
|
||||||
FaultPriority PageTableFault::_priority = 0;
|
|
||||||
FaultStat PageTableFault::_count;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -354,7 +281,7 @@ void doNormalFault(ThreadContext *tc, TrapType tt)
|
||||||
|
|
||||||
#if FULL_SYSTEM
|
#if FULL_SYSTEM
|
||||||
|
|
||||||
void SparcFault::invoke(ThreadContext * tc)
|
void SparcFaultBase::invoke(ThreadContext * tc)
|
||||||
{
|
{
|
||||||
FaultBase::invoke(tc);
|
FaultBase::invoke(tc);
|
||||||
countStat()++;
|
countStat()++;
|
||||||
|
|
|
@ -42,63 +42,58 @@ namespace SparcISA
|
||||||
typedef uint32_t TrapType;
|
typedef uint32_t TrapType;
|
||||||
typedef uint32_t FaultPriority;
|
typedef uint32_t FaultPriority;
|
||||||
|
|
||||||
class SparcFault : public FaultBase
|
class SparcFaultBase : public FaultBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
struct FaultVals
|
||||||
|
{
|
||||||
|
const FaultName name;
|
||||||
|
const TrapType trapType;
|
||||||
|
const FaultPriority priority;
|
||||||
|
FaultStat count;
|
||||||
|
};
|
||||||
#if FULL_SYSTEM
|
#if FULL_SYSTEM
|
||||||
void invoke(ThreadContext * tc);
|
void invoke(ThreadContext * tc);
|
||||||
#endif
|
#endif
|
||||||
|
virtual FaultName name() = 0;
|
||||||
virtual TrapType trapType() = 0;
|
virtual TrapType trapType() = 0;
|
||||||
virtual FaultPriority priority() = 0;
|
virtual FaultPriority priority() = 0;
|
||||||
virtual FaultStat & countStat() = 0;
|
virtual FaultStat & countStat() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class InternalProcessorError : public SparcFault
|
template<typename T>
|
||||||
|
class SparcFault : public SparcFaultBase
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
static FaultVals vals;
|
||||||
|
public:
|
||||||
|
FaultName name() {return vals.name;}
|
||||||
|
TrapType trapType() {return vals.trapType;}
|
||||||
|
FaultPriority priority() {return vals.priority;}
|
||||||
|
FaultStat & countStat() {return vals.count;}
|
||||||
|
};
|
||||||
|
|
||||||
|
class InternalProcessorError :
|
||||||
|
public SparcFault<InternalProcessorError>
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
public:
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
bool isMachineCheckFault() {return true;}
|
bool isMachineCheckFault() {return true;}
|
||||||
};
|
};
|
||||||
|
|
||||||
class MemAddressNotAligned : public SparcFault
|
class MemAddressNotAligned :
|
||||||
|
public SparcFault<MemAddressNotAligned>
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
public:
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
bool isAlignmentFault() {return true;}
|
bool isAlignmentFault() {return true;}
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !FULL_SYSTEM
|
#if !FULL_SYSTEM
|
||||||
class PageTableFault : public SparcFault
|
class PageTableFault : public SparcFault<PageTableFault>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
Addr vaddr;
|
Addr vaddr;
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
public:
|
||||||
PageTableFault(Addr va)
|
PageTableFault(Addr va) : vaddr(va) {}
|
||||||
: vaddr(va) {}
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
void invoke(ThreadContext * tc);
|
void invoke(ThreadContext * tc);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,504 +113,124 @@ static inline Fault genAlignmentFault()
|
||||||
return new MemAddressNotAligned;
|
return new MemAddressNotAligned;
|
||||||
}
|
}
|
||||||
|
|
||||||
class PowerOnReset : public SparcFault
|
class PowerOnReset : public SparcFault<PowerOnReset>
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
void invoke(ThreadContext * tc);
|
void invoke(ThreadContext * tc);
|
||||||
};
|
};
|
||||||
|
|
||||||
class WatchDogReset : public SparcFault
|
class WatchDogReset : public SparcFault<WatchDogReset> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class ExternallyInitiatedReset : public SparcFault
|
class ExternallyInitiatedReset : public SparcFault<ExternallyInitiatedReset> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class SoftwareInitiatedReset : public SparcFault
|
class SoftwareInitiatedReset : public SparcFault<SoftwareInitiatedReset> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class REDStateException : public SparcFault
|
class REDStateException : public SparcFault<REDStateException> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class InstructionAccessException : public SparcFault
|
class InstructionAccessException : public SparcFault<InstructionAccessException> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class InstructionAccessMMUMiss : public SparcFault
|
class InstructionAccessMMUMiss : public SparcFault<InstructionAccessMMUMiss> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class InstructionAccessError : public SparcFault
|
class InstructionAccessError : public SparcFault<InstructionAccessError> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class IllegalInstruction : public SparcFault
|
class IllegalInstruction : public SparcFault<IllegalInstruction> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class PrivilegedOpcode : public SparcFault
|
class PrivilegedOpcode : public SparcFault<PrivilegedOpcode> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class UnimplementedLDD : public SparcFault
|
class UnimplementedLDD : public SparcFault<UnimplementedLDD> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class UnimplementedSTD : public SparcFault
|
class UnimplementedSTD : public SparcFault<UnimplementedSTD> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class FpDisabled : public SparcFault
|
class FpDisabled : public SparcFault<FpDisabled> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class FpExceptionIEEE754 : public SparcFault
|
class FpExceptionIEEE754 : public SparcFault<FpExceptionIEEE754> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class FpExceptionOther : public SparcFault
|
class FpExceptionOther : public SparcFault<FpExceptionOther> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class TagOverflow : public SparcFault
|
class TagOverflow : public SparcFault<TagOverflow> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class DivisionByZero : public SparcFault
|
class DivisionByZero : public SparcFault<DivisionByZero> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class DataAccessException : public SparcFault
|
class DataAccessException : public SparcFault<DataAccessException> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class DataAccessMMUMiss : public SparcFault
|
class DataAccessMMUMiss : public SparcFault<DataAccessMMUMiss> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class DataAccessError : public SparcFault
|
class DataAccessError : public SparcFault<DataAccessError> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class DataAccessProtection : public SparcFault
|
class DataAccessProtection : public SparcFault<DataAccessProtection> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class LDDFMemAddressNotAligned : public SparcFault
|
class LDDFMemAddressNotAligned : public SparcFault<LDDFMemAddressNotAligned> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class STDFMemAddressNotAligned : public SparcFault
|
class STDFMemAddressNotAligned : public SparcFault<STDFMemAddressNotAligned> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class PrivilegedAction : public SparcFault
|
class PrivilegedAction : public SparcFault<PrivilegedAction> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class LDQFMemAddressNotAligned : public SparcFault
|
class LDQFMemAddressNotAligned : public SparcFault<LDQFMemAddressNotAligned> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class STQFMemAddressNotAligned : public SparcFault
|
class STQFMemAddressNotAligned : public SparcFault<STQFMemAddressNotAligned> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class AsyncDataError : public SparcFault
|
class AsyncDataError : public SparcFault<AsyncDataError> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class CleanWindow : public SparcFault
|
class CleanWindow : public SparcFault<CleanWindow> {};
|
||||||
{
|
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _trapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
public:
|
|
||||||
FaultName name() {return _name;}
|
|
||||||
TrapType trapType() {return _trapType;}
|
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class EnumeratedFault : public SparcFault
|
template <class T>
|
||||||
|
class EnumeratedFault : public SparcFault<T>
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
uint32_t _n;
|
uint32_t _n;
|
||||||
virtual TrapType baseTrapType() = 0;
|
|
||||||
public:
|
public:
|
||||||
EnumeratedFault(uint32_t n) : SparcFault() {_n = n;}
|
EnumeratedFault(uint32_t n) : SparcFault<T>(), _n(n) {}
|
||||||
TrapType trapType() {return baseTrapType() + _n;}
|
TrapType trapType() {return SparcFault<T>::trapType() + _n;}
|
||||||
};
|
};
|
||||||
|
|
||||||
class InterruptLevelN : public EnumeratedFault
|
class InterruptLevelN : public EnumeratedFault<InterruptLevelN>
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _baseTrapType;
|
|
||||||
static FaultStat _count;
|
|
||||||
TrapType baseTrapType() {return _baseTrapType;}
|
|
||||||
public:
|
public:
|
||||||
InterruptLevelN(uint32_t n) : EnumeratedFault(n) {;}
|
InterruptLevelN(uint32_t n) :
|
||||||
FaultName name() {return _name;}
|
EnumeratedFault<InterruptLevelN>(n) {;}
|
||||||
FaultPriority priority() {return 32 - _n;}
|
FaultPriority priority() {return 32 - _n;}
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class SpillNNormal : public EnumeratedFault
|
class SpillNNormal : public EnumeratedFault<SpillNNormal>
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _baseTrapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
TrapType baseTrapType() {return _baseTrapType;}
|
|
||||||
public:
|
public:
|
||||||
SpillNNormal(uint32_t n) : EnumeratedFault(n) {;}
|
SpillNNormal(uint32_t n) :
|
||||||
FaultName name() {return _name;}
|
EnumeratedFault<SpillNNormal>(n) {;}
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
//These need to be handled specially to enable spill traps in SE
|
//These need to be handled specially to enable spill traps in SE
|
||||||
#if !FULL_SYSTEM
|
#if !FULL_SYSTEM
|
||||||
void invoke(ThreadContext * tc);
|
void invoke(ThreadContext * tc);
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
class SpillNOther : public EnumeratedFault
|
class SpillNOther : public EnumeratedFault<SpillNOther>
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _baseTrapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
TrapType baseTrapType() {return _baseTrapType;}
|
|
||||||
public:
|
public:
|
||||||
SpillNOther(uint32_t n) : EnumeratedFault(n) {;}
|
SpillNOther(uint32_t n) :
|
||||||
FaultName name() {return _name;}
|
EnumeratedFault<SpillNOther>(n) {;}
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class FillNNormal : public EnumeratedFault
|
class FillNNormal : public EnumeratedFault<FillNNormal>
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _baseTrapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
TrapType baseTrapType() {return _baseTrapType;}
|
|
||||||
public:
|
public:
|
||||||
FillNNormal(uint32_t n) : EnumeratedFault(n) {;}
|
FillNNormal(uint32_t n) :
|
||||||
FaultName name() {return _name;}
|
EnumeratedFault<FillNNormal>(n) {;}
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
//These need to be handled specially to enable fill traps in SE
|
//These need to be handled specially to enable fill traps in SE
|
||||||
#if !FULL_SYSTEM
|
#if !FULL_SYSTEM
|
||||||
void invoke(ThreadContext * tc);
|
void invoke(ThreadContext * tc);
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
class FillNOther : public EnumeratedFault
|
class FillNOther : public EnumeratedFault<FillNOther>
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _baseTrapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
TrapType baseTrapType() {return _baseTrapType;}
|
|
||||||
public:
|
public:
|
||||||
FillNOther(uint32_t n) : EnumeratedFault(n) {;}
|
FillNOther(uint32_t n) :
|
||||||
FaultName name() {return _name;}
|
EnumeratedFault<FillNOther>(n) {;}
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class TrapInstruction : public EnumeratedFault
|
class TrapInstruction : public EnumeratedFault<TrapInstruction>
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
static FaultName _name;
|
|
||||||
static TrapType _baseTrapType;
|
|
||||||
static FaultPriority _priority;
|
|
||||||
static FaultStat _count;
|
|
||||||
TrapType baseTrapType() {return _baseTrapType;}
|
|
||||||
public:
|
public:
|
||||||
TrapInstruction(int32_t n) : EnumeratedFault(n) {;}
|
TrapInstruction(uint32_t n, uint64_t syscall) :
|
||||||
FaultName name() {return _name;}
|
EnumeratedFault<TrapInstruction>(n), syscall_num(syscall) {;}
|
||||||
FaultPriority priority() {return _priority;}
|
|
||||||
FaultStat & countStat() {return _count;}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue