There are two basic approaches you can do for this problem:
- Create a bus driver to enumerate the PDO’s for each UART. If your
device has totally separate register spaces, and unique interrupts for the
devices, the MF.sys is the bus driver of choice. Otherwise, if you have
any shared registers or interrupts create a simple bus driver with KMDF with
access to any shared resources being controlled by the bus driver.
Once you have the individual devices, you should take the serial
sample from the WDK and modify it for your needs. If you UART’s look like
16550’s then this is pretty easy. If you are sharing some resources, those
areas of the driver as well as the adddevice/removedevice need some support.
- Create a monolithic driver for all four UART’s. This would create four
FDO’s that attach to the one PCI device PDO for the system. This is
typically more work since the serial driver sample needs a lot of tweaking.
I’ve done this type of work for multiple customers, it is not hard, but the
learning curve for Windows drivers will keep you going for a few months on
this one.
Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Monday, May 12, 2014 12:56 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Multiport serial driver design queries
Hi,
I have read some posts in this forum about this topic but i still have some
specific questions.
i am new to driver development and i am designing a driver for a PCI-E based
multi port serial controller. This controller has 4 UART ports to which
target devices may be connected. The UART ports need to be exposed as COM
ports to the user applications.
- My current design idea for initializing the driver given below. Please
suggest if this design has any problems.
I will have only one driver. I will create a functional device object for
the controller in the driver. For the 4 UARTs, i will create 4 PDOs and keep
them as RAW. I will create device interfaces for all the PDOs and attach
symbolic links to these. These symbolic links will be exposed to the user
applications.
-
I read about the windows component MF.sys in MSDN. What is the role of
MF.sys driver in this case ? Do i need to be concerned about this while
designing my driver?
-
While creating the device interfaces for the PDOs for UART ports, what is
the GUID that i need to use?
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer