@@ -48,17 +48,17 @@ def dump(self):
4848class ISPIOCommand (ISPCommand ):
4949 def __init__ (self , chan , msg , direction ):
5050 super ().__init__ (chan , msg , direction )
51- self .contents = self .read_iova (self .iova , self .arg1 )
51+ self .contents = self .read_iova (self .iova , max ( self .arg1 , 8 ) )
5252
5353 def dump (self ):
5454 if self .iova :
5555 opcode = struct .unpack ("<Q" , self .contents [:0x8 ])[0 ] >> 32
5656 self .log (f"[IO iova: { hex (self .iova )} , insize: { hex (self .arg1 )} , outsize: { hex (self .arg2 )} -> opcode: { hex (opcode )} { opcode2name (opcode )} ]" )
5757 self .log ("IO struct: " )
5858 try :
59- chexdump32 (self .contents )
59+ chexdump32 (self .contents , print_fn = self . log )
6060 except struct .error :
61- print ( chexdump (self .contents ) )
61+ chexdump (self .contents , print_fn = self . log )
6262
6363class ISPT2HBufferCommand (ISPCommand ):
6464 def __init__ (self , chan , msg , direction ):
@@ -70,7 +70,7 @@ def dump(self):
7070 super ().dump ()
7171 if self .contents :
7272 self .log ("BUF_T2H struct:" )
73- chexdump32 (self .contents )
73+ chexdump32 (self .contents , print_fn = self . log )
7474
7575class ISPH2TBufferCommand (ISPCommand ):
7676 def __init__ (self , chan , msg , direction ):
@@ -82,7 +82,7 @@ def dump(self):
8282 super ().dump ()
8383 if self .contents :
8484 self .log ("BUF_H2T struct:" )
85- chexdump32 (self .contents )
85+ chexdump32 (self .contents , print_fn = self . log )
8686
8787class ISPT2HIOCommand (ISPCommand ):
8888 def __init__ (self , chan , msg , direction ):
@@ -225,7 +225,7 @@ def w_ISP_GPIO_0(self, val):
225225 if (val .value >= 0xe00000 ) and (val .value <= 0x1100000 ): # dunno
226226 self .log ("ISP bootargs at 0x%x:" % val .value )
227227 bootargs = self .dart .ioread (0 , val .value , 0x200 ) # justt in case
228- chexdump32 (bootargs )
228+ chexdump32 (bootargs , print_fn = self . log )
229229 x = ISPIPCBootArgs .parse (bootargs [:ISPIPCBootArgs .sizeof ()])
230230 self .log (x )
231231
0 commit comments