Bug 1690 - ex_access_region Region EmbeddedControl(3) has no handler
Summary: ex_access_region Region EmbeddedControl(3) has no handler
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Config-Other (show other bugs)
Hardware: i386 Linux
: P2 high
Assignee: Robert Moore
URL:
Keywords:
: 1515 2310 2541 2667 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-12-17 02:55 UTC by Luming Yu
Modified: 2005-11-20 16:26 UTC (History)
6 users (show)

See Also:
Kernel Version: 2.4, 2.6
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
a proposal patch for fixing this issue. (5.25 KB, patch)
2003-12-17 03:04 UTC, Luming Yu
Details | Diff
fix one annoying reject when applied to 2.4.26-rc2 (5.25 KB, patch)
2004-04-08 07:47 UTC, Sérgio M Basto
Details | Diff
fake ECDT patch (3.58 KB, patch)
2004-11-14 20:15 UTC, Shaohua
Details | Diff
fake ECDT patch using boot option (3.08 KB, patch)
2004-11-15 21:20 UTC, Shaohua
Details | Diff
updated patch (3.60 KB, patch)
2004-11-17 21:28 UTC, Shaohua
Details | Diff
Original patch updated for 2.6.14-rc2 (5.60 KB, patch)
2005-09-30 15:51 UTC, James Le Cuirot
Details | Diff
Chewi's dmesg (15.08 KB, text/plain)
2005-11-09 06:53 UTC, James Le Cuirot
Details
Sony-PCG-K195HP-radeon64-custom.asl (138.59 KB, text/plain)
2005-11-09 06:54 UTC, James Le Cuirot
Details

Description Luming Yu 2003-12-17 02:55:08 UTC
EC._INI will fail, if there is no ec address space handler. 
To resolve this problem ECDT has been introduced. But there are many laptop lack
ECDT. How about deferring the execution of EC._INI to later when the real EC
address space handler has been installed.
Comment 1 Luming Yu 2003-12-17 03:04:08 UTC
Created attachment 1690 [details]
a proposal patch for fixing this issue.

This patch guarantee that EC._INI will not failed due to lack correct EC space
handler. The only shortcoming is that it will not help other method which could
illegally access EC address space.
Comment 2 Brant Langer Gurganus 2003-12-17 06:30:05 UTC
Thanks for the patch.  Next time I compile my kernel, I will give it a try.  I'm
amazed at the speed with which this issue was addressed, especially when it was
originally reported in the wrong bug.
Comment 3 Andy Grover 2003-12-18 15:33:46 UTC
This isn't a bug. BIOSes typically use a variable, that gets set when _REG 
gets run for the EC opregion.

What system is this on, anyways?
Comment 4 Luming Yu 2003-12-18 17:11:42 UTC
Andy, 

The user problem is at http://bugme.osdl.org/show_bug.cgi?id=1444#c40.


Comment 5 Brant Langer Gurganus 2004-01-15 17:34:36 UTC
I applied the patch to Gentoo's kernel and those messages went away which I 
assume means this indeed fixed the problem.  I am left with messages of: 
ACPI: System [ACPI] (supports S0 S3 S4 S5) 
    ACPI-1120: *** Error: Method execution failed [\_SB_.C047.C053] (Node 
c1c102 
c0), AE_AML_BUFFER_LIMIT 
    ACPI-1120: *** Error: Method execution failed [\_SB_.C047.C057] (Node 
c1c103 
00), AE_AML_BUFFER_LIMIT 
    ACPI-1120: *** Error: Method execution failed [\_SB_.C047._CRS] (Node 
c1c103 
40), AE_AML_BUFFER_LIMIT 
    ACPI-0098: *** Error: Method execution failed [\_SB_.C047._CRS] (Node 
c1c103 
40), AE_AML_BUFFER_LIMIT 
 
 
Those errors, I believe, were covered by the bug I originally reported this 
issue to though. 
Comment 6 Greg Sarjeant 2004-01-16 06:54:50 UTC
FYI - this patch also resolves the battery and ac adapter problems that I 
mentioned in bug 1744 (AE_BAD_PARAMETER) on the 2.6.x kernels.

http://bugzilla.kernel.org/show_bug.cgi?id=1744#c14

I'll update that bug as well.
Comment 7 Brant Langer Gurganus 2004-01-22 11:45:43 UTC
I can verify Greg.  The battery/AC monitor in KDE works when the patch is applied. 
Comment 8 Brant Langer Gurganus 2004-02-15 21:34:55 UTC
This patch does not apply cleanly to the latest kernel sources.
Comment 9 Brant Langer Gurganus 2004-03-12 00:56:28 UTC
I'm not familiar with the kernel patch workings, but how long does it take for a
patch such as this to end up in the official kernel and/or ACPI4Linux patchset,
assuming no regressions for other systems.
Comment 10 Robert Moore 2004-03-30 10:06:35 UTC
I am investigating this for inclusion in the ACPI CA core.
Bob
Comment 11 Shaohua 2004-04-01 01:12:14 UTC
*** Bug 2310 has been marked as a duplicate of this bug. ***
Comment 12 Shaohua 2004-04-07 00:39:11 UTC
Bob, could you please provide a solution for all ECDT lack problem? we have 
other issues which failed when executing battery's _INI method istead of 
EC._INI. the issue is bug 2093
Comment 13 Sérgio M Basto 2004-04-08 07:47:00 UTC
Created attachment 2553 [details]
fix one annoying reject when applied to 2.4.26-rc2
Comment 14 Robert Moore 2004-04-08 08:33:25 UTC
I have a problem with this patch, and it concerns the sharing of a global 
variable between the EC driver and the ACPI CA core (acpi_ec_need_reinit).

I would prefer a different solution that does not share a global.

Bob
Comment 15 Luming Yu 2004-04-08 19:20:36 UTC
Bob,

How about export a new function from ACPI CA , that can tell EC driver that 
EC._INI should be re-executed.

Thanks,
Luming
Comment 16 Shaohua 2004-04-08 19:38:22 UTC
So you didn't take care about other ECDT lack problems? I don't think reinit 
EC._INI is a good solution. If you want to provide a workaround, why doesn't 
provide a workarond for all such kind of problem. Please note ec address space 
handler only need to know the ioport. So if ECDT is lack, ACPICA can pre-scan 
DSDT, find the EC's ioport (just parse _CRS) and provide a temporary EC 
address hander untill EC is initialized. this can resolve all similar problems 
istead of EC._INI problem. Bob, please evaluate this method.
Comment 17 Robert Moore 2004-04-09 15:20:37 UTC
The ACPI CA core does not scan around for particular devices, this is the 
responsibility of upper OSPM software. Nor does it parse resource packages.  I 
don't want to add this kind of code just for the EC.
Bob
Comment 18 Robert Moore 2004-04-28 11:02:07 UTC
It would be helpful if someone could post a DSDT that exhibits the EC._INI 
issue.
Bob
Comment 19 Christian Mauduit 2004-04-29 01:08:36 UTC
> It would be helpful if someone could post a DSDT that exhibits the EC._INI 
issue.
Sure, I'm ready to do this (I guess I can do it since I have a machine that
seems to have an issue related to this DSDT stuff), point is I do not know
exactly what to do. I already posted a bunch of log outputs on the bug 2310
page, could please tell me what command line I'd need to type to get this "DSDT"
(or simply point me to some instructive URL so that I can RTFM).

Thanks in advance,

Christian.
Comment 20 Shaohua 2004-05-11 17:46:50 UTC
*** Bug 2667 has been marked as a duplicate of this bug. ***
Comment 21 Len Brown 2004-05-12 19:15:31 UTC
Christian, your acpidmp output in the other bug report is sufficient for Bob 
to extract the DSDT.  thanks.  -Len
Comment 22 Nate Lawson 2004-05-13 15:21:29 UTC
I have serious problems with this change although I don't know how to solve it.

---
ACPI 2.0 spec section 6.5.1:
The _INI method must only access Operation Regions that have been indicated to
available as defined by the _REG method. The _REG method is described in section
6.5.4, "_REG (Region)." This control method is run before _ADR,
_CID, _HID, _SUN, and _UID are run.
---

If we are probing without an ECDT, we have to run _HID and/or _CID to find the
EC device.  But this spec explicitly says you have to run _INI first.  If the
EC._INI method accesses the EC space, what can it expect to accomplish?  The
patch from Luming appears to create a no-op EC space handler.  I can't see how
this is any different from having no handler installed, which is ACPI-CA's
current behavior I believe.

Also, I can't seem to find a DSDT for the Toshiba Tecra S1 that Christian seems
to indicate has this problem.  The Gateway 200x listed by Greg in another bug
does not have an EC._INI method.
Comment 23 Roderich Schupp 2004-05-14 08:04:06 UTC
I attached a disassembled version of the DSDT for 
my Toshiba Tecra S1 here:
http://bugme.osdl.org/show_bug.cgi?id=2667#c3
Comment 24 Shaohua 2004-05-24 00:02:03 UTC
*** Bug 2541 has been marked as a duplicate of this bug. ***
Comment 25 Christian Mauduit 2004-09-08 06:10:18 UTC
FYI I installed a kernel 2.6.8 on my laptop, and battery is now correctly
detected and its charge correctly displayed, without applying any patch. I
installed a locally compiled kernel, using a Debian source package (sarge).

I also updated the BIOS (after I first saw it worked) and it kept working.

So from my point of view the problem is solved (previous Bug 2310).
Comment 26 Roderich Schupp 2004-09-14 01:07:38 UTC
Sorry to correct Christian: a vanilla (kernel.org) 2.6.8 kernel 
does NOT fix the problem. The Debian 2.6.8 kernel package that he
used is heavily patched. However, I can confirm that this
Debian kernel works on my Toshiba Tecra S1, too. It has other
issues, though (e.g. resume from S3 doesn't work). 
Note that the patch attached to this bug page is NOT among those 
applied to the Debian kernel, rather a patch called acpi-early-init
seems to do the trick.
Comment 27 Shaohua 2004-11-14 20:15:10 UTC
Created attachment 4031 [details]
fake ECDT patch

Please try this patch.
The idea of the patch is if system hasn't an ECDT, try to make a fake ECDT by
pre-scanning EC device.
Comment 28 Shaohua 2004-11-15 21:16:00 UTC
*** Bug 1515 has been marked as a duplicate of this bug. ***
Comment 29 Shaohua 2004-11-15 21:20:52 UTC
Created attachment 4035 [details]
fake ECDT patch using boot option

Using boot option possibly is better (still using above idea in the patch).
Please apply the patch and add boot option 'acpi_fake_ecdt'
Comment 30 Shaohua 2004-11-17 21:28:31 UTC
Created attachment 4073 [details]
updated patch

Per Len's request, add comments in the patch.
The patch passed test in a Toshiba laptop and T40 (I force them using fake ECDT
instead of physical ECDT).
Comment 31 Len Brown 2004-12-05 20:24:18 UTC
applied patch in comment #30 to acpi-test tree 
Comment 32 Len Brown 2005-01-26 21:47:57 UTC
shipped in linux-2.6.11-rc1 -- closing.
Comment 33 James Le Cuirot 2005-09-30 15:49:37 UTC
I think this bug needs to be reopened. I have a Sony Vaio PCG-K195HP and have 
made the following observations. Note that I am using a corrected DSDT, which I 
created using Intel's compiler. Sorry about the different kernels but the ACPI 
stuff should be the same anyway.

gentoo-2.6.9-r9 - /proc/acpi/battery works fine but ACPI battery errors appear 
in dmesg. Haven't got these to hand but apparently they are typical of a missing 
ECDT.

suspend2-2.6.13-r4 (based on gentoo) - /proc/acpi/battery doesn't work at all 
normally. I discovered the original patch submitted here by Luming Yu before 
seeing the entire bug report so I updated the patch and applied it to this 
kernel. It worked. I only then discovered the acpi_fake_ecdt option so I removed 
the patch and tried the option but it had no effect.

linux-2.6.14-rc2 - Basically the same result as suspend2-2.6.13-r4 but the patch 
only seems to work when not using a custom DSDT?

Evidently there is some key element missing from the acpi_fake_ecdt option that 
is present in the orignal patch. It's unlikely but if anyone watching this is 
going to be at LinuxWorld in London next week, they can take a look at this 
machine.
Comment 34 James Le Cuirot 2005-09-30 15:51:49 UTC
Created attachment 6201 [details]
Original patch updated for 2.6.14-rc2

I'm not saying this patch should be used instead but I thought I'd include it
here to make solving the problem easier.
Comment 35 Luming Yu 2005-10-22 23:25:53 UTC
Please post dmesg and acpidump output.
Comment 36 James Le Cuirot 2005-11-09 06:53:55 UTC
Created attachment 6505 [details]
Chewi's dmesg

Sorry for the delay. I'm now running 2.6.14-suspend2 and basically, it works
sometimes but not others, regardless of whether I'm using acpi_fake_ecdt or
not. Here is my dmesg. My DSDT (I don't have acpidump but that's what it dumps
right?) will follow.
Comment 37 James Le Cuirot 2005-11-09 06:54:37 UTC
Created attachment 6506 [details]
Sony-PCG-K195HP-radeon64-custom.asl
Comment 38 Luming Yu 2005-11-20 01:13:12 UTC
Please try boot option ec_burst=1, and disable preempt.
Comment 39 James Le Cuirot 2005-11-20 16:26:25 UTC
I upgraded to 2.6.14-r2 and tried ec_burst=1 with and without preempt. I said 
the battery was absent every time, I'm afraid. )-:

Note You need to log in before you can comment on or make changes to this bug.