45 #include "arch/x86/generated/decoder.hh" 50 #include "debug/Faults.hh" 64 DPRINTF(Faults,
"RIP %#x: vector %d: %s\n",
66 using namespace X86ISAInst::RomLabels;
69 if (m5reg.mode == LongMode) {
71 entry = extern_label_longModeSoftInterrupt;
73 entry = extern_label_longModeInterrupt;
76 entry = extern_label_legacyModeInterrupt;
81 if (m5reg.mode == LongMode) {
82 entry = extern_label_longModeInterruptWithError;
84 panic(
"Legacy mode interrupts with error codes " 85 "aren't implementde.\n");
100 std::stringstream
ss;
123 panic(
"Abort exception!");
132 panic(
"Unrecognized/invalid instruction executed:\n %s",
151 if (m5reg.mode == LongMode) {
158 const char *modeStr =
"";
168 panic(
"Tried to %s unmapped address %#x.\n", modeStr,
addr);
170 panic(
"Tried to %s unmapped address %#x.\nPC: %#x, Instr: %s",
180 std::stringstream
ss;
188 DPRINTF(Faults,
"Init interrupt.\n");
207 SegAttr dataAttr = 0;
209 dataAttr.unusable = 0;
210 dataAttr.defaultSize = 0;
211 dataAttr.longMode = 0;
213 dataAttr.granularity = 0;
214 dataAttr.present = 1;
216 dataAttr.writable = 1;
217 dataAttr.readable = 1;
218 dataAttr.expandDown = 0;
229 SegAttr codeAttr = 0;
231 codeAttr.unusable = 0;
232 codeAttr.defaultSize = 0;
233 codeAttr.longMode = 0;
235 codeAttr.granularity = 0;
236 codeAttr.present = 1;
238 codeAttr.writable = 0;
239 codeAttr.readable = 1;
240 codeAttr.expandDown = 0;
245 0x00000000ffff0000ULL);
247 0x00000000ffff0000ULL);
297 MicroPC entry = X86ISAInst::RomLabels::extern_label_initIntHalt;
306 DPRINTF(Faults,
"Startup interrupt with vector %#x.\n",
vector);
308 if (m5Reg.mode != LegacyMode || m5Reg.submode !=
RealMode) {
309 panic(
"Startup IPI recived outside of real mode. " 310 "Don't know what to do. %d, %d", m5Reg.mode, m5Reg.submode);
#define panic(...)
This implements a cprintf based panic() function.
void ccprintf(cp::Print &print)
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
virtual BaseTLB * getDTBPtr()=0
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
virtual TheISA::PCState pcState() const =0
virtual const std::string & disassemble(Addr pc, const SymbolTable *symtab=0) const
Return string representation of disassembled instruction.
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
SymbolTable * debugSymbolTable
Global unified debugging symbol table (for target).
ThreadContext is the external interface to all thread state for anything outside of the CPU...
const ExtMachInst machInst
The binary machine instruction.
static MiscRegIndex MISCREG_SEG_ATTR(int index)
static MiscRegIndex MISCREG_SEG_LIMIT(int index)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
virtual BaseTLB * getITBPtr()=0
virtual void setIntReg(RegIndex reg_idx, RegVal val)=0
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 std::string describe() const
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
virtual std::string describe() const
static MiscRegIndex MISCREG_SEG_BASE(int index)
virtual const char * mnemonic() const
This is exposed globally, independent of the ISA.
static IntRegIndex INTREG_MICRO(int index)
static MiscRegIndex MISCREG_SEG_EFF_BASE(int index)
virtual void demapPage(Addr vaddr, uint64_t asn)=0
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
virtual RegVal readMiscReg(RegIndex misc_reg)=0
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
virtual void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)