arch-power: Added functionality to update Reference and Change bit
authorkajoljain379 <kajoljain797@gmail.com>
Wed, 20 Mar 2019 09:54:48 +0000 (15:24 +0530)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 24 Jan 2021 03:59:41 +0000 (03:59 +0000)
* Update the "Reference" and the "Change" bits on
  the page-table entry whenever a page is accessed.

Change-Id: Iced7c10019e1ebe618f9723a65c6812d992bf27e
Signed-off-by: kajoljain379 <kajoljain797@gmail.com>
src/arch/power/radixwalk.cc

index ded48303394c347abeacca0caa8f1ad433036424..a0e88ed2e21af771f80d4a251a9e119d8897ff35 100644 (file)
@@ -514,6 +514,13 @@ RadixWalk::walkTree(Addr vaddr ,uint64_t curBase ,ThreadContext * tc ,
               DPRINTF(RadixWalk,"Fault is due to protection violation\n");
               }
 
+            rpte.ref = 1;
+            if (mode == BaseTLB::Write) {
+                rpte.c = 1;
+            }
+            gtobe<uint64_t>(rpte);
+            this->writePhysMem(rpte, dataSize);
+
           return AddrTran;
         }