ACPI methods call

Hi,
I’m trying the way to call ACPI methods from my driver. I succeeded to
call methods of Embedded controller( by searching driver of ACPI
embedded controller and sending IRPs to it ), but I have a problem to
access methods, defined in scopes in ASF tables. The questions that I
have are:
-How can I call method defined in the scope?
-how can I call global ACPI methods( defined in ACPI spec )? To which
device should I address my request?
-How can I scan ACPI methods/go around ACPI tree?

Lev Zlotin
xxxxx@Intel.com
iNet: 8-465-6740
tel: 972-4-865-6740

It’s unclear if you are having problems finding the method to call or once found, how to call it. Anyways, I searched for “ACPI_” in the DDK sample source and found a few hits which should demonstrate a few things about talking to acpi. Specifically, there is an acpi directory which has 2 samples.

kernel\agp\agplib
storage\fdc\fdc
storage\fdc\flpydisk
wdm\acpi\acpisim\driver
wdm\acpi\smbbatt

have you looked there?

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Zlotin, Lev
Sent: Monday, January 16, 2006 1:44 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] ACPI methods call

Hi,
I’m trying the way to call ACPI methods from my driver. I succeeded to call methods of Embedded controller( by searching driver of ACPI embedded controller and sending IRPs to it ), but I have a problem to access methods, defined in scopes in ASF tables. The questions that I have are:
-How can I call method defined in the scope?
-how can I call global ACPI methods( defined in ACPI spec )? To which device should I address my request?
-How can I scan ACPI methods/go around ACPI tree?
?
??? Lev Zlotin
??? xxxxx@Intel.com
??? iNet: 8-465-6740
??? tel: 972-4-865-6740
?


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Yes, but IOCTL_ACPI_ASYNC_EVAL_METHOD (used by floppy) is not documented in
MSDN Library. Too bad.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, January 16, 2006 7:28 PM
Subject: RE: [ntdev] ACPI methods call

It’s unclear if you are having problems finding the method to call or once
found, how to call it. Anyways, I searched for “ACPI_” in the DDK sample
source and found a few hits which should demonstrate a few things about talking
to acpi. Specifically, there is an acpi directory which has 2 samples.

kernel\agp\agplib
storage\fdc\fdc
storage\fdc\flpydisk
wdm\acpi\acpisim\driver
wdm\acpi\smbbatt

have you looked there?

d

________________________________________
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Zlotin, Lev
Sent: Monday, January 16, 2006 1:44 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] ACPI methods call

Hi,
I’m trying the way to call ACPI methods from my driver. I succeeded to call
methods of Embedded controller( by searching driver of ACPI embedded controller
and sending IRPs to it ), but I have a problem to access methods, defined in
scopes in ASF tables. The questions that I have are:
-How can I call method defined in the scope?
-how can I call global ACPI methods( defined in ACPI spec )? To which device
should I address my request?
-How can I scan ACPI methods/go around ACPI tree?

Lev Zlotin
xxxxx@Intel.com
iNet: 8-465-6740
tel: 972-4-865-6740


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
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: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

I use this API to access the method in Embedded controller driver. The
problem that I have, that I do not know, how to call methods in the
scopes.
The problem is because the IOCTL_ACPI_ASYNC_EVAL_METHOD gets in
parameters 4-letters names of the method and I need some way to use long
names, for example, method, which is written in HKEY scope of Embedded
controller ( full name PCI0.LPC.EC.HKEY ).

Lev Zlotin
xxxxx@Intel.com
iNet: 8-465-6740
tel: 972-4-865-6740

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Tuesday, January 17, 2006 3:33 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] ACPI methods call

Yes, but IOCTL_ACPI_ASYNC_EVAL_METHOD (used by floppy) is not
documented in
MSDN Library. Too bad.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, January 16, 2006 7:28 PM
Subject: RE: [ntdev] ACPI methods call

It’s unclear if you are having problems finding the method to call or
once
found, how to call it. Anyways, I searched for “ACPI_” in the DDK
sample
source and found a few hits which should demonstrate a few things about
talking
to acpi. Specifically, there is an acpi directory which has 2 samples.

kernel\agp\agplib
storage\fdc\fdc
storage\fdc\flpydisk
wdm\acpi\acpisim\driver
wdm\acpi\smbbatt

have you looked there?

d

________________________________________
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Zlotin, Lev
Sent: Monday, January 16, 2006 1:44 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] ACPI methods call

Hi,
I’m trying the way to call ACPI methods from my driver. I succeeded to
call
methods of Embedded controller( by searching driver of ACPI embedded
controller
and sending IRPs to it ), but I have a problem to access methods,
defined in
scopes in ASF tables. The questions that I have are:
-How can I call method defined in the scope?
-how can I call global ACPI methods( defined in ACPI spec )? To which
device
should I address my request?
-How can I scan ACPI methods/go around ACPI tree?

Lev Zlotin
xxxxx@Intel.com
iNet: 8-465-6740
tel: 972-4-865-6740


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
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: unknown lmsubst tag argument:
‘’
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@intel.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

This is definitely a shortcoming in the DDK docs. These calls are an
absolute necessity, and I played hell trying to figure out how to use them.
It is no wonder that some of the largest PC manufacturers are still
accessing the BIOS using physical memory accesses rather than clean ACPI
methods or such. There is virtually no documentation on the latter.

Bill M.

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
> Yes, but IOCTL_ACPI_ASYNC_EVAL_METHOD (used by floppy) is not
> documented in
> MSDN Library. Too bad.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
> From: “Doron Holan”
> To: “Windows System Software Devs Interest List”
> Sent: Monday, January 16, 2006 7:28 PM
> Subject: RE: [ntdev] ACPI methods call
>
>
> It’s unclear if you are having problems finding the method to call or once
> found, how to call it. Anyways, I searched for “ACPI_” in the DDK sample
> source and found a few hits which should demonstrate a few things about
> talking
> to acpi. Specifically, there is an acpi directory which has 2 samples.
>
> kernel\agp\agplib
> storage\fdc\fdc
> storage\fdc\flpydisk
> wdm\acpi\acpisim\driver
> wdm\acpi\smbbatt
>
> have you looked there?
>
> d
>
> ________________________________________
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Zlotin, Lev
> Sent: Monday, January 16, 2006 1:44 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] ACPI methods call
>
> Hi,
> I’m trying the way to call ACPI methods from my driver. I succeeded to
> call
> methods of Embedded controller( by searching driver of ACPI embedded
> controller
> and sending IRPs to it ), but I have a problem to access methods, defined
> in
> scopes in ASF tables. The questions that I have are:
> -How can I call method defined in the scope?
> -how can I call global ACPI methods( defined in ACPI spec )? To which
> device
> should I address my request?
> -How can I scan ACPI methods/go around ACPI tree?
>
> Lev Zlotin
> xxxxx@Intel.com
> iNet: 8-465-6740
> tel: 972-4-865-6740
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> 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: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>

I found how to call this methods and I’m calling them. But there is no
method to go across the ACPI tree!
There is no problem to call method of device, but you only need to know
who is the device driver. For example, there is no problem to call
straight method of the EC, or thermal zone or LCD, or Smart Battery.
Problem arrived when I trying to call methods of device, which are put
in some “namespace”( scope ) inside the ACPI tree of device.
In Linux, when you are calling the method, you can cal it by long name,
or take handles of each memory space and call by short name. In Windows,
you have only 4 letters for name( only short name ) and I found no way
to get handle to a scope. Probably the “driver namespaces” are used
here…

Lev Zlotin
xxxxx@Intel.com
iNet: 8-465-6740
tel: 972-4-865-6740

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bill McKenzie
Sent: Tuesday, January 17, 2006 4:32 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] ACPI methods call

This is definitely a shortcoming in the DDK docs. These calls are an
absolute necessity, and I played hell trying to figure out how to use
them.
It is no wonder that some of the largest PC manufacturers are still
accessing the BIOS using physical memory accesses rather than clean ACPI

methods or such. There is virtually no documentation on the latter.

Bill M.

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
> Yes, but IOCTL_ACPI_ASYNC_EVAL_METHOD (used by floppy) is not
> documented in
> MSDN Library. Too bad.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
> From: “Doron Holan”
> To: “Windows System Software Devs Interest List”
> Sent: Monday, January 16, 2006 7:28 PM
> Subject: RE: [ntdev] ACPI methods call
>
>
> It’s unclear if you are having problems finding the method to call or
once
> found, how to call it. Anyways, I searched for “ACPI_” in the DDK
sample
> source and found a few hits which should demonstrate a few things
about
> talking
> to acpi. Specifically, there is an acpi directory which has 2
samples.
>
> kernel\agp\agplib
> storage\fdc\fdc
> storage\fdc\flpydisk
> wdm\acpi\acpisim\driver
> wdm\acpi\smbbatt
>
> have you looked there?
>
> d
>
> ________________________________________
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Zlotin, Lev
> Sent: Monday, January 16, 2006 1:44 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] ACPI methods call
>
> Hi,
> I’m trying the way to call ACPI methods from my driver. I succeeded to

> call
> methods of Embedded controller( by searching driver of ACPI embedded
> controller
> and sending IRPs to it ), but I have a problem to access methods,
defined
> in
> scopes in ASF tables. The questions that I have are:
> -How can I call method defined in the scope?
> -how can I call global ACPI methods( defined in ACPI spec )? To which
> device
> should I address my request?
> -How can I scan ACPI methods/go around ACPI tree?
>
> Lev Zlotin
> xxxxx@Intel.com
> iNet: 8-465-6740
> tel: 972-4-865-6740
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
> 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: unknown lmsubst tag
argument: ‘’
> 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@intel.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The complaint that you’re making is essentially equivalent to the PCI Config
Space complaint that we always hear: I can’t legally manipulate PCI config
space registers across the entire tree.

My response would be the same. Manipulating system-wide state, or state
associated with other devices can’t be done without violating the contracts
that those device drivers and the kernel operate under. Imagine trying to
write the driver associated with any device if some other piece of code was
allowed to manipulate the state of your device.

In your specific case, you’ll have to get your driver into the EC driver’s
stack if you want to manipulate those methods. If this is a special
interface for your driver, consider putting a device in your ACPI namespace
underneath the EC. Give that device its own IDs. Then load your driver
based on those IDs. Put the methods under the device and your scope
problems are solved.


Jake Oshins
Windows Kernel Group

The Virtual Machine Team at Microsoft is hiring. Contact
xxxxx@microsoft.com for more information.

This posting is provided “AS IS” with no warranties, and confers no rights.

“Zlotin, Lev” wrote in message news:xxxxx@ntdev…
I found how to call this methods and I’m calling them. But there is no
method to go across the ACPI tree!
There is no problem to call method of device, but you only need to know
who is the device driver. For example, there is no problem to call
straight method of the EC, or thermal zone or LCD, or Smart Battery.
Problem arrived when I trying to call methods of device, which are put
in some “namespace”( scope ) inside the ACPI tree of device.
In Linux, when you are calling the method, you can cal it by long name,
or take handles of each memory space and call by short name. In Windows,
you have only 4 letters for name( only short name ) and I found no way
to get handle to a scope. Probably the “driver namespaces” are used
here…

Lev Zlotin
xxxxx@Intel.com
iNet: 8-465-6740
tel: 972-4-865-6740

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bill McKenzie
Sent: Tuesday, January 17, 2006 4:32 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] ACPI methods call

This is definitely a shortcoming in the DDK docs. These calls are an
absolute necessity, and I played hell trying to figure out how to use
them.
It is no wonder that some of the largest PC manufacturers are still
accessing the BIOS using physical memory accesses rather than clean ACPI

methods or such. There is virtually no documentation on the latter.

Bill M.

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
> Yes, but IOCTL_ACPI_ASYNC_EVAL_METHOD (used by floppy) is not
> documented in
> MSDN Library. Too bad.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
> From: “Doron Holan”
> To: “Windows System Software Devs Interest List”
> Sent: Monday, January 16, 2006 7:28 PM
> Subject: RE: [ntdev] ACPI methods call
>
>
> It’s unclear if you are having problems finding the method to call or
once
> found, how to call it. Anyways, I searched for “ACPI_” in the DDK
sample
> source and found a few hits which should demonstrate a few things
about
> talking
> to acpi. Specifically, there is an acpi directory which has 2
samples.
>
> kernel\agp\agplib
> storage\fdc\fdc
> storage\fdc\flpydisk
> wdm\acpi\acpisim\driver
> wdm\acpi\smbbatt
>
> have you looked there?
>
> d
>
> ________________________________________
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Zlotin, Lev
> Sent: Monday, January 16, 2006 1:44 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] ACPI methods call
>
> Hi,
> I’m trying the way to call ACPI methods from my driver. I succeeded to

> call
> methods of Embedded controller( by searching driver of ACPI embedded
> controller
> and sending IRPs to it ), but I have a problem to access methods,
defined
> in
> scopes in ASF tables. The questions that I have are:
> -How can I call method defined in the scope?
> -how can I call global ACPI methods( defined in ACPI spec )? To which
> device
> should I address my request?
> -How can I scan ACPI methods/go around ACPI tree?
>
> Lev Zlotin
> xxxxx@Intel.com
> iNet: 8-465-6740
> tel: 972-4-865-6740
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
> 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: unknown lmsubst tag
argument: ‘’
> 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@intel.com
To unsubscribe send a blank email to xxxxx@lists.osr.com