protected:
const char * faultName;
const char * mnem;
+ uint8_t vector;
uint64_t errorCode;
X86FaultBase(const char * _faultName, const char * _mnem,
- uint64_t _errorCode = 0) :
- faultName(_faultName), mnem(_mnem), errorCode(_errorCode)
+ const uint8_t _vector, uint64_t _errorCode = 0) :
+ faultName(_faultName), mnem(_mnem),
+ vector(_vector), errorCode(_errorCode)
{
}
{
protected:
X86Fault(const char * name, const char * mnem,
- uint64_t _errorCode = 0) :
- X86FaultBase(name, mnem, _errorCode)
+ const uint8_t vector, uint64_t _errorCode = 0) :
+ X86FaultBase(name, mnem, vector, _errorCode)
{}
};
{
protected:
X86Trap(const char * name, const char * mnem,
- uint64_t _errorCode = 0) :
- X86FaultBase(name, mnem, _errorCode)
+ const uint8_t vector, uint64_t _errorCode = 0) :
+ X86FaultBase(name, mnem, vector, _errorCode)
{}
#if FULL_SYSTEM
{
protected:
X86Abort(const char * name, const char * mnem,
- uint64_t _errorCode = 0) :
- X86FaultBase(name, mnem, _errorCode)
+ const uint8_t vector, uint64_t _errorCode = 0) :
+ X86FaultBase(name, mnem, vector, _errorCode)
{}
#if FULL_SYSTEM
class X86Interrupt : public X86FaultBase
{
protected:
- uint8_t vector;
- X86Interrupt(const char * name, const char * mnem, uint8_t _vector,
- uint64_t _errorCode = 0) :
- X86FaultBase(name, mnem, _errorCode), vector(_vector)
+ X86Interrupt(const char * name, const char * mnem,
+ const uint8_t _vector, uint64_t _errorCode = 0) :
+ X86FaultBase(name, mnem, _vector, _errorCode)
{}
#if FULL_SYSTEM
{
public:
DivideByZero() :
- X86Fault("Divide-by-Zero-Error", "#DE")
+ X86Fault("Divide-by-Zero-Error", "#DE", 0)
{}
};
{
public:
DebugException() :
- X86FaultBase("Debug", "#DB")
+ X86FaultBase("Debug", "#DB", 1)
{}
};
{
public:
NonMaskableInterrupt(uint8_t _vector) :
- X86Interrupt("Non Maskable Interrupt", "#NMI", _vector)
+ X86Interrupt("Non Maskable Interrupt", "#NMI", 2, _vector)
{}
};
{
public:
Breakpoint() :
- X86Trap("Breakpoint", "#BP")
+ X86Trap("Breakpoint", "#BP", 3)
{}
};
{
public:
OverflowTrap() :
- X86Trap("Overflow", "#OF")
+ X86Trap("Overflow", "#OF", 4)
{}
};
{
public:
BoundRange() :
- X86Fault("Bound-Range", "#BR")
+ X86Fault("Bound-Range", "#BR", 5)
{}
};
{
public:
InvalidOpcode() :
- X86Fault("Invalid-Opcode", "#UD")
+ X86Fault("Invalid-Opcode", "#UD", 6)
{}
};
{
public:
DeviceNotAvailable() :
- X86Fault("Device-Not-Available", "#NM")
+ X86Fault("Device-Not-Available", "#NM", 7)
{}
};
{
public:
DoubleFault() :
- X86Abort("Double-Fault", "#DF")
+ X86Abort("Double-Fault", "#DF", 8)
{}
};
{
public:
InvalidTSS() :
- X86Fault("Invalid-TSS", "#TS")
+ X86Fault("Invalid-TSS", "#TS", 10)
{}
};
{
public:
SegmentNotPresent() :
- X86Fault("Segment-Not-Present", "#NP")
+ X86Fault("Segment-Not-Present", "#NP", 11)
{}
};
{
public:
StackFault() :
- X86Fault("Stack", "#SS")
+ X86Fault("Stack", "#SS", 12)
{}
};
{
public:
GeneralProtection(uint64_t _errorCode) :
- X86Fault("General-Protection", "#GP", _errorCode)
+ X86Fault("General-Protection", "#GP", 13, _errorCode)
{}
};
{
public:
PageFault() :
- X86Fault("Page-Fault", "#PF")
+ X86Fault("Page-Fault", "#PF", 14)
{}
};
{
public:
X87FpExceptionPending() :
- X86Fault("x87 Floating-Point Exception Pending", "#MF")
+ X86Fault("x87 Floating-Point Exception Pending", "#MF", 16)
{}
};
{
public:
AlignmentCheck() :
- X86Fault("Alignment-Check", "#AC")
+ X86Fault("Alignment-Check", "#AC", 17)
{}
};
{
public:
MachineCheck() :
- X86Abort("Machine-Check", "#MC")
+ X86Abort("Machine-Check", "#MC", 18)
{}
};
{
public:
SIMDFloatingPointFault() :
- X86Fault("SIMD Floating-Point", "#XF")
+ X86Fault("SIMD Floating-Point", "#XF", 19)
{}
};
{
public:
SecurityException() :
- X86FaultBase("Security Exception", "#SX")
+ X86FaultBase("Security Exception", "#SX", 30)
{}
};
Addr vaddr;
public:
FakeITLBFault(Addr _vaddr) :
- X86Fault("fake instruction tlb fault", "itlb"),
+ X86Fault("fake instruction tlb fault", "itlb", 0),
vaddr(_vaddr)
{}
Addr vaddr;
public:
FakeDTLBFault(Addr _vaddr) :
- X86Fault("fake data tlb fault", "dtlb"),
+ X86Fault("fake data tlb fault", "dtlb", 0),
vaddr(_vaddr)
{}