haveGICv3CPUInterface = true;
gicv3CpuInterface.reset(gicv3->getCPUInterface(tc->contextId()));
gicv3CpuInterface->setISA(this);
+ gicv3CpuInterface->setThreadContext(tc);
}
}
}
"Delay for PIO r/w to redistributors")
it_lines = Param.UInt32(1020,
"Number of interrupt lines supported (max = 1020)")
+
+ maint_int = Param.ArmInterruptPin(
+ "HV maintenance interrupt."
+ "ARM strongly recommends that maintenance interrupts "
+ "are configured to use INTID 25 (PPI Interrupt).")
]
class VExpress_GEM5_V2_Base(VExpress_GEM5_Base):
- gic = Gicv3()
+ gic = Gicv3(maint_int=ArmPPI(num=25))
def _on_chip_devices(self):
return super(VExpress_GEM5_V2_Base,self)._on_chip_devices() + [
class Gicv3 : public BaseGic
{
protected:
+ friend class Gicv3CPUInterface;
typedef Gicv3Params Params;
Gicv3Distributor * distributor;
hppi.prio = 0xff;
}
+void
+Gicv3CPUInterface::setThreadContext(ThreadContext *tc)
+{
+ maintenanceInterrupt = gic->params()->maint_int->get(tc);
+}
+
bool
Gicv3CPUInterface::getHCREL2FMO() const
{
if (ich_hcr_el2.En) {
if (maintenanceInterruptStatus()) {
- redistributor->sendPPInt(25);
+ maintenanceInterrupt->raise();
}
}
Gicv3Distributor * distributor;
uint32_t cpuId;
+ ArmInterruptPin *maintenanceInterrupt;
+
BitUnion64(ICC_CTLR_EL1)
Bitfield<63, 20> res0_3;
Bitfield<19> ExtRange;
bool isEOISplitMode() const;
bool isSecureBelowEL3() const;
ICH_MISR_EL2 maintenanceInterruptStatus() const;
- RegVal readMiscReg(int misc_reg) override;
void reset();
void serialize(CheckpointOut & cp) const override;
- void setMiscReg(int misc_reg, RegVal val) override;
void unserialize(CheckpointIn & cp) override;
void update();
void virtualActivateIRQ(uint32_t lrIdx);
void init();
void initState();
+
+ public: // BaseISADevice
+ RegVal readMiscReg(int misc_reg) override;
+ void setMiscReg(int misc_reg, RegVal val) override;
+ void setThreadContext(ThreadContext *tc) override;
};
#endif //__DEV_ARM_GICV3_CPU_INTERFACE_H__