- Handling multiple devices on one PCI board
- Posted by Willem Kemp on February 25th, 2005
Hi all,
I am in process of writing a driver for a PCI card with four identical
serial communications controllers on it, mapped to different address
spaces. I want to offer the user mode application the ability to open a
handle to a specific core, and make Read and Write calls to it. Is this at
all possible, or do I have to resort to a set of IOCTL calls for each
core, and ensure that two user mode calls do not simultaneously access the
same core? (As I understand it, you can open multiple handles to your
device driver)
Thanks,
Willem
- Posted by Don Burn on February 25th, 2005
First, do these appear as seperate PCI functions, or as one? If they are
seperate PCI functions then the OS should create devices for each of them.
If not consider creating a bus driver to split out the four devices, and a
function driver to handle each. In either case if you only want one user
for the core, make the device exclusive.
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
"Willem Kemp" <willem.kemp@nospam.xstreamflow.com> wrote in message
news
psmrazwu4yejgkr@willem.rapidm.com...
Hi all,
I am in process of writing a driver for a PCI card with four identical
serial communications controllers on it, mapped to different address
spaces. I want to offer the user mode application the ability to open a
handle to a specific core, and make Read and Write calls to it. Is this at
all possible, or do I have to resort to a set of IOCTL calls for each
core, and ensure that two user mode calls do not simultaneously access the
same core? (As I understand it, you can open multiple handles to your
device driver)
Thanks,
Willem
- Posted by Mark Roddy on February 25th, 2005
Don Burn wrote:
If the PCI device puts all the serial controllers in one function then
before going off and writing a bus driver, first look at the existing
'multifunction driver' mf.sys, as you may very well be able to not have
to write a bus driver at all. In fact if the controllers present
standard serial port interfaces, you can, with the assistance of mf.sys
avoid writing anything other than an inf file and let serial.sys provide
the serial port functions. If you do have to write a bus driver, there
are issues with dividing resources (especially interrupt resources) that
are difficult to deal with. You might want to research this newsgroup
and the ntdev email list as we have discussed the design issues for this
sort of device several times. Just do a google groups on "mf.sys" and
also on "mf.sys arbiter".
--
=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com