arch-power: Added function to set HSSR1 register
authorKajol Jain <kajoljain797@gmail.com>
Wed, 12 Jun 2019 05:57:45 +0000 (11:27 +0530)
committerKajol Jain <kajoljain797@gmail.com>
Wed, 12 Jun 2019 08:47:59 +0000 (14:17 +0530)
Change-Id: Ie7f44b4f901d22bf877b5c066a9f9042effb793c
Signed-off-by: Kajol Jain <kajoljain797@gmail.com>
src/arch/power/faults.hh

index 28eac707bbbd740ce4def870e9962f8a4953c4c3..206f8c643611b65bce8664421a0e1b8170638e86 100644 (file)
@@ -138,6 +138,14 @@ class PowerInterrupt : public PowerFaultBase
       uint64_t srr1 = ((msr & unsetMask(31, 27)) & unsetMask(22,16)) | BitMask;
       tc->setIntReg(INTREG_SRR1, srr1);
     }
+
+    virtual void updateHSRR1(ThreadContext *tc, uint64_t BitMask=0x0000000)
+    {
+      Msr msr = tc->readIntReg(INTREG_MSR);
+      uint64_t hsrr1 = ((msr & unsetMask(31, 27)) & unsetMask(22,16)) |
+                                                    BitMask;
+      tc->setIntReg(INTREG_HSRR1, hsrr1);
+    }
 };
 
 //SRR1 value is correctly set by the entity raising