m1n1.fw.asc.kdebug: Handle prealloc messages (partially)

Not sure if these need a reply...

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2021-11-23 17:20:26 +09:00
parent 99acc2675b
commit 0e3ee31254

View file

@ -9,6 +9,15 @@ class KDebugGetBufMessage(KDebugMessage):
TYPE = 55, 48, Constant(1) TYPE = 55, 48, Constant(1)
COUNT = 47, 0 COUNT = 47, 0
class KDebugPreallocBuf1Message(KDebugMessage):
TYPE = 55, 48, Constant(2)
DVA = 47, 12
FLAGS = 11, 0
class KDebugPreallocBuf2Message(KDebugMessage):
TYPE = 55, 48, Constant(3)
DVA = 47, 0
class KDebugSendBufMessage(KDebugMessage): class KDebugSendBufMessage(KDebugMessage):
TYPE = 55, 48 TYPE = 55, 48
DVA = 47, 0 DVA = 47, 0
@ -30,6 +39,16 @@ class ASCKDebugEndpoint(ASCBaseEndpoint):
self.send(KDebugSendBufMessage(TYPE=2, DVA=self.iobuffer1_iova)) self.send(KDebugSendBufMessage(TYPE=2, DVA=self.iobuffer1_iova))
return True return True
@msg_handler(2, KDebugPreallocBuf1Message)
def SetBuf1(self, msg):
#self.send(KDebugSendBufMessage(TYPE=1, DVA=msg.DVA))
return True
@msg_handler(3, KDebugPreallocBuf2Message)
def SetBuf2(self, msg):
#self.send(KDebugSendBufMessage(TYPE=2, DVA=msg.DVA))
return True
def start(self): def start(self):
self.iobuffer0 = None self.iobuffer0 = None
self.iobuffer1 = None self.iobuffer1 = None