gem5  v20.1.0.0
gic.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2017 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 "arch/arm/kvm/gic.hh"
39 
40 #include <linux/kvm.h>
41 
42 #include "arch/arm/kvm/base_cpu.hh"
43 #include "debug/GIC.hh"
44 #include "debug/Interrupt.hh"
45 #include "params/MuxingKvmGic.hh"
46 
47 KvmKernelGicV2::KvmKernelGicV2(KvmVM &_vm, Addr cpu_addr, Addr dist_addr,
48  unsigned it_lines)
49  : cpuRange(RangeSize(cpu_addr, KVM_VGIC_V2_CPU_SIZE)),
50  distRange(RangeSize(dist_addr, KVM_VGIC_V2_DIST_SIZE)),
51  vm(_vm),
52  kdev(vm.createDevice(KVM_DEV_TYPE_ARM_VGIC_V2))
53 {
54  // Tell the VM that we will emulate the GIC in the kernel. This
55  // disables IRQ and FIQ handling in the KVM CPU model.
57 
58  kdev.setAttr<uint64_t>(
59  KVM_DEV_ARM_VGIC_GRP_ADDR, KVM_VGIC_V2_ADDR_TYPE_DIST, dist_addr);
60  kdev.setAttr<uint64_t>(
61  KVM_DEV_ARM_VGIC_GRP_ADDR, KVM_VGIC_V2_ADDR_TYPE_CPU, cpu_addr);
62 
63  kdev.setAttr<uint32_t>(KVM_DEV_ARM_VGIC_GRP_NR_IRQS, 0, it_lines);
64 }
65 
67 {
68 }
69 
70 void
72 {
73  setIntState(KVM_ARM_IRQ_TYPE_SPI, 0, spi, true);
74 }
75 
76 void
78 {
79  setIntState(KVM_ARM_IRQ_TYPE_SPI, 0, spi, false);
80 }
81 
82 void
83 KvmKernelGicV2::setPPI(unsigned vcpu, unsigned ppi)
84 {
85  setIntState(KVM_ARM_IRQ_TYPE_PPI, vcpu, ppi, true);
86 }
87 
88 void
89 KvmKernelGicV2::clearPPI(unsigned vcpu, unsigned ppi)
90 {
91  setIntState(KVM_ARM_IRQ_TYPE_PPI, vcpu, ppi, false);
92 }
93 
94 void
95 KvmKernelGicV2::setIntState(unsigned type, unsigned vcpu, unsigned irq,
96  bool high)
97 {
98  assert(type <= KVM_ARM_IRQ_TYPE_MASK);
99  assert(vcpu <= KVM_ARM_IRQ_VCPU_MASK);
100  assert(irq <= KVM_ARM_IRQ_NUM_MASK);
101  const uint32_t line(
102  (type << KVM_ARM_IRQ_TYPE_SHIFT) |
103  (vcpu << KVM_ARM_IRQ_VCPU_SHIFT) |
104  (irq << KVM_ARM_IRQ_NUM_SHIFT));
105 
106  vm.setIRQLine(line, high);
107 }
108 
109 uint32_t
110 KvmKernelGicV2::getGicReg(unsigned group, unsigned vcpu, unsigned offset)
111 {
112  uint64_t reg;
113 
114  assert(vcpu <= KVM_ARM_IRQ_VCPU_MASK);
115  const uint64_t attr(
116  ((uint64_t)vcpu << KVM_DEV_ARM_VGIC_CPUID_SHIFT) |
117  (offset << KVM_DEV_ARM_VGIC_OFFSET_SHIFT));
118 
119  kdev.getAttrPtr(group, attr, &reg);
120  return (uint32_t) reg;
121 }
122 
123 void
124 KvmKernelGicV2::setGicReg(unsigned group, unsigned vcpu, unsigned offset,
125  unsigned value)
126 {
127  uint64_t reg = value;
128 
129  assert(vcpu <= KVM_ARM_IRQ_VCPU_MASK);
130  const uint64_t attr(
131  ((uint64_t)vcpu << KVM_DEV_ARM_VGIC_CPUID_SHIFT) |
132  (offset << KVM_DEV_ARM_VGIC_OFFSET_SHIFT));
133 
134  kdev.setAttrPtr(group, attr, &reg);
135 }
136 
137 uint32_t
139 {
140  auto vcpu = vm.contextIdToVCpuId(ctx);
141  return getGicReg(KVM_DEV_ARM_VGIC_GRP_DIST_REGS, vcpu, daddr);
142 }
143 
144 uint32_t
146 {
147  auto vcpu = vm.contextIdToVCpuId(ctx);
148  return getGicReg(KVM_DEV_ARM_VGIC_GRP_CPU_REGS, vcpu, daddr);
149 }
150 
151 void
153 {
154  auto vcpu = vm.contextIdToVCpuId(ctx);
155  setGicReg(KVM_DEV_ARM_VGIC_GRP_DIST_REGS, vcpu, daddr, data);
156 }
157 
158 void
160 {
161  auto vcpu = vm.contextIdToVCpuId(ctx);
162  setGicReg(KVM_DEV_ARM_VGIC_GRP_CPU_REGS, vcpu, daddr, data);
163 }
164 
165 
166 
167 MuxingKvmGic::MuxingKvmGic(const MuxingKvmGicParams *p)
168  : GicV2(p),
169  system(*p->system),
170  kernelGic(nullptr),
171  usingKvm(false)
172 {
173  if (auto vm = system.getKvmVM()) {
174  kernelGic = new KvmKernelGicV2(*vm, p->cpu_addr, p->dist_addr,
175  p->it_lines);
176  }
177 }
178 
180 {
181 }
182 
183 void
185 {
186  GicV2::startup();
187  usingKvm = (kernelGic != nullptr) && system.validKvmEnvironment();
188  if (usingKvm)
189  fromGicV2ToKvm();
190 }
191 
194 {
195  if (usingKvm)
196  fromKvmToGicV2();
197  return GicV2::drain();
198 }
199 
200 void
202 {
204  bool use_kvm = (kernelGic != nullptr) && system.validKvmEnvironment();
205  if (use_kvm != usingKvm) {
206  // Should only occur due to CPU switches
207  if (use_kvm) // from simulation to KVM emulation
208  fromGicV2ToKvm();
209  // otherwise, drain() already sync'd the state back to the GicV2
210 
211  usingKvm = use_kvm;
212  }
213 }
214 
215 Tick
217 {
218  if (!usingKvm)
219  return GicV2::read(pkt);
220 
221  panic("MuxingKvmGic: PIO from gem5 is currently unsupported\n");
222 }
223 
224 Tick
226 {
227  if (!usingKvm)
228  return GicV2::write(pkt);
229 
230  panic("MuxingKvmGic: PIO from gem5 is currently unsupported\n");
231 }
232 
233 void
235 {
236  if (!usingKvm)
237  return GicV2::sendInt(num);
238 
239  DPRINTF(Interrupt, "Set SPI %d\n", num);
240  kernelGic->setSPI(num);
241 }
242 
243 void
245 {
246  if (!usingKvm)
247  return GicV2::clearInt(num);
248 
249  DPRINTF(Interrupt, "Clear SPI %d\n", num);
250  kernelGic->clearSPI(num);
251 }
252 
253 void
254 MuxingKvmGic::sendPPInt(uint32_t num, uint32_t cpu)
255 {
256  if (!usingKvm)
257  return GicV2::sendPPInt(num, cpu);
258  DPRINTF(Interrupt, "Set PPI %d:%d\n", cpu, num);
259  kernelGic->setPPI(cpu, num);
260 }
261 
262 void
263 MuxingKvmGic::clearPPInt(uint32_t num, uint32_t cpu)
264 {
265  if (!usingKvm)
266  return GicV2::clearPPInt(num, cpu);
267 
268  DPRINTF(Interrupt, "Clear PPI %d:%d\n", cpu, num);
269  kernelGic->clearPPI(cpu, num);
270 }
271 
272 void
274 {
275  // During Kvm->GicV2 state transfer, writes to the GicV2 will call
276  // updateIntState() which can post an interrupt. Since we're only
277  // using the GicV2 model for holding state in this circumstance, we
278  // short-circuit this behavior, as the GicV2 is not actually active.
279  if (!usingKvm)
280  return GicV2::updateIntState(hint);
281 }
282 
283 void
285  ContextID ctx, Addr daddr)
286 {
287  auto val = from->readDistributor(ctx, daddr);
288  DPRINTF(GIC, "copy dist 0x%x 0x%08x\n", daddr, val);
289  to->writeDistributor(ctx, daddr, val);
290 }
291 
292 void
294  ContextID ctx, Addr daddr)
295 {
296  auto val = from->readCpu(ctx, daddr);
297  DPRINTF(GIC, "copy cpu 0x%x 0x%08x\n", daddr, val);
298  to->writeCpu(ctx, daddr, val);
299 }
300 
301 void
303  Addr daddr, size_t size)
304 {
305  for (int ctx = 0; ctx < system.threads.size(); ++ctx)
306  for (auto a = daddr; a < daddr + size; a += 4)
307  copyDistRegister(from, to, ctx, a);
308 }
309 
310 void
312  Addr daddr, size_t size)
313 {
314  for (int ctx = 0; ctx < system.threads.size(); ++ctx)
315  for (auto a = daddr; a < daddr + size; a += 4)
316  to->writeDistributor(ctx, a, 0xFFFFFFFF);
317 }
318 
319 void
321  Addr daddr, size_t size)
322 {
323  for (auto a = daddr; a < daddr + size; a += 4)
324  copyDistRegister(from, to, 0, a);
325 }
326 
327 void
329  Addr daddr, size_t size)
330 {
331  for (auto a = daddr; a < daddr + size; a += 4)
332  to->writeDistributor(0, a, 0xFFFFFFFF);
333 }
334 
335 void
337 {
338  Addr set, clear;
339  size_t size;
340 
342  // Copy CPU Interface Control Register (CTLR),
343  // Interrupt Priority Mask Register (PMR), and
344  // Binary Point Register (BPR)
345  for (int ctx = 0; ctx < system.threads.size(); ++ctx) {
346  copyCpuRegister(from, to, ctx, GICC_CTLR);
347  copyCpuRegister(from, to, ctx, GICC_PMR);
348  copyCpuRegister(from, to, ctx, GICC_BPR);
349  }
350 
351 
353  // Copy Distributor Control Register (CTLR)
354  copyDistRegister(from, to, 0, GICD_CTLR);
355 
356  // Copy interrupt-enabled statuses (I[CS]ENABLERn; R0 is per-CPU banked)
358  clear = GicV2::GICD_ICENABLER.start();
359  size = GicV2::itLines / 8;
360  clearBankedDistRange(to, clear, 4);
361  copyBankedDistRange(from, to, set, 4);
362 
363  set += 4, clear += 4, size -= 4;
364  clearDistRange(to, clear, size);
365  copyDistRange(from, to, set, size);
366 
367  // Copy pending interrupts (I[CS]PENDRn; R0 is per-CPU banked)
368  set = GicV2::GICD_ISPENDR.start();
369  clear = GicV2::GICD_ICPENDR.start();
370  size = GicV2::itLines / 8;
371  clearBankedDistRange(to, clear, 4);
372  copyBankedDistRange(from, to, set, 4);
373 
374  set += 4, clear += 4, size -= 4;
375  clearDistRange(to, clear, size);
376  copyDistRange(from, to, set, size);
377 
378  // Copy active interrupts (I[CS]ACTIVERn; R0 is per-CPU banked)
380  clear = GicV2::GICD_ICACTIVER.start();
381  size = GicV2::itLines / 8;
382  clearBankedDistRange(to, clear, 4);
383  copyBankedDistRange(from, to, set, 4);
384 
385  set += 4, clear += 4, size -= 4;
386  clearDistRange(to, clear, size);
387  copyDistRange(from, to, set, size);
388 
389  // Copy interrupt priorities (IPRIORITYRn; R0-7 are per-CPU banked)
391  copyBankedDistRange(from, to, set, 32);
392 
393  set += 32;
394  size = GicV2::itLines - 32;
395  copyDistRange(from, to, set, size);
396 
397  // Copy interrupt processor target regs (ITARGETRn; R0-7 are read-only)
398  set = GicV2::GICD_ITARGETSR.start() + 32;
399  size = GicV2::itLines - 32;
400  copyDistRange(from, to, set, size);
401 
402  // Copy interrupt configuration registers (ICFGRn)
403  set = GicV2::GICD_ICFGR.start();
404  size = GicV2::itLines / 4;
405  copyDistRange(from, to, set, size);
406 }
407 
408 void
410 {
411  copyGicState(static_cast<GicV2*>(this), kernelGic);
412 }
413 
414 void
416 {
417  copyGicState(kernelGic, static_cast<GicV2*>(this));
418 
419  // the values read for the Interrupt Priority Mask Register (PMR)
420  // have been shifted by three bits due to its having been emulated by
421  // a VGIC with only 5 PMR bits in its VMCR register. Presently the
422  // Linux kernel does not repair this inaccuracy, so we correct it here.
423  for (int cpu = 0; cpu < system.threads.size(); ++cpu) {
424  cpuPriority[cpu] <<= 3;
425  assert((cpuPriority[cpu] & ~0xff) == 0);
426  }
427 }
428 
429 MuxingKvmGic *
430 MuxingKvmGicParams::create()
431 {
432  return new MuxingKvmGic(this);
433 }
KvmVM
KVM VM container.
Definition: vm.hh:289
MuxingKvmGic::fromGicV2ToKvm
void fromGicV2ToKvm()
Multiplexing implementation.
Definition: gic.cc:409
KvmKernelGicV2::setSPI
void setSPI(unsigned spi)
Raise a shared peripheral interrupt.
Definition: gic.cc:71
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
KvmKernelGicV2::writeCpu
void writeCpu(ContextID ctx, Addr daddr, uint32_t data) override
Definition: gic.cc:159
data
const char data[]
Definition: circlebuf.test.cc:42
KvmDevice::getAttrPtr
void getAttrPtr(uint32_t group, uint64_t attr, void *data) const
Definition: device.cc:60
MuxingKvmGic::clearPPInt
void clearPPInt(uint32_t num, uint32_t cpu) override
Definition: gic.cc:263
MuxingKvmGic::fromKvmToGicV2
void fromKvmToGicV2()
Definition: gic.cc:415
GicV2::clearInt
void clearInt(ContextID ctx, uint32_t int_num)
Clears a cpu IRQ or FIQ signal.
Definition: gic_v2.cc:918
KvmKernelGicV2
KVM in-kernel GIC abstraction.
Definition: gic.hh:54
ContextID
int ContextID
Globally unique thread context ID.
Definition: types.hh:231
type
uint8_t type
Definition: inet.hh:421
GicV2
Definition: gic_v2.hh:60
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
KvmKernelGicV2::readDistributor
uint32_t readDistributor(ContextID ctx, Addr daddr) override
BaseGicRegisters interface.
Definition: gic.cc:138
GicV2::GICC_CTLR
@ GICC_CTLR
Definition: gic_v2.hh:94
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
MuxingKvmGic::copyDistRange
void copyDistRange(BaseGicRegisters *from, BaseGicRegisters *to, Addr daddr, size_t size)
Definition: gic.cc:320
MuxingKvmGic::drainResume
void drainResume() override
Resume execution after a successful drain.
Definition: gic.cc:201
KvmKernelGicV2::KvmKernelGicV2
KvmKernelGicV2(KvmVM &vm, Addr cpu_addr, Addr dist_addr, unsigned it_lines)
Instantiate a KVM in-kernel GIC model.
Definition: gic.cc:47
base_cpu.hh
MuxingKvmGic::drain
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
Definition: gic.cc:193
KvmKernelGicV2::clearPPI
void clearPPI(unsigned vcpu, unsigned ppi)
Clear a private peripheral interrupt.
Definition: gic.cc:89
System::getKvmVM
KvmVM * getKvmVM()
Get a pointer to the Kernel Virtual Machine (KVM) SimObject, if present.
Definition: system.hh:334
MuxingKvmGic::read
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: gic.cc:216
System::validKvmEnvironment
bool validKvmEnvironment() const
Verify gem5 configuration will support KVM emulation.
Definition: system.cc:368
KvmKernelGicV2::getGicReg
uint32_t getGicReg(unsigned group, unsigned vcpu, unsigned offset)
Get value of GIC register "from" a cpu.
Definition: gic.cc:110
KvmVM::enableKernelIRQChip
void enableKernelIRQChip()
Tell the VM and VCPUs to use an in-kernel IRQ chip for interrupt delivery.
Definition: vm.hh:360
KvmVM::contextIdToVCpuId
long contextIdToVCpuId(ContextID ctx) const
Get the VCPUID for a given context.
Definition: vm.cc:539
MuxingKvmGic::write
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: gic.cc:225
X86ISA::reg
Bitfield< 5, 3 > reg
Definition: types.hh:87
GicV2::GICD_ICENABLER
static const AddrRange GICD_ICENABLER
Definition: gic_v2.hh:83
GicV2::updateIntState
virtual void updateIntState(int hint)
See if some processor interrupt flags need to be enabled/disabled.
Definition: gic_v2.cc:734
KvmKernelGicV2::writeDistributor
void writeDistributor(ContextID ctx, Addr daddr, uint32_t data) override
Definition: gic.cc:152
SimObject::startup
virtual void startup()
startup() is the final initialization call before simulation.
Definition: sim_object.cc:96
DrainState
DrainState
Object drain/handover states.
Definition: drain.hh:71
X86ISA::system
Bitfield< 15 > system
Definition: misc.hh:997
KvmDevice::setAttr
void setAttr(uint32_t group, uint64_t attr, const T &data) const
Get the value of an attribute.
Definition: device.hh:92
GicV2::GICC_BPR
@ GICC_BPR
Definition: gic_v2.hh:96
MuxingKvmGic::kernelGic
KvmKernelGicV2 * kernelGic
Kernel GIC device.
Definition: gic.hh:197
ArmISA::a
Bitfield< 8 > a
Definition: miscregs_types.hh:62
MuxingKvmGic::sendPPInt
void sendPPInt(uint32_t num, uint32_t cpu) override
Interface call for private peripheral interrupts.
Definition: gic.cc:254
KvmKernelGicV2::~KvmKernelGicV2
virtual ~KvmKernelGicV2()
Definition: gic.cc:66
GicV2::GICD_ISACTIVER
static const AddrRange GICD_ISACTIVER
Definition: gic_v2.hh:86
BaseGicRegisters
Definition: base_gic.hh:117
GicV2::GICD_IPRIORITYR
static const AddrRange GICD_IPRIORITYR
Definition: gic_v2.hh:88
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:234
gic.hh
KvmKernelGicV2::setGicReg
void setGicReg(unsigned group, unsigned vcpu, unsigned offset, unsigned value)
Set value of GIC register "from" a cpu.
Definition: gic.cc:124
GicV2::cpuPriority
uint8_t cpuPriority[CPU_MAX]
CPU priority.
Definition: gic_v2.hh:411
MuxingKvmGic::system
System & system
System this interrupt controller belongs to.
Definition: gic.hh:194
RangeSize
AddrRange RangeSize(Addr start, Addr size)
Definition: addr_range.hh:638
GicV2::GICD_ICACTIVER
static const AddrRange GICD_ICACTIVER
Definition: gic_v2.hh:87
KvmKernelGicV2::vm
KvmVM & vm
KVM VM in the parent system.
Definition: gic.hh:159
ArmISA::attr
attr
Definition: miscregs_types.hh:649
System::Threads::size
int size() const
Definition: system.hh:204
BaseGicRegisters::writeCpu
virtual void writeCpu(ContextID ctx, Addr daddr, uint32_t data)=0
KvmKernelGicV2::readCpu
uint32_t readCpu(ContextID ctx, Addr daddr) override
Definition: gic.cc:145
BaseGicRegisters::writeDistributor
virtual void writeDistributor(ContextID ctx, Addr daddr, uint32_t data)=0
MuxingKvmGic::usingKvm
bool usingKvm
Definition: gic.hh:200
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
KvmDevice::setAttrPtr
void setAttrPtr(uint32_t group, uint64_t attr, const void *data) const
Definition: device.cc:80
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
X86ISA::val
Bitfield< 63 > val
Definition: misc.hh:769
KvmKernelGicV2::setIntState
void setIntState(unsigned type, unsigned vcpu, unsigned irq, bool high)
Update the kernel's VGIC interrupt state.
Definition: gic.cc:95
MuxingKvmGic::~MuxingKvmGic
~MuxingKvmGic()
Definition: gic.cc:179
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
MuxingKvmGic::clearInt
void clearInt(uint32_t num) override
Clear an interrupt from a device that is connected to the GIC.
Definition: gic.cc:244
ArmISA::irq
Bitfield< 1 > irq
Definition: miscregs_types.hh:327
KvmKernelGicV2::kdev
KvmDevice kdev
Kernel interface to the GIC.
Definition: gic.hh:162
MuxingKvmGic::clearDistRange
void clearDistRange(BaseGicRegisters *to, Addr daddr, size_t size)
Definition: gic.cc:328
GicV2::GICD_ICFGR
static const AddrRange GICD_ICFGR
Definition: gic_v2.hh:90
BaseGicRegisters::readDistributor
virtual uint32_t readDistributor(ContextID ctx, Addr daddr)=0
System::threads
Threads threads
Definition: system.hh:309
MuxingKvmGic::copyCpuRegister
void copyCpuRegister(BaseGicRegisters *from, BaseGicRegisters *to, ContextID ctx, Addr daddr)
Definition: gic.cc:293
GicV2::GICD_ISPENDR
static const AddrRange GICD_ISPENDR
Definition: gic_v2.hh:84
MuxingKvmGic::updateIntState
void updateIntState(int hint) override
See if some processor interrupt flags need to be enabled/disabled.
Definition: gic.cc:273
AddrRange::start
Addr start() const
Get the start address of the range.
Definition: addr_range.hh:314
GicV2::clearPPInt
void clearPPInt(uint32_t num, uint32_t cpu) override
Definition: gic_v2.cc:903
MuxingKvmGic::copyBankedDistRange
void copyBankedDistRange(BaseGicRegisters *from, BaseGicRegisters *to, Addr daddr, size_t size)
Definition: gic.cc:302
KvmVM::setIRQLine
void setIRQLine(uint32_t irq, bool high)
Set the status of an IRQ line using KVM_IRQ_LINE.
Definition: vm.cc:501
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
KvmKernelGicV2::setPPI
void setPPI(unsigned vcpu, unsigned ppi)
Raise a private peripheral interrupt.
Definition: gic.cc:83
MuxingKvmGic::MuxingKvmGic
MuxingKvmGic(const MuxingKvmGicParams *p)
Definition: gic.cc:167
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
MuxingKvmGic::clearBankedDistRange
void clearBankedDistRange(BaseGicRegisters *to, Addr daddr, size_t size)
Definition: gic.cc:311
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::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
ArmISA::vm
Bitfield< 0 > vm
Definition: miscregs_types.hh:281
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
KvmKernelGicV2::clearSPI
void clearSPI(unsigned spi)
Clear a shared peripheral interrupt.
Definition: gic.cc:77
MuxingKvmGic::copyDistRegister
void copyDistRegister(BaseGicRegisters *from, BaseGicRegisters *to, ContextID ctx, Addr daddr)
Definition: gic.cc:284
MuxingKvmGic
Definition: gic.hh:168
MuxingKvmGic::copyGicState
void copyGicState(BaseGicRegisters *from, BaseGicRegisters *to)
Definition: gic.cc:336
MuxingKvmGic::sendInt
void sendInt(uint32_t num) override
Post an interrupt from a device that is connected to the GIC.
Definition: gic.cc:234
BaseGicRegisters::readCpu
virtual uint32_t readCpu(ContextID ctx, Addr daddr)=0
MuxingKvmGic::startup
void startup() override
startup() is the final initialization call before simulation.
Definition: gic.cc:184
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
ArmISA::offset
Bitfield< 23, 0 > offset
Definition: types.hh:153

Generated on Wed Sep 30 2020 14:01:58 for gem5 by doxygen 1.8.17