2021-01-16 15:50:13 +00:00
|
|
|
import serial, os, struct, sys, time
|
|
|
|
from proxy import *
|
|
|
|
from tgtypes import *
|
|
|
|
from utils import *
|
|
|
|
|
2021-04-27 10:48:35 +00:00
|
|
|
iface = UartInterface()
|
2021-01-16 15:50:13 +00:00
|
|
|
p = M1N1Proxy(iface, debug=False)
|
2021-02-02 18:51:41 +00:00
|
|
|
|
|
|
|
try:
|
2021-04-27 10:48:35 +00:00
|
|
|
iface.dev.timeout = 0.15
|
2021-02-02 18:51:41 +00:00
|
|
|
iface.nop()
|
|
|
|
p.set_baud(1500000)
|
|
|
|
except UartTimeout:
|
2021-04-27 10:48:35 +00:00
|
|
|
iface.dev.baudrate = 1500000
|
2021-02-02 18:51:41 +00:00
|
|
|
iface.nop()
|
|
|
|
|
2021-04-27 10:48:35 +00:00
|
|
|
iface.dev.timeout = 3
|
2021-02-02 19:52:17 +00:00
|
|
|
|
2021-01-16 15:50:13 +00:00
|
|
|
u = ProxyUtils(p)
|
|
|
|
mon = RegMonitor(u)
|
|
|
|
|
|
|
|
iface.nop()
|
|
|
|
|
2021-01-23 13:33:12 +00:00
|
|
|
fb = u.ba.video.base
|
|
|
|
|
2021-02-24 12:44:21 +00:00
|
|
|
EL0_REGION = 0x8000000000
|
|
|
|
|
2021-01-16 15:50:13 +00:00
|
|
|
print("Base at: 0x%x" % u.base)
|
2021-01-23 13:33:12 +00:00
|
|
|
print("FB at: 0x%x" % fb)
|