From owner-acpi-jp@jp.FreeBSD.org Mon Mar 29 00:57:51 2004
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id i2SFvpm94852;
	Mon, 29 Mar 2004 00:57:51 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from poup.poupinou.org (poup.poupinou.org [195.101.94.96])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with ESMTP/inet id i2SFvod94847
	for <acpi-jp@jp.freebsd.org>; Mon, 29 Mar 2004 00:57:50 +0900 (JST)
	(envelope-from ducrot@poupinou.org)
Received: from ducrot by poup.poupinou.org with local (Exim)
	id 1B7ceq-0000Ym-00; Sun, 28 Mar 2004 17:57:08 +0200
To: "Moore, Robert" <robert.moore@intel.com>
Cc: Nate Lawson <nate@root.org>, acpi-jp@jp.FreeBSD.org, current@freebsd.org
Message-ID: <20040328155708.GC19001@poupinou.org>
References: <37F890616C995246BE76B3E6B2DBE055201C6C@orsmsx403.jf.intel.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <37F890616C995246BE76B3E6B2DBE055201C6C@orsmsx403.jf.intel.com>
User-Agent: Mutt/1.5.4i
From: Bruno Ducrot <ducrot@poupinou.org>
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Sun, 28 Mar 2004 17:57:08 +0200
X-Sequence: acpi-jp 3157
Subject: [acpi-jp 3157] Re: ACPI-CA 20040311 imported
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: ducrot@poupinou.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+040307

On Fri, Mar 26, 2004 at 01:52:21PM -0800, Moore, Robert wrote:
> Here's an example of ASL recursion:
> 
> Method(PWUP,0,NotSerialized)
> {
>     If(LAnd(\_SB.PCI0.CBS0.PWRS,\_SB.PCI0.CBS1.PWRS))
>     {
>         If(LNot(And(_ADR /* \_SB.PCI0.CBS0._ADR */,0xFFFF)))
>         {
>             And(MCTL /* \_SB.PCI0.CBS0.MCTL */,0x7C,Local0)
>             Or(Local0,BMCL /* \_SB.PCI0.CBS0.BMCL */,MCTL /*
> \_SB.PCI0.CBS0.MCTL */)
>         }
>         Else
>         {
>             \_SB.PCI0.CBS0.PWUP()
>         }
>     }
> }

I assume that PWRS are some hardware io (pci conf probably), able to
detect if the cardbus is powered or not.
I assume _ADR can not be made dynamic.  So far, this function look like:

Method(PWUP, 0, NotSerialized) {
	While (Not((LAnd(\_SB.PCI0.CBS0.PWRS,\_SB.PCI0.CBS1.PWRS))) {
		Noop
	}
}
and is probably called from _WAK, or more likely from _PS0 so far I
guess it is ok to busy loop (in both form).

Why not writting the busy loop instead?

In the original form, there is the possibility to crash the system
by overflowing the kernel stack if the bus is not powered quickly.



--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.
