0

My NVMe driver works fine in macOS 10.15, but in macOS 11.0, it won't be loaded when the system boots up. I knew my driver is installed to auxiliary kext collection. when the macOS11 boot, the system always load applenvme driver in Boot Kernel Collection. How to make the system load my kext instead of applenvme kext at startup?

pmdj
  • 22,018
  • 3
  • 52
  • 103
Song
  • 97
  • 7

1 Answers1

1

Unfortunately, it is not possible to "win" IOKit matching against Apple's own kexts during early boot with macOS 11. The auxiliary collection is not considered for matching during that early phase, and by the time the system has progressed far enough to load auxiliary kexts, the Apple kext is already driving the device.

I recommend filing a bug with Apple about this behaviour.

pmdj
  • 22,018
  • 3
  • 52
  • 103
  • Therefore, any driver that conflicts with the system's built-in driver will not be loaded at startup. I build a partition scheme driver, match the whole Disk IOMedia with GUID partition, also not load. – Song Jan 18 '22 at 01:35
  • 1
    Yes, as IOMedia matches are part of IOKit matching, they'll suffer from the same problem. I don't have a good general solution to this, unfortunately. In some cases, IOKit objects support more than one client object, so you can add yourself to it. This is quite rare though, and certainly doesn't work for bus-level nodes such as `IOPCIDevice` or `IOUSBHostDevice`, and it also doesn't work for *replacing* Apple kext functionality. – pmdj Jan 21 '22 at 14:40
  • Thank you , I tried remove "IOMatchCategory" property, both our driver and apple driver load at boot, Although this is not what I expected。 I will submit a "Code-Level Support" request today, Let's see how apple responds. – Song Jan 28 '22 at 02:57