← Back to context

Comment by monocasa

3 years ago

I think there's larger barriers to getting windows running on Apple Silicon that would need to be addressed first.

For one example, Windows ARM kernels are pretty tied to the GIC (ARM's reference interrupt controller), but Apple has its own interrupt controller. Normally on ntoskrnl this distinction would simply need hal.dll swapped out, but I've heard from those who've looked into it that the clean separation has broken down a bit and you'd have to binary patch a windows kernel now if you don't have source access.

hal.dll no longer exists on Windows. It’s just a stub for backwards compat now.

What you can do is having a small hypervisor to simulate the needed bits…

Apple Silicon doesn't use GIC, but uses AIC (Apple Interrupt Controller).

"Apple designed their own interrupt controller, the Apple Interrupt Controller (AIC), not compatible with either of the major ARM GIC standards. And not only that: the timer interrupts - normally connected to a regular per-CPU interrupt on ARM - are instead routed to the FIQ, an abstruse architectural feature, seen more frequently in the old 32-bit ARM days. Naturally, Linux kernel did not support delivering any interrupts via the FIQ path, so we had to add that."

https://news.ycombinator.com/item?id=25862077

TL;DR: No standard ARM interrupt controller, custom controller requires quirky architectural features

  • Yep, that's essentially what my post says.

    My next point was about how the NT kernel was designed to handle exactly this kind of change pretty cleanly, but that clean barrier has been allowed to stagnate. So way back, NT kernels for weird systems like SGI workstations that had x86 CPUs but were decidedly not PCs otherwise simply needed hal.dll swapped out with a version written by the hardware vendor to paper over those system differences like how interrupts are routed around and how to access PCI devices. That's no longer really an option however.

  • Apple silicon doesn't use GIC, but it has some sort of vGIC that I believe the Asahi Linux team is using.