MCPcopy
hub / github.com/AsahiLinux/m1n1 / run_test

Function run_test

proxyclient/experiments/timer_test.py:18–31  ·  view source on GitHub ↗
(ctl, tval)

Source from the content-addressed store, hash-verified

16u.msr(CNTHCTL_EL2, 3 << 10) # EL1PTEN | EL1PCTEN
17
18def 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
33def test_hv_timers():
34 u.msr(DAIF, 0x3c0)

Callers 2

test_hv_timersFunction · 0.85
test_guest_timersFunction · 0.85

Calls 4

msrMethod · 0.80
mrsMethod · 0.80
nopMethod · 0.45
sleepMethod · 0.45

Tested by

no test coverage detected