Jump to content

Yosemite on Toshiba Satellite P70-A-11N


LexHimself

Recommended Posts

Hi,

 

System specs: 

  • CPU: Intel Core i7-4700MQ (Haswell)
  • Memory: 16GB DDR3 1600Mhz
  • HDD: SATA: 1,5TB 5400RPM (1Empty SATA and 1 Empty SSD slot.)
  • Graphics: Intel HD4600/Nvidia Geforce GT 745M
  • Touchpad: Synaptics
  • Audio: Conexant CX20751-11Z
  • Wireless+BT: Intel Wireless-N 7260
  • Lan: Atheros AR8161/8165

 

So the wireless module does not work, i've replaced it with an Atheros AR5B93 which works OOB.

 

Kexts injected by clover: 

 

Kexts in S/L/E:

 

  • AppleHDA.kext needs to be patched, files attached.
  • AppleIntelFramebufferAzul.kext and AppleIntelHD5000Graphics.kext to correct the model, vram size and fix artifacts.

Changes in AppleIntelFramebufferAzul.kext

 

Config.plist: 

IOKitPersonalities > IOPCIPrimaryMatch > 0x04128086. Change to: 0x04168086

 

AppleIntelFramebufferAzul.kext/Contents/MacOS/AppleIntelFramebufferAzul:

 

Binpatch: 

06 00 26 0A 01 03 03 03 00 00 00 02 00 00 30 01 00 00 60 00 00 00 00 60 D9 0A 00 00

Change to:

06 00 26 0A 01 03 03 03 00 00 00 02 00 00 30 01 00 00 90 00 00 00 00 80 D9 0A 00 00

Changes in  AppleIntelHD5000Graphics.kext

 

Config.plist: 

IOKitPersonalities > Gen7 > IOPCIPrimaryMatch > 0x04128086. Change to: 0x04168086

 

AppleIntelHD5000Graphics.kext/Contents/MacOS/AppleIntelHD5000Graphics

 

Binpatch:

86 80 12 04

Change to:

86 80 16 04

The DSDT has been sorted, some SSDT information has been added to disable the Optimus card. 

Patches applied:

  • Inject audio ID:
  • into method label _DSM parent_label HDEF remove_entry;
    into device label HDEF insert
    begin
    Method (_DSM, 4, NotSerialized)\n
    {\n
        If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
        Return (Package()\n
        {\n
            "layout-id", Buffer() { 0x03, 0x00, 0x00, 0x00 },\n
            "hda-gfx", Buffer() { "onboard-1" },\n
            "PinConfigurations", Buffer() { },\n
        })\n
    }\n
    end;
  • Backlight/Brightness fix:

  • into_all device label PNLF remove_entry;
    into_all device name_adr 0x00020000 code_regex (OperationRegion\s\(RMPC,\sPCI_Config[^\}]*\}) remove_matched;
    
    into device name_adr 0x00020000 insert
    begin
    OperationRegion (RMPC, PCI_Config, 0x10, 4)\n
    Field (RMPC, AnyAcc, NoLock, Preserve)\n
    {\n
        BAR1,32,\n
    }\n
    Device (PNLF)\n
    {\n
        // normal PNLF declares (note some of this probably not necessary)\n
        Name (_ADR, Zero)\n
        Name (_HID, EisaId ("APP0002"))\n
        Name (_CID, "backlight")\n
        Name (_UID, 15)\n
        Name (_STA, 0x0B)\n
        //define hardware register access for brightness\n
        // lower nibble of BAR1 is status bits and not part of the address\n
        OperationRegion (BRIT, SystemMemory, And(^BAR1, Not(0xF)), 0xe1184)\n
        Field (BRIT, AnyAcc, Lock, Preserve)\n
        {\n
            Offset(0x48250),\n
            LEV2, 32,\n
            LEVL, 32,\n
            Offset(0x70040),\n
            P0BL, 32,\n
            Offset(0xc8250),\n
            LEVW, 32,\n
            LEVX, 32,\n
            Offset(0xe1180),\n
            PCHL, 32,\n
        }\n
        // LMAX: use 0xad9/0x56c/0x5db to force OS X value\n
        //       or use any arbitrary value\n
        //       or use 0 to capture BIOS setting\n
        Name (LMAX, 0xad9)\n
        // KMAX: defines the unscaled range in the _BCL table below\n
        Name (KMAX, 0xad9)\n
        // _INI deals with differences between native setting and desired\n
        Method (_INI, 0, NotSerialized)\n
        {\n
            // This 0xC value comes from looking what OS X initializes this\n
            // register to after display sleep (using ACPIDebug/ACPIPoller)\n
            Store(0xC0000000, LEVW)\n
            // determine LMAX to use\n
            If (LNot(LMAX)) { Store(ShiftRight(LEVX,16), LMAX) }\n
            If (LNot(LMAX)) { Store(KMAX, LMAX) }\n
            If (LNotEqual(LMAX, KMAX))\n
            {\n
                // Scale all the values in _BCL to the PWM max in use\n
                Store(0, Local0)\n
                While (LLess(Local0, SizeOf(_BCL)))\n
                {\n
                    Store(DerefOf(Index(_BCL,Local0)), Local1)\n
                    Divide(Multiply(Local1,LMAX), KMAX,, Local1)\n
                    Store(Local1, Index(_BCL,Local0))\n
                    Increment(Local0)\n
                }\n
                // Also scale XRGL and XRGH values\n
                Divide(Multiply(XRGL,LMAX), KMAX,, XRGL)\n
                Divide(Multiply(XRGH,LMAX), KMAX,, XRGH)\n
            }\n
            // adjust values to desired LMAX\n
            Store(ShiftRight(LEVX,16), Local1)\n
            If (LNotEqual(Local1, LMAX))\n
            {\n
                Store(And(LEVX,0xFFFF), Local0)\n
                If (LOr(LNot(Local0),LNot(Local1))) { Store(LMAX, Local0) Store(LMAX, Local1) }\n
                Divide(Multiply(Local0,LMAX), Local1,, Local0)\n
                //REVIEW: wait for vblank before setting new PWM config\n
                //Store(P0BL, Local7)\n
                //While (LEqual (P0BL, Local7)) {}\n
                Store(Or(Local0,ShiftLeft(LMAX,16)), LEVX)\n
            }\n
        }\n
        // _BCM/_BQC: set/get for brightness level\n
        Method (_BCM, 1, NotSerialized)\n
        {\n
            // store new backlight level\n
            Store(Match(_BCL, MGE, Arg0, MTR, 0, 2), Local0)\n
            If (LEqual(Local0, Ones)) { Subtract(SizeOf(_BCL), 1, Local0) }\n
            Store(Or(DerefOf(Index(_BCL,Local0)),ShiftLeft(LMAX,16)), LEVX)\n
        }\n
        Method (_BQC, 0, NotSerialized)\n
        {\n
            Store(Match(_BCL, MGE, And(LEVX, 0xFFFF), MTR, 0, 2), Local0)\n
            If (LEqual(Local0, Ones)) { Subtract(SizeOf(_BCL), 1, Local0) }\n
            Return(DerefOf(Index(_BCL, Local0)))\n
        }\n
        Method (_DOS, 1, NotSerialized)\n
        {\n
            // Note: Some systems have this defined in DSDT, so uncomment\n
            // the next line if that is the case.\n
            //External(^^_DOS, MethodObj)\n
            ^^_DOS(Arg0)\n
        }\n
        // extended _BCM/_BQC for setting "in between" levels\n
        Method (XBCM, 1, NotSerialized)\n
        {\n
            // store new backlight level\n
            If (LGreater(Arg0, XRGH)) { Store(XRGH, Arg0) }\n
            If (LAnd(Arg0, LLess(Arg0, XRGL))) { Store(XRGL, Arg0) }\n
            Store(Or(Arg0,ShiftLeft(LMAX,16)), LEVX)\n
        }\n
        Method (XBQC, 0, NotSerialized)\n
        {\n
            Store(And(LEVX,0xFFFF), Local0)\n
            If (LGreater(Local0, XRGH)) { Store(XRGH, Local0) }\n
            If (LAnd(Local0, LLess(Local0, XRGL))) { Store(XRGL, Local0) }\n
            Return(Local0)\n
        }\n
        // Use XOPT=1 to disable smooth transitions\n
        Name (XOPT, Zero)\n
        // XRGL/XRGH: defines the valid range\n
        Name (XRGL, 25)\n
        Name (XRGH, 2777)\n
        // _BCL: returns list of valid brightness levels\n
        // first two entries describe ac/battery power levels\n
        Name (_BCL, Package()\n
        {\n
            2777,\n
            748,\n
            0,\n
            35, 39, 44, 50,\n
            58, 67, 77, 88,\n
            101, 115, 130, 147,\n
            165, 184, 204, 226,\n
            249, 273, 299, 326,\n
            354, 383, 414, 446,\n
            479, 514, 549, 587,\n
            625, 665, 706, 748,\n
            791, 836, 882, 930,\n
            978, 1028, 1079, 1132,\n
            1186, 1241, 1297, 1355,\n
            1414, 1474, 1535, 1598,\n
            1662, 1728, 1794, 1862,\n
            1931, 2002, 2074, 2147,\n
            2221, 2296, 2373, 2452,\n
            2531, 2612, 2694, 2777,\n
        })\n
    }\n
    end;
    
  • Inject HD4600:
into method label _DSM parent_adr 0x00020000 remove_entry;
into device name_adr 0x00020000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
    {\n
        "device-id", Buffer() { 0x16, 0x04, 0x00, 0x00 },\n
        "AAPL,ig-platform-id", Buffer() { 0x06, 0x00, 0x26, 0x0a },\n
        "hda-gfx", Buffer() { "onboard-1" },\n
        "model", Buffer() { "Intel HD 4600" },\n
    })\n
}\n
end;
  • IMEI and MCHC devices added, and the default Haswell fixes. 

 

SSDT has been generated using using Piker-Alpha's script.

 

Clover folder has been attached, it includes the injected kexts, DSDT and SSDT. CLOVER.zip

 

Codec files for the AppleHDA codec.txt

  • Like 1
Link to comment
Share on other sites

Do i need to provide the original ACPI tables to get this added to EDP? 

 

The original files really are a mess. To disable the Optimus card, various lines need to be removed from the DSDT, it kept me busy for a day or 2 :P

Also, i do not know if it will work with Chameleon.

Link to comment
Share on other sites

×
×
  • Create New...