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
Scott Mansell
636ebe70d7
m1n1.hw.uat: Allow accessing as a stream
...
This allows us to use construct's Pointer
Signed-off-by: Scott Mansell <phiren@gmail.com>
2022-05-21 03:52:32 +09:00
Scott Mansell
804e944a1b
m1n1.constructutils: Add ConstructClass wrapper around construct
...
Signed-off-by: Scott Mansell <phiren@gmail.com>
2022-05-21 03:52:32 +09:00
Scott Mansell
42edf41e37
m1n1.hw.uat: fix VA_MASK
...
Was missing the lowest bits, which broke unaligned reads/writes
Signed-off-by: Scott Mansell <phiren@gmail.com>
2022-05-21 03:52:32 +09:00
Scott Mansell
980b9241d2
m1n1.trace.agx: Trace AGX wip
...
Signed-off-by: Scott Mansell <phiren@gmail.com>
2022-05-21 03:46:36 +09:00
Scott Mansell
90eae66b33
m1n1.hw.uat: Intitial UAT implementaiton
...
Signed-off-by: Scott Mansell <phiren@gmail.com>
2022-05-21 03:46:26 +09:00
Scott Mansell
254f01b3ea
m1n1.proxyutils.RegMon: Allow custom read lambda
...
Useful for monitoring ranges beind an iommu
Signed-off-by: Scott Mansell <phiren@gmail.com>
2022-05-21 03:46:14 +09:00
Hector Martin
144c3da78e
experiments/amcc_err_handler.py: New old thing to dump AMCC errors
2022-04-19 23:32:11 +09:00
Janne Grunau
d4637513e0
WIP: m1n1.hv: add support for starting CPUs on the second M1 Ultra die
...
notes:
- macos guest only works if the display is not initialized
- macos guest appears to be very slow
Signed-off-by: Janne Grunau <j@jannau.net>
2022-04-19 21:39:52 +09:00
R
90479ac755
jpeg: Add documentation
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
04fc26639b
jpeg: Unbreak encode for RGB formats
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
d28ab8cc81
jpeg: Figured out how to activate tiling
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
b2a0352a8f
jpeg: Implement encoding from planar formats
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
f2b8054309
jpeg: Support encoding linear YUV
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
c71d341ff1
jpeg: Implement YUV10 mode for encoding
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
4681053ea9
jpeg: Implement encoding other RGB formats
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
970b2789d0
jpeg: Implement encoding subsampling modes
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
45876d09a1
jpeg: Import working encode experiment
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
9fca773c8f
jpeg: Implement decoding into planar formats
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
3a18075d89
jpeg: Decode linear YUV
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
4c8807fcca
jpeg: Add RGB565 to decoder
...
Note that dithering does not get configured
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
7350baf58b
jpeg: Implement decoding other subsampling modes
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
0c1f89d1f9
jpeg: Import working basic decode experiment
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
49cdf7fe22
jpeg: probe registers more thoroughly
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
c6169c1c15
jpeg: Import register definitions
...
This comes from experiments that were performed out-of-tree
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:40:44 +09:00
R
0f6991ccbc
dart-t8110: fill in more details from poking
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
96b2d584fe
dart-t8110: Import more stuff pulled from symbols
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
ce5e5fe476
dart-t8110: Add other seen registers; poke protect
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
18535a2385
dart-t8110: uncomment helper functions
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
25ebf8adb1
dart-t8110: map/translate
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
5b07956e43
dart-t8110: flush/init
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
ecb9d1210c
dart-t8110: dumping appears to work completely
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
16028224f9
dart-t8110: dump first-level translation tables
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
R
4a09eca74a
dart-t8110: Initial commit
...
Signed-off-by: R <rqou@berkeley.edu>
2022-04-16 19:24:00 +09:00
Kyle Evans
0ba2027e5e
proxyclient: tools: add a FreeBSD loader
...
The differences are documented in the script itself, but the main odd
bit is that we pass the provided kernel as an initramfs. Our modified
loader will probe for the initramfs start/end props in FDT and put up
a memdisk that we load the kernel from. This choice was made for two
reasons:
1.) Avoid ad-hoc interpretations of a memory region in m1n1, it doesn't
care if we actually passed it an initramfs or not anyways.
2.) We already had some code on hand to do this in our loader, so I
suspect we've done similar shenanigans elsewhere anyways.
This also requires a U-Boot change to allow bootefi of an arbitrary
location, as long the size is provided.
The alignment constraints for loader/kernel were kept arbitrarily. The
kernel will be bounced anyways by loader. I don't recall what
alignment requirements UEFI payloads have, but 2M seems reasonable.
Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
2022-04-16 19:22:55 +09:00
Kyle Evans
3b68165900
proxyclient: tools: fix linux U-Boot support
...
-t is optional, we may not have a tty_dev, so we can avoid trying to
grab the baudrate from it if it's unspecified.
We don't want to use dtb_addr for booti; this is the unmodified payload.
m1n1 will load it and add bits to it at a separate address for passing
on to U-Boot. For booti purposes, we actually want the augmented FDT
rather than the user-specified.
Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
2022-04-16 19:18:06 +09:00
Davide Cavalca
eeebd9dad3
Make scripts executable
...
Signed-off-by: Davide Cavalca <davide@cavalca.name>
2022-04-16 19:17:33 +09:00
Asahi Lina
87a849287a
m1n1.utils.Reloadable: Add force argument to _reloadcls()
...
Useful to force reload classes that haven't changed when their
dependencies might have.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-04-16 19:06:22 +09:00
Asahi Lina
8b10324815
m1n1.trace: Add space after CPU number in PrintTracer logs
...
This makes the logs align properly with other trace logs.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-04-16 19:06:22 +09:00
Asahi Lina
6c57d3ded9
m1n1.proxyutils.RegMonitor: Add support for custom log function
...
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-04-16 19:06:22 +09:00
Asahi Lina
e2f63a07b2
hv: Improve VM emulation for tracer
...
Adds support for up to 64-byte ops and more SIMD/paired operations.
This is good enough to trace a lot of GPU VM address space.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-04-16 19:06:22 +09:00
Asahi Lina
cf8be42aa9
hv: Fix bug when unmapping IO ranges
...
Sometimes ranges were not properly unmapped if they did not overlap the
currently defined range maps.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-04-16 19:06:22 +09:00
Asahi Lina
302a9ec4c0
m1n1.hv: Add BYPASS trace mode
...
Forces SW mapping but does not do any hooking. This can be useful for
testing the emulation or to work around issues with HW/SW map
differences.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2022-04-16 19:06:22 +09:00
Hector Martin
9af9e834bf
chainload.py: Pad image to terminate payloads
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-27 18:34:53 +09:00
Janne Grunau
df53f16f76
m1n1.hv: Copy /chosen/memory-map/preoslog if it exists
...
preoslog was added in macos 12.3 and seems to contain iBootStage1 log
output. Since macos 12.3 accesses it it has to be copied to after the
guest image.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-20 03:04:13 +09:00
Hector Martin
94d640aa20
tools/run_guest.py: Support restricting CPU list available to guest
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-14 21:08:23 +09:00
Hector Martin
be1421d2ad
m1n1.hw.spi: Update register definitions
...
This had been sitting in my worktree...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-11 22:14:46 +09:00
Hector Martin
822b3c3cca
m1n1.trace.spi: Remove UNBUF mode
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-11 22:13:27 +09:00
Janne Grunau
c2a48da4c1
m1n1.hv: Add trace script keyboard/trackpad
...
Input devices use HID over SPI. HID communication is obscured by "sio"
DMA.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-11 12:06:01 +09:00
Janne Grunau
387fab6132
m1n1.utils: Add CRC-16 (polygon 0xA001)
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-11 12:06:01 +09:00
Janne Grunau
025fa41e90
m1n1.trace: Add SPI tracer
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-11 12:06:01 +09:00
Janne Grunau
45824d2676
m1n1: move SPI register to m1n1.hw
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-11 12:06:01 +09:00
Janne Grunau
e90be797a8
m1n1.trace.gpio: Update register description based on the Linux driver
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-11 12:06:01 +09:00
Janne Grunau
9c80a69266
m1n1.hv: Use dynamic pin maps in trace_gpio.py
...
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>
2022-03-11 12:06:01 +09:00
Janne Grunau
5e8beca9fe
experiments/dcp.py: Upload fb in 512k chunks for slow (v)UARTs
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-11 12:05:21 +09:00
Janne Grunau
f297decfb4
experiments/dcp.py: Use display size for frame buffers
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-11 12:05:21 +09:00
Janne Grunau
6a8016a8e3
experiments/dcp.py: set DVA offset from ADT
...
This does not appear to be necessary. It worked on t8103 before and I
see no different behavior on t6001.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-11 12:05:21 +09:00
Janne Grunau
66f4d625b8
experiments/dcp.py: Use t8103/t600x specific code paths
...
MMIO space differes between t8103 and t600x so the hardcoded RegMonitor
addresses make only sens on the former.
set_display_device difference is taken from macOS trace on t6001.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-11 12:05:21 +09:00
Janne Grunau
d1d93eb2b5
m1n1.fw.dcp: Add callbacks used by t600x-dcp
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-11 12:05:21 +09:00
Janne Grunau
7028f3e2d8
m1n1.fw.dcp: Zero dcpep's shared memeory
...
Fixes a crash of DCP with experiments/dcp.py after chainloading m1n1 on
j314c.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-03-11 12:05:21 +09:00
Hector Martin
99124a41fe
tools/chainload.py: Support chainloading raw binaries
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-10 00:30:15 +09:00
Hector Martin
123d1df1a7
kboot: Replace kboot_set_bootargs with kboot_set_chosen
...
This allows setting arbitrary /chosen string props
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-09 20:55:34 +09:00
Hector Martin
adb1cb943e
proxy: Export smp_set_wfe_mode
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-03-08 00:02:06 +09:00
Janne Grunau
d76f3a6631
m1n1.hw.DART: coalesce continuos l2 ptes
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-02-24 23:55:46 +09:00
Janne Grunau
e1c5df5037
experiments/dart_dump.py: Use DART.from_adt()
...
The label of the ADT node is easier to use. Uses the proper DART type on
t600x SoCs.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-02-24 23:55:46 +09:00
Janne Grunau
a57696366f
hv/trace_dcp.py: Update to macOS 12.x API
...
DCP API seems to be mostly unchanged from 12 beta to 12.2.
Signed-off-by: Janne Grunau <j@jannau.net>
2022-02-24 23:55:46 +09:00
Janne Grunau
fb49d88d90
m1n1.fw.dcp.ipc: annotate swap_complete_intent_gated
...
Signed-off-by: Janne Grunau <j@jannau.net>
2022-02-24 23:55:46 +09:00
Sven Peter
53af416b07
hv.py: Add helper to break on symbols
...
We already have breakpoints and symbols, let's make our life easier
by also allowing to break on symbols.
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-02-24 23:55:25 +09:00
Hector Martin
08b77c2b1b
m1n1.adt: Handle underscores in properties as __
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-21 15:31:31 +09:00
Hector Martin
5bf8c5ac83
m1n1.hv: Use p.mcc_hv_unmap_carveouts()
...
Fixes random SErrors due to the guest issuing speculative instruction
fetches into TZ regions.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-21 15:30:25 +09:00
Hector Martin
50a9593034
mcc: Add mcc_hv_unmap_carveouts() and proxy op
...
This is necessary to stop the guest from speculating into carveouts.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-21 15:30:21 +09:00
Hector Martin
a8a93a3b5f
hv/trace_smc.py: Add GetKeyByIndex decoding
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-15 14:05:13 +09:00
Hector Martin
ec126bb16a
experiments/smc.py: Turn into SMC key dumper
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-15 14:05:13 +09:00
Hector Martin
d381341865
m1n1.trace.asc: Add missing power control messages
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-15 14:05:13 +09:00
Hector Martin
45c3682f60
m1n1.fw.smc: Handle notifications
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-15 14:05:13 +09:00
Hector Martin
a0680a2678
m1n1.adt: Better parse PMU props
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-15 14:05:13 +09:00
Martin Povišer
41f0874f99
experiments/audio_capture.py: Demonstrate audio capture
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00
Martin Povišer
78aa55f0bc
experiments/speaker_amp.py: Revamp hardware setup
...
Use register definitions where they are now available. Start from full
AUDIO_P reset and set NCO ourselves (instead of relying on iBoot
values).
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00
Martin Povišer
0d4c7af26b
m1n1.hw.mca: Add MCA register definitions
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00
Martin Povišer
90c4a1ae46
m1n1.hw.admac: Improve polling
...
Make sure we read any reports before we start submitting new
descriptors. Also put sleep in busy-wait loop and make speaker_amp.py
exit once EOF is reached.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00
Martin Povišer
9bd84dfbb9
experiments/speaker_amp.py: Drop 'polling console'
...
Drop the 'polling console' code as there are now better ways to achieve
the same. (One can use USB_VUART for second proxy session, see 85ee2f24)
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00
Martin Povišer
532f260fae
m1n1.hw.admac: Label burst size, buswidth registers
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00
Martin Povišer
3a8ae74907
m1n1.hw.admac: Introduce RX channels
...
Fill in register definitions and extend the driver code to introduce
support for RX channels. This involves change of channel numbering.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00
Martin Povišer
590722b29d
m1n1.hw.admac: Use stderr for debug prints
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:18:20 +09:00
Martin Povišer
64d8f9d1b3
m1n1.loadobjs: Add util for loading objects on target
...
For those of us who can't write assembly but still need to run code on
the other side.
>>> from m1n1.loadobjs import *
>>> lp = LinkedProgram(u)
>>> lp.debug_printf("hello from the other side (%d)\n", 42)
TTY> hello from the other side (42)
0x1f
>>> lp.load_obj("build/test.o")
>>> lp.test()
TTY> hello from loaded object
0x19
>>> lp.clear_objs()
Signed-off-by: Martin Povišer <povik@protonmail.com>
2022-02-08 14:14:38 +09:00
Hector Martin
0d35eb3da7
m1n1.proxyutils: Wrap ADT base to 64 bits
...
This works around a wraparound issue when the virt base ends up causing
the ADT address to go negative, when on 12.1+ using a dummy virt base.
Fixes : #155
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-02-06 20:49:54 +09:00
Mikhail Gusarov
88874936c6
proxyclient: utils.py: add ehexdump()
...
ehexdump is similar to chexdump, and uses CP437 control characters
and Braille to improve eyeballability of character output.
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2022-01-26 15:39:23 +09:00
Sven Peter
ccf4b20a1d
proxy: add nvme_{read,flush}
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-01-26 15:38:40 +09:00
Sven Peter
f44d5db4fa
proxyclient/asc: s/Mgmt_StartSyslog/Mgmt_SetAPPower/
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-01-26 15:38:40 +09:00
Sven Peter
6816c151bb
proxyclient/epic: Add support for SubHeader.version = 3
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-01-19 03:24:20 +09:00
Hector Martin
e2b87b695f
tools/smccli.py: Shut down cleanly, increase verbosity
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:22:33 +09:00
Hector Martin
434a3b6c78
hv/trace_smc.py: Support RW ops
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:22:16 +09:00
Hector Martin
07c695926d
hv/trace_dcp.py: Fix typo
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:21:55 +09:00
Hector Martin
ce2f705b16
m1n1.trace.asc: Handle prealloc'd syslog buffers
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:21:30 +09:00
Hector Martin
293d78fd7f
m1n1.hw.asc: Add verbose flag
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:21:15 +09:00
Hector Martin
a79200ef1e
m1n1.fw.smc: Many improvements
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:21:04 +09:00
Hector Martin
c7d42837e4
m1n1.fw.asc.mgmt: Fix the IOP/AP power state stuff
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:19:48 +09:00
Hector Martin
db0eaa86ca
experiments/dcp_iboot.py: Clean up after shell
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:19:08 +09:00
Hector Martin
9cdf2b5d06
experiments/dcp_iboot.py: Do not dump DART
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:18:55 +09:00
Hector Martin
e468e08603
m1n1.fw.asc.{crashlog,syslog}: Do not ack prealloced bufs
...
This is wrong and causes IOP crashes due to unacked crashlog msgs.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:18:18 +09:00
Hector Martin
bacb19b301
m1n1.fw.asc: Make DVA_OFFSET dynamic
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-19 03:16:12 +09:00
Hector Martin
f98723bb81
m1n1.trace.dart: Prime register cache on startup
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
7969d2c689
m1n1.fw.dcp.iboot: Cleanup & fixes
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
323e163eb4
hv/trace_dcp.py: Fix reinitialization
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00
Hector Martin
e3e2d05967
experiments/dcp_iboot.py: New experiment
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 20:23:01 +09:00
Hector Martin
d2535159a5
m1n1.fw.dcp.iboot: Add iBoot DCP interface client
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
17e0dfceab
hv/trace_dcp.py: Add EPIC support and refactor
...
This now partially uses the scaffolding in m1n1.fw.afk.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
1d79711e79
m1n1.fw.afk: Add AFK/EPIC endpoint support
...
These cover the non-dcpep endpoints of the DCP interface, including
the iBoot interface (disp0).
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
b2da9faac7
m1n1.fw.dcp.ipc: Add some more struct fields
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
0e326923cf
m1n1.fw.common: Move some common defs here from m1n1.fw.dcp.ipc
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
23b9b45040
hv/trace_all.py: Use async tracing by default
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
72b7dfed5f
m1n1.fw.asc: Stop endpoints on global stop
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
b388093d33
m1n1.hw.dart: Wait for invalidations to complete
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
78d1e5fd93
m1n1.hw.dart: Remove stray print
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
4482ae634d
m1n1.hv: Add a .started variable to indicate HV is running
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
deb728adb9
m1n1.fw.asc: Invalidate DART after making new mappings
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
fb9cdcb1e9
m1n1.fw.asc.crash: Raise exception on ASC crashes
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
df481228b7
m1n1.gpiola: Add load_regmap()
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
1ecf7de936
m1n1.gpiola: Make Reloadable
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
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
Hector Martin
9012247cdd
m1n1.trace.i2c: Add I2C dev tracer
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 19:39:03 +09:00
Hector Martin
430e8d2e8a
m1n1.hw.i2c: Rename registers to PASemi names, add all bit defs
...
This can serve as hardware documentation of the PASemi peripheral,
in lieu of public docs.
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-16 18:55:44 +09:00
Sven Peter
0b9829e227
proxyclient: add nvme_{init,shutdown}
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-01-16 18:53:29 +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
Sven Peter
6445cf61ba
proxyclient: utils.py: allow to specify print function to chexdump
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2022-01-01 16:49:14 +09:00
Hector Martin
40894439cb
m1n1.trace: Fix redundant MMIO logs
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-12-28 21:09:58 +09:00
Hector Martin
90cf4baf85
m1n1.gpiola: Bugfixes
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-12-28 21:09:48 +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
f10f32af9e
experiments/spi.py: Misc updates
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-12-28 21:08:47 +09:00
Hector Martin
054e437c31
experiments/pcie_enable_devices.py: New script
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-12-21 20:14:56 +09:00
Hector Martin
1fd1a467e1
chainload.py: Do not set secondary RVBARs if --no-sepfw
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-12-21 12:08:32 +09:00
Hector Martin
f2eac15ca7
tools/chainload.py: Default to copying SEPFW
...
This doesn't really take any significant time and is the correct thing
to do. Use --no-sepfw for e.g. serial bring-up where doing the ADT dance
costs measurable time.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-12-17 22:30:42 +09:00
Hector Martin
e8b30c9325
experiments/spi.py: New experiment to test SPI peripheral
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-12-09 01:22:38 +09:00
Hector Martin
a05f68d1c8
m1n1.gpiola: New module
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-12-09 01:22:37 +09:00
Janne Grunau
5e202ab2fe
m1n1.trace.dart: initialize DART with correct pte type
...
Signed-off-by: Janne Grunau <j@jannau.net>
2021-12-08 09:06:07 +09:00
Janne Grunau
d23e09c2f0
m1n1.hw.dart: update pte BIT(1) annotation
...
BIT(1) of a page table entry is "disable sub-page protection".
Signed-off-by: Janne Grunau <j@jannau.net>
2021-12-08 09:06:07 +09:00
Hector Martin
32515c936f
m1n1.proxy: Fix typos in fb_blit/unblit
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-27 01:24:36 +09:00
Martin Povišer
c835b1d2fe
experiments/speaker_amp.py: Insert proper header
...
Add SPDX header, make directly executable.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
4f7d03addf
m1n1.hw.*: Fill in SPDX license headers
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
f71397abb7
tools/dump_pmgr.py: Show calculated NCO rate
...
Show the calculated rate for NCO channels' output based on the present
register values.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
5e5b83e7a2
m1n1.hw.nco: Add NCO driver
...
Apple SoCs have an NCO block used for generating audio master clocks.
The block performs fractional division of a higher-rate input clock and
contains a counter which is partially implemented as a LFSR. Credit
goes to Hector for reversing the divisor register semantics.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
549dcf8b3a
m1n1.hw.admac: Add debug print of estimated rate
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
99a0741c87
speaker_amp.py: Clean up
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
53be0ec40d
speaker_amp.py: Note down TAS2770 as best match
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
8833696c69
m1n1.hw.admac: Fix descriptor deserialization
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
301ba75b6b
m1n1.utils: Remove dead formatting
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
145b1101c9
m1n1.utils: Add Register32.fields property
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
d65526d326
m1n1.hw.admac: Clear underflow counters on reset
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
570107629a
m1n1.hw.admac: Fix and extend register defs
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
2cebfaab73
m1n1.hw.i2c: Reset status before transaction
...
Reset the status register before each transaction. This is necessary if
we are taking over the peripheral after the Linux driver (e.g. in paused
hypervisor).
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 17:49:39 +09:00
Martin Povišer
a40840f13c
proxy: Expose usb_iodev_vuart_setup
...
Expose the usb_iodev_vuart_setup function in uartproxy. This opens
the secondary ACM pipe to new uses outside the hypervisor. E.g. it can
be set up as another stream for sending proxy requests.
Sample usage from proxyclient:
p.usb_iodev_vuart_setup(p.iodev_whoami())
p.iodev_set_usage(IODEV.USB_VUART, USAGE.UARTPROXY)
# the second virtual serial now also serves proxy
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-11-26 15:31:21 +09:00
Hector Martin
98d6e9bb4f
tools/chainload.py: Fix 8b/16b copy confusion
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-26 13:58:39 +09:00
Hector Martin
b86574e410
tools/pmgr_adt2dt.py: New script to convert ADT PMGR devs to DT nodes
...
This still requires manual editing to fix up some issues, since our idea
of always-on devices and parent-child relationships doesn't always match
Apple's.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-24 16:19:01 +09:00
Hector Martin
0e3ee31254
m1n1.fw.asc.kdebug: Handle prealloc messages (partially)
...
Not sure if these need a reply...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-23 17:27:37 +09:00
Hector Martin
99acc2675b
m1n1.fw.asc: Add support for shutting down RTKit links
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-23 17:20:09 +09:00
Hector Martin
0446838460
m1n1.fw.asc.crash: Add a basic crashlog parser
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-23 17:19:38 +09:00
Hector Martin
10dda2550d
m1n1.hv: Automatically lower BRKs
...
This makes Linux BUG()s work out of the box without breaking into the
HV.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-23 14:05:26 +09:00
Jean-Marc Ranger
45a62144ff
Set missing execute bits in proxyclient/{experiments|tools}/*.py
...
Currently, only some scripts in proxyclient/experiments and
proxyclient/tools have their execute bit set. Set it for those
that miss it.
Signed-off-by: Jean-Marc Ranger <jmranger@hotmail.com>
2021-11-23 01:23:11 +09:00
Jean-Marc Ranger
d4f750cb22
experiments/smc.py: Adapt to API change in SMCEndpoint
...
Update experiments/smc.py to use fw/smc.py's new API.
Fixes: b9ddd74c02
("hv/trace_smc.py: Add SMC tracer")
Signed-off-by: Jean-Marc Ranger <jmranger@hotmail.com>
2021-11-23 01:22:57 +09:00
Hector Martin
6906af06cc
experiments/dcp.py: Use new ADT DART constructor
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-22 18:13:51 +09:00
Hector Martin
8778819831
m1n1.hw.dart: Fix typo
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-22 18:13:32 +09:00
Hector Martin
c8a8946e82
m1n1.hw.dart: Add a constructor that figures out DART type from the ADT
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-22 18:13:10 +09:00
Hector Martin
4027c34c7a
proxy: Add proxy ops for pcie_init/shutdown
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-22 16:04:35 +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
5d214606df
m1n1.hv: Add flag to hide the CPU prefix in hv.log()
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-16 17:20:47 +09:00
Hector Martin
06975c8b87
m1n1.hv: Add TraceMode.WSYNC to make writes synchronous, but not reads
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-16 17:20:21 +09:00
Hector Martin
ccbe181d75
m1n1.adt: Improve PMGR props parsing, add to dump_pmgr.py
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-16 17:19:42 +09:00
Janne Grunau
46c945ac95
usb: use dynamic paths for usb related ADT nodes
...
Adds support for the 3rd USB-C port on 2021 Macbook Pros.
Currently up to 8 USB-C ports are supported which should be sufficient
for expected future devices.
Tested on Macbook Pro 14" and Mac Mini.
Signed-off-by: Janne Grunau <j@jannau.net>
2021-11-12 23:48:32 +09:00
Janne Grunau
2724d69f4c
iodev: usb: replace secondary usb iodevs with single vuart iodev
...
Signed-off-by: Janne Grunau <j@jannau.net>
2021-11-12 23:48:32 +09:00
Janne Grunau
3a2446c53b
m1n1.proxy: remove trailing whitespace
...
Signed-off-by: Janne Grunau <j@jannau.net>
2021-11-12 23:48:32 +09:00
Hector Martin
c947f6aec3
m1n1.trace.asc: Add support for tracing DARTless ASCs
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-11 15:22:25 +09:00
Hector Martin
9d2be299a4
tools/smccli.py: Simple shell for an instantiated SMCClient
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +09:00
Hector Martin
eaa72c7a91
m1n1.fw.smc: Improve and add more functions
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +09:00
Hector Martin
198fc24f14
m1n1.adt: Fix ranges prop decoding
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-10 20:43:51 +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
ae7228f398
m1n1.asm: Fix bad objdump variable
...
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
Vincent Duvert
407663b73d
bootstrap_port: Improve UART baud setting
...
Rework the serial port bootstrap so it works correctly if the target is already
at 1500000 baud.
No baud adjustment is made if the proxy is using the serial-USB interface.
Tested with the Mac-to-Mac serial connection (macvdmtool) and the serial-USB
connection.
Signed-off-by: Vincent Duvert <vincent@duvert.net>
2021-11-10 16:02:44 +09:00
Hector Martin
8e0ca1a39c
m1n1.hv: Print diagnostic info when MMIO forwarding fails
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-08 19:55:16 +09:00
Hector Martin
e19e74be8b
m1n1.asm: Make work on macOS/clang
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-08 14:41:24 +09:00
Hector Martin
a4e922ecaf
m1n1.hv: Map vUART IRQ properly
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 04:03:50 +09:00
Hector Martin
ff1b668a5d
m1n1.hv: Fix broken cpu# in SYNC tracers
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 04:03:50 +09:00
Hector Martin
74dece703e
m1n1.hv: Add support for dumping MMIO accesses in Python syntax to a log
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 04:03:50 +09:00
Hector Martin
bfc91be170
m1n1.hv: Keep track of started CPUs
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 04:03:50 +09:00
Hector Martin
3d3d5ea5ad
m1n1.hv: Forward more sysregs properly to EL12
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 04:03:50 +09:00
Hector Martin
85ca5b94cb
m1n1.hv: Do map low RAM
...
Apparently this is still necessary
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:52:43 +09:00
Hector Martin
49858b6d2c
m1n1.hv: Fix cpustart for >2 clusters
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:52:43 +09:00
Hector Martin
f2975c7e34
m1n1.utils: Fix bug in RangeMap
...
Adding a zero-length range was breaking things.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:52:43 +09:00
Hector Martin
075168c233
m1n1.hv: Handle MMIO/PMGR hooks dynamically
...
This makes m1n1 boot all the way on t6000
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:52:43 +09:00
Hector Martin
08f90e6dd6
m1n1.hv: Fix bug for sync tracing 64-bit writes
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:52:43 +09:00
Hector Martin
77074b9098
hv_aic: Support AICv2
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-04 03:52:42 +09:00
Hector Martin
339bd37077
m1n1.hv: Compute RAM base from bootargs
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-02 02:22:47 +09:00
Hector Martin
e3f0836eae
m1n1.hv: Use vUART base from ADT
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-02 02:22:17 +09:00
Hector Martin
68aec75918
memory: Larger PA support & dynamically map MMIO
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-01 21:00:56 +09:00
Hector Martin
bc82dbea4e
m1n1.hw.dart: Add support for T6000 DARTs
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-01 19:00:34 +09:00
Hector Martin
9fab740a77
tools/chainload.py: Add --quiet arg to suppress FB
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-01 19:00:34 +09:00
Hector Martin
f590ef73d0
m1n1.adt: Add field to pmgr devices
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-01 19:00:34 +09:00
Hector Martin
c76851ae11
m1n1.adt: Add pmap-io-ranges parsing
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-01 19:00:34 +09:00
Hector Martin
1e787e9d02
m1n1.adt: Add & use SafeGreedyRange
...
This avoids swallowing subcon errors silently, like GreedyRange does.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-01 19:00:34 +09:00
Hector Martin
7ff48f6201
memory: Make the RAM base dynamic
...
For now we compute this as phys_base aligned down to a 4GiB boundary.
Hopefully that works for future SoCs too.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-11-01 13:39:40 +09:00
Hector Martin
73180e29fa
m1n1.hw.dart: Add show_error() and some more defs
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-10-27 15:49:12 +09:00
Hector Martin
0d0a646922
m1n1.adt: Support per-compat prop decoding, make it work on t6000
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-10-21 18:41:13 +09:00
Hector Martin
ecceec9b5c
experiments/cpu_pstate_latencies.py: Fix the asm
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-10-18 17:13:41 +09:00
Hector Martin
0255831153
m1n1.trace: Support HOOK mode
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-10-15 23:44:12 +09:00
Hector Martin
f49428bb65
m1n1.proxyutils: Fix GuardedHeap to actually work
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-10-15 23:44:12 +09:00
Hector Martin
1d0d60a846
m1n1.proxy: Fix weird typo in mask16
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-10-15 23:44:12 +09:00
Hector Martin
08873880fa
m1n1.hv: Fix TLB invalidation issue
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-10-15 23:44:12 +09:00
Hector Martin
1444c93a24
proxy: Add P_MMU_INIT_SECONDARY
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-10-15 23:44:12 +09:00
Danny Lin
7a29455646
proxyclient: Fix typo in LazyADT str implementation
...
Fix the `gstr` typo so that `print(hv.adt)` works as expected.
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
2021-10-11 12:42:55 +09:00
Alyssa Rosenzweig
8010e38376
Add smc.py script to enable radios
...
Add a basic SMC client and a script in experiments/ using it to enable
the radios. Running this before booting Linux will make the network
controller devices show up in lspci, even if Linux lacks an SMC driver.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2021-10-11 12:41:27 +09:00
Martin Povišer
925215aea2
proxyclient: Expect m1n1 at /dev/ttyACM0
...
Change the default serial port.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-10-11 12:40:43 +09:00
Hector Martin
3a4b2870a8
experiments/cpu_pstates.py: Only set DVMR if necessary
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-24 01:16:32 +09:00
Hector Martin
febf83a981
experiments/cpu_pstates.py: Enable DVMR unconditionally
...
Seems this is not always enabled by the bootloader on some systems
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-24 00:53:07 +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
TophEvich
913c775165
proxyclient: removed unused code
...
Little clean-up of unused proxyclient code.
Code used/referenced by commented out sections were taken
into account and left behind to be used by it at a later point.
Signed-off-by: TophEvich <84676511+TophEvich@users.noreply.github.com>
2021-09-22 19:00:34 +09:00
Martin Povišer
18bc2c7db1
Add m1n1.hw.admac, experiments/speaker_amp.py
...
Add initial code for driving the ADMAC hw blocks, also add a script
which shows it in action by streaming audio to the Mac mini's embedded
speaker.
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-09-22 16:02:35 +09:00
Martin Povišer
d25581ddb3
Fill in m1n1.hw.i2c
...
Signed-off-by: Martin Povišer <povik@protonmail.com>
2021-09-22 16:02:35 +09:00
Hector Martin
9dc332b660
tools/dump_pmgr.py: Show fixed clock usages from DT
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-22 01:03:10 +09:00
Hector Martin
a816f2718b
m1n1.hv: Improve bt()
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-22 00:36:41 +09:00
Hector Martin
9cc0c0a55b
m1n1.hv: Add lower() command to send an exception to the guest
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-22 00:36:40 +09:00
Hector Martin
36e0283a87
hv: Handle PAC mask automatically
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-21 23:28:31 +09:00
Hector Martin
bce239b36f
exception: Make space in the stack for full exception context
...
This is step 1 of the rework to make reentrant exceptions work
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-21 20:29:19 +09:00
Hector Martin
04668b370a
m1n1.proxyutils: Print and clear L2C regs on SErrors
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-21 17:15:49 +09:00
Hector Martin
0e3770ca47
hv, m1n1.hv: Add cpu() command to switch CPU contexts
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-21 13:18:06 +09:00
Hector Martin
5feae51f25
tools/run_guest.py: Add --debug-xnu argument
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-21 13:15:24 +09:00
Hector Martin
9545371c87
m1n1.hv: Add more PMGR hacks for xnu bug workarounds etc
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-21 13:15:04 +09:00
Hector Martin
160ced7449
m1n1.hv: Also guard IMX pstate
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-21 00:40:31 +09:00
Hector Martin
16314a6203
m1n1.fw.pmp: New module
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-20 18:01:21 +09:00
Hector Martin
6211e9f9e6
m1n1.hw.pmgr: New module
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-20 18:01:09 +09:00
Hector Martin
eae9eceff1
m1n1.adt: Fix more pmgr fields, improve dump_pmgr.py
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-20 17:55:45 +09:00
Hector Martin
d2d5952aa5
tools: dump_pmgr.py
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-20 03:00:40 +09:00
Hector Martin
1e98c320df
m1n1.adt: Pretty sure the v_ things were wrong
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-20 02:49:58 +09:00
Hector Martin
5c99406790
m1n1.hv: Guard UART0 pmgr regs
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-20 02:48:23 +09:00
Hector Martin
c461b5d033
m1n1.adt: Add clock-frequencies decoding
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-19 22:33:38 +09:00
Hector Martin
6c070fa224
m1n1.proxyutils: Only set baud if connected via serial
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-19 22:32:58 +09:00
Hector Martin
99e38d24d0
experiments/cpu_pstates.py: Remove p-core boost testing hack
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-19 02:28:49 +09:00
Hector Martin
c8eb9a7862
experiments: Add cpu_pstate_latencies.py
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-19 02:03:27 +09:00
Hector Martin
6a620ddab9
experiments: Add cpu_pstates.py
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-19 02:03:24 +09:00
Hector Martin
c3ba77ce16
hv_exc: Handle SYS_IMP_APL_CYC_OVRD in the fast path
...
m1n1 now uses this for SMP, and due to wfi FIQ leakage from the HV
timer this gets spammed thousands of times per second. Handle it in
the HV directly.
Fixes : #107
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-18 22:33:28 +09:00
Hector Martin
37b2fdda7c
m1n1.adt: Handle empty function props
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-18 22:27:13 +09:00
Hector Martin
2d952752db
proxy: Add smp_wait() to the proxy
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-17 15:25:34 +09:00
Hector Martin
b16bad61b4
m1n1.utils: Fix RegAccessor assignment
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-17 00:34:56 +09:00
Hector Martin
bbf8889d87
m1n1.trace.asc: Print more registers
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-17 00:34:42 +09:00
Hector Martin
36a7f3f2e1
m1n1.hw.asc: Print raw messages in hex
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-17 00:34:22 +09:00
Hector Martin
0d13ed692e
m1n1.fw.asc: Align buffer sizes in reply messages
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-17 00:33:34 +09:00
Hector Martin
966b50a753
m1n1.fw.asc: Support booting an ASC
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-17 00:33:12 +09:00
Hector Martin
b53b627cb9
m1n1.hw.dart: Support initializing a DART from scratch
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-17 00:30:41 +09:00