(ctl, tval)
| 16 | u.msr(CNTHCTL_EL2, 3 << 10) # EL1PTEN | EL1PCTEN |
| 17 | |
| 18 | def run_test(ctl, tval): |
| 19 | u.inst(0xd5033fdf) # isb |
| 20 | |
| 21 | u.msr(ctl, 0) |
| 22 | u.msr(tval, int(freq * 0.8)) |
| 23 | u.msr(ctl, 1) |
| 24 | |
| 25 | for i in range(6): |
| 26 | p.nop() |
| 27 | time.sleep(0.2) |
| 28 | #u.inst(0xd5033fdf, call=p.el1_call) |
| 29 | print(" . (ISR_EL1=%d) CTL=%x VTMR_LIST=%x" % (u.mrs(ISR_EL1), u.mrs(ctl), u.mrs(HV_VTMR_LIST))) |
| 30 | |
| 31 | u.msr(ctl, 0) |
| 32 | |
| 33 | def test_hv_timers(): |
| 34 | u.msr(DAIF, 0x3c0) |
no test coverage detected