Deleted Added
sdiff udiff text old ( 10037:5cac77888310 ) new ( 10905:a6ca6831e775 )
full compact
1/*
2 * Copyright (c) 2013 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

--- 38 unchanged lines hidden (view full) ---

47 * The mode in which the List Registers may flag (via LR.HW) that a hardware EOI
48 * is to be performed is NOT supported. (This requires tighter integration with
49 * the GIC.)
50 */
51
52#ifndef __DEV_ARM_VGIC_H__
53#define __DEV_ARM_VGIC_H__
54
55#include "base/addr_range.hh"
56#include "base/bitunion.hh"
57#include "cpu/intr_control.hh"
58#include "dev/io_device.hh"
59#include "dev/platform.hh"
60#include "params/VGic.hh"
61
62class VGic : public PioDevice

--- 94 unchanged lines hidden (view full) ---

157 Bitfield<2> AckCtl;
158 Bitfield<1> EnGrp1;
159 Bitfield<0> En; // This gets written to enable, not group 1.
160 EndBitUnion(VCTLR)
161
162 /* State per CPU. EVERYTHING should be in this struct and simply replicated
163 * N times.
164 */
165 struct vcpuIntData {
166 ListReg LR[NUM_LR];
167 VCTLR vctrl;
168
169 HCR hcr;
170 uint64_t eisr;
171
172 /* Host info, guest info (should be 100% accessible via GICH_* regs!) */
173 uint8_t VMGrp0En;
174 uint8_t VMGrp1En;
175 uint8_t VMAckCtl;
176 uint8_t VMFiqEn;
177 uint8_t VMCBPR;
178 uint8_t VEM;
179 uint8_t VMABP;
180 uint8_t VMBP;
181 uint8_t VMPriMask;
182 };
183
184 struct vcpuIntData vcpuData[VGIC_CPU_MAX];
185
186 public:
187 typedef VGicParams Params;
188 const Params *
189 params() const
190 {
191 return dynamic_cast<const Params *>(_params);
192 }
193 VGic(const Params *p);
194
195 virtual AddrRangeList getAddrRanges() const;
196
197 virtual Tick read(PacketPtr pkt);
198 virtual Tick write(PacketPtr pkt);
199
200 virtual void serialize(std::ostream &os);
201 virtual void unserialize(Checkpoint *cp, const std::string &section);
202
203 private:
204 Tick readVCpu(PacketPtr pkt);
205 Tick readCtrl(PacketPtr pkt);
206
207 Tick writeVCpu(PacketPtr pkt);
208 Tick writeCtrl(PacketPtr pkt);
209

--- 53 unchanged lines hidden ---