Commit graph

1289 commits

Author SHA1 Message Date
Asahi Lina
34df83601c m1n1.fw.agx: Add TVB growth control messages
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-07-07 13:50:13 +09:00
Asahi Lina
9e63f885e9 m1n1.fw.agx.initdata: Add 13.5B4 G14X initdata changes
Simple for once!

Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-07-07 13:25:19 +09:00
Asahi Lina
6a149e5028 m1n1.constructutils: Improve json serialization of Value types
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-07-07 13:24:26 +09:00
Asahi Lina
311385e645 m1n1.trace.agx: Dump some buffers on G14X from register values
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:01 +09:00
Asahi Lina
6902cb6210 m1n1.trace.agx: Disable the ASC tracer after initdata is available
Since we directly trace the queue rptr/wptr memory locations, we don't
need the ASC tracing and this speeds things up quite a bit (without it,
Linux can get stuck in a pathological stats gathering loop without
making forward progress while traced).

Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:01 +09:00
Asahi Lina
b219bc318a m1n1.fw.agx: Fixes for V13_3
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:01 +09:00
Asahi Lina
b6dec2a644 m1n1.constructutils: Improve Rust export
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:01 +09:00
Asahi Lina
c2bbb41953 m1n1.fw.agx: More fixes for t602x stuff
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:01 +09:00
Asahi Lina
1c7131e26d m1n1.agx: T602x rendering changes
Too lazy to split this up...

Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:01 +09:00
Asahi Lina
af6b8c29a8 m1n1.constructutils: Fix array addressing bug
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:01 +09:00
Asahi Lina
b29c9734ad m1n1.adt: Add float parsing for *-kp-1 props.
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:01 +09:00
Asahi Lina
dabde44937 m1n1.fw.agx: Initdata setup & fixes for G14X/V13_3
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:01 +09:00
Asahi Lina
e4fa6048c2 m1n1.fw.agx: Add changes for G14X on 13.2 and 13.3
Still pending confirming 13.3 on other architectures...

Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:01 +09:00
Asahi Lina
d3e61153cc m1n1.trace.agx: Do not dump misc structs
These are no longer there with the register lists, and it's all
redundant anyway...

Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:00 +09:00
Asahi Lina
2dbbe6050d m1n1.fw.agx.initdata: T602x 13.3 initdata structure changes
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:00 +09:00
Asahi Lina
18005b0f73 m1n1.fw.agx.initdata: T602x 12.3 initdata structure changes
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:00 +09:00
Asahi Lina
83a2a6a9bc m1n1.adt: Add afr/cs perf state props
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:00 +09:00
Asahi Lina
0f1f3b23ee m1n1.trace.agx: Run the init_hook before the shell
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:00 +09:00
Asahi Lina
f7639885ce fw.agx.channels: Don't crash if meta_fn is None
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-06-27 18:35:00 +09:00
Hector Martin
a0d2ed20be payload: Do cpufreq init before smp_start_secondaries()
This also requires exporting this to the proxy so linux.py can use it.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-06-04 15:56:42 +09:00
Hector Martin
4124485265 hv: Make breadcrumbs per-CPU and introduce panic handler
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-06-03 12:47:39 +09:00
Hector Martin
db598aa4cf m1n1.hv: Fix register names
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-05-21 12:29:13 +09:00
Hector Martin
ae1bcd6fe2 m1n1.hv: Update IMPDEF reg names
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-05-06 00:51:30 +09:00
Hector Martin
6c005ddd49 asm: Fix replacing reg names that are substrings (DAIF etc)
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-05-06 00:51:05 +09:00
Hector Martin
234b7064ef experiments/aic2_vms.py: New experiment
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-05-05 02:02:19 +09:00
Hector Martin
ebd4613f61 proxy: Add smp_call[_sync]_el1 variants
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-05-05 00:31:05 +09:00
Janne Grunau
7a84b2bbf9 tools/run_guest_kernel.sh: Support concatenated initramfs images
This allows booting a kernel with the firmware cpio and a cpio
containing matching modules. The modules initramfs can be prepared from
the kernel source directory with:

`make dir-pkg && usr/gen_initramfs.sh -o initramfs_mod.cpio -u squash -g squash ./tar-install/lib/`

The modules are available in /modules/$(uname -r) and the initramfs can
handle modules in the same way as the vendor firmware to make them
available for itself and the main OS.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-04-27 04:09:49 +09:00
Hector Martin
54f44be7d6 hv_exc: Add hv_add_time() function & proxy thunk
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-26 00:51:51 +09:00
Hector Martin
a0f01809ce experiments/touchbar_rainbow.py: Better rainbow
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-23 18:12:09 +09:00
Hector Martin
a81314fe77 run_guest: Implement going to sleep
Getting back from sleep is left as an exercise to the reverse
engineer...

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-19 03:21:58 +09:00
Hector Martin
06b732e788 smp: Add smp_stop_secondaries()
Doesn't work properly yet since we can't restart them...

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-19 03:21:58 +09:00
Hector Martin
3288548faa utils: Add cpu_sleep() function
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-19 03:21:58 +09:00
Hector Martin
4638632657 hv: Implement emulated guest CPU shutdown
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-19 01:21:33 +09:00
Hector Martin
4d7b18d382 m1n1.proxy: Support negative arguments
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-19 01:02:03 +09:00
Hector Martin
a75afff83b hv_exc: Pass through dangerous CYC_OVRD writes to Python
This makes it easier to experiment with the sleep/WFI stuff.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-18 23:36:55 +09:00
Hector Martin
a1be8f233c m1n1.fw.smc: Add read32f()
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-18 22:09:07 +09:00
Hector Martin
7f9eaecbad m1n1.asm: Textually replace sysregs with their identifier
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-18 22:08:41 +09:00
Hector Martin
b57a91726d experiments/cpu_pstate_latencies.py: Fix stuff
Extra pstates only for J416c, drop the second pstate field sets (still
no idea what that does), fix a mask.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-18 21:55:12 +09:00
Asahi Lina
8f6e13b170 firmware: Add 13.3
This has the same iBoot version as 13.3.1, so firmwares probably did not
change.

Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-04-18 20:45:10 +09:00
Hector Martin
88b1866fcc experiments/spi.py: Cleanup/updates
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-16 21:23:46 +09:00
Hector Martin
9b7ae1b443 m1n1.fw.mtp: Fix parsing of init messages
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-16 21:23:46 +09:00
Hector Martin
36bcc36173 m1n1.fw.asc.oslog: Implement properly
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-16 21:23:46 +09:00
Hector Martin
d5267123c1 experiments/mtp.py: Clean up
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-16 21:23:46 +09:00
Asahi Lina
19e00f1f23 m1n1.hv: Remove __OS_LOG segments from coprocessors
These are supposed to be after the kernel, so we'd have to move them
for the guest to be able to access them. It seems things work if we just
delete those segments.

Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-04-16 21:23:46 +09:00
Janne Grunau
22890f3ba1 experiments: Optimize bad apple video playback
Let ffmpeg rotate, align to stride and convert to RGBA.
Do not allocate a framebuffer for every frame.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-04-16 17:11:33 +09:00
Sasha Finkelstein
5681036b2e Add touchbar screen experiments
Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
2023-04-15 17:23:36 +09:00
Hector Martin
ad53766d22 m1n1.fw.asc.{crash, ioreporting}: Do not align prealloc buffer sizes
On SMC on t602x, this is a small SRAM and we can run off the edge.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-12 00:40:06 +09:00
Hector Martin
aaeb3000e6 m1n1.hv: t6020 support
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-12 00:40:06 +09:00
Hector Martin
3bc3b0131f tools/pmgr_adt2dt.py: Add multidie support
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-09 23:50:42 +09:00
Hector Martin
06884b5613 experiments/cpu_pstate_latencies.py: Fix SoC configs
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-09 21:04:40 +09:00