mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Set PMP to allow all user/supervisor accesses in WALLY-init-lib
This commit is contained in:
parent
2e238c15aa
commit
4594dffc7f
@ -40,6 +40,10 @@ rvtest_entry_point:
|
|||||||
la t0, topoftrapstack
|
la t0, topoftrapstack
|
||||||
csrw mscratch, t0 # MSCRATCH holds trap stack pointer
|
csrw mscratch, t0 # MSCRATCH holds trap stack pointer
|
||||||
csrsi mstatus, 0x8 # Turn on mstatus.MIE global interrupt enable
|
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
|
j main # Call main function in user test program
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
@ -33,6 +33,7 @@ main:
|
|||||||
ecall
|
ecall
|
||||||
|
|
||||||
# Test read to stimecmp fails when MCOUNTEREN_TM is not set
|
# Test read to stimecmp fails when MCOUNTEREN_TM is not set
|
||||||
|
addi t0, zero, 0
|
||||||
csrr t0, stimecmp
|
csrr t0, stimecmp
|
||||||
|
|
||||||
j done
|
j done
|
||||||
|
Loading…
Reference in New Issue
Block a user