diff --git a/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/references/WALLY-mmu-sv32-01.reference_output b/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/references/WALLY-mmu-sv32-01.reference_output index 070b7dd5..63f7c640 100644 --- a/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/references/WALLY-mmu-sv32-01.reference_output +++ b/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/references/WALLY-mmu-sv32-01.reference_output @@ -4,7 +4,6 @@ beef0033 beef0077 beef0099 beef0440 -beef0bb0 11100393 00008067 beef0055 @@ -36,7 +35,8 @@ beef0110 0000000f 0000000c 00000bad -beef0bb0 +beef0770 # Test 8.3.1.3.5: check successful read/write when A=0 and SVADU=1 +beef0aa0 # Test 8.3.1.3.6: check successful read/write when D=0 and SVADU=1 beef0077 # Test 12.3.1.4.1: successful read back of saved value with new memory mapping 00000009 # Test 12.3.1.5.1: ecall from going to m mode from s mode 00000000 # previous value of mprv before being set diff --git a/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-mmu-sv32-01.S b/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-mmu-sv32-01.S index c1c236dc..a8d9ae7c 100644 --- a/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-mmu-sv32-01.S +++ b/tests/wally-riscv-arch-test/riscv-test-suite/rv32i_m/privilege/src/WALLY-mmu-sv32-01.S @@ -86,7 +86,6 @@ test_cases: .4byte 0x800E3130, 0xBEEF0077, write32_test # 8.3.1.3.2 .4byte 0x808017E0, 0xBEEF0099, write32_test # 8.3.1.1.4 kilopage .4byte 0x80805EA0, 0xBEEF0440, write32_test # 8.3.1.3.3 -.4byte 0x80803AA0, 0xBEEF0BB0, write32_test # 8.3.1.3.7 .4byte 0x8000FFA0, 0x11100393, write32_test # write executable code for "li x7, 0x111; ret" to executable region. .4byte 0x8000FFA4, 0x00008067, write32_test # Used for 8.3.1.3.1, 8.3.1.3.2 @@ -98,7 +97,6 @@ test_cases: .4byte 0x800E3130, 0xBEEF0077, read32_test .4byte 0x808017E0, 0xBEEF0099, read32_test .4byte 0x80805EA0, 0xBEEF0440, read32_test -.4byte 0x80803AA0, 0xBEEF0BB0, read32_test .4byte 0x8000FFA0, 0x11100393, read32_test .4byte 0x8000FFA4, 0x00008067, read32_test @@ -159,12 +157,12 @@ test_cases: .4byte 0xBFFDE0, 0xbad, executable_test # instr page fault when X=0 # test 8.3.1.3.6 Accessed flag == 0 -.4byte 0x3020, 0xBEEF0770, write32_test # store page fault when A=0 -.4byte 0x3808, 0xBEEF0990, read32_test # load page fault when A=0 +.4byte 0x3020, 0xBEEF0770, write32_test # Write success when A=0 and SVADU is enabled +.4byte 0x3020, 0xBEEF0770, read32_test # Read success when A=0 and SVADU is enabled # test 8.3.1.3.7 Dirty flag == 0 -.4byte 0x4658, 0xBEEF0AA0, write32_test # store page fault when D=0 -.4byte 0x4AA0, 0xBEEF0BB0, read32_test # read success when D=0 +.4byte 0x4658, 0xBEEF0AA0, write32_test # write successs when D=0 and SVADU is enabled +.4byte 0x4658, 0xBEEF0AA0, read32_test # read success when D=0 # =========== test 8.3.1.4 SATP Register =========== diff --git a/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/references/WALLY-mmu-sv39-01.reference_output b/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/references/WALLY-mmu-sv39-01.reference_output index d54015c6..3d0718f7 100644 --- a/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/references/WALLY-mmu-sv39-01.reference_output +++ b/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/references/WALLY-mmu-sv39-01.reference_output @@ -12,8 +12,6 @@ beef0099 # Read test success from confirming writes of known values 0220dead beef0440 # Read test success from confirming writes of known values 0330dead -beef0bb0 # Read test success from confirming writes of known values -0440dead beef0000 # Test 12.3.1.1.4: Read test success from checking translation works 0000dead beef0055 # Read test success from checking translation works @@ -86,7 +84,9 @@ beef0110 # Test 12.3.1.3.4: read test success 00000000 00000bad 00000000 -beef0bb0 # read test success +beef0770 # Test 8.3.1.3.5: check successful read/write when A=0 and SVADU=1 +0990dead +beef0aa0 # Test 8.3.1.3.6: check successful read/write when D=0 and SVADU=1 0440dead beef0000 # Test 12.3.1.4.1: read test success from new page table mapping 0000dead diff --git a/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/references/WALLY-mmu-sv48-01.reference_output b/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/references/WALLY-mmu-sv48-01.reference_output index d1ab1904..3cb70c99 100644 --- a/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/references/WALLY-mmu-sv48-01.reference_output +++ b/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/references/WALLY-mmu-sv48-01.reference_output @@ -14,8 +14,6 @@ beef0099 # read 6 0220dead beef0440 # read 7 0330dead -beef0bb0 # read 8 -0440dead beef0cc0 # Test 12.3.1.1.4: 4 read test successes 0ee0dead beef0000 # read 2 @@ -93,8 +91,10 @@ beef0110 # Test 12.3.1.3.4: read test success 0000000c # Test 12.3.1.3.5: executable test with page fault 00000000 00000bad -00000000 -beef0bb0 # read test success +00000000 +beef0770 # Test 8.3.1.3.5: check successful read/write when A=0 and SVADU=1 +0990dead +beef0aa0 # Test 8.3.1.3.6: check successful read/write when D=0 and SVADU=1 0440dead beef0000 # Test 12.3.1.4.1: read test success on new page table mapping 0000dead diff --git a/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/src/WALLY-mmu-sv39-01.S b/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/src/WALLY-mmu-sv39-01.S index 03bdad94..d59b0788 100644 --- a/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/src/WALLY-mmu-sv39-01.S +++ b/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/src/WALLY-mmu-sv39-01.S @@ -100,7 +100,6 @@ test_cases: .8byte 0x80205AA0, 0x0000806711100393, write64_test# 8.3.1.3.5 write same executable code .8byte 0x80201888, 0x0220DEADBEEF0099, write64_test# 8.3.1.1.4 .8byte 0x84212348, 0x0330DEADBEEF0440, write64_test# 8.3.1.3.3 -.8byte 0x80203AA0, 0x0440DEADBEEF0BB0, write64_test# 8.3.1.3.7 # test 8.3.1.1.3 read values back from Paddrs without translation (this also verifies the previous test) .8byte 0x0, 0x0, goto_baremetal# satp.MODE = baremetal / no translation. @@ -111,7 +110,6 @@ test_cases: .8byte 0x80203130, 0x0110DEADBEEF0077, read64_test .8byte 0x80201888, 0x0220DEADBEEF0099, read64_test .8byte 0x84212348, 0x0330DEADBEEF0440, read64_test -.8byte 0x80203AA0, 0x0440DEADBEEF0BB0, read64_test # test 8.3.1.1.4 check translation works in sv39, read the same values from previous tests, this time with Vaddrs .8byte 0x8000D, 0x0, goto_sv39 # satp.MODE = sv39, with base page table PPN = 0x8000D and ASID = 0. current VPN: gigapage at 0x80000000. @@ -174,12 +172,12 @@ test_cases: .8byte 0x5AA0, 0x1, executable_test # instr page fault when X=0 # test 8.3.1.3.6 Accessed flag == 0 -.8byte 0x36D0, 0x0990DEADBEEF0770, write64_test# store page fault when A=0 -.8byte 0x3AB8, 0x0990DEADBEEF0990, read64_test# load page fault when A=0 +.8byte 0x36D0, 0x0990DEADBEEF0770, write64_test # Write success when A=0 and SVADU is enabled +.8byte 0x36D0, 0x0990DEADBEEF0770, read64_test # Read success when A=0 and SVADU is enabled # test 8.3.1.3.7 Dirty flag == 0 -.8byte 0x4658, 0x0440DEADBEEF0AA0, write64_test# store page fault when D=0 -.8byte 0x4AA0, 0x0440DEADBEEF0BB0, read64_test# read success when D=0 +.8byte 0x4658, 0x0440DEADBEEF0AA0, write64_test # Write success when D=0 and SVADU is enabled +.8byte 0x4658, 0x0440DEADBEEF0AA0, read64_test # read success when D=0 # =========== test 8.3.1.4 SATP Register =========== diff --git a/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/src/WALLY-mmu-sv48-01.S b/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/src/WALLY-mmu-sv48-01.S index bb231882..58df6d64 100644 --- a/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/src/WALLY-mmu-sv48-01.S +++ b/tests/wally-riscv-arch-test/riscv-test-suite/rv64i_m/privilege/src/WALLY-mmu-sv48-01.S @@ -114,7 +114,6 @@ test_cases: .8byte 0x80200130, 0x0110DEADBEEF0077, write64_test # 8.3.1.3.2 .8byte 0x85212348, 0x0330DEADBEEF0440, write64_test # 8.3.1.3.3 .8byte 0x88888000, 0x0000806711100393, write64_test # 8.3.1.3.5 write same executable code -.8byte 0x80203AA0, 0x0440DEADBEEF0BB0, write64_test # 8.3.1.3.7 # test 8.3.1.1.3 read values back from Paddrs without translation (this also verifies the previous test) .8byte 0x0, 0x0, goto_baremetal # satp.MODE = baremetal / no translation. @@ -126,7 +125,6 @@ test_cases: .8byte 0x80200130, 0x0110DEADBEEF0077, read64_test .8byte 0x80201888, 0x0220DEADBEEF0099, read64_test .8byte 0x85212348, 0x0330DEADBEEF0440, read64_test -.8byte 0x80203AA0, 0x0440DEADBEEF0BB0, read64_test # test 8.3.1.1.4 check translation works in sv48, read the same values from previous tests, this time with Vaddrs .8byte 0x8000D, 0x0, goto_sv48 # satp.MODE = sv48, with base page table PPN = 0x8000D and ASID = 0. current VPN: megapage at 0x80000000. Nothing written to output @@ -190,12 +188,12 @@ test_cases: .8byte 0x010088888000, 0x2, executable_test # execute fault when X=0 # test 8.3.1.3.6 Accessed flag == 0 -.8byte 0x802036D0, 0x0990DEADBEEF0770, write64_test # write fault when A=0 -.8byte 0x80203AB8, 0x0990DEADBEEF0990, read64_test# read fault when A=0 +.8byte 0x802036D0, 0x0990DEADBEEF0770, write64_test # Write success when A=0 and SVADU is enabled +.8byte 0x802036D0, 0x0990DEADBEEF0770, read64_test # Read success when A=0 and SVADU is enabled # test 8.3.1.3.7 Dirty flag == 0 -.8byte 0x80204658, 0x0440DEADBEEF0AA0, write64_test # write fault when D=0 -.8byte 0x80204AA0, 0x0440DEADBEEF0BB0, read64_test# read success when D=0 +.8byte 0x80204658, 0x0440DEADBEEF0AA0, write64_test # Write success when D=0 and SVADU is enabled +.8byte 0x80204658, 0x0440DEADBEEF0AA0, read64_test # read success when D=0 # =========== test 8.3.1.4 SATP Register ===========