mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-03 10:15:19 +00:00
Merge pull request #583 from jordancarlin/main
Privilege coverage improvements
This commit is contained in:
commit
77270bc63d
@ -37,4 +37,31 @@ main:
|
||||
csrrw t1, menvcfg, t0
|
||||
csrrw t2, senvcfg, t0
|
||||
|
||||
# testing FIOM with different privelege modes
|
||||
# setting environment config (to both 1 and 0) in each privelege mode
|
||||
csrsi menvcfg, 1
|
||||
li a0, 1
|
||||
ecall # enter supervisor mode
|
||||
|
||||
li a0, 0
|
||||
ecall # enter user mode
|
||||
|
||||
li a0, 1
|
||||
ecall # enter supervisor mode
|
||||
|
||||
csrsi senvcfg, 1
|
||||
li a0, 0
|
||||
ecall # enter user mode
|
||||
|
||||
li a0, 3
|
||||
ecall # enter machine mode
|
||||
csrci menvcfg, 1
|
||||
|
||||
li a0, 1
|
||||
ecall # enter supervisor mode
|
||||
|
||||
li a0, 0
|
||||
ecall # enter user mode
|
||||
|
||||
|
||||
j done
|
||||
|
@ -297,6 +297,16 @@ sretdone:
|
||||
|
||||
wfi
|
||||
|
||||
|
||||
|
||||
# Test uncovered privdec instructions
|
||||
# exercise sfence.inval.ir instruction
|
||||
.word 0x18100073
|
||||
|
||||
# exercise sret with rs1 not 0
|
||||
.word 0x102F8073
|
||||
|
||||
|
||||
j done
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user