- Joined
- Jan 17, 2011
- Messages
- 177
- Motherboard
- Asus Prime Z370-A
- CPU
- i7-8700K
- Graphics
- 2xGTX 980 Ti, 1xGTX 970, UHD 630
- Mobile Phone
Hi beep, can you explain to the unexperienced users step by step how to derive from your/Rehabman's SSDT code for nvme quoted above a fully working SSDT-NVMe-Pcc.aml? Also Rehabman's Guide is not very explicit regarding the individual steps.
Many thanks in advance and cheers!
0. You need to have an OS X running on another drive.
1. Make sure you have the original untouched IONVMeFamily.kext file in S/L/E on system's partition.
2. Download the script from Rehabman's github – https://github.com/RehabMan/patch-nvme
Code:
mkdir ~/Projects && cd Projects
git clone https://github.com/RehabMan/patch-nvme.git patch-nvme.git
cd patch-nvme.git
3. Run it with --spoof parameter eg.
Code:
./patch_nvme.sh --spoof 10_12_3
4. Copy the created "HackrNVMeFamily-10_11_5.kext" into the system's S/L/E or L/E or Clover's kexts folder.
5. Copy and compile the code below using maciASL – You have to set ACPI 6.1 in MaciASL->Preferences->iASL.
The address for nvme device on Asus X99-a II is "_SB.PCI0.BR1B.H000"
Code:
DefinitionBlock ("", "SSDT", 2, "hack", "NVMe-Pcc", 0x00000000)
{
External (_SB.PCI0.BR1B.H000, DeviceObj) // (from opcode)
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
}
})
}
}
If you have two nvme disks duplicate the code with the different address of the next device:
Code:
// Inject bogus class-code for NVMe SSD to prevent IONVMeFamily.kext from loading
DefinitionBlock("", "SSDT", 2, "hack", "NVMe-Pcc", 0)
{
External(_SB.PCI0.BR1B.H000, DeviceObj)
Method(_SB.PCI0.BR1B.H000._DSM, 4)
{
If (!Arg2) { Return (Buffer() { 0x03 } ) }
Return(Package()
{
"class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
"built-in", Buffer() { 0 },
})
}
External(_SB.PCI0.BR2A.H000, DeviceObj)
Method(_SB.PCI0.BR2A.H000._DSM, 4)
{
If (!Arg2) { Return (Buffer() { 0x03 } ) }
Return(Package()
{
"class-code", Buffer() { 0xff, 0x08, 0x01, 0x00 },
"built-in", Buffer() { 0 },
})
}
}
6. "Save As" compiled code with "ACPI Machine Language Binary" format. Copy the SSDT file into "/EFI/CLOVER/ACPI/patched" folder in your system's EFI partition. You can name it anyhow since the newest versions of Clover can load SSDT files with different naming like "SSDT-NVMe-Pcc.aml"
7. Reboot... after it the nvme m.2 device/s should be visible/available in Disk Utility. Running this method you should be able to update the system without issue. After update just repeat the step 3 and 4.
8. Now you can clone the System to Nvme drive and boot with it or use it for another purpose.
Everything in detail is described here:
https://github.com/RehabMan/patch-nvme
https://www.tonymacx86.com/threads/guide-hackrnvmefamily-co-existence-with-ionvmefamily-using-class-code-spoof.210316/
maciASL – https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads
This was tested with two Samsung 960 Pro 512 M.2 drives. Write speed is around 2000MB/s. Read is around 3000 MB/s
---------------------------------
Beep, there must be some error in your ssdt code for nvme. MaciASL complains: Line 1, code 6126, syntax error, unexpected '{', expecting PARSEOP_DEFINITIONBLOCK and premature End-of-file
Can you check and comment on that?
Many thanks in advance
You should use Rehabman's version of MaciASL, which is linked above.
Don't forget to select ACPI 6.1 in MaciASL->Preferences->iASL.