gem5  v20.1.0.0
gic_v2.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010, 2013, 2015-2020 ARM Limited
3  * All rights reserved
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Copyright (c) 2005 The Regents of The University of Michigan
15  * All rights reserved.
16  *
17  * Redistribution and use in source and binary forms, with or without
18  * modification, are permitted provided that the following conditions are
19  * met: redistributions of source code must retain the above copyright
20  * notice, this list of conditions and the following disclaimer;
21  * redistributions in binary form must reproduce the above copyright
22  * notice, this list of conditions and the following disclaimer in the
23  * documentation and/or other materials provided with the distribution;
24  * neither the name of the copyright holders nor the names of its
25  * contributors may be used to endorse or promote products derived from
26  * this software without specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  */
40 
41 
46 #ifndef __DEV_ARM_GICV2_H__
47 #define __DEV_ARM_GICV2_H__
48 
49 #include <vector>
50 
51 #include "arch/arm/interrupts.hh"
52 #include "base/addr_range.hh"
53 #include "base/bitunion.hh"
54 #include "cpu/intr_control.hh"
55 #include "dev/arm/base_gic.hh"
56 #include "dev/io_device.hh"
57 #include "dev/platform.hh"
58 #include "params/GicV2.hh"
59 
60 class GicV2 : public BaseGic, public BaseGicRegisters
61 {
62  protected:
63  // distributor memory addresses
64  enum {
65  GICD_CTLR = 0x000, // control register
66  GICD_TYPER = 0x004, // controller type
67  GICD_IIDR = 0x008, // implementer id
68  GICD_SGIR = 0xf00, // software generated interrupt
69  GICD_PIDR0 = 0xfe0, // distributor peripheral ID0
70  GICD_PIDR1 = 0xfe4, // distributor peripheral ID1
71  GICD_PIDR2 = 0xfe8, // distributor peripheral ID2
72  GICD_PIDR3 = 0xfec, // distributor peripheral ID3
73 
74  DIST_SIZE = 0x1000,
75  };
76 
77  const uint32_t gicdPIDR;
78  const uint32_t gicdIIDR;
79  const uint32_t giccIIDR;
80 
81  static const AddrRange GICD_IGROUPR; // interrupt group (unimplemented)
82  static const AddrRange GICD_ISENABLER; // interrupt set enable
83  static const AddrRange GICD_ICENABLER; // interrupt clear enable
84  static const AddrRange GICD_ISPENDR; // set pending interrupt
85  static const AddrRange GICD_ICPENDR; // clear pending interrupt
86  static const AddrRange GICD_ISACTIVER; // active bit registers
87  static const AddrRange GICD_ICACTIVER; // clear bit registers
88  static const AddrRange GICD_IPRIORITYR; // interrupt priority registers
89  static const AddrRange GICD_ITARGETSR; // processor target registers
90  static const AddrRange GICD_ICFGR; // interrupt config registers
91 
92  // cpu memory addresses
93  enum {
94  GICC_CTLR = 0x00, // CPU control register
95  GICC_PMR = 0x04, // Interrupt priority mask
96  GICC_BPR = 0x08, // binary point register
97  GICC_IAR = 0x0C, // interrupt ack register
98  GICC_EOIR = 0x10, // end of interrupt
99  GICC_RPR = 0x14, // running priority
100  GICC_HPPIR = 0x18, // highest pending interrupt
101  GICC_ABPR = 0x1c, // aliased binary point
102  GICC_APR0 = 0xd0, // active priority register 0
103  GICC_APR1 = 0xd4, // active priority register 1
104  GICC_APR2 = 0xd8, // active priority register 2
105  GICC_APR3 = 0xdc, // active priority register 3
106  GICC_IIDR = 0xfc, // cpu interface id register
107  GICC_DIR = 0x1000, // deactive interrupt register
108  };
109 
110  static const int SGI_MAX = 16; // Number of Software Gen Interrupts
111  static const int PPI_MAX = 16; // Number of Private Peripheral Interrupts
112 
114  static const int SGI_MASK = 0xFFFF0000;
115 
117  static const int NN_CONFIG_MASK = 0x55555555;
118 
119  static const int CPU_MAX = 256; // Max number of supported CPU interfaces
120  static const int SPURIOUS_INT = 1023;
121  static const int INT_BITS_MAX = 32;
122  static const int INT_LINES_MAX = 1020;
124 
127  static const int GICC_BPR_MINIMUM = 2;
128 
129  BitUnion32(SWI)
130  Bitfield<3,0> sgi_id;
131  Bitfield<23,16> cpu_list;
132  Bitfield<25,24> list_type;
133  EndBitUnion(SWI)
134 
135  BitUnion32(IAR)
136  Bitfield<9,0> ack_id;
137  Bitfield<12,10> cpu_id;
138  EndBitUnion(IAR)
139 
140  BitUnion32(CTLR)
141  Bitfield<3> fiqEn;
142  Bitfield<1> enableGrp1;
143  Bitfield<0> enableGrp0;
145 
146  protected: /* Params */
148  const AddrRange distRange;
149 
151  const AddrRange cpuRange;
152 
155 
158 
161 
164 
165  protected:
167  bool enabled;
168 
170  const bool haveGem5Extensions;
171 
174 
176  uint32_t itLines;
177 
179  struct BankedRegs : public Serializable {
182  uint32_t intEnabled;
183 
186  uint32_t pendingInt;
187 
190  uint32_t activeInt;
191 
194  uint32_t intGroup;
195 
198  uint32_t intConfig[2];
199 
203 
204  void serialize(CheckpointOut &cp) const override;
205  void unserialize(CheckpointIn &cp) override;
206 
208  intEnabled(0), pendingInt(0), activeInt(0),
209  intGroup(0), intConfig {0}, intPriority {0}
210  {}
211  };
213 
215 
220 
221  uint32_t&
222  getIntEnabled(ContextID ctx, uint32_t ix)
223  {
224  if (ix == 0) {
225  return getBankedRegs(ctx).intEnabled;
226  } else {
227  return intEnabled[ix - 1];
228  }
229  }
230 
235 
236  uint32_t&
237  getPendingInt(ContextID ctx, uint32_t ix)
238  {
239  assert(ix < INT_BITS_MAX);
240  if (ix == 0) {
241  return getBankedRegs(ctx).pendingInt;
242  } else {
243  return pendingInt[ix - 1];
244  }
245  }
246 
250  uint32_t activeInt[INT_BITS_MAX-1];
251 
252  uint32_t&
253  getActiveInt(ContextID ctx, uint32_t ix)
254  {
255  assert(ix < INT_BITS_MAX);
256  if (ix == 0) {
257  return getBankedRegs(ctx).activeInt;
258  } else {
259  return activeInt[ix - 1];
260  }
261  }
262 
266  uint32_t intGroup[INT_BITS_MAX-1];
267 
268  uint32_t&
269  getIntGroup(ContextID ctx, uint32_t ix)
270  {
271  assert(ix < INT_BITS_MAX);
272  if (ix == 0) {
273  return getBankedRegs(ctx).intGroup;
274  } else {
275  return intGroup[ix - 1];
276  }
277  }
278 
280  uint32_t iccrpr[CPU_MAX];
281 
287 
288  uint8_t&
289  getIntPriority(ContextID ctx, uint32_t ix)
290  {
291  assert(ix < INT_LINES_MAX);
292  if (ix < SGI_MAX + PPI_MAX) {
293  return getBankedRegs(ctx).intPriority[ix];
294  } else {
295  return intPriority[ix - (SGI_MAX + PPI_MAX)];
296  }
297  }
298 
303  uint32_t intConfig[INT_BITS_MAX*2 - 2];
304 
311  uint32_t&
312  getIntConfig(ContextID ctx, uint32_t ix)
313  {
314  assert(ix < INT_BITS_MAX*2);
315  if (ix < 2) {
317  return getBankedRegs(ctx).intConfig[ix];
318  } else {
319  return intConfig[ix - 2];
320  }
321  }
322 
327 
328  uint8_t
329  getCpuTarget(ContextID ctx, uint32_t ix) const
330  {
331  assert(ctx < sys->threads.numRunning());
332  assert(ix < INT_LINES_MAX);
333  if (ix < SGI_MAX + PPI_MAX) {
334  // "GICD_ITARGETSR0 to GICD_ITARGETSR7 are read-only, and each
335  // field returns a value that corresponds only to the processor
336  // reading the register."
337  uint32_t ctx_mask;
338  if (gem5ExtensionsEnabled) {
339  ctx_mask = ctx;
340  } else {
341  fatal_if(ctx >= 8,
342  "%s requires the gem5_extensions parameter to support "
343  "more than 8 cores\n", name());
344  // convert the CPU id number into a bit mask
345  ctx_mask = 1 << ctx;
346  }
347  return ctx_mask;
348  } else {
349  return cpuTarget[ix - 32];
350  }
351  }
352 
353  bool
354  isLevelSensitive(ContextID ctx, uint32_t int_num)
355  {
356  if (int_num == SPURIOUS_INT) {
357  return false;
358  } else {
359  const auto ix = intNumToWord(int_num * 2);
360  const uint8_t cfg_hi = intNumToBit(int_num * 2) + 1;
361  return bits(getIntConfig(ctx, ix), cfg_hi) == 0;
362  }
363  }
364 
365  bool
366  isGroup0(ContextID ctx, uint32_t int_num)
367  {
368  const uint32_t group_reg = getIntGroup(ctx, intNumToWord(int_num));
369  return !bits(group_reg, intNumToBit(int_num));
370  }
371 
382  bool
383  isFiq(ContextID ctx, uint32_t int_num)
384  {
385  const bool is_group0 = isGroup0(ctx, int_num);
386  const bool use_fiq = cpuControl[ctx].fiqEn;
387 
388  if (is_group0 && use_fiq) {
389  return true;
390  } else {
391  return false;
392  }
393  }
394 
398  bool
400  {
401  return cpuControl[ctx].enableGrp0 ||
402  cpuControl[ctx].enableGrp1;
403  }
404 
409 
412  uint8_t getCpuPriority(unsigned cpu); // BPR-adjusted priority value
413 
415  uint8_t cpuBpr[CPU_MAX];
416 
419 
426 
432 
437 
441  void softInt(ContextID ctx, SWI swi);
442 
446  virtual void updateIntState(int hint);
447 
450  void updateRunPri();
451 
453  uint64_t genSwiMask(int cpu);
454 
455  int intNumToWord(int num) const { return num >> 5; }
456  int intNumToBit(int num) const { return num % 32; }
457 
459  void clearInt(ContextID ctx, uint32_t int_num);
460 
464  void postInt(uint32_t cpu, Tick when);
465  void postFiq(uint32_t cpu, Tick when);
466 
470  void postDelayedInt(uint32_t cpu);
471  void postDelayedFiq(uint32_t cpu);
472 
476 
477  public:
478  typedef GicV2Params Params;
479  const Params *
480  params() const
481  {
482  return dynamic_cast<const Params *>(_params);
483  }
484  GicV2(const Params *p);
485  ~GicV2();
486 
487  DrainState drain() override;
488  void drainResume() override;
489 
490  void serialize(CheckpointOut &cp) const override;
491  void unserialize(CheckpointIn &cp) override;
492 
493  public: /* PioDevice */
494  AddrRangeList getAddrRanges() const override { return addrRanges; }
495 
499  Tick read(PacketPtr pkt) override;
500 
504  Tick write(PacketPtr pkt) override;
505 
506  public: /* BaseGic */
507  void sendInt(uint32_t number) override;
508  void clearInt(uint32_t number) override;
509 
510  void sendPPInt(uint32_t num, uint32_t cpu) override;
511  void clearPPInt(uint32_t num, uint32_t cpu) override;
512 
513  bool supportsVersion(GicVersion version) override;
514 
515  protected:
520  uint32_t readDistributor(ContextID ctx, Addr daddr,
521  size_t resp_sz);
522  uint32_t
523  readDistributor(ContextID ctx, Addr daddr) override
524  {
525  return readDistributor(ctx, daddr, 4);
526  }
527 
531  Tick readCpu(PacketPtr pkt);
532  uint32_t readCpu(ContextID ctx, Addr daddr) override;
533 
538  void writeDistributor(ContextID ctx, Addr daddr,
539  uint32_t data, size_t data_sz);
540  void
541  writeDistributor(ContextID ctx, Addr daddr, uint32_t data) override
542  {
543  return writeDistributor(ctx, daddr, data, 4);
544  }
545 
549  Tick writeCpu(PacketPtr pkt);
550  void writeCpu(ContextID ctx, Addr daddr, uint32_t data) override;
551 };
552 
553 #endif //__DEV_ARM_GIC_H__
GicV2::gicdIIDR
const uint32_t gicdIIDR
Definition: gic_v2.hh:78
GicV2::BankedRegs::intGroup
uint32_t intGroup
GICD_IGROUPR0 interrupt group bits for first 32 interrupts, 1b per interrupt.
Definition: gic_v2.hh:194
GicV2::getIntConfig
uint32_t & getIntConfig(ContextID ctx, uint32_t ix)
Reads the GICD_ICFGRn register.
Definition: gic_v2.hh:312
GicV2::GICC_APR2
@ GICC_APR2
Definition: gic_v2.hh:104
GicV2::pendingInt
uint32_t pendingInt[INT_BITS_MAX-1]
GICD_I{S,C}PENDR{1..31} interrupt pending bits for global interrupts 1b per interrupt,...
Definition: gic_v2.hh:234
GicV2::iccrpr
uint32_t iccrpr[CPU_MAX]
read only running priority register, 1 per cpu
Definition: gic_v2.hh:280
io_device.hh
BaseGic::Params
BaseGicParams Params
Definition: base_gic.hh:65
GicV2::writeDistributor
Tick writeDistributor(PacketPtr pkt)
Handle a write to the distributor portion of the GIC.
Definition: gic_v2.cc:384
GicV2::PPI_MAX
static const int PPI_MAX
Definition: gic_v2.hh:111
GicV2::readCpu
Tick readCpu(PacketPtr pkt)
Handle a read to the cpu portion of the GIC.
Definition: gic_v2.cc:285
GicV2::updateRunPri
void updateRunPri()
Update the register that records priority of the highest priority active interrupt.
Definition: gic_v2.cc:832
GicV2::write
Tick write(PacketPtr pkt) override
A PIO read to the device, immediately split up into writeDistributor() or writeCpu()
Definition: gic_v2.cc:124
GicV2::GICD_ISENABLER
static const AddrRange GICD_ISENABLER
Definition: gic_v2.hh:82
GicV2::GICC_ABPR
@ GICC_ABPR
Definition: gic_v2.hh:101
GicV2::SGI_MASK
static const int SGI_MASK
Mask off SGI's when setting/clearing pending bits.
Definition: gic_v2.hh:114
data
const char data[]
Definition: circlebuf.test.cc:42
GicV2::GICC_IIDR
@ GICC_IIDR
Definition: gic_v2.hh:106
GicV2::BankedRegs::BankedRegs
BankedRegs()
Definition: gic_v2.hh:207
GicV2::intLatency
const Tick intLatency
Latency for a interrupt to get to CPU.
Definition: gic_v2.hh:163
GicV2::GICD_IIDR
@ GICD_IIDR
Definition: gic_v2.hh:67
GicV2::getActiveInt
uint32_t & getActiveInt(ContextID ctx, uint32_t ix)
Definition: gic_v2.hh:253
GicV2::GICC_BPR_MINIMUM
static const int GICC_BPR_MINIMUM
minimum value for Binary Point Register ("IMPLEMENTATION DEFINED"); chosen for consistency with Linux...
Definition: gic_v2.hh:127
GicV2::intConfig
uint32_t intConfig[INT_BITS_MAX *2 - 2]
GICD_ICFGR{2...63} 2 bit per interrupt signaling if it's level or edge sensitive and if it is 1:N or ...
Definition: gic_v2.hh:303
GicV2::cpuSgiActiveExt
uint32_t cpuSgiActiveExt[CPU_MAX]
Definition: gic_v2.hh:431
GicV2::clearInt
void clearInt(ContextID ctx, uint32_t int_num)
Clears a cpu IRQ or FIQ signal.
Definition: gic_v2.cc:918
Serializable
Basic support for object serialization.
Definition: serialize.hh:172
GicV2::EndBitUnion
EndBitUnion(SWI) BitUnion32(IAR) Bitfield< 9
GicV2::distPioDelay
const Tick distPioDelay
Latency for a distributor operation.
Definition: gic_v2.hh:157
GicV2::cpu_list
Bitfield< 23, 16 > cpu_list
Definition: gic_v2.hh:131
GicV2::GLOBAL_INT_LINES
static const int GLOBAL_INT_LINES
Definition: gic_v2.hh:123
ContextID
int ContextID
Globally unique thread context ID.
Definition: types.hh:231
GicV2::DIST_SIZE
@ DIST_SIZE
Definition: gic_v2.hh:74
base_gic.hh
GicV2
Definition: gic_v2.hh:60
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
GicV2::GICC_CTLR
@ GICC_CTLR
Definition: gic_v2.hh:94
GicV2::intEnabled
uint32_t intEnabled[INT_BITS_MAX-1]
GICD_I{S,C}ENABLER{1..31} interrupt enable bits for global interrupts 1b per interrupt,...
Definition: gic_v2.hh:219
GicV2::read
Tick read(PacketPtr pkt) override
A PIO read to the device, immediately split up into readDistributor() or readCpu()
Definition: gic_v2.cc:110
GicV2::softInt
void softInt(ContextID ctx, SWI swi)
software generated interrupt
Definition: gic_v2.cc:646
GicV2::cpuPpiActive
uint32_t cpuPpiActive[CPU_MAX]
Definition: gic_v2.hh:436
GicV2::GICD_PIDR1
@ GICD_PIDR1
Definition: gic_v2.hh:70
std::vector
STL vector class.
Definition: stl.hh:37
GicV2::GICC_APR0
@ GICC_APR0
Definition: gic_v2.hh:102
GicV2::sgi_id
sgi_id
Definition: gic_v2.hh:130
GicV2::GICD_PIDR2
@ GICD_PIDR2
Definition: gic_v2.hh:71
GicV2::BankedRegs::pendingInt
uint32_t pendingInt
GICD_I{S,C}PENDR0 interrupt pending bits for first 32 interrupts, 1b per interrupt.
Definition: gic_v2.hh:186
GicV2::gem5ExtensionsEnabled
bool gem5ExtensionsEnabled
gem5 many-core extension enabled by driver
Definition: gic_v2.hh:173
GicV2::readDistributor
uint32_t readDistributor(ContextID ctx, Addr daddr) override
Definition: gic_v2.hh:523
GicV2::cpuControl
CTLR cpuControl[CPU_MAX]
GICC_CTLR: CPU interface control register.
Definition: gic_v2.hh:408
GicV2::GicV2
GicV2(const Params *p)
Definition: gic_v2.cc:62
GicV2::INT_LINES_MAX
static const int INT_LINES_MAX
Definition: gic_v2.hh:122
GicV2::postFiqEvent
EventFunctionWrapper * postFiqEvent[CPU_MAX]
Definition: gic_v2.hh:474
GicV2::getIntPriority
uint8_t & getIntPriority(ContextID ctx, uint32_t ix)
Definition: gic_v2.hh:289
GicV2::isLevelSensitive
bool isLevelSensitive(ContextID ctx, uint32_t int_num)
Definition: gic_v2.hh:354
GicV2::GICD_ICENABLER
static const AddrRange GICD_ICENABLER
Definition: gic_v2.hh:83
GicV2::intPriority
uint8_t intPriority[GLOBAL_INT_LINES]
GICD_IPRIORITYR{8..255} an 8 bit priority (lower is higher priority) for each of the global (not repl...
Definition: gic_v2.hh:286
GicV2::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: gic_v2.cc:1035
GicV2::intGroup
uint32_t intGroup[INT_BITS_MAX-1]
GICD_IGROUPR{1..31} interrupt group bits for global interrupts 1b per interrupt, 32 bits per word,...
Definition: gic_v2.hh:266
GicV2::updateIntState
virtual void updateIntState(int hint)
See if some processor interrupt flags need to be enabled/disabled.
Definition: gic_v2.cc:734
GicV2::isGroup0
bool isGroup0(ContextID ctx, uint32_t int_num)
Definition: gic_v2.hh:366
GicV2::intNumToWord
int intNumToWord(int num) const
Definition: gic_v2.hh:455
GicV2::SGI_MAX
static const int SGI_MAX
Definition: gic_v2.hh:110
GicV2::SPURIOUS_INT
static const int SPURIOUS_INT
Definition: gic_v2.hh:120
EventFunctionWrapper
Definition: eventq.hh:1101
GicV2::gicdPIDR
const uint32_t gicdPIDR
Definition: gic_v2.hh:77
GicV2::addrRanges
const AddrRangeList addrRanges
All address ranges used by this GIC.
Definition: gic_v2.hh:154
DrainState
DrainState
Object drain/handover states.
Definition: drain.hh:71
GicV2::GICC_APR3
@ GICC_APR3
Definition: gic_v2.hh:105
GicV2::cpuBpr
uint8_t cpuBpr[CPU_MAX]
Binary point registers.
Definition: gic_v2.hh:415
GicV2::GICC_IAR
@ GICC_IAR
Definition: gic_v2.hh:97
GicV2::GICC_APR1
@ GICC_APR1
Definition: gic_v2.hh:103
GicV2::CPU_MAX
static const int CPU_MAX
Definition: gic_v2.hh:119
cp
Definition: cprintf.cc:40
GicV2::GICC_BPR
@ GICC_BPR
Definition: gic_v2.hh:96
GicV2::genSwiMask
uint64_t genSwiMask(int cpu)
generate a bit mask to check cpuSgi for an interrupt.
Definition: gic_v2.cc:716
GicV2::GICD_PIDR0
@ GICD_PIDR0
Definition: gic_v2.hh:69
interrupts.hh
GicV2::BankedRegs::intPriority
uint8_t intPriority[SGI_MAX+PPI_MAX]
GICD_IPRIORITYR{0..7} interrupt priority for SGIs and PPIs.
Definition: gic_v2.hh:202
AddrRange
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
Definition: addr_range.hh:68
GicV2::GICD_ISACTIVER
static const AddrRange GICD_ISACTIVER
Definition: gic_v2.hh:86
BaseGicRegisters
Definition: base_gic.hh:117
GicV2::NN_CONFIG_MASK
static const int NN_CONFIG_MASK
Mask for bits that config N:N mode in GICD_ICFGR's.
Definition: gic_v2.hh:117
GicV2::GICD_IPRIORITYR
static const AddrRange GICD_IPRIORITYR
Definition: gic_v2.hh:88
GicV2::list_type
Bitfield< 25, 24 > list_type
Definition: gic_v2.hh:132
GicV2::params
const Params * params() const
Definition: gic_v2.hh:480
GicV2::postInt
void postInt(uint32_t cpu, Tick when)
Post an interrupt to a CPU with a delay.
Definition: gic_v2.cc:928
GicV2::enableGrp1
Bitfield< 1 > enableGrp1
Definition: gic_v2.hh:142
bitunion.hh
GicV2::cpuPriority
uint8_t cpuPriority[CPU_MAX]
CPU priority.
Definition: gic_v2.hh:411
GicV2::GICC_HPPIR
@ GICC_HPPIR
Definition: gic_v2.hh:100
GicV2::cpuSgiPending
uint64_t cpuSgiPending[SGI_MAX]
One bit per cpu per software interrupt that is pending for each possible sgi source.
Definition: gic_v2.hh:424
GicV2::getPendingInt
uint32_t & getPendingInt(ContextID ctx, uint32_t ix)
Definition: gic_v2.hh:237
GicV2::GICD_ICACTIVER
static const AddrRange GICD_ICACTIVER
Definition: gic_v2.hh:87
GicV2::activeInt
uint32_t activeInt[INT_BITS_MAX-1]
GICD_I{S,C}ACTIVER{1..31} interrupt active bits for global interrupts 1b per interrupt,...
Definition: gic_v2.hh:250
GicV2::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: gic_v2.cc:990
GicV2::getIntEnabled
uint32_t & getIntEnabled(ContextID ctx, uint32_t ix)
Definition: gic_v2.hh:222
GicV2::sendInt
void sendInt(uint32_t number) override
Post an interrupt from a device that is connected to the GIC.
Definition: gic_v2.cc:861
GicV2::cpuSgiActive
uint64_t cpuSgiActive[SGI_MAX]
Definition: gic_v2.hh:425
GicV2::supportsVersion
bool supportsVersion(GicVersion version) override
Check if version supported.
Definition: gic_v2.cc:956
GicV2::readDistributor
Tick readDistributor(PacketPtr pkt)
Handle a read to the distributor portion of the GIC.
Definition: gic_v2.cc:137
GicV2::pendingDelayedInterrupts
int pendingDelayedInterrupts
Definition: gic_v2.hh:475
GicV2::postDelayedFiq
void postDelayedFiq(uint32_t cpu)
Definition: gic_v2.cc:962
GicV2::BankedRegs::activeInt
uint32_t activeInt
GICD_I{S,C}ACTIVER0 interrupt active bits for first 32 interrupts, 1b per interrupt.
Definition: gic_v2.hh:190
GicV2::itLines
uint32_t itLines
Number of itLines enabled.
Definition: gic_v2.hh:176
GicV2::drain
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
Definition: gic_v2.cc:972
platform.hh
GicV2::getAddrRanges
AddrRangeList getAddrRanges() const override
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
Definition: gic_v2.hh:494
GicV2::postIntEvent
EventFunctionWrapper * postIntEvent[CPU_MAX]
Definition: gic_v2.hh:473
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
GicV2::getCpuTarget
uint8_t getCpuTarget(ContextID ctx, uint32_t ix) const
Definition: gic_v2.hh:329
addr_range.hh
GicV2::cpuHighestInt
uint32_t cpuHighestInt[CPU_MAX]
highest interrupt that is interrupting CPU
Definition: gic_v2.hh:418
GicV2::GICD_PIDR3
@ GICD_PIDR3
Definition: gic_v2.hh:72
GicV2::GICC_EOIR
@ GICC_EOIR
Definition: gic_v2.hh:98
GicV2::BankedRegs::intConfig
uint32_t intConfig[2]
GICD_ICFGR0, GICD_ICFGR1 interrupt config bits for first 32 interrupts, 2b per interrupt.
Definition: gic_v2.hh:198
SimObject::name
virtual const std::string name() const
Definition: sim_object.hh:133
GicV2::getCpuPriority
uint8_t getCpuPriority(unsigned cpu)
Definition: gic_v2.cc:723
GicV2::enabled
bool enabled
Gic enabled.
Definition: gic_v2.hh:167
GicV2::cpuEnabled
bool cpuEnabled(ContextID ctx) const
CPU enabled: Checks if GICC_CTLR.EnableGrp0 or EnableGrp1 are set.
Definition: gic_v2.hh:399
GicV2::GICD_ICFGR
static const AddrRange GICD_ICFGR
Definition: gic_v2.hh:90
GicV2::enableGrp0
Bitfield< 0 > enableGrp0
Definition: gic_v2.hh:143
GicV2::cpuTarget
uint8_t cpuTarget[GLOBAL_INT_LINES]
GICD_ITARGETSR{8..255} an 8 bit cpu target id for each global interrupt.
Definition: gic_v2.hh:326
GicV2::bankedRegs
std::vector< BankedRegs * > bankedRegs
Definition: gic_v2.hh:212
GicV2::cpuSgiPendingExt
uint32_t cpuSgiPendingExt[CPU_MAX]
SGI pending arrays for gem5 GIC extension mode, which instead keeps 16 SGI pending bits for each of t...
Definition: gic_v2.hh:430
GicV2::INT_BITS_MAX
static const int INT_BITS_MAX
Definition: gic_v2.hh:121
GicV2::giccIIDR
const uint32_t giccIIDR
Definition: gic_v2.hh:79
GicV2::GICD_ISPENDR
static const AddrRange GICD_ISPENDR
Definition: gic_v2.hh:84
GicV2::getIntGroup
uint32_t & getIntGroup(ContextID ctx, uint32_t ix)
Definition: gic_v2.hh:269
BaseGic
Definition: base_gic.hh:62
GicV2::~GicV2
~GicV2()
Definition: gic_v2.cc:101
GicV2::clearPPInt
void clearPPInt(uint32_t num, uint32_t cpu) override
Definition: gic_v2.cc:903
SimObject::_params
const SimObjectParams * _params
Cached copy of the object parameters.
Definition: sim_object.hh:110
GicV2::GICD_TYPER
@ GICD_TYPER
Definition: gic_v2.hh:66
GicV2::GICD_SGIR
@ GICD_SGIR
Definition: gic_v2.hh:68
intr_control.hh
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
GicV2::GICD_ITARGETSR
static const AddrRange GICD_ITARGETSR
Definition: gic_v2.hh:89
GicV2::GICD_ICPENDR
static const AddrRange GICD_ICPENDR
Definition: gic_v2.hh:85
GicV2::BankedRegs
Registers "banked for each connected processor" per ARM IHI0048B.
Definition: gic_v2.hh:179
GicV2::drainResume
void drainResume() override
Resume execution after a successful drain.
Definition: gic_v2.cc:983
GicV2::GICD_CTLR
@ GICD_CTLR
Definition: gic_v2.hh:65
GicV2::haveGem5Extensions
const bool haveGem5Extensions
Are gem5 extensions available?
Definition: gic_v2.hh:170
CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:63
GicV2::intNumToBit
int intNumToBit(int num) const
Definition: gic_v2.hh:456
GicV2::sendPPInt
void sendPPInt(uint32_t num, uint32_t cpu) override
Interface call for private peripheral interrupts.
Definition: gic_v2.cc:875
GicV2::GICC_PMR
@ GICC_PMR
Definition: gic_v2.hh:95
GicV2::isFiq
bool isFiq(ContextID ctx, uint32_t int_num)
This method checks if an interrupt ID must be signaled or has been signaled as a FIQ to the cpu.
Definition: gic_v2.hh:383
GicV2::writeCpu
Tick writeCpu(PacketPtr pkt)
Handle a write to the cpu portion of the GIC.
Definition: gic_v2.cc:555
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
std::list< AddrRange >
GicV2::postFiq
void postFiq(uint32_t cpu, Tick when)
Definition: gic_v2.cc:947
GicV2::writeDistributor
void writeDistributor(ContextID ctx, Addr daddr, uint32_t data) override
Definition: gic_v2.hh:541
GicV2::BitUnion32
BitUnion32(SWI) Bitfield< 3
GicV2::postDelayedInt
void postDelayedInt(uint32_t cpu)
Deliver a delayed interrupt to the target CPU.
Definition: gic_v2.cc:937
GicV2::cpu_id
Bitfield< 12, 10 > cpu_id
Definition: gic_v2.hh:137
GicV2::getBankedRegs
BankedRegs & getBankedRegs(ContextID)
Definition: gic_v2.cc:636
fatal_if
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Definition: logging.hh:219
CheckpointIn
Definition: serialize.hh:67
GicV2::ack_id
ack_id
Definition: gic_v2.hh:136
GicV2::BankedRegs::intEnabled
uint32_t intEnabled
GICD_I{S,C}ENABLER0 interrupt enable bits for first 32 interrupts, 1b per interrupt.
Definition: gic_v2.hh:182
GicV2::GICC_RPR
@ GICC_RPR
Definition: gic_v2.hh:99
BaseGic::GicVersion
GicVersion
Definition: base_gic.hh:66
GicV2::cpuRange
const EndBitUnion(CTLR) protected AddrRange cpuRange
Address range for the distributor interface.
Definition: gic_v2.hh:144
GicV2::Params
GicV2Params Params
Definition: gic_v2.hh:478
GicV2::cpuPioDelay
const Tick cpuPioDelay
Latency for a cpu operation.
Definition: gic_v2.hh:160
GicV2::GICC_DIR
@ GICC_DIR
Definition: gic_v2.hh:107
GicV2::GICD_IGROUPR
static const AddrRange GICD_IGROUPR
Definition: gic_v2.hh:81
GicV2::cpuPpiPending
uint32_t cpuPpiPending[CPU_MAX]
One bit per private peripheral interrupt.
Definition: gic_v2.hh:435
bits
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Definition: bitfield.hh:75

Generated on Wed Sep 30 2020 14:02:10 for gem5 by doxygen 1.8.17