mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-22 22:53:04 +00:00
hv.py: hook USB-C port specific pmgr addresses
Allows running HV over each USB-C port of a Mac Mini with Mac OS as guest. Signed-off-by: Janne Grunau <j@jannau.net>
This commit is contained in:
parent
d88e255c56
commit
bbd2cf8710
1 changed files with 6 additions and 1 deletions
|
@ -876,7 +876,12 @@ class HV(Reloadable):
|
|||
print(f"R {base:x}+{off:x}:{width} = 0x{data:x} -> 0x{ret:x}")
|
||||
return ret
|
||||
|
||||
for addr in (0x23b700420, 0x23d280098, 0x23d280088, 0x23d280090):
|
||||
if self.iodev == IODEV.USB0:
|
||||
pmgr_hooks = (0x23b700420, 0x23d280098, 0x23d280088)
|
||||
elif self.iodev == IODEV.USB1:
|
||||
pmgr_hooks = (0x23b700448, 0x23d2800a0, 0x23d280090)
|
||||
|
||||
for addr in pmgr_hooks:
|
||||
self.map_hook(addr, 4, write=wh, read=rh)
|
||||
# TODO: turn into a real tracer
|
||||
self.add_tracer(irange(addr, 4), "PMU HACK", TraceMode.RESERVED)
|
||||
|
|
Loading…
Reference in a new issue