Clover Patches for working PCI sd card reader(Work in Progress)

Discussion in 'Bootloaders' started by carpentryplus25, Dec 19, 2016.

  1. carpentryplus25

    carpentryplus25

    Joined:
    Jan 26, 2014
    Messages:
    1,031
    Mobo:
    Asus P5LP-LE
    CPU:
    Core 2 Duo
    Graphics:
    Nvidia GeForce GT 640
    Mac:
    Mac Pro
    Mobile Phone:
    iOS
    Dec 19, 2016 at 5:30 AM #1
    carpentryplus25

    carpentryplus25

    Joined:
    Jan 26, 2014
    Messages:
    1,031
    Mobo:
    Asus P5LP-LE
    CPU:
    Core 2 Duo
    Graphics:
    Nvidia GeForce GT 640
    Mac:
    Mac Pro
    Mobile Phone:
    iOS
    For a long time apple has always used USB SD card reader devices. For this reason there is little support for PCI sd card readers. Within the past two years or so apple has included driver to support one PCI sd card reader with the following Broadcom device pci14e4,16bc. I am mainly interested in this because one of my systems has a PCI SD card reader. It's a laptop Toshiba A505 S6005 using i3 330m HM55 chipset. Now I've search the web all over for a way to get this card reader recognized in OS X with only one good hit and it involves editing the kext itself and reinstalling and rebuilding caches. Credit for coming up with this method goes out to Joe82 at another site. So I felt like the same principle could be ported over to a clover kext to patch method since I don't wanna be repatching the kext at every update. So on to the fixes.

    The kext of interest here is located in /S*/L*/Extensions/AppleSDXC.kext . We need to patch the info.plist and the binary. Clover can do all of this for us. So for my system it has three card reader devices, I guess for different kinds of cards.

    DPCIManger.png

    Since I want all of them to work, I need to use the sub deviceID and the sub vendorID. So I need to change
    pci14e4,16bc ==> pci1179,ff1e.

    Info.png

    This is the specific line we wish for clover to change in the info.plist. For me it was like this

    Code (Text):

    <key>Comment</key>
    <string>SC card reader</string>
    <key>Disabled</key>
    <false/>
    <key>Find</key>
    <data>
    PHN0cmluZz5wY2kxNGU0LDE2YmM8L3N0cmluZz4=
    </data>
    <key>InfoPlistPatch</key>
    <true/>
    <key>Name</key>
    <string>AppleSDXC</string>
    <key>Replace</key>
    <data>
    PHN0cmluZz5wY2kxMTc5LGZmMWU8L3N0cmluZz4=
    </data>
     
    Then we need to change the binary to correspond with the info.plist. For me it was like this.

    Code (Text):

    <key>Comment</key>
    <string>SD card reader</string>
    <key>Disabled</key>
    <false/>
    <key>Find</key>
    <data>
    cGNpMTRlNCwxNmJj
    </data>
    <key>Name</key>
    <string>AppleSDXC</string>
    <key>Replace</key>
    <data>
    cGNpMTE3OSxmZjFl
    </data>
     
    So looking in system information we can now see OS X recognizing it.

    Card reader.png

    I tested on Yosemite 10.10.5

    Please test this on you guys systems to let me know if its repeatable and working.
    Now I need some more expert help with this because no sd card I have is getting recognized. I have tested the cards in other computers so i know the cards are good. Additionally I know the card reader works because it works in windows. I thought that maybe there was some whitelist on the mac SMBIOS I'm using but I couldn't find any reference to that in AppleSDXC.kext.
    Let me know what you guys come up with.

    Credits
    Joe82
    Slice and other clover developers
     
    Last edited: Dec 19, 2016
  2. carpentryplus25

    carpentryplus25

    Joined:
    Jan 26, 2014
    Messages:
    1,031
    Mobo:
    Asus P5LP-LE
    CPU:
    Core 2 Duo
    Graphics:
    Nvidia GeForce GT 640
    Mac:
    Mac Pro
    Mobile Phone:
    iOS
    Dec 19, 2016 at 6:38 PM #2
    carpentryplus25

    carpentryplus25

    Joined:
    Jan 26, 2014
    Messages:
    1,031
    Mobo:
    Asus P5LP-LE
    CPU:
    Core 2 Duo
    Graphics:
    Nvidia GeForce GT 640
    Mac:
    Mac Pro
    Mobile Phone:
    iOS
    Update: 12/19/16 13:35 est
    I noticed with these patches enabled in clover it broke my audio after sleep and my LCD backlight brightness fixes. After disabling the clover patches everything was restored to normal. Still more work to do here.
     
  3. giang_asl_8

    giang_asl_8

    Joined:
    Aug 21, 2012
    Messages:
    30
    Mobo:
    Dell Precision M7510
    CPU:
    Intel(R) 6920HQ
    Graphics:
    Intel(R) HD Graphics HD530, NVIDIA Quadro M2000M
    Jan 9, 2017 at 3:02 PM #3
    giang_asl_8

    giang_asl_8

    Joined:
    Aug 21, 2012
    Messages:
    30
    Mobo:
    Dell Precision M7510
    CPU:
    Intel(R) 6920HQ
    Graphics:
    Intel(R) HD Graphics HD530, NVIDIA Quadro M2000M
    I have a PCIe card reader too (not sure but can tell it from DPCIManager).
    Do following your guide but not works.
    Tried with both Vendor/Device and SubVendor/SubDevice pairs show in PDCIManager because not sure which to be used is correct.
    Do you have any suggestion?

    P/S: my hardware is Dell precision M7510, tried on Sierra 10.12.2.
     

    Attached Files:

    • Screen Shot 2017-01-09 at 11.59.24 PM.png  (747.3 KB, 124 views)
  4. tyraenor

    tyraenor

    Joined:
    Aug 22, 2013
    Messages:
    110
    Mobo:
    HP EliteBook 820 G3
    CPU:
    Core i5-6200U
    Graphics:
    Intel HD520
    Classic Mac:
    Performa
    Mobile Phone:
    iOS, Windows Phone
    Apr 24, 2017 at 12:08 AM #4
    tyraenor

    tyraenor

    Joined:
    Aug 22, 2013
    Messages:
    110
    Mobo:
    HP EliteBook 820 G3
    CPU:
    Core i5-6200U
    Graphics:
    Intel HD520
    Classic Mac:
    Performa
    Mobile Phone:
    iOS, Windows Phone
    Thank you for this. It is working like a charm for me.

    HP EliteBook 820 G3 on macOS Sierra 10.12.4.

    But I took com.apple.driver.AppleSDXC as name instead of AppleSDXC only.
    I have audio but backlight issues after sleep, too. But hopefully we get to a solution here...

    Code (Text):
    <dict>
                    <key>Comment</key>
                    <string>Card Reader Info.plist (Sub)</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    PHN0cmluZz5wY2kxNGU0LDE2YmM8L3N0cmluZz4=
                    </data>
                    <key>InfoPlistPatch</key>
                    <true/>
                    <key>Name</key>
                    <string>com.apple.driver.AppleSDXC</string>
                    <key>Replace</key>
                    <data>
                    PHN0cmluZz5wY2kxMDNjLDgwN2M8L3N0cmluZz4=
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>Card Reader Binary (Sub)</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    cGNpMTRlNCwxNmJj
                    </data>
                    <key>Name</key>
                    <string>com.apple.driver.AppleSDXC</string>
                    <key>Replace</key>
                    <data>
                    cGNpMTAzYyw4MDdj
                    </data>
                </dict>
    SystemInspector.png

    UPDATE:
    Although it is detected, if I insert an SD card nothing happens... :( So I will disable this for now until I found a solution that is working 100%.
     
    Last edited: Apr 24, 2017
  5. carpentryplus25

    carpentryplus25

    Joined:
    Jan 26, 2014
    Messages:
    1,031
    Mobo:
    Asus P5LP-LE
    CPU:
    Core 2 Duo
    Graphics:
    Nvidia GeForce GT 640
    Mac:
    Mac Pro
    Mobile Phone:
    iOS
    Apr 24, 2017 at 11:10 PM #5
    carpentryplus25

    carpentryplus25

    Joined:
    Jan 26, 2014
    Messages:
    1,031
    Mobo:
    Asus P5LP-LE
    CPU:
    Core 2 Duo
    Graphics:
    Nvidia GeForce GT 640
    Mac:
    Mac Pro
    Mobile Phone:
    iOS
    I do appreciate your testing I actually had the same problem I haven't had much more time to work on it. However it does make me want to dig a little deeper to see if I can get it going better. I had issues with it breaking sleep and my backlight patches which is strange since it was all done in the DSDT so there is definitely more work to be done here. I originally thought this thread would be flooded with interests but i guess i was wrong.

    FYI this driver com.apple.driver.AppleSDXC is the same as AppleSDXC.kext
     
  6. HARRYBEEEE

    HARRYBEEEE

    Joined:
    Apr 3, 2011
    Messages:
    1
    Mobo:
    ITX
    CPU:
    i7 2600K
    Graphics:
    Geforce 670 2GB
    Mac:
    MacBook Air, Mac Pro
    Mobile Phone:
    Windows Phone
    Apr 29, 2017 at 9:17 AM #6
    HARRYBEEEE

    HARRYBEEEE

    Joined:
    Apr 3, 2011
    Messages:
    1
    Mobo:
    ITX
    CPU:
    i7 2600K
    Graphics:
    Geforce 670 2GB
    Mac:
    MacBook Air, Mac Pro
    Mobile Phone:
    Windows Phone
    Could you possibly PM me on your process to get the 820 G3 working? I am not having much luck, no mouse/kb, not detecting HDDs etc
     
  7. P1LGRIM

    P1LGRIM Moderator

    Joined:
    Mar 2, 2012
    Messages:
    10,318
    Mobo:
    Lenovo ThinkStation p300 ⌘
    CPU:
    Intel i5-4570 3.2 GHz
    Graphics:
    GeForce GT 740 2047 MB
    Mac:
    MacBook Pro, Mac mini
    Classic Mac:
    Power Mac
    Mobile Phone:
    iOS
    Apr 29, 2017 at 10:52 AM #7
    P1LGRIM

    P1LGRIM Moderator

    Joined:
    Mar 2, 2012
    Messages:
    10,318
    Mobo:
    Lenovo ThinkStation p300 ⌘
    CPU:
    Intel i5-4570 3.2 GHz
    Graphics:
    GeForce GT 740 2047 MB
    Mac:
    MacBook Pro, Mac mini
    Classic Mac:
    Power Mac
    Mobile Phone:
    iOS
    Please read the rules :
     
    carpentryplus25 likes this.
  8. carpentryplus25

    carpentryplus25

    Joined:
    Jan 26, 2014
    Messages:
    1,031
    Mobo:
    Asus P5LP-LE
    CPU:
    Core 2 Duo
    Graphics:
    Nvidia GeForce GT 640
    Mac:
    Mac Pro
    Mobile Phone:
    iOS
    Apr 29, 2017 at 3:39 PM #8
    carpentryplus25

    carpentryplus25

    Joined:
    Jan 26, 2014
    Messages:
    1,031
    Mobo:
    Asus P5LP-LE
    CPU:
    Core 2 Duo
    Graphics:
    Nvidia GeForce GT 640
    Mac:
    Mac Pro
    Mobile Phone:
    iOS
    Not to mention it has nothing to do with the purpose of this thread
     
  9. tyraenor

    tyraenor

    Joined:
    Aug 22, 2013
    Messages:
    110
    Mobo:
    HP EliteBook 820 G3
    CPU:
    Core i5-6200U
    Graphics:
    Intel HD520
    Classic Mac:
    Performa
    Mobile Phone:
    iOS, Windows Phone
    May 7, 2017 at 10:09 PM #9
    tyraenor

    tyraenor

    Joined:
    Aug 22, 2013
    Messages:
    110
    Mobo:
    HP EliteBook 820 G3
    CPU:
    Core i5-6200U
    Graphics:
    Intel HD520
    Classic Mac:
    Performa
    Mobile Phone:
    iOS, Windows Phone

Share This Page