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

Function test_cpu

proxyclient/experiments/dmp.py:140–162  ·  view source on GitHub ↗
(cpu, mask)

Source from the content-addressed store, hash-verified

138u.msr(EHID4_EL1, v)
139
140def test_cpu(cpu, mask):
141 global rnd_idx
142
143 total_aop = total_ptr = 0
144 p.memset64(data_buf_addr, 0x5555555555555555, SIZE_DATA_ARRAY)
145 p.memset64(aop_addr, 0x5555555555555555, PAGE_SIZE)
146 for i in range(REPETITIONS):
147 test_offset = L2_LINE_SIZE * rnd_idx
148 test_addr = data_buf_addr + test_offset
149
150 p.write64(aop_addr, test_addr | mask | REGION_RWX_EL0)
151 p.dc_civac(aop_addr, L2_LINE_SIZE)
152 # p.dc_civac(data_buf_addr, SIZE_DATA_ARRAY)
153
154 elapsed = p.smp_call_sync_el0(cpu, util.test | REGION_RWX_EL0, aop_addr | REGION_RWX_EL0, test_addr | REGION_RWX_EL0, 7 << 60)
155 time_aop = elapsed >> 32
156 time_ptr = elapsed & 0xffffffff
157 total_aop += time_aop
158 total_ptr += time_ptr
159
160 rnd_idx = prng(rnd_idx)
161
162 return total_aop, total_ptr
163
164
165print("ECore plain:", test_cpu(TEST_ECORE, 0))

Callers 1

dmp.pyFile · 0.70

Calls 5

prngFunction · 0.85
memset64Method · 0.80
dc_civacMethod · 0.80
smp_call_sync_el0Method · 0.80
write64Method · 0.45

Tested by

no test coverage detected