All of lore.kernel.org
 help / color / mirror / Atom feed
* Bug 11884 - _REG and _INI
@ 2008-12-15  3:51 Lin Ming
  2008-12-15  7:27 ` Zhao Yakui
  0 siblings, 1 reply; 6+ messages in thread
From: Lin Ming @ 2008-12-15  3:51 UTC (permalink / raw)
  To: Alexey Starikovskiy; +Cc: linux-acpi

http://bugzilla.kernel.org/show_bug.cgi?id=11884 

Method(\_SB._INI)
{
	//initialize package CUZO
}

Method(\_SB_.PCI0.LPCB.EC0_._REG)
{
	//access package CUZO
}

For this machine, \_SB._INI must be run before \_SB_.PCI0.LPCB.EC0_._REG

But currently early EC _REG method is run before _INI as below acpi_bus_init shows.

void __init acpi_bus_init(void)
         .....
         status = acpi_ec_ecdt_probe();
         /* Ignore result. Not having an ECDT is not fatal. */

         status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
         .....
}

acpi_ec_ecdt_probe will install ec handler although no ECDT found in this machine.

Alexey, 
How about that if there's no ECDT found, we do not install ec handler before acpi_initialize_objects?

Lin Ming



--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug 11884 - _REG and _INI
  2008-12-15  3:51 Bug 11884 - _REG and _INI Lin Ming
@ 2008-12-15  7:27 ` Zhao Yakui
  2008-12-15  9:26   ` Alexey Starikovskiy
  0 siblings, 1 reply; 6+ messages in thread
From: Zhao Yakui @ 2008-12-15  7:27 UTC (permalink / raw)
  To: Lin Ming; +Cc: Alexey Starikovskiy, linux-acpi

On Mon, 2008-12-15 at 11:51 +0800, Lin Ming wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=11884 
> 
> Method(\_SB._INI)
> {
> 	//initialize package CUZO
> }
> 
> Method(\_SB_.PCI0.LPCB.EC0_._REG)
> {
> 	//access package CUZO
> }
> 
> For this machine, \_SB._INI must be run before \_SB_.PCI0.LPCB.EC0_._REG
> 
> But currently early EC _REG method is run before _INI as below acpi_bus_init shows.
> 
> void __init acpi_bus_init(void)
>          .....
>          status = acpi_ec_ecdt_probe();
>          /* Ignore result. Not having an ECDT is not fatal. */
> 
>          status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
>          .....
> }
> 
> acpi_ec_ecdt_probe will install ec handler although no ECDT found in this machine.
> 
> Alexey, 
> How about that if there's no ECDT found, we do not install ec handler before acpi_initialize_objects?

I do some test with the help of KVM. In my test the ECDT table is
defined. And there also exists the EC device in DSDT table.Of course
there exists the _INI/_REG object under the scope of EC device. Under
the scope of \_SB.PCI0 there exists the _INI/_REG object.

>From the test result it seems that all the _INI objects are evaluated
before _REG object even when there exists the ECDT table.

Hi, Alexey
    Can the Lin Ming's proposal be considered based on the above test? 

Thanks.

> 
> Lin Ming
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug 11884 - _REG and _INI
  2008-12-15  7:27 ` Zhao Yakui
@ 2008-12-15  9:26   ` Alexey Starikovskiy
  2008-12-15 10:47     ` Alexey Starikovskiy
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Starikovskiy @ 2008-12-15  9:26 UTC (permalink / raw)
  To: Zhao Yakui; +Cc: Lin Ming, linux-acpi

Zhao Yakui wrote:
> On Mon, 2008-12-15 at 11:51 +0800, Lin Ming wrote:
>> http://bugzilla.kernel.org/show_bug.cgi?id=11884 
>>
>> Method(\_SB._INI)
>> {
>> 	//initialize package CUZO
>> }
>>
>> Method(\_SB_.PCI0.LPCB.EC0_._REG)
>> {
>> 	//access package CUZO
>> }
>>
>> For this machine, \_SB._INI must be run before \_SB_.PCI0.LPCB.EC0_._REG
>>
>> But currently early EC _REG method is run before _INI as below acpi_bus_init shows.
>>
>> void __init acpi_bus_init(void)
>>          .....
>>          status = acpi_ec_ecdt_probe();
>>          /* Ignore result. Not having an ECDT is not fatal. */
>>
>>          status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
>>          .....
>> }
>>
>> acpi_ec_ecdt_probe will install ec handler although no ECDT found in this machine.
>>
>> Alexey, 
>> How about that if there's no ECDT found, we do not install ec handler before acpi_initialize_objects?
> 
> I do some test with the help of KVM. In my test the ECDT table is
> defined. And there also exists the EC device in DSDT table.Of course
> there exists the _INI/_REG object under the scope of EC device. Under
> the scope of \_SB.PCI0 there exists the _INI/_REG object.
> 
>>From the test result it seems that all the _INI objects are evaluated
> before _REG object even when there exists the ECDT table.
> 
> Hi, Alexey
>     Can the Lin Ming's proposal be considered based on the above test? 
Hi Yakui,
His proposal needs to be considered even without your test (but the test itself is quite helpful), 
just because HP does not violate the ACPI spec, but ASUS notebooks without ECDT do violate it 
(and fake ECDT workaround is there for them).

Thanks,
Alex.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug 11884 - _REG and _INI
  2008-12-15  9:26   ` Alexey Starikovskiy
@ 2008-12-15 10:47     ` Alexey Starikovskiy
  2008-12-16  1:07       ` Zhao Yakui
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Starikovskiy @ 2008-12-15 10:47 UTC (permalink / raw)
  To: Lin Ming; +Cc: Zhao Yakui, linux-acpi

It's not that simple... Here is relevant part of dmesg from my thinkpad:

------------------------------------------------------------------------
ACPI Error (evregion-0315): No handler for Region [ECOR] 
(ffff8800bf814558) [EmbeddedControl] [20080926]
ACPI Error (exfldio-0291): Region EmbeddedControl(3) has no handler 
[20080926]
ACPI Error (psparse-0524): Method parse/execution failed 
[\_SB_.PCI0.LPC_.EC__._INI] (Node ffff8800bf817300), AE_NOT_EXIST
ACPI: EC: EC description table is found, configuring boot EC
ACPI: Interpreter enabled
ACPI: (supports S0 S3 S5)
ACPI: Using IOAPIC for interrupt routing
ACPI: EC: non-query interrupt received, switching to interrupt mode
ACPI: EC: GPE = 0x1c, I/O: command/status = 0x66, data = 0x62
ACPI: EC: driver started in interrupt mode
--------------------------------------------------------------------------

Any other suggestions?

Regards,
Alex.

Alexey Starikovskiy wrote:
> Zhao Yakui wrote:
>> On Mon, 2008-12-15 at 11:51 +0800, Lin Ming wrote:
>>> http://bugzilla.kernel.org/show_bug.cgi?id=11884
>>> Method(\_SB._INI)
>>> {
>>> //initialize package CUZO
>>> }
>>>
>>> Method(\_SB_.PCI0.LPCB.EC0_._REG)
>>> {
>>> //access package CUZO
>>> }
>>>
>>> For this machine, \_SB._INI must be run before 
>>> \_SB_.PCI0.LPCB.EC0_._REG
>>>
>>> But currently early EC _REG method is run before _INI as below 
>>> acpi_bus_init shows.
>>>
>>> void __init acpi_bus_init(void)
>>> .....
>>> status = acpi_ec_ecdt_probe();
>>> /* Ignore result. Not having an ECDT is not fatal. */
>>>
>>> status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
>>> .....
>>> }
>>>
>>> acpi_ec_ecdt_probe will install ec handler although no ECDT found 
>>> in this machine.
>>>
>>> Alexey, How about that if there's no ECDT found, we do not install 
>>> ec handler before acpi_initialize_objects?
>>
>> I do some test with the help of KVM. In my test the ECDT table is
>> defined. And there also exists the EC device in DSDT table.Of course
>> there exists the _INI/_REG object under the scope of EC device. Under
>> the scope of \_SB.PCI0 there exists the _INI/_REG object.
>>
>>> From the test result it seems that all the _INI objects are evaluated
>> before _REG object even when there exists the ECDT table.
>>
>> Hi, Alexey
>> Can the Lin Ming's proposal be considered based on the above test? 
> Hi Yakui,
> His proposal needs to be considered even without your test (but the 
> test itself is quite helpful), just because HP does not violate the 
> ACPI spec, but ASUS notebooks without ECDT do violate it (and fake 
> ECDT workaround is there for them).
>
> Thanks,
> Alex.
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug 11884 - _REG and _INI
  2008-12-15 10:47     ` Alexey Starikovskiy
@ 2008-12-16  1:07       ` Zhao Yakui
  2008-12-16 10:17         ` Alexey Starikovskiy
  0 siblings, 1 reply; 6+ messages in thread
From: Zhao Yakui @ 2008-12-16  1:07 UTC (permalink / raw)
  To: Alexey Starikovskiy; +Cc: Lin, Ming M, linux-acpi

On Mon, 2008-12-15 at 18:47 +0800, Alexey Starikovskiy wrote:
> It's not that simple... Here is relevant part of dmesg from my thinkpad:
> 
> ------------------------------------------------------------------------
> ACPI Error (evregion-0315): No handler for Region [ECOR] 
> (ffff8800bf814558) [EmbeddedControl] [20080926]
> ACPI Error (exfldio-0291): Region EmbeddedControl(3) has no handler 
> [20080926]
> ACPI Error (psparse-0524): Method parse/execution failed 
> [\_SB_.PCI0.LPC_.EC__._INI] (Node ffff8800bf817300), AE_NOT_EXIST
> ACPI: EC: EC description table is found, configuring boot EC
> ACPI: Interpreter enabled
> ACPI: (supports S0 S3 S5)
> ACPI: Using IOAPIC for interrupt routing
> ACPI: EC: non-query interrupt received, switching to interrupt mode
> ACPI: EC: GPE = 0x1c, I/O: command/status = 0x66, data = 0x62
> ACPI: EC: driver started in interrupt mode
> --------------------------------------------------------------------------
There exists too much difference on different vendors.
In theory there exists the EC flag in AML code, which indicates whether
the EC operation region can be accessed.  After the EC _REG object is
evaluated, the EC flag will be set and it means that EC operation region
can be accessed. Before the EC _REG object is evaluated, it had better
be zero.
>From the above dmesg it seems that the above warning is related with one
of the two following factors:
   a. EC flag is initialized as one. In such case it means that EC
operation region can be accessed before EC initialization.
   b. EC flag is not used correctly in some methods. 

At the same time from the above message we know that there exists the
ECDT table. So when there exists the ECDT table, we can continue to use
the current flowchart of EC initialization.

Can Lin ming's proposal be applied to the situation that there is no
ECDT table? 

Thanks.
    
> 
> Any other suggestions?
> 
> Regards,
> Alex.
> 
> Alexey Starikovskiy wrote:
> > Zhao Yakui wrote:
> >> On Mon, 2008-12-15 at 11:51 +0800, Lin Ming wrote:
> >>> http://bugzilla.kernel.org/show_bug.cgi?id=11884
> >>> Method(\_SB._INI)
> >>> {
> >>> //initialize package CUZO
> >>> }
> >>>
> >>> Method(\_SB_.PCI0.LPCB.EC0_._REG)
> >>> {
> >>> //access package CUZO
> >>> }
> >>>
> >>> For this machine, \_SB._INI must be run before 
> >>> \_SB_.PCI0.LPCB.EC0_._REG
> >>>
> >>> But currently early EC _REG method is run before _INI as below 
> >>> acpi_bus_init shows.
> >>>
> >>> void __init acpi_bus_init(void)
> >>> .....
> >>> status = acpi_ec_ecdt_probe();
> >>> /* Ignore result. Not having an ECDT is not fatal. */
> >>>
> >>> status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
> >>> .....
> >>> }
> >>>
> >>> acpi_ec_ecdt_probe will install ec handler although no ECDT found 
> >>> in this machine.
> >>>
> >>> Alexey, How about that if there's no ECDT found, we do not install 
> >>> ec handler before acpi_initialize_objects?
> >>
> >> I do some test with the help of KVM. In my test the ECDT table is
> >> defined. And there also exists the EC device in DSDT table.Of course
> >> there exists the _INI/_REG object under the scope of EC device. Under
> >> the scope of \_SB.PCI0 there exists the _INI/_REG object.
> >>
> >>> From the test result it seems that all the _INI objects are evaluated
> >> before _REG object even when there exists the ECDT table.
> >>
> >> Hi, Alexey
> >> Can the Lin Ming's proposal be considered based on the above test? 
> > Hi Yakui,
> > His proposal needs to be considered even without your test (but the 
> > test itself is quite helpful), just because HP does not violate the 
> > ACPI spec, but ASUS notebooks without ECDT do violate it (and fake 
> > ECDT workaround is there for them).
> >
> > Thanks,
> > Alex.
> > -- 
> > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug 11884 - _REG and _INI
  2008-12-16  1:07       ` Zhao Yakui
@ 2008-12-16 10:17         ` Alexey Starikovskiy
  0 siblings, 0 replies; 6+ messages in thread
From: Alexey Starikovskiy @ 2008-12-16 10:17 UTC (permalink / raw)
  To: Zhao Yakui; +Cc: Lin, Ming M, linux-acpi

Zhao Yakui wrote:
> On Mon, 2008-12-15 at 18:47 +0800, Alexey Starikovskiy wrote:
>   
>> It's not that simple... Here is relevant part of dmesg from my thinkpad:
>>
>> ------------------------------------------------------------------------
>> ACPI Error (evregion-0315): No handler for Region [ECOR] 
>> (ffff8800bf814558) [EmbeddedControl] [20080926]
>> ACPI Error (exfldio-0291): Region EmbeddedControl(3) has no handler 
>> [20080926]
>> ACPI Error (psparse-0524): Method parse/execution failed 
>> [\_SB_.PCI0.LPC_.EC__._INI] (Node ffff8800bf817300), AE_NOT_EXIST
>> ACPI: EC: EC description table is found, configuring boot EC
>> ACPI: Interpreter enabled
>> ACPI: (supports S0 S3 S5)
>> ACPI: Using IOAPIC for interrupt routing
>> ACPI: EC: non-query interrupt received, switching to interrupt mode
>> ACPI: EC: GPE = 0x1c, I/O: command/status = 0x66, data = 0x62
>> ACPI: EC: driver started in interrupt mode
>> --------------------------------------------------------------------------
>>     
> There exists too much difference on different vendors.
> In theory there exists the EC flag in AML code, which indicates whether
> the EC operation region can be accessed.  After the EC _REG object is
> evaluated, the EC flag will be set and it means that EC operation region
> can be accessed. Before the EC _REG object is evaluated, it had better
> be zero.
> >From the above dmesg it seems that the above warning is related with one
> of the two following factors:
>    a. EC flag is initialized as one. In such case it means that EC
> operation region can be accessed before EC initialization.
>    b. EC flag is not used correctly in some methods. 
>
>   
I've added a patch to #11884, which will limit _INI check to ASUS machines.
Thus, registration of handlers on HP will happen only after all _INI 
methods are run.
I think, it is a simpler way out of this mess.
> At the same time from the above message we know that there exists the
> ECDT table. So when there exists the ECDT table, we can continue to use
> the current flowchart of EC initialization.
>
> Can Lin ming's proposal be applied to the situation that there is no
> ECDT table?
>   
If ECDT exists, we must register EC driver before calls to _INI methods.
in absence of ECDT, we check for EC._INI method as a clue, with the new 
patch,
we check EC._INI only on ASUS, so we will register EC driver early only 
if it is ASUS and has EC._INI.

Regards,
Alex.
>   

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-12-16 10:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-15  3:51 Bug 11884 - _REG and _INI Lin Ming
2008-12-15  7:27 ` Zhao Yakui
2008-12-15  9:26   ` Alexey Starikovskiy
2008-12-15 10:47     ` Alexey Starikovskiy
2008-12-16  1:07       ` Zhao Yakui
2008-12-16 10:17         ` Alexey Starikovskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.