arch-power: Modify Decrementer interrupt
authorkajoljain379 <kajoljain797@gmail.com>
Sat, 12 Jan 2019 08:13:32 +0000 (13:43 +0530)
committerKajol Jain <kajoljain797@gmail.com>
Wed, 12 Jun 2019 07:06:03 +0000 (12:36 +0530)
Modify decrementer interrupt handler.

Change-Id: Ibafd535e7cb5faeb3d4f6c479893bb72f01f944c
Signed-off-by: kajoljain379 <kajoljain797@gmail.com>
src/arch/power/faults.hh

index 28592875a0c0ee5de6ae92c75fb5acf1484e6674..a6c7f44351ab9357f0e5362b31f1c174ccfce949 100644 (file)
@@ -148,14 +148,11 @@ class DecrementerInterrupt : public PowerInterrupt
     virtual void invoke(ThreadContext * tc, const StaticInstPtr &inst =
                         StaticInst::nullStaticInstPtr)
     {
-      Msr msr = tc->readIntReg(MISCREG_MSR);
       // Refer Power ISA Manual v3.0B Book-III, section 6.5.11
       tc->setIntReg(INTREG_SRR0 , tc->instAddr());
-      uint64_t srr1 = msr & 0xffffffff78fc0fff;
-      tc->setIntReg(INTREG_SRR1 , srr1);
-      msr = msr & 0xffffffffffff76cd;
-      tc->setIntReg(INTREG_MSR , msr);
-      tc->pcState(0x900);
+      PowerInterrupt::updateSRR1(tc);
+      PowerInterrupt::updateMsr(tc);
+      tc->pcState(DecrementerPCSet);
     }
 };