#
✕ nick:maz
#asahi-dev · 2025-02-14 13:47
mazfor Linux, you probably want to make sure it is all configured the same way from m1n1.
#asahi-dev · 2025-02-14 13:47
mazah, interesting. thanks for the pointer.
#asahi-dev · 2025-02-14 13:44
mazoh, you mean timer frequency?
#asahi-dev · 2025-02-14 13:43
mazreally?
#asahi-dev · 2025-02-12 12:01
mazat this stage, it may be worth moving the FIQ handling to a per-SoC construct in the AIC driver.
#asahi-dev · 2025-02-12 08:26
mazon the other hand, PMUv3 emulation and NV together form a sizeable joke.
#asahi-dev · 2025-02-12 08:26
maznickchan: it should work just fine. guest sees a PMUv3, and the host just emulates the HW the best it can.
#asahi-dev · 2024-11-08 14:55
mazah, first machine to advertise ETS2!
#asahi-dev · 2024-11-08 14:50
mazjannau: is that M4 mini?
#asahi-dev · 2024-11-08 14:00
mazhard to tell. they could have fused it. is there any way to use the UART from macos?
#asahi-dev · 2024-11-08 13:48
mazit could be that they have repurposed the SBU lines for something else.
#asahi-dev · 2024-11-08 13:48
mazjannau: have you tried switching the UART lines to the primary USB, in case that helps (^_1, from memory)?
#asahi-dev · 2024-11-08 13:09
mazas long as m1n1 sticks to 115200, you should be OK (baring bugs in the UART<->USB code).
#asahi-dev · 2024-11-08 13:06
mazor do I have the wrong end of the stick?
#asahi-dev · 2024-11-08 13:06
mazand I suspect you would have to implement the UART speed change side of things, as you don't want to upload something big at 115200.
#asahi-dev · 2024-11-08 13:05
mazthat's how all my devices boot.
#asahi-dev · 2024-11-08 13:04
mazif so, then no, I always used the USB2.0 side of the connection.
#asahi-dev · 2024-11-08 13:04
mazjannau: is that (for example) loading the kernel using the CS UART?
#asahi-dev · 2024-10-10 12:50
maz*logical* CPU0. normally, this should be indirected via the cpu_logical_map array, and that's missing.
#asahi-dev · 2024-10-08 08:56
maznickchan: my comment was about M1+ CPUs, indicating why CMOs don't need to do much.
#asahi-dev · 2024-10-08 08:24
mazmay also snoop non-cacheable accesses.
#asahi-dev · 2024-10-08 08:23
maznickchan: could be related to the fact that recent SoCs don't actually need CMOs to the PoC as all devices are cache coherent.
#asahi-dev · 2024-09-22 10:09
mazwhich is why I don't want this stuff in KVM.
#asahi-dev · 2024-09-22 10:09
maznickchan: from an architecture perspective, that's not an really acceptable posture, because you don't know whether you can context-switch or not.
#asahi-dev · 2024-09-22 09:36
mazlina: as nickchan pointed out, this is hidden away in the XML. however, whether this is implemented or not is not discoverable, making the whole thing utterly useless.
#asahi-dev · 2024-09-16 13:15
mazyou may need a small hack in cpu_logical_map and co though.
#asahi-dev · 2024-09-16 13:13
mazbut this is still doggy as fsck.
#asahi-dev · 2024-09-16 13:13
mazand as long as you don't need to refer to a MPIDR (no GIC, no problem), you should be OK.
#asahi-dev · 2024-09-16 13:12
mazright, that makes it much simpler. you still have the same number of CPUs (half of what the HW has) in the various cpumasks,
#asahi-dev · 2024-09-16 13:10
mazwhat if another CPU sends an IPI to the one that goes down? or are *all* the CPUs switching at the same time?
#asahi-dev · 2024-09-16 13:09
mazthen the cpufreq magic is going to be interesting, because I don't think there is much infrastructure for surprise-removal of CPUs.
#asahi-dev · 2024-09-16 13:07
mazso this effectively appears as CPU hotplug on/off with affinity change?
#asahi-dev · 2024-09-16 13:06
mazand is it MIDR, not MPIDR? -- unless the affinity changes as well?
#asahi-dev · 2024-09-16 13:05
mazthe problem is that you now have multiple MIDRs for the same part -- how do you select an erratum?
#asahi-dev · 2024-09-16 12:58
mazit's not that KVM cares. it's luserspace responsibility to pin the threads to CPUs they care about.
#asahi-dev · 2024-09-16 09:53
mazI wish the author had provided a script...
#asahi-dev · 2024-09-16 09:52
mazjannau: yeah, I had a fun time fixing those.
#asahi-dev · 2024-09-11 08:59
mazwe're not easily offended...:)
#asahi-dev · 2024-09-06 06:50
mazthere is no "msr emulation" to change (there should be none), and all you need to do is make sure that the sanitised view of ID_AA64PFR0_EL1.EL0 returns 64bit only. this is the only change that is needed AFAICT.
#asahi-dev · 2024-09-06 06:48
maznickchan: I don't know what you're talking about, but it looks like you have the wrong end of the stick.
#asahi-dev · 2024-09-05 14:49
maznickchan: that's not my point. if the kernel runs at EL1 and there is no EL2, you can't switch to AArch32 at EL1 (switching ISA is always done by a more privileged EL, Apple CPU or not).
#asahi-dev · 2024-09-05 14:44
maznickchan: right. so you don't even need to hack the EL1 part, and can solely rely EL0 being hidden from the kernel, as you will never run anything AArch32 at EL1.
#asahi-dev · 2024-09-05 14:16
mazdoes your wonderful CPU have EL2?
#asahi-dev · 2024-09-05 14:16
mazhere, you're trying to disable a standard feature rather than flagging a bug that affect a couple of code paths.
#asahi-dev · 2024-09-05 14:14
maznickchan: cpufeatures.c and cpu_errata.c are basically the same thing. I'm at the stage where I consider each new feature as an erratum.
#asahi-dev · 2024-09-05 13:57
maznickchan: I'd expect something along those lines: https://paste.debian.net/1328522/ (completely untested, of course)
#asahi-dev · 2024-09-05 13:43
mazbut that's beside the point. you can only run 32bit once you reach userspace. so this doesn't need to be an early decision, like the E2H0 is.
#asahi-dev · 2024-09-05 13:41
mazs/any/and/
#asahi-dev · 2024-09-05 13:41
mazany can't you just treat 32bit EL0 as an erratum or something along those lines? there is no need to do it early, as the prospect of running a 32bit task is pretty far down the boot process.
#asahi-dev · 2024-09-05 13:40
mazin the end, the MIDR-based early override was a wrong good idea, and I addressed the problem differently.

plus ›