PDA

View Full Version : PCI Graphics Driver for Mac




skumar2011
Feb 7, 2007, 09:21 AM
Hi Guys,

I am looking for the sample code of PCI Graphics Driver.
On searching on net I got only one pdf Writing PCI Driver which is not very helpful to develop the driver for any PCI device.

Can any body suggest me the helful link to get the sample code?

Thanks and regard,
Sunil.



robbieduncan
Feb 7, 2007, 09:41 AM
Have you written low level device drivers before? If not then find a simpler device to start with than a graphics card!

You might want to read the various pages and samples on the developer site (http://developer.apple.com/hardwaredrivers/).

Edit to add Specifically here (http://developer.apple.com/documentation/DeviceDrivers/Conceptual/WritingPCIDrivers/index.html)

skumar2011
Feb 8, 2007, 03:28 AM
thanks robbieduncan for your reply

I have already developed a driver for Mass Storage device.
Now I want to develop driver for PCI Graphics Card but don't have any sample code to start with.

Please suggest me some link.

Thanks,
Sunil.

robbieduncan
Feb 8, 2007, 03:57 AM
This appears to be all there is (http://developer.apple.com/samplecode/HardwareDrivers/idxPCIandPCCard-date.html) in terms of PCI stuff. Apple provide all the graphics drivers for supported cards so there is probably no sample code.

skumar2011
Feb 9, 2007, 09:06 AM
I have my own PCI graphics card with some different functionality for this i want to write driver.

Fearless Leader
Feb 9, 2007, 05:33 PM
what is the card? If I understand you correctly you want to write a driver to add functions that your card supports but osx doesn't.

ChrisA
Feb 9, 2007, 07:28 PM
Hi Guys,

I am looking for the sample code of PCI Graphics Driver.
On searching on net I got only one pdf Writing PCI Driver which is not very helpful to develop the driver for any PCI device.

Can any body suggest me the helful link to get the sample code?

Thanks and regard,
Sunil.

You best example will be X11 on Darwin. There is an effort underway to move Mac OS' X11 from xfree86 to x.org Lots on active forum traffic on this subject

skumar2011
Feb 10, 2007, 12:36 AM
yes Rokem u r right.

I have my own PCI graphic card with following spec:

Bus: PCI 64bit/66 MHz
Slot: PCI 32bit 64bit or PCI-X card slot3
memory256 MB
Connection Dual DVI-I connectors 1 or 2 displays
LUT: 2 different for both displays

which is having some different functionality which is not supported by Mac OS X in built drivers.

Looking for sample code to start my own driver development.

Fearless Leader
Feb 10, 2007, 01:45 AM
Was this card developed for a mac originally or like a windows or Linux box? I am assuming you're using a G3/G4/G5 tower? And does it do anything right now, as in is it usable?

The reason I ask these is to make sure we're going at this at the right angle.

skumar2011
Feb 10, 2007, 04:46 AM
thnaks Rokem for the quick reply

Linux driver for this card already developed, now I want to deveop it for Mac.
After going though specification of PCI Expansion slot of Mac, i came to know that only Power Mac G5 supports my PCI Card. The reason behind this is Power Mac G5 contain PCI-X slot which runs at max 133MHz. The PCI slots which are in G3,G4,G5 supports only 33MHz but my Card specs which I have already posted say 66MHz. Also new generation Mac Pro only contains PCI Express (PCI-E) slot which is incompatible with earlier PCI cards.

am i right?

Fearless Leader
Feb 10, 2007, 03:46 PM
you are right that the new mac pro wont support it. Is the driver for an x86 version of linux or a version based off ppc?

If it was based off x86 you'll have to also rewrite the bios for the card itself.


I found this. It should be helpful, maybe not. I don't write drivers. ftp://ftp.apple.com/developer/Development_Kits/PCI_DDK_3.0.dmg

There was a nice pdf, a bit dated, but should help.

skumar2011
Feb 12, 2007, 01:18 AM
thanks for giving the link.

I gone through the link and downloaded the dmg, is not very much helpful and the sample given in this is based on Mac Classic, i m trying to implement it in Mac OS X.


PCI graphics card driver for linux is of x86 version.

Fearless Leader
Feb 12, 2007, 07:29 PM
Even if you do write the driver you will have to rewrite the BIOS of the card. This is impossible If your not A) a the vendor, B) apple, Or C) if their isn't an existing bios for osx.

skumar2011
Feb 13, 2007, 03:50 AM
as a vendor to develop BIOS for the card what information regarding PCI Graphics Card i supposed to have?

caveman_uk
Feb 13, 2007, 05:31 AM
If you are the vendor then perhaps you should contact Apple for info?

Fearless Leader
Feb 13, 2007, 07:21 AM
yah I really have no clue. Im only good for pointing out problems. My area of (expertise?) is modifing fcode BIOS's from NVIDIA. You'd need full documentation of the card and start talking to apple.

skumar2011
Feb 14, 2007, 02:36 AM
I m not getting that If i have my own graphic card with all the specification then what is the reason to contact Apple?

What information they will provide?

Any link writing the BIOS for device in Mac?

Please tell me in detail.

caveman_uk
Feb 14, 2007, 02:51 AM
I m not getting that If i have my own graphic card with all the specification then what is the reason to contact Apple?

What information they will provide?

Any link writing the BIOS for device in Mac?

Please tell me in detail.
Look, we don't know. I'm not sure if you really are the vendor as you said. The vendor is the manufacturer of the card. From your later posts it sounds like you are an end-user. If you were the former then Apple would surely be the people most likely to be able to help you write a driver/BIOS. They have previous experience and know exactly how their computers work. I can't think of anyone (outside of the cards chipset manufacturer) that would be more likely to be able to provide assistance.

Certainly they're a million times more likely be able to help than us.