Image Signal Processor is a co-processor in charge of Facetime camera
in Apple laptops. This tracer is based on ISP found in M1 processor.
The ISP in M1 SoC exposes seven inter-process communication channels.
Using those channels Application Processor (AP) can perform a variety of
task in the ISP and viceversa. All channels seems to be bidirectional, with
unique exception of TERMINAL channel.
DART translation is used often to translate control structures passed
over IPC channels to IO virtual addresses.
How those channels are used is still unclear but tracer should allow us
to dive deep on high-level protocol to communicate with Facetime camera.
ISP exposes also some I2C peripheral and SPMI registers but I haven't
dive into their working or purpose.
Signed-off-by: Kellerman Rivero <krsloco@gmail.com>
Trace async because we don't care about DMA buffers yet and disable
dwc3 tracing by default since that's relatively boring.
Signed-off-by: Sven Peter <sven@svenpeter.dev>
We weren't tracing the SPI control registers before, and the output
was borked due to changes in m1n1. These have been fixed. Still
doesn't show much useful information..
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Mesa is Apple's codename for the TouchID sensor. On M1-based
systems, it is connected to the SPI bus and communicates via
SIO on DMA channels 0x18 and 0x19. The application processors
seem to have very little to do with its operation.
After power on, the command buffer is encrypted by the SEP and
very little useful data can be gleaned from snooping the SIO
messages. While the commands are garbled by the SEP, we can see
that it has a few recurring themes:
* A power on routine involving some sort of calibration, perhaps
to get a noise image to subtract from each fingerprint
* A polling mode where it is kicked by the kernel and acks if
there's no finger on the sensor (runs while macOS waits for a
print)
* A data transfer mode, where a SIO message is sent to an unmapped
EP and the fingerprint scanned into memory. Likely triggered by
an interrupt coming off the finger detection ring, but I haven't
been able to verify this.
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Move the regmap from experiments/ to a handier place. Also add the
codec to trace_codecs.py and codecshell.py.
Signed-off-by: Martin Povišer <povik@protonmail.com>
Just use TraceMode.OFF instead of commenting lines out.
Also always trace the GPU panic register (TODO: do not hardcode)
Signed-off-by: Asahi Lina <lina@asahilina.net>
Hardcoded pin maps do not make sense with additional HW support.
Allows tracing of a single pin in another tracing module, for example
for tracing the SPI cs pin.
Signed-off-by: Janne Grunau <j@jannau.net>