mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-10 09:44:13 +00:00
utils: add u.inst() to run arbitrary instructions
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
99fb647a9b
commit
e5caf91d79
1 changed files with 9 additions and 0 deletions
|
@ -77,6 +77,15 @@ class ProxyUtils(object):
|
|||
|
||||
self.proxy.call(self.code_buffer, val)
|
||||
|
||||
def inst(self, op):
|
||||
func = struct.pack("<II", op, 0xd65f03c0)
|
||||
|
||||
self.iface.writemem(self.code_buffer, func)
|
||||
self.proxy.dc_cvau(self.code_buffer, 8)
|
||||
self.proxy.ic_ivau(self.code_buffer, 8)
|
||||
|
||||
self.proxy.call(self.code_buffer)
|
||||
|
||||
class RegMonitor(object):
|
||||
def __init__(self, utils):
|
||||
self.utils = utils
|
||||
|
|
Loading…
Reference in a new issue