diff --git a/tests/coverage/WALLY-init-lib.h b/tests/coverage/WALLY-init-lib.h index 4de5e7688..f95ef285c 100644 --- a/tests/coverage/WALLY-init-lib.h +++ b/tests/coverage/WALLY-init-lib.h @@ -40,6 +40,10 @@ rvtest_entry_point: la t0, topoftrapstack csrw mscratch, t0 # MSCRATCH holds trap stack pointer csrsi mstatus, 0x8 # Turn on mstatus.MIE global interrupt enable + # set up PMP so user and supervisor mode can access full address space + csrw pmpcfg0, 0xF # configure PMP0 to TOR RWX + li t0, 0xFFFFFFFF + csrw pmpaddr0, t0 # configure PMP0 top of range to 0xFFFFFFFF to allow all 32-bit addresses j main # Call main function in user test program done: diff --git a/tests/coverage/priv.S b/tests/coverage/priv.S index 81ec31df9..3aa3aea5c 100644 --- a/tests/coverage/priv.S +++ b/tests/coverage/priv.S @@ -33,6 +33,7 @@ main: ecall # Test read to stimecmp fails when MCOUNTEREN_TM is not set + addi t0, zero, 0 csrr t0, stimecmp j done