ChanServ changed the topic of #asahi-re to: Asahi Linux: porting Linux to Apple Silicon macs | Hardware / boot process / firmware interface reverse engineering | WARNING: this channel (only) may contain binary reverse engineering discussion | RE policy: https://alx.sh/re (MANDATORY READ) | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-re
phire has quit [Server closed connection]
phire has joined #asahi-re
amw has quit [Server closed connection]
amw has joined #asahi-re
_whitelogger has joined #asahi-re
rikkaa has joined #asahi-re
arekm has quit [Remote host closed the connection]
arekm has joined #asahi-re
chadmed has joined #asahi-re
MikaB[m] has joined #asahi-re
m6wiq has quit []
robinp_ has joined #asahi-re
robinp_ is now known as robinp
riker77_ has joined #asahi-re
riker77 has quit [Ping timeout: 480 seconds]
riker77_ is now known as riker77
PhilippvK has joined #asahi-re
phiologe has quit [Ping timeout: 480 seconds]
nicolas17 has quit [Ping timeout: 480 seconds]
<rqou_>
hmm, trying to create a DARTTracer for the jpeg dart crashes m1n1
kylealanhale has joined #asahi-re
<rqou_>
tracing with trace_device works, but i'm trying to understand how to create a more complicated tracing tool
<rqou_>
i guess i'm clearly struggling trying to figure out how the m1n1 tooling works, since addresses that i can trace the macos kernel accessing crash whenever i try to read32 them
kylealanhale has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rqou_>
ah, figured it out. need to turn on the dart with pmgr_adt_clocks_enable first
<rqou_>
finally figured out how to use the mmio tracing framework. is there an example of how to use _reloadcls? i can't seem to figure out how that's intended to be used
<rqou_>
btw if anybody is deeply familiar with jpeg and can tell me why there's a 11-entry matrix involved in the process, that would be appreciated
<henje[m]>
JPEG encodes blocks of 8x8 pixels using a discrete cosine transformation. The cosine coefficients form a matrix and are multiplied with a quantization matrix, which effectively eliminates unneeded coefficients. But both matrices should be 8x8.
<rqou_>
yeah, that's in a separate block of registers
<rqou_>
this is a matrix for... something else
<abrasive>
an 11×11 matrix, or a matrix with 11 nonzero entries?
<Jamie[m]1>
the latter, it looks like
<rqou_>
a matrix with 11 entries of 4 bytes each
<rqou_>
possibly not even a matrix
<rqou_>
but the driver refers to it as a matrix multiplication... thingy
<Jamie[m]1>
it certainly looks like 32-bit signed values
<Jamie[m]1>
given the leading ffffff in some of them
<Jamie[m]1>
vary them and see what happens to the image? :D
<henje[m]>
So if it’s a quantization matrix in some form, later entries should effect higher frequency contents, i.e. sharp edges
<henje[m]>
rqou_: if you mind, could you dump the values and share them?
<Jamie[m]1>
they're in the gist henje
<henje[m]>
Ah thx
<abrasive>
oh, um
<abrasive>
is JPEG in YCbCr?
<henje[m]>
Yes
<abrasive>
because YCbCr -> RGB is about that
<henje[m]>
But 11 values? Shouldn’t that be 9?
<Jamie[m]1>
ahhh, 3x3 matrix plus a separate numerator/denominator for the whole thing?
<nicolas17>
is there any public 'trace file' from m1n1, for example from the DCP tracer? (I don't have M1 hardware myself >.>)
<nicolas17>
IIUC trace_dcp.py dumps raw binary data sent to the DCP mailbox and shared memory, and then a different script parses it into something readable
<nicolas17>
I wanted to play with something related to that but I can't do my own trace...