40 #include "debug/MiscRegs.hh" 41 #include "debug/Timer.hh" 42 #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");
497 DPRINTF(MiscRegs,
"FSR written with: %#x\n",
fsr);
562 panic(
"Miscellaneous register %d not implemented\n", miscReg);
581 DPRINTF(Timer,
"Writing TICK=%#X\n", val);
683 Tick tick_cmp = 0, stick_cmp = 0, hstick_cmp = 0;
687 bool tick_intr_sched =
true;
696 tick_intr_sched =
false;
769 Tick tick_cmp = 0, stick_cmp = 0, hstick_cmp = 0;
773 bool tick_intr_sched;
775 if (tick_intr_sched) {
804 SparcISAParams::create()
#define panic(...)
This implements a cprintf based panic() function.
RegVal readMiscRegNoEffect(int miscReg) const
int findContext(ThreadContext *tc)
Given a Thread Context pointer return the thread num.
virtual TheISA::Decoder * getDecoderPtr()=0
void installGlobals(int gl, int offset)
CpuEventWrapper< ISA, &ISA::processSTickCompare > STickCompareEvent
Tick when() const
Get the time that the event is scheduled.
void serialize(CheckpointOut &cp) const override
Serialize an object.
static const int NumWindowedRegs
void clearInterrupt(ThreadID tid, int int_num, int index)
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
bool scheduled() const
Determine if the current event is scheduled.
uint64_t Tick
Tick count type.
Hyper privileged registers.
RegVal readMiscReg(int miscReg, ThreadContext *tc)
#define SERIALIZE_ARRAY(member, size)
HPSTATE hpstate
Hyperprivileged Registers.
CpuEventWrapper< ISA, &ISA::processHSTickCompare > HSTickCompareEvent
static PSTATE buildPstateMask()
void setMiscReg(int miscReg, RegVal val, ThreadContext *tc)
static const int RegsPerWindow
#define ULL(N)
uint64_t constant
HSTickCompareEvent * hSTickCompare
Ancillary State Registers.
RegVal readFSReg(int miscReg, ThreadContext *tc)
#define SERIALIZE_SCALAR(scalar)
#define UNSERIALIZE_ARRAY(member, size)
#define SERIALIZE_OBJPTR(objptr)
std::ostream CheckpointOut
STickCompareEvent * sTickCompare
virtual ThreadContext * getContext(int tn)
Given a thread num get tho thread context for it.
const SimObjectParams * _params
Cached copy of the object parameters.
#define UNSERIALIZE_OBJPTR(objptr)
const int NumMicroIntRegs
void schedule(Event &event, Tick when)
const Params * params() const
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.
void postInterrupt(ThreadID tid, int int_num, int index)
void installWindow(int cwp, int offset)
void setMiscRegNoEffect(int miscReg, RegVal val)
void setFSReg(int miscReg, RegVal val, ThreadContext *tc)
Floating Point Status Register.