News for hackers. Stuff that matters.
Re:Reverse Engineering the M1 [pdf] by svenpeter on Friday August 06, 2021 @03:18AM (#28084197)
NVMe requires a co-processor (which Apple calls "ANS") to be up and running before it works. This co-processor firmware seems to have a lot of code and strings dealing with PCIe. Now I haven't looked at the firmware in detail but I'm willing to bet that the actual drives are on a PCIe bus (or at least used to be on a PCIe bus on previous hardware).

It's just that this bus is not exposed to the main CPU but only to this co-processor instead. The co-processor then seems to emulate (or maybe it's just a passthrough) a relatively standard NVMe MMIO space.

Re:Reverse Engineering the M1 [pdf] by marcan_42 on Friday August 06, 2021 @07:04AM (#28085507)
Yes, the raw NAND storage modules are connected over PCIe on all M1 machines, to dedicated root ports that are behind ANS. As far as I can tell ANS implements (parts of?) the FTL and data striping and other high-level features, and effectively RAIDs together the underlying storage modules into a single unified NVMe interface. So in this sense, the PCIe here is just an implementation detail, the physical/logical interface Apple chose to connect its Flash modules to the built-in non-volatile storage controller in the M1.
Re:Reverse Engineering the M1 [pdf] by svenpeter on Friday August 06, 2021 @08:20AM (#28086126)
Ah, that makes a lot of sense. Then this unified MMIO NVMe is "just" emulated inside ANS.
Re:Reverse Engineering the M1 [pdf] by monocasa on Friday August 06, 2021 @06:27PM (#28093506)
Are there any plans to replace the Apple firmware for ANS as well, or is that so locked down with signature checks that we can't expect to be able to?