gem5 [DEVELOP-FOR-25.1]
Loading...
Searching...
No Matches
gic_v2.hh
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010, 2013, 2015-2022 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
45
46#ifndef __DEV_ARM_GICV2_H__
47#define __DEV_ARM_GICV2_H__
48
49#include <vector>
50
52#include "base/addr_range.hh"
53#include "base/bitunion.hh"
54#include "dev/arm/base_gic.hh"
55#include "dev/io_device.hh"
56#include "dev/platform.hh"
57
58namespace gem5
59{
60
61struct GicV2Params;
62
64{
65 public:
66 virtual ~GicV2Registers() = default;
67 virtual uint32_t readDistributor(ContextID ctx, Addr daddr) = 0;
68 virtual uint32_t readCpu(ContextID ctx, Addr daddr) = 0;
69
70 virtual void writeDistributor(ContextID ctx, Addr daddr,
71 uint32_t data) = 0;
72 virtual void writeCpu(ContextID ctx, Addr daddr, uint32_t data) = 0;
73
74 protected:
75 static void copyDistRegister(GicV2Registers* from,
77 ContextID ctx, Addr daddr);
78 static void copyCpuRegister(GicV2Registers* from,
80 ContextID ctx, Addr daddr);
81 static void copyBankedDistRange(System *sys,
82 GicV2Registers* from,
84 Addr daddr, size_t size);
86 Addr daddr, size_t size);
87 static void copyDistRange(GicV2Registers* from,
89 Addr daddr, size_t size);
90 static void clearDistRange(GicV2Registers* to, Addr daddr, size_t size);
91};
92
93class GicV2 : public BaseGic, public GicV2Registers
94{
95 protected:
96 // distributor memory addresses
97 enum
98 {
99 GICD_CTLR = 0x000, // control register
100 GICD_TYPER = 0x004, // controller type
101 GICD_IIDR = 0x008, // implementer id
102 GICD_SGIR = 0xf00, // software generated interrupt
103 GICD_PIDR0 = 0xfe0, // distributor peripheral ID0
104 GICD_PIDR1 = 0xfe4, // distributor peripheral ID1
105 GICD_PIDR2 = 0xfe8, // distributor peripheral ID2
106 GICD_PIDR3 = 0xfec, // distributor peripheral ID3
107
108 DIST_SIZE = 0x1000,
109 };
110
111 const uint32_t gicdPIDR;
112 const uint32_t gicdIIDR;
113 const uint32_t giccIIDR;
114
115 static const AddrRange GICD_IGROUPR; // interrupt group (unimplemented)
116 static const AddrRange GICD_ISENABLER; // interrupt set enable
117 static const AddrRange GICD_ICENABLER; // interrupt clear enable
118 static const AddrRange GICD_ISPENDR; // set pending interrupt
119 static const AddrRange GICD_ICPENDR; // clear pending interrupt
120 static const AddrRange GICD_ISACTIVER; // active bit registers
121 static const AddrRange GICD_ICACTIVER; // clear bit registers
122 static const AddrRange GICD_IPRIORITYR; // interrupt priority registers
123 static const AddrRange GICD_ITARGETSR; // processor target registers
124 static const AddrRange GICD_ICFGR; // interrupt config registers
125
126 // cpu memory addresses
127 enum
128 {
129 GICC_CTLR = 0x00, // CPU control register
130 GICC_PMR = 0x04, // Interrupt priority mask
131 GICC_BPR = 0x08, // binary point register
132 GICC_IAR = 0x0C, // interrupt ack register
133 GICC_EOIR = 0x10, // end of interrupt
134 GICC_RPR = 0x14, // running priority
135 GICC_HPPIR = 0x18, // highest pending interrupt
136 GICC_ABPR = 0x1c, // aliased binary point
137 GICC_APR0 = 0xd0, // active priority register 0
138 GICC_APR1 = 0xd4, // active priority register 1
139 GICC_APR2 = 0xd8, // active priority register 2
140 GICC_APR3 = 0xdc, // active priority register 3
141 GICC_IIDR = 0xfc, // cpu interface id register
142 GICC_DIR = 0x1000, // deactive interrupt register
143 };
144
145 static const int SGI_MAX = 16; // Number of Software Gen Interrupts
146 static const int PPI_MAX = 16; // Number of Private Peripheral Interrupts
147
149 static const int SGI_MASK = 0xFFFF0000;
150
152 static const int NN_CONFIG_MASK = 0x55555555;
153
154 static const int CPU_MAX = 256; // Max number of supported CPU interfaces
155 static const int SPURIOUS_INT = 1023;
156 static const int INT_BITS_MAX = 32;
157 static const int INT_LINES_MAX = 1020;
159
162 static const int GICC_BPR_MINIMUM = 2;
163
165 Bitfield<3,0> sgi_id;
166 Bitfield<23,16> cpu_list;
167 Bitfield<25,24> list_type;
169
170 BitUnion32(IAR)
171 Bitfield<9,0> ack_id;
172 Bitfield<12,10> cpu_id;
174
175 BitUnion32(CTLR)
176 Bitfield<3> fiqEn;
177 Bitfield<1> enableGrp1;
178 Bitfield<0> enableGrp0;
179 EndBitUnion(CTLR)
180
181 protected: /* Params */
183 const AddrRange distRange;
184
187
190
193
196
199
200 protected:
203
206
209
211 uint32_t itLines;
212
214 struct BankedRegs : public Serializable
215 {
218 uint32_t intEnabled;
219
222 uint32_t pendingInt;
223
226 uint32_t activeInt;
227
230 uint32_t intGroup;
231
234 uint32_t intConfig[2];
235
239
240 void serialize(CheckpointOut &cp) const override;
241 void unserialize(CheckpointIn &cp) override;
242
245 intGroup(0), intConfig {0}, intPriority {0}
246 {}
247 };
249
251
256
257 uint32_t&
258 getIntEnabled(ContextID ctx, uint32_t ix)
259 {
260 if (ix == 0) {
261 return getBankedRegs(ctx).intEnabled;
262 } else {
263 return intEnabled[ix - 1];
264 }
265 }
266
271
272 uint32_t&
273 getPendingInt(ContextID ctx, uint32_t ix)
274 {
275 assert(ix < INT_BITS_MAX);
276 if (ix == 0) {
277 return getBankedRegs(ctx).pendingInt;
278 } else {
279 return pendingInt[ix - 1];
280 }
281 }
282
287
288 uint32_t&
289 getActiveInt(ContextID ctx, uint32_t ix)
290 {
291 assert(ix < INT_BITS_MAX);
292 if (ix == 0) {
293 return getBankedRegs(ctx).activeInt;
294 } else {
295 return activeInt[ix - 1];
296 }
297 }
298
303
304 uint32_t&
305 getIntGroup(ContextID ctx, uint32_t ix)
306 {
307 assert(ix < INT_BITS_MAX);
308 if (ix == 0) {
309 return getBankedRegs(ctx).intGroup;
310 } else {
311 return intGroup[ix - 1];
312 }
313 }
314
316 uint32_t iccrpr[CPU_MAX];
317
323
324 uint8_t&
325 getIntPriority(ContextID ctx, uint32_t ix)
326 {
327 assert(ix < INT_LINES_MAX);
328 if (ix < SGI_MAX + PPI_MAX) {
329 return getBankedRegs(ctx).intPriority[ix];
330 } else {
331 return intPriority[ix - (SGI_MAX + PPI_MAX)];
332 }
333 }
334
339 uint32_t intConfig[INT_BITS_MAX*2 - 2];
340
347 uint32_t&
348 getIntConfig(ContextID ctx, uint32_t ix)
349 {
350 assert(ix < INT_BITS_MAX*2);
351 if (ix < 2) {
353 return getBankedRegs(ctx).intConfig[ix];
354 } else {
355 return intConfig[ix - 2];
356 }
357 }
358
363
364 uint8_t
365 getCpuTarget(ContextID ctx, uint32_t ix) const
366 {
367 assert(ctx < sys->threads.numRunning());
368 assert(ix < INT_LINES_MAX);
369 if (ix < SGI_MAX + PPI_MAX) {
370 // "GICD_ITARGETSR0 to GICD_ITARGETSR7 are read-only, and each
371 // field returns a value that corresponds only to the processor
372 // reading the register."
373 uint32_t ctx_mask;
375 ctx_mask = ctx;
376 } else {
377 fatal_if(ctx >= 8,
378 "%s requires the gem5_extensions parameter to support "
379 "more than 8 cores\n", name());
380 // convert the CPU id number into a bit mask
381 ctx_mask = 1 << ctx;
382 }
383 return ctx_mask;
384 } else {
385 return cpuTarget[ix - 32];
386 }
387 }
388
389 bool
390 isLevelSensitive(ContextID ctx, uint32_t int_num)
391 {
392 if (int_num == SPURIOUS_INT) {
393 return false;
394 } else {
395 const auto ix = intNumToWord(int_num * 2);
396 const uint8_t cfg_hi = intNumToBit(int_num * 2) + 1;
397 return bits(getIntConfig(ctx, ix), cfg_hi) == 0;
398 }
399 }
400
401 bool
402 isGroup0(ContextID ctx, uint32_t int_num)
403 {
404 const uint32_t group_reg = getIntGroup(ctx, intNumToWord(int_num));
405 return !bits(group_reg, intNumToBit(int_num));
406 }
407
418 bool
419 isFiq(ContextID ctx, uint32_t int_num)
420 {
421 const bool is_group0 = isGroup0(ctx, int_num);
422 const bool use_fiq = cpuControl[ctx].fiqEn;
423
424 if (is_group0 && use_fiq) {
425 return true;
426 } else {
427 return false;
428 }
429 }
430
434 bool
436 {
437 return cpuControl[ctx].enableGrp0 ||
438 cpuControl[ctx].enableGrp1;
439 }
440
445
448 uint8_t getCpuPriority(unsigned cpu); // BPR-adjusted priority value
449
451 uint8_t cpuBpr[CPU_MAX];
452
455
462
468
473
477 void softInt(ContextID ctx, SWI swi);
478
482 void updateIntState(int hint);
483
486 void updateRunPri();
487
489 uint64_t genSwiMask(int cpu);
490
491 int intNumToWord(int num) const { return num >> 5; }
492 int intNumToBit(int num) const { return num % 32; }
493
495 void clearInt(ContextID ctx, uint32_t int_num);
496
500 void postInt(uint32_t cpu, Tick when);
501 void postFiq(uint32_t cpu, Tick when);
502
506 void postDelayedInt(uint32_t cpu);
507 void postDelayedFiq(uint32_t cpu);
508
512
513 public:
514 using Params = GicV2Params;
515 GicV2(const Params &p);
516 ~GicV2();
517
518 DrainState drain() override;
519 void drainResume() override;
520
521 void serialize(CheckpointOut &cp) const override;
522 void unserialize(CheckpointIn &cp) override;
523
524 public: /* PioDevice */
525 AddrRangeList getAddrRanges() const override { return addrRanges; }
526
530 Tick read(PacketPtr pkt) override;
531
535 Tick write(PacketPtr pkt) override;
536
537 public: /* BaseGic */
538 void sendInt(uint32_t number) override;
539 void clearInt(uint32_t number) override;
540
541 void sendPPInt(uint32_t num, uint32_t cpu) override;
542 void clearPPInt(uint32_t num, uint32_t cpu) override;
543
544 bool supportsVersion(GicVersion version) override;
545
546 protected:
548
553 uint32_t readDistributor(ContextID ctx, Addr daddr,
554 size_t resp_sz);
555 uint32_t
556 readDistributor(ContextID ctx, Addr daddr) override
557 {
558 return readDistributor(ctx, daddr, 4);
559 }
560
565 uint32_t readCpu(ContextID ctx, Addr daddr) override;
566
571 void writeDistributor(ContextID ctx, Addr daddr,
572 uint32_t data, size_t data_sz);
573 void
574 writeDistributor(ContextID ctx, Addr daddr, uint32_t data) override
575 {
576 return writeDistributor(ctx, daddr, data, 4);
577 }
578
583 void writeCpu(ContextID ctx, Addr daddr, uint32_t data) override;
584};
585
586} // namespace gem5
587
588#endif //__DEV_ARM_GIC_H__
Base class for ARM GIC implementations.
const char data[]
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
Definition addr_range.hh:82
BaseGic(const Params &p)
Definition base_gic.cc:52
static void clearDistRange(GicV2Registers *to, Addr daddr, size_t size)
Definition gic_v2.cc:117
virtual uint32_t readDistributor(ContextID ctx, Addr daddr)=0
static void copyDistRange(GicV2Registers *from, GicV2Registers *to, Addr daddr, size_t size)
Definition gic_v2.cc:108
virtual void writeDistributor(ContextID ctx, Addr daddr, uint32_t data)=0
static void copyBankedDistRange(System *sys, GicV2Registers *from, GicV2Registers *to, Addr daddr, size_t size)
Definition gic_v2.cc:89
static void copyDistRegister(GicV2Registers *from, GicV2Registers *to, ContextID ctx, Addr daddr)
Definition gic_v2.cc:69
virtual ~GicV2Registers()=default
virtual void writeCpu(ContextID ctx, Addr daddr, uint32_t data)=0
virtual uint32_t readCpu(ContextID ctx, Addr daddr)=0
static void clearBankedDistRange(System *sys, GicV2Registers *to, Addr daddr, size_t size)
Definition gic_v2.cc:99
static void copyCpuRegister(GicV2Registers *from, GicV2Registers *to, ContextID ctx, Addr daddr)
Definition gic_v2.cc:79
static const int GLOBAL_INT_LINES
Definition gic_v2.hh:158
const uint32_t gicdIIDR
Definition gic_v2.hh:112
const Tick distPioDelay
Latency for a distributor operation.
Definition gic_v2.hh:192
std::vector< BankedRegs * > bankedRegs
Definition gic_v2.hh:248
int intNumToBit(int num) const
Definition gic_v2.hh:492
EventFunctionWrapper * postIntEvent[CPU_MAX]
Definition gic_v2.hh:509
uint32_t itLines
Number of itLines enabled.
Definition gic_v2.hh:211
static const AddrRange GICD_IPRIORITYR
Definition gic_v2.hh:122
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:419
static const AddrRange GICD_ICACTIVER
Definition gic_v2.hh:121
void postFiq(uint32_t cpu, Tick when)
Definition gic_v2.cc:1077
uint32_t & getPendingInt(ContextID ctx, uint32_t ix)
Definition gic_v2.hh:273
uint32_t & getIntEnabled(ContextID ctx, uint32_t ix)
Definition gic_v2.hh:258
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:255
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:466
static const AddrRange GICD_ICFGR
Definition gic_v2.hh:124
static const AddrRange GICD_ICENABLER
Definition gic_v2.hh:117
static const int INT_LINES_MAX
Definition gic_v2.hh:157
void softInt(ContextID ctx, SWI swi)
software generated interrupt
Definition gic_v2.cc:771
uint64_t cpuSgiPending[SGI_MAX]
One bit per cpu per software interrupt that is pending for each possible sgi source.
Definition gic_v2.hh:460
static const AddrRange GICD_ISPENDR
Definition gic_v2.hh:118
Tick readDistributor(PacketPtr pkt)
Handle a read to the distributor portion of the GIC.
Definition gic_v2.cc:198
EndBitUnion(CTLR) protected const AddrRange cpuRange
Address range for the distributor interface.
Definition gic_v2.hh:179
Bitfield< 12, 10 > cpu_id
Definition gic_v2.hh:172
Tick writeDistributor(PacketPtr pkt)
Handle a write to the distributor portion of the GIC.
Definition gic_v2.cc:472
uint8_t cpuPriority[CPU_MAX]
CPU priority.
Definition gic_v2.hh:447
int pendingDelayedInterrupts
Definition gic_v2.hh:511
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:270
BankedRegs & getBankedRegs(ContextID)
Definition gic_v2.cc:761
static const int INT_BITS_MAX
Definition gic_v2.hh:156
void copyGicState(GicV2Registers *from, GicV2Registers *to)
GIC state transfer.
Definition gic_v2.cc:1121
EndBitUnion(SWI) BitUnion32(IAR) Bitfield< 9
static const int SGI_MAX
Definition gic_v2.hh:145
void postDelayedFiq(uint32_t cpu)
Definition gic_v2.cc:1092
EventFunctionWrapper * postFiqEvent[CPU_MAX]
Definition gic_v2.hh:510
void writeDistributor(ContextID ctx, Addr daddr, uint32_t data) override
Definition gic_v2.hh:574
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:1103
uint32_t cpuPpiActive[CPU_MAX]
Definition gic_v2.hh:472
static const AddrRange GICD_ISACTIVER
Definition gic_v2.hh:120
static const AddrRange GICD_IGROUPR
Definition gic_v2.hh:115
uint8_t getCpuPriority(unsigned cpu)
Definition gic_v2.cc:848
int intNumToWord(int num) const
Definition gic_v2.hh:491
void drainResume() override
Resume execution after a successful drain.
Definition gic_v2.cc:1114
uint32_t & getIntGroup(ContextID ctx, uint32_t ix)
Definition gic_v2.hh:305
bool enabled
Gic enabled.
Definition gic_v2.hh:202
static const int SGI_MASK
Mask off SGI's when setting/clearing pending bits.
Definition gic_v2.hh:149
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:302
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:339
const Tick intLatency
Latency for a interrupt to get to CPU.
Definition gic_v2.hh:198
void updateIntState(int hint)
See if some processor interrupt flags need to be enabled/disabled.
Definition gic_v2.cc:859
Bitfield< 0 > enableGrp0
Definition gic_v2.hh:178
BitUnion32(SWI) Bitfield< 3
Tick readCpu(PacketPtr pkt)
Handle a read to the cpu portion of the GIC.
Definition gic_v2.cc:363
const bool haveGem5Extensions
Are gem5 extensions available?
Definition gic_v2.hh:205
bool isLevelSensitive(ContextID ctx, uint32_t int_num)
Definition gic_v2.hh:390
Tick write(PacketPtr pkt) override
A PIO read to the device, immediately split up into writeDistributor() or writeCpu()
Definition gic_v2.cc:185
static const int CPU_MAX
Definition gic_v2.hh:154
void sendPPInt(uint32_t num, uint32_t cpu) override
Interface call for private peripheral interrupts.
Definition gic_v2.cc:1003
uint32_t & getIntConfig(ContextID ctx, uint32_t ix)
Reads the GICD_ICFGRn register.
Definition gic_v2.hh:348
static const int GICC_BPR_MINIMUM
minimum value for Binary Point Register ("IMPLEMENTATION DEFINED"); chosen for consistency with Linux...
Definition gic_v2.hh:162
uint8_t cpuBpr[CPU_MAX]
Binary point registers.
Definition gic_v2.hh:451
uint64_t cpuSgiActive[SGI_MAX]
Definition gic_v2.hh:461
Bitfield< 25, 24 > list_type
Definition gic_v2.hh:167
Tick writeCpu(PacketPtr pkt)
Handle a write to the cpu portion of the GIC.
Definition gic_v2.cc:675
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:525
uint32_t & getActiveInt(ContextID ctx, uint32_t ix)
Definition gic_v2.hh:289
CTLR cpuControl[CPU_MAX]
GICC_CTLR: CPU interface control register.
Definition gic_v2.hh:444
void updateRunPri()
Update the register that records priority of the highest priority active interrupt.
Definition gic_v2.cc:960
uint32_t cpuSgiActiveExt[CPU_MAX]
Definition gic_v2.hh:467
static const AddrRange GICD_ISENABLER
Definition gic_v2.hh:116
const uint32_t giccIIDR
Definition gic_v2.hh:113
Bitfield< 1 > enableGrp1
Definition gic_v2.hh:177
void sendInt(uint32_t number) override
Post an interrupt from a device that is connected to the GIC.
Definition gic_v2.cc:989
uint32_t cpuPpiPending[CPU_MAX]
One bit per private peripheral interrupt.
Definition gic_v2.hh:471
uint32_t cpuHighestInt[CPU_MAX]
highest interrupt that is interrupting CPU
Definition gic_v2.hh:454
Tick read(PacketPtr pkt) override
A PIO read to the device, immediately split up into readDistributor() or readCpu()
Definition gic_v2.cc:171
uint8_t cpuTarget[GLOBAL_INT_LINES]
GICD_ITARGETSR{8..255} an 8 bit cpu target id for each global interrupt.
Definition gic_v2.hh:362
GicV2(const Params &p)
Definition gic_v2.cc:123
bool cpuEnabled(ContextID ctx) const
CPU enabled: Checks if GICC_CTLR.EnableGrp0 or EnableGrp1 are set.
Definition gic_v2.hh:435
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition gic_v2.cc:1193
uint64_t genSwiMask(int cpu)
generate a bit mask to check cpuSgi for an interrupt.
Definition gic_v2.cc:841
static const int SPURIOUS_INT
Definition gic_v2.hh:155
static const int NN_CONFIG_MASK
Mask for bits that config N:N mode in GICD_ICFGR's.
Definition gic_v2.hh:152
bool supportsVersion(GicVersion version) override
Check if version supported.
Definition gic_v2.cc:1086
const AddrRangeList addrRanges
All address ranges used by this GIC.
Definition gic_v2.hh:189
GicV2Params Params
Definition gic_v2.hh:514
void clearPPInt(uint32_t num, uint32_t cpu) override
Definition gic_v2.cc:1031
bool gem5ExtensionsEnabled
gem5 many-core extension enabled by driver
Definition gic_v2.hh:208
const uint32_t gicdPIDR
Definition gic_v2.hh:111
const Tick cpuPioDelay
Latency for a cpu operation.
Definition gic_v2.hh:195
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition gic_v2.cc:1238
uint8_t getCpuTarget(ContextID ctx, uint32_t ix) const
Definition gic_v2.hh:365
static const int PPI_MAX
Definition gic_v2.hh:146
static const AddrRange GICD_ITARGETSR
Definition gic_v2.hh:123
uint8_t & getIntPriority(ContextID ctx, uint32_t ix)
Definition gic_v2.hh:325
Bitfield< 23, 16 > cpu_list
Definition gic_v2.hh:166
uint32_t readDistributor(ContextID ctx, Addr daddr) override
Definition gic_v2.hh:556
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:322
void clearInt(ContextID ctx, uint32_t int_num)
Clears a cpu IRQ or FIQ signal.
Definition gic_v2.cc:1046
void postInt(uint32_t cpu, Tick when)
Post an interrupt to a CPU with a delay.
Definition gic_v2.cc:1057
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:286
uint32_t iccrpr[CPU_MAX]
read only running priority register, 1 per cpu
Definition gic_v2.hh:316
void postDelayedInt(uint32_t cpu)
Deliver a delayed interrupt to the target CPU.
Definition gic_v2.cc:1066
bool isGroup0(ContextID ctx, uint32_t int_num)
Definition gic_v2.hh:402
static const AddrRange GICD_ICPENDR
Definition gic_v2.hh:119
STL vector class.
Definition stl.hh:37
std::list< AddrRange > AddrRangeList
Convenience typedef for a collection of address ranges.
Definition addr_range.hh:64
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Definition bitfield.hh:79
DrainState
Object drain/handover states.
Definition drain.hh:76
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Definition logging.hh:268
Bitfield< 0 > p
Bitfield< 25, 21 > to
Definition types.hh:96
Copyright (c) 2024 Arm Limited All rights reserved.
Definition binary32.hh:36
std::ostream CheckpointOut
Definition serialize.hh:66
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147
uint64_t Tick
Tick count type.
Definition types.hh:58
Packet * PacketPtr
int ContextID
Globally unique thread context ID.
Definition types.hh:239
Generic interface for platforms.
Registers "banked for each connected processor" per ARM IHI0048B.
Definition gic_v2.hh:215
uint32_t intEnabled
GICD_I{S,C}ENABLER0 interrupt enable bits for first 32 interrupts, 1b per interrupt.
Definition gic_v2.hh:218
uint32_t intGroup
GICD_IGROUPR0 interrupt group bits for first 32 interrupts, 1b per interrupt.
Definition gic_v2.hh:230
uint32_t activeInt
GICD_I{S,C}ACTIVER0 interrupt active bits for first 32 interrupts, 1b per interrupt.
Definition gic_v2.hh:226
uint8_t intPriority[SGI_MAX+PPI_MAX]
GICD_IPRIORITYR{0..7} interrupt priority for SGIs and PPIs.
Definition gic_v2.hh:238
uint32_t pendingInt
GICD_I{S,C}PENDR0 interrupt pending bits for first 32 interrupts, 1b per interrupt.
Definition gic_v2.hh:222
uint32_t intConfig[2]
GICD_ICFGR0, GICD_ICFGR1 interrupt config bits for first 32 interrupts, 2b per interrupt.
Definition gic_v2.hh:234
const std::string & name()
Definition trace.cc:48

Generated on Mon Oct 27 2025 04:13:01 for gem5 by doxygen 1.14.0