The subject on test is my ASUS M50SV notebook.
If you do lspci -nnvvxxx you will get something like this on GFX as example:
QUOTE
01:00.0 VGA compatible controller [0300]: nVidia Corporation Device [10de:0405] (rev a1) (prog-if 00 [VGA controller])
Subsystem: ASUSTeK Computer Inc. Device [1043:1767]
....
Subsystem: ASUSTeK Computer Inc. Device [1043:1767]
....
But we want Apple so lets change that:
Under GFX0 device, add this:
CODE
OperationRegion (SVID, PCI_Config, Zero, 0xF0)
Field (SVID, DWordAcc, NoLock, Preserve)
{
Offset (0x40),
ASDI, 32
}
Field (SVID, DWordAcc, NoLock, Preserve)
{
Offset (0x40),
ASDI, 32
}
Then like I explained on Function Disable Registers if you don't have already PINI method create one:
CODE
Method (PINI, 0, NotSerialized) // For PCI0/Wake INI
{
Store (0x00A0106B, \_SB.PCI0.PEGP.GFX0.ASDI) // Check for the correct path
// ....... // If you have more to add
}
{
Store (0x00A0106B, \_SB.PCI0.PEGP.GFX0.ASDI) // Check for the correct path
// ....... // If you have more to add
}
To make sure it will stay like that after wake, we have to add a call for it on _WAK method:
CODE
Method (_WAK, 1, NotSerialized)
{
PINI ()
// ....... // Rest of your stuff from _WAK method
}
{
PINI ()
// ....... // Rest of your stuff from _WAK method
}
And finally call it on PCI0 _INI:
CODE
Device (PCI0)
{
Method (_INI, 0, NotSerialized)
{
PINI ()
}
// ....... //
}
{
Method (_INI, 0, NotSerialized)
{
PINI ()
}
// ....... //
}
And the result is:
CODE
01:00.0 VGA compatible controller [0300]: nVidia Corporation Device [10de:0405] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Apple Computer Inc. Device [106b:00a0]
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 16
Region 0: Memory at fc000000 (32-bit, non-prefetchable)
Region 1: Memory at e0000000 (64-bit, prefetchable)
Region 3: Memory at fa000000 (64-bit, non-prefetchable)
Region 5: I/O ports at 9c00
Capabilities: [60] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [68] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable+
Address: 00000000fee00000 Data: 4095
Capabilities: [78] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 <4us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Latency L0 <512ns, L1 <4us
ClockPM- Suprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
Capabilities: [100] #10de
Capabilities: [040] #106b
Capabilities: [00a] #300
00: de 10 05 04 07 05 10 00 a1 00 00 03 00 00 00 00
10: 00 00 00 fc 0c 00 00 e0 00 00 00 00 04 00 00 fa
20: 00 00 00 00 01 9c 00 00 00 00 00 00 6b 10 a0 00
30: 00 00 00 00 60 00 00 00 00 00 00 00 10 01 00 00
40: 6b 10 a0 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 00 00 00 00 00 00 00 ce d6 23 00 00 00 00 00
60: 01 68 02 00 00 00 00 00 05 78 81 00 00 00 e0 fe
70: 00 00 00 00 95 40 00 00 10 00 01 00 e0 84 2c 01
80: 10 29 00 00 01 3d 01 00 48 00 01 11 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Subsystem: Apple Computer Inc. Device [106b:00a0]
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 16
Region 0: Memory at fc000000 (32-bit, non-prefetchable)
Region 1: Memory at e0000000 (64-bit, prefetchable)
Region 3: Memory at fa000000 (64-bit, non-prefetchable)
Region 5: I/O ports at 9c00
Capabilities: [60] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [68] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable+
Address: 00000000fee00000 Data: 4095
Capabilities: [78] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 <4us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Latency L0 <512ns, L1 <4us
ClockPM- Suprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
Capabilities: [100] #10de
Capabilities: [040] #106b
Capabilities: [00a] #300
00: de 10 05 04 07 05 10 00 a1 00 00 03 00 00 00 00
10: 00 00 00 fc 0c 00 00 e0 00 00 00 00 04 00 00 fa
20: 00 00 00 00 01 9c 00 00 00 00 00 00 6b 10 a0 00
30: 00 00 00 00 60 00 00 00 00 00 00 00 10 01 00 00
40: 6b 10 a0 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 00 00 00 00 00 00 00 ce d6 23 00 00 00 00 00
60: 01 68 02 00 00 00 00 00 05 78 81 00 00 00 e0 fe
70: 00 00 00 00 95 40 00 00 10 00 01 00 e0 84 2c 01
80: 10 29 00 00 01 3d 01 00 48 00 01 11 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Notice the new stuff:
QUOTE
Subsystem: Apple Computer Inc. Device [106b:00a0]
....
And:
Capabilities: [040] #106b
Capabilities: [00a] #300
....
And:
Capabilities: [040] #106b
Capabilities: [00a] #300
Same trick works for my Jmicron eSATA:
QUOTE
06:00.0 SATA controller [0106]: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller [197b:2360] (rev 02) (prog-if 01 [AHCI 1.0])
Subsystem: Apple Computer Inc. Device [106b:00a0]
Subsystem: Apple Computer Inc. Device [106b:00a0]
Now we will need ICH8 specs for next cosmetic stuff, changing Subsystem Vendor ID on EHCI, page 591, 15.1.12 SID—USB EHCI Subsystem ID Register.
What captured my attention was the Attribute: R/W (special), hmn Special?
QUOTE
NOTE: Writes to this register are enabled when the WRT_RDONLY bit (D29:F7, D26:F7:80h, bit 0) is set to 1.
AHA!
Lets do it:
Under each EHC1 and EHC2 Device add this:
CODE
OperationRegion (SVID, PCI_Config, Zero, 0xF0) // Subsystem & Device Vendor ID hack
Field (SVID, DWordAcc, NoLock, Preserve)
{
Offset (0x2C),
VNID, 16, // Subsystem Vendor ID
DVID, 16, // Device Vendor ID
Offset (0x80),
WENB, 8 // WRT_RDONLY bit
}
Field (SVID, DWordAcc, NoLock, Preserve)
{
Offset (0x2C),
VNID, 16, // Subsystem Vendor ID
DVID, 16, // Device Vendor ID
Offset (0x80),
WENB, 8 // WRT_RDONLY bit
}
Then on our good PINI Method:
CODE
Method (PINI, 0, NotSerialized) // For PCI0/Wake INI
{
Store (One, \_SB.PCI0.EHC1.WENB)
Store (One, \_SB.PCI0.EHC2.WENB)
Store (0x106B, \_SB.PCI0.EHC1.VNID)
Store (0x00A0, \_SB.PCI0.EHC1.DVID)
Store (0x106B, \_SB.PCI0.EHC2.VNID)
Store (0x00A0, \_SB.PCI0.EHC2.DVID)
}
{
Store (One, \_SB.PCI0.EHC1.WENB)
Store (One, \_SB.PCI0.EHC2.WENB)
Store (0x106B, \_SB.PCI0.EHC1.VNID)
Store (0x00A0, \_SB.PCI0.EHC1.DVID)
Store (0x106B, \_SB.PCI0.EHC2.VNID)
Store (0x00A0, \_SB.PCI0.EHC2.DVID)
}
If you don't have the PINI call on _WAK and PCI0 do that, and the result is on lspci:
QUOTE
00:1a.7 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 [8086:283a] (rev 03) (prog-if 20 [EHCI])
Subsystem: Apple Computer Inc. Device [106b:00a0]
....
00:1d.7 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 [8086:2836] (rev 03) (prog-if 20 [EHCI])
Subsystem: Apple Computer Inc. Device [106b:00a0]
Subsystem: Apple Computer Inc. Device [106b:00a0]
....
00:1d.7 USB Controller [0c03]: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 [8086:2836] (rev 03) (prog-if 20 [EHCI])
Subsystem: Apple Computer Inc. Device [106b:00a0]
Have fun and Marry Xmas!
