The Forgetful CPU (Linux on M4)(yuka.dev)
260 points by signa11 11 days ago | 194 comments
tl;dr: A developer documents booting mainline Linux on an M4 Mac mini, overcoming hurdles including locked registers (GXF, RVBAR), missing MMU mappings for MMIO, and a virtualization-related CPU register write that crashed the kernel. The biggest challenge was that M4's WFI instruction doesn't preserve CPU state as the ARM64 spec requires, with no chicken bit to disable the behavior; the fix—a new kernel bootarg to NOP out WFI/WFIT instructions—has now been merged upstream in Linux and m1n1, enabling multi-core boot on M4/M4 Pro/Max and M5 chips.
HN Discussion:
  • •Apple's superior hardware would benefit from embracing openness despite bloated macOS
  • ↓Effort is better spent improving x86-64 or open hardware like RISC-V instead
  • •Apple's proprietary protocols (like trackpad gestures) lock out third-party hardware
  • ↓It's contradictory to run open software on hardware from an anti-open company
  • •Curious whether AI could assist with this kind of reverse-engineering work