42 #include "debug/Timer.hh"
43 #include "params/SparcISA.hh"
239 for (
int y = 1; y < 8; y++) {
248 for (
int y = 16; y < 32; y++) {
329 memset(
tpc, 0,
sizeof(
tpc));
332 memset(
tt, 0,
sizeof(
tt));
372 panic(
"Tick comparison event active when clearing the ISA object.\n");
397 return (uint64_t)
hpstate.hpriv |
399 (uint64_t)
pstate.priv << 2 |
400 (uint64_t)
pstate.am << 3 |
403 bits((uint64_t)
tl,2,0) << 16 |
422 panic(
"PCR not implemented\n");
424 panic(
"PIC not implemented\n");
446 panic(
"Priviliged access to tick registers not implemented\n");
532 panic(
"Miscellaneous register %d not implemented\n", idx);
548 DPRINTF(Timer,
"Instruction Count when TICK read: %#X stick=%#X\n",
557 panic(
"Performance Instrumentation not impl\n");
560 panic(
"Can read from softint clr/set\n");
604 panic(
"PCR not implemented\n");
606 panic(
"PIC not implemented\n");
637 panic(
"Priviliged access to tick regesiters not implemented\n");
696 DPRINTF(MiscRegs,
"FSR written with: %#x\n",
fsr);
761 panic(
"Miscellaneous register %d not implemented\n", idx);
883 Tick tick_cmp = 0, stick_cmp = 0, hstick_cmp = 0;
947 Tick tick_cmp = 0, stick_cmp = 0, hstick_cmp = 0;
void postInterrupt(ThreadID tid, int int_num, int index)
void clearInterrupt(ThreadID tid, int int_num, int index)
Register ID: describe an architectural register with its class and index.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void installWindow(int cwp, int offset)
static const int RegsPerWindow
STickCompareEvent * sTickCompare
uint16_t priContext
MMU Internal Registers.
void copyRegsFrom(ThreadContext *src) override
static const int NumWindowedRegs
uint64_t fsr
Floating point misc registers.
static const int TotalGlobals
void setMiscReg(RegIndex idx, RegVal val) override
TickCompareEvent * tickCompare
RegVal readMiscReg(RegIndex idx) override
RegIndex intRegMap[TotalInstIntRegs]
void serialize(CheckpointOut &cp) const override
Serialize an object.
HSTickCompareEvent * hSTickCompare
EventWrapper< ISA, &ISA::processSTickCompare > STickCompareEvent
static const int TotalWindowed
HPSTATE hpstate
Hyperprivileged Registers.
static const int NumGlobalRegs
void setFSReg(int miscReg, RegVal val)
RegVal readMiscRegNoEffect(RegIndex idx) const override
EventWrapper< ISA, &ISA::processHSTickCompare > HSTickCompareEvent
void installGlobals(int gl, int offset)
RegVal readFSReg(int miscReg)
void setMiscRegNoEffect(RegIndex idx, RegVal val) override
EventWrapper< ISA, &ISA::processTickCompare > TickCompareEvent
ThreadContext is the external interface to all thread state for anything outside of the CPU.
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 const PCStateBase & pcState() const =0
virtual void setReg(const RegId ®, RegVal val)
virtual InstDecoder * getDecoderPtr()=0
virtual BaseCPU * getCpuPtr()=0
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
constexpr T mbits(T val, unsigned first, unsigned last)
Mask off the given bits in place like bits() but without shifting.
constexpr uint64_t mask(unsigned nbits)
Generate a 64-bit mask of 'nbits' 1s, right justified.
bool scheduled() const
Determine if the current event is scheduled.
void schedule(Event &event, Tick when)
Tick when() const
Get the time that the event is scheduled.
#define panic(...)
This implements a cprintf based panic() function.
#define UNSERIALIZE_ARRAY(member, size)
#define SERIALIZE_ARRAY(member, size)
constexpr RegClass ccRegClass(CCRegClass, CCRegClassName, cc_reg::NumRegs, debug::CCRegs)
constexpr RegClass vecElemClass
constexpr RegClass vecPredRegClass
constexpr RegClass vecRegClass
static PSTATE buildPstateMask()
static void copyMiscRegs(ThreadContext *src, ThreadContext *dest)
@ MISCREG_QUEUE_RES_ERROR_HEAD
@ MISCREG_HPSTATE
Hyper privileged registers.
@ MISCREG_SCRATCHPAD_R0
Scratchpad regiscers.
@ MISCREG_MMU_P_CONTEXT
MMU Internal Registers.
@ MISCREG_QUEUE_DEV_MONDO_TAIL
@ MISCREG_QUEUE_CPU_MONDO_HEAD
@ MISCREG_QUEUE_NRES_ERROR_TAIL
@ MISCREG_ASI
Ancillary State Registers.
@ MISCREG_QUEUE_CPU_MONDO_TAIL
@ MISCREG_QUEUE_DEV_MONDO_HEAD
@ MISCREG_FSR
Floating Point Status Register.
@ MISCREG_TPC
Privilged Registers.
@ MISCREG_QUEUE_RES_ERROR_TAIL
@ MISCREG_QUEUE_NRES_ERROR_HEAD
constexpr RegClass flatIntRegClass
constexpr RegClass intRegClass
constexpr RegClass floatRegClass(FloatRegClass, FloatRegClassName, float_reg::NumRegs, debug::FloatRegs)
static const PSTATE PstateMask
constexpr RegClass miscRegClass(MiscRegClass, MiscRegClassName, NumMiscRegs, debug::MiscRegs)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
constexpr char CCRegClassName[]
constexpr char VecPredRegClassName[]
std::ostream CheckpointOut
constexpr char VecRegClassName[]
uint64_t Tick
Tick count type.
@ CCRegClass
Condition-code register.
@ VecRegClass
Vector Register.
@ VecElemClass
Vector Register Native Elem lane.
constexpr char VecElemClassName[]
#define UNSERIALIZE_SCALAR(scalar)
#define SERIALIZE_SCALAR(scalar)