40 #ifndef __ARCH_X86_FAULTS_HH__
41 #define __ARCH_X86_FAULTS_HH__
62 const uint8_t _vector, uint64_t _errorCode = (uint64_t)-1)
91 virtual std::string
describe()
const;
108 const uint8_t
vector, uint64_t _errorCode = (uint64_t)-1)
119 const uint8_t
vector, uint64_t _errorCode = (uint64_t)-1)
132 const uint8_t
vector, uint64_t _errorCode = (uint64_t)-1)
145 const uint8_t _vector, uint64_t _errorCode = (uint64_t)-1)
155 return "unimplemented_micro";
161 panic(
"Unimplemented instruction!");
217 X86Interrupt(
"Non Maskable Interrupt",
"#NMI", 2, _vector)
225 X86Trap(
"Breakpoint",
"#BP", 3)
249 X86Fault(
"Invalid-Opcode",
"#UD", 6)
260 X86Fault(
"Device-Not-Available",
"#NM", 7)
268 X86Abort(
"Double-Fault",
"#DF", 8, 0)
276 X86Fault(
"Invalid-TSS",
"#TS", 10, _errorCode)
284 X86Fault(
"Segment-Not-Present",
"#NP", 11, _errorCode)
292 X86Fault(
"Stack",
"#SS", 12, _errorCode)
300 X86Fault(
"General-Protection",
"#GP", 13, _errorCode)
324 X86Fault(
"Page-Fault",
"#PF", 14, 0), addr(_addr)
326 PageFaultErrorCode code = 0;
338 virtual std::string
describe()
const;
345 X86Fault(
"x87 Floating-Point Exception Pending",
"#MF", 16)
353 X86Fault(
"Alignment-Check",
"#AC", 17, 0)
361 X86Abort(
"Machine-Check",
"#MC", 18)
369 X86Fault(
"SIMD Floating-Point",
"#XF", 19)
433 #endif // __ARCH_X86_FAULTS_HH__
PageFault(Addr _addr, bool present, BaseTLB::Mode mode, bool user, bool reserved)
GeneralProtection(uint32_t _errorCode)
X86Abort(const char *name, const char *mnem, const uint8_t vector, uint64_t _errorCode=(uint64_t)-1)
virtual std::string describe() const
SystemManagementInterrupt()
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
InitInterrupt(uint8_t _vector)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
X86Fault(const char *name, const char *mnem, const uint8_t vector, uint64_t _errorCode=(uint64_t)-1)
virtual const char * mnemonic() const
ThreadContext is the external interface to all thread state for anything outside of the CPU...
virtual std::string describe() const
BitUnion32(PageFaultErrorCode) Bitfield< 0 > present
NonMaskableInterrupt(uint8_t _vector)
const char * name() const
InvalidTSS(uint32_t _errorCode)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
X86Interrupt(const char *name, const char *mnem, const uint8_t _vector, uint64_t _errorCode=(uint64_t)-1)
const char * name() const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
X86Trap(const char *name, const char *mnem, const uint8_t vector, uint64_t _errorCode=(uint64_t)-1)
X86FaultBase(const char *_faultName, const char *_mnem, const uint8_t _vector, uint64_t _errorCode=(uint64_t)-1)
SegmentNotPresent(uint32_t _errorCode)
ExternalInterrupt(uint8_t _vector)
SoftwareInterrupt(uint8_t _vector)
StackFault(uint32_t _errorCode)
EndBitUnion(PageFaultErrorCode) Addr addr
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
static StaticInstPtr nullStaticInstPtr
Pointer to a statically allocated "null" instruction object.
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
virtual uint8_t getVector() const
Get the vector of an interrupt.
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
std::shared_ptr< FaultBase > Fault
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
StartupInterrupt(uint8_t _vector)