gem5 [DEVELOP-FOR-25.1]
Loading...
Searching...
No Matches
vgic.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2013,2018 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 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions are
16 * met: redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer;
18 * redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution;
21 * neither the name of the copyright holders nor the names of its
22 * contributors may be used to endorse or promote products derived from
23 * this software without specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#include "dev/arm/vgic.hh"
39
41#include "base/trace.hh"
42#include "cpu/base.hh"
43#include "debug/Checkpoint.hh"
44#include "debug/VGIC.hh"
45#include "dev/arm/base_gic.hh"
46#include "mem/packet.hh"
47#include "mem/packet_access.hh"
48#include "params/VGic.hh"
49
50namespace gem5
51{
52
54 : PioDevice(p), gicvIIDR(p.gicv_iidr), platform(p.platform),
55 gic(p.gic), vcpuAddr(p.vcpu_addr), hvAddr(p.hv_addr),
56 pioDelay(p.pio_delay), maintInt(p.maint_int)
57{
58 for (int x = 0; x < VGIC_CPU_MAX; x++) {
60 [this, x]{ processPostVIntEvent(x); },
61 "Post VInterrupt to CPU");
62 maintIntPosted[x] = false;
63 vIntPosted[x] = false;
64 }
65 assert(sys->threads.numRunning() <= VGIC_CPU_MAX);
66}
67
69{
70 for (int x = 0; x < VGIC_CPU_MAX; x++)
71 delete postVIntEvent[x];
72}
73
74Tick
76{
77 Addr addr = pkt->getAddr();
78
79 if (addr >= vcpuAddr && addr < vcpuAddr + GICV_SIZE)
80 return readVCpu(pkt);
81 else if (addr >= hvAddr && addr < hvAddr + GICH_REG_SIZE)
82 return readCtrl(pkt);
83 else
84 panic("Read to unknown address %#x\n", pkt->getAddr());
85}
86
87Tick
89{
90 Addr addr = pkt->getAddr();
91
92 if (addr >= vcpuAddr && addr < vcpuAddr + GICV_SIZE)
93 return writeVCpu(pkt);
94 else if (addr >= hvAddr && addr < hvAddr + GICH_REG_SIZE)
95 return writeCtrl(pkt);
96 else
97 panic("Write to unknown address %#x\n", pkt->getAddr());
98}
99
100Tick
102{
103 Addr daddr = pkt->getAddr() - vcpuAddr;
104
105 ContextID ctx_id = pkt->req->contextId();
106 assert(ctx_id < VGIC_CPU_MAX);
107 struct vcpuIntData *vid = &vcpuData[ctx_id];
108
109 DPRINTF(VGIC, "VGIC VCPU read register %#x\n", daddr);
110
111 switch (daddr) {
112 case GICV_CTLR:
113 pkt->setLE<uint32_t>(vid->vctrl);
114 break;
115 case GICV_IAR: {
116 int i = findHighestPendingLR(vid);
117 if (i < 0 || !vid->vctrl.En) {
118 pkt->setLE<uint32_t>(1023); // "No int" marker
119 } else {
120 ListReg *lr = &vid->LR[i];
121
122 pkt->setLE<uint32_t>(lr->VirtualID |
123 (((int)lr->CpuID) << 10));
124 // We don't support auto-EOI of HW interrupts via real GIC!
125 // Fortunately, KVM doesn't use this. How about Xen...? Ulp!
126 if (lr->HW)
127 panic("VGIC does not support 'HW' List Register feature (LR %#x)!\n",
128 *lr);
129 lr->State = LR_ACTIVE;
130 DPRINTF(VGIC, "Consumed interrupt %d (cpu%d) from LR%d (EOI%d)\n",
131 lr->VirtualID, lr->CpuID, i, lr->EOI);
132 }
133 } break;
134 case GICV_IIDR:
135 pkt->setLE<uint32_t>(gicvIIDR);
136 break;
137 default:
138 panic("VGIC VCPU read of bad address %#x\n", daddr);
139 }
140
141 updateIntState(ctx_id);
142
143 pkt->makeAtomicResponse();
144 return pioDelay;
145}
146
147Tick
149{
150 Addr daddr = pkt->getAddr() - hvAddr;
151
152 ContextID ctx_id = pkt->req->contextId();
153
154 DPRINTF(VGIC, "VGIC HVCtrl read register %#x\n", daddr);
155
156 /* Munge the address: 0-0xfff is the usual space banked by requestor CPU.
157 * Anything > that is 0x200-sized slices of 'per CPU' regs.
158 */
159 if (daddr & ~0x1ff) {
160 ctx_id = (daddr >> 9);
161 if (ctx_id > 8)
162 panic("VGIC: Weird unbanked hv ctrl address %#x!\n", daddr);
163 daddr &= ~0x1ff;
164 }
165 assert(ctx_id < VGIC_CPU_MAX);
166 struct vcpuIntData *vid = &vcpuData[ctx_id];
167
168 switch (daddr) {
169 case GICH_HCR:
170 pkt->setLE<uint32_t>(vid->hcr);
171 break;
172
173 case GICH_VTR:
174 pkt->setLE<uint32_t>(0x44000000 | (NUM_LR - 1));
175 break;
176
177 case GICH_VMCR:
178 pkt->setLE<uint32_t>(
179 ((uint32_t)vid->VMPriMask << 27) |
180 ((uint32_t)vid->VMBP << 21) |
181 ((uint32_t)vid->VMABP << 18) |
182 ((uint32_t)vid->VEM << 9) |
183 ((uint32_t)vid->VMCBPR << 4) |
184 ((uint32_t)vid->VMFiqEn << 3) |
185 ((uint32_t)vid->VMAckCtl << 2) |
186 ((uint32_t)vid->VMGrp1En << 1) |
187 ((uint32_t)vid->VMGrp0En << 0)
188 );
189 break;
190
191 case GICH_MISR:
192 pkt->setLE<uint32_t>(getMISR(vid));
193 break;
194
195 case GICH_EISR0:
196 pkt->setLE<uint32_t>(vid->eisr & 0xffffffff);
197 break;
198
199 case GICH_EISR1:
200 pkt->setLE<uint32_t>(vid->eisr >> 32);
201 break;
202
203 case GICH_ELSR0: {
204 uint32_t bm = 0;
205 for (int i = 0; i < ((NUM_LR < 32) ? NUM_LR : 32); i++) {
206 if (!vid->LR[i].State)
207 bm |= 1 << i;
208 }
209 pkt->setLE<uint32_t>(bm);
210 } break;
211
212 case GICH_ELSR1: {
213 uint32_t bm = 0;
214 for (int i = 32; i < NUM_LR; i++) {
215 if (!vid->LR[i].State)
216 bm |= 1 << (i-32);
217 }
218 pkt->setLE<uint32_t>(bm);
219 } break;
220
221 case GICH_APR0:
222 warn_once("VGIC GICH_APR read!\n");
223 pkt->setLE<uint32_t>(0);
224 break;
225
226 case GICH_LR0:
227 case GICH_LR1:
228 case GICH_LR2:
229 case GICH_LR3:
230 pkt->setLE<uint32_t>(vid->LR[(daddr - GICH_LR0) >> 2]);
231 break;
232
233 default:
234 panic("VGIC HVCtrl read of bad address %#x\n", daddr);
235 }
236
237 pkt->makeAtomicResponse();
238 return pioDelay;
239}
240
241Tick
243{
244 Addr daddr = pkt->getAddr() - vcpuAddr;
245
246 ContextID ctx_id = pkt->req->contextId();
247 assert(ctx_id < VGIC_CPU_MAX);
248 struct vcpuIntData *vid = &vcpuData[ctx_id];
249
250 DPRINTF(VGIC, "VGIC VCPU write register %#x <= %#x\n",
251 daddr, pkt->getLE<uint32_t>());
252
253 switch (daddr) {
254 case GICV_CTLR:
255 vid->vctrl = pkt->getLE<uint32_t>();
256 break;
257 case GICV_PMR:
258 vid->VMPriMask = pkt->getLE<uint32_t>();
259 break;
260 case GICV_EOIR: {
261 // We don't handle the split EOI-then-DIR mode. Linux (guest)
262 // doesn't need it though.
263 assert(!vid->vctrl.EOImode);
264 uint32_t w = pkt->getLE<uint32_t>();
265 unsigned int virq = w & 0x3ff;
266 unsigned int vcpu = (w >> 10) & 7;
267 int i = findLRForVIRQ(vid, virq, vcpu);
268 if (i < 0) {
269 DPRINTF(VGIC, "EOIR: No LR for irq %d(cpu%d)\n", virq, vcpu);
270 } else {
271 DPRINTF(VGIC, "EOIR: Found LR%d for irq %d(cpu%d)\n", i, virq, vcpu);
272 ListReg *lr = &vid->LR[i];
273 lr->State = 0;
274 // Maintenance interrupt -- via eisr -- is flagged when
275 // LRs have EOI=1 and State=INVALID!
276 }
277 } break;
278 default:
279 panic("VGIC VCPU write %#x to unk address %#x\n",
280 pkt->getLE<uint32_t>(), daddr);
281 }
282
283 // This updates the EISRs and flags IRQs:
284 updateIntState(ctx_id);
285
286 pkt->makeAtomicResponse();
287 return pioDelay;
288}
289
290Tick
292{
293 Addr daddr = pkt->getAddr() - hvAddr;
294
295 ContextID ctx_id = pkt->req->contextId();
296
297 DPRINTF(VGIC, "VGIC HVCtrl write register %#x <= %#x\n",
298 daddr, pkt->getLE<uint32_t>());
299
300 /* Munge the address: 0-0xfff is the usual space banked by requestor CPU.
301 * Anything > that is 0x200-sized slices of 'per CPU' regs.
302 */
303 if (daddr & ~0x1ff) {
304 ctx_id = (daddr >> 9);
305 if (ctx_id > 8)
306 panic("VGIC: Weird unbanked hv ctrl address %#x!\n", daddr);
307 daddr &= ~0x1ff;
308 }
309 assert(ctx_id < VGIC_CPU_MAX);
310 struct vcpuIntData *vid = &vcpuData[ctx_id];
311
312 switch (daddr) {
313 case GICH_HCR:
314 vid->hcr = pkt->getLE<uint32_t>();
315 // update int state
316 break;
317
318 case GICH_VMCR: {
319 uint32_t d = pkt->getLE<uint32_t>();
320 vid->VMPriMask = d >> 27;
321 vid->VMBP = (d >> 21) & 7;
322 vid->VMABP = (d >> 18) & 7;
323 vid->VEM = (d >> 9) & 1;
324 vid->VMCBPR = (d >> 4) & 1;
325 vid->VMFiqEn = (d >> 3) & 1;
326 vid->VMAckCtl = (d >> 2) & 1;
327 vid->VMGrp1En = (d >> 1) & 1;
328 vid->VMGrp0En = d & 1;
329 } break;
330
331 case GICH_APR0:
332 warn_once("VGIC GICH_APR0 written, ignored\n");
333 break;
334
335 case GICH_LR0:
336 case GICH_LR1:
337 case GICH_LR2:
338 case GICH_LR3:
339 vid->LR[(daddr - GICH_LR0) >> 2] = pkt->getLE<uint32_t>();
340 // update int state
341 break;
342
343 default:
344 panic("VGIC HVCtrl write to bad address %#x\n", daddr);
345 }
346
347 updateIntState(ctx_id);
348
349 pkt->makeAtomicResponse();
350 return pioDelay;
351}
352
353
354uint32_t
355VGic::getMISR(struct vcpuIntData *vid)
356{
357 return (!!vid->hcr.VGrp1DIE && !vid->VMGrp1En ? 0x80 : 0) |
358 (!!vid->hcr.VGrp1EIE && vid->VMGrp1En ? 0x40 : 0) |
359 (!!vid->hcr.VGrp0DIE && !vid->VMGrp0En ? 0x20 : 0) |
360 (!!vid->hcr.VGrp0EIE && vid->VMGrp0En ? 0x10 : 0) |
361 (!!vid->hcr.NPIE && !lrPending(vid) ? 0x08 : 0) |
362 (!!vid->hcr.LRENPIE && vid->hcr.EOICount ? 0x04 : 0) |
363 (!!vid->hcr.UIE && lrValid(vid) <= 1 ? 0x02 : 0) |
364 (vid->eisr ? 0x01 : 0);
365}
366
367void
368VGic::postVInt(uint32_t cpu, Tick when)
369{
370 DPRINTF(VGIC, "Posting VIRQ to %d\n", cpu);
371 if (!(postVIntEvent[cpu]->scheduled()))
372 eventq->schedule(postVIntEvent[cpu], when);
373}
374
375void
376VGic::unPostVInt(uint32_t cpu)
377{
378 DPRINTF(VGIC, "Unposting VIRQ to %d\n", cpu);
379 auto tc = platform->system->threads[cpu];
380 tc->getCpuPtr()->clearInterrupt(tc->threadId(), ArmISA::INT_VIRT_IRQ, 0);
381}
382
383void
385{
386 auto tc = platform->system->threads[cpu];
387 tc->getCpuPtr()->postInterrupt(tc->threadId(), ArmISA::INT_VIRT_IRQ, 0);
388}
389
390
391void
393{
394 DPRINTF(VGIC, "Posting maintenance PPI to GIC/cpu%d\n", cpu);
395 // Linux DT configures this as Level.
396 gic->sendPPInt(maintInt, cpu);
397}
398
399void
401{
402 DPRINTF(VGIC, "Unposting maintenance PPI to GIC/cpu%d\n", cpu);
403 gic->clearPPInt(maintInt, cpu);
404}
405
406/* Update state (in general); something concerned with ctx_id has changed.
407 * This may raise a maintenance interrupt.
408 */
409void
411{
412 // @todo This should update APRs!
413
414 // Build EISR contents:
415 // (Cached so that regs can read them without messing about again)
416 struct vcpuIntData *tvid = &vcpuData[ctx_id];
417
418 tvid->eisr = 0;
419 for (int i = 0; i < NUM_LR; i++) {
420 if (!tvid->LR[i].State && tvid->LR[i].EOI) {
421 tvid->eisr |= 1 << i;
422 }
423 }
424
425 assert(sys->threads.numRunning() <= VGIC_CPU_MAX);
426 for (int i = 0; i < sys->threads.numRunning(); i++) {
427 struct vcpuIntData *vid = &vcpuData[i];
428 // Are any LRs active that weren't before?
429 if (!vIntPosted[i]) {
430 if (lrPending(vid) && vid->vctrl.En) {
431 vIntPosted[i] = true;
432 postVInt(i, curTick() + 1);
433 }
434 } else if (!lrPending(vid)) {
435 vIntPosted[i] = false;
436 unPostVInt(i);
437 }
438
439 // Any maintenance ints to send?
440 if (!maintIntPosted[i]) {
441 if (vid->hcr.En && getMISR(vid)) {
442 maintIntPosted[i] = true;
444 }
445 } else {
446 if (!vid->hcr.En || !getMISR(vid)) {
448 maintIntPosted[i] = false;
449 }
450 }
451 }
452}
453
456{
457 AddrRangeList ranges;
458 ranges.push_back(RangeSize(hvAddr, GICH_REG_SIZE));
459 ranges.push_back(RangeSize(vcpuAddr, GICV_SIZE));
460 return ranges;
461}
462
463void
465{
466 Tick interrupt_time[VGIC_CPU_MAX];
467 for (uint32_t cpu = 0; cpu < VGIC_CPU_MAX; cpu++) {
468 interrupt_time[cpu] = 0;
469 if (postVIntEvent[cpu]->scheduled()) {
470 interrupt_time[cpu] = postVIntEvent[cpu]->when();
471 }
472 }
473
474 DPRINTF(Checkpoint, "Serializing VGIC\n");
475
476 SERIALIZE_ARRAY(interrupt_time, VGIC_CPU_MAX);
483
484 for (uint32_t cpu = 0; cpu < VGIC_CPU_MAX; cpu++)
485 vcpuData[cpu].serializeSection(cp, csprintf("vcpuData%d", cpu));
486}
487
488void
489VGic::vcpuIntData::serialize(CheckpointOut &cp) const
490{
491 uint32_t vctrl_val = vctrl;
492 SERIALIZE_SCALAR(vctrl_val);
493 uint32_t hcr_val = hcr;
494 SERIALIZE_SCALAR(hcr_val);
495 uint64_t eisr_val = eisr;
496 SERIALIZE_SCALAR(eisr_val);
497 uint8_t VMGrp0En_val = VMGrp0En;
498 SERIALIZE_SCALAR(VMGrp0En_val);
499 uint8_t VMGrp1En_val = VMGrp1En;
500 SERIALIZE_SCALAR(VMGrp1En_val);
501 uint8_t VMAckCtl_val = VMAckCtl;
502 SERIALIZE_SCALAR(VMAckCtl_val);
503 uint8_t VMFiqEn_val = VMFiqEn;
504 SERIALIZE_SCALAR(VMFiqEn_val);
505 uint8_t VMCBPR_val = VMCBPR;
506 SERIALIZE_SCALAR(VMCBPR_val);
507 uint8_t VEM_val = VEM;
508 SERIALIZE_SCALAR(VEM_val);
509 uint8_t VMABP_val = VMABP;
510 SERIALIZE_SCALAR(VMABP_val);
511 uint8_t VMBP_val = VMBP;
512 SERIALIZE_SCALAR(VMBP_val);
513 uint8_t VMPriMask_val = VMPriMask;
514 SERIALIZE_SCALAR(VMPriMask_val);
515
516 for (int i = 0; i < NUM_LR; i++) {
517 ScopedCheckpointSection sec_lr(cp, csprintf("LR%d", i));
518 paramOut(cp, "lr", LR[i]);
519 }
520}
521
523{
524 DPRINTF(Checkpoint, "Unserializing Arm GIC\n");
525
526 Tick interrupt_time[VGIC_CPU_MAX];
527 UNSERIALIZE_ARRAY(interrupt_time, VGIC_CPU_MAX);
528 for (uint32_t cpu = 0; cpu < VGIC_CPU_MAX; cpu++) {
529 if (interrupt_time[cpu])
530 schedule(postVIntEvent[cpu], interrupt_time[cpu]);
531
532 vcpuData[cpu].unserializeSection(cp, csprintf("vcpuData%d", cpu));
533 }
540}
541
542void
543VGic::vcpuIntData::unserialize(CheckpointIn &cp)
544{
545 paramIn(cp, "vctrl_val", vctrl);
546 paramIn(cp, "hcr_val", hcr);
547 paramIn(cp, "eisr_val", eisr);
548 paramIn(cp, "VMGrp0En_val", VMGrp0En);
549 paramIn(cp, "VMGrp1En_val", VMGrp1En);
550 paramIn(cp, "VMAckCtl_val", VMAckCtl);
551 paramIn(cp, "VMFiqEn_val", VMFiqEn);
552 paramIn(cp, "VMCBPR_val", VMCBPR);
553 paramIn(cp, "VEM_val", VEM);
554 paramIn(cp, "VMABP_val", VMABP);
555 paramIn(cp, "VMPriMask_val", VMPriMask);
556
557 for (int i = 0; i < NUM_LR; i++) {
558 ScopedCheckpointSection sec_lr(cp, csprintf("LR%d", i));
559 paramIn(cp, "lr", LR[i]);
560 }
561}
562
563} // namespace gem5
#define DPRINTF(x,...)
Definition trace.hh:209
Base class for ARM GIC implementations.
EventQueue * eventq
A pointer to this object's event queue.
Definition eventq.hh:984
Addr getAddr() const
Definition packet.hh:807
void setLE(T v)
Set the value in the data pointer to v as little endian.
RequestPtr req
A pointer to the original request.
Definition packet.hh:377
void makeAtomicResponse()
Definition packet.hh:1074
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
PioDevice(const Params &p)
Definition io_device.cc:50
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition vgic.cc:75
static const int NUM_LR
Definition vgic.hh:72
AddrRangeList getAddrRanges() const override
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
Definition vgic.cc:455
Tick writeCtrl(PacketPtr pkt)
Definition vgic.cc:291
static const int GICH_LR2
Definition vgic.hh:88
static const int GICV_CTLR
Definition vgic.hh:92
VGic(const Params &p)
Definition vgic.cc:53
Tick pioDelay
Definition vgic.hh:123
static const int GICH_HCR
Definition vgic.hh:77
static const int GICH_MISR
Definition vgic.hh:80
static const int GICH_ELSR1
Definition vgic.hh:84
Tick readVCpu(PacketPtr pkt)
Definition vgic.cc:101
void postVInt(uint32_t cpu, Tick when)
Definition vgic.cc:368
void unPostMaintInt(uint32_t cpu)
Definition vgic.cc:400
EventFunctionWrapper * postVIntEvent[VGIC_CPU_MAX]
Definition vgic.hh:114
BaseGic * gic
Definition vgic.hh:119
Addr vcpuAddr
Definition vgic.hh:121
static const int GICH_VMCR
Definition vgic.hh:79
Tick readCtrl(PacketPtr pkt)
Definition vgic.cc:148
uint32_t getMISR(struct vcpuIntData *vid)
Definition vgic.cc:355
int findLRForVIRQ(struct vcpuIntData *vid, int virq, int vcpu)
Definition vgic.hh:254
Addr hvAddr
Definition vgic.hh:122
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition vgic.cc:464
Platform * platform
Definition vgic.hh:118
static const int GICH_EISR0
Definition vgic.hh:81
unsigned int lrPending(struct vcpuIntData *vid)
Definition vgic.hh:221
static const int GICH_REG_SIZE
Definition vgic.hh:75
unsigned int lrValid(struct vcpuIntData *vid)
Definition vgic.hh:230
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition vgic.cc:88
const uint32_t gicvIIDR
Definition vgic.hh:109
int findHighestPendingLR(struct vcpuIntData *vid)
Returns LR index or -1 if none pending.
Definition vgic.hh:241
static const uint32_t LR_ACTIVE
Definition vgic.hh:108
static const int GICH_LR1
Definition vgic.hh:87
VGicParams Params
Definition vgic.hh:195
static const int GICV_EOIR
Definition vgic.hh:96
static const int GICH_APR0
Definition vgic.hh:85
static const int GICH_LR0
Definition vgic.hh:86
static const int GICV_PMR
Definition vgic.hh:93
int maintInt
Definition vgic.hh:124
bool maintIntPosted[VGIC_CPU_MAX]
Definition vgic.hh:115
bool vIntPosted[VGIC_CPU_MAX]
Definition vgic.hh:116
void unPostVInt(uint32_t cpu)
Definition vgic.cc:376
Tick writeVCpu(PacketPtr pkt)
Definition vgic.cc:242
EndBitUnion(VCTLR) struct vcpuIntData struct std::array< vcpuIntData, VGIC_CPU_MAX > vcpuData
Definition vgic.hh:192
static const int GICH_LR3
Definition vgic.hh:89
void updateIntState(ContextID ctx_id)
Definition vgic.cc:410
static const int GICV_SIZE
Definition vgic.hh:91
static const int VGIC_CPU_MAX
Definition vgic.hh:71
void postMaintInt(uint32_t cpu)
Definition vgic.cc:392
static const int GICH_VTR
Definition vgic.hh:78
static const int GICV_IIDR
Definition vgic.hh:104
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition vgic.cc:522
static const int GICV_IAR
Definition vgic.hh:95
static const int GICH_EISR1
Definition vgic.hh:82
~VGic()
Definition vgic.cc:68
static const int GICH_ELSR0
Definition vgic.hh:83
void processPostVIntEvent(uint32_t cpu)
Post interrupt to CPU.
Definition vgic.cc:384
AddrRange RangeSize(Addr start, Addr size)
std::list< AddrRange > AddrRangeList
Convenience typedef for a collection of address ranges.
Definition addr_range.hh:64
void schedule(Event &event, Tick when)
Definition eventq.hh:1012
#define panic(...)
This implements a cprintf based panic() function.
Definition logging.hh:220
void serializeSection(CheckpointOut &cp, const char *name) const
Serialize an object into a new section.
Definition serialize.cc:74
#define UNSERIALIZE_ARRAY(member, size)
Definition serialize.hh:618
#define SERIALIZE_ARRAY(member, size)
Definition serialize.hh:610
#define warn_once(...)
Definition logging.hh:292
Bitfield< 7 > i
Definition misc_types.hh:67
Bitfield< 9 > d
Definition misc_types.hh:64
Bitfield< 0 > p
Bitfield< 0 > w
Bitfield< 3 > x
Definition pagetable.hh:78
Bitfield< 3 > addr
Definition types.hh:84
Copyright (c) 2024 Arm Limited All rights reserved.
Definition binary32.hh:36
Tick curTick()
The universal simulation clock.
Definition cur_tick.hh:46
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
void paramOut(CheckpointOut &cp, const std::string &name, ExtMachInst const &machInst)
Definition types.cc:40
void paramIn(CheckpointIn &cp, const std::string &name, ExtMachInst &machInst)
Definition types.cc:72
uint64_t Tick
Tick count type.
Definition types.hh:58
Packet * PacketPtr
int ContextID
Globally unique thread context ID.
Definition types.hh:239
std::string csprintf(const char *format, const Args &...args)
Definition cprintf.hh:161
Declaration of the Packet class.
#define UNSERIALIZE_SCALAR(scalar)
Definition serialize.hh:575
#define SERIALIZE_SCALAR(scalar)
Definition serialize.hh:568
Implementiation of a GIC-400 List Register-based VGIC interface.

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