gem5  v21.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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  auto vm = system.getKvmVM();
174  if (vm && !p.simulate_gic) {
175  kernelGic = new KvmKernelGicV2(*vm, p.cpu_addr, p.dist_addr,
176  p.it_lines);
177  }
178 }
179 
181 {
182 }
183 
184 void
186 {
187  GicV2::startup();
188  usingKvm = (kernelGic != nullptr) && system.validKvmEnvironment();
189  if (usingKvm)
190  fromGicV2ToKvm();
191 }
192 
195 {
196  if (usingKvm)
197  fromKvmToGicV2();
198  return GicV2::drain();
199 }
200 
201 void
203 {
205  bool use_kvm = (kernelGic != nullptr) && system.validKvmEnvironment();
206  if (use_kvm != usingKvm) {
207  // Should only occur due to CPU switches
208  if (use_kvm) // from simulation to KVM emulation
209  fromGicV2ToKvm();
210  // otherwise, drain() already sync'd the state back to the GicV2
211 
212  usingKvm = use_kvm;
213  }
214 }
215 
216 Tick
218 {
219  if (!usingKvm)
220  return GicV2::read(pkt);
221 
222  panic("MuxingKvmGic: PIO from gem5 is currently unsupported\n");
223 }
224 
225 Tick
227 {
228  if (!usingKvm)
229  return GicV2::write(pkt);
230 
231  panic("MuxingKvmGic: PIO from gem5 is currently unsupported\n");
232 }
233 
234 void
236 {
237  if (!usingKvm)
238  return GicV2::sendInt(num);
239 
240  DPRINTF(Interrupt, "Set SPI %d\n", num);
241  kernelGic->setSPI(num);
242 }
243 
244 void
246 {
247  if (!usingKvm)
248  return GicV2::clearInt(num);
249 
250  DPRINTF(Interrupt, "Clear SPI %d\n", num);
251  kernelGic->clearSPI(num);
252 }
253 
254 void
255 MuxingKvmGic::sendPPInt(uint32_t num, uint32_t cpu)
256 {
257  if (!usingKvm)
258  return GicV2::sendPPInt(num, cpu);
259  DPRINTF(Interrupt, "Set PPI %d:%d\n", cpu, num);
260  kernelGic->setPPI(cpu, num);
261 }
262 
263 void
264 MuxingKvmGic::clearPPInt(uint32_t num, uint32_t cpu)
265 {
266  if (!usingKvm)
267  return GicV2::clearPPInt(num, cpu);
268 
269  DPRINTF(Interrupt, "Clear PPI %d:%d\n", cpu, num);
270  kernelGic->clearPPI(cpu, num);
271 }
272 
273 void
275 {
276  // During Kvm->GicV2 state transfer, writes to the GicV2 will call
277  // updateIntState() which can post an interrupt. Since we're only
278  // using the GicV2 model for holding state in this circumstance, we
279  // short-circuit this behavior, as the GicV2 is not actually active.
280  if (!usingKvm)
281  return GicV2::updateIntState(hint);
282 }
283 
284 void
286  ContextID ctx, Addr daddr)
287 {
288  auto val = from->readDistributor(ctx, daddr);
289  DPRINTF(GIC, "copy dist 0x%x 0x%08x\n", daddr, val);
290  to->writeDistributor(ctx, daddr, val);
291 }
292 
293 void
295  ContextID ctx, Addr daddr)
296 {
297  auto val = from->readCpu(ctx, daddr);
298  DPRINTF(GIC, "copy cpu 0x%x 0x%08x\n", daddr, val);
299  to->writeCpu(ctx, daddr, val);
300 }
301 
302 void
304  Addr daddr, size_t size)
305 {
306  for (int ctx = 0; ctx < system.threads.size(); ++ctx)
307  for (auto a = daddr; a < daddr + size; a += 4)
308  copyDistRegister(from, to, ctx, a);
309 }
310 
311 void
313  Addr daddr, size_t size)
314 {
315  for (int ctx = 0; ctx < system.threads.size(); ++ctx)
316  for (auto a = daddr; a < daddr + size; a += 4)
317  to->writeDistributor(ctx, a, 0xFFFFFFFF);
318 }
319 
320 void
322  Addr daddr, size_t size)
323 {
324  for (auto a = daddr; a < daddr + size; a += 4)
325  copyDistRegister(from, to, 0, a);
326 }
327 
328 void
330  Addr daddr, size_t size)
331 {
332  for (auto a = daddr; a < daddr + size; a += 4)
333  to->writeDistributor(0, a, 0xFFFFFFFF);
334 }
335 
336 void
338 {
339  Addr set, clear;
340  size_t size;
341 
343  // Copy CPU Interface Control Register (CTLR),
344  // Interrupt Priority Mask Register (PMR), and
345  // Binary Point Register (BPR)
346  for (int ctx = 0; ctx < system.threads.size(); ++ctx) {
347  copyCpuRegister(from, to, ctx, GICC_CTLR);
348  copyCpuRegister(from, to, ctx, GICC_PMR);
349  copyCpuRegister(from, to, ctx, GICC_BPR);
350  }
351 
352 
354  // Copy Distributor Control Register (CTLR)
355  copyDistRegister(from, to, 0, GICD_CTLR);
356 
357  // Copy interrupt-enabled statuses (I[CS]ENABLERn; R0 is per-CPU banked)
359  clear = GicV2::GICD_ICENABLER.start();
360  size = GicV2::itLines / 8;
361  clearBankedDistRange(to, clear, 4);
362  copyBankedDistRange(from, to, set, 4);
363 
364  set += 4, clear += 4, size -= 4;
365  clearDistRange(to, clear, size);
366  copyDistRange(from, to, set, size);
367 
368  // Copy pending interrupts (I[CS]PENDRn; R0 is per-CPU banked)
369  set = GicV2::GICD_ISPENDR.start();
370  clear = GicV2::GICD_ICPENDR.start();
371  size = GicV2::itLines / 8;
372  clearBankedDistRange(to, clear, 4);
373  copyBankedDistRange(from, to, set, 4);
374 
375  set += 4, clear += 4, size -= 4;
376  clearDistRange(to, clear, size);
377  copyDistRange(from, to, set, size);
378 
379  // Copy active interrupts (I[CS]ACTIVERn; R0 is per-CPU banked)
381  clear = GicV2::GICD_ICACTIVER.start();
382  size = GicV2::itLines / 8;
383  clearBankedDistRange(to, clear, 4);
384  copyBankedDistRange(from, to, set, 4);
385 
386  set += 4, clear += 4, size -= 4;
387  clearDistRange(to, clear, size);
388  copyDistRange(from, to, set, size);
389 
390  // Copy interrupt priorities (IPRIORITYRn; R0-7 are per-CPU banked)
392  copyBankedDistRange(from, to, set, 32);
393 
394  set += 32;
395  size = GicV2::itLines - 32;
396  copyDistRange(from, to, set, size);
397 
398  // Copy interrupt processor target regs (ITARGETRn; R0-7 are read-only)
399  set = GicV2::GICD_ITARGETSR.start() + 32;
400  size = GicV2::itLines - 32;
401  copyDistRange(from, to, set, size);
402 
403  // Copy interrupt configuration registers (ICFGRn)
404  set = GicV2::GICD_ICFGR.start();
405  size = GicV2::itLines / 4;
406  copyDistRange(from, to, set, size);
407 }
408 
409 void
411 {
412  copyGicState(static_cast<GicV2*>(this), kernelGic);
413 }
414 
415 void
417 {
418  copyGicState(kernelGic, static_cast<GicV2*>(this));
419 
420  // the values read for the Interrupt Priority Mask Register (PMR)
421  // have been shifted by three bits due to its having been emulated by
422  // a VGIC with only 5 PMR bits in its VMCR register. Presently the
423  // Linux kernel does not repair this inaccuracy, so we correct it here.
424  for (int cpu = 0; cpu < system.threads.size(); ++cpu) {
425  cpuPriority[cpu] <<= 3;
426  assert((cpuPriority[cpu] & ~0xff) == 0);
427  }
428 }
KvmVM
KVM VM container.
Definition: vm.hh:289
MuxingKvmGic::fromGicV2ToKvm
void fromGicV2ToKvm()
Multiplexing implementation.
Definition: gic.cc:410
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
GicV2::GICC_BPR
@ GICC_BPR
Definition: gic_v2.hh:96
data
const char data[]
Definition: circlebuf.test.cc:47
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:264
MuxingKvmGic::fromKvmToGicV2
void fromKvmToGicV2()
Definition: gic.cc:416
GicV2::GICD_CTLR
@ GICD_CTLR
Definition: gic_v2.hh:65
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:237
GicV2
Definition: gic_v2.hh:60
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:59
KvmKernelGicV2::readDistributor
uint32_t readDistributor(ContextID ctx, Addr daddr) override
BaseGicRegisters interface.
Definition: gic.cc:138
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:321
MuxingKvmGic::drainResume
void drainResume() override
Resume execution after a successful drain.
Definition: gic.cc:202
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:194
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:329
MuxingKvmGic::read
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: gic.cc:217
System::validKvmEnvironment
bool validKvmEnvironment() const
Verify gem5 configuration will support KVM emulation.
Definition: system.cc:358
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:545
MuxingKvmGic::write
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
Definition: gic.cc:226
X86ISA::reg
Bitfield< 5, 3 > reg
Definition: types.hh:88
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:93
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
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:255
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:119
GicV2::GICD_IPRIORITYR
static const AddrRange GICD_IPRIORITYR
Definition: gic_v2.hh:88
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:237
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:651
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
GicV2::GICC_PMR
@ GICC_PMR
Definition: gic_v2.hh:95
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:180
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:148
MuxingKvmGic::clearInt
void clearInt(uint32_t num) override
Clear an interrupt from a device that is connected to the GIC.
Definition: gic.cc:245
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:329
GicV2::GICD_ICFGR
static const AddrRange GICD_ICFGR
Definition: gic_v2.hh:90
MuxingKvmGic::MuxingKvmGic
MuxingKvmGic(const MuxingKvmGicParams &p)
Definition: gic.cc:167
BaseGicRegisters::readDistributor
virtual uint32_t readDistributor(ContextID ctx, Addr daddr)=0
System::threads
Threads threads
Definition: system.hh:304
MuxingKvmGic::copyCpuRegister
void copyCpuRegister(BaseGicRegisters *from, BaseGicRegisters *to, ContextID ctx, Addr daddr)
Definition: gic.cc:294
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:274
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:303
KvmVM::setIRQLine
void setIRQLine(uint32_t irq, bool high)
Set the status of an IRQ line using KVM_IRQ_LINE.
Definition: vm.cc:507
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:258
KvmKernelGicV2::setPPI
void setPPI(unsigned vcpu, unsigned ppi)
Raise a private peripheral interrupt.
Definition: gic.cc:83
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:312
GicV2::drainResume
void drainResume() override
Resume execution after a successful drain.
Definition: gic_v2.cc:983
X86ISA::type
type
Definition: misc.hh:727
GicV2::sendPPInt
void sendPPInt(uint32_t num, uint32_t cpu) override
Interface call for private peripheral interrupts.
Definition: gic_v2.cc:875
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:285
MuxingKvmGic::copyGicState
void copyGicState(BaseGicRegisters *from, BaseGicRegisters *to)
Definition: gic.cc:337
MuxingKvmGic::sendInt
void sendInt(uint32_t num) override
Post an interrupt from a device that is connected to the GIC.
Definition: gic.cc:235
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:185
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
GicV2::GICC_CTLR
@ GICC_CTLR
Definition: gic_v2.hh:94
ArmISA::offset
Bitfield< 23, 0 > offset
Definition: types.hh:153

Generated on Tue Mar 23 2021 19:41:18 for gem5 by doxygen 1.8.17