Micky1979 Posted September 8, 2016 Share Posted September 8, 2016 Important also to change the bundle-id/bundle-name in the Info.plist Was. I made a "USE_CONTROLLER_PATCH" macro set to 0 to switch back to this mode, but default for me is this new mode of increasing the version number and now the Info.plist is "less" patched and almost vanilla (IOPCIClassMatch is now standard for PCs). Link to comment Share on other sites More sharing options...
RehabMan Posted September 8, 2016 Share Posted September 8, 2016 Was. I made a "USE_CONTROLLER_PATCH[/size]" macro set to 0 to switch back to this mode, but default for me is this new mode of increasing the version number and now the Info.plist is "less" patched and almost vanilla (IOPCIClassMatch is now standard for PCs). I prefer to patch the bundle-id/bundle-name... I think it is better that way. Link to comment Share on other sites More sharing options...
Micky1979 Posted September 8, 2016 Share Posted September 8, 2016 Repo updated. I prefer to patch the bundle-id/bundle-name... I think it is better that way. Is still compatible by enabling a macro for me, but this way the same user was experience a kp have its nvme ssd working. I'll provide both binaries in the download section. Link to comment Share on other sites More sharing options...
RehabMan Posted September 8, 2016 Share Posted September 8, 2016 Is still compatible by enabling a macro for me, but this way the same user was experience a kp have its nvme ssd working. I'll provide both binaries in the download section. I suppose... there is plenty of evidence that the version hack works (dummyHDA technique), but I'd rather not use it as Apple doesn't document it that way... 1 Link to comment Share on other sites More sharing options...
Micky1979 Posted September 8, 2016 Share Posted September 8, 2016 Off course, but also a binary patch is not documented (quip) Link to comment Share on other sites More sharing options...
RehabMan Posted September 8, 2016 Share Posted September 8, 2016 Off course, but also a binary patch is not documented (quip) Ha ha... for me they are in a bit different category. It is documented that the code the system will run is in the binary inside MacOS subdir... Link to comment Share on other sites More sharing options...
Micky1979 Posted September 8, 2016 Share Posted September 8, 2016 Jokes aside the Info.plist loaded in the memory-map and later unserialized in OSKext.cpp inside the XNU kernel ...and you can see specific rules: /* If we have a kext with this identifier that's already loaded/prelinked, * we can't use the new one, but let's be really thorough and check how * the two are related for a precise diagnostic log message. * * Note that user space can't find out about nonloaded prelinked kexts, * so in this case we log a message when new & existing are equivalent * at the step rather than warning level, because we are always going * be getting a copy of the kext in the user load request mkext. */ if (existingIsLoaded || existingIsPrelinked) { bool sameVersion = (newVersion == existingVersion); bool sameExecutable = true; // assume true unless we have UUIDs /* Only get the UUID if the existing kext is loaded. Doing so * might have to uncompress an mkext executable and we shouldn't * take that hit when neither kext is loaded. */ newUUID = copyUUID(); existingUUID = existingKext->copyUUID(); /* I'm entirely too paranoid about checking equivalence of executables, * but I remember nasty problems with it in the past. * * - If we have UUIDs for both kexts, compare them. * - If only one kext has a UUID, they're definitely different. */ if (newUUID && existingUUID) { sameExecutable = newUUID->isEqualTo(existingUUID); } else if (newUUID || existingUUID) { sameExecutable = false; } if (!newUUID && !existingUUID) { /* If there are no UUIDs, we can't really tell that the executables * are *different* without a lot of work; the loaded kext's * unrelocated executable is no longer around (and we never had it * in-kernel for a prelinked kext). We certainly don't want to do * a whole fake link for the new kext just to compare, either. */ OSKextVersionGetString(version, newVersionCString, sizeof(newVersionCString)); OSKextLog(this, kOSKextLogWarningLevel | kOSKextLogKextBookkeepingFlag, "Notice - new kext %s, v%s matches %s kext " "but can't determine if executables are the same (no UUIDs).", getIdentifierCString(), newVersionCString, (existingIsLoaded ? "loaded" : "prelinked")); } if (sameVersion && sameExecutable) { OSKextLog(this, (existingIsLoaded ? kOSKextLogWarningLevel : kOSKextLogStepLevel) | kOSKextLogKextBookkeepingFlag, "Refusing new kext %s, v%s: a %s copy is already present " "(same version and executable).", getIdentifierCString(), newVersionCString, (existingIsLoaded ? "loaded" : "prelinked")); } else { if (!sameVersion) { /* This condition is significant so log it under warnings. */ OSKextLog(this, kOSKextLogWarningLevel | kOSKextLogKextBookkeepingFlag, "Refusing new kext %s, v%s: already have %s v%s.", getIdentifierCString(), newVersionCString, (existingIsLoaded ? "loaded" : "prelinked"), existingVersionCString); } else { /* This condition is significant so log it under warnings. */ OSKextLog(this, kOSKextLogWarningLevel | kOSKextLogKextBookkeepingFlag, "Refusing new kext %s, v%s: a %s copy with a different " "executable UUID is already present.", getIdentifierCString(), newVersionCString, (existingIsLoaded ? "loaded" : "prelinked")); } } goto finish; } /* if (existingIsLoaded || existingIsPrelinked) */ So is clearly documented, and from this was the message I was talking about today, and IMHO is perfectly fine. 1 Link to comment Share on other sites More sharing options...
RehabMan Posted September 8, 2016 Share Posted September 8, 2016 Jokes aside the Info.plist loaded in the memory-map and later unserialized in OSKext.cpp inside the XNU kernel ...and you can see specific rule: if (sameVersion && sameExecutable) { OSKextLog(this, (existingIsLoaded ? kOSKextLogWarningLevel : kOSKextLogStepLevel) | kOSKextLogKextBookkeepingFlag, "Refusing new kext %s, v%s: a %s copy is already present " "(same version and executable).", getIdentifierCString(), newVersionCString, (existingIsLoaded ? "loaded" : "prelinked")); } So is clearly documented, and this was the message I was talking about today... so now I'm also sure that this messagge will not show up because two kexts must be the same (the case a secondary kext is just renamed) I was aware of that message. It happens more commonly when people are mistakenly injecting kexts that they also have installed to the system volume... But that particular message will never happen with the bundle-id/bundle-name renamed (because there is no duplicate). But that is not the "undocumented" part I was referring to... The undocumented part (AFAIK), is the fact that when kextcache encounters duplicate kexts, it will place the one with the larger version# in the kernel cache. The documentation Apple provides on kernel development implies the behavior is not deterministic. Note: I haven't searched for source to kextcache, and it has been a while since I read Apple's kernel docs (and probably a longer time since they have updated them too...) 1 Link to comment Share on other sites More sharing options...
Micky1979 Posted September 8, 2016 Share Posted September 8, 2016 Is here:https://opensource.apple.com/source/kext_tools/kext_tools-426.60.1/kextcache_main.c if (myKextVersion > 0 && myKextVersion > theKextVersion ) { // already have newer version of this kext, do not add it OSKextLogCFString(NULL, kOSKextLogDebugLevel | kOSKextLogArchiveFlag, CFSTR("%s: found newer, skipping %@"), __func__, theKext); return; } Ok, it's time for me to dedicate time to other ... go to BAR 1 Link to comment Share on other sites More sharing options...
RehabMan Posted September 8, 2016 Share Posted September 8, 2016 Is here:https://opensource.apple.com/source/kext_tools/kext_tools-426.60.1/kextcache_main.c if (myKextVersion > 0 && myKextVersion > theKextVersion ) { // already have newer version of this kext, do not add it OSKextLogCFString(NULL, kOSKextLogDebugLevel | kOSKextLogArchiveFlag, CFSTR("%s: found newer, skipping %@"), __func__, theKext); return; } Ok, it's time for me to dedicate time to other ... go to BAR And it will also remove an older kext already present and replace it with a newer one when encountered. ... if (myKextVersion > 0 && myKextVersion == theKextVersion ) { // already have same version of this kext, do not add it OSKextLogCFString(NULL, kOSKextLogDebugLevel | kOSKextLogArchiveFlag, CFSTR("%s: found dup, skipping %@"), __func__, theKext); return; } if (myKextVersion > 0 && myKextVersion < theKextVersion ) { // found older version of this kext, remove it and add this one OSKextLogCFString(NULL, kOSKextLogDebugLevel | kOSKextLogArchiveFlag, CFSTR("%s: found older, removing %@"), __func__, myKext); CFArrayRemoveValueAtIndex(theArray, i); break; } Note that two kexts named the same, different, but with same version, the first one encountered will be kept... no additional checks for file timestamps/etc, which means it is rather non-deterministic. But of course, as far as "documentation" I was referring to written documentation in the kernel developers guide that guarantees the behavior now and in the future. Enjoy the beer! 1 Link to comment Share on other sites More sharing options...
Micky1979 Posted September 9, 2016 Share Posted September 9, 2016 Was big 1 Link to comment Share on other sites More sharing options...
magnifico Posted September 10, 2016 Share Posted September 10, 2016 Was big Again again again Bear ? OMG MHMMMMMMM 1 Link to comment Share on other sites More sharing options...
Carbonimax Posted September 10, 2016 Share Posted September 10, 2016 Sorry to break the mood but with the 3 versions of NVMeP 2.3, A, test and B, the generated IONVMEFamilyBorg.kext result in a KP at boot (install in S/L/E or in EFI/CLOVER/kexts/Other). For info, patch from Piker-Alpha blog works great with Clover KextsToPatch. What I am doing wrong ? System : Sierra GM (16A319), Gigabyte Z170MX-Gaming 5, Samsung 950 Pro Link to comment Share on other sites More sharing options...
Micky1979 Posted September 10, 2016 Share Posted September 10, 2016 a pict of the kp? Link to comment Share on other sites More sharing options...
magnifico Posted September 11, 2016 Share Posted September 11, 2016 Sorry to break the mood but with the 3 versions of NVMeP 2.3, A, test and B, the generated IONVMEFamilyBorg.kext result in a KP at boot (install in S/L/E or in EFI/CLOVER/kexts/Other). For info, patch from Piker-Alpha blog works great with Clover KextsToPatch. What I am doing wrong ? System : Sierra GM (16A319), Gigabyte Z170MX-Gaming 5, Samsung 950 Pro can you attached pic of kP? Link to comment Share on other sites More sharing options...
ekwipt Posted September 11, 2016 Share Posted September 11, 2016 Created IONVMeFamilyBorg.kext for sierra PB 6, placed inside Clover Folder: kexts/10.12 I used the options: NVMeP -i -s 0 Neither my NVME is showing up and of course no internal or internal disk is showing also Using latest 2.3 version IONVMeFamilyBorg.kext.zip Link to comment Share on other sites More sharing options...
Micky1979 Posted September 11, 2016 Share Posted September 11, 2016 Hey guys but is hard to make a ioreg or a pict? You both have the same hd I use for testing (Samsung 950 Pro nvme), only wondering why is working for me Link to comment Share on other sites More sharing options...
Carbonimax Posted September 11, 2016 Share Posted September 11, 2016 Here is the KP : https://www.dropbox.com/s/j3j2ngquptvjyug/IMG_7001.JPG?dl=0 NVMeP 2.3B : https://www.dropbox.com/s/w6erhocvxp2bkkx/Screenshot%202016-09-11%2017.53.21.png?dl=0 Link to comment Share on other sites More sharing options...
magnifico Posted September 11, 2016 Share Posted September 11, 2016 Here is the KP : https://www.dropbox.com/s/j3j2ngquptvjyug/IMG_7001.JPG?dl=0 NVMeP 2.3B : https://www.dropbox.com/s/w6erhocvxp2bkkx/Screenshot%202016-09-11%2017.53.21.png?dl=0 try NvmeP not B try NvmeP not B Carbonimax listen me, attached also your config plist here, only curiosity 1 Link to comment Share on other sites More sharing options...
Carbonimax Posted September 11, 2016 Share Posted September 11, 2016 No KP but the kext is just not loaded I think. https://www.dropbox.com/s/5n8vzdp56izbta4/IMG_7019.JPG?dl=0 https://www.dropbox.com/s/ef1q7r78s5vm2hz/IMG_7020.JPG?dl=0 NVMeP 2.3 : https://www.dropbox.com/s/fzg1iopzadenmgb/Screenshot%202016-09-11%2019.23.24.png?dl=0 Link to comment Share on other sites More sharing options...
magnifico Posted September 11, 2016 Share Posted September 11, 2016 No KP but the kext is just not loaded I think. https://www.dropbox.com/s/5n8vzdp56izbta4/IMG_7019.JPG?dl=0 https://www.dropbox.com/s/ef1q7r78s5vm2hz/IMG_7020.JPG?dl=0 NVMeP 2.3 : https://www.dropbox.com/s/fzg1iopzadenmgb/Screenshot%202016-09-11%2019.23.24.png?dl=0 man you have another problem , your hardware? 1 Link to comment Share on other sites More sharing options...
Micky1979 Posted September 11, 2016 Share Posted September 11, 2016 Yep, in fact your last screenshot show problems with usb ports restriction... you can boot without it? 1 Link to comment Share on other sites More sharing options...
magnifico Posted September 11, 2016 Share Posted September 11, 2016 try to insert USB behind the pc Link to comment Share on other sites More sharing options...
Carbonimax Posted September 11, 2016 Share Posted September 11, 2016 Oups, you're right. It was not the good config.plist and it won't load the ACPI patch... (and I don't boot on USB stick ) So now, with the good one, it KP :/ https://www.dropbox.com/s/e1k3yw1mk6blv9m/IMG_7023.MOV?dl=0 I put the kext in /EFI/CLOVER/kexts/other and remove the patch from the plist, that's right ? Link to comment Share on other sites More sharing options...
Micky1979 Posted September 11, 2016 Share Posted September 11, 2016 Ok, but is the FakeSMC.kext that give you the kernel panic.. EDIT please remove the patched kext and post a ioreg. Link to comment Share on other sites More sharing options...
Recommended Posts