gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
isa.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 The Regents of The University of Michigan
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met: redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  *
28  * Authors: Gabe Black
29  */
30 
31 #include "arch/sparc/isa.hh"
32 
33 #include "arch/sparc/asi.hh"
34 #include "arch/sparc/decoder.hh"
35 #include "arch/sparc/interrupts.hh"
36 #include "base/bitfield.hh"
37 #include "base/trace.hh"
38 #include "cpu/base.hh"
39 #include "cpu/thread_context.hh"
40 #include "debug/MiscRegs.hh"
41 #include "debug/Timer.hh"
42 #include "params/SparcISA.hh"
43 
44 namespace SparcISA
45 {
46 
47 static PSTATE
49 {
50  PSTATE mask = 0;
51  mask.ie = 1;
52  mask.priv = 1;
53  mask.am = 1;
54  mask.pef = 1;
55  mask.mm = 3;
56  mask.tle = 1;
57  mask.cle = 1;
58  mask.pid1 = 1;
59  return mask;
60 }
61 
62 static const PSTATE PstateMask = buildPstateMask();
63 
65 {
66  tickCompare = NULL;
67  sTickCompare = NULL;
68  hSTickCompare = NULL;
69 
70  clear();
71 }
72 
73 const SparcISAParams *
74 ISA::params() const
75 {
76  return dynamic_cast<const Params *>(_params);
77 }
78 
79 void
81 {
84  // Microcode registers.
85  for (int i = 0; i < NumMicroIntRegs; i++)
91 }
92 
93 void
95 {
96  assert(offset >= 0 && offset + NumWindowedRegs <= NumIntRegs);
97  RegIndex *mapChunk = intRegMap + offset;
98  for (int i = 0; i < NumWindowedRegs; i++)
99  mapChunk[i] = TotalGlobals +
100  ((i - cwp * RegsPerWindow + TotalWindowed) % (TotalWindowed));
101 }
102 
103 void
105 {
106  assert(offset >= 0 && offset + NumGlobalRegs <= NumIntRegs);
107  RegIndex *mapChunk = intRegMap + offset;
108  mapChunk[0] = 0;
109  for (int i = 1; i < NumGlobalRegs; i++)
110  mapChunk[i] = i + gl * NumGlobalRegs;
111 }
112 
113 void
115 {
116  cwp = 0;
117  gl = 0;
118  reloadRegMap();
119 
120  // y = 0;
121  // ccr = 0;
122  asi = 0;
123  tick = ULL(1) << 63;
124  fprs = 0;
125  gsr = 0;
126  softint = 0;
127  tick_cmpr = 0;
128  stick = 0;
129  stick_cmpr = 0;
130  memset(tpc, 0, sizeof(tpc));
131  memset(tnpc, 0, sizeof(tnpc));
132  memset(tstate, 0, sizeof(tstate));
133  memset(tt, 0, sizeof(tt));
134  tba = 0;
135  pstate = 0;
136  tl = 0;
137  pil = 0;
138  // cansave = 0;
139  // canrestore = 0;
140  // cleanwin = 0;
141  // otherwin = 0;
142  // wstate = 0;
143  // In a T1, bit 11 is apparently always 1
144  hpstate = 0;
145  hpstate.id = 1;
146  memset(htstate, 0, sizeof(htstate));
147  hintp = 0;
148  htba = 0;
149  hstick_cmpr = 0;
150  // This is set this way in Legion for some reason
151  strandStatusReg = 0x50000;
152  fsr = 0;
153 
154  priContext = 0;
155  secContext = 0;
156  partId = 0;
157  lsuCtrlReg = 0;
158 
159  memset(scratchPad, 0, sizeof(scratchPad));
160 
161  cpu_mondo_head = 0;
162  cpu_mondo_tail = 0;
163  dev_mondo_head = 0;
164  dev_mondo_tail = 0;
165  res_error_head = 0;
166  res_error_tail = 0;
167  nres_error_head = 0;
168  nres_error_tail = 0;
169 
170  // If one of these events is active, it's not obvious to me how to get
171  // rid of it cleanly. For now we'll just assert that they're not.
172  if (tickCompare != NULL && sTickCompare != NULL && hSTickCompare != NULL)
173  panic("Tick comparison event active when clearing the ISA object.\n");
174 }
175 
176 RegVal
177 ISA::readMiscRegNoEffect(int miscReg) const
178 {
179 
180  // The three miscRegs are moved up from the switch statement
181  // due to more frequent calls.
182 
183  if (miscReg == MISCREG_GL)
184  return gl;
185  if (miscReg == MISCREG_CWP)
186  return cwp;
187  if (miscReg == MISCREG_TLB_DATA) {
188  /* Package up all the data for the tlb:
189  * 6666555555555544444444443333333333222222222211111111110000000000
190  * 3210987654321098765432109876543210987654321098765432109876543210
191  * secContext | priContext | |tl|partid| |||||^hpriv
192  * ||||^red
193  * |||^priv
194  * ||^am
195  * |^lsuim
196  * ^lsudm
197  */
198  return (uint64_t)hpstate.hpriv |
199  (uint64_t)hpstate.red << 1 |
200  (uint64_t)pstate.priv << 2 |
201  (uint64_t)pstate.am << 3 |
202  bits((uint64_t)lsuCtrlReg,3,2) << 4 |
203  bits((uint64_t)partId,7,0) << 8 |
204  bits((uint64_t)tl,2,0) << 16 |
205  (uint64_t)priContext << 32 |
206  (uint64_t)secContext << 48;
207  }
208 
209  switch (miscReg) {
210  // case MISCREG_TLB_DATA:
211  // [original contents see above]
212  // case MISCREG_Y:
213  // return y;
214  // case MISCREG_CCR:
215  // return ccr;
216  case MISCREG_ASI:
217  return asi;
218  case MISCREG_FPRS:
219  return fprs;
220  case MISCREG_TICK:
221  return tick;
222  case MISCREG_PCR:
223  panic("PCR not implemented\n");
224  case MISCREG_PIC:
225  panic("PIC not implemented\n");
226  case MISCREG_GSR:
227  return gsr;
228  case MISCREG_SOFTINT:
229  return softint;
230  case MISCREG_TICK_CMPR:
231  return tick_cmpr;
232  case MISCREG_STICK:
233  return stick;
234  case MISCREG_STICK_CMPR:
235  return stick_cmpr;
236 
238  case MISCREG_TPC:
239  return tpc[tl-1];
240  case MISCREG_TNPC:
241  return tnpc[tl-1];
242  case MISCREG_TSTATE:
243  return tstate[tl-1];
244  case MISCREG_TT:
245  return tt[tl-1];
246  case MISCREG_PRIVTICK:
247  panic("Priviliged access to tick registers not implemented\n");
248  case MISCREG_TBA:
249  return tba;
250  case MISCREG_PSTATE:
251  return (RegVal)pstate;
252  case MISCREG_TL:
253  return tl;
254  case MISCREG_PIL:
255  return pil;
256  // CWP, GL moved
257  // case MISCREG_CWP:
258  // return cwp;
259  // case MISCREG_CANSAVE:
260  // return cansave;
261  // case MISCREG_CANRESTORE:
262  // return canrestore;
263  // case MISCREG_CLEANWIN:
264  // return cleanwin;
265  // case MISCREG_OTHERWIN:
266  // return otherwin;
267  // case MISCREG_WSTATE:
268  // return wstate;
269  // case MISCREG_GL:
270  // return gl;
271 
273  case MISCREG_HPSTATE:
274  return (RegVal)hpstate;
275  case MISCREG_HTSTATE:
276  return htstate[tl-1];
277  case MISCREG_HINTP:
278  return hintp;
279  case MISCREG_HTBA:
280  return htba;
282  return strandStatusReg;
283  case MISCREG_HSTICK_CMPR:
284  return hstick_cmpr;
285 
287  case MISCREG_FSR:
288  DPRINTF(MiscRegs, "FSR read as: %#x\n", fsr);
289  return fsr;
290 
292  return priContext;
294  return secContext;
295  case MISCREG_MMU_PART_ID:
296  return partId;
298  return lsuCtrlReg;
299 
301  return scratchPad[0];
303  return scratchPad[1];
305  return scratchPad[2];
307  return scratchPad[3];
309  return scratchPad[4];
311  return scratchPad[5];
313  return scratchPad[6];
315  return scratchPad[7];
317  return cpu_mondo_head;
319  return cpu_mondo_tail;
321  return dev_mondo_head;
323  return dev_mondo_tail;
325  return res_error_head;
327  return res_error_tail;
329  return nres_error_head;
331  return nres_error_tail;
332  default:
333  panic("Miscellaneous register %d not implemented\n", miscReg);
334  }
335 }
336 
337 RegVal
338 ISA::readMiscReg(int miscReg, ThreadContext * tc)
339 {
340  switch (miscReg) {
341  // tick and stick are aliased to each other in niagra
342  // well store the tick data in stick and the interrupt bit in tick
343  case MISCREG_STICK:
344  case MISCREG_TICK:
345  case MISCREG_PRIVTICK:
346  // I'm not sure why legion ignores the lowest two bits, but we'll go
347  // with it
348  // change from curCycle() to instCount() until we're done with legion
349  DPRINTF(Timer, "Instruction Count when TICK read: %#X stick=%#X\n",
350  tc->getCpuPtr()->instCount(), stick);
351  return mbits(tc->getCpuPtr()->instCount() + (int64_t)stick,62,2) |
352  mbits(tick,63,63);
353  case MISCREG_FPRS:
354  // in legion if fp is enabled du and dl are set
355  return fprs | 0x3;
356  case MISCREG_PCR:
357  case MISCREG_PIC:
358  panic("Performance Instrumentation not impl\n");
359  case MISCREG_SOFTINT_CLR:
360  case MISCREG_SOFTINT_SET:
361  panic("Can read from softint clr/set\n");
362  case MISCREG_SOFTINT:
363  case MISCREG_TICK_CMPR:
364  case MISCREG_STICK_CMPR:
365  case MISCREG_HINTP:
366  case MISCREG_HTSTATE:
367  case MISCREG_HTBA:
368  case MISCREG_HVER:
370  case MISCREG_HSTICK_CMPR:
379  case MISCREG_HPSTATE:
380  return readFSReg(miscReg, tc);
381  }
382  return readMiscRegNoEffect(miscReg);
383 }
384 
385 void
387 {
388  switch (miscReg) {
389 // case MISCREG_Y:
390 // y = val;
391 // break;
392 // case MISCREG_CCR:
393 // ccr = val;
394 // break;
395  case MISCREG_ASI:
396  asi = val;
397  break;
398  case MISCREG_FPRS:
399  fprs = val;
400  break;
401  case MISCREG_TICK:
402  tick = val;
403  break;
404  case MISCREG_PCR:
405  panic("PCR not implemented\n");
406  case MISCREG_PIC:
407  panic("PIC not implemented\n");
408  case MISCREG_GSR:
409  gsr = val;
410  break;
411  case MISCREG_SOFTINT:
412  softint = val;
413  break;
414  case MISCREG_TICK_CMPR:
415  tick_cmpr = val;
416  break;
417  case MISCREG_STICK:
418  stick = val;
419  break;
420  case MISCREG_STICK_CMPR:
421  stick_cmpr = val;
422  break;
423 
425  case MISCREG_TPC:
426  tpc[tl-1] = val;
427  break;
428  case MISCREG_TNPC:
429  tnpc[tl-1] = val;
430  break;
431  case MISCREG_TSTATE:
432  tstate[tl-1] = val;
433  break;
434  case MISCREG_TT:
435  tt[tl-1] = val;
436  break;
437  case MISCREG_PRIVTICK:
438  panic("Priviliged access to tick regesiters not implemented\n");
439  case MISCREG_TBA:
440  // clear lower 7 bits on writes.
441  tba = val & ULL(~0x7FFF);
442  break;
443  case MISCREG_PSTATE:
444  pstate = (val & PstateMask);
445  break;
446  case MISCREG_TL:
447  tl = val;
448  break;
449  case MISCREG_PIL:
450  pil = val;
451  break;
452  case MISCREG_CWP:
453  cwp = val;
454  break;
455 // case MISCREG_CANSAVE:
456 // cansave = val;
457 // break;
458 // case MISCREG_CANRESTORE:
459 // canrestore = val;
460 // break;
461 // case MISCREG_CLEANWIN:
462 // cleanwin = val;
463 // break;
464 // case MISCREG_OTHERWIN:
465 // otherwin = val;
466 // break;
467 // case MISCREG_WSTATE:
468 // wstate = val;
469 // break;
470  case MISCREG_GL:
471  gl = val;
472  break;
473 
475  case MISCREG_HPSTATE:
476  hpstate = val;
477  break;
478  case MISCREG_HTSTATE:
479  htstate[tl-1] = val;
480  break;
481  case MISCREG_HINTP:
482  hintp = val;
483  break;
484  case MISCREG_HTBA:
485  htba = val;
486  break;
489  break;
490  case MISCREG_HSTICK_CMPR:
491  hstick_cmpr = val;
492  break;
493 
495  case MISCREG_FSR:
496  fsr = val;
497  DPRINTF(MiscRegs, "FSR written with: %#x\n", fsr);
498  break;
499 
501  priContext = val;
502  break;
504  secContext = val;
505  break;
506  case MISCREG_MMU_PART_ID:
507  partId = val;
508  break;
510  lsuCtrlReg = val;
511  break;
512 
514  scratchPad[0] = val;
515  break;
517  scratchPad[1] = val;
518  break;
520  scratchPad[2] = val;
521  break;
523  scratchPad[3] = val;
524  break;
526  scratchPad[4] = val;
527  break;
529  scratchPad[5] = val;
530  break;
532  scratchPad[6] = val;
533  break;
535  scratchPad[7] = val;
536  break;
539  break;
542  break;
545  break;
548  break;
551  break;
554  break;
557  break;
560  break;
561  default:
562  panic("Miscellaneous register %d not implemented\n", miscReg);
563  }
564 }
565 
566 void
568 {
569  RegVal new_val = val;
570 
571  switch (miscReg) {
572  case MISCREG_ASI:
573  tc->getDecoderPtr()->setContext(val);
574  break;
575  case MISCREG_STICK:
576  case MISCREG_TICK:
577  // stick and tick are same thing on niagra
578  // use stick for offset and tick for holding intrrupt bit
579  stick = mbits(val,62,0) - tc->getCpuPtr()->instCount();
580  tick = mbits(val,63,63);
581  DPRINTF(Timer, "Writing TICK=%#X\n", val);
582  break;
583  case MISCREG_FPRS:
584  // Configure the fpu based on the fprs
585  break;
586  case MISCREG_PCR:
587  // Set up performance counting based on pcr value
588  break;
589  case MISCREG_PSTATE:
590  pstate = val & PstateMask;
591  return;
592  case MISCREG_TL:
593  {
594  tl = val;
595  if (hpstate.tlz && tl == 0 && !hpstate.hpriv)
597  else
599  return;
600  }
601  case MISCREG_CWP:
602  new_val = val >= NWindows ? NWindows - 1 : val;
603  if (val >= NWindows)
604  new_val = NWindows - 1;
605 
607  installWindow(new_val - 1, NextWindowOffset);
608  installWindow(new_val + 1, PreviousWindowOffset);
609  break;
610  case MISCREG_GL:
614  break;
615  case MISCREG_PIL:
616  case MISCREG_SOFTINT:
617  case MISCREG_SOFTINT_SET:
618  case MISCREG_SOFTINT_CLR:
619  case MISCREG_TICK_CMPR:
620  case MISCREG_STICK_CMPR:
621  case MISCREG_HINTP:
622  case MISCREG_HTSTATE:
623  case MISCREG_HTBA:
624  case MISCREG_HVER:
626  case MISCREG_HSTICK_CMPR:
635  case MISCREG_HPSTATE:
636  setFSReg(miscReg, val, tc);
637  return;
638  }
639  setMiscRegNoEffect(miscReg, new_val);
640 }
641 
642 void
644 {
683  Tick tick_cmp = 0, stick_cmp = 0, hstick_cmp = 0;
684  ThreadContext *tc = NULL;
685  BaseCPU *cpu = NULL;
686  int tc_num = 0;
687  bool tick_intr_sched = true;
688 
689  if (tickCompare)
690  tc = tickCompare->getTC();
691  else if (sTickCompare)
692  tc = sTickCompare->getTC();
693  else if (hSTickCompare)
694  tc = hSTickCompare->getTC();
695  else
696  tick_intr_sched = false;
697 
698  SERIALIZE_SCALAR(tick_intr_sched);
699 
700  if (tc) {
701  cpu = tc->getCpuPtr();
702  tc_num = cpu->findContext(tc);
704  tick_cmp = tickCompare->when();
706  stick_cmp = sTickCompare->when();
708  hstick_cmp = hSTickCompare->when();
709 
710  SERIALIZE_OBJPTR(cpu);
711  SERIALIZE_SCALAR(tc_num);
712  SERIALIZE_SCALAR(tick_cmp);
713  SERIALIZE_SCALAR(stick_cmp);
714  SERIALIZE_SCALAR(hstick_cmp);
715  }
716 }
717 
718 void
720 {
734  {
735  uint16_t pstate;
736  UNSERIALIZE_SCALAR(pstate);
737  this->pstate = pstate;
738  }
743  reloadRegMap();
744  {
745  uint64_t hpstate;
746  UNSERIALIZE_SCALAR(hpstate);
747  this->hpstate = hpstate;
748  }
768 
769  Tick tick_cmp = 0, stick_cmp = 0, hstick_cmp = 0;
770  ThreadContext *tc = NULL;
771  BaseCPU *cpu = NULL;
772  int tc_num;
773  bool tick_intr_sched;
774  UNSERIALIZE_SCALAR(tick_intr_sched);
775  if (tick_intr_sched) {
776  UNSERIALIZE_OBJPTR(cpu);
777  if (cpu) {
778  UNSERIALIZE_SCALAR(tc_num);
779  UNSERIALIZE_SCALAR(tick_cmp);
780  UNSERIALIZE_SCALAR(stick_cmp);
781  UNSERIALIZE_SCALAR(hstick_cmp);
782  tc = cpu->getContext(tc_num);
783 
784  if (tick_cmp) {
785  tickCompare = new TickCompareEvent(this, tc);
786  schedule(tickCompare, tick_cmp);
787  }
788  if (stick_cmp) {
789  sTickCompare = new STickCompareEvent(this, tc);
790  schedule(sTickCompare, stick_cmp);
791  }
792  if (hstick_cmp) {
793  hSTickCompare = new HSTickCompareEvent(this, tc);
794  schedule(hSTickCompare, hstick_cmp);
795  }
796  }
797  }
798 
799 }
800 
801 }
802 
804 SparcISAParams::create()
805 {
806  return new SparcISA::ISA(this);
807 }
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:167
RegVal readMiscRegNoEffect(int miscReg) const
Definition: isa.cc:177
#define DPRINTF(x,...)
Definition: trace.hh:229
int findContext(ThreadContext *tc)
Given a Thread Context pointer return the thread num.
Definition: base.cc:480
virtual TheISA::Decoder * getDecoderPtr()=0
uint64_t htba
Definition: isa.hh:93
void reloadRegMap()
Definition: isa.cc:80
void installGlobals(int gl, int offset)
Definition: isa.cc:104
uint64_t dev_mondo_tail
Definition: isa.hh:112
Bitfield< 7 > i
CpuEventWrapper< ISA, &ISA::processSTickCompare > STickCompareEvent
Definition: isa.hh:137
uint8_t pil
Definition: isa.hh:80
Tick when() const
Get the time that the event is scheduled.
Definition: eventq.hh:401
const int NumIntRegs
Definition: registers.hh:76
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: isa.cc:643
uint64_t tnpc[MaxTL]
Definition: isa.hh:71
static const int NumWindowedRegs
Definition: isa.hh:145
uint8_t cwp
Definition: isa.hh:81
uint16_t partId
Definition: isa.hh:104
void clearInterrupt(ThreadID tid, int int_num, int index)
Definition: base.hh:246
uint64_t htstate[MaxTL]
Definition: isa.hh:91
static const PSTATE PstateMask
Definition: isa.cc:62
uint64_t RegVal
Definition: types.hh:168
TickCompareEvent * tickCompare
Definition: isa.hh:134
PSTATE pstate
Definition: isa.hh:78
Bitfield< 23, 0 > offset
Definition: types.hh:154
ThreadContext * getTC()
Definition: cpuevent.hh:75
virtual BaseCPU * getCpuPtr()=0
CpuEventWrapper< ISA, &ISA::processTickCompare > TickCompareEvent
Definition: isa.hh:133
Definition: cprintf.cc:42
MMU Internal Registers.
Definition: miscregs.hh:89
uint64_t tick
Definition: isa.hh:59
uint64_t tpc[MaxTL]
Definition: isa.hh:69
RegIndex intRegMap[TotalInstIntRegs]
Definition: isa.hh:163
ThreadContext is the external interface to all thread state for anything outside of the CPU...
uint64_t nres_error_tail
Definition: isa.hh:116
uint64_t fsr
Floating point misc registers.
Definition: isa.hh:99
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: isa.cc:719
uint64_t lsuCtrlReg
Definition: isa.hh:105
uint64_t tstate[MaxTL]
Definition: isa.hh:73
Bitfield< 63 > val
Definition: misc.hh:771
uint64_t hstick_cmpr
Definition: isa.hh:94
Tick instCount()
Definition: base.hh:217
#define UNSERIALIZE_SCALAR(scalar)
Definition: serialize.hh:645
static const int NumGlobalRegs
Definition: isa.hh:144
uint64_t dev_mondo_head
Definition: isa.hh:111
bool scheduled() const
Determine if the current event is scheduled.
Definition: eventq.hh:385
uint16_t RegIndex
Definition: types.hh:42
uint8_t asi
Definition: isa.hh:58
uint64_t tba
Definition: isa.hh:76
uint64_t nres_error_head
Definition: isa.hh:115
uint64_t Tick
Tick count type.
Definition: types.hh:63
Hyper privileged registers.
Definition: miscregs.hh:77
RegVal readMiscReg(int miscReg, ThreadContext *tc)
Definition: isa.cc:338
uint8_t gl
Definition: isa.hh:87
uint64_t res_error_head
Definition: isa.hh:113
#define SERIALIZE_ARRAY(member, size)
Definition: serialize.hh:658
HPSTATE hpstate
Hyperprivileged Registers.
Definition: isa.hh:90
CpuEventWrapper< ISA, &ISA::processHSTickCompare > HSTickCompareEvent
Definition: isa.hh:141
static PSTATE buildPstateMask()
Definition: isa.cc:48
void setMiscReg(int miscReg, RegVal val, ThreadContext *tc)
Definition: isa.cc:567
uint64_t cpu_mondo_head
Definition: isa.hh:109
static const int RegsPerWindow
Definition: isa.hh:149
#define ULL(N)
uint64_t constant
Definition: types.hh:50
HSTickCompareEvent * hSTickCompare
Definition: isa.hh:142
Ancillary State Registers.
Definition: miscregs.hh:45
RegVal readFSReg(int miscReg, ThreadContext *tc)
Definition: ua2005.cc:247
#define SERIALIZE_SCALAR(scalar)
Definition: serialize.hh:643
uint16_t secContext
Definition: isa.hh:103
#define UNSERIALIZE_ARRAY(member, size)
Definition: serialize.hh:661
uint8_t fprs
Definition: isa.hh:60
#define SERIALIZE_OBJPTR(objptr)
Definition: serialize.hh:681
uint64_t softint
Definition: isa.hh:62
const int MaxTL
Definition: sparc_traits.hh:38
std::ostream CheckpointOut
Definition: serialize.hh:68
Definition: asi.cc:34
Privilged Registers.
Definition: miscregs.hh:59
Scratchpad regiscers.
Definition: miscregs.hh:95
STickCompareEvent * sTickCompare
Definition: isa.hh:138
const int NWindows
Definition: sparc_traits.hh:43
virtual ThreadContext * getContext(int tn)
Given a thread num get tho thread context for it.
Definition: base.hh:298
uint64_t cpu_mondo_tail
Definition: isa.hh:110
const SimObjectParams * _params
Cached copy of the object parameters.
Definition: sim_object.hh:110
#define UNSERIALIZE_OBJPTR(objptr)
Definition: serialize.hh:683
uint64_t stick
Definition: isa.hh:64
const int NumMicroIntRegs
Definition: sparc_traits.hh:45
uint64_t res_error_tail
Definition: isa.hh:114
void schedule(Event &event, Tick when)
Definition: eventq.hh:744
uint64_t strandStatusReg
Definition: isa.hh:96
const Params * params() const
Definition: isa.cc:74
Bitfield< 3, 0 > mask
Definition: types.hh:64
Definition: isa.hh:35
T mbits(T val, int first, int last)
Mask off the given bits in place like bits() but without shifting.
Definition: bitfield.hh:96
T bits(T val, int first, int last)
Extract the bitfield from position &#39;first&#39; to &#39;last&#39; (inclusive) from &#39;val&#39; and right justify it...
Definition: bitfield.hh:72
uint64_t tick_cmpr
Definition: isa.hh:63
static const int TotalGlobals
Definition: isa.hh:148
static const int TotalWindowed
Definition: isa.hh:150
Bitfield< 0 > p
uint8_t tl
Definition: isa.hh:79
uint16_t priContext
MMU Internal Registers.
Definition: isa.hh:102
void clear()
Definition: isa.cc:114
uint16_t tt[MaxTL]
Definition: isa.hh:74
void postInterrupt(ThreadID tid, int int_num, int index)
Definition: base.hh:238
SparcISAParams Params
Definition: isa.hh:258
uint64_t hintp
Definition: isa.hh:92
ISA(Params *p)
Definition: isa.cc:64
void installWindow(int cwp, int offset)
Definition: isa.cc:94
uint64_t scratchPad[8]
Definition: isa.hh:107
uint64_t stick_cmpr
Definition: isa.hh:65
uint64_t gsr
Definition: isa.hh:61
void setMiscRegNoEffect(int miscReg, RegVal val)
Definition: isa.cc:386
void setFSReg(int miscReg, RegVal val, ThreadContext *tc)
Definition: ua2005.cc:92
Floating Point Status Register.
Definition: miscregs.hh:86

Generated on Fri Feb 28 2020 16:26:56 for gem5 by doxygen 1.8.13