HELP!! Example PCI functional driver in the DDK ...

Hello,

I have been looking for an example PCI functional driver in the DDK by searching for references to functions in the Pci driver “API” to no avail. I will start working on a driver that will sit on top of the PCI bus driver. Any pointers to code will be greatly appeciated!

Regards, Vasili


Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine’s Day

I’m not sure what you are asking for here. The PCI bus driver will control the PDO for your device. This is the same PDO passed to your AddDevice function when you create your low level FDO for your device.

There is no “API”, but simply the IRP’s which are passed down to the PDO in order to be completed. In some cases you may need to pass them down and perform some processing after the PDO has completed any work it needs, or desires to, in response to the IRP.

If you are looking for an example of your FDO and it’s interface to the PDO controlled by the PCI bus driver, I would suggest you look at the Toaster sample. That sample provides a vasic demonstration of a bus driver managing the PDO’s for devices connected to it. It is rather simplistic in that it does not conform to any Standard, such as a PCI bus driver might need to do, but it may give you the insights for which you are looking.

“Galchin Vasili” wrote in message news:xxxxx@ntdev…
Hello,

I have been looking for an example PCI functional driver in the DDK by searching for references to functions in the Pci driver “API” to no avail. I will start working on a driver that will sit on top of the PCI bus driver. Any pointers to code will be greatly appeciated!

Regards, Vasili

------------------------------------------------------------------------------
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine’s Day

I think Walter’s book gives you an example, and is worth the cost.

Gary G. Little
Have Computer, will travel …
909-698-3191
909-551-2105
“Del Fredricks” wrote in message news:xxxxx@ntdev…
I’m not sure what you are asking for here. The PCI bus driver will control the PDO for your device. This is the same PDO passed to your AddDevice function when you create your low level FDO for your device.

There is no “API”, but simply the IRP’s which are passed down to the PDO in order to be completed. In some cases you may need to pass them down and perform some processing after the PDO has completed any work it needs, or desires to, in response to the IRP.

If you are looking for an example of your FDO and it’s interface to the PDO controlled by the PCI bus driver, I would suggest you look at the Toaster sample. That sample provides a vasic demonstration of a bus driver managing the PDO’s for devices connected to it. It is rather simplistic in that it does not conform to any Standard, such as a PCI bus driver might need to do, but it may give you the insights for which you are looking.

“Galchin Vasili” wrote in message news:xxxxx@ntdev…
Hello,

I have been looking for an example PCI functional driver in the DDK by searching for references to functions in the Pci driver “API” to no avail. I will start working on a driver that will sit on top of the PCI bus driver. Any pointers to code will be greatly appeciated!

Regards, Vasili

----------------------------------------------------------------------------
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine’s Day

Thank you, Gary. I think I have Walter’s book. I think I understand now. A lot of the problem is solved/driven by the driver’s .inf file. The .inf file will specify that the bus dri8ver is PCI and .inf will also have vendor id, device id and all sorts of PCI resource info. Yes?
Regards, Vasili
“Gary G. Little” wrote:I think Walter’s book gives you an example, and is worth the cost.

Gary G. Little
Have Computer, will travel …
909-698-3191
909-551-2105"Del Fredricks" wrote in message news:xxxxx@ntdev…I’m not sure what you are asking for here. The PCI bus driver will control the PDO for your device. This is the same PDO passed to your AddDevice function when you create your low level FDO for your device. There is no “API”, but simply the IRP’s which are passed down to the PDO in order to be completed. In some cases you may need to pass them down and perform some processing after the PDO has completed any work it needs, or desires to, in response to the IRP. If you are looking for an example of your FDO and it’s interface to the PDO controlled by the PCI bus driver, I would suggest you look at the Toaster sample. That sample provides a vasic demonstration of a bus driver managing the PDO’s for devices connected to it. It is rather simplistic in that it does not conform to any Standard, such as a PCI bus driver might need to do, but it may give you the insights for which you are looking. “Galchin Vasili” wrote in message news:xxxxx@ntdev…
Hello,

I have been looking for an example PCI functional driver in the DDK by searching for references to functions in the Pci driver “API” to no avail. I will start working on a driver that will sit on top of the PCI bus driver. Any pointers to code will be greatly appeciated!

Regards, Vasili

---------------------------------
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine’s Day—
You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine’s Day

Thank you, Gary. I think I have Walter’s book. I think I understand now.
A lot of the problem is solved/driven by the driver’s .inf file. The
.inf file
will specify that the bus dri8ver is PCI and .inf will also have vendor
id, device id and all sorts of PCI resource info. Yes?

Almost. You’ll have a model statement in the INF file that will read
like this:

“My Widget”=DriverInstall,PCI\VEN_xxxx&dev_yyyy

Since PCI is a true Plug and Play bus, the PCI bus driver will read the
BARs in your configuration space and assign memory and port addresses as
well as an IRQ. It will pass this information to you in an
IRP_MN_START_DEVICE request. Check out either PCI42 or PKTDMA in my book
for examples of how to handle START_DEVICE – it’s in the function
called StartDevice.


Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com

Walter,
So when I get Resources in my driver the base address of my device will be in the Resource data structure, yes?
Regards, Vasili
Walter Oney wrote:Thank you, Gary. I think I have Walter’s book. I think I understand now.
A lot of the problem is solved/driven by the driver’s .inf file. The
.inf file
will specify that the bus dri8ver is PCI and .inf will also have vendor
id, device id and all sorts of PCI resource info. Yes?

Almost. You’ll have a model statement in the INF file that will read
like this:

“My Widget”=DriverInstall,PCI\VEN_xxxx&dev_yyyy

Since PCI is a true Plug and Play bus, the PCI bus driver will read the
BARs in your configuration space and assign memory and port addresses as
well as an IRQ. It will pass this information to you in an
IRP_MN_START_DEVICE request. Check out either PCI42 or PKTDMA in my book
for examples of how to handle START_DEVICE – it’s in the function
called StartDevice.


Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com


You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

---------------------------------
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine’s Day