And it turns out it didn't work because it needs firmware loaded at startup.

I know why Apple do it like this though (instead of using onboard Flash like other cards with this chip). It's because it removes the possibility of persistent backdoors. Effectively secure-booted.
This is, of course, the opposite of how the FSF thinks; they'd be happy to say the cards with onboard Flash "respect your freedom" even though they run the exact same blob. They are just less secure, less auditable, and make it harder for you to replace or modify the blob.
The ones with Flash are slightly more convenient though! At least they work out of the box without any special drivers or files (but that has nothing to do with freedom).
Either way, this will of course work out of the box on M1 Macs once I'm done with the install-time firmware copying infrastructure (and once I write a patch to xhci-pci to implement the firmware loading; it already does it for some Renesas chips AIUI).
I also just placed an order for a random PCIe card with the same chip (and Flash), so I can test my changes to make sure I don't break those ;)

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Hector Martin

Hector Martin Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @marcan42

18 Nov
I spent some time playing guess-the-block with the M1 Pro die shot.

Acronyms: Apple Type-C, Apple Video Encoder, Apple ProRes, Apple Neural Engine, Apple Memory Cache Controller, Apple PCIe.
DISPEXT bother me by how large they are, but I can't come up with a better explanation for 2 identical blocks (where M1 Max has 4). The location makes sense too (near ATC), and there is a resemblance to the stuff near DPTX (which would be DISP0). Maybe all the RAM is frame cache?
(Other people have called those "media engine", but that's not a thing; the "media engine" consists of discrete AVE, APR, and AVD blocks, and only AVE and APR are duplicated in the M1 Max, but there's no way e.g. AVE alone is a single massive dual-core monster like that either)
Read 4 tweets
10 Nov
Say hi to an M1 Pro 14" MacBook Pro running KDE Plasma 5 on Arch Linux ARM! Notch compatible!

I made NVMe work today and decided it's time to properly install a distro ;)
No GPU yet, it's all software rendered, but it's seriously smooth for running entirely off of the CPUs!

Also, that total RAM size is 👌
My work-in-progress kernel tree is here (based on linux-next):

github.com/asahilinux/lin…

Still more to come (WiFi, SMC, keyboard/trackpad, etc.), so stay tuned for the streams!

And as always, a huge thanks to all my Patreon and GitHub Sponsors supporters who make this possible!
Read 6 tweets
29 Oct
Got nerdsniped today into reverse engineering the M1's NCOs (numerically controlled oscillators, used for audio sample rates), purely by poking at the registers and measuring the output frequency.

Fun IRC log, for those interested: oftc.irclog.whitequark.org/asahi-dev/2021…
The thing up being quite simple but clever. The main divider is a 2-bit binary counter plus an 11-bit LFSR (because LFSRs are much easier to make meet timing than wide counters), then there's a pair of increment registers driving an accumulator to handle the fractional part.
I particularly didn't want to look at the macOS driver, because this kind of frequency math code is easy to "accidentally copy"; if I can work it out black box style I would much rather do it that way!
Read 7 tweets
19 Oct
A bit of chat on the memory controller on M1. Those of you who watched the past two streams will know a bit of the story, but the TL;DR is that macOS on the M1 dynamically configures DRAM power management to increase performance when the CPUs are busy.
The increase is in terms of latency (i.e. the DRAM takes longer to go into lower power states, so the next access is faster), and it seems to be a very fine grained thing (order of 100s of cycles?). It makes very little difference in most benchmarks (<1% on GeekBench)...
... but I think certain pointer-chasing-heavy workloads, especially single-threaded (since the DRAM is less likely to go to lower power states if all the cores are hammering it anyway), might benefit more.
Read 6 tweets
1 Oct
Just read this article on the iPhone/Apple Silicon AOP and the Find My iPhone feature working during shutdown. It's pretty good, but it confuses a few things (thread)

naehrdine.blogspot.com/2021/09/always…
The iPhone/M1 Always On Processor is not truly "always on". It is active in *sleep mode*, which is why it implements the Hey Siri stuff. Its job is to be a low-power CPU while the main CPU is asleep. It is not on while the system is off.
You can tell, because on Macs the AOP firmware is loaded *as part of OS boot* (AOP.img4 in the Preboot FUD folder). Obviously if it were active while the system is off, that wouldn't make any sense.

Worth noting that it is, of course, signed. Not easy to backdoor.
Read 7 tweets
23 Sep
While investigating a USB hotplug problem on M1 Macs, I stumbled upon eUSB2.

Turns out the USB-IF is *still* adding more cursed dimensions to USB2. Aaaaaaaaaaaaaa /cc @whitequark
So this thing is basically "low-voltage USB2", because 5nm chips cannot do 3.3V I/O voltages. Then you use an external level shifter. Easy, right?

This is a USB spec.

Of course it has a state machine.

Of course it has a configuration protocol.
And it has limitations. If I'm reading this right, M1 Macs can only support 4 chained USB2 (HS) hubs, or *2* chained USB1 (FS/LS) hubs, due to timing limitations introduced by the eUSB repeater. Normal hosts support up to 5 daisy chained hubs in either case.
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Thank you for your support!

Follow Us on Twitter!

:(