Contribute
Register

[Guide] HackrNVMeFamily co-existence with IONVMeFamily using class-code spoof

Status
Not open for further replies.
What patches are typically needed for High Sierra? Have 2 960 EVO's here. Stability seems ok at the moment, but had some strange crashy behavior at first right after 10.13.6 install / post install. System is booting fine, but getting the following ACPI PXSX related errors at boot (see screenshot)

Also, attached problem reporting files just in case

Only patches necessary for High Sierra are related to Lite-on/Hynix/few others.
You can read about it at the patch-nvme github README.

Your ACPI issues are off-topic here.
 
RehabMan, your guide is amazing!

Using your spoofed method, I have my x99 build booting off a new Samsung 960 Evo!

I have a question regarding using a second NVMe drive though. First let me detail a few things out.

Hardware:
x99eWS/USB3.1
5960x
GTX 960 in PCIe_3
Samsung 960 Evo in M.2 Slot
Intel P3500 in a PCIe riser card in PCIe_1
Booting (for now) from a SATA SSD.

Running 10.12.6.

Using the spoof kext + ssdt method, I had the system recognizing and booting great off the 960 Evo.

When I added the Intel P3500, the system would kernel panic midway through the apple logo load, so I switched back to a standard SSD with no ssdt associated with nvme patching. Once I did that, the system booted and automatically detected the P3500, although it was seen as an external drive. Then I did the following:

1) Use IOreg to find the ACPI path to the Intel P3500. This was tricky because of the PCI switch it is behind.
2) Craft a new nvme-ssdt to inject (code below).
3) Reboot.

However, when I do this, my Samsung 960 Evo goes back to working perfectly, but now the Intel P3500 doesn't show up as a block storage device. I'm confident that I created the nvme-ssdt properly, since the system no longer kernel panics on boot, and since IOreg seems to find both devices just fine. Have I done something wrong?

Code:
DefinitionBlock ("", "SSDT", 2, "hack", "NVMe-Pcc", 0x00000000)
{
    External (_SB_.PCI0.BR1B.H000, DeviceObj)    // (from opcode)
    External (_SB_.PCI0.BR2A.H000, DeviceObj)    // (from opcode)

    Device (_SB.PCI0.BR2A.H000.PBR8)
    {
        Name (_ADR, 0x00080000)  // _ADR: Address
        Device (SSD0)
        {
            Name (_ADR, Zero)  // _ADR: Address
        }
    }

    Method (_SB.PCI0.BR2A.H000.PBR8.SSD0._DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
    {
        If (LNot (Arg2))
        {
            Return (Buffer (One)
            {
                 0x03                                         
            })
        }

        Return (Package (0x04)
        {
            "class-code",
            Buffer (0x04)
            {
                 0xFF, 0x08, 0x01, 0x00                       
            },

            "built-in",
            Buffer (One)
            {
                 0x00                                         
            }
        })
    }

    Method (_SB.PCI0.BR1B.H000._DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
    {
        If (LNot (Arg2))
        {
            Return (Buffer (One)
            {
                 0x03                                         
            })
        }

        Return (Package (0x04)
        {
            "class-code",
            Buffer (0x04)
            {
                 0xFF, 0x08, 0x01, 0x00                       
            },

            "built-in",
            Buffer (One)
            {
                 0x00                                         
            }
        })
    }
}

oOVRLkL
oOVRLkL
24IldjE
Default IOreg1.png Default IOreg2.png hackrnvme spoof1.png hackrnvme spoof2.png
 
RehabMan, your guide is amazing!

Using your spoofed method, I have my x99 build booting off a new Samsung 960 Evo!

I have a question regarding using a second NVMe drive though. First let me detail a few things out.

Hardware:
x99eWS/USB3.1
5960x
GTX 960 in PCIe_3
Samsung 960 Evo in M.2 Slot
Intel P3500 in a PCIe riser card in PCIe_1
Booting (for now) from a SATA SSD.

Running 10.12.6.

Using the spoof kext + ssdt method, I had the system recognizing and booting great off the 960 Evo.

When I added the Intel P3500, the system would kernel panic midway through the apple logo load, so I switched back to a standard SSD with no ssdt associated with nvme patching. Once I did that, the system booted and automatically detected the P3500, although it was seen as an external drive. Then I did the following:

1) Use IOreg to find the ACPI path to the Intel P3500. This was tricky because of the PCI switch it is behind.
2) Craft a new nvme-ssdt to inject (code below).
3) Reboot.

However, when I do this, my Samsung 960 Evo goes back to working perfectly, but now the Intel P3500 doesn't show up as a block storage device. I'm confident that I created the nvme-ssdt properly, since the system no longer kernel panics on boot, and since IOreg seems to find both devices just fine. Have I done something wrong?

Code:
DefinitionBlock ("", "SSDT", 2, "hack", "NVMe-Pcc", 0x00000000)
{
    External (_SB_.PCI0.BR1B.H000, DeviceObj)    // (from opcode)
    External (_SB_.PCI0.BR2A.H000, DeviceObj)    // (from opcode)

    Device (_SB.PCI0.BR2A.H000.PBR8)
    {
        Name (_ADR, 0x00080000)  // _ADR: Address
        Device (SSD0)
        {
            Name (_ADR, Zero)  // _ADR: Address
        }
    }

    Method (_SB.PCI0.BR2A.H000.PBR8.SSD0._DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
    {
        If (LNot (Arg2))
        {
            Return (Buffer (One)
            {
                 0x03                                        
            })
        }

        Return (Package (0x04)
        {
            "class-code",
            Buffer (0x04)
            {
                 0xFF, 0x08, 0x01, 0x00                      
            },

            "built-in",
            Buffer (One)
            {
                 0x00                                        
            }
        })
    }

    Method (_SB.PCI0.BR1B.H000._DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
    {
        If (LNot (Arg2))
        {
            Return (Buffer (One)
            {
                 0x03                                        
            })
        }

        Return (Package (0x04)
        {
            "class-code",
            Buffer (0x04)
            {
                 0xFF, 0x08, 0x01, 0x00                      
            },

            "built-in",
            Buffer (One)
            {
                 0x00                                        
            }
        })
    }
}

oOVRLkL
oOVRLkL
24IldjE
View attachment 350912 View attachment 350913 View attachment 350914 View attachment 350915
No "Problem Reporting" files attached.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Use the gen_debug.sh tool mentioned in the FAQ, that way it is less likely you'll omit something.
 
No "Problem Reporting" files attached.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Use the gen_debug.sh tool mentioned in the FAQ, that way it is less likely you'll omit something.
Thanks for the response RehabMan. I've used the gen_debug.sh tool after using F2/F4 to dump my clover info.
debug_25241.zip was generated WITHOUT the nvme-ssdt being patched and debug_20505.zip was generated with the nvme-ssdt patched.

Thank you so much for the assistance.
 

Attachments

  • debug_25241.zip
    5.4 MB · Views: 103
  • debug_20505.zip
    5.5 MB · Views: 106
Thanks for the response RehabMan. I've used the gen_debug.sh tool after using F2/F4 to dump my clover info.
debug_25241.zip was generated WITHOUT the nvme-ssdt being patched and debug_20505.zip was generated with the nvme-ssdt patched.

Thank you so much for the assistance.

In debug_25241 ioreg (without class-code spoofing), it shows IONVMeController loaded/working on Intel, but not on Samsung.
In debug_20505 ioreg (with class-code spoofing), it shows HackrNVMeController loaded/working on Samsung, but not on Intel.

This implies that your Intel SSD is native 4k LBA, compatible with native IONVMeController, but not HackrNVMeController.
Your Samsung is native 512 byte LBA therefore compatible with HackrNVMeController, but not IONVMeController.

If IONVMeFamily.kext could co-exist with HackrNVMeFamily*.kext, you could simply not do the spoof for Intel, but do it only for Samsung.

Problem is those two kexts cannot co-exist.
Which means you can't use these two SSDs on the same system with Sierra or El Capitan.
(eg. you cannot mix NVMe with different LBA specifications)

You should try High Sierra, or Mojave, which has support for both 4k LBA and 512 byte LBA NVMe devices. No class-code spoofing required, although the SSD work you've already done will help with built-in recognition.
 
In debug_25241 ioreg (without class-code spoofing), it shows IONVMeController loaded/working on Intel, but not on Samsung.
In debug_20505 ioreg (with class-code spoofing), it shows HackrNVMeController loaded/working on Samsung, but not on Intel.

This implies that your Intel SSD is native 4k LBA, compatible with native IONVMeController, but not HackrNVMeController.
Your Samsung is native 512 byte LBA therefore compatible with HackrNVMeController, but not IONVMeController.

If IONVMeFamily.kext could co-exist with HackrNVMeFamily*.kext, you could simply not do the spoof for Intel, but do it only for Samsung.

Problem is those two kexts cannot co-exist.
Which means you can't use these two SSDs on the same system with Sierra or El Capitan.
(eg. you cannot mix NVMe with different LBA specifications)

You should try High Sierra, or Mojave, which has support for both 4k LBA and 512 byte LBA NVMe devices. No class-code spoofing required, although the SSD work you've already done will help with built-in recognition.
Thanks RehabMan,
I can't upgrade to High Sierra until all the software I use is updated and validated for the OS (sadly).

I recall reading on the other hackintosh site that there was some discussion about changing the LBA for the drives. I'm fairly certain that I can do that on the Intel SSD, given that it is an enterprise class drive. If I am able change it to 512 byte, it should work with the HackrNVMeController, yes?

Thank you again for your response.
 
I recall reading on the other hackintosh site that there was some discussion about changing the LBA for the drives. I'm fairly certain that I can do that on the Intel SSD, given that it is an enterprise class drive. If I am able change it to 512 byte, it should work with the HackrNVMeController, yes?

That should help.
 
Thanks for all the guidance RehabMan, my quest for two NVME drives at the same time has been a success! Here were the steps it took to get my Intel P3500 functioning.

1) Throw the drive in a Windows machine.
2) Install the Intel NVMe driver (don't use the Microsoft one!)
3) Install the Intel Datacenter Toolkit
4) Open a command prompt as administrator
Type
Code:
isdct show -a -intelssd
Note the output, you want the index number returned. You can also find "sector size" in this output. In my case, it was 4k, and I wanted 512 to make the drive function with the HackrNVMeController.

You'll need to make sure the drive is void of any partitions then,
Code:
isdct start –intelssd 0 -NVMeFormat LBAformat=0 SecureEraseSetting=0 ProtectionInformation=0 MetaDataSettings=0
Replace the "0" after intelssd with your drive index number.

If you later want to move the drive back to 4k sectors, you'll use the option LBAformat=3 instead of LBAformat=0.
 
Thanks for all the guidance RehabMan, my quest for two NVME drives at the same time has been a success! Here were the steps it took to get my Intel P3500 functioning.

1) Throw the drive in a Windows machine.
2) Install the Intel NVMe driver (don't use the Microsoft one!)
3) Install the Intel Datacenter Toolkit
4) Open a command prompt as administrator
Type
Code:
isdct show -a -intelssd
Note the output, you want the index number returned. You can also find "sector size" in this output. In my case, it was 4k, and I wanted 512 to make the drive function with the HackrNVMeController.

You'll need to make sure the drive is void of any partitions then,
Code:
isdct start –intelssd 0 -NVMeFormat LBAformat=0 SecureEraseSetting=0 ProtectionInformation=0 MetaDataSettings=0
Replace the "0" after intelssd with your drive index number.

If you later want to move the drive back to 4k sectors, you'll use the option LBAformat=3 instead of LBAformat=0.

Good.

You could probably do that low level LBA change in Linux as well.
 
Hi guys, will there be a "NVMe_patches_10_12_6_sec2018-005" ? i would like kindly to request for that.

The Buildnumber is: 16G1618
 
Status
Not open for further replies.
Back
Top