Hi All,
I do not understand the scope of Lower filter drivers, which loads in
between Bus filter drivers and Function drivers, when Function drivers
issue direct hardware commands thru reading and writing mem mapped or IO
mapped ports! This puts me in a disability to write a Lower filter driver
for a function driver supplied by a third party. Though I do not have a
requirement to write a lower filter driver for a third party function
driver curently, I would like to know whether I can do so in future.
I understand that there is an exception in case of USB function drivers,
which sends URBs to Bus driver to accomplish something. So I can drop
these URBs in lower filter drivers and filter some, send the remaining to
Bus driver.
My doubt is for some devices like… Say for example I have a PCI card
with a 7 segment LED display in my system. To display a number in it I
have to write in some IO mapped port, Function driver for this device will
do just the same, Lower filter drivers doesnt have any scope in these
situations. Is it like if I want to write a lower filter driver for these
kind of devices then the Function driver should be aware of it?
Thanks and Cheers,
Arun
For PCI, you cannot write a generic lower filter that actually filters
access to the hardware, you are correct. You would either have to hook the
HAL or system calls used by the PCI function driver (not safe or
recommended), or insert an upper filter and filter requests that get sent to
the PCI function driver (may not accomplish what you want). Again you are
correct that filtering devices like USB and 1394 where the bus driver
executes the actual bus communication is generally a more useful scenario
for a lower filter.
Where a lower filter might be useful for PCI, is if you had a desire to read
the config or location information related to the device. Your lower filter
could send IRPs down to the PDO to get this info.
MS doesn’t support bus filter drivers (those that insert an upper filter of
some sort for the PDOs), so the lower filter is really the only supported
mechanism to see traffic heading down the stack from a function driver.
–
Bill McKenzie
Compuware Corporation
http://www.compuware.com/products/driverstudio
“Arun” wrote in message news:xxxxx@ntdev…
>
> Hi All,
>
> I do not understand the scope of Lower filter drivers, which loads in
> between Bus filter drivers and Function drivers, when Function drivers
> issue direct hardware commands thru reading and writing mem mapped or IO
> mapped ports! This puts me in a disability to write a Lower filter driver
> for a function driver supplied by a third party. Though I do not have a
> requirement to write a lower filter driver for a third party function
> driver curently, I would like to know whether I can do so in future.
>
> I understand that there is an exception in case of USB function drivers,
> which sends URBs to Bus driver to accomplish something. So I can drop
> these URBs in lower filter drivers and filter some, send the remaining to
> Bus driver.
>
> My doubt is for some devices like… Say for example I have a PCI card
> with a 7 segment LED display in my system. To display a number in it I
> have to write in some IO mapped port, Function driver for this device will
> do just the same, Lower filter drivers doesnt have any scope in these
> situations. Is it like if I want to write a lower filter driver for these
> kind of devices then the Function driver should be aware of it?
>
> Thanks and Cheers,
> Arun
>
>