37 #include "params/X86ISA.hh"
45 SegAttr csAttr, SegAttr ssAttr, RFLAGS rflags,
50 m5reg.mode = LongMode;
56 m5reg.mode = LegacyMode;
66 m5reg.cpl = csAttr.dpl;
67 m5reg.paging = cr0.pg;
83 }
else if (csAttr.defaultSize) {
94 }
else if (ssAttr.defaultSize) {
148 return (fsw & (~(7
ULL << 11))) + (top << 11);
165 val &= (1
ULL << 16) - 1;
170 val &= (1
ULL << 3) - 1;
173 val &= (1
ULL << 8) - 1;
177 val &= (1
ULL << 16) - 1;
180 val &= (1
ULL << 32) - 1;
185 val &= (1
ULL << 16) - 1;
190 val &= (1
ULL << 32) - 1;
210 if (toggled.pg && efer.lme) {
245 if (toggled.pae || toggled.pse || toggled.pge) {
256 SegAttr newCSAttr =
val;
257 if (toggled.longMode) {
258 if (newCSAttr.longMode) {
306 if (!efer.lma || !csAttr.longMode)
346 if (dr7.l0 || dr7.g0) {
347 panic(
"Debug register breakpoints not implemented.\n");
353 if (dr7.l1 || dr7.g1) {
354 panic(
"Debug register breakpoints not implemented.\n");
360 if (dr7.l2 || dr7.g2) {
361 panic(
"Debug register breakpoints not implemented.\n");
367 if (dr7.l3 || dr7.g3) {
368 panic(
"Debug register breakpoints not implemented.\n");
373 dr7.rw0 = newDR7.rw0;
374 dr7.len0 = newDR7.len0;
375 dr7.rw1 = newDR7.rw1;
376 dr7.len1 = newDR7.len1;
377 dr7.rw2 = newDR7.rw2;
378 dr7.len2 = newDR7.len2;
379 dr7.rw3 = newDR7.rw3;
380 dr7.len3 = newDR7.len3;
427 X86ISAParams::create()
MiscReg regVal[NUM_MISCREGS]
void serialize(CheckpointOut &cp) const override
Serialize an object.
virtual TheISA::Decoder * getDecoderPtr()=0
void updateHandyM5Reg(Efer efer, CR0 cr0, SegAttr csAttr, SegAttr ssAttr, RFLAGS rflags, ThreadContext *tc)
virtual BaseCPU * getCpuPtr()=0
static bool isValidMiscReg(int index)
MiscReg readMiscRegNoEffect(int miscReg) const
ThreadContext is the external interface to all thread state for anything outside of the CPU...
const Params * params() const
MiscReg readMiscReg(int miscReg, ThreadContext *tc)
virtual TheISA::TLB * getDTBPtr()=0
void unserialize(CheckpointIn &cp) override
Unserialize an object.
#define SERIALIZE_ARRAY(member, size)
#define ULL(N)
uint64_t constant
#define UNSERIALIZE_ARRAY(member, size)
std::ostream CheckpointOut
void setMiscReg(int miscReg, MiscReg val, ThreadContext *tc)
const SimObjectParams * _params
Cached copy of the object parameters.
static MiscRegIndex MISCREG_SEG_EFF_BASE(int index)
void setMiscRegNoEffect(int miscReg, MiscReg val)
Abstract superclass for simulation objects.
virtual TheISA::TLB * getITBPtr()=0
virtual void startup()
startup() is the final initialization call before simulation.