Go to the documentation of this file.
43 #include "arch/x86/generated/decoder.hh"
50 #include "debug/Faults.hh"
70 using namespace X86ISAInst::rom_labels;
73 if (m5reg.mode == LongMode) {
74 entry = extern_label_longModeInterrupt;
77 entry = extern_label_realModeInterrupt;
79 entry = extern_label_legacyModeInterrupt;
85 if (m5reg.mode == LongMode) {
86 entry = extern_label_longModeInterruptWithError;
88 panic(
"Legacy mode interrupts with error codes "
89 "aren't implemented.");
101 std::stringstream
ss;
120 panic(
"Abort exception!");
130 panic(
"Unrecognized/invalid instruction executed:\n %s",
147 if (m5reg.mode == LongMode)
153 const char *modeStr =
"";
163 panic(
"Tried to %s unmapped address %#x.", modeStr,
addr);
165 panic(
"Tried to %s unmapped address %#x.\nPC: %#x, Instr: %s",
176 std::stringstream
ss;
184 DPRINTF(Faults,
"Init interrupt.\n");
203 SegAttr dataAttr = 0;
205 dataAttr.unusable = 0;
206 dataAttr.defaultSize = 0;
207 dataAttr.longMode = 0;
209 dataAttr.granularity = 0;
210 dataAttr.present = 1;
212 dataAttr.writable = 1;
213 dataAttr.readable = 1;
214 dataAttr.expandDown = 0;
225 SegAttr codeAttr = 0;
227 codeAttr.unusable = 0;
228 codeAttr.defaultSize = 0;
229 codeAttr.longMode = 0;
231 codeAttr.granularity = 0;
232 codeAttr.present = 1;
234 codeAttr.writable = 0;
235 codeAttr.readable = 1;
236 codeAttr.expandDown = 0;
256 tslAttr.unusable = 1;
293 MicroPC entry = X86ISAInst::rom_labels::extern_label_initIntHalt;
302 DPRINTF(Faults,
"Startup interrupt with vector %#x.\n",
vector);
304 if (m5Reg.mode != LegacyMode || m5Reg.submode !=
RealMode) {
305 panic(
"Startup IPI recived outside of real mode. "
306 "Don't know what to do. %d, %d", m5Reg.mode, m5Reg.submode);
Addr instAddr() const
Returns the memory address of the instruction this PC points to.
virtual RegVal readMiscReg(RegIndex misc_reg)=0
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
virtual BaseMMU * getMMUPtr()=0
virtual const PCStateBase & pcState() const =0
static RegIndex segEffBase(int index)
static RegIndex segAttr(int index)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
T * get() const
Directly access the pointer itself without taking a reference.
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
void ccprintf(cp::Print &print)
bool fixupFault(Addr vaddr)
Attempt to fix up a fault at vaddr by allocating a page on the stack.
static RegIndex segSel(int index)
static RegIndex segBase(int index)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
void demapPage(Addr vaddr, uint64_t asn)
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
virtual std::string describe() const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
virtual void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr)
virtual Process * getProcessPtr()=0
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
@ IntRegClass
Integer register.
Base class for all X86 static instructions.
virtual const std::string & disassemble(Addr pc, const loader::SymbolTable *symtab=nullptr) const
Return string representation of disassembled instruction.
static constexpr RegId intRegMicro(int index)
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
static MicroPC romMicroPC(MicroPC upc)
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
SymbolTable debugSymbolTable
Global unified debugging symbol table (for target).
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr) override
static RegIndex segLimit(int index)
virtual const char * mnemonic() const
virtual std::string describe() const
void invoke(ThreadContext *tc, const StaticInstPtr &inst=nullStaticInstPtr)
Register ID: describe an architectural register with its class and index.
#define panic(...)
This implements a cprintf based panic() function.
virtual void setReg(const RegId ®, RegVal val)
Generated on Wed Jul 13 2022 10:39:08 for gem5 by doxygen 1.8.17