mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-04-22 21:08:08 -04:00
tried to improve testing of csri in privileged module
This commit is contained in:
parent
416b322ad6
commit
fdb7abec06
2 changed files with 13 additions and 1 deletions
|
@ -44,10 +44,10 @@ string tvpaths[] = '{
|
|||
|
||||
string coverage64gc[] = '{
|
||||
`COVERAGE,
|
||||
"priv",
|
||||
"ieu",
|
||||
"ebu",
|
||||
"csrwrites",
|
||||
"priv",
|
||||
"ifu",
|
||||
"fpu",
|
||||
"lsu",
|
||||
|
|
|
@ -59,11 +59,23 @@ sretdone:
|
|||
# 1st is when MENVCFG_STCE is cleared
|
||||
li a0, 3
|
||||
ecall # starts in M-mode
|
||||
li t1, -3
|
||||
csrw stimecmp, t1 # sets stimecmp to large value to prevent it from interrupting immediately
|
||||
li t0, 2
|
||||
csrs mstatus, t0 # enables sie
|
||||
li t0, 32
|
||||
csrs sie, t0 # enables sie.stie
|
||||
csrw menvcfg, x0
|
||||
li a0, 1
|
||||
ecall # enter S-mode
|
||||
csrw stimecmp, zero
|
||||
li a0, 3
|
||||
ecall # in M-mode
|
||||
li t0, 32
|
||||
csrs sip, t0
|
||||
li a0, 1
|
||||
ecall # in S-mode and expects stimer interrupt to occur
|
||||
li a0, 3
|
||||
ecall # return to M-mode
|
||||
csrsi mcounteren, 2 # mcounteren_tm = 1
|
||||
li a0, 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue