Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

RE: Accessing ACPI BIOS through a Method call.

OSR_Community_UserOSR_Community_User Member Posts: 110,217
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

Comments

  • Jake_OshinsJake_Oshins Member Posts: 1,058
    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" <[email protected]> wrote in message news:[email protected]
    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
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 21 Oct 2019 OSR Seminar Space & ONLINE
Internals & Software Drivers 18 Nov 2019 Dulles, VA
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 27 Apr 2020 OSR Seminar Space & ONLINE