Help - Search - Members - Calendar
Full Version: [HOWTO] Show PCI Cards on System Profiler - using EFI strings
InsanelyMac Forum > OSx86 Project > Tutorials (The Genius Bar)
ffosilva
Hi people! Sorry for my bad english, I'm brazilian... but see below if you understand anything. =P

Requeriments:
- gfxutil;
- knowledge about making efi strings;
- ioreg
- Some patience.

First you need is discover the DevicePath for each PCI Card. Using ioreg (type ioreg in Terminal) with gfxutil is easy. Search for each 'IOPCI2PCIBridge' (or similar) on your ioreg output and see if it have any device connected to it. If have, you can make it visible on System Profiler. On this guide I'll show to you what I did to show my JMicron Built-in Controller.

On the first picture, you see that on marked IOPCI2PCIBridge that I have 2 devices connected to it. JMB0@0 and JMB1@0,1. JMB0 you see that it's a AHCI Controller and JMB1 IDE Controller part, but I don't wanna IDE, only AHCI (remember, you can do it with every PCI devices connected to IOPCI2PCIBridge). Run 'gfxutil -f DEVICE', and as you see, on device i don't put @xxx, only what I see before @. If you have 'JMB0@0' on ioreg do 'gfxutil -f JMB0'. If you have 'pci1106,3044@0' on ioreg do 'gfxutil -f pci1106,3044'. After using 'gfxutil -f DEVICE' as explained before you get DevicePath.

On your EFI Strings file, add a entry of your device. For example, I'm showing what I did with my JMB0 device.
CODE
<key>PciRoot(0x1)/Pci(0x1c,0x3)/Pci(0x0,0x0)</key>
<dict>
<key>AAPL,slot-name</key>
<string>Built In</string>
<key>model</key>
<string>Gigabyte GBB363 SATA-II RAID Controller</string>
<key>device_type</key>
<string>AHCI Controller</string>
</dict>


As you see I have 3 entrys. On first 'AAPL_slot-name', type slot name that you wanna see. On RAID controler I typed Built In, but you can use what you want. i.e Slot-I, Slot-A, Hamburger, Pizza... =)

On second 'model' you change Card Name and 'device_type' you set Type that appear on PCI Cards screen.

I'm not good making how to, but I'm leaving a System Profiler screenshot and my EFI Strings plist to you see what I did. Remember that DevicePath are differents for each machine.

Important: on display cards or network cards you don't need to set 'model' or 'device_type', only AAPL,slot-name. On display cards model and device_type are set by standard (device_type as 'display' and model as card name). On ethernet device_type as 'Ethernet Controller', but you can set model. It doesn't work with AZALIA or HDEF.

If you already use any PCI device on efi strings, you need only add these keys on existing string, not making a new one. i.e: if you use efi-strings for graphics card, only add AAPL,slot-name key, and not create a new entry only for it.
aliasa_anderson
A link to efi strings will be very helpful.
If possible ,please add the location of efi file,i mean the directory/path where it resides.
peach-os
good idea! cool work wink.gif will try it
Cebit
Kudos smile.gif
aliasa_anderson
Just a quick question:
Shouldn't these settings be detected automatically.Why it is that these devices don't show up in system profiler even they are present in ioreg ?
ffosilva
It doesn't show up in system profiler because AppleSMBIOS search for 'AAPL,slot-name' key on pci cards, but doesn't find it. I think in a near future we can make a 'injector' that reads 'ioreg' out and inject efi code of each card automatically.

aliasa_anderson: you make these mods on efi strings, search for it on netkas forums.
aliasa_anderson
QUOTE(ffosilva @ Nov 6 2008, 07:15 PM) *
It doesn't show up in system profiler because AppleSMBIOS search for 'AAPL,slot-name' key on pci cards, but doesn't find it. I think in a near future we can make a 'injector' that reads 'ioreg' out and inject efi code of each card automatically.

aliasa_anderson: you make these mods on efi strings, search for it on netkas forums.


Thanks ffosilva.I will look at netks.org.

One more question since you may have come across it ,if we use injectors for getting devices work,will this method break them.

For eg i use nvinject for nvidia go 7400 and for Conexant HD audio i use AppleAzalia.
Now in ioreg i can see devices like vga@,HDEF@ etc in IOPCI2PCIBridge but none is displayed in system profiler under "PCI devices" tab.

Please Help.
Thanks once again.
ffosilva
Where I say injector I'm talking about create a new injector to add these strings automatically to IORegistry.
peach-os
doesnīt work for me. because your guide is not really clear for me I tried it several ways:

1. wrote a plist with the pci roots and settings for my two graphic cards and my uad pci card.
created one hex file with gfxutil.

2. created seperate hex files for the graphic cards and the pci card. merged the two hex files.
(this is how I understood your instructions, but couldnīt imagine that it would work this way)

problem was also that ioreg didnīt give me the pci root for the card. efistudio did it flawless.


could be a small thing I missed wacko.gif
ffosilva
QUOTE(peach-os @ Nov 7 2008, 08:03 PM) *
doesnīt work for me. because your guide is not really clear for me I tried it several ways:

1. wrote a plist with the pci roots and settings for my two graphic cards and my uad pci card.
created one hex file with gfxutil.

2. created seperate hex files for the graphic cards and the pci card. merged the two hex files.
(this is how I understood your instructions, but couldnīt imagine that it would work this way)

problem was also that ioreg didnīt give me the pci root for the card. efistudio did it flawless.
could be a small thing I missed wacko.gif


Sorry If i'm not clear! Well, you don't need to make two files for efi strings (and merge it), you make only one as you see in my example.

If you want send to me your graphics card efi-string and I'll patch it for you.
peach-os
QUOTE(ffosilva @ Nov 7 2008, 11:08 PM) *
Sorry If i'm not clear! Well, you don't need to make two files for efi strings (and merge it), you make only one as you see in my example.

If you want send to me your graphics card efi-string and I'll patch it for you.



here is the plist Click to view attachment

thanks smile.gif
ffosilva
you did some mistakes as opened a dictionary and don't closed and puttet <key>AAPL.slot-name</key> instead <key>AAPL,slot-name</key>. Try these now.
peach-os
QUOTE(ffosilva @ Nov 8 2008, 01:20 PM) *
you did some mistakes as opened a dictionary and don't closed and puttet <key>AAPL.slot-name</key> instead <key>AAPL,slot-name</key>. Try these now.


Click to view attachment

rolleyes.gif I knew it was something small like that - shouldnīt edit such files during the night.

thank you ! smile.gif
MikeHunt79
QUOTE(peach-os @ Nov 6 2008, 02:33 PM) *
good idea! cool work wink.gif will try it

I'll give it a whirl also - Another step closer to a real mac wink.gif
BladeRunner
Very nice. Thanks for sharing.

Since I already had the efi strings for my ethernet card and nvidia display card, all I needed to do was add the following:

CODE
        <key>AAPL,slot-name</key>
        <string>Slot-1</string>


to my working gfxutil plist at the top of each section and generate a new hex string. Replaced the device string in com.apple.boot.plist and reboot.

Many thanks.
Alex HQuest
Click to view attachment

Cool, thanks for the tip.
ffosilva
you're welcome. =P
aliasa_anderson
QUOTE(ffosilva @ Nov 6 2008, 07:15 PM) *
It doesn't show up in system profiler because AppleSMBIOS search for 'AAPL,slot-name' key on pci cards, but doesn't find it. I think in a near future we can make a 'injector' that reads 'ioreg' out and inject efi code of each card automatically.

aliasa_anderson: you make these mods on efi strings, search for it on netkas forums.



Hi ffosilva,

I think I have the answer to my own question.

If have a correctly compiled DSDT and i use chameleon with DSDT override feature,i should be able to see these devices in system profiler without manual work.

What do you think ?

ffosilva
Adding name _SUN to each PCI lane reference in DSDT does this work, but you'll don't see detailed information about cards, you still need to add 'model' to see correct cards name.

This thread is about doing it using EFI strngs, and not DSDT. DSDT is another way. =P
sonotone
Thanks for this, useless but i like it wink.gif

Just two adds:

- If a name is not specified (like pci1180,8...), in the .plist file, we can add:
CODE
<key>name</key>
<string>your card</string>

- Some ioreg entries aren't clear about some hardware, so LSPCI (osx86tools provide it) is usefull to find controller's names.

PS: don't use a custom name for graphics.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.