gic.hh (11838:0b311345ac72) | gic.hh (11840:16943209ed85) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2015-2016 ARM Limited | 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 --- 19 unchanged lines hidden (view full) --- 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 * Authors: Andreas Sandberg | 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 --- 19 unchanged lines hidden (view full) --- 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 * Authors: Andreas Sandberg |
38 * Curtis Dunham |
|
38 */ 39 40#ifndef __ARCH_ARM_KVM_GIC_HH__ 41#define __ARCH_ARM_KVM_GIC_HH__ 42 43#include "arch/arm/system.hh" 44#include "cpu/kvm/device.hh" 45#include "cpu/kvm/vm.hh" 46#include "dev/arm/base_gic.hh" | 39 */ 40 41#ifndef __ARCH_ARM_KVM_GIC_HH__ 42#define __ARCH_ARM_KVM_GIC_HH__ 43 44#include "arch/arm/system.hh" 45#include "cpu/kvm/device.hh" 46#include "cpu/kvm/vm.hh" 47#include "dev/arm/base_gic.hh" |
48#include "dev/arm/gic_pl390.hh" |
|
47#include "dev/platform.hh" 48 49/** 50 * KVM in-kernel GIC abstraction 51 * 52 * This class defines a high-level interface to the KVM in-kernel GIC 53 * model. It exposes an API that is similar to that of 54 * software-emulated GIC models in gem5. --- 145 unchanged lines hidden (view full) --- 200 201 /** Kernel GIC device */ 202 KvmKernelGicV2 kernelGic; 203 204 /** Union of all memory */ 205 const AddrRangeList addrRanges; 206}; 207 | 49#include "dev/platform.hh" 50 51/** 52 * KVM in-kernel GIC abstraction 53 * 54 * This class defines a high-level interface to the KVM in-kernel GIC 55 * model. It exposes an API that is similar to that of 56 * software-emulated GIC models in gem5. --- 145 unchanged lines hidden (view full) --- 202 203 /** Kernel GIC device */ 204 KvmKernelGicV2 kernelGic; 205 206 /** Union of all memory */ 207 const AddrRangeList addrRanges; 208}; 209 |
210struct MuxingKvmGicParams; 211 212class MuxingKvmGic : public Pl390 213{ 214 public: // SimObject / Serializable / Drainable 215 MuxingKvmGic(const MuxingKvmGicParams *p); 216 ~MuxingKvmGic(); 217 218 void startup() override; 219 void drainResume() override; 220 221 void serialize(CheckpointOut &cp) const override; 222 void unserialize(CheckpointIn &cp) override; 223 224 public: // PioDevice 225 Tick read(PacketPtr pkt) override; 226 Tick write(PacketPtr pkt) override; 227 228 public: // Pl390 229 void sendInt(uint32_t num) override; 230 void clearInt(uint32_t num) override; 231 232 void sendPPInt(uint32_t num, uint32_t cpu) override; 233 void clearPPInt(uint32_t num, uint32_t cpu) override; 234 235 protected: 236 /** Verify gem5 configuration will support KVM emulation */ 237 bool validKvmEnvironment() const; 238 239 /** System this interrupt controller belongs to */ 240 System &system; 241 242 /** Kernel GIC device */ 243 KvmKernelGicV2 *kernelGic; 244 245 private: 246 bool usingKvm; 247 248 /** Multiplexing implementation: state transfer functions */ 249 void fromPl390ToKvm(); 250 void fromKvmToPl390(); 251}; 252 |
|
208#endif // __ARCH_ARM_KVM_GIC_HH__ | 253#endif // __ARCH_ARM_KVM_GIC_HH__ |