That works too as long as the hw can be parsed by MF. If you go route #2 from my original suggestion, there is no resource arbitration to the children. The PDO knows its resources b/c it is the same driver as the parent. To get the resources from the serial like FDO, you manually query the PDO for the resources. In the end, no resources are “officially” assigned to the PDO as far as NTOS is concertned, but you can still retrieve them from higher in the stack.
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Roddy
Sent: Friday, June 04, 2004 4:56 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] multiport serial device
Why not use the multifunction support in mf.sys instead of writing a
(massively undocumented) resource-allocating bus driver from sratch? While
the mf documentation is a bit skeletal and cryptic, I happen to know from
experience that mf does work and does allow you to poof up serial ports
without having to write either a serial driver or a bus driver.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Friday, June 04, 2004 6:09 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] multiport serial device
The COM port interface is not a WDM interface. Serial.sys is
the best example you will have.
The multiport serial support in serial.sys is for ISA devices
and for a very limited set of MPS ISA cards. Ignore it, it
is not relevant for your device.
If your MPS device is basically N times 16550 UARTs and they
are expressed as such (ie 8 1 one byte registers + an
interrupt), you can write a bus driver for your device and
assign each uart to a PDO and then load serial on top of each
PDO. That should work (in theory :).
Otherwise, what I would do is still write a bus driver and
create a child for each port. Then, write another driver
that will control each child. This driver is probably going
to be a 90% wholesale copy of serial.sys. What you would change is
- how you get the resources for each port. I would use
IRP_MN_QUERY_INTERFACE to ask the bus driver to return to you
a set of resources during start device
- how you touch these resources if the serial source isn’t
doing that properly
- if each port is not a true 16550, you might need to
change serial source to touch the hardware as appropriate
- name the driver something other then serial.sys

- install each child under the Ports class. This will auto
assign you the correct COM port number. In the INF you can
specify serenum as the upperfilter (see msports.inf on how to
do that) and then you get serial enumeration as well.
d
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Larson, Jeffrey
Sent: Friday, June 04, 2004 2:58 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] multiport serial device
?
I am fairly new to driver writing and I am trying to figure
out the best approach to writing a driver for a multiple
serial port pci board. It needs to run on w2k and xp.? Can
someone help me and verify a few assumtions I am making?
?
- First off, there is no wdm-based serial driver example that
I could find (at least in DDK) - true?
?
- I notice that in the nt ddk serial port example, there is
multiport support.? However, from what I have read, it looks
like?my driver?needs to be a function driver (i.e. I can’t
implement a filter driver above serial.sys, even though the
uarts are standard).??So, I have to implement a separate
driver from serial.sys since this driver is directly
controlling hardware. true?
?
- My current approach is to take?appropriate?chunks of?code?
from?the NT-based ddk serial driver, and wedge it into a wdm-> based pci
device driver skeleton.? Also, to make use of
serenum.sys to enumerate COM3-COM10.? COM1,2 also use
serenum.sys and are attached to serial.sys.? Does this sound right?
?
any insight into this would be appreciated, Jeff
?
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as:
xxxxx@windows.microsoft.com To unsubscribe send a blank
email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as:
xxxxx@hollistech.com To unsubscribe send a blank email to
xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com