43 #include "arch/x86/generated/decoder.hh" 48 #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 =
"";
167 panic(
"Tried to %s unmapped address %#x.\n", modeStr,
addr);
169 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 const std::string & disassemble(Addr pc, const Loader::SymbolTable *symtab=nullptr) const
Return string representation of disassembled instruction.
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
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
virtual Process * getProcessPtr()=0
void invoke(ThreadContext *tc, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr)
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
bool fixupFault(Addr vaddr)
Attempt to fix up a fault at vaddr by allocating a page on the stack.
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
SymbolTable * debugSymbolTable
Global unified debugging symbol table (for target).
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)