diff --git a/proxyclient/m1n1/fw/asc/crash.py b/proxyclient/m1n1/fw/asc/crash.py index 7f590c87..79773564 100644 --- a/proxyclient/m1n1/fw/asc/crash.py +++ b/proxyclient/m1n1/fw/asc/crash.py @@ -210,12 +210,13 @@ class ASCCrashLogEndpoint(ASCBaseEndpoint): return self.handle_getbuf(msg) def handle_getbuf(self, msg): - size = align(0x1000 * msg.SIZE, 0x4000) if msg.DVA: + size = 0x1000 * msg.SIZE self.iobuffer_dva = msg.DVA self.log(f"buf prealloc at dva {self.iobuffer_dva:#x}") else: + size = align(0x1000 * msg.SIZE, 0x4000) self.iobuffer, self.iobuffer_dva = self.asc.ioalloc(size) self.log(f"buf {self.iobuffer:#x} / {self.iobuffer_dva:#x}") self.send(CrashLogMessage(TYPE=1, SIZE=size // 0x1000, DVA=self.iobuffer_dva)) diff --git a/proxyclient/m1n1/fw/asc/ioreporting.py b/proxyclient/m1n1/fw/asc/ioreporting.py index f81b6c69..da24df0b 100644 --- a/proxyclient/m1n1/fw/asc/ioreporting.py +++ b/proxyclient/m1n1/fw/asc/ioreporting.py @@ -30,12 +30,13 @@ class ASCIOReportingEndpoint(ASCBaseEndpoint): if self.iobuffer: self.log("WARNING: trying to reset iobuffer!") - self.bufsize = align(0x1000 * msg.SIZE, 0x4000) if msg.DVA != 0: + self.bufsize = 0x1000 * msg.SIZE self.iobuffer = self.iobuffer_dva = msg.DVA - self.log(f"buf {self.iobuffer:#x} / {self.iobuffer_dva:#x}") + self.log(f"buf prealloc {self.iobuffer:#x} / {self.iobuffer_dva:#x}") else: + self.bufsize = align(0x1000 * msg.SIZE, 0x4000) self.iobuffer, self.iobuffer_dva = self.asc.ioalloc(self.bufsize) self.log(f"buf {self.iobuffer:#x} / {self.iobuffer_dva:#x}") self.send(IOReporting_GetBuf(DVA=self.iobuffer_dva, SIZE=self.bufsize // 0x1000))