* Add a helper to write to the physical memory.
* This will be used in the subsequent patches to update the
  "Reference" and the "Change" bits on the page-table entry
  whenever a page is accessed.
Change-Id: I89c732be5884341ae0d33801a63578dbd2e08815
Signed-off-by: kajoljain379 <kajoljain797@gmail.com>
     return ret;
 }
 
+uint64_t
+RadixWalk::writePhysMem(uint64_t addr, uint64_t dataSize)
+{
+    uint64_t ret;
+    Request::Flags flags = Request::PHYSICAL;
+
+    RequestPtr request = new Request(addr, dataSize, flags, this->masterId);
+    Packet *write = new Packet(request, MemCmd::WriteReq);
+    write->allocate();
+    this->port.sendAtomic(write);
+    ret = write->get<uint64_t>();
+
+    delete write->req;
+
+    return ret;
+}
+
 uint32_t geteffLPID(ThreadContext *tc)
 {
     Msr msr = tc->readIntReg(INTREG_MSR);
 
       uint64_t readPhysMem(uint64_t addr, uint64_t dataSize);
 
       public:
+        uint64_t writePhysMem(uint64_t addr, uint64_t dataSize);
 
         BitUnion64(Rpde)
                 Bitfield<63> valid;