Re: How to deal with ACPI? (The Solution)

Hi
first I would like to thank Igor because his suggestions helped me to
find the solution.
I tried first with the Parallel driver, which is quite simple, it does
basic input/output io.
I wrote an upper filter driver for the parallel port FDO.
In my driverEntry I did the follow
1.I do create my device
2.IoGetDeviceObjectPointer(…) to get a pointer to Parallel FDO
3.I send a IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO to get parallel port
resources (Port address)
4.I create a symbolink link for my driver.
5 exit the driver entry

When I call CreateFile(…) from my user mode program I do the follow
1.I send a IOCTL_INTERNAL_PARALLEL_PORT_ALLOCATE to accquire exclusive
access to parallel port and prevent others for using it.
2.Complete the IRP

On exit I send (my Close function) IOCTL_INTERNAL_PARALLEL_PORT_FREE to
free the port.

My driver blocks all irp to parallel FDO.

That’s all and works just fine.
I need to run some more tests on my Laptop to see if everything is ok

regards

(SV2AGW) George Rossopoulos
www.elcom.gr/sv2agw
xxxxx@elcom.gr
+306932 465 216

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jake Oshins
Sent: Thursday, November 06, 2003 8:18 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: How to deal with ACPI?

There’s more to it than that.

Igor, the system is shutting off the device because it
believes that there is no active driver associated with it.
In order to work around this behavior, you need to make sure
that your device is clearly associated with the node in the
ACPI BIOS that is being shut off. In order to do that, you
need to have a WDM driver loaded on top of the PDO that the
ACPI driver is enumerating.

Several people suggested that you write a WDM filter driver,
which would certainly get you into the stack on top of the
right PDO. But what I think that you really need to do is
write an FDO, not a filter, that completely replaces the
in-box serial driver. This will also remove your need to
programmatically disable the in-box serial driver using SetupDi*.

Write your FDO, then create an INF that has a more specific
match for the serial port than the INF that we ship in the
box. Your driver will then be preferentially loaded (signing
issues aside.)


Jake Oshins
Windows Base Kernel Team

This posting is provided “AS IS” with no warranties, and
confers no rights. OR if you wish to include a script sample
in your post please add “Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

“Roddy, Mark” wrote in message
> news:xxxxx@ntdev…
> >
> > I think perhaps you need to rewrite your replacement serial
> driver as
> > a
> WDM
> > driver so that you can get power management support.
> >
> >
> > =====================
> > Mark Roddy
> >
> >
> > > -----Original Message-----
> > > From: (SV2AGW) George Rossopoulos [mailto:xxxxx@softhome.net]
> > > Sent: Wednesday, November 05, 2003 5:56 AM
> > > To: Windows System Software Devs Interest List
> > > Subject: [ntdev] Re: How to deal with ACPI?
> > >
> > > Hi Igor
> > >
> > > Thank you for the reply. I considered of a filter driver
> but I need
> > > access to ISR routines and I am not sure of how to
> implement it as
> > > lower driver. Have you any suggestions for reading or
> even better an
> > > example?
> > >
> > > regards
> > >
> > > (SV2AGW) George Rossopoulos
> > > www.elcom.gr/sv2agw
> > > xxxxx@elcom.gr
> > > +306932 465 216
> > >
> > > > -----Original Message-----
> > > > From: xxxxx@lists.osr.com
> > > > [mailto:xxxxx@lists.osr.com] On Behalf Of Igor
> > > Slewsarev
> > > > Sent: Wednesday, November 05, 2003 11:32 AM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: [ntdev] Re: How to deal with ACPI?
> > > >
> > > >
> > > > > Now the Question, is there any way to power again the device??
> > > > All known to me modern SuperIO chips are ACPI-ready. So if
> > > you unload
> > > > driver for serial port hardware always comes to D3 state
> > > (see power.c
> > > > file of serial driver from DDK). This means, your
> driver doesn’t
> > > > properly implement power management. You should implement
> > > your device
> > > > as an owner of power policy and force device stack to D0 before
> > > > any read/write operation. By the way, the easiest way is to
> > > write filter
> > > > driver and leave native driver intact.
> > > >
> > > > Sincerely,
> > > > Igor V. Slewsarev
> > > >
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@softhome.net 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@stratus.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@softhome.net To
unsubscribe send a blank email to xxxxx@lists.osr.com