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

Method ReadKeyPayload

proxyclient/hv/trace_smc.py:43–48  ·  view source on GitHub ↗
(self, msg)

Source from the content-addressed store, hash-verified

41
42 @msg(SMC_RW_KEY, DIR.TX, SMCReadWriteKey)
43 def ReadKeyPayload(self, msg):
44 key = msg.KEY.to_bytes(4, byteorder="big").decode("ascii")
45 self.state.rb[msg.ID] = msg.TYPE, key, msg.RSIZE
46 data = self.hv.iface.readmem(self.state.sram_addr, msg.WSIZE)
47 self.log(f"[{msg.ID:x}] >RP: <{key}> = {data.hex()} ({msg.WSIZE, msg.RSIZE})")
48 return True
49
50 @msg(SMC_GET_KEY_INFO, DIR.TX, SMCGetKeyInfo)
51 def GetInfo(self, msg):

Callers

nothing calls this directly

Calls 4

decodeMethod · 0.80
to_bytesMethod · 0.45
readmemMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected