Commit graph

2254 commits

Author SHA1 Message Date
Kevin Ji
650441daa5 makelogo.sh: Add #!/bin/bash
Signed-off-by: Kevin Ji <1146876+kevinji@users.noreply.github.com>
2023-09-20 22:35:01 +09:00
Janne Grunau
fb6e035950 hv/trace_dcp: Support commands with retcode only replies
Seen with the SetProperty command of DCP's system EP.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:33:45 +09:00
Janne Grunau
ea5c9be657 hv/trace_dcp: simplify tracing of dcpext*
It's now enough to change the variable dcp_name to dcpext[0-7].
'dcpext' on t8103/t8112 is handled by "/aliases" in the ADT.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:33:45 +09:00
Janne Grunau
c11632947b hv/trace_dcp: port dptxport commands to macos 13.5 fw
Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:33:45 +09:00
Janne Grunau
161a96a06d hv/trace_dcp: extend tracing of ap_std_calls
Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:33:45 +09:00
Janne Grunau
1b10a51a51 hv/trace_dcp.py: import firmware vesrions from the HV
Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:33:45 +09:00
Janne Grunau
ea063b6534 hv/trace_dcp.py: more verbose logging of AFK/EPIC endpoints
Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:33:45 +09:00
Janne Grunau
1d46073077 hv/trace_dcp: Use 'elif' instead of 'if'
Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:33:45 +09:00
Janne Grunau
34b0204c27 proxy: hv: Add trace_dptx.py for tracing dptx-phy on j473/t8112
Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:33:45 +09:00
Janne Grunau
303d08382c experiments/dcp: add system ep
Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:33:45 +09:00
Janne Grunau
4965a954e2 m1n1.fw.dcp.ipc: Add D129 - allocate_bandwidth
Used on M2 Ultra with OS DCP firmware 13.5.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:33:45 +09:00
Janne Grunau
8e5788123f m1n1.fw.dcp.ipc: Clearly mark unknown Calls/Callbacks
Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:33:45 +09:00
Janne Grunau
a823c311ab m1n1.fw.dcp.ipc: Add support for the macOS 13.3 firmware
Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:33:45 +09:00
Janne Grunau
c159c5bbfd m1n1/fw/dcp/parse_log: Parse firmware version from log
Incomplete, needs to reload fw.dcp.ipc.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:33:45 +09:00
Janne Grunau
635e046d56 m1n1.fw.dcp: Parse AVPropChunks in parse_log
Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:33:45 +09:00
Janne Grunau
faec98b10c m1n1.constructutils: Add 13.5 firmware symbol
Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:33:45 +09:00
Janne Grunau
7e5d12d33e kboot: disable touchbar on missing calibration data
There is at least on Macbook Pro (M1, 13-inch) with missing
"multi-touch-calibration" in the ADT. Disabling the device as error
handling instead of refusing to boot the kernel.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-09-20 22:32:56 +09:00
Mark Kettenis
ea64e7bda4 m1n1.asm: make it work again on OpenBSD
Using llvm from ports.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2023-09-07 19:19:38 +09:00
Hector Martin
24a3a0d962 kboot: Move MCC cache enable to kboot
Following the general "do more in stage2/kboot, do less in stage1/proxy"
rule. In case something goes wrong here we want to be able to fix it in
stage2.

Thanks to the stupid bug, the past year+ of stage1 installs has had this
codepath disabled, so that works well with this change.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-09-05 23:33:19 +09:00
Hector Martin
655299382d mcc: Initialize cache_disable for t60xx
Shouldn't matter since this should be zero-initialized anyway, but
clearer.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-09-04 03:51:31 +09:00
Hector Martin
99e659ae01 mcc: Add missing cache disable reg (?) for t8112
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-09-04 03:24:03 +09:00
Hector Martin
0ec145974a mcc: Fix for t602x
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-09-04 02:43:25 +09:00
Hector Martin
1d2b8f91f6 mcc: Actually enable the caches.
That was dumb.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-09-04 01:08:23 +09:00
Hector Martin
00099452cb kboot: Fix missing newlines
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-08-24 20:20:56 +09:00
Hector Martin
6d0979e71e m1n1.adt: Decode apcie tunables
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-08-21 23:16:08 +09:00
Hector Martin
8ca5d671ad sio: Fix error paths
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-08-21 14:00:33 +09:00
Martin Povišer
6a61c001d2 clk: Set up LEAP/PDM clocks
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-21 00:17:27 +09:00
Martin Povišer
f7824561af afk: Add missing wptr wraparound
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:57:12 +09:00
Martin Povišer
264e18169f afk: Fix ringbuf space checks in afk_epic_tx
Redo the checks to make sure we never cause rptr==wptr, because that
signifies an empty buffer, not a full one.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:57:12 +09:00
Martin Povišer
07ea5a92c3 afk: Fix edge case in ringbuf pointer assert
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:57:12 +09:00
Martin Povišer
fd0ae3663a afk: Drop stray 'rptr' field
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:57:12 +09:00
Martin Povišer
526f81f51e m1n1.hw.codecs: Add iMac codec
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:50:09 +09:00
Martin Povišer
d29df8e69b sio: Use 'FDT' in prints consistently
Both 'DT:' and 'FDT:' are in use as prefices in prints that relate to
the non-Apple devicetree. Put in 'FDT:' everywhere for consistence.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
8f8c3f903d kboot: Look up SIO by alias
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
1ba260c090 sio: Add missing exit on bad ADT data
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
94cf41e124 kboot: Postpone setting of /memory
Postpone the setting of the /memory node so that any allocations made
in course of the devicetree prep (e.g. the SIO reservations allocated
from the top of memory) are reflected in the usable memory span that's
set on the /memory node.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
9f12d5b3ff sio: Move to 'copy rules'
Summarize the preparation of SIO firmware data in a table of 'copy
rules'.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
8824bd2dbf sio: Allocate from top of memory
Place the firmware data we are preparing at the top of memory.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
fa820a7164 display: Factor out top of memory allocation
Move it into utils.c before we reuse it for SIO data.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
731f1c4761 kboot: Fix dt_device_set_reserved_mem error print
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
39f4919fc1 sio: Set up auxiliary SIO data in FDT
On kboot, parse the ADT for SIO firmware parameters, set up the expected
data structures for SIO consumption in reserved memory, and pass those
in properties of the SIO FDT node.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
44f65b1875 kboot: Make filling in of memory-region-names optional
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
9ccef6b8bd kboot: Split dt_device_set_reserved_mem
Make dt_device_set_reserved_mem take in an explicit iova instead of
reading it off from a DART. Add a separate 'from_dart' variety of the
function for getting the iova from DART.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
aa64faba4b kboot: Reserve SIO firmware
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
8be10f5fa9 kboot: Add dt_reserve_asc_firmware
The new function parses ADT's segment-ranges and builds up nodes in
/reserved-memory representing the appropriate physical and device
address spans. This is to describe the memory placement of ASC firmware.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Asahi Lina
925fe72b0b src/hv_vm: Fix some instruction emulations
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-08-17 19:46:07 +09:00
Asahi Lina
37ad9f7df6 m1n1.fw.dcp.ipc: Fix assert
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-08-17 19:46:07 +09:00
Asahi Lina
31da584be8 m1n1.fw.agx: Helpers everywhere!
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-08-17 19:46:07 +09:00
Asahi Lina
7f94c7f39a tools.chainload.py: Fixes for 13.5
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-08-17 19:46:07 +09:00
Asahi Lina
5a389fe87b kboot_gpu: Add another pwcalc difference for T602x
This doesn't make any sense... M2 Ultra should be 2x M2 Max, so there's
no reason for this constant to be different.

I get the feeling Apple messed this one up too...

Also clean up some other constants.

Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-08-17 19:46:07 +09:00