* [gentoo-user] Any DSDT/AML gurus out there?
@ 2012-05-17 21:56 Paul Hartman
2012-05-18 2:19 ` [gentoo-user] " James
2012-06-21 22:20 ` Paul Hartman
0 siblings, 2 replies; 4+ messages in thread
From: Paul Hartman @ 2012-05-17 21:56 UTC (permalink / raw
To: Gentoo User
Hi,
I have a laptop which apparently has a buggy DSDT. It is possible to
decompile and recompile it, including it in an in-kernel initramfs to
override the one in BIOS, as described by the somewhat outdated
example at:
http://www.lesswatts.org/projects/acpi/overridingDSDT.php
My main problem is that the AML code that it generates is completely
foreign to me and I'm unable to tell what exactly the problem is. Most
examples on the web explain fixing compilation errors, which are
fairly obvious. Mine has no errors - only warnings. I think there is a
logical error leading to an infinite loop condition. My previous
attempts to fix it have only resulting in even worse results (no
battery readings at all, ever, lack of power management in general,
that kind of fun stuff).
Normally, my laptop battery readings will work perfectly well until
suddenly, randomly it shows this in dmesg:
[ 6286.707038] ACPI Error: Method parse/execution failed
[\_SB_.PCI0.PIB_.EC0_.SMWR] (Node ffff88007d028348),
AE_AML_INFINITE_LOOP (20120111/psparse-536)
[ 6286.707074] ACPI Error: Method parse/execution failed
[\_SB_.PCI0.PIB_.EC0_.SMSL] (Node ffff88007d028398),
AE_AML_INFINITE_LOOP (20120111/psparse-536)
[ 6286.707096] ACPI Error: Method parse/execution failed
[\_SB_.PCI0.PIB_.EC0_._Q09] (Node ffff88007d028438),
AE_AML_INFINITE_LOOP (20120111/psparse-536)
After that, the battery state can no longer be read and eventually
spontaneously powering off without proper shutdown when the battery
dies.
The problem does not occur in Microsoft Windows (or windows handles it
better), but I don't normally use Microsoft Windows, so that doesn't
help me any. :)
Has anyone on this list dealt with this before, or have any ideas to
help guide me along? I'd be happy to send the code to anyone
interested in trying their hand at fixing it.
Thanks,
Paul
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-user] Re: Any DSDT/AML gurus out there?
2012-05-17 21:56 [gentoo-user] Any DSDT/AML gurus out there? Paul Hartman
@ 2012-05-18 2:19 ` James
2012-06-21 22:20 ` Paul Hartman
1 sibling, 0 replies; 4+ messages in thread
From: James @ 2012-05-18 2:19 UTC (permalink / raw
To: gentoo-user
Paul Hartman <paul.hartman+gentoo <at> gmail.com> writes:
> I have a laptop which apparently has a buggy DSDT.
Hello Paul,
We could fiddle around here, but your best bet is the old
linux bios group; who now call themselves coreboot:
http://www.coreboot.org
Find (google) where those guys hang out online,
and they can answer your questions very quickly,
not to mention a vast array of experiences
related to your issues.
hth,
James
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-user] Re: Any DSDT/AML gurus out there?
2012-05-17 21:56 [gentoo-user] Any DSDT/AML gurus out there? Paul Hartman
2012-05-18 2:19 ` [gentoo-user] " James
@ 2012-06-21 22:20 ` Paul Hartman
2012-06-21 22:40 ` Paul Hartman
1 sibling, 1 reply; 4+ messages in thread
From: Paul Hartman @ 2012-06-21 22:20 UTC (permalink / raw
To: Gentoo User
On Thu, May 17, 2012 at 4:56 PM, Paul Hartman
<paul.hartman+gentoo@gmail.com> wrote:
> [ 6286.707038] ACPI Error: Method parse/execution failed
> [\_SB_.PCI0.PIB_.EC0_.SMWR] (Node ffff88007d028348),
> AE_AML_INFINITE_LOOP (20120111/psparse-536)
> [ 6286.707074] ACPI Error: Method parse/execution failed
> [\_SB_.PCI0.PIB_.EC0_.SMSL] (Node ffff88007d028398),
> AE_AML_INFINITE_LOOP (20120111/psparse-536)
> [ 6286.707096] ACPI Error: Method parse/execution failed
> [\_SB_.PCI0.PIB_.EC0_._Q09] (Node ffff88007d028438),
> AE_AML_INFINITE_LOOP (20120111/psparse-536)
After much trial and error, Googling, reading DSDT for other laptops,
and traversing archive.org for old web pages that no longer exist, I
think I have figured it out.
In the errors above the method SMWR has the real problem, the others
shown afterward were the callers and victims of the infinite loop
detection in kernel. In the disassembled code for the SMWR method
there is a while loop that looks like it could be the cause of an
infinite loop:
And (SMST, 0x40, SMST)
Store (Arg2, SMCM)
Store (Arg1, SMAD)
Store (Arg0, SMPR)
While (LNot (And (SMST, 0xBF, Local1)))
{
Sleep (0x02)
}
This exact same infinite loop condition happened in 2 different
methods in my DSDT, both of which gave me ACPI errors and caused
battery levels to stop working.
After making the change like the one shown below to these two while
loops, I have not yet encountered an infinite loop error and my
battery reading appears to work properly. Uptime of 2 hours with no
ACPI errors yet!
And (SMST, 0x40, SMST)
Store (Arg2, SMCM)
Store (Arg1, SMAD)
Store (Arg0, SMPR)
Store (0x00, Local3)
While (LNot (And (SMST, 0xBF, Local1)))
{
Sleep (0x02)
Increment (Local3)
If (LEqual (Local3, 0x32))
{
And (SMST, 0x40, SMST)
Store (Arg2, SMCM)
Store (Arg1, SMAD)
Store (Arg0, SMPR)
Store (0x00, Local3)
}
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-user] Re: Any DSDT/AML gurus out there?
2012-06-21 22:20 ` Paul Hartman
@ 2012-06-21 22:40 ` Paul Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Paul Hartman @ 2012-06-21 22:40 UTC (permalink / raw
To: Gentoo User
On Thu, Jun 21, 2012 at 5:20 PM, Paul Hartman
<paul.hartman+gentoo@gmail.com> wrote:
> After much trial and error, Googling, reading DSDT for other laptops,
> and traversing archive.org for old web pages that no longer exist, I
> think I have figured it out.
And also very helpful was the ACPI implementation guide I found here:
http://www.baldwin.cx/~phoenix/reference/docs/acpi_impguide.pdf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-06-21 22:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-17 21:56 [gentoo-user] Any DSDT/AML gurus out there? Paul Hartman
2012-05-18 2:19 ` [gentoo-user] " James
2012-06-21 22:20 ` Paul Hartman
2012-06-21 22:40 ` Paul Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox