45 #include "arch/x86/generated/decoder.hh"
49 #include "debug/Faults.hh"
63 DPRINTF(Faults,
"RIP %#x: vector %d: %s\n",
65 using namespace X86ISAInst::RomLabels;
68 if (m5reg.mode == LongMode) {
70 entry = extern_label_longModeSoftInterrupt;
72 entry = extern_label_longModeInterrupt;
75 entry = extern_label_legacyModeInterrupt;
80 if (m5reg.mode == LongMode) {
81 entry = extern_label_longModeInterruptWithError;
83 panic(
"Legacy mode interrupts with error codes "
84 "aren't implementde.\n");
122 panic(
"Abort exception!");
131 panic(
"Unrecognized/invalid instruction executed:\n %s",
150 if (m5reg.mode == LongMode) {
157 const char *modeStr =
"";
164 panic(
"Tried to %s unmapped address %#x.\n", modeStr,
addr);
171 std::stringstream
ss;
179 DPRINTF(Faults,
"Init interrupt.\n");
198 SegAttr dataAttr = 0;
200 dataAttr.unusable = 0;
201 dataAttr.defaultSize = 0;
202 dataAttr.longMode = 0;
204 dataAttr.granularity = 0;
205 dataAttr.present = 1;
207 dataAttr.writable = 1;
208 dataAttr.readable = 1;
209 dataAttr.expandDown = 0;
220 SegAttr codeAttr = 0;
222 codeAttr.unusable = 0;
223 codeAttr.defaultSize = 0;
224 codeAttr.longMode = 0;
226 codeAttr.granularity = 0;
227 codeAttr.present = 1;
229 codeAttr.writable = 0;
230 codeAttr.readable = 1;
231 codeAttr.expandDown = 0;
236 0x00000000ffff0000ULL);
238 0x00000000ffff0000ULL);
288 MicroPC entry = X86ISAInst::RomLabels::extern_label_initIntHalt;
297 DPRINTF(Faults,
"Startup interrupt with vector %#x.\n",
vector);
299 if (m5Reg.mode != LegacyMode || m5Reg.submode !=
RealMode) {
300 panic(
"Startup IPI recived outside of real mode. "
301 "Don't know what to do. %d, %d", m5Reg.mode, m5Reg.submode);
void ccprintf(cp::Print &print)
virtual std::string describe() const
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
virtual MiscReg readMiscRegNoEffect(int misc_reg) const =0
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
virtual void setMiscReg(int misc_reg, const MiscReg &val)=0
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
virtual void setIntReg(int reg_idx, uint64_t val)=0
virtual TheISA::PCState pcState()=0
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
const ExtMachInst machInst
The binary machine instruction.
static MiscRegIndex MISCREG_SEG_ATTR(int index)
static MiscRegIndex MISCREG_SEG_LIMIT(int index)
virtual TheISA::TLB * getDTBPtr()=0
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
static MiscRegIndex MISCREG_SEG_SEL(int index)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
static MicroPC romMicroPC(MicroPC upc)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
virtual MiscReg readMiscReg(int misc_reg)=0
static MiscRegIndex MISCREG_SEG_BASE(int index)
static IntRegIndex INTREG_MICRO(int index)
static MiscRegIndex MISCREG_SEG_EFF_BASE(int index)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
virtual TheISA::TLB * getITBPtr()=0
virtual void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)