SystemCallPCSet = 0xC00,
ProgramPCSet = 0x700,
DataStoragePCSet = 0x300,
- InstrStoragePCSet = 0x400
+ InstrStoragePCSet = 0x400,
+ PriDoorbellPCSet = 0xA00,
+ HypDoorbellPCSet = 0xe80
};
namespace PowerISA
}
};
+class PriDoorbellInterrupt : public PowerInterrupt
+{
+ public:
+ PriDoorbellInterrupt()
+ {
+ }
+ virtual void invoke(ThreadContext * tc, const StaticInstPtr &inst =
+ StaticInst::nullStaticInstPtr)
+ {
+ tc->setIntReg(INTREG_SRR0 , tc->instAddr());
+ PowerInterrupt::updateSRR1(tc);
+ PowerInterrupt::updateMsr(tc);
+ tc->pcState(PriDoorbellPCSet);
+ }
+};
+
+class HypDoorbellInterrupt : public PowerInterrupt
+{
+ public:
+ HypDoorbellInterrupt()
+ {
+ }
+ virtual void invoke(ThreadContext * tc, const StaticInstPtr &inst =
+ StaticInst::nullStaticInstPtr)
+ {
+ printf("In Hypervisor interrupt\n");
+ tc->setIntReg(INTREG_HSRR0 , tc->instAddr());
+ PowerInterrupt::updateHSRR1(tc);
+ PowerInterrupt::updateMsr(tc);
+ Msr msr = tc->readIntReg(INTREG_MSR);
+ msr.hv = 1;
+ tc->setIntReg(INTREG_MSR, msr);
+ tc->pcState(HypDoorbellPCSet);
+ }
+};
+
//SRR1 value is correctly set by the entity raising
//Instruction Storage Interrupt. So, no need to
//Update here.