RE: Accessing ACPI BIOS through a Method call.

Greetings,

I’m trying to access a function supported by ACPI BIOS that uses ACPI
method calls to retrieve data. I have not found any good sample code in the
Microsoft DDK libraries to show how is done.
The ACPISIM example in the DDK library has a ALS code with PnP ID that
has to be compiled an put into the ACPI BIOS firmware. This PnP ID would
then cause a support device driver to be loaded and control the operation region
of the device. The loaded driver can send ACPI method calls to the
acpi.sys driver. The loaded driver receives a Pdo (Physical device Object) address

from acpi driver when it is loaded. This Pdo is required for method calls to acpi.sys.
In my case I want to use a method (_LID) call which is supported on my XP Test
notebook. This method call returns the lid status of the notebook. There isn’t a
device driver supporting the operation region. The region is supported by the OS
apci.sys driver.
I have found no way to attach a driver to acpi stack without having PnP ID in the
ACPI BIOS in order to acquire a acpi.sys Pdo address. or a means
to acquire the needed acpi.sys Pdo in order to send method calls as outlined in
Microsoft documentation on ACPIDriver Vista.
http://www.microsoft.com/whdc/system/pnppwr/powermgmt/ACPIDriver_Vista.mspx

Is there any sample code around or good documentation on how to acquire a
Pdo when the ACPI BIOS device is supported directly by acpi.sys driver.

Thank You
RKelly

Windows doesn’t support evaluation of ACPI methods in driver stacks where
you didn’t supply the drivers. In this case, Windows itself is managing
that method. You can register for the PowerStateCallback for lid change
notifications and I think that Vista and later have a more direct way to get
the lid state, though I don’t remember it off the top of my head.


Jake Oshins
Hyper-V I/O Architect (former ACPI guy)
Windows Kernel Group

This post implies no warranties and confers no rights.


“Richard Kelly” wrote in message news:xxxxx@ntdev…
Greetings,

I’m trying to access a function supported by ACPI BIOS that uses ACPI
method calls to retrieve data. I have not found any good sample code in the
Microsoft DDK libraries to show how is done.
The ACPISIM example in the DDK library has a ALS code with PnP ID that
has to be compiled an put into the ACPI BIOS firmware. This PnP ID would
then cause a support device driver to be loaded and control the operation
region
of the device. The loaded driver can send ACPI method calls to the
acpi.sys driver. The loaded driver receives a Pdo (Physical device Object)
address

from acpi driver when it is loaded. This Pdo is required for method calls to
acpi.sys.
In my case I want to use a method (_LID) call which is supported on my XP
Test
notebook. This method call returns the lid status of the notebook. There
isn’t a
device driver supporting the operation region. The region is supported by
the OS
apci.sys driver.
I have found no way to attach a driver to acpi stack without having PnP ID
in the
ACPI BIOS in order to acquire a acpi.sys Pdo address. or a means
to acquire the needed acpi.sys Pdo in order to send method calls as outlined
in
Microsoft documentation on ACPIDriver Vista.
http://www.microsoft.com/whdc/system/pnppwr/powermgmt/ACPIDriver_Vista.mspx

Is there any sample code around or good documentation on how to acquire a
Pdo when the ACPI BIOS device is supported directly by acpi.sys driver.

Thank You
RKelly