Commit graph

74 commits

Author SHA1 Message Date
Hector Martin
3d523f27ad hv/trace_i2c.py: New example trace script
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Sven Peter
5763569d9c hv/trace_nvme: Add NVMe tracer
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-01-01 16:49:14 +09:00
Hector Martin
ba258dc805 hv/trace_gpio.py: Work on both t8103 and t6000
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-12-28 21:09:30 +09:00
Hector Martin
9496803b18 hv/trace_dcp.py: Add Shutdown commands for IOEp
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-12-28 21:09:06 +09:00
Hector Martin
660d7482b9 hv/trace_pmgr.py: New script
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-22 07:21:07 +09:00
Hector Martin
927c12ad53 hv/trace_all.py: Trace all I/O ranges using the arm-io prop
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +09:00
Hector Martin
b9ddd74c02 hv/trace_smc.py: Add SMC tracer
Also fix up a bunch of stuff in m1n1.fw.smc, but it's untested as a
client.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +09:00
Sven Peter
0b4d5bd793 proxyclient: hv: Add simple DWC3/XHCI/ATCPHY tracer
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-09-22 19:01:03 +09:00
Alyssa Rosenzweig
eb466796d8 fw.dcp: Add some stubs needed for modesetting
This isn't enough to set the video mode yet but it gets us further. I
think allocate_memory/map_buf/powerOnDART need real implementations,
otherwise setting a video mode crashes the DCP in an APIODMA interrupt
handler, whatever that is.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2021-08-24 21:09:35 +09:00
Hector Martin
de5b5d996c m1n1.fw.dcp: Add DCP client framework, port tracer to it
This also includes an update to the macOS 12.0 beta ABI

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-14 16:39:17 +09:00
Hector Martin
f635d64429 hv/trace_dcp.py: Update call list for 11.4 (partial?)
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-07-15 22:28:27 +09:00
Hector Martin
4a6fa4b0e1 hv/trace_dcp.py: Redo cmd/ack handling properly, add logging & msg list
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-07-15 16:27:56 +09:00
Hector Martin
e00e8f178d hv/trace_dcp.py: Fix stuff
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-06-24 02:12:07 +09:00
Hector Martin
819d2cf6bc hv/trace_dcp.py: Parsing a bunch of stuff now
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-06-24 01:15:32 +09:00
Hector Martin
c490f74872 m1n1.trace.asc: Move EP handlers to per-EP objects
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-06-23 20:19:30 +09:00
Hector Martin
94f5c29c9f hv/trace_dcp.py: More things
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-06-22 01:39:38 +09:00
Hector Martin
42b7adad06 m1n1.trace.dart: Add DART tracer/handler
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-06-22 01:39:38 +09:00
Alyssa Rosenzweig
ba478f2de5 mini.hv.dcp: Decode common messages
This accounts for most of the DCP traffic once macOS is booted. I used
a sophisticated side-channel hypervisor timing attack to determine the
message functions [ adding time.sleep(1) ]

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2021-06-21 14:02:25 +09:00
Janne Grunau
de82209079 m1n1.trace.gpio: convert GPIOTracer to new framework
Signed-off-by: Janne Grunau <j@jannau.net>
2021-06-18 14:23:23 +09:00
Hector Martin
cb6d1f58a2 m1n1.trace.asc: Initial ASCTracer implementation
A tracer for the ASC coprocessor mailbox interface.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-06-18 02:24:55 +09:00
Hector Martin
49dad3b9ff m1n1.hv: Rework MMIO PT handling & tracing
Now keeps track of the requested MMIO maps in a DictRangeMap, which is
then flattened to HV page table updates.

TODO: HOOK/SYNC codepaths

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-06-17 02:00:32 +09:00
Hector Martin
05db5dba6f trace_agx.py: Disable tracing the PMP bits
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-06-15 15:46:08 +09:00
Janne Grunau
dc57e586bc hv/trace_gpio.py: mmiotrace handler for "/arm-io/gpio"
The hanlder omits noise/useless of the mmio access and annotates
known offsets, pins, interrupts and config values.

Signed-off-by: Janne Grunau <j@jannau.net>
2021-06-15 15:41:50 +09:00
Hector Martin
edbe471804 run_guest.py: Add options to run external scripts:
-m <script>

  Run a script in hypervisor context prior to starting the guest.
  This is essentially the same as the shell context.

-c <code>
  Run a literal string of code prior to starting the guest.

-S
  Start a shell instead of directly starting the guest. Use `start` to
  actually begin guest execution.

This also adds a couple example scripts under hv/.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-06-10 22:37:12 +09:00