1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/usr/bin/env python3
"""Read-only host SMN survey of candidate MP1 PMI3 adjacent words.
Numeric 0x03B30600 occurs in signed Navi31 SMU13 firmware; adjacent
register names are only a Navi22 hypothesis. Do NOT read the data word here:
a read may be destructive. The only host writes select the SMN read index.
"""
from tinygrad import Device
adev=Device['AMD'].iface.dev_impl
def smn_read(a):
adev.wreg(14,a) # PCIE_INDEX2: address selector only
return adev.rreg(15)&0xffffffff
for name,a in (
('bogus_before',0x0FEEDC00),
('mp0_before',0x03810ACC),
('candidate_status_first',0x03B30604),
('candidate_read_pointer',0x03B30608),
('candidate_write_pointer',0x03B3060C),
('candidate_status_again',0x03B30604),
('mp0_after',0x03810ACC),
('bogus_after',0x0FEEDC00),
):
print(name,hex(a),hex(smn_read(a)),flush=True)
|