Distribution: Gentoo Linux 1.4 Hardware Environment: Compaq X1005EA Software Environment: kernel boot and acpid Problem Description: when I boot with the 2.6.0-test9 kernel, I have different error messages related to acpi (AE_AML_BUFFER_LIMIT and at the end of the dmesg file sleeping function error). Steps to reproduce: Compile the 2.6.0-test9 kernel with default compilation option with pay attention to not activate debug option of acpi.
Created attachment 1242 [details] acpidmp from 2.6.0-test9 kernel
Created attachment 1243 [details] dmesg from 2.6.0-test9 kernel
Created attachment 1244 [details] dmidecode from 2.6.0-test9 kernel
Created attachment 1245 [details] lspci -vv from 2.6.0-test9 kernel
Created attachment 1246 [details] /proc/interrupts from 2.6.0-test9 kernel
I want to add something very important for me. I am not able to enter my notebook in sleep mode with the following command : echo 1 > /proc/acpi/sleep . My computer report good time remaining for using it on the battery for two minutes after the boot but when I want to verify the time remaining after e.g. ten minutes, it reports a wrong value like 30 minutes whereas I have 80% battery capacity available. Thank you in advance. Olivier..
same warnings as in bug #1404 -- a different Compaq laptop. ACPI-1120: *** Error: Method execution failed [\_SB_.C046.C052] (Node cffbdc40), AE_AML_BUFFER_LIMIT ACPI-1120: *** Error: Method execution failed [\_SB_.C046.C056] (Node cffbdc20), AE_AML_BUFFER_LIMIT ACPI-1120: *** Error: Method execution failed [\_SB_.C046._CRS] (Node cffbdc00), AE_AML_BUFFER_LIMIT ACPI-0098: *** Error: Method execution failed [\_SB_.C046._CRS] (Node cffbdc00), AE_AML_BUFFER_LIMIT
Would you please try at http://bugzilla.kernel.org/show_bug.cgi?id=1520
Created attachment 1407 [details] dmesg from 2.6.0-test8 kernel with patch from bug 1520
Created attachment 1408 [details] dmesg from 2.6.0-test9 with patch from bug 1520 As you can see in the last two messages, the patch doesn't correct the problem. I have a bunch of error messages related to acpi methods. In fact, usb devices don't work at all, the battery is detected but my acpid daemon says that the charge is null whereas the capacity of the battery wasn't null. Olivier.
Thanks for your testing. I just update patch at bug 1520. And I hope you try it again. The updated patch has 1 fix for error of replacing length of buffer. This patch is try to fix bug of accessing region field through buffer. If there is no AE_AML_BUFFER_LIMIT, it means the patch works. Thanks a lot.
Created attachment 1413 [details] dmesg from 2.6.0-test8 with 2nd patch from bug n
Created attachment 1414 [details] dmesg from 2.6.0-test9 with 2nd patch from bug n
Created attachment 1427 [details] a updated version Maybe there are other things wrong in your DSDT. I want to look the ACPI debug information. Would you please try this patch with ACPI_DEBUG option enabled. Without this patch, C046.C052 will report AE_AML_BUFFER_LIMIT when accessing 7th object in C049.
Created attachment 1428 [details] dmesg for n620c linux-2.6-test9 with patch (id=1427) I join this bug report: I have a compaq Evo N620C laptop which has a similar problem (AE_AML_BUFFER_LIMIT) This laptop does not really support APM so i'd really like to get ACPI working. I tried several patches but nothing worked for the moment. I precise that despite of these messages I can have the acpi state (acpi -V) and all seems to work BUT I often get processes reading acpi state stuck in D state after a moment (gkrellm, wmbattery or wmacpi). After that everything trying to read /proc/acpi gets stuck too. sleep states does not work either ... As a programmer (not a kernel one, but i can learn ;) perhaps I can offer my help too ? Thanks (attached: dmesg with latest proposed patch)
Created attachment 1429 [details] dmesg from 2.6.0-test9 kernel with 3rd patch I was obliged to use 2.6.0-test9 kernel with the latest acpi patch because of the acpi debug bug 1341 that block the startup of my Linux system. I follow your instructions and the results are in the following attachement. Thanks, Olivier.
We need a trace of the following methods with debug enabled (acpi_dbg_level = 0x00FFFFFF) ACPI-1120: *** Error: Method execution failed [\_SB_.C046.C052] (Node cffbdc40), AE_AML_BUFFER_LIMIT ACPI-1120: *** Error: Method execution failed [\_SB_.C046.C056] (Node cffbdc20), AE_AML_BUFFER_LIMIT ACPI-1120: *** Error: Method execution failed [\_SB_.C046._CRS] (Node cffbdc00), AE_AML_BUFFER_LIMIT ACPI-0098: *** Error: Method execution failed [\_SB_.C046._CRS] (Node cffbdc00), AE_AML_BUFFER_LIMIT
How do I trace these methods properly ? Thanks Olivier.
The below message appeared in your latest dmesg. This error is not what my patch try to address. It looks like a new one. "dsopcode-0524 [19] ds_init_buffer_field : Field size 1392 exceeds Buffer size 1296 (bits)"
In your dsdt, there are something confusing me. In method C056, sizeof (C050) = 136 Buffer size of Local0 = 1296 (Your dmesg shows this value) Obviously, 1296/8 - 136 = 26 = 1A Obviously, C04D = 1 So below loop in C056 will only execute once. While (LLess (Local1, C04D)) { Store (C052 (Local0, Local2, Local1, Local3), Local2) Increment (Local1) } And Local0 is 1296-bits buffer, Loca2 is sizeof(C050)-2 = 134 Local1 is sizeof(C050= 136 Local3 is 134 -26 = 108 In C052, before executing CreateDWord (Arg0, Local2 ..) below two statements will be executed. Store (Arg1, local2) Add (Local2, 0xA, Loca2) So, the local2 should be 134 + 10 =144 = 1152bits. Obviously It should never fail to create a DWord in a 1296 bits from 1152bits offset. So, there must be something wrong in value of Arg1, which has been changed somewhere.
Here is a small test case to exhabits this issue. Method (C056, 0, NotSerialized) { Store (Buffer(0x6) {}, Local0) C888(Local0, 2, 0, 0) } Method (C888, 4, NotSerialized) { Store (Arg1, Local7) Store (Arg3, Local4) Add (Local4, 0x2, Local5) While (LLess (Local4, Local5)) {Executing all Device _STA and_INI methods:.\_SB_._INI failed: AE_OK .\_SB_.C00C._INI failed: AE_OK .dsopcode-0526 [15] ds_init_buffer_field : Field [C0EE] size 64 exceeds Buffer [<NUL] size 48 (bits) psparse-1120: *** Error: Method execution failed [\_SB_.C888] (Node cfc53aa0), AE_AML_BUFFER_LIMIT psparse-1120: *** Error: Method execution failed [\_SB_.C04B] (Node cfc5395c), AE_AML_BUFFER_LIMIT psparse-1120: *** Error: Method execution failed [\_SB_.C046._INI] (Node cfc53884), AE_AML_BUFFER_LIMIT ment (Local4) Increment (Local7) } Store (Arg1, Local7) CreateDWordField (Arg0, Local7, C0EE) } In my testing machine, below message shows:
[I messed up above comments, repost it here] Here is a small test case to exhabits this issue. Method (C056, 0, NotSerialized) { Store (Buffer(0x6) {}, Local0) C888(Local0, 2, 0, 0) } Method (C888, 4, NotSerialized) { Store (Arg1, Local7) Store (Arg3, Local4) Add (Local4, 0x2, Local5) While (LLess (Local4, Local5)) { Increment (Local4) Increment (Local7) } Store (Arg1, Local7) CreateDWordField (Arg0, Local7, C0EE) }
Dmesg error from my testing machine: (IBM T21) .dsopcode-0526 [15] ds_init_buffer_field : Field [C0EE] size 64 exceeds Buffer [<NUL] size 48 (bits) psparse-1120: *** Error: Method execution failed [\_SB_.C888] (Node cfc53aa0), AE_AML_BUFFER_LIMIT psparse-1120: *** Error: Method execution failed [\_SB_.C04B] (Node cfc5395c), AE_AML_BUFFER_LIMIT psparse-1120: *** Error: Method execution failed [\_SB_.C046._INI] (Node cfc53884), AE_AML_BUFFER_LIMIT
From above message, It is clear that , In current implementation of CA, store (Arg1, local7) will cause Arg1 and local7 reference same object. So Add 2 to local7 will change Arg1 too. The second statement of " store (Arg1, local7) " will not reset local7 to the initial value.
Created attachment 1453 [details] a proposal patch for fixing this issue
Created attachment 1454 [details] dmesg from 2.6.0-test9 kernel with lastest proposed patch It seems that error messages have disappeared. Good job. Thank you. However, when I enter my laptop in sleep mode, it wake up immediatly. Why ? (I use this command : echo 1 > /proc/acpi/sleep) Thank you. Olivier.
I think this would be a better fix, it also handles the more general case: /* * If the reference count on the object is more than one, we must * take a copy of the object before we store. */ if (ObjDesc->Common.ReferenceCount > 1) { Status = AcpiUtCopyIobjectToIobject (ObjDesc, &NewObjDesc, WalkState); ObjDesc = NewObjDesc; if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } }
Where should I place this fix, in which file ? Please. Olivier.
*** Bug 1592 has been marked as a duplicate of this bug. ***
Thank you for response for comment #28. Olivier.
For comment #27, where have I to place this fix ? In which file (exstore.c or another) ? At which lines ? Thank you
Please add those code at drivers/acpi/executer/exstore.c @@ -167,6 +167,38 @@
Excuse me but I have a lot of compilling errors with the code submitted in comment #27 (variables not defined, functions not recognized, etc...) Thanks Olivier
Created attachment 1554 [details] exstore.c modified (2.6.0-test10 kernel) Is my exstore modified good? My kernel is compiling without errors. However, it isn't working because my kernel crash at startup. Could you help me please ? Thanks, Olivier.
Created attachment 1628 [details] patch bug #1444 for testing
Could you test this patch because I don't know if it's good or not. Thank you. Olivier.
Official patch has been merged into latest ACPI CA relase, and It will be found in the comming linux acpi patch release soon.
I've tried the lastest official ACPI patch released today and my notebook works great (no error messages related to ACPI now). Thank you. Olivier.
Created attachment 1659 [details] dmesg from 2.6.0-test11-bk8 with lastest official ACPI patch Good job. Really Thank you. Olivier.
With the latest patches on kernel 2.4.23, I have these same messages. I will attach the command outputs requested on acpi.sourceforge.net Distribution: N/A (LFS 5.0) Hardware Environment: Compaq Evo N800w (latest BIOS) Software Environment: kernel boot
Created attachment 1673 [details] acpidmp output
Created attachment 1674 [details] dmesg output
Created attachment 1675 [details] dmidecode output
Created attachment 1676 [details] /proc/interrupts output
Created attachment 1677 [details] lspci output
Brant, actually, your dmesg show different messages for a different issue. Please file a new bug. Closing the AE_AML_BUFFER_LIMIT bug. thanks, -Len
Brant, I have made a patch to address your problem. please visit http://bugzilla.kernel.org/show_bug.cgi?id=1690. Thanks, Luming
As an FYI, I tried applying this patch to my kernel in addition to the one in bug 1690 and my kernel does not boot without acpi=off.