Commit graph

2104 commits

Author SHA1 Message Date
Hector Martin
8cf0df0553 utils_asm: Save/restore CYC_OVRD register
This keeps the previous WFI setting instead of unconditionally flipping
to 3 then back to 2.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-18 21:55:12 +09:00
Hector Martin
b067f26971 cpu_regs.h: Add ACC_OVRD register
Not used yet, but might be in the future.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-18 21:55:12 +09:00
Hector Martin
cbd9b7b9e1 main, kboot: Move tunables/cpufreq/clk from main to kboot
I already screwed something up in cpufreq, and it makes it difficult to
understand what happened if it happens in stage1 before the proxy runs,
and difficult to undo in stage2.

Let's move all this stuff to kboot, since it isn't necessary until then
(and this will also avoid doing unnecessary init for macOS under the
HV). If we need it in proxy scripts, we can add proxy commands for this
later.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-18 21:55:12 +09:00
Hector Martin
145d39092f cpufreq: Fix a dumb bug and drop the DESIRED2 field
I don't think that field ever did anything and Apple don't set it on
newer macOS/SoCs. Also expand DESIRED1 to T602x width.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-18 20:45:10 +09:00
Hector Martin
b2a479f1bf chickens: Enable NEX power gating on P-cores
It seems we missed this config all along.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-18 20:45:10 +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
Janne Grunau
1ae27426b3 kboot: Transfer touchbar calibration for t8112-j493
Signed-off-by: Janne Grunau <j@jannau.net>
2023-04-17 20:39:19 +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
46043704da rtkit: Drop oslog support
Nobody can figure out where this code came from and it's broken for
devices where OSLog is actually implemented these days... let's drop it
and see if anything complains.

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
Mark Kettenis
91ff36b277 kboot: Make missing iommu mappings non-fatal
Fixes: 21dc622735 ("kboot: Transfer display related memory carveouts to device tree")

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2023-04-15 13:22:14 +09:00
Hector Martin
06b88f14d2 dart: Detect locked t8110 DARTs
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-12 00:40:06 +09:00
Janne Grunau
2b2dd9ae89 kboot: Add DCP reserved mem support for t602x
Signed-off-by: Janne Grunau <j@jannau.net>
2023-04-12 00:40:06 +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
83513c36a3 nvme: Add nvme_ensure_shutdown()
We're not using it in the end because we fixed this in Linux, but I went
through the trouble of writing the function so we might as well leave it
lying around.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-12 00:40:06 +09:00
Hector Martin
c2c0ac04aa pcie: Add initial t602x support
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-12 00:40:06 +09:00
Hector Martin
046620d4d5 pmgr: Add pmgr_adt_power_{en,dis}able_index()
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-10 01:06:05 +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
41aac76fff Bring T6020 support up to parity with T6021
Missing smp/cpufreq/soc stuff.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-09 21:05:50 +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
Hector Martin
dabad98d6e smp: Bump MAX_CPUS to 24
Needed for (presumed) M2 Ultra.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-09 20:37:56 +09:00
Hector Martin
481f662271 hv_vm: Fix CTRR hugepage issue
This is the hypervisor counterpart to da9ceddeac.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-09 19:46:13 +09:00
Hector Martin
2389fa9d3d m1n1.adt: Fix parsing of template ADTs
Adding the speaker calibration stuff broke it because we try to parse
template values as real values. Don't do that.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-09 19:46:13 +09:00
Hector Martin
fe104d3848 m1n1.hv: Also hook ATC_AON device
It seems 13.2 is messing with this now.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-09 19:46:13 +09:00
Hector Martin
795211c534 m1n1.fw.dcp.ipc: More fields
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-09 19:46:13 +09:00
Mario Hros
2f96635420 mcc: Reuse existing T6000 impl for T6020
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 19:46:13 +09:00
Mario Hros
693ebbae2b m1n1.hv: Support T6021 cpustart offset
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 19:46:13 +09:00
Mario Hros
049bc64e36 smp: Add T6021 CPU start offset
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 19:46:13 +09:00
Mario Hros
da03138eec cpufreq: Add T6021 clusters
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 19:46:13 +09:00
Mario Hros
69012c0702 experiments/cpu_pstate_latencies.py: Extend for T6021
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 19:46:12 +09:00
Mario Hros
e71ad13474 chickens: Add preliminary T6020 support
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 19:46:12 +09:00
Mario Hros
afb68db34c chickens: Force nonspec for rev 0x0 of Avalanche
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 19:46:12 +09:00
Mario Hros
2e040a6729 chickens: Add T6021 chickens
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 17:56:01 +09:00
Mario Hros
d033044a80 soc: Add T6021 defines
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 17:56:01 +09:00
Mario Hros
34f49a56fc nvme: assume die 0 if clock-gates not set
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 17:56:01 +09:00
Asahi Lina
8bf08b0ff1 linux.py: Implement TSO
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-03-28 19:06:20 +09:00
Asahi Lina
fa3dcd3e77 payload: Add tso=1 m1n1 option to enable TSO
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-03-28 19:06:20 +09:00
Asahi Lina
0a05a0171e proxy: Add smp_is_alive() thunk
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-03-28 19:06:20 +09:00
Eileen Yoon
4a679b12bd tunables_static: improve sequence iter
Signed-off-by: Eileen Yoon <eyn@gmx.com>
2023-03-28 17:19:45 +09:00
Eileen Yoon
2abf3af38e tunables_static: add t8103 ane tunables
Signed-off-by: Eileen Yoon <eyn@gmx.com>
2023-03-28 17:19:45 +09:00
Eileen Yoon
cf09e4ff56 tunables_static: abstraction to reuse entries
Signed-off-by: Eileen Yoon <eyn@gmx.com>
2023-03-28 17:19:45 +09:00
Eileen Yoon
6ce14d8735 m1n1/ane: Initial commit
Signed-off-by: Eileen Yoon <eyn@gmx.com>
2023-03-28 17:10:15 +09:00
Hector Martin
a633b90634 kboot: Remove leftover IPD lookup dead code
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-03-19 20:30:01 +09:00
Hector Martin
a024101b75 kboot: Pass keyboard layout ID & country code in HID device
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-03-19 18:14:44 +09:00