Help - Search - Members - Calendar
Full Version: Apple We Want Your Id!
Project OS X Forums > Snow Leopard Guides & Tutorials > DSDT Patching
THe KiNG
In this example we will use Intel® I/O Controller Hub 8 (ICH8) Family specs, and will do some cosmetic stuff like changing Subsystem Vendor ID.
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]
....

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
                    }


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
}


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
}


And finally call it on PCI0 _INI:

CODE
Device (PCI0)
{
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


Notice the new stuff:
QUOTE
Subsystem: Apple Computer Inc. Device [106b:00a0]
....
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]


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
}


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)
}


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]


Have fun and Marry Xmas!
scrax
QUOTE (THe KiNG @ Dec 25 2009, 03:54 PM) *
Have fun and Marry Xmas!


this is my result for my gfx0 edit:

CODE
01:00.0 VGA compatible controller: nVidia Corporation G84 [GeForce 8600 GT] (rev a1) (prog-if 00 [VGA controller])
    Subsystem: Apple Computer Inc. Unknown device 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 fd000000 (32-bit, non-prefetchable)
    Region 1: Memory at d0000000 (64-bit, prefetchable)
    Region 3: Memory at fa000000 (64-bit, non-prefetchable)
    Region 5: I/O ports at cc00
    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: 40a1
    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


this is the entire gfx0 part:
CODE
Device (GFX0){Name (_ADR, Zero)
                    Name (_SUN, One)
                    OperationRegion (SVID, PCI_Config, Zero, 0xF0)
                    Field (SVID, DWordAcc, NoLock, Preserve) { Offset (0x40), ASDI,   32 }
                    Method (_DSM, 4, NotSerialized){
                        Store (Package (0x18){
                                "@0,compatible",Buffer (0x0B){"NVDA,NVMac"},
                                "@0,device_type",Buffer (0x08){"display"},
                                "@0,name",Buffer (0x0F){"NVDA,Display-A"},
                                "@1,compatible",Buffer (0x0B){"NVDA,NVMac"},
                                "@1,device_type",Buffer (0x08){"display"},
                                "@1,name",Buffer (0x0F){"NVDA,Display-B"},
                                "NVCAP",Buffer (0x18){
                                    0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
                                    0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
                                    0x00, 0x00, 0x00, 0x00},
                                "NVPM",Buffer (0x1C){
                                    0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                                    0x00, 0x00, 0x00, 0x00},
                                "VRAM,totalsize",Buffer (0x04){0x00, 0x00, 0x00, 0x10},
                                "device_type",Buffer (0x0C){"NVDA,Parent"},
                                "model",Buffer (0x17){"nVidia GeForce 8600 GT"},
                                "rom-revision",Buffer (0x25){"nVidia GeForce 8600 GT OpenGL Engine"}
                            }, Local0)
                        MCDP (Arg2, RefOf (Local0))Return (Local0)
                    }
barnum
Hi The King,

should we do the same for some other device (SATA, ..)

Regards,
Barnum
tea
Can we likewise change the device-id?
THe KiNG
QUOTE (barnum @ Dec 29 2009, 10:40 AM) *
Hi The King,

should we do the same for some other device (SATA, ..)

Regards,
Barnum


QUOTE (tea @ Dec 29 2009, 11:21 AM) *
Can we likewise change the device-id?

AFAIK no, most of the registers are RO, and is well know that Intel specs are not 100% public...so if there is no enable bit hidden and undocumented somewhere we can't do much... Good luck on finding them!

Same goes for device id, is RO/locked. sad.gif

A good example is my eSATA J-Micron:
CODE
OperationRegion (SATE, PCI_Config, Zero, 0xF0)
Field (SATE, DWordAcc, NoLock, Preserve)
{
Offset (0x2C),
SA2C, 32,
Offset (0x40),
SA40, 16,
SA42, 8,
SA43, 8,
Offset (0xD3),
SAD3, 8
}


CODE
Method (PINI, 0, NotSerialized) // For PCI0/Wake INI
{
//......//
Notify (\_SB.PCI0.RP05, Zero) // eSATA Subsystem ID and force AHCI hack start
Store (0x7F, \_SB.PCI0.RP05.EATA.SAD3) // eSATA RW enable Register #1 set
Store (0x40, \_SB.PCI0.RP05.EATA.SA43) // eSATA RW enable Register #2 set
Store (0x00A0106B, \_SB.PCI0.RP05.EATA.SA2C) // eSATA Subsystem ID set
Store (0xBF, \_SB.PCI0.RP05.EATA.SA43) // First job done
Store (0xa111, \_SB.PCI0.RP05.EATA.SA40) // eSATA Force AHCI Register #1 set
Store (0xc2, \_SB.PCI0.RP05.EATA.SA42) // eSATA Force AHCI Register #2 set
Store (0x20, \_SB.PCI0.RP05.EATA.SA43) // eSATA Subsystem ID and force AHCI hack end
}


Notice what have to be done to change Subsystem ID...
Without docs we can't do much.
Slice
We can change DeviceID by standard DSM method
CODE
Device (ARPT)
{
Name (_ADR, Zero)
Name (_SUN, One) // this is for PCI card information in System Profiler
Name (_PRW, Package (0x02)
{
0x09,
0x03
})
Method (_DSM, 4, NotSerialized)
{
Store (Package ()
{
"device-id",
Buffer ()
{
0x12, 0x43, 0x00, 0x00 //instead of native 4315
},

"model",
Buffer (0x13)
{
"Dell Wireless 1395"
},

"device_type",
Buffer (0x08)
{
"Airport"
},

"built-in",
Buffer (One)
{
0x00
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}

but this solution is not perfect
CODE
Dell Wireless 1395:

Name: pci14e4,4315 -- here is native DeviceID
Type: Airport
Driver Installed: Yes
Bus: PCI
Slot: PCI Slot 1
Vendor ID: 0x14e4
Device ID: 0x4312 -- here is a new DeviceID, that we made
Subsystem Vendor ID: 0x1028
Subsystem ID: 0x000b
Revision ID: 0x0001
Link Width: x1
Link Speed: 2.5 GT/s

Why Name is constructed from native DeviceID?
This is happen because Name is constructed by IOPCIFamily based on PCI bus reading but not from _DSM method information.
Slice
This is better
CODE
Method (_DSM, 4, NotSerialized)
{
Store (Package ()
{
"device-id",
Buffer ()
{
0x12, 0x43, 0x00, 0x00
},

"name",
Buffer ()
{
"pci14e4,4312"
},

"model",
Buffer ()
{
"Dell Wireless 1395"
},

"device_type",
Buffer ()
{
"Airport"
},

"built-in",
Buffer (One)
{
0x00
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}

and a result
CODE
Dell Wireless 1395:

  Name:    pci14e4,4312
  Type:    Airport
  Bus:    PCI
  Slot:    PCI Slot 1
  Vendor ID:    0x14e4
  Device ID:    0x4312
  Subsystem Vendor ID:    0x1028
  Subsystem ID:    0x000b
  Revision ID:    0x0001
  Link Width:    x1
18seven
QUOTE (Slice @ Jan 1 2010, 12:35 PM) *
Subsystem Vendor ID: 0x1028


Could be better to:

CODE
Method (_DSM, 4, NotSerialized)
{
Store (Package ()
{
"device-id",
Buffer ()
{
0x12, 0x43, 0x00, 0x00
},

"subsystem-vendor-id",
Buffer (0x04)
{
0x6B, 0x10, 0x00, 0x00
},


"name",
Buffer ()
{
"pci14e4,4312"
},

"model",
Buffer ()
{
"Dell Wireless 1395"
},

"device_type",
Buffer ()
{
"Airport"
},

"built-in",
Buffer (One)
{
0x00
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}

18seven
also

CODE
                                "subsystem-id",
                                Buffer (0x04)
                                {
                                  0x86, 0x00, 0x00, 0x00 // for a/b/g
                                }


or

CODE
                                "subsystem-id",
                                Buffer (0x04)
                                {
                                  0x87, 0x00, 0x00, 0x00 // for a/b/g/n
                                }
THe KiNG
Some clarifications about WiFi cards:
Notebooks dosen't use a PCI Slot but a Mini Port or USB in some cases, so avoid the use of _SUN if is not a desktop card, Apple used "AirPort" as a slot name on first macbooks until 3,1, then nothing, then a PCI slot starting with 6 series, so best IMHO is to use for notebooks with mini pci port:
QUOTE
"AAPL,slot-name", Buffer (){"AirPort"},


There is no need to inject "name" since it gets filled by "device-id"&"vendor-id" and also if injected borke stuff on "compatible".

The working code for me:

CODE
Method (_DSM, 4, NotSerialized)
{
Store (Package ()
{
"AAPL,slot-name", Buffer (){"AirPort"},
"class-code", Buffer (0x04){0x00, 0x80, 0x02, 0x00},
"device-id", Buffer (0x04){0x24, 0x00, 0x00, 0x00},
"device_type", Buffer (){"AirPort"},
"model", Buffer (){"Atheros AR5008 802.11n Wireless Network Adapter"},
"subsystem-id", Buffer (0x04){0x87, 0x00, 0x00, 0x00},
"subsystem-vendor-id", Buffer (0x04){0x6B, 0x10, 0x00, 0x00},
"vendor-id", Buffer (0x04){0x8C, 0x16, 0x00, 0x00}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}


And the result:



EDIT:

I was a bit wrong, "name" gets filled by "device-id"&"vendor-id" but not if you try to change the ID...
However changing the device-id works(driver gets loaded), I tried with 2a to get x86_64 Atheros loaded on snow, and works, even it say on Ethernet Cards:
QUOTE
Name: pci168c,24
instead of
Name: pci168c,2a

But "compatible" looks right in Ioreg:
QUOTE
<"pci106b,87", "pci168c,2a", "pciclass,028000">

And is all its needed for driver to work... wink.gif

My final code(for pci168c,2a injection):

CODE
Method (_DSM, 4, NotSerialized)
{
Store (Package ()
{
"AAPL,slot-name", Buffer () {"AirPort"},
"class-code", Buffer (0x04) {0x00, 0x80, 0x02, 0x00},
"device-id", Buffer (0x04) {0x2A, 0x00, 0x00, 0x00},
"device_type", Buffer () {"AirPort"},
"model", Buffer () {"Atheros 802.11n Wireless Network Adapter"},
"subsystem-id", Buffer (0x04) {0x87, 0x00, 0x00, 0x00},
"subsystem-vendor-id", Buffer (0x04) {0x6B, 0x10, 0x00, 0x00},
"vendor-id", Buffer (0x04) {0x8C, 0x16, 0x00, 0x00}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}


And another dummy.kext is gone.... smile.gif

Have fun!
vincent99
Hi the king, i have this values with my atheros a,b,g pci on my p5q deluxe:

<"pci168c,2052", "pci168c,1a", "pciclass,020000">

But if I use these values:

classcode: 0x00, 0x00, 0x02, 0x00
device-id: 0x1A, 0x00, 0x00, 0x00
subsystem-vendor-id: 0x8C, 0x16, 0x00, 0x00
vendor-id: 0x8C, 0x16, 0x00, 0x00
subsystem-id: 0x52, 0x20, 0x00, 0x00

the AirPort don't load. What can i do? Thanks and sorry for my english wink.gif
18seven
QUOTE (vincent99 @ Jan 3 2010, 05:39 PM) *
Hi the king, i have this values with my atheros a,b,g pci on my p5q deluxe:

<"pci168c,2052", "pci168c,1a", "pciclass,020000">

But if I use these values:

classcode: 0x00, 0x00, 0x02, 0x00
device-id: 0x1A, 0x00, 0x00, 0x00
subsystem-vendor-id: 0x8C, 0x16, 0x00, 0x00
vendor-id: 0x8C, 0x16, 0x00, 0x00
subsystem-id: 0x52, 0x20, 0x00, 0x00

the AirPort don't load. What can i do? Thanks and sorry for my english wink.gif


Why don't you use the apple sub id's I posted above? Also, if you are not injecting new information why include it in your patch?
artimess
QUOTE (THe KiNG @ Jan 2 2010, 08:56 AM) *
Some clarifications about WiFi cards:
Notebooks dosen't use a PCI Slot but a Mini Port or USB in some cases, so avoid the use of _SUN if is not a desktop card, Apple used "AirPort" as a slot name on first macbooks until 3,1, then nothing, then a PCI slot starting with 6 series, so best IMHO is to use for notebooks with mini pci port:


There is no need to inject "name" since it gets filled by "device-id"&"vendor-id" and also if injected borke stuff on "compatible".

The working code for me:

CODE
Method (_DSM, 4, NotSerialized)
{
Store (Package ()
{
"AAPL,slot-name", Buffer (){"AirPort"},
"class-code", Buffer (0x04){0x00, 0x80, 0x02, 0x00},
"device-id", Buffer (0x04){0x24, 0x00, 0x00, 0x00},
"device_type", Buffer (){"AirPort"},
"model", Buffer (){"Atheros AR5008 802.11n Wireless Network Adapter"},
"subsystem-id", Buffer (0x04){0x87, 0x00, 0x00, 0x00},
"subsystem-vendor-id", Buffer (0x04){0x6B, 0x10, 0x00, 0x00},
"vendor-id", Buffer (0x04){0x8C, 0x16, 0x00, 0x00}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}


And the result:



EDIT:

I was a bit wrong, "name" gets filled by "device-id"&"vendor-id" but not if you try to change the ID...
However changing the device-id works(driver gets loaded), I tried with 2a to get x86_64 Atheros loaded on snow, and works, even it say on Ethernet Cards:

But "compatible" looks right in Ioreg:

And is all its needed for driver to work... wink.gif

My final code(for pci168c,2a injection):

CODE
Method (_DSM, 4, NotSerialized)
{
Store (Package ()
{
"AAPL,slot-name", Buffer () {"AirPort"},
"class-code", Buffer (0x04) {0x00, 0x80, 0x02, 0x00},
"device-id", Buffer (0x04) {0x2A, 0x00, 0x00, 0x00},
"device_type", Buffer () {"AirPort"},
"model", Buffer () {"Atheros 802.11n Wireless Network Adapter"},
"subsystem-id", Buffer (0x04) {0x87, 0x00, 0x00, 0x00},
"subsystem-vendor-id", Buffer (0x04) {0x6B, 0x10, 0x00, 0x00},
"vendor-id", Buffer (0x04) {0x8C, 0x16, 0x00, 0x00}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}


And another dummy.kext is gone.... smile.gif

Have fun!

Hi The King,
First Happy New year,
I have exactly your Artheros card, AR5008. I am trying to get it to work so far no luck.
I know it is a good card and works, because with Chunnun IOPCIAFamily.kext for 10.5.6 it is recognized and driver is loaded But that kext is not stable under SL
I changed my injection to exactly what you have above. If I do not p.ut Name (_SUN,One) it does not even show it on under PCI (About Mac).
If I put it, it shows it and changes the the Airport on the Slot to Slot one.
At any rate it does not load the driver.
Could I please ask you to look at my dsdt.aml and/or give me some suggestions as how I can resolve this issue?
I do appreciate it, and here are my ioreg dump and dsdt.dsl
Artimess


Click to view attachment
Click to view attachment
THe KiNG
QUOTE (18seven @ Jan 4 2010, 02:03 AM) *
Also, if you are not injecting new information why include it in your patch?

I have to add those for cosmetic and most important to fix a nasty error on boot(No interface name bla bla...)

QUOTE (artimess @ Jan 4 2010, 11:07 AM) *
Could I please ask you to look at my dsdt.aml and/or give me some suggestions as how I can resolve this issue?
I do appreciate it, and here are my ioreg dump and dsdt.dsl
Artimess

First you should do a serious cleanup on that DSDT, is a mess!
I have no idea what notebook is, but on PXS6(should be ARPT) that WOLI stuff on _PRW method dosen't look ok for me, also i'm not sure if _PSW method should be there...
I never used ChunNan PCI fix, why you needed that, what fixes for you(or in general)?
and BTW that ioreg is useless...
artimess
QUOTE (THe KiNG @ Jan 4 2010, 01:45 PM) *
I have to add those for cosmetic and most important to fix a nasty error on boot(No interface name bla bla...)


First you should do a serious cleanup on that DSDT, is a mess!
I have no idea what notebook is, but on PXS6(should be ARPT) that WOLI stuff on _PRW method dosen't look ok for me, also i'm not sure if _PSW method should be there...
I never used ChunNan PCI fix, why you needed that, what fixes for you(or in general)?
and BTW that ioreg is useless...

Thanks for your response. I certainly take your advise and try to clean up my DSDT. Can I have yours to use as a model, please?
What is useless about the ioreg? Do you mean I need to use some of parameters of ioreg command to have more info, if yes which one you suggest?, or is it useless as it does not help in my case?
And finally what ChunNan's patch does, enables my pci to pci bridges to show up under PCI in About Mac and loads the driver for them, that subsequently, I do not know how, enables my mini pci-e card to function.
My Laptop is a Toshiba Satellite U400E, it is a European model number, Intel Core 2 duo, with Intel 4500HD graphics card.
I do appreciate your help and looking forward to your suggestions.
Artimess
THe KiNG
A good ioreg is the one saved from IORegistryExplorer.app(u need XCode installed or just app), I hate txt one...w/o the full one.
You should looke here: http://www.projectosx.com/forum/index.php?...post&p=4154
What can be disabled can be enabled also wink.gif
your PCI2PCI bridge shouldn't be on system profiler displayed, yeah i know is nice to have those but is wrong, instead should be on IOreg, if not you should try to enable it.
I saw in your dsdt my first airport code, you should know that is working only on leopard and/or snow 32 bit.
Last one is for snow 64 bit(works on 32 or leo too) try to use latest one.
artimess
QUOTE (THe KiNG @ Jan 4 2010, 07:05 PM) *
A good ioreg is the one saved from IORegistryExplorer.app(u need XCode installed or just app), I hate txt one...w/o the full one.
You should looke here: http://www.projectosx.com/forum/index.php?...post&p=4154
What can be disabled can be enabled also wink.gif
your PCI2PCI bridge shouldn't be on system profiler displayed, yeah i know is nice to have those but is wrong, instead should be on IOreg, if not you should try to enable it.
I saw in your dsdt my first airport code, you should know that is working only on leopard and/or snow 32 bit.
Last one is for snow 64 bit(works on 32 or leo too) try to use latest one.

Hi The King,
Thanks for the hints and url that you sent me. I read your posting, I decided to follow and activate myself the port 5 and 6 to see if there will be any changes. So I downloaded ICH9 Spec and in fact I noticed that the necessary data is already defined in my DSDT! So my job was really easy to add Store (RP4D and RP5D,Zero) ton my _INI to activate them. Although they are by default active as they are shown in ioreg! The result did not give me anything on my AR5008! To make sure I was doing it right, I also tried another version just setting RP3D to active and I verified that it appeared in ioreg so my changes were correct.
I also used your second version of injection (0x2A) same result, no changes.
I am including two ioreg dumps, I hope you like them this time, one is with ChunNan's kext, as you will see in it, it recognizes the AR5008, and the other one without his Kext.
Any idea or suggestion to try?
Also in re-reading your post, you are talking about the fact that Port 5 and Port 6 are deactivated by intel EFI, do you think this might have something to do with in my case as mine sits on port 6, but then again if it was disabled it should never show up in ioreg, which is the case for my port 2 and port 3.
Looking forward to your ideas/suggestions to try. It seems I am not alone having this issue and by your help if I can resolve this issue a large community would benefit from it
Regards,
Artimess
Click to view attachment
Click to view attachment
THe KiNG
gimme also lspci -nnvvxxx from working/notworking, to see what changes...
Slice
2artimess
Did you ever tried my version of IOPCIFamily? I worked parallel to Chun-Nan for the same problem of bad PCI2PCIBridge. We have different solutions but for the same purpose.
http://www.projectosx.com/forum/index.php?showtopic=342
artimess
QUOTE (Slice @ Jan 5 2010, 02:25 PM) *
2artimess
Did you ever tried my version of IOPCIFamily? I worked parallel to Chun-Nan for the same problem of bad PCI2PCIBridge. We have different solutions but for the same purpose.
http://www.projectosx.com/forum/index.php?showtopic=342

Yes, I did try your solution did not work. But I will do it tonight as soon as I get home. Do you need any information when I try yours?
Thanks,
Artimess
artimess
QUOTE (THe KiNG @ Jan 5 2010, 08:39 AM) *
gimme also lspci -nnvvxxx from working/notworking, to see what changes...

Thank you so much, you will have them in couple of hours as soon as I get home
Do appriciate your help.
Artimess
artimess
QUOTE (THe KiNG @ Jan 5 2010, 08:39 AM) *
gimme also lspci -nnvvxxx from working/notworking, to see what changes...


Hi The King,
Here are the lspci listing that you requested:

with injection of device ids (ChunNan) Click to view attachment
with injection of device ids Click to view attachment
no injection in dsdt Click to view attachment
no injection in dsdt (ChunNan) Click to view attachment
with dsdt injection Click to view attachment
with dsdt injection Click to view attachment

Actually I created two working scenarios with ChanNun patch with and without dsdt injection. And two none working ones with and without dsdt injection.

Once again thanks for your help.
Artimess

PS:Slice had posted a message asking me to try his patch which is supposed to be similar to ChunNan's. I have already tried it and it did not work as I mentioned at the very beginning of our exchanges. Perhaps he could explain in technical term what is the problem and what his and ChunNan's work are supposed to rectify. I am not sure if I can pm him, but I will try. Hopefully he will see this posting and can explain the problem in more technical terms.
artimess
QUOTE (Slice @ Jan 5 2010, 02:25 PM) *
2artimess
Did you ever tried my version of IOPCIFamily? I worked parallel to Chun-Nan for the same problem of bad PCI2PCIBridge. We have different solutions but for the same purpose.
http://www.projectosx.com/forum/index.php?showtopic=342

Hi Slice,

Tried it again on a fresh install. Nothing changed, at least visually speaking, it did not solve the pci-e recognition...

Slice, could you please explain the problem that ChanNun and you tried to solve with your patchtes. I mean in technical terms
The King has been kind enough to look at this/my issue and your explanation may be helpful for him in resolving the problem through his knowledge of dsdt and intel components causing this issue.

Thanks again.
Artimess
THe KiNG
artimess You should use Chameleon features... since you are on a mobile platform, MacPro3,1 can't be your model...use MacBook3,1, also some device name you should use: ACAD=>ADP1, EC0=>EC, remove MCEH and add MCHC with _ADR 0x00(pci8086,2a40), BAT1=BAT0 or SMB0, P0P1=>PCIB, LID=>LID0, SAT0=>SATA, USB0-5=>UHC1-6, remove QWMI, THRM=>TZ00.

Looking on lspci dumps, noticed big changes, I will read ich9-m docs and see what can be done.

EDIT:
First test for you: Click to view attachment

I hope it will bring the magic smile.gif
Don't bother to change the names, I did it for you.
I need after test ioreg and lspci -s 00:1c.5 -nnvvxxx

Good luck!
Slice
QUOTE (artimess @ Jan 6 2010, 02:11 AM) *
Hi Slice,

Tried it again on a fresh install. Nothing changed, at least visually speaking, it did not solve the pci-e recognition...

Slice, could you please explain the problem that ChanNun and you tried to solve with your patchtes. I mean in technical terms
The King has been kind enough to look at this/my issue and your explanation may be helpful for him in resolving the problem through his knowledge of dsdt and intel components causing this issue.

Thanks again.
Artimess

Look our discussion from here, here, here, here, here and others.
In two words:
PCI structure consists of buses and bridges between them. Each bridge has numbers
PrimaryBus, SecondaryBus, SubordinateBus
Some people from Linux world discover that sometimes buses has wrong numbers so Chun-Nan made an algorithm to recursive renumerate the structure.
I notice that IOPCIFamily v1.6 already contains such renumeration and apply it to new release of IOPCIFamily.
I am not agreed with Chun-Nan method and later he decided to restrict his IOPCIFamily to use only for PCMCI inside of latest IOPCMCIFamily.kext.

I don't know but may be there is a method to renumerate some buses in DSDT?
If you want to continue the development and you are famous with C++ then you can look into my sources and make debug outputs (it is commented out) to see what is happen with your devices.
artimess
QUOTE (THe KiNG @ Jan 6 2010, 07:29 AM) *
artimess You should use Chameleon features... since you are on a mobile platform, MacPro3,1 can't be your model...use MacBook3,1, also some device name you should use: ACAD=>ADP1, EC0=>EC, remove MCEH and add MCHC with _ADR 0x00(pci8086,2a40), BAT1=BAT0 or SMB0, P0P1=>PCIB, LID=>LID0, SAT0=>SATA, USB0-5=>UHC1-6, remove QWMI, THRM=>TZ00.

Looking on lspci dumps, noticed big changes, I will read ich9-m docs and see what can be done.

EDIT:
First test for you: Click to view attachment

I hope it will bring the magic smile.gif
Don't bother to change the names, I did it for you.
I need after test ioreg and lspci -s 00:1c.5 -nnvvxxx

Good luck!

Hi The King,
Thanks a lot for cleaning up my dsdt and the new version. I tried it and I am sorry to say that it does not work.
Here is the situation:
1) In normal and safe boot I get the following message:
AppleAHCIPort::HandleInterruptRequest Port 0 - HBA has trouble accessing main memory going to restart port. intStatus 0xFFFFFF34
2) Builtin keyboard and mouse no longer function.
3) External USB keyboard and mouse do not function neither.
4) In single mode external keyboard works and that was my last hope to get you the lspci info! However, when I run lspci command I get the error message saying:Can not find any working access method. Tried to load lspcidrv.kext does not work.

5) In all cases the boot time is very very long, between 4 to 5 minutes.

I am ready for any other experiments and your new suggestions.
Regards,
Artimess
THe KiNG
Remove all PINI stuff and try again.
If the same, add the PINI stuff and the registers on your current working one and try again

I'll think on smth else.
artimess
QUOTE (THe KiNG @ Jan 6 2010, 09:03 PM) *
Remove all PINI stuff and try again.
I'll think on smth else.

Ok, I took off the PINI stuff and here are lspci's you requested

Click to view attachment with ChunNan fix (working)
Click to view attachment without ChunNan's fix not working
Click to view attachment After taking PINI stuff out

Looking forward to hearing from you.
Regards,
Artimess
artimess
QUOTE (THe KiNG @ Jan 6 2010, 07:29 AM) *
artimess You should use Chameleon features... since you are on a mobile platform, MacPro3,1 can't be your model...use MacBook3,1, also some device name you should use: ACAD=>ADP1, EC0=>EC, remove MCEH and add MCHC with _ADR 0x00(pci8086,2a40), BAT1=BAT0 or SMB0, P0P1=>PCIB, LID=>LID0, SAT0=>SATA, USB0-5=>UHC1-6, remove QWMI, THRM=>TZ00.

Looking on lspci dumps, noticed big changes, I will read ich9-m docs and see what can be done.

EDIT:
First test for you: Click to view attachment

I hope it will bring the magic smile.gif
Don't bother to change the names, I did it for you.
I need after test ioreg and lspci -s 00:1c.5 -nnvvxxx

Good luck!

Hi The King,

I found why the Enhanced DSDT that you sent me did not work at all! After you asked me to take out PINI stuff, to make sure I am doing right I used diffMerge in Linux to see the changes better, there I noticed in Name (BUF0, ResourceTemplate () starting in line 2376, lines 2491 was changed to " 0x000EC00, whereas in original it was 0x000EC000, and line 2515 was changed to 0x0EC0000, while the original one was 0x0EC00000,.

So I corrected these two errors just as guess for the issues that I explained that I had had in my first attempt to run the new DSDT that I got from you.

So this time I succeeded in booting and here are the lspci listings with dmesgs and the corrected DSDT. Now I can go and get some sleep!

Click to view attachment with ChunNan's patch
Click to view attachment without ChunNan's patch
Click to view attachment with minor corrections that I explained above
Click to view attachment without ChunNan's patch
Click to view attachment with ChunNans' patch
Looking forward to hearing from you and many thanks again.
Regards,
Artimess

artimess
QUOTE (Slice @ Jan 6 2010, 02:32 PM) *
Look our discussion from here, here, here, here, here and others.
In two words:
PCI structure consists of buses and bridges between them. Each bridge has numbers
PrimaryBus, SecondaryBus, SubordinateBus
Some people from Linux world discover that sometimes buses has wrong numbers so Chun-Nan made an algorithm to recursive renumerate the structure.
I notice that IOPCIFamily v1.6 already contains such renumeration and apply it to new release of IOPCIFamily.
I am not agreed with Chun-Nan method and later he decided to restrict his IOPCIFamily to use only for PCMCI inside of latest IOPCMCIFamily.kext.

I don't know but may be there is a method to renumerate some buses in DSDT?
If you want to continue the development and you are famous with C++ then you can look into my sources and make debug outputs (it is commented out) to see what is happen with your devices.

Thanks for the info, unfortunately I am not a developer otherwise I would have accepted your offer. However,there must be something he is doing that his algorithm is detecting what yours does not. I understandt that you do not agree with the way he is doing it. Now the question is if you have his sources, perhaps you could build a version for SL and help the community by giving them another choice... And finally where is this IOPCIFamily v1.6 that your are mentioning?

Thanks,
Artimess
Slice
QUOTE (artimess @ Jan 7 2010, 03:46 AM) *
Thanks for the info, unfortunately I am not a developer otherwise I would have accepted your offer. However,there must be something he is doing that his algorithm is detecting what yours does not. I understandt that you do not agree with the way he is doing it. Now the question is if you have his sources, perhaps you could build a version for SL and help the community by giving them another choice...

I have very first version of Chun-Nan sources that is not working. I know his method but I don't know how to make it working.
QUOTE
And finally where is this IOPCIFamily v1.6 that your are mentioning?

It can be compiled from 10.4.5 sources but it included in my version of IOPCIFamily all version. No news here.
THe KiNG
@artimess after I looked deep in your DSDT I foun that your IRQ routing is a BIG mess.
Working to correct that, and soon I'll gave you a DSDT to test.
artimess
QUOTE (THe KiNG @ Jan 7 2010, 06:41 PM) *
@artimess after I looked deep in your DSDT I foun that your IRQ routing is a BIG mess.
Working to correct that, and soon I'll gave you a DSDT to test.

Thank you so much; I am in debt to you, and pleas etke your time.
Regards,
Artimess
THe KiNG
A test for you: Click to view attachment
Test it and if works(at least to get on GUI) gimme full ioreg and lspci -nnvvxxx.

Good luck!
artimess
QUOTE (THe KiNG @ Jan 7 2010, 08:42 PM) *
A test for you: Click to view attachment
Test it and if works(at least to get on GUI) gimme full ioreg and lspci -nnvvxxx.

Good luck!

Hi,
No unfortunately the keyboard and the mouse (both internal and external are blocked). Error that I see in dmesg is:
1) In normal and safe boot I get the following message:
AppleAHCIPort::HandleInterruptRequest Port 0 - HBA has trouble accessing main memory going to restart port. intStatus 0xFFFFFF34.

Regards,
Artimess
PS:I tried to write an script so that this could be done without mouse and keyboard, it seems IORegisteryExplorer seems not scriptable.
THe KiNG
OK.
Last thing for you to try:
Disable RP05
test
Disable RP05 and RP01
test
Also boot a live linux and save dmesg.
artimess
QUOTE (THe KiNG @ Jan 9 2010, 08:44 PM) *
OK.
Last thing for you to try:
Disable RP05
test
Disable RP05 and RP01
test
Also boot a live linux and save dmesg.

The King,
Once again thanks for all the help you are giving me, it is truly generous of you. I tried disabling RP05, and then RP05, RP01 as you instructed. In both cases the system does not even get far in boot process, tt hangs almost immediately in boot process. I do not see any meaninful message when it happens
And here is the dmesg, I used Mint 8 (Ubuntu based) live CD to get the dump.
Regards,
Artimess

Click to view attachment
barnum
Hi the king,

Can you provide us your dsdt.dsl file as an example ?
Can you also tell me what version of mac you have in your smbios.plist ?

regards,
Barnum
Brett Whinnen
This is great! Modifying the registers manually is a brilliant idea. I've been running through the ICH8 manual from Intel and am trying to figure out what I need to change in order to get a PCi (well mini-PCi) card to change the subsystem-vendor and subsystem-device id's. I was looking at the 32bits from offset 0x94 for the PCi, but I don't think that is right.

CODE
18.1.41 SVID—Subsystem Vendor Identification Register (PCI Express—D28:F0/F1/F2/F3/F4/F5)

Address Offset:    94h–97h    Attribute:    R/WO Default Value:    00000000h    Size:    32 bits

31:16
Subsystem Identifier (SID) — R/WO. Indicates the subsystem as identified by the vendor. This field is write once and is locked down until a bridge reset occurs (not the PCI bus reset).
15:0
Subsystem Vendor Identifier (SVID) — R/WO. Indicates the manufacturer of the subsystem. This field is write once and is locked down until a bridge reset occurs (not the PCI bus reset).


I'm trying to be a perfectionist and am running through one by one to change to Apple rather than the Dell I have, am working on the Dell 1505 wireless card at the moment and want to change it from a 1028:000a (BCM4328 card) to 106B:0088 (which is the BCM4328 card used in a MacBook4,1).

I've got System Profiler reporting the correct settings for the card in the right spots.

Thanks, specially to THe KiNG for all his research.

Brett
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.