gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
gic_v2.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010, 2013, 2015-2019 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  * Authors: Ali Saidi
41  */
42 
43 
48 #ifndef __DEV_ARM_GICV2_H__
49 #define __DEV_ARM_GICV2_H__
50 
51 #include <vector>
52 
53 #include "base/addr_range.hh"
54 #include "base/bitunion.hh"
55 #include "cpu/intr_control.hh"
56 #include "dev/arm/base_gic.hh"
57 #include "dev/io_device.hh"
58 #include "dev/platform.hh"
59 #include "params/GicV2.hh"
60 
61 class GicV2 : public BaseGic, public BaseGicRegisters
62 {
63  protected:
64  // distributor memory addresses
65  enum {
66  GICD_CTLR = 0x000, // control register
67  GICD_TYPER = 0x004, // controller type
68  GICD_IIDR = 0x008, // implementer id
69  GICD_SGIR = 0xf00, // software generated interrupt
70  GICD_PIDR0 = 0xfe0, // distributor peripheral ID0
71  GICD_PIDR1 = 0xfe4, // distributor peripheral ID1
72  GICD_PIDR2 = 0xfe8, // distributor peripheral ID2
73  GICD_PIDR3 = 0xfec, // distributor peripheral ID3
74 
75  DIST_SIZE = 0x1000,
76  };
77 
78  const uint32_t gicdPIDR;
79  const uint32_t gicdIIDR;
80  const uint32_t giccIIDR;
81 
82  static const AddrRange GICD_IGROUPR; // interrupt group (unimplemented)
83  static const AddrRange GICD_ISENABLER; // interrupt set enable
84  static const AddrRange GICD_ICENABLER; // interrupt clear enable
85  static const AddrRange GICD_ISPENDR; // set pending interrupt
86  static const AddrRange GICD_ICPENDR; // clear pending interrupt
87  static const AddrRange GICD_ISACTIVER; // active bit registers
88  static const AddrRange GICD_ICACTIVER; // clear bit registers
89  static const AddrRange GICD_IPRIORITYR; // interrupt priority registers
90  static const AddrRange GICD_ITARGETSR; // processor target registers
91  static const AddrRange GICD_ICFGR; // interrupt config registers
92 
93  // cpu memory addresses
94  enum {
95  GICC_CTLR = 0x00, // CPU control register
96  GICC_PMR = 0x04, // Interrupt priority mask
97  GICC_BPR = 0x08, // binary point register
98  GICC_IAR = 0x0C, // interrupt ack register
99  GICC_EOIR = 0x10, // end of interrupt
100  GICC_RPR = 0x14, // running priority
101  GICC_HPPIR = 0x18, // highest pending interrupt
102  GICC_ABPR = 0x1c, // aliased binary point
103  GICC_APR0 = 0xd0, // active priority register 0
104  GICC_APR1 = 0xd4, // active priority register 1
105  GICC_APR2 = 0xd8, // active priority register 2
106  GICC_APR3 = 0xdc, // active priority register 3
107  GICC_IIDR = 0xfc, // cpu interface id register
108  GICC_DIR = 0x1000, // deactive interrupt register
109  };
110 
111  static const int SGI_MAX = 16; // Number of Software Gen Interrupts
112  static const int PPI_MAX = 16; // Number of Private Peripheral Interrupts
113 
115  static const int SGI_MASK = 0xFFFF0000;
116 
118  static const int NN_CONFIG_MASK = 0x55555555;
119 
120  static const int CPU_MAX = 256; // Max number of supported CPU interfaces
121  static const int SPURIOUS_INT = 1023;
122  static const int INT_BITS_MAX = 32;
123  static const int INT_LINES_MAX = 1020;
124  static const int GLOBAL_INT_LINES = INT_LINES_MAX - SGI_MAX - PPI_MAX;
125 
128  static const int GICC_BPR_MINIMUM = 2;
129 
130  BitUnion32(SWI)
131  Bitfield<3,0> sgi_id;
132  Bitfield<23,16> cpu_list;
133  Bitfield<25,24> list_type;
134  EndBitUnion(SWI)
135 
136  BitUnion32(IAR)
137  Bitfield<9,0> ack_id;
138  Bitfield<12,10> cpu_id;
139  EndBitUnion(IAR)
140 
141  BitUnion32(CTLR)
142  Bitfield<3> fiqEn;
143  Bitfield<1> enableGrp1;
144  Bitfield<0> enableGrp0;
146 
147  protected: /* Params */
149  const AddrRange distRange;
150 
152  const AddrRange cpuRange;
153 
156 
159 
162 
165 
166  protected:
168  bool enabled;
169 
171  const bool haveGem5Extensions;
172 
175 
177  uint32_t itLines;
178 
180  struct BankedRegs : public Serializable {
183  uint32_t intEnabled;
184 
187  uint32_t pendingInt;
188 
191  uint32_t activeInt;
192 
195  uint32_t intGroup;
196 
199  uint8_t intPriority[SGI_MAX + PPI_MAX];
200 
201  void serialize(CheckpointOut &cp) const override;
202  void unserialize(CheckpointIn &cp) override;
203 
205  intEnabled(0), pendingInt(0), activeInt(0),
206  intGroup(0), intPriority {0}
207  {}
208  };
210 
212 
216  uint32_t intEnabled[INT_BITS_MAX-1];
217 
218  uint32_t& getIntEnabled(ContextID ctx, uint32_t ix) {
219  if (ix == 0) {
220  return getBankedRegs(ctx).intEnabled;
221  } else {
222  return intEnabled[ix - 1];
223  }
224  }
225 
229  uint32_t pendingInt[INT_BITS_MAX-1];
230 
231  uint32_t& getPendingInt(ContextID ctx, uint32_t ix) {
232  assert(ix < INT_BITS_MAX);
233  if (ix == 0) {
234  return getBankedRegs(ctx).pendingInt;
235  } else {
236  return pendingInt[ix - 1];
237  }
238  }
239 
243  uint32_t activeInt[INT_BITS_MAX-1];
244 
245  uint32_t& getActiveInt(ContextID ctx, uint32_t ix) {
246  assert(ix < INT_BITS_MAX);
247  if (ix == 0) {
248  return getBankedRegs(ctx).activeInt;
249  } else {
250  return activeInt[ix - 1];
251  }
252  }
253 
257  uint32_t intGroup[INT_BITS_MAX-1];
258 
259  uint32_t& getIntGroup(ContextID ctx, uint32_t ix) {
260  assert(ix < INT_BITS_MAX);
261  if (ix == 0) {
262  return getBankedRegs(ctx).intGroup;
263  } else {
264  return intGroup[ix - 1];
265  }
266  }
267 
269  uint32_t iccrpr[CPU_MAX];
270 
276 
277  uint8_t& getIntPriority(ContextID ctx, uint32_t ix) {
278  assert(ix < INT_LINES_MAX);
279  if (ix < SGI_MAX + PPI_MAX) {
280  return getBankedRegs(ctx).intPriority[ix];
281  } else {
282  return intPriority[ix - (SGI_MAX + PPI_MAX)];
283  }
284  }
285 
289  uint8_t getIntConfig(ContextID ctx, uint32_t ix) {
290  assert(ix < INT_LINES_MAX);
291  const uint8_t cfg_low = intNumToBit(ix * 2);
292  const uint8_t cfg_hi = cfg_low + 1;
293  return bits(intConfig[intNumToWord(ix * 2)], cfg_hi, cfg_low);
294  }
295 
300 
301  uint8_t getCpuTarget(ContextID ctx, uint32_t ix) {
302  assert(ctx < sys->numRunningContexts());
303  assert(ix < INT_LINES_MAX);
304  if (ix < SGI_MAX + PPI_MAX) {
305  // "GICD_ITARGETSR0 to GICD_ITARGETSR7 are read-only, and each
306  // field returns a value that corresponds only to the processor
307  // reading the register."
308  uint32_t ctx_mask;
309  if (gem5ExtensionsEnabled) {
310  ctx_mask = ctx;
311  } else {
312  fatal_if(ctx >= 8,
313  "%s requires the gem5_extensions parameter to support "
314  "more than 8 cores\n", name());
315  // convert the CPU id number into a bit mask
316  ctx_mask = 1 << ctx;
317  }
318  return ctx_mask;
319  } else {
320  return cpuTarget[ix - 32];
321  }
322  }
323 
326  uint32_t intConfig[INT_BITS_MAX*2];
327 
328  bool isLevelSensitive(ContextID ctx, uint32_t ix) {
329  if (ix == SPURIOUS_INT) {
330  return false;
331  } else {
332  return bits(getIntConfig(ctx, ix), 1) == 0;
333  }
334  }
335 
336  bool isGroup0(ContextID ctx, uint32_t int_num) {
337  const uint32_t group_reg = getIntGroup(ctx, intNumToWord(int_num));
338  return !bits(group_reg, intNumToBit(int_num));
339  }
340 
351  bool isFiq(ContextID ctx, uint32_t int_num) {
352  const bool is_group0 = isGroup0(ctx, int_num);
353  const bool use_fiq = cpuControl[ctx].fiqEn;
354 
355  if (is_group0 && use_fiq) {
356  return true;
357  } else {
358  return false;
359  }
360  }
361 
365  bool cpuEnabled(ContextID ctx) const {
366  return cpuControl[ctx].enableGrp0 ||
367  cpuControl[ctx].enableGrp1;
368  }
369 
374 
377  uint8_t getCpuPriority(unsigned cpu); // BPR-adjusted priority value
378 
380  uint8_t cpuBpr[CPU_MAX];
381 
384 
391 
397 
402 
406  void softInt(ContextID ctx, SWI swi);
407 
411  virtual void updateIntState(int hint);
412 
415  void updateRunPri();
416 
418  uint64_t genSwiMask(int cpu);
419 
420  int intNumToWord(int num) const { return num >> 5; }
421  int intNumToBit(int num) const { return num % 32; }
422 
424  void clearInt(ContextID ctx, uint32_t int_num);
425 
429  void postInt(uint32_t cpu, Tick when);
430  void postFiq(uint32_t cpu, Tick when);
431 
435  void postDelayedInt(uint32_t cpu);
436  void postDelayedFiq(uint32_t cpu);
437 
441 
442  public:
443  typedef GicV2Params Params;
444  const Params *
445  params() const
446  {
447  return dynamic_cast<const Params *>(_params);
448  }
449  GicV2(const Params *p);
450  ~GicV2();
451 
452  DrainState drain() override;
453  void drainResume() override;
454 
455  void serialize(CheckpointOut &cp) const override;
456  void unserialize(CheckpointIn &cp) override;
457 
458  public: /* PioDevice */
459  AddrRangeList getAddrRanges() const override { return addrRanges; }
460 
464  Tick read(PacketPtr pkt) override;
465 
469  Tick write(PacketPtr pkt) override;
470 
471  public: /* BaseGic */
472  void sendInt(uint32_t number) override;
473  void clearInt(uint32_t number) override;
474 
475  void sendPPInt(uint32_t num, uint32_t cpu) override;
476  void clearPPInt(uint32_t num, uint32_t cpu) override;
477 
478  bool supportsVersion(GicVersion version) override;
479 
480  protected:
485  uint32_t readDistributor(ContextID ctx, Addr daddr,
486  size_t resp_sz);
487  uint32_t readDistributor(ContextID ctx, Addr daddr) override {
488  return readDistributor(ctx, daddr, 4);
489  }
490 
494  Tick readCpu(PacketPtr pkt);
495  uint32_t readCpu(ContextID ctx, Addr daddr) override;
496 
501  void writeDistributor(ContextID ctx, Addr daddr,
502  uint32_t data, size_t data_sz);
503  void writeDistributor(ContextID ctx, Addr daddr,
504  uint32_t data) override {
505  return writeDistributor(ctx, daddr, data, 4);
506  }
507 
511  Tick writeCpu(PacketPtr pkt);
512  void writeCpu(ContextID ctx, Addr daddr, uint32_t data) override;
513 };
514 
515 #endif //__DEV_ARM_GIC_H__
uint32_t cpuSgiActiveExt[CPU_MAX]
Definition: gic_v2.hh:396
void clearInt(ContextID ctx, uint32_t int_num)
Clears a cpu IRQ or FIQ signal.
Definition: gic_v2.cc:916
static const int GLOBAL_INT_LINES
Definition: gic_v2.hh:124
Bitfield< 23, 16 > cpu_list
Definition: gic_v2.hh:132
static const AddrRange GICD_IGROUPR
Definition: gic_v2.hh:82
EndBitUnion(CTLR) protected const AddrRange cpuRange
Address range for the distributor interface.
Definition: gic_v2.hh:145
Registers "banked for each connected processor" per ARM IHI0048B.
Definition: gic_v2.hh:180
const uint32_t gicdIIDR
Definition: gic_v2.hh:79
uint32_t intEnabled[INT_BITS_MAX-1]
GICD_I{S,C}ENABLER{1..31} interrupt enable bits for global interrupts 1b per interrupt, 32 bits per word, 31 words.
Definition: gic_v2.hh:216
ack_id
Definition: gic_v2.hh:137
uint32_t iccrpr[CPU_MAX]
read only running priority register, 1 per cpu
Definition: gic_v2.hh:269
DrainState
Object drain/handover states.
Definition: drain.hh:71
sgi_id
Definition: gic_v2.hh:131
static const int PPI_MAX
Definition: gic_v2.hh:112
uint32_t readDistributor(ContextID ctx, Addr daddr) override
Definition: gic_v2.hh:487
static const AddrRange GICD_ISENABLER
Definition: gic_v2.hh:83
CTLR cpuControl[CPU_MAX]
GICC_CTLR: CPU interface control register.
Definition: gic_v2.hh:373
GicV2(const Params *p)
Definition: gic_v2.cc:65
uint32_t activeInt
GICD_I{S,C}ACTIVER0 interrupt active bits for first 32 interrupts, 1b per interrupt.
Definition: gic_v2.hh:191
static const AddrRange GICD_ICENABLER
Definition: gic_v2.hh:84
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:275
void softInt(ContextID ctx, SWI swi)
software generated interrupt
Definition: gic_v2.cc:649
uint32_t & getActiveInt(ContextID ctx, uint32_t ix)
Definition: gic_v2.hh:245
uint32_t pendingInt[INT_BITS_MAX-1]
GICD_I{S,C}PENDR{1..31} interrupt pending bits for global interrupts 1b per interrupt, 32 bits per word, 31 words.
Definition: gic_v2.hh:229
EndBitUnion(SWI) BitUnion32(IAR) Bitfield< 9
Tick readCpu(PacketPtr pkt)
Handle a read to the cpu portion of the GIC.
Definition: gic_v2.cc:291
uint8_t cpuBpr[CPU_MAX]
Binary point registers.
Definition: gic_v2.hh:380
static const int SGI_MASK
Mask off SGI&#39;s when setting/clearing pending bits.
Definition: gic_v2.hh:115
Tick write(PacketPtr pkt) override
A PIO read to the device, immediately split up into writeDistributor() or writeCpu() ...
Definition: gic_v2.cc:127
uint32_t pendingInt
GICD_I{S,C}PENDR0 interrupt pending bits for first 32 interrupts, 1b per interrupt.
Definition: gic_v2.hh:187
EventFunctionWrapper * postFiqEvent[CPU_MAX]
Definition: gic_v2.hh:439
static const int INT_LINES_MAX
Definition: gic_v2.hh:123
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: gic_v2.cc:1032
Definition: cprintf.cc:42
const Tick intLatency
Latency for a interrupt to get to CPU.
Definition: gic_v2.hh:164
bool isGroup0(ContextID ctx, uint32_t int_num)
Definition: gic_v2.hh:336
virtual void updateIntState(int hint)
See if some processor interrupt flags need to be enabled/disabled.
Definition: gic_v2.cc:738
static const AddrRange GICD_ISACTIVER
Definition: gic_v2.hh:87
static const AddrRange GICD_IPRIORITYR
Definition: gic_v2.hh:89
bool isLevelSensitive(ContextID ctx, uint32_t ix)
Definition: gic_v2.hh:328
const Tick distPioDelay
Latency for a distributor operation.
Definition: gic_v2.hh:158
STL vector class.
Definition: stl.hh:40
bool gem5ExtensionsEnabled
gem5 many-core extension enabled by driver
Definition: gic_v2.hh:174
uint8_t intPriority[SGI_MAX+PPI_MAX]
GICD_IPRIORITYR{0..7} interrupt priority for SGIs and PPIs.
Definition: gic_v2.hh:199
uint8_t & getIntPriority(ContextID ctx, uint32_t ix)
Definition: gic_v2.hh:277
Tick read(PacketPtr pkt) override
A PIO read to the device, immediately split up into readDistributor() or readCpu() ...
Definition: gic_v2.cc:113
uint32_t cpuPpiActive[CPU_MAX]
Definition: gic_v2.hh:401
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
Definition: addr_range.hh:72
static const int SPURIOUS_INT
Definition: gic_v2.hh:121
static const int NN_CONFIG_MASK
Mask for bits that config N:N mode in GICD_ICFGR&#39;s.
Definition: gic_v2.hh:118
uint32_t intEnabled
GICD_I{S,C}ENABLER0 interrupt enable bits for first 32 interrupts, 1b per interrupt.
Definition: gic_v2.hh:183
const uint32_t gicdPIDR
Definition: gic_v2.hh:78
Tick readDistributor(PacketPtr pkt)
Handle a read to the distributor portion of the GIC.
Definition: gic_v2.cc:140
static const int CPU_MAX
Definition: gic_v2.hh:120
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:459
uint64_t cpuSgiPending[SGI_MAX]
One bit per cpu per software interrupt that is pending for each possible sgi source.
Definition: gic_v2.hh:389
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:257
uint64_t Tick
Tick count type.
Definition: types.hh:63
uint64_t genSwiMask(int cpu)
generate a bit mask to check cpuSgi for an interrupt.
Definition: gic_v2.cc:719
int intNumToWord(int num) const
Definition: gic_v2.hh:420
static const int SGI_MAX
Definition: gic_v2.hh:111
const AddrRangeList addrRanges
All address ranges used by this GIC.
Definition: gic_v2.hh:155
Bitfield< 25, 24 > list_type
Definition: gic_v2.hh:133
bool supportsVersion(GicVersion version) override
Check if version supported.
Definition: gic_v2.cc:954
uint64_t cpuSgiActive[SGI_MAX]
Definition: gic_v2.hh:390
bool cpuEnabled(ContextID ctx) const
CPU enabled: Checks if GICC_CTLR.EnableGrp0 or EnableGrp1 are set.
Definition: gic_v2.hh:365
uint8_t cpuPriority[CPU_MAX]
CPU priority.
Definition: gic_v2.hh:376
Bitfield< 0 > enableGrp0
Definition: gic_v2.hh:144
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Definition: logging.hh:203
DrainState drain() override
Notify an object that it needs to drain its state.
Definition: gic_v2.cc:970
static const int INT_BITS_MAX
Definition: gic_v2.hh:122
static const AddrRange GICD_ICACTIVER
Definition: gic_v2.hh:88
GicVersion
Definition: base_gic.hh:68
uint32_t activeInt[INT_BITS_MAX-1]
GICD_I{S,C}ACTIVER{1..31} interrupt active bits for global interrupts 1b per interrupt, 32 bits per word, 31 words.
Definition: gic_v2.hh:243
uint32_t & getIntGroup(ContextID ctx, uint32_t ix)
Definition: gic_v2.hh:259
uint32_t & getIntEnabled(ContextID ctx, uint32_t ix)
Definition: gic_v2.hh:218
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
uint8_t getIntConfig(ContextID ctx, uint32_t ix)
GICD_ICFGRn get 2 bit config associated to an interrupt.
Definition: gic_v2.hh:289
virtual const std::string name() const
Definition: sim_object.hh:120
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Definition: packet.hh:255
void postInt(uint32_t cpu, Tick when)
Post an interrupt to a CPU with a delay.
Definition: gic_v2.cc:926
const Params * params() const
Definition: gic_v2.hh:445
void sendInt(uint32_t number) override
Post an interrupt from a device that is connected to the GIC.
Definition: gic_v2.cc:865
Basic support for object serialization.
Definition: serialize.hh:153
static const AddrRange GICD_ICPENDR
Definition: gic_v2.hh:86
std::vector< BankedRegs * > bankedRegs
Definition: gic_v2.hh:209
Bitfield< 1 > enableGrp1
Definition: gic_v2.hh:143
EventFunctionWrapper * postIntEvent[CPU_MAX]
Definition: gic_v2.hh:438
uint32_t & getPendingInt(ContextID ctx, uint32_t ix)
Definition: gic_v2.hh:231
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: gic_v2.cc:988
Definition: gic_v2.hh:61
void clearPPInt(uint32_t num, uint32_t cpu) override
Definition: gic_v2.cc:907
Generic interface for platforms.
uint32_t intGroup
GICD_IGROUPR0 interrupt group bits for first 32 interrupts, 1b per interrupt.
Definition: gic_v2.hh:195
Base class for ARM GIC implementations.
Tick writeCpu(PacketPtr pkt)
Handle a write to the cpu portion of the GIC.
Definition: gic_v2.cc:558
uint32_t cpuHighestInt[CPU_MAX]
highest interrupt that is interrupting CPU
Definition: gic_v2.hh:383
int pendingDelayedInterrupts
Definition: gic_v2.hh:440
std::ostream CheckpointOut
Definition: serialize.hh:68
BankedRegs & getBankedRegs(ContextID)
Definition: gic_v2.cc:639
void postDelayedFiq(uint32_t cpu)
Definition: gic_v2.cc:960
Bitfield< 12, 10 > cpu_id
Definition: gic_v2.hh:138
uint8_t getCpuPriority(unsigned cpu)
Definition: gic_v2.cc:727
uint8_t getCpuTarget(ContextID ctx, uint32_t ix)
Definition: gic_v2.hh:301
void postDelayedInt(uint32_t cpu)
Deliver a delayed interrupt to the target CPU.
Definition: gic_v2.cc:935
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:395
uint32_t itLines
Number of itLines enabled.
Definition: gic_v2.hh:177
const Tick cpuPioDelay
Latency for a cpu operation.
Definition: gic_v2.hh:161
const SimObjectParams * _params
Cached copy of the object parameters.
Definition: sim_object.hh:110
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:351
static const AddrRange GICD_ITARGETSR
Definition: gic_v2.hh:90
BitUnion32(SWI) Bitfield< 3
bool enabled
Gic enabled.
Definition: gic_v2.hh:168
void drainResume() override
Resume execution after a successful drain.
Definition: gic_v2.cc:981
static const AddrRange GICD_ICFGR
Definition: gic_v2.hh:91
uint8_t cpuTarget[GLOBAL_INT_LINES]
GICD_ITARGETSR{8..255} an 8 bit cpu target id for each global interrupt.
Definition: gic_v2.hh:299
const uint32_t giccIIDR
Definition: gic_v2.hh:80
static const AddrRange GICD_ISPENDR
Definition: gic_v2.hh:85
void sendPPInt(uint32_t num, uint32_t cpu) override
Interface call for private peripheral interrupts.
Definition: gic_v2.cc:879
~GicV2()
Definition: gic_v2.cc:104
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
Tick writeDistributor(PacketPtr pkt)
Handle a write to the distributor portion of the GIC.
Definition: gic_v2.cc:389
Bitfield< 0 > p
void updateRunPri()
Update the register that records priority of the highest priority active interrupt.
Definition: gic_v2.cc:836
void writeDistributor(ContextID ctx, Addr daddr, uint32_t data) override
Definition: gic_v2.hh:503
const char data[]
uint32_t cpuPpiPending[CPU_MAX]
One bit per private peripheral interrupt.
Definition: gic_v2.hh:400
void postFiq(uint32_t cpu, Tick when)
Definition: gic_v2.cc:945
int ContextID
Globally unique thread context ID.
Definition: types.hh:231
uint32_t intConfig[INT_BITS_MAX *2]
2 bit per interrupt signaling if it&#39;s level or edge sensitive and if it is 1:N or N:N ...
Definition: gic_v2.hh:326
const bool haveGem5Extensions
Are gem5 extensions available?
Definition: gic_v2.hh:171
static const int GICC_BPR_MINIMUM
minimum value for Binary Point Register ("IMPLEMENTATION DEFINED"); chosen for consistency with Linux...
Definition: gic_v2.hh:128
int intNumToBit(int num) const
Definition: gic_v2.hh:421
GicV2Params Params
Definition: gic_v2.hh:443

Generated on Fri Feb 28 2020 16:27:00 for gem5 by doxygen 1.8.13