Jump to content

Patch for using NVMe under macOS Sierra is ready.


1,382 posts in this topic

Recommended Posts

Does a new patch needs to be generated on each build or can the 10.12.1 patch be used for any upcoming releases at least temporary until the new patch is applied? Is it better to stay on 10.11.6 for a while to avoid these patches?

 

Would the process be... create new patch > put on folder > reboot and test > update osx?

Impossible to predict the future, but in the past we have been able to use old patched kexts with new versions for short time before a new patched kext can be generated.

 

Updates get tricky due to crashes caused by having both the patched kext and unpatched kext present.

My strategy is to prepare new patches and place them in KextsToPatch prior to updates, such that I have both patches available (for old kext and new kext), by using MatchOS correctly...

Then the update can be done without the patched kext installed (removed).

I don't trust KextsToPatch for something this critical, so after the update, I prepare new HackrNVMeFamily and remove IONVMeFamily.

If I can find a reliable method to disable IONVMeFamily instead of deleting it, I'll let y'all know.

i'm downloading the new version of 10.12.1

but whats my real problem is that no matter which nvme patched kext i install

all didn't work and shows neither of them is loaded by terminal command kextstat

can anyone help

No hardware details.

No details on what exactly you're doing.

No idea.

Link to comment
Share on other sites

Impossible to predict the future, but in the past we have been able to use old patched kexts with new versions for short time before a new patched kext can be generated.Updates get tricky due to crashes caused by having both the patched kext and unpatched kext present.My strategy is to prepare new patches and place them in KextsToPatch prior to updates, such that I have both patches available (for old kext and new kext), by using MatchOS correctly...Then the update can be done without the patched kext installed (removed).I don't trust KextsToPatch for something this critical, so after the update, I prepare new HackrNVMeFamily and remove IONVMeFamily.If I can find a reliable method to disable IONVMeFamily instead of deleting it, I'll let y'all know.No hardware details.No details on what exactly you're doing.No idea.

Here is my hardware details

XiaoXin Air13 Pro / Ideapad 710s plus

I7 6500u HD520/940MX

8GB ddr4

256GB nvme ssd (pm951)

 

And what I had tried is downloaded a sierra 10.12.1 from VMware OS X and create installer by [url="http://www.insanelymac.com/forum/topic/279450-why-insanelymac-does-not-support-tonymacx86/"]#####[/url] from tonymacosx or Pandora's box or terminal command

After installer had been created , I put a kextstopatch script in clover config.plist and boot into it

But my ssd not showing up

 

Then I tried to put IONVMeFamily.kext from this post to clover kext/other folder and reboot

Still can't see anything

 

So I try to install sierra to my external Hard disk first and hope I could install the patched IONVMeFamily.kext through kext wizard

Installation is perfect but after I install the kext by kext wizard and restart

No NVME ssd showing up

 

So I have tried different nvme kext patch like Hackrnvmefamily.kext(generate after install sierra on external HDD), IONVMeFamilBorg.kext by NVMeP. But none of them were working, my shyly SSD just never shown up in disk utility.

 

So I have a deep look of whether the nvme kext I installed is loaded by command kextstat or kext wizard

And no matter which kext I used, they won't load after the boot

 

When I try to manually load the kext by kextload , it load but disk utility still don't show my disk, seems not refreshed.

Then when I have a reboot, boom! That NVMe kext still not loaded

 

No matter which patch I use, the result always the same, I have tried to remove the vanilla IONVmeFamil.kext and still not working at all.

So I wonder if any one cool here can help me solve this annoying problems

Thx

Link to comment
Share on other sites

Here is my hardware details

XiaoXin Air13 Pro / Ideapad 710s plus

I7 6500u HD520/940MX

8GB ddr4

256GB nvme ssd (pm951)

 

And what I had tried is downloaded a sierra 10.12.1 from VMware OS X and create installer by ##### from tonymacosx or Pandora's box or terminal command

After installer had been created , I put a kextstopatch script in clover config.plist and boot into it

But my ssd not showing up

 

Then I tried to put IONVMeFamily.kext from this post to clover kext/other folder and reboot

Still can't see anything

 

So I try to install sierra to my external Hard disk first and hope I could install the patched IONVMeFamily.kext through kext wizard

Installation is perfect but after I install the kext by kext wizard and restart

No NVME ssd showing up

 

So I have tried different nvme kext patch like Hackrnvmefamily.kext(generate after install sierra on external HDD), IONVMeFamilBorg.kext by NVMeP. But none of them were working, my shyly SSD just never shown up in disk utility.

 

So I have a deep look of whether the nvme kext I installed is loaded by command kextstat or kext wizard

And no matter which kext I used, they won't load after the boot

 

When I try to manually load the kext by kextload , it load but disk utility still don't show my disk, seems not refreshed.

Then when I have a reboot, boom! That NVMe kext still not loaded

 

No matter which patch I use, the result always the same, I have tried to remove the vanilla IONVmeFamil.kext and still not working at all.

So I wonder if any one cool here can help me solve this annoying problems

Thx

For installation:

- create USB on real hardware, not VM

- use the patches from NVMe_patches_10_12_1.plist (copy/paste to your own config.plist)

- place vanilla IONVMeFamily.kext (from 10.12.1) in EFI/Clover/kexts/Other (or use ForceKextsToLoad)

- make sure other EFI/Clover/kext directories are deleted

- make sure you're injecting kexts

Link to comment
Share on other sites

For installation:- create USB on real hardware, not VM- use the patches from NVMe_patches_10_12_1.plist (copy/paste to your own config.plist)- place vanilla IONVMeFamily.kext (from 10.12.1) in EFI/Clover/kexts/Other (or use ForceKextsToLoad)- make sure other EFI/Clover/kext directories are deleted- make sure you're injecting kexts

So I had completely follow your steps to create an install USB

But when I boot into that USB still can't find my NVMe ssd from disk utility there

So what else I can do

Is that my config.plist got problem?(config.plist attached)

 

and i also tried to install on external hard disk first and reboot

nothing happen

 

then i remove vanilla IONVMeFamily.kext from other and reboot

still not work

 

lastly i generate HackrNVMeFamily-10_12_1.kext and install it with kext wizard

then remove all patches from config.plist and reboot

nothing appear

 

and none of the above methods shows the kext i used is loaded after reboot (check with kext wizard)

config.plist.zip

Link to comment
Share on other sites

So I had completely follow your steps to create an install USB

But when I boot into that USB still can't find my NVMe ssd from disk utility there

So what else I can do

Is that my config.plist got problem?(config.plist attached)

 

and i also tried to install on external hard disk first and reboot

nothing happen

 

then i remove vanilla IONVMeFamily.kext from other and reboot

still not work

 

lastly i generate HackrNVMeFamily-10_12_1.kext and install it with kext wizard

then remove all patches from config.plist and reboot

nothing appear

 

and none of the above methods shows the kext i used is loaded after reboot (check with kext wizard)

Not possible to verify correctly configured EFI/Clover without seeing entire EFI/Clover.

Link to comment
Share on other sites

Not possible to verify correctly configured EFI/Clover without seeing entire EFI/Clover.

My configuration of hardwares:

MB: Asus Z87 Deluxe/Dual

M2 NVMe SSD: Plextor M8Pe 256GB

NVMe Controller: Marvell 88SS 1093 (Ven_14A4 & Dev_22F1)

 

HackrNVMeFamily-10_12_1.kext was successfully patched without error and loaded, but still no working NVMe device shown.

DevID has been edited too.

Does it mean this model of M2 NVMe not supported yet ?

 

Because the similar issue in 10.11.6 (16B2657) too !

For Asus Z77 MB at 10.11.6 got diffent findings:

HackrNVMeFamily-10_11_6.kext can be loaded and shown as PCI->Express Card (Not Loaded),

at 10.12.1(16B2657) showed a little difference: PCI->Express Card (Loaded),but still not working yet!

 

For Asus Z97 MB both HackrNVMeFamily.kexts not loaded at all !

post-70188-0-32482000-1479612277_thumb.png

post-70188-0-23796300-1479612298_thumb.png

post-70188-0-68406800-1479612309_thumb.png

post-70188-0-78104400-1479612321_thumb.png

Jin-Shin’s MacBook Pro.zip

patch_nvme.sh.zip

config.plist.zip

post-70188-0-68549400-1479621475_thumb.png

post-70188-0-60643000-1479621493_thumb.png

post-70188-0-18278000-1479622932_thumb.png

Link to comment
Share on other sites

My configuration of hardwares:

MB: Asus Z87 Deluxe/Dual

M2 NVMe SSD: Plextor M8Pe 256GB

NVMe Controller: Marvell 88SS 1093 (Ven_14A4 & Dev_22F1)

 

HackrNVMeFamily-10_12_1.kext was successfully patched without error and loaded, but still no working NVMe device shown.

DevID has been edited too.

Does it mean this model of M2 NVMe not supported yet ?

 

Because the similar issue in 10.11.6 (16B2657) too !

For Asus Z77 MB at 10.11.6 got diffent findings:

HackrNVMeFamily-10_11_6.kext can be loaded and shown as PCI->Express Card (Not Loaded),

at 10.12.1(16B2657) showed a little difference: PCI->Express Card (Loaded),but still not working yet!

 

For Asus Z97 MB both HackrNVMeFamily.kexts not loaded at all !

The ioreg is corrupt. Use only IORegistryExplorer v2.1 for ioreg capture.

 

Also, you didn't attach what was requested: EFI/Clover.

  • Like 1
Link to comment
Share on other sites

Of course, it is only a matter of choice, both versions can be used for the same purpose, but if you're with a short time and the version 2.1 is faster, you are free to use it.

sorry for the Off Topic, guys!

IORegistryExplorer v3.x is super slow when it comes to large data properties.

Try to view the properties in IODeviceTree:/efi/platform, for example.

It is excruciatingly slow (essentially useless).

 

Since I usually have to look at a Clover bootlog by extracting it from ioreg (and that is where it is stored in ioreg)... a v3 ioreg becomes useless.

Link to comment
Share on other sites

The ioreg is corrupt. Use only IORegistryExplorer v2.1 for ioreg capture.

 

Also, you didn't attach what was requested: EFI/Clover.

Please check the following attached files (CLOVER.zip was splited by Split&Concat 3.0 due to file size > 10 MB) incluing IORegistryExplorer 2.1 output

Please rename CLOVER.zip.001.zip to CLOVER.zip.001 before Join with CLOVER.zip.002

 

Jin-Shin’s MacBook Pro.zip

CLOVER.zip.001.zip

CLOVER.zip.002.zip

Link to comment
Share on other sites

Please check the following attached files (CLOVER.zip was splited by Split&Concat 3.0 due to file size > 10 MB) incluing IORegistryExplorer 2.1 output

Please rename CLOVER.zip.001.zip to CLOVER.zip.001 before Join with CLOVER.zip.002

EFI/Clover without themes as ZIP should be under 5MB.

I'm just wondering what the md5 sum is of the HackrNVMeFamily binary.

In the ioreg you can see it partially loaded...

I suspect partial patch or incompatibility of hardware with Pike's patches.

  • Like 1
Link to comment
Share on other sites

EFI/Clover without themes as ZIP should be under 5MB.

I'm just wondering what the md5 sum is of the HackrNVMeFamily binary.

In the ioreg you can see it partially loaded...

I suspect partial patch or incompatibility of hardware with Pike's patches.

Thanks a lot for your prompt reply.

So, what can I do to fix it further ?

MD5:291b7e63764598ac8052c8a363964cb8 for HackrNVMeFamily binary

Without theme was attached again

CLOVER.zip

Link to comment
Share on other sites

Thanks a lot for your prompt reply.

So, what can I do to fix it further ?

MD5:291b7e63764598ac8052c8a363964cb8 for HackrNVMeFamily binary

Without theme was attached again

It is the correct md5 for patched 10.12.1.

It works with my Samsung 950 NVMe.

Must be a compatibility problem with your specific device.

  • Like 1
Link to comment
Share on other sites

Hello Racer, by its config of JSL , I do not see the patches PatchedMD5 and VanillaMD5...have you see?

Those entries are not for config.plist.

 

--

 

FYI...

 

I managed to come up with a method that allows vanilla IONVMeFamily.kext to co-exist with HackrNVMeFamily*.kext.

The trick is to spoof the class-code such that IONVMeFamily.kext IOPCIClassMatch doesn't match.

 

Two steps:

- inject non-standard "class-code" so that IONVMeFamily.kext doesn't load

- change IOPCIClassMatch in HackrNVMeFamily*.kext Info.plist

 

To inject a bogus class-code, I used ACPI (an SSDT). In order to do this, you must know the path of your SSD in PCI0.

On my NUC6i7KYK, it is at _SB.PCI0.RP13.PXSX (it will vary depending on computer, ACPI details, and the slot you have it plugged into).

 

You can determine the ACPI path by looking at ioreg, or you can even determine it with Windows Device Manager:

post-1031260-0-50712400-1479777087_thumb.png

 

So, this SSDT works to inject a non-standard class-code:

// Inject bogus class code for NVMe SSD so that native IONVMeFamily.kext does not load
DefinitionBlock("", "SSDT", 2, "hack", "NVMe-Pcc", 0)
{
    External(_SB.PCI0.RP13.PXSX, DeviceObj)
    Method(_SB.PCI0.RP13.PXSX._DSM, 4)
    {
        If (!Arg2) { Return (Buffer() { 0x03 } ) }
        Return(Package()
        {
            "class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
        })
    }
}
//EOF
At the point this SSDT is installed, neither HackrNMVeFamily (unmodified from what the script generates) nor IONVMeFamily.kext will load, as the IOPCIClassMatch does not match.

 

We need to change the IOPCIClassMatch in HackrNVMeFamily's Info.plist so it matches the new non-standard "class-code"... 0x0108ff00&0xFFFFFF00

 

If you were looking at the plist in a text editor:

			<key>IOPCIClassMatch</key>
			<string>0x0108ff00&0xFFFFFF00</string>
And as seen in Xcode:

post-1031260-0-54184000-1479754708_thumb.png

 

You can use the same method during installation or post-installation, and it allows you to "hold out longer" with regard to patching IONVMeFamily when you do updates.

 

It is also possible to use config.plist/Devices/Arbitrary to inject the bogus class-code.

 

In Clover you can press F2 to get preboot.log (in EFI/Clover/misc/preboot.log). This is how to determine the required PciAddr data.

For example on my NUC6i7KYK:

0:100  0:000  === [ GetDevices ] ========================================
0:100  0:000  PCI (00|00:00.00) : 8086 1910 class=060000
0:100  0:000  PCI (00|00:02.00) : 8086 193B class=030000
0:100  0:000   - GFX: Model=Intel Iris Graphics P580 (Intel)
0:100  0:000  PCI (00|00:08.00) : 8086 1911 class=088000
0:100  0:000  PCI (00|00:14.00) : 8086 A12F class=0C0330
0:100  0:000  PCI (00|00:14.02) : 8086 A131 class=118000
0:100  0:000  PCI (00|00:16.00) : 8086 A13A class=078000
0:100  0:000  PCI (00|00:1D.00) : 8086 A118 class=060400
0:100  0:000  PCI (00|01:00.00) : 144D A801 class=010601
0:100  0:000  PCI (00|00:1D.04) : 8086 A11C class=060400
0:100  0:000  PCI (00|02:00.00) : 144D A802 class=010802
0:100  0:000  PCI (00|00:1F.00) : 8086 A14E class=060100
0:100  0:000  PCI (00|00:1F.02) : 8086 A121 class=058000
0:100  0:000  PCI (00|00:1F.03) : 8086 A170 class=040300
0:100  0:000  PCI (00|00:1F.04) : 8086 A123 class=0C0500
0:100  0:000  PCI (00|00:1F.06) : 8086 15B7 class=020000
You can see the 950 Pro NVMe at PciAddr=02:00.00 (device 144d:a802, note normal NVMe class: 010802).

 

So, in Devices/Arbitrary:

post-1031260-0-99383100-1479758732_thumb.png

 

Keep in mind that when you use Devices/Arbitrary, all normal Clover "automatic" injection is turned off (such as that provided by config.plist/Graphics/Inject), so any such injections must be done manually via ACPI or /Devices/Arbitrary.

 

Here is what ioreg looks like with working class-code injection (either method)...

 

In IOService:

post-1031260-0-06126100-1479840302_thumb.png

 

And in IOACPIPlane:

post-1031260-0-10686500-1479840363_thumb.png

 

Additional note:

- If using the SSDT method, keep in mind the OEM may have provided _DSM methods already at the path you wish to add the new _DSM method. Such methods must be removed or renamed in order to add the _DSM from the SSDT.

- If you have multiple NVMe drives, you must inject the "class-code" property for each of them.

  • Like 7
Link to comment
Share on other sites

@ Racer ...but in your sample on repo you are in config.plist .... so are not essential?

 

I mean patched md5 and vanilla md5

 

I wait

My repo has no config.plist. It has NVMe_patches_*.plist. That data is for the script to be able to compare incoming and outgoing md5 sums.

  • Like 1
Link to comment
Share on other sites

			<key>IOPCIClassMatch</key>
			<string>0x0108ff00&0xFFFFFF00</string>
You can use the same method during installation or post-installation, and it allows you to "hold out longer" with regard to patching IONVMeFamily when you do updates.

 

Racer , sorry you mean this '

That is a correct now ? 

post-410253-0-05973300-1479748325_thumb.png

Link to comment
Share on other sites

Those entries are not for config.plist.

 

--

 

FYI...

 

I managed to come up with a method that allows vanilla IONVMeFamily.kext to co-exist with HackrNVMeFamily*.kext.

The trick is to spoof the class-code such that IONVMeFamily.kext IOPCIClassMatch doesn't match.

 

Two steps:

- inject non-standard "class-code" so that IONVMeFamily.kext doesn't load

- change IOPCIClassMatch in HackrNVMeFamily*.kext Info.plist

 

To inject a bogus class-code, I used ACPI (an SSDT). In order to do this, you must know the path of your SSD in PCI0.

On my NUC6i7KYK, it is at _SB.PCI0.RP13.PXSX (it will vary depending on computer, ACPI details, and the slot you have it plugged into).

 

So, this SSDT works to inject a non-standard class-code:

// Inject bogus class code for NVMe SSD so that native IONVMeFamily.kext does not load
DefinitionBlock("", "SSDT", 2, "hack", "NVMe-Pcc", 0)
{
    External(_SB.PCI0.RP13.PXSX, DeviceObj)
    Method(_SB.PCI0.RP13.PXSX._DSM, 4)
    {
        If (!Arg2) { Return (Buffer() { 0x03 } ) }
        Return(Package()
        {
            "class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
        })
    }
}
//EOF
At the point this SSDT is installed, neither HackrNMVeFamily (unmodified from what the script generates) nor IONVMeFamily.kext will load, as the IOPCIClassMatch does not match.

 

We need to change the IOPCIClassMatch in HackrNVMeFamily's Info.plist so it matches the new non-standard "class-code"... 0x0108ff00&0xFFFFFF00

 

If you were looking at the plist in a text editor:

			<key>IOPCIClassMatch</key>
			<string>0x0108ff00&0xFFFFFF00</string>
You can use the same method during installation or post-installation, and it allows you to "hold out longer" with regard to patching IONVMeFamily when you do updates.

 

@Racer, shouldn't it be "class-code", Buffer() { 0x00,0xff, 0x08, 0x01 }??

Link to comment
Share on other sites

 Share

×
×
  • Create New...