362 points · by easton · 5y ago · 74 comments
For example: determining that interrupts were being routed to FIQ. It's unclear how one would have figured that was occurring. Or that there was an special AIC (apple interrupt controller) that needed talking to, and how to talk to it. It feels like there's a lot of "reverse engineer some Apple kernel bits" that's potentially being elided over.
Edit: or alternately, some debug interface that isn't being mentioned (swd/jtag/itm).
EDIT: In fact, it might not even be that. It doesn't exactly make commercial sense for a company whose entire existence is based on their extensive IP knowledge of apple hardware to post every detail publicly for others to copy. They are a for profit organization after all.
Apple are literally suing Corellium.
You know the macOS kernel for M1 hardware is open source, right? This stuff isn't exactly a proprietary secret.
You're not kidding. This is more of a flex than an explanation.
#!/bin/sh
bputil -d | grep "CustomerKC" | grep -v "absent"
KC=$?
if [ $KC -eq 1 ]
then
bputil -n -k -c -a -s
csrutil disable
csrutil authenticated-root disable
fi
cd /Volumes/Preboot
curl https://$LONGURL/linux.macho > linux.macho
kmutil configure-boot -c linux.macho -v /Volumes/Macintosh\ HD/
echo "Kernel installed. Please reboot";
So, it looks like they download their pre-compiled kernel onto a Preboot volume. This is then set as the booting kernel? How long until there is a grub-like option?I should add -- I don't know what most of these commands are. It would probably be helpful if they had spelled these out more, but this is all a great place to start.
bputil - Utility to precisely modify the security settings on Apple Silicon Macs.
csrutil - Configure System Integrity Protection (SIP)
kmutil - replaces kextload, kextunload, and other earlier tools for loading and managing kexts
This hopefully means more of the efforts going into Marcan's projects can be spent on higher lever things like getting the GPU, Power management and other important bits working well.
This seems like quite a nice gesture after the bit of drama that apparently happened (and made corellium look bad, imo).
I hope that eventually they're not going to duplicates effort as much as they likely are now, but then again it seems like Marcan thinks that their approach (with "insider knowledge") is an inherent risk to the project's legality.
With or without Corellium Asahi will eventually get there, though, and they're pretty certainly the ones who will make the GPU work (thanks to the amazing Alyssa Rosenzweig of Panfrost fame).
Secondly, the fact that they are able to dig into this much depth bodes well for competitors to reverse engineer similar performance into other platforms
Unless a competitor controls and owns their supply chain like Apple does, I don't see how they can compete; they need those "established norms" otherwise they won't be able to find commodities that work with their final product.
It'll be interesting to see if any other players try to move back to this style in the desktop/laptop PC space.
Then again it could all go horribly wrong and leave us with nothing but highly locked-down terminals suitable only for connection to our glorious cloud masters.
It's possible. I wouldn't necessarily bet on it, but it's possible.
Qualcomm is just licensing ARM's standard core designs. If I were a PC OEM, designing your own custom silicon around the ARM core might be tempting, if it allows you to better differentiate your product.
My machines aren't that old, and I'm fairly certain that is the case in both of them. In fact, I'm thinking about upgrading my working memory on one of them looking at the 50% indicator at my screen right now for what is only having 12 tabs open in a web browser and not doing much other heavy lifting.
There are certainly "old" peripherals in the SoC (the UART comes to mind). There's probably not a lot of norm-busting in this,
There are certainly "non-standard" peripherals in the SoC (if by "non-standard" you mean "nobody else has them"). As the article notes, many if not most other folks "just" check off a couple dozen boxes on the ARM PrimeCell Shopping List (plus a few 3p vendors) and stack the resulting blobs together.
Going your own way and building major components yourself (and all of the major components, including the fabric / interconnects) is very definitely not the "norm".
Also they seem to be booting Ubuntu off of a USB stick, so it's possible that they haven't figured out how to support the internal storage yet, let alone things like audio, suspend/resume, ethernet/WiFi, keyboard/trackpad (for the laptops), etc. So those things would either come up completely shut down (and give you better power stats than you'd expect under normal usage), or come up active, and possibly not have power management enabled at all, killing your battery.
Edit: looks like in the last half-day they've just figured out PCIe, the USB-A port, and ethernet: https://twitter.com/cmwdotme/status/1352361874076164098?s=21
Pretty recently read that Linus was wanting to run Linux on new Macbook Air with M1, but he though it would be too much of a pain in the ass. I imagine we will see it soon.
It sounds like they were well prepared. More and more I see preparation as make or break for engineering success, not budget or talent or tech, but silent persistence.
But things like their SMP bringup process, the AIC, using FIQs to deliver interrupts, etc. are things that Apple is doing that's not what most ARM SoC vendors do.
No keyboard, no trackpad, no GPU drivers (besides an unaccelerated framebuffer, setup and left by iBoot). There's some indication of Wi-Fi support, as it's a Broadcom FullMAC device (brcmfmac on Linux). But yeah, I'd say unusable without a USB hub and a myriad of external devices. Again, said as much in the article.
https://twitter.com/cmwdotme/status/1352361874076164098?s=21
* A single USB type-C port * Software video framebuffer
That's about it lol. You can't even use the internal disk at present moment.