Asahi Lina
42af4319de
m1n1.constructutils: Add struct diffing feature
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-08-17 13:42:59 +09:00
Asahi Lina
2d1151041f
m1n1.constructutils: Keep a global addr->struct map
...
This allows easily identifying pointers to the beginning of structs.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-08-17 13:42:59 +09:00
Asahi Lina
9a94937e3f
m1n1.constructutils: Add SPDX header, move imports
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-08-17 13:42:59 +09:00
Asahi Lina
ee59dec6e5
m1n1.gpiola: Support explicitly telling the LA thread to exit
...
Also misc fixes.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-08-17 13:42:59 +09:00
Asahi Lina
c7254865c0
m1n1.proxy: s/ic_ivac/dc_ivac/
...
This was a typo...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-08-17 13:42:59 +09:00
Asahi Lina
894f9726e1
m1n1.proxyutils: Switch RegMonitor to use chexdiff32()
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-08-17 13:42:59 +09:00
Asahi Lina
eedaf2941a
m1n1.setup: Always reset PMU boot error counters
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-08-17 13:42:59 +09:00
Asahi Lina
9a39bf15ef
m1n1.utils: Add chexdiff32()
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-08-17 13:13:34 +09:00
Asahi Lina
af3814c56d
m1n1.gpiola: Support reg/RAM-only tracing properly
...
This also implements compression for reg-only tracing properly.
TODO: should probably change the logic for when both pin and reg change
detection are active.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-08-05 15:26:05 +09:00
Hector Martin
f09c10b5fa
tools/run_guest_kernel.sh: Fix initramfs support
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-30 15:59:21 +09:00
Hector Martin
4f0be4aa2c
m1n1.hv: Add ctx
shell alias for context
.
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-30 15:12:55 +09:00
Hector Martin
72cce09c77
m1n1.hv: Improve context printout
...
Make the addresses virtual, add symbols
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-30 15:12:55 +09:00
Hector Martin
12bff05700
tools/run_guest_kernel.sh: New utility script
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-30 15:12:55 +09:00
Hector Martin
659093b8bb
scripts/picocom-sec.sh: Add convenience script
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-30 15:12:55 +09:00
Hector Martin
1247c2b7e4
m1n1.proxy: Default to /dev/m1n1
...
We have udev rules, let's just default to a pretty device name to avoid
conflicts with other devices.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-30 14:18:39 +09:00
amarioguy
0cf1f393ed
Add raw binary support to HV scripts
...
Signed-off-by: amarioguy <arminders208@outlook.com>
2022-07-30 14:18:39 +09:00
Hector Martin
8ae1d15fac
hv/trace_pmgr.py: Tolerate missing pwrgate-regs
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-12 13:08:16 +09:00
Hector Martin
c6e95657c3
experiments/mtp.py: Dump info
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 20:14:48 +09:00
Hector Martin
94a115800a
m1n1.hw.dart: Support sub-instances
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 19:56:16 +09:00
Hector Martin
ad6b340a3b
experiments/mtp.py: Update to use client
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 19:02:21 +09:00
Hector Martin
e2e093b66c
m1n1.hw.asc: Add .work_pending() and .has_messages()
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 19:02:21 +09:00
Hector Martin
0b509daa47
m1n1.constructutils: Handle variable-length tail structs nicely
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 19:02:21 +09:00
Hector Martin
60c523d1a6
m1n1.fw.mtp: MTP client module
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 19:02:21 +09:00
Hector Martin
adae2516fe
m1n1.trace.dockchannel: Add DockChannel tracer
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 19:02:21 +09:00
Hector Martin
4d688062db
experiments/mtp.py: New experiment
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 19:02:21 +09:00
Hector Martin
1526560bd9
m1n1.hw.dockchannel: New module
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 19:02:21 +09:00
Hector Martin
6075388d31
tools/dump_pmgr.py: Do not dump pwrgate regs
...
These are gone in newer ADTs
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 19:02:21 +09:00
Hector Martin
b02eed81f0
m1n1.shell: Add poll_func hook
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 19:02:21 +09:00
Hector Martin
5921631f28
m1n1.setup: Always clear PMU counters
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 19:02:21 +09:00
Hector Martin
b6f358021c
m1n1.hw.dart8110: Pass kwargs through from_adt()
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 19:02:21 +09:00
Hector Martin
4d8065807c
m1n1.fw.asc: Make startup/shutdown more proper
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 19:02:21 +09:00
Hector Martin
615878ce68
m1n1.fw.asc: Support setting DART stream and allow physmem passthrough
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-11 19:02:21 +09:00
Hector Martin
4555cc5148
dapf: Initialize DAPFs from the ADT
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-03 23:27:50 +09:00
Hector Martin
eb4fa83bbc
m1n1.hw.spmi: Add some more register defs
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-02 00:29:08 +09:00
Hector Martin
4f0c712e16
m1n1.hw.pmu: Don't hardcode PMU address
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-07-02 00:28:55 +09:00
James Calligeros
a95c6d4de6
hv/trace_mesa: remove butchered tracer gore
...
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
2022-07-01 17:58:20 +09:00
James Calligeros
1e2c52b5b3
hv/trace_mesa: rename bindump of fingerprint transfer message
...
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
2022-07-01 17:58:20 +09:00
James Calligeros
1f21b6b7b8
hv/trace_mesa: tidy up output and trace SPI regs
...
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>
2022-07-01 17:58:20 +09:00
Hector Martin
1b8c422202
m1n1.hw.dart8110: Misc fixes
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-28 01:47:02 +09:00
Hector Martin
fa4aedefdb
m1n1.hv: Support t8112 cpustart offset
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-28 01:47:02 +09:00
Hector Martin
4856e37a79
experiments/cpu_pstate_latencies.py: Support t8112
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-28 01:47:02 +09:00
Hector Martin
efc83f61da
m1n1.proxyutils: Add a flag for MMU-less mode
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-28 01:41:24 +09:00
Hector Martin
6f52823441
m1n1.hw.dart8110: Support multiple instances
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-28 01:41:24 +09:00
Hector Martin
55ccea6a2d
m1n1.hw.dart8110: Use 32-bit IOVA space by default
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-28 01:41:24 +09:00
Hector Martin
f3f883c2fc
m1n1.adt: Match PMU properties properly for t8112
...
Apple changed the node name...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-28 01:41:24 +09:00
Hector Martin
96f59e6322
proxyclient/experiments/aes.py: Add t8110 DART support
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-28 01:41:24 +09:00
Hector Martin
b077c08181
dart: Add dart,t8110 support
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-28 01:41:24 +09:00
James Calligeros
e2d671d597
hv/trace_mesa.py: add mesa tracer
...
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>
2022-06-21 17:22:16 +09:00
Martin Povišer
e2065decbe
m1n1.trace.i2c: Clean up handling of page/immediate split
...
Also fix detection of read being a read of the page control register.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-06-21 17:20:30 +09:00
Martin Povišer
56d8de66db
m1n1.hw.codecs.cs42l84: File the ohmmeter codec regmap
...
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>
2022-06-21 17:20:30 +09:00
Martin Povišer
0da13afda8
tools/codecshell.py: Add codec-poking shell
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-06-21 17:20:30 +09:00
Martin Povišer
a8bc1bc3f2
m1n1.hw.i2c: Add I2CRegMapDev base class
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-06-21 17:20:30 +09:00
Martin Povišer
46a5e0450c
experiments/ohmmeter.py: Fill missing definitions
...
Fill in missing headset-interface-related registers into the regmap,
mostly by analogy with CS42L42.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-06-21 17:20:30 +09:00
Martin Povišer
d358563d6c
hv/trace_codecs.py: Trace volume/gain on speaker amps
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-06-21 17:20:30 +09:00
Martin Povišer
97d0130bcc
m1n1.trace.i2c: Extend device tracing
...
Start new class I2CRegMapTracer to trace register accesses on devices
with the usual paged register maps.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-06-21 17:20:30 +09:00
Janne Grunau
dc69227c96
hv/trace_nvme: Trace rtkit interface and remove hardcoded sart address
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-06-21 17:19:32 +09:00
Asahi Lina
512982f4aa
m1n1.agx.shim: New module
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:54:31 +09:00
Asahi Lina
51abb9082e
m1n1.agx.render: New module
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:54:31 +09:00
Asahi Lina
2ffc9fb166
m1n1.agx.event: Add a new event manager class
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:54:31 +09:00
Asahi Lina
31dfb0c071
m1n1.agx.context: Add a pipeline object allocator
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:54:31 +09:00
Asahi Lina
9688aeb52c
m1n1.agx: Handle faults
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:54:31 +09:00
Asahi Lina
b10a56f1ff
m1n1.agx: Poll syslog channels first
...
This gets us the syslogs caused by a fault before the actual fault
raises an exception
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:54:31 +09:00
Asahi Lina
f829afcf80
m1n1.agx: Logging updates
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:54:31 +09:00
Asahi Lina
610f3e6a11
m1n1.agx.object: Support deallocation
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:54:31 +09:00
Asahi Lina
3fa3b5abd3
m1n1.agx.object: Support making mon tracking, align to end optional
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:54:31 +09:00
Asahi Lina
17142da838
m1n1.agx.object: Support setting guard page count
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:54:31 +09:00
Asahi Lina
6ce60e875c
m1n1.agx.object: Be more efficient for pushes, verbose control
...
- Support compression
- Avoid pushing objects which haven't changed (optionally)
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:54:31 +09:00
Asahi Lina
f19625f8da
m1n1.fw.agx: Disable some prints
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:54:31 +09:00
Asahi Lina
cd1803f6dc
experiments/agx_1tri.py: Update for bunny frame, new structs
...
This will be obsolete soon anyway, but for now it runs...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:54:28 +09:00
Asahi Lina
39f9844431
m1n1.fw.agx: Lots more structure updates / renames
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:54:22 +09:00
Asahi Lina
5a8c54c762
hv/trace_agx.py: Encoder ID filter example
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:37:22 +09:00
Asahi Lina
c34e9f95af
m1n1.hw.uat: Do not always flush PTs, except for the internal allocator
...
This optimizes GPU submissions since the PTs can be flushed just once,
instead of for every UAT manipulation. But we need to flush for the
internal allocator since it is used by RTKit stuff that does not know
how to flush.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:37:22 +09:00
Asahi Lina
0c9d64b80c
m1n1.proxyutils: Improve compressed_writemem
...
Make progress arg optional, reduce compression. Spending more time on
gzip does not help speed things up (at least with USB).
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:37:22 +09:00
Asahi Lina
3de894576c
m1n1.trace.agx: Do not pause after init by default
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:37:22 +09:00
Asahi Lina
2ecbe6f39b
m1n1.trace.agx: Monitor some more initdata-referenced areas
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:37:22 +09:00
Asahi Lina
6335e20fae
m1n1.trace.agx: Disable dumping some structures we know about
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 03:37:22 +09:00
Asahi Lina
129726ddbc
m1n1.trace.agx: Add support for filtering by encoder ID
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 01:41:51 +09:00
Asahi Lina
5d245d6ba5
m1n1.utils: Support setting stride in chexdump()
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 01:36:56 +09:00
Asahi Lina
ffe2f4104e
fb: Support XBGR pixel format for fb_blit()
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-19 01:36:41 +09:00
Asahi Lina
2d317ee515
m1n1/fw/agx/controllist.py: Improve tiler params struct
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-07 01:50:44 +09:00
Asahi Lina
72892e0b95
experiments/agx_1tri.py: Update magic addresses for flag demo
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-06 23:37:42 +09:00
Asahi Lina
a2affd834b
m1n1.agx.context: Support passing block count to GPUBufferManager
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-06 23:37:42 +09:00
Asahi Lina
ff7a145d6f
m1n1.agx.context: Support tracking userspace objects
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-06 23:37:42 +09:00
Asahi Lina
f7fe615251
m1n1.agx.context: Fix allocator protocol
...
.ctx needed for agx.reg_object() to work.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-06 23:37:42 +09:00
Asahi Lina
f6db8502d1
m1n1.agx.object: Allow aligning VAs properly
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-06 23:37:42 +09:00
Asahi Lina
77d6e75a1f
experiments/agx_1tri.py: Clean up more fields/structs
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-06 23:37:42 +09:00
Asahi Lina
ccedb7fb9c
m1n1.constructutils: Prefix struct members with short struct name
...
This makes it easier to grep for stuff across multiple structs.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-06 23:37:42 +09:00
Asahi Lina
9c05301d42
experiments/agx_1tri.py: Fix TVB addresses
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-06 23:37:42 +09:00
Asahi Lina
94b1209139
m1n1.fw.agx.cmdqueue: More WorkCommandSubC fields
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-06 23:37:42 +09:00
Asahi Lina
e3b78fffc5
experiments/agx_1tri.py: Fix color component order
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-06 23:37:42 +09:00
Asahi Lina
ecb7de93c9
m1n1.trace.agx: Fix field name
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-06 23:37:42 +09:00
Janne Grunau
b6e9333cd6
m1n1.hw.pmu: Add SPMI PMU support for resetting the panic counter
...
Replace the handrolled implementation in experiments/agx_1tri.py and
tools/reset_panic_counter.py.
In addition reset the panic counter in reboot.py and run_guest.py. If
can reboot or start guests the boot process works fine and macOS
recovery needs to leave us alone.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-06-05 20:58:15 +09:00
Akihiko Odaki
5cea0db10d
m1n1.hv: Introduce gdbserver
...
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
2022-06-04 20:20:21 +09:00
Akihiko Odaki
cd3c3f36b2
m1n1.hv: Add hardware watchpoint support
...
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
2022-06-04 20:20:21 +09:00
Akihiko Odaki
b02a84e1a7
m1n1.hv: Propagate breakpoint change to other CPUs
...
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
2022-06-04 20:20:21 +09:00
Akihiko Odaki
bcbe26d79b
m1n1.hv: Always continue on the stepped thread
...
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
2022-06-04 20:20:21 +09:00
Akihiko Odaki
6babf39184
m1n1.hv: Add a method to write memory
...
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
2022-06-04 20:20:21 +09:00
Akihiko Odaki
0a28817ce2
m1n1.hv: Add a method to read memory
...
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
2022-06-04 20:20:21 +09:00
Akihiko Odaki
16f6d5734b
m1n1.hv: Shadow used debug registers
...
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
2022-06-04 20:20:21 +09:00
Asahi Lina
7ed86d89bb
experiments/agx_1tri.py: Add AGX 1 Triangle demo
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:55:46 +09:00
Asahi Lina
a22df510c0
m1n1.agx.context: New module for context-related classes
...
GPUContext: GPU context (address space)
GPUWorkQueue: GPU work queue (command submission queue)
GPUMicroSequence: GPU microcommand sequence (for commands)
GPUBufferManager: GPU dynamic buffer/page manager (TVB related)
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:55:13 +09:00
Asahi Lina
b164021dbf
m1n1.trace.agx: Update to new structures
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:53:25 +09:00
Asahi Lina
0ca3af9b13
m1n1.fw.agx.cmdqueue,controllist: Add/fix lots of structures
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:53:00 +09:00
Asahi Lina
c81df296c7
hv/trace_agx.py: Make untracing/tracing on reload less painful
...
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>
2022-06-02 23:51:14 +09:00
Asahi Lina
bdd9603fa7
m1n1.agx: Add AGX.p = proxy
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:50:06 +09:00
Asahi Lina
ff9a88fbba
m1n1.trace.agx: Load initdata with the fully extended address
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:49:42 +09:00
Asahi Lina
a69744688b
m1n1.trace.agx: Add regionA tracing, fix lengths
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:49:42 +09:00
Asahi Lina
4c7bc1103c
m1n1.trace.agx: Redump more stuff after command completions
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:49:42 +09:00
Asahi Lina
2fb80a5ae3
m1n1.trace.agx: Support optional monitoring of global regions
...
And make it work across reloads
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:49:42 +09:00
Asahi Lina
62c1f5bbc7
m1n1.trace.agx: Reload some stuff
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:49:42 +09:00
Asahi Lina
a8038cb498
m1n1.trace.agx: Support GPUVM userspace tracing
...
Still not perfect, cannot track all unmaps/maps properly, causes HV
translation faults...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:49:42 +09:00
Asahi Lina
ca653557a3
m1n1.fw.agx.initdata: Make printing work without the hypervisor
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:49:42 +09:00
Asahi Lina
29f300548b
m1n1.fw.agx.initdata & co: Add/fix lots of initdata stuff
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:46:01 +09:00
Asahi Lina
722f4c4b8e
m1n1.agx: Add channel allocation/init
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:46:01 +09:00
Asahi Lina
1f5905fffb
m1n1.agx.channels: Add channel management module
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:46:01 +09:00
Asahi Lina
cb5e8dbf3f
trace/agx.py: Update to new channel stuff names
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:46:01 +09:00
Asahi Lina
033bf7a130
m1n1.fw.agx.channels: Fix a bunch of structs, s/Channels/ChannelInfoSet/
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:40:46 +09:00
Asahi Lina
ebe18e1fac
m1n1.agx: Add .work() and .log()
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:40:46 +09:00
Asahi Lina
3bcc2243b5
m1n1.agx: Fix allocator mapping flags
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:40:46 +09:00
Asahi Lina
bf73b7f671
m1n1.agx.object: GPUAllocator: Support configurable page sizes & context
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:40:46 +09:00
Asahi Lina
c78e92e9ad
m1n1.agx: Add global object tracker
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:40:46 +09:00
Asahi Lina
b7da00f761
m1n1.agx.object: Improve GPUObject
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:40:46 +09:00
Asahi Lina
d531af3a6d
m1n1.fw.agx: Add address decoding & iotranslate
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:40:46 +09:00
Asahi Lina
8a5ab0047a
m1n1.fw.agx: Rename endpoints & fix/add proper messages
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:40:46 +09:00
Asahi Lina
0fcaf69728
m1n1.hw.uat: Add RegMap accessor
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:28:54 +09:00
Asahi Lina
d7a4f30043
m1n1.agx: Use new UAT init API
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:28:54 +09:00
Asahi Lina
8d808904a0
m1n1.hw.uat: Handle multiple contexts
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:21:18 +09:00
Asahi Lina
3a773c8a6e
m1n1.fw.agx and friends: Add __all__ to lots of modules
...
This unborks reloading, since otherwise non-reloaded modules can clobber
symbols from reloaded modules with their old versions
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:17:33 +09:00
Asahi Lina
6175739132
m1n1.hw.asc: Add work_for(time)
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:12:31 +09:00
Asahi Lina
1dad2dad6a
m1n1.fw.asc.crash: Decode registers and stacktraces
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:12:23 +09:00
Asahi Lina
eb15ba0102
m1n1.adt: Decode more GPU properties
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:11:23 +09:00
Asahi Lina
4dcdb608a7
m1n1.trace: Fix PrintTracer address decoding
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:10:57 +09:00
Asahi Lina
682333e520
m1n1.proxyutils: Add 512-bit read/write accessors
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:04:51 +09:00
Asahi Lina
f13489f516
m1n1.hv: Fix atomic instruction mask
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:04:31 +09:00
Asahi Lina
0a25a3ef0d
m1n1.hv: Fix trace_range()
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:04:09 +09:00
Asahi Lina
e1e8d05ead
m1n1.constructutils: Fix building ConstructValueClass
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:03:21 +09:00
Asahi Lina
a9ae6b81fa
m1n1.constructutils: Add a regmap() to make a RegMap out of a Construct
...
Handy for ringbuf pointer type structures where we need to be able to
read/write individual members using atomic primitives, without going
through Construct.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:03:21 +09:00
Asahi Lina
892ee0e76b
m1n1.utils: Split RegMap into BaseRegMap (without metaclass)
...
This allows alternative BaseRegMap subclasses to dynamically build the
map instead of doing the metaclass stuff.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:03:19 +09:00
Asahi Lina
28fdcb4284
m1n1.constructutils: Improve str representation, add dump() for Python
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:03:19 +09:00
Asahi Lina
4ad733493b
m1n1.constructutils: Add a global struct address tracer
...
Currently unconditional, kind of hacky. Good for HV use.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:03:19 +09:00
Asahi Lina
de4f024ced
m1n1.constructutils: Make the Pointer<->addr association two-way
...
Also add Lazy support
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 23:03:17 +09:00
Asahi Lina
570ea8c4b8
m1n1.constructutils: Add .sizeof()
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 22:57:32 +09:00
Asahi Lina
83dfa1ef70
m1n1.constructutils: Move _off to class, improve addr stuff
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 22:56:52 +09:00
Asahi Lina
029ba73f44
m1n1.constructutils: Make Dec buildable
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 22:54:21 +09:00
Asahi Lina
1c35ce60c7
m1n1.constructutils: Better string representations
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 22:53:57 +09:00
Asahi Lina
3fe8f3e72f
m1n1.constructutils: Improve recursive reload
...
Reload more things, but also avoid reloading the same class multiple
times.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-06-02 22:53:17 +09:00
Hector Martin
714420a694
display: Put DCP to sleep if display is external
...
This stops DCP from killing our modeset if the connection cycles.
Also force a (potential) configure cycle if the display is external;
this makes sure updated stage2s will have a chance at fixing issues of
old stage1s. Modesetting is fast when it's the same mode as before.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-01 01:54:11 +09:00
Hector Martin
2bd6060f43
experiments/dcp_iboot.py: Fully shut down DCP when done
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-01 00:57:17 +09:00
Hector Martin
e9f383aa6b
m1n1.fw.dcp.dcpav: Add some DCPAV EPIC stuff
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-01 00:57:17 +09:00
Hector Martin
5c69011fc7
m1n1.fw.dcp.iboot: Fix padding
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-01 00:57:17 +09:00
Hector Martin
58db65db63
experiments/dcp_iboot.py: Shut down display before doing anything
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-01 00:57:17 +09:00
Hector Martin
7282f30527
m1n1.fw.afk: Fix a bunch of brokenness
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-01 00:57:17 +09:00
Hector Martin
eb4483f8e1
hv/trace_dcp.py: Log hexdumps to the HV log
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-01 00:57:17 +09:00
Hector Martin
06ec66e2a9
proxy: Export pmgr_reset()
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-01 00:57:17 +09:00
Hector Martin
0472bc05cd
proxy: Export display functions
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-01 00:57:17 +09:00
Hector Martin
9548ddd75d
fw.asc: Autodetect whether to boot the ASC or wake it up
...
Technically both can be done unconditionally, but let's be explicit in
the python side to see if we ever find this algorithm doesn't work.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-01 00:57:17 +09:00
Martin Povišer
60254a38ed
experiments/ohmmeter.py: Make CS42L84 your ohmmeter
...
Add script which prints out the (rough) measured impedance of connected
headphones on machines with the CS42L84 jack codec (2021 Macbook Pros).
$ proxyclient/experiments/ohmmeter.py
Waiting for plug... measuring... 64.3 ohms... yanked
Waiting for plug... measuring... 697.1 ohms...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-05-31 21:51:53 +09:00
Martin Povišer
4d306bb0d8
m1n1.hw.i2c: Fix & extend register access
...
Fix reading of registers (there have been STOPs issued between the two
messages which surprisingly went unnoticed until now). Also add support
for multibyte register addresses.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-05-31 21:51:53 +09:00
Martin Povišer
e1b50f9ced
experiments/aop.py: Bring up AOP
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-05-30 23:27:04 +09:00
Martin Povišer
d924c97a0c
tools/second_proxy.py: Add setup of second proxy stream
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-05-30 23:26:31 +09:00
Martin Povišer
e78cd14fee
experiments/mmio_sweep.py: Add MMIO sweep tool
...
Tool can do blanket sweep or isolate ranges associated with a power
domain.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-05-30 23:26:31 +09:00
Martin Povišer
96d4b5dd07
m1n1.proxyutils: Fortify against non-working disassembler
...
If not caught it can lead to an ugly crash...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-05-30 23:26:31 +09:00
Martin Povišer
d040e61aa8
m1n1.hw.admac: Add UNK4 report flag
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-05-30 23:26:31 +09:00
Martin Povišer
f0ff2e9eaf
m1n1.hw.admac: Do without an ADT node
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-05-30 23:26:31 +09:00
Martin Povišer
38ca45816f
m1n1.hw.admac: Support early poll() exit
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-05-30 23:26:31 +09:00
Martin Povišer
f353017ac6
m1n1.hw.loadobjs: Accept queer call methods
...
Let user specify a call method to use on symbols.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-05-30 23:26:31 +09:00
Martin Povišer
dcc75ab4f1
m1n1.hw.mca: Document the feedback disable
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-05-30 23:26:31 +09:00
Martin Povišer
9e32a75bc6
experiments/speaker_amp.py: Remove dead power-domain call
...
/arm-io/mca0 doesn't have a PD (instead /arm-io/mca-switch has the MCA0
domain).
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-05-30 23:26:31 +09:00
Martin Povišer
2579a97fde
m1n1.loadobjs: Avoid pasting paths into cmdline strings
...
Do not go through a formatted cmdline string when invoking tools. There
are user-controlled paths involved which can contain spaces (and other
foul characters).
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-05-30 23:26:31 +09:00
Martin Povišer
72c6170ee8
m1n1.loadobjs: Support loading of inline C snippets
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-05-30 23:26:31 +09:00
Hector Martin
9212ac2036
m1n1.hw.asc: Add more mailbox control fields
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-05-30 23:23:37 +09:00
Janne Grunau
12db5c3910
tools/reset_panic_counter.py: Use ADT to support t600x
...
In addition make it executable and add python shebang as for the other
tools.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-05-30 22:56:43 +09:00
Janne Grunau
8a90ced4b4
tools/reset_panic_counter.py: minor fixes
...
- add SPDX-License-Identifier
- make it executable
- add python shebang
- remove unused import
Signed-off-by: Janne Grunau <j@jannau.net>
2022-05-30 22:56:43 +09:00
Sven Peter
afe9c9bb16
proxyclient: add AES experiment
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-05-30 22:54:50 +09:00
Sven Peter
ee045af977
proxyclient: add AES registers
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-05-30 22:54:50 +09:00
Janne Grunau
8c82a7cb92
m1n1.fw.dcp.ipc: Add Call/Callbacks observed while tracing macos 12.3
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-05-30 22:49:00 +09:00
Janne Grunau
5ef9197edc
m1n1.fw.dcp.ipc: Annotate 'swap_complete_ap_gated' arguments
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-05-30 22:49:00 +09:00
Janne Grunau
8119130e88
hv/trace_dcp.py: update to mac OS 12.3 API
...
Verified calls A000 through A358 due to inconsistencies in the trace
log for A104 and A105.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-05-30 22:49:00 +09:00
Janne Grunau
8366bcd859
m1n1.fw.dcp.ipc: Update struct sizes to macos 12.3 firmware
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-05-30 22:49:00 +09:00
Akihiko Odaki
4a67fbe10e
m1n1.shell: Don't save history if init failed
...
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
2022-05-30 22:48:40 +09:00
Akihiko Odaki
3440aadc3c
proxy: Specify coordinates in fb_fill method
...
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
2022-05-30 22:47:26 +09:00
Hector Martin
45ac8633bd
m1n1.shell: Don't print bools as hex
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-05-30 22:38:30 +09:00
Hector Martin
e9080b8139
hv: Don't allow lower() on non-fault states
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-05-30 22:38:11 +09:00
Hector Martin
984b22cd51
m1n1.hv,proxyutils: Refactor how faults are printed re: context
...
Instead of directly taking a proxy entry code to determine what to
decode, just take an is_fault argument and only show and decode ESR/FAR
if true.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-05-30 22:36:37 +09:00
Hector Martin
7c5d47ff85
m1n1.hv: Use hv.run_shell() everywhere
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-05-30 22:35:49 +09:00
Hector Martin
8eeb7966aa
hv: Refactor CPU switch logic, make hv.cpu() not exit shell
...
Get rid of the hv_rearm() thing (which was always a bit dodgy) and
instead properly make sure that all CPUs rendezvous when needed and
switch the active proxy thread without ever exiting exception context.
The Python side can now switch proxy context (by waiting directly for
a proxy boot) without having to exit out of the hypervisor callback,
so cpu() now works as a normal Python method.
Add a cpus() iterator so you can do things like:
>>> for i in cpus(): bt()
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-05-30 22:33:44 +09:00
Hector Martin
01a1a0f597
hv: Make time stealing run-time configurable
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-05-30 19:37:23 +09:00
R
dd111b22b8
prores: test 36-bit iova; fix tracer
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
8406d44db3
prores: some cleanups
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
fb968ef3fe
prores: figure out output size
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
2cc5c9488f
prores: rename some variables
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
200bdf9ce6
prores: figure out alpha
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
270da3849b
prores: input format / chroma flags
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
b95baad365
prores: figure out offset
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
846b1cb37b
prores: get data into block the correct way
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
fbd63c4bc7
prores: legible image with wrong colors
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
6986aa9c81
prores: sizes are less huge now
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
da6c8379fd
prores: make container hack slightly smarter
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
479fe52128
prores: play with sizes
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
95ff15f2bd
prores: load in some luma stuff
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
2b6e1ed218
prores: this bug got perturbed away
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
6fff4af32f
prores: add a big fat hack so we can actually look at the output
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
baf5ebcde9
prores: clarify
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
0328517051
prores: picture header fields
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
af8ebc03ef
prores: figure out frame header stuff
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
014edb643c
prores: ack IRQ
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
7af2335cda
prores: initial work on an experiment
...
it appears to succeed, but no data is written to the output
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
66c019cfec
prores: trace enough to dump some buffers
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
3970b25add
prores: start tracing descriptors
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
3f60769b39
prores: add results of register bruteforce
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
R
6a8a816bfa
prores: initial commit
...
Signed-off-by: R <rqou@berkeley.edu>
2022-05-30 18:05:16 +09:00
Janne Grunau
d5ceafe41d
m1n1.hv: fix argument names in HV.trace_range()
...
event_mmio() uses 'start' kwarg since 'zone' conflicts with
add_tracer()'s argument of the same name.
Fixes
TypeError: HV.add_tracer() got multiple values for argument 'zone'
Signed-off-by: Janne Grunau <j@jannau.net>
2022-05-25 15:24:05 +09:00
Asahi Lina
d44306a1c7
m1n1.agx: Initial AGX client scaffolding
...
Moves things from m1n1.fw.agx to here; the fw object will only do the
basic ASC stuff, GPU management gets its own object.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
ae1a8ad504
m1n1.fw.agx.initdata: Remove complex creation code
...
Moving this to its own place
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
891bdd3101
m1n1.fw.agx.channels: Remove creation code
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
3133dcfa15
m1n1.trace.agx: Many improvements to tracer
...
Also fix how cmdqueues are interpreted
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
2af56cbc0a
m1n1.fw.agx.cmdqueue: Lots of struct improvements
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
9893219052
m1n1.fw.agx.controllist: Add lots more structs/fields
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
7fb99adf10
m1n1.fw.agx.channels: Add meta_fn arg to get_message()
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
8df6f6d060
m1n1.fw.agx.channels: s/DeviceControl_17/DC_DestroyContext/
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
01d7c5f6cd
m1n1.fw.agx.channels.NotifyCmdQueueWork: Show more info
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
a993f35874
hv/trace_agx.py: Add hypercalls for pause/resume, disable bulk tracers
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
f5ba42e3bb
tools/reset_panic_counter.py: New tool
...
Also adds m1n1.hw.spmi
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
25472a4373
m1n1.hw.uat: Remove init stuff, single allocator, make flags kwargs
...
Let's use this allocator only for ASC stuff. GPU stuff will have its own
va space allocators.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
4de4fdfb27
m1n1.fw.asc.mgmt: Allow being less verbose
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
cbe0e98f4c
m1n1.fw.asc: Add boot_or_start()
...
This tries both ways so it'll work regardless of how the ASC was shut
down.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
f3830c034f
m1n1.constructutils: Add debug (commented out)
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
797e58568b
m1n1.constructutils: Make Pointers useful for builds
...
- Add ROPointer subclass which is not built through
- Add build hook to detect (RO)Pointers and assign the address field
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
b681de37c5
m1n1.constructutils: Add colors, offsets, support additional metadata
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
4320d065c0
m1n1.constructutils: Support Switch() properly
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
5b6afed509
m1n1.constructutils: Add Dec(), improve printing
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
3ec82d989d
m1n1.hw.uat: Always print through translation failures
...
Make sure it's loud in case exceptions get eaten by Construct
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
87e0b69fc6
m1n1.trace: Propagate show_cpu in log()
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
9201ce3a13
m1n1.utils: Work around Register reloads breaking Constants
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
88c443008f
m1n1.hv: Handle atomic instructions by disabling those pages
...
Ugly hack, but enough for now
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
2f2794508a
m1n1.hv: Make SIGQUIT dump stacks and exit
...
This is useful in case a tracer is stuck in an infinite loop
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
802b37aaf3
m1n1.hv: Add support for "hypercalls" via BRK
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
c746549c2e
hv: Map RAM via tracer infra, handle carveouts in Python
...
Previously RAM was mapped ad-hoc, but this can end up interacting
poorly with the tracer infrastructure which we are now using for RAM
too. Move to mapping guest RAM via the tracer infra, and also unmap the
TZ carveouts in the Python side so it knows about them.
This is a HV ABI break.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
30c4503966
m1n1.hv: Support names and bases for PrintTracers
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
22228934bd
m1n1.fw.agx.channels: EventMsg structure
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:12 +09:00
Asahi Lina
6b6dfde814
m1n1.fw.agx: Lots of GPU work
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:54:10 +09:00
Asahi Lina
dc21c15537
m1n1.fw.agx.channels/initdata: Use __repr__ instead of __str__
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:52:43 +09:00
Asahi Lina
08c34dbc37
hv/trace_agx.py: Reload some stuff
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:52:43 +09:00
Asahi Lina
dc4673c03b
m1n1.constructutils: Propagate force arg in _reloadcls()
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:52:43 +09:00
Asahi Lina
57d23f8491
m1n1.constructutils: Use repr() instead of str()
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-05-21 03:52:43 +09:00
Scott Mansell
a17e9e4f5e
m1n1.fw.agx: WIP generate initdata
...
Signed-off-by: Scott Mansell <phiren@gmail.com>
2022-05-21 03:52:43 +09:00
Scott Mansell
79b01a7bcb
m1n1.fw.agx: enough of a driver to boot gfx-asc
...
Signed-off-by: Scott Mansell <phiren@gmail.com>
2022-05-21 03:52:32 +09:00
Scott Mansell
fe9c1f4bca
m1n1.hw.uat: Implement iomap
...
Signed-off-by: Scott Mansell <phiren@gmail.com>
2022-05-21 03:52:32 +09:00
Scott Mansell
43e3e0f3c2
m1n1.hw.uat: Reflect ARMv8 nature
...
Signed-off-by: Scott Mansell <phiren@gmail.com>
2022-05-21 03:52:32 +09:00
Scott Mansell
f72417b78f
m1n1.trace.agx: Add support for Work submission
...
Signed-off-by: Scott Mansell <phiren@gmail.com>
2022-05-21 03:52:32 +09:00