38#ifndef __ARCH_X86_FAULTS_HH__
39#define __ARCH_X86_FAULTS_HH__
65 const uint8_t _vector, uint64_t _errorCode=(uint64_t)-1) :
77 virtual std::string
describe()
const;
130 return "unimplemented_micro";
137 panic(
"Unimplemented instruction!");
189 X86Interrupt(
"Non Maskable Interrupt",
"#NMI", 2, _vector)
236 X86Fault(
"Invalid-TSS",
"#TS", 10, _errorCode)
244 X86Fault(
"Segment-Not-Present",
"#NP", 11, _errorCode)
259 X86Fault(
"General-Protection",
"#GP", 13, _errorCode)
278 X86Fault(
"Page-Fault",
"#PF", 14, _errorCode),
addr(_addr)
285 PageFaultErrorCode code = 0;
298 virtual std::string
describe()
const;
305 X86Fault(
"x87 Floating-Point Exception Pending",
"#MF", 16)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
ExternalInterrupt(uint8_t _vector)
GeneralProtection(uint32_t _errorCode)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
InitInterrupt(uint8_t _vector)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
InvalidTSS(uint32_t _errorCode)
NonMaskableInterrupt(uint8_t _vector)
BitUnion32(PageFaultErrorCode) Bitfield< 0 > present
PageFault(Addr _addr, bool present, BaseMMU::Mode mode, bool user, bool reserved)
EndBitUnion(PageFaultErrorCode) Addr addr
PageFault(Addr _addr, uint32_t _errorCode)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr)
virtual std::string describe() const
SegmentNotPresent(uint32_t _errorCode)
StackFault(uint32_t _errorCode)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
StartupInterrupt(uint8_t _vector)
SystemManagementInterrupt()
const char * name() const override
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
virtual uint8_t getVector() const
Get the vector of an interrupt.
virtual const char * mnemonic() const
const char * name() const override
X86FaultBase(const char *_faultName, const char *_mnem, const uint8_t _vector, uint64_t _errorCode=(uint64_t) -1)
virtual std::string describe() const
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
#define panic(...)
This implements a cprintf based panic() function.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const StaticInstPtr nullStaticInstPtr
Statically allocated null StaticInstPtr.