Skip to content

Commit

Permalink
hv/dcp: Add OOB ASYNC call context
Browse files Browse the repository at this point in the history
Only observed with dcp/dptx in linux after initialisation and reset in
m1n1. On the initial startup dcp sends two D576 (hotPlug_notify_gated)
presumendly due to state confusion due to  the multiple dptx
connections.

Signed-off-by: Janne Grunau <[email protected]>
  • Loading branch information
jannau authored and marcan committed Nov 27, 2023
1 parent 5006e08 commit 2b92f4b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
13 changes: 8 additions & 5 deletions proxyclient/hv/trace_dcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,16 +868,18 @@ def __init__(self, tracer, epid):
self.state.ch = {}
self.state.dumpfile = None

self.ch_cb = DCPCallChannel(self, "CB", 0x60000, 0x8000)
self.ch_cmd = DCPCallChannel(self, "CMD", 0, 0x8000)
self.ch_async = DCPCallChannel(self, "ASYNC", 0x40000, 0x20000)
self.ch_oobcb = DCPCallChannel(self, "OOBCB", 0x68000, 0x8000)
self.ch_oobcmd = DCPCallChannel(self, "OOBCMD", 0x8000, 0x8000)
self.ch_cmd = DCPCallChannel(self, "CMD", 0x00000, 0x8000)
self.ch_oobcmd = DCPCallChannel(self, "OOBCMD", 0x08000, 0x8000)
self.ch_async = DCPCallChannel(self, "ASYNC", 0x40000, 0x8000)
self.ch_oobasync = DCPCallChannel(self, "OOBASYNC", 0x48000, 0x8000)
self.ch_cb = DCPCallChannel(self, "CB", 0x60000, 0x8000)
self.ch_oobcb = DCPCallChannel(self, "OOBCB", 0x68000, 0x8000)

self.cmd_ch = {
CallContext.CB: self.ch_cmd,
CallContext.CMD: self.ch_cmd,
CallContext.ASYNC: None, # unknown
CallContext.OOBASYNC: None, # unknown
CallContext.OOBCB: self.ch_oobcmd,
CallContext.OOBCMD: self.ch_oobcmd,
}
Expand All @@ -886,6 +888,7 @@ def __init__(self, tracer, epid):
CallContext.CB: self.ch_cb,
CallContext.CMD: None,
CallContext.ASYNC: self.ch_async,
CallContext.OOBASYNC: self.ch_oobasync,
CallContext.OOBCB: self.ch_oobcb,
CallContext.OOBCMD: None,
}
Expand Down
6 changes: 5 additions & 1 deletion proxyclient/m1n1/fw/dcp/dcpep.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CallContext(IntEnum):
ASYNC = 3
OOBCB = 4
OOBCMD = 6
OOBASYNC = 7

class DCPEp_Msg(DCPMessage):
LEN = 63, 32
Expand Down Expand Up @@ -124,7 +125,8 @@ def __init__(self, *args, **kwargs):

self.ch_cb = DCPCallbackChannel(self, "CB", 0x60000, 0x8000)
self.ch_cmd = DCPCallChannel(self, "CMD", 0, 0x8000)
self.ch_async = DCPCallbackChannel(self, "ASYNC", 0x40000, 0x20000)
self.ch_async = DCPCallbackChannel(self, "ASYNC", 0x40000, 0x8000)
self.ch_oobasync = DCPCallbackChannel(self, "OOBASYNC", 0x48000, 0x8000)
self.ch_oobcb = DCPCallbackChannel(self, "OOBCB", 0x68000, 0x8000)
self.ch_oobcmd = DCPCallChannel(self, "OOBCMD", 0x8000, 0x8000)

Expand All @@ -144,6 +146,8 @@ def Rx(self, msg):
self.ch_oobcb.cb(msg)
elif msg.CTX == CallContext.ASYNC:
self.ch_async.cb(msg)
elif msg.CTX == CallContext.OOBASYNC:
self.ch_oobasync.cb(msg)
else:
raise Exception(f"Unknown RX callback channel {msg.CTX}")
return True
Expand Down

0 comments on commit 2b92f4b

Please sign in to comment.