40#include "debug/MatRegs.hh"
41#include "params/X86ISA.hh"
52 SegAttr csAttr, SegAttr ssAttr, RFLAGS rflags)
56 m5reg.mode = LongMode;
62 m5reg.mode = LegacyMode;
72 m5reg.cpl = csAttr.dpl;
73 m5reg.paging = cr0.pg;
89 }
else if (csAttr.defaultSize) {
100 }
else if (ssAttr.defaultSize) {
134 LocalApicBase lApicBase = 0;
135 lApicBase.base = 0xFEE00000 >> 12;
136 lApicBase.enable = 1;
157 "CPUID vendor string must be 12 characters\n");
292 if (toggled.pg && efer.lme) {
324 if (toggled.pae || toggled.pse || toggled.pge) {
334 panic_if(rflags.vm,
"Virtual 8086 mode is not supported.");
340 SegAttr newCSAttr =
val;
341 if (toggled.longMode) {
342 if (newCSAttr.longMode) {
388 if (!efer.lma || !csAttr.longMode)
428 if (dr7.l0 || dr7.g0) {
429 panic(
"Debug register breakpoints not implemented.\n");
435 if (dr7.l1 || dr7.g1) {
436 panic(
"Debug register breakpoints not implemented.\n");
442 if (dr7.l2 || dr7.g2) {
443 panic(
"Debug register breakpoints not implemented.\n");
449 if (dr7.l3 || dr7.g3) {
450 panic(
"Debug register breakpoints not implemented.\n");
455 dr7.rw0 = newDR7.rw0;
456 dr7.len0 = newDR7.len0;
457 dr7.rw1 = newDR7.rw1;
458 dr7.len1 = newDR7.len1;
459 dr7.rw2 = newDR7.rw2;
460 dr7.len2 = newDR7.len2;
461 dr7.rw3 = newDR7.rw3;
462 dr7.len3 = newDR7.len3;
virtual void setThreadContext(ThreadContext *_tc)
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual RegVal readMiscReg(RegIndex misc_reg)=0
virtual void setMiscReg(RegIndex misc_reg, RegVal val)=0
virtual RegVal getReg(const RegId ®) const
virtual void setMiscRegNoEffect(RegIndex misc_reg, RegVal val)=0
virtual BaseCPU * getCpuPtr()=0
virtual void setReg(const RegId ®, RegVal val)
virtual InstDecoder * getDecoderPtr()=0
virtual const PCStateBase & pcState() const =0
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
virtual BaseMMU * getMMUPtr()=0
virtual ContextID contextId() const =0
void serialize(CheckpointOut &cp) const override
Serialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
RegVal readMiscReg(RegIndex idx) override
void updateHandyM5Reg(Efer efer, CR0 cr0, SegAttr csAttr, SegAttr ssAttr, RFLAGS rflags)
std::string getVendorString() const
void setMiscReg(RegIndex idx, RegVal val) override
void setThreadContext(ThreadContext *_tc) override
void setMiscRegNoEffect(RegIndex idx, RegVal val) override
RegVal readMiscRegNoEffect(RegIndex idx) const override
void copyRegsFrom(ThreadContext *src) override
RegVal regVal[misc_reg::NumRegs]
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 panic(...)
This implements a cprintf based panic() function.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
#define UNSERIALIZE_ARRAY(member, size)
#define SERIALIZE_ARRAY(member, size)
constexpr RegClass matRegClass
constexpr RegClass vecElemClass
constexpr RegClass vecPredRegClass
constexpr RegClass ccRegClass
constexpr RegClass miscRegClass
constexpr RegClass vecRegClass
static bool isValid(int index)
static RegIndex segEffBase(int index)
constexpr RegClass flatFloatRegClass
static void copyMiscRegs(ThreadContext *src, ThreadContext *dest)
constexpr RegClass flatIntRegClass
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
constexpr char VecPredRegClassName[]
std::ostream CheckpointOut
constexpr char VecRegClassName[]
constexpr char MatRegClassName[]
@ MatRegClass
Matrix Register.
@ VecRegClass
Vector Register.
@ VecElemClass
Vector Register Native Elem lane.
constexpr char VecElemClassName[]