Skip to content

Commit

Permalink
Configure PMP in mstatus CSR test (necessery as MPRV bit alters acces…
Browse files Browse the repository at this point in the history
…s rights)

Internal-tag: [#59827]
Signed-off-by: Maciej Kurc <[email protected]>
  • Loading branch information
mkurc-ant committed Jun 3, 2024
1 parent 619096f commit bcdb512
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions testbench/tests/csr_mstatus/crt0.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ _start:
# Setup stack
la sp, STACK

# Setup PMP
# Region 0 TOR 0x00000000-0xFFFFFFFF RWX
li t0, 0xFFFFFFFF
csrw pmpaddr0, t0
li t0, 0x0000000F
csrw pmpcfg0, t0

# Call main()
call main

Expand Down

0 comments on commit bcdb512

Please sign in to comment.