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;
163 p.FamilyModelSteppingBrandFeatures);
306 if (toggled.pg && efer.lme) {
338 if (toggled.pae || toggled.pse || toggled.pge) {
350 panic_if(rflags.vm,
"Virtual 8086 mode is not supported.");
356 SegAttr newCSAttr =
val;
357 if (toggled.longMode) {
358 if (newCSAttr.longMode) {
404 if (!efer.lma || !csAttr.longMode)
444 if (dr7.l0 || dr7.g0) {
445 panic(
"Debug register breakpoints not implemented.\n");
451 if (dr7.l1 || dr7.g1) {
452 panic(
"Debug register breakpoints not implemented.\n");
458 if (dr7.l2 || dr7.g2) {
459 panic(
"Debug register breakpoints not implemented.\n");
465 if (dr7.l3 || dr7.g3) {
466 panic(
"Debug register breakpoints not implemented.\n");
471 dr7.rw0 = newDR7.rw0;
472 dr7.len0 = newDR7.len0;
473 dr7.rw1 = newDR7.rw1;
474 dr7.len1 = newDR7.len1;
475 dr7.rw2 = newDR7.rw2;
476 dr7.len2 = newDR7.len2;
477 dr7.rw3 = newDR7.rw3;
478 dr7.len3 = newDR7.len3;
void serialize(CheckpointOut &cp) const override
Serialize an object.
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
std::unique_ptr< X86CPUID > cpuid
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 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)
@ FamilyModelSteppingBrandFeatures
constexpr RegClass flatFloatRegClass
static void copyMiscRegs(ThreadContext *src, ThreadContext *dest)
constexpr RegClass flatIntRegClass
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
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[]