Go to the documentation of this file.
39 #include "params/X86ISA.hh"
50 SegAttr csAttr, SegAttr ssAttr, RFLAGS rflags)
54 m5reg.mode = LongMode;
60 m5reg.mode = LegacyMode;
70 m5reg.cpl = csAttr.dpl;
71 m5reg.paging = cr0.pg;
87 }
else if (csAttr.defaultSize) {
98 }
else if (ssAttr.defaultSize) {
132 LocalApicBase lApicBase = 0;
133 lApicBase.base = 0xFEE00000 >> 12;
134 lApicBase.enable = 1;
143 "CPUID vendor string must be 12 characters\n");
278 if (toggled.pg && efer.lme) {
310 if (toggled.pae || toggled.pse || toggled.pge) {
320 SegAttr newCSAttr =
val;
321 if (toggled.longMode) {
322 if (newCSAttr.longMode) {
368 if (!efer.lma || !csAttr.longMode)
408 if (dr7.l0 || dr7.g0) {
409 panic(
"Debug register breakpoints not implemented.\n");
415 if (dr7.l1 || dr7.g1) {
416 panic(
"Debug register breakpoints not implemented.\n");
422 if (dr7.l2 || dr7.g2) {
423 panic(
"Debug register breakpoints not implemented.\n");
429 if (dr7.l3 || dr7.g3) {
430 panic(
"Debug register breakpoints not implemented.\n");
435 dr7.rw0 = newDR7.rw0;
436 dr7.len0 = newDR7.len0;
437 dr7.rw1 = newDR7.rw1;
438 dr7.len1 = newDR7.len1;
439 dr7.rw2 = newDR7.rw2;
440 dr7.len2 = newDR7.len2;
441 dr7.rw3 = newDR7.rw3;
442 dr7.len3 = newDR7.len3;
virtual RegVal readMiscReg(RegIndex misc_reg)=0
void copyRegsFrom(ThreadContext *src) override
static bool isValidMiscReg(int index)
static void copyMiscRegs(ThreadContext *src, ThreadContext *dest)
virtual BaseMMU * getMMUPtr()=0
virtual const PCStateBase & pcState() const =0
virtual RegVal readCCRegFlat(RegIndex idx) const =0
virtual ContextID contextId() const =0
virtual RegVal readIntRegFlat(RegIndex idx) const =0
Flat register interfaces.
void setMiscReg(int miscReg, RegVal val)
void serialize(CheckpointOut &cp) const override
Serialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
RegVal readMiscRegNoEffect(int miscReg) const
void setThreadContext(ThreadContext *_tc) override
virtual InstDecoder * getDecoderPtr()=0
virtual void setIntRegFlat(RegIndex idx, RegVal val)=0
virtual void setCCRegFlat(RegIndex idx, RegVal val)=0
virtual void setFloatRegFlat(RegIndex idx, RegVal val)=0
virtual void setThreadContext(ThreadContext *_tc)
constexpr T insertBits(T val, unsigned first, unsigned last, B bit_val)
Returns val with bits first to last set to the LSBs of bit_val.
#define SERIALIZE_ARRAY(member, size)
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
RegVal readMiscReg(int miscReg)
std::string getVendorString() const
#define UNSERIALIZE_ARRAY(member, size)
static MiscRegIndex MISCREG_SEG_EFF_BASE(int index)
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
void updateHandyM5Reg(Efer efer, CR0 cr0, SegAttr csAttr, SegAttr ssAttr, RFLAGS rflags)
std::ostream CheckpointOut
virtual BaseCPU * getCpuPtr()=0
void setMiscRegNoEffect(int miscReg, RegVal val)
virtual RegVal readFloatRegFlat(RegIndex idx) const =0
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
RegVal regVal[NUM_MISCREGS]
#define panic(...)
This implements a cprintf based panic() function.
virtual void setMiscRegNoEffect(RegIndex misc_reg, RegVal val)=0
Generated on Wed May 4 2022 12:13:45 for gem5 by doxygen 1.8.17