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) {
128 LocalApicBase lApicBase = 0;
129 lApicBase.base = 0xFEE00000 >> 12;
130 lApicBase.enable = 1;
233 if (toggled.pg && efer.lme) {
268 if (toggled.pae || toggled.pse || toggled.pge) {
279 SegAttr newCSAttr =
val;
280 if (toggled.longMode) {
281 if (newCSAttr.longMode) {
329 if (!efer.lma || !csAttr.longMode)
369 if (dr7.l0 || dr7.g0) {
370 panic(
"Debug register breakpoints not implemented.\n");
376 if (dr7.l1 || dr7.g1) {
377 panic(
"Debug register breakpoints not implemented.\n");
383 if (dr7.l2 || dr7.g2) {
384 panic(
"Debug register breakpoints not implemented.\n");
390 if (dr7.l3 || dr7.g3) {
391 panic(
"Debug register breakpoints not implemented.\n");
396 dr7.rw0 = newDR7.rw0;
397 dr7.len0 = newDR7.len0;
398 dr7.rw1 = newDR7.rw1;
399 dr7.len1 = newDR7.len1;
400 dr7.rw2 = newDR7.rw2;
401 dr7.len2 = newDR7.len2;
402 dr7.rw3 = newDR7.rw3;
403 dr7.len3 = newDR7.len3;
450 X86ISAParams::create()
#define panic(...)
This implements a cprintf based panic() function.
RegVal readMiscReg(int miscReg, ThreadContext *tc)
void serialize(CheckpointOut &cp) const override
Serialize an object.
virtual TheISA::Decoder * getDecoderPtr()=0
virtual BaseTLB * getDTBPtr()=0
const Params * params() const
void updateHandyM5Reg(Efer efer, CR0 cr0, SegAttr csAttr, SegAttr ssAttr, RFLAGS rflags, ThreadContext *tc)
virtual BaseCPU * getCpuPtr()=0
static bool isValidMiscReg(int index)
ThreadContext is the external interface to all thread state for anything outside of the CPU...
void setMiscReg(int miscReg, RegVal val, ThreadContext *tc)
RegVal readMiscRegNoEffect(int miscReg) const
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void setMiscRegNoEffect(int miscReg, RegVal val)
#define SERIALIZE_ARRAY(member, size)
virtual BaseTLB * getITBPtr()=0
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
T insertBits(T val, int first, int last, B bit_val)
Returns val with bits first to last set to the LSBs of bit_val.
#define ULL(N)
uint64_t constant
RegVal regVal[NUM_MISCREGS]
#define UNSERIALIZE_ARRAY(member, size)
std::ostream CheckpointOut
This is exposed globally, independent of the ISA.
const SimObjectParams * _params
Cached copy of the object parameters.
virtual ContextID contextId() const =0
static MiscRegIndex MISCREG_SEG_EFF_BASE(int index)
virtual void startup()
startup() is the final initialization call before simulation.