Commit graph

1193 commits

Author SHA1 Message Date
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
Hector Martin
908f263f22 proxy: Fix warning in P_MCC_GET_CARVEOUTS
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-05-30 19:29:51 +09:00
Hector Martin
9c795fbdbf utils: Use WFE/SEV in spinlock
This should reduce memory traffic spam and power usage from lock
contention when threads are blocked on a spinlock.

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-05-30 19:22:55 +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
Hector Martin
ad659daa6d payload: Fix spurious variable detection on EOF
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-05-23 20:40:07 +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