overdue-scratch

Author Topic: [PATCH] Injecting vendor-id, device-id etc. from PCI ID  (Read 7735 times)

0 Members and 1 Guest are viewing this topic.

tennisgeek

  • Observer
  • Posts: 15
  • If ur age < 30, I'm programing longer than ur life
[PATCH] Injecting vendor-id, device-id etc. from PCI ID
« on: April 13, 2010, 07:52:29 AM »
I put in a feature request, but, I couldn't wait...

What I want is have /Extra/pci.plist file. ex.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>pci8086,27c5</key>
   <string>8086 27c5 8086 7270</string>
</dict>
</plist>

That's my SATA controller, injecting vendor-id, device-id, subsystem-vendor-id, subsystem-id.
I can clean off many of _DSM methods from DSDT.dsl, and when the device is not present, there is no unnecessary entry in DSDT table since it patches up the devices in the box.

If you need to override device ID of SATA controller, USB or graphics card, no problem. And, you no longer need to worry about devices you are going to pull out when you use pci.plist since Cham does not inject the device-id if it's not in PCI path.

The diff is against trunk but it includes my "config=" changes as well, unfortunately.

Cheers.


P.S.
Well, my disk is still orange. I need to look for elsewhere.

ANARCHiNTOSH

  • Observer
  • Posts: 11
  •  + Ⓐ
    • My InsanelyMac Page
Re: [PATCH] Injecting vendor-id, device-id etc. from PCI ID
« Reply #1 on: June 14, 2010, 05:56:23 PM »
hello tennisgeek, do you think this would work for injecting a whole graphics card plist?
as in instead of converting to hex and putting in boot.plist .....
thanks for the patch!
 10.6.3 Retail GA-EX58-UD5 and ATI4350

Kabyl

  • VoodooLabs
  • Posts: 158
Re: [PATCH] Injecting vendor-id, device-id etc. from PCI ID
« Reply #2 on: June 15, 2010, 05:13:21 AM »
tennisgeek, this is very useful, thanks.

ANARCHiNTOSH, it can be done :)

tennisgeek

  • Observer
  • Posts: 15
  • If ur age < 30, I'm programing longer than ur life
Re: [PATCH] Injecting vendor-id, device-id etc. from PCI ID
« Reply #3 on: June 15, 2010, 05:20:48 AM »
For graphics card, I think "GraphicsEnabler" is much better option than this. It is far more powerful/intelligent than this small patch.

For manipulating _DSM section of device, I think my patch is "half baked".
It can be far more useful if you can manipulate entire _DSM, and this patch is about 1/3rd of way there.
At least, my patch is one step to the right direction (I hope.)

The other useful feature is to remove entire Device when the actual device is not installed on the machine.

The end goal is to have a universal DSDT.aml that you can distribute, and Chameleon adds or subtracts depending on the actual hardware installed on particular machine.
This would allow Chameleon users to exchange DSDT.aml without worrying too much about the hardware differences.

-- TG

ANARCHiNTOSH

  • Observer
  • Posts: 11
  •  + Ⓐ
    • My InsanelyMac Page
Re: [PATCH] Injecting vendor-id, device-id etc. from PCI ID
« Reply #4 on: June 18, 2010, 01:24:46 PM »
hey tennisgeek! would you maybe be willing to adapt your patch for me to my concept? i do not know C  :(

heres my concept, a quote taken from my feature request thread (http://forum.voodooprojects.org/index.php/topic,1440.0.html)
It would be cool if you could name plists specially, so that chameleon would inject them as a device-properties entry:
the plist in /Extra could just have an extra filename extension. so for autopatching the device-address of a plist with the graphics card address detected by chameleon it would be appended with inject.gfx.plist
eg. NVGTX250.inject.gfx.plist

and to inject a plist without overwriting the device-address of the custom plist
- possibly needed for a dual gpu card like gtx295
it would only be named inject.plist
eg NVGTX295.inject.plist

chameleon would then just automaticly inject any plists appended inject.plist or inject.gfx.plist
any plist named inject.gfx.plist would use chameleons ability to detect graphics card device-address

I do like GraphicsEnabler, but sometimes a little more control is needed, especially for those cards it does not work with....
BTW you have been programming for longer than my life
 10.6.3 Retail GA-EX58-UD5 and ATI4350