Jump to content

Yet another Orange/Silver Internal/External icons solution - seems to work

  • Please log in to reply
No replies to this topic



    InsanelyMac Sage

  • Coders
  • 277 posts
  • Gender:Male
I've played a bit with Internal and External disk protocol injection (orange or silver disk icons). IOAHCIBlockStorageInjector (and similar kexts) inject those data, but it injects the same for all disks. I wanted to see if this can be done separately for each controller and/or individual port. It seems it can.

I did not test it too much, so I would not say "it works", but rather "seems to work".

Injector used is DeviceMergeNubAPM.kext, some details and src here:

which is slightly modified version of DeviceMergeNub.kext by Andy Vandijck, more here:

How it works:

DeviceMergeNub can hook into device/driver nub specified in it's Info.plist IOKitPersonalities/some personality/IOProviderClass and during probe can inject data specified under the IOKitPersonalities/some personality/IOProviderMergeProperties/* into that device/driver nub.
By adding Protocol Characteristics dict with Physical Interconnect Location=Internal or =External inside IOProviderMergeProperties and by specifying IOProviderClass=IOAHCIDevice or =IOBlockStorageDevice inside Info.plist it will inject Internal or External which will be used by OSX. So far this works, but again just for all drives.

DeviceMergeNubAPM extends DeviceMergeNub with ability to limit injection only if some parent node of the device/driver nub in IORegistry IOService plane meets specified criteria. This can be done by specifying IOKitPersonalities/some personality/IOAnyParentMatch dictionary which accepts some standard matching keys (IONameMatch …). With this it is possible to inject Physical Interconnect Location=Internal for one controller and Physical Interconnect Location=External for another.

Supported keys inside IOAnyParentMatch:
* IONameMatch - can be string or array or dictionary with standard names (SAT0 or pci8086,1c02 …)
* IOPropertyMatch - dictionary with parent's properties to match (all listed must match)
* IOLocationMatch - string (1F,2)
* IOPathMatch - string path to node in IOService plane (IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/SAT0@1F,2)

Attached File  ScreenShot.png   144.69KB   193 downloads

In order to try it, you'll need to:
- remove IOAHCIBlockStorageInjector (and similar kexts that do Internal/External injection)
- modify DeviceMergeNubAPM's Info.plist:
.....* change or add personalities (for example - one personality for each controller)
.....* specify controller with IOAnyParentMatch/IONameMatch=pci8086,1c02 (set to your name from IORegistry)
.....* specify Internal or External in IOProviderMergeProperties/Protocol Characteristics/Physical Interconnect Location
- install it in /Extra/Extensions or in /S/L/E, fix permissions etc. (for example with KextWizard from http://www.insanelym...howtopic=253395)
- restart

It's possible to specify Internal or External for each port. This needs unique port names in IORegistry (if not, must be changed in DSDT). Check attached example plist.

Attached File  DeviceMergeNubAPM.kext.zip   23.6KB   80 downloads

Some Info.plist examples:
Attached File  Info_plist_examples.zip   6.99KB   102 downloads

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2016 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy