Allow supervisor access to user pages in dirty-bit test
authorAndrew Waterman <andrew@sifive.com>
Tue, 21 Mar 2017 23:47:04 +0000 (16:47 -0700)
committerAndrew Waterman <andrew@sifive.com>
Tue, 21 Mar 2017 23:47:04 +0000 (16:47 -0700)
isa/rv64si/dirty.S

index e3a7987efc9861b08840959da6b46f9ddfdbadbe..06c978068330158bee83d8c1803cd0e964197e5e 100644 (file)
@@ -23,7 +23,7 @@ RVTEST_CODE_BEGIN
   or a2, a2, a0
   csrw sptbr, a1
   sfence.vma
   or a2, a2, a0
   csrw sptbr, a1
   sfence.vma
-  li a1, (MSTATUS_MPP & ~(MSTATUS_MPP<<1)) * PRV_S
+  li a1, ((MSTATUS_MPP & ~(MSTATUS_MPP<<1)) * PRV_S) | MSTATUS_SUM
   csrs mstatus, a1
   la a1, 1f - DRAM_BASE
   csrw mepc, a1
   csrs mstatus, a1
   la a1, 1f - DRAM_BASE
   csrw mepc, a1