From 0e3ee31254d76d9fcfdf28967e071791249be2cb Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Tue, 23 Nov 2021 17:20:26 +0900 Subject: [PATCH] m1n1.fw.asc.kdebug: Handle prealloc messages (partially) Not sure if these need a reply... Signed-off-by: Hector Martin --- proxyclient/m1n1/fw/asc/kdebug.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/proxyclient/m1n1/fw/asc/kdebug.py b/proxyclient/m1n1/fw/asc/kdebug.py index fb4b8d29..32a433f7 100644 --- a/proxyclient/m1n1/fw/asc/kdebug.py +++ b/proxyclient/m1n1/fw/asc/kdebug.py @@ -9,6 +9,15 @@ class KDebugGetBufMessage(KDebugMessage): TYPE = 55, 48, Constant(1) 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): TYPE = 55, 48 DVA = 47, 0 @@ -30,6 +39,16 @@ class ASCKDebugEndpoint(ASCBaseEndpoint): self.send(KDebugSendBufMessage(TYPE=2, DVA=self.iobuffer1_iova)) 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): self.iobuffer0 = None self.iobuffer1 = None