39 #include "debug/MiscRegs.hh"
40 #include "debug/Timer.hh"
41 #include "params/SparcISA.hh"
73 const SparcISAParams *
110 mapChunk[
i] =
i + gl * NumGlobalRegs;
130 memset(
tpc, 0,
sizeof(
tpc));
133 memset(
tt, 0,
sizeof(
tt));
173 panic(
"Tick comparison event active when clearing the ISA object.\n");
198 return (uint64_t)
hpstate.hpriv |
200 (uint64_t)
pstate.priv << 2 |
201 (uint64_t)
pstate.am << 3 |
204 bits((uint64_t)
tl,2,0) << 16 |
223 panic(
"PCR not implemented\n");
225 panic(
"PIC not implemented\n");
247 panic(
"Priviliged access to tick registers not implemented\n");
333 panic(
"Miscellaneous register %d not implemented\n", miscReg);
349 DPRINTF(Timer,
"Instruction Count when TICK read: %#X stick=%#X\n",
358 panic(
"Performance Instrumentation not impl\n");
361 panic(
"Can read from softint clr/set\n");
405 panic(
"PCR not implemented\n");
407 panic(
"PIC not implemented\n");
438 panic(
"Priviliged access to tick regesiters not implemented\n");
496 DPRINTF(MiscRegs,
"FSR written with: %#x\n",
fsr);
561 panic(
"Miscellaneous register %d not implemented\n", miscReg);
580 DPRINTF(Timer,
"Writing TICK=%#X\n", val);
682 Tick tick_cmp = 0, stick_cmp = 0, hstick_cmp = 0;
686 bool tick_intr_sched =
true;
695 tick_intr_sched =
false;
701 tc_num = cpu->findContext(tc);
768 Tick tick_cmp = 0, stick_cmp = 0, hstick_cmp = 0;
772 bool tick_intr_sched;
774 if (tick_intr_sched) {
781 tc = cpu->getContext(tc_num);
803 SparcISAParams::create()
void setFSReg(int miscReg, const MiscReg &val, ThreadContext *tc)
MiscReg readFSReg(int miscReg, ThreadContext *tc)
void setMiscReg(int miscReg, const MiscReg val, ThreadContext *tc)
virtual TheISA::Decoder * getDecoderPtr()=0
void installGlobals(int gl, int offset)
CpuEventWrapper< ISA,&ISA::processSTickCompare > STickCompareEvent
void serialize(CheckpointOut &cp) const override
Serialize an object.
static const int NumWindowedRegs
bool scheduled() const
Determine if the current event is scheduled.
static const PSTATE PstateMask
TickCompareEvent * tickCompare
virtual BaseCPU * getCpuPtr()=0
CpuEventWrapper< ISA,&ISA::processTickCompare > TickCompareEvent
RegIndex intRegMap[TotalInstIntRegs]
ThreadContext is the external interface to all thread state for anything outside of the CPU...
uint64_t fsr
Floating point misc registers.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
#define UNSERIALIZE_SCALAR(scalar)
static const int NumGlobalRegs
Tick when() const
Get the time that the event is scheduled.
uint64_t Tick
Tick count type.
MiscReg readMiscReg(int miscReg, ThreadContext *tc)
Hyper privileged registers.
#define SERIALIZE_ARRAY(member, size)
HPSTATE hpstate
Hyperprivileged Registers.
CpuEventWrapper< ISA,&ISA::processHSTickCompare > HSTickCompareEvent
static PSTATE buildPstateMask()
static const int RegsPerWindow
#define ULL(N)
uint64_t constant
void setMiscRegNoEffect(int miscReg, const MiscReg val)
HSTickCompareEvent * hSTickCompare
Ancillary State Registers.
const Params * params() const
#define SERIALIZE_SCALAR(scalar)
#define UNSERIALIZE_ARRAY(member, size)
#define SERIALIZE_OBJPTR(objptr)
std::ostream CheckpointOut
MiscReg readMiscRegNoEffect(int miscReg) const
STickCompareEvent * sTickCompare
const SimObjectParams * _params
Cached copy of the object parameters.
#define UNSERIALIZE_OBJPTR(objptr)
const int NumMicroIntRegs
void schedule(Event &event, Tick when)
T mbits(T val, int first, int last)
Mask off the given bits in place like bits() but without shifting.
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it...
static const int TotalGlobals
static const int TotalWindowed
uint16_t priContext
MMU Internal Registers.
Abstract superclass for simulation objects.
void installWindow(int cwp, int offset)
Floating Point Status Register.