From owner-acpi-jp@jp.FreeBSD.org Thu Mar 25 03:54:24 2004
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id i2OIsOJ46777;
	Thu, 25 Mar 2004 03:54:24 +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 i2OIsNd46772
	for <acpi-jp@jp.freebsd.org>; Thu, 25 Mar 2004 03:54:23 +0900 (JST)
	(envelope-from ducrot@poupinou.org)
Received: from ducrot by poup.poupinou.org with local (Exim)
	id 1B6DVz-0005KU-00; Wed, 24 Mar 2004 19:54:11 +0100
To: Panagiotis Astithas <past@noc.ntua.gr>
Cc: acpi-jp@jp.FreeBSD.org
Message-ID: <20040324185411.GH19001@poupinou.org>
References: <40617114.2070703@noc.ntua.gr>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <40617114.2070703@noc.ntua.gr>
User-Agent: Mutt/1.5.4i
From: Bruno Ducrot <ducrot@poupinou.org>
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Wed, 24 Mar 2004 19:54:11 +0100
X-Sequence: acpi-jp 3145
Subject: [acpi-jp 3145] Re: Buggy ACPI BIOS
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: ducrot@poupinou.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+040307

On Wed, Mar 24, 2004 at 01:29:24PM +0200, Panagiotis Astithas wrote:
> Hello people,
> 
> I seem to be stuck with this no-name desktop PC that has a buggy ACPI 
> BIOS from Award. Although 5.2.1 runs fine on it (after disabling APIC), 
> I get the following output from iasl:
> 
> 
> hal% iasl past-Award.asl
> 
> Intel ACPI Component Architecture
> ASL Optimizing Compiler / AML Disassembler version 20030619 [Feb 23 2004]
> Copyright (C) 2000 - 2003 Intel Corporation
> Supports ACPI Specification Revision 2.0b
> 
> past-Award.asl   412:     Method (\_WAK, 1, NotSerialized)
> Warning  2026 -                       ^ Reserved method must return a 
> value (_WAK)

That one is easy to address, even though I don't think FreeBSD will use
the value returned in the resume path.

> past-Award.asl   450:             Store (Local0, Local0)
> Error    1013 -                               ^ Method local variable is 
> not initialized (Local0)

Just replacing all this noise by Noop is OK.

> past-Award.asl  1854:                 Method (STM, 0, Serialized)
> Warning  2019 -                                 ^ Not all control paths 
> return a value (STM_)

That one is much harder to get it correct unfortunately.  I think the
correct way is to do what I send you, but I may be wrong.

I think that FreeBSD include a workaround for the return bug, I'm not
sure at 100% though.

If that is the case, you don't have to overwrite your DSDT anyway.


--- past-Award.asl	2004/03/24 18:38:41	1.1
+++ past-Award.asl	2004/03/24 18:47:18
@@ -441,13 +441,14 @@
                 Notify (\_SB.SLPB, 0x02)
             }
         }
+	Return(Package(){0,0})
     }
 
     Scope (\_SI)
     {
         Method (_MSG, 1, NotSerialized)
         {
-            Store (Local0, Local0)
+            Noop
         }
 
         Method (_SST, 1, NotSerialized)
@@ -455,7 +456,7 @@
             If (LEqual (Arg0, 0x03)) {}
             If (LEqual (Arg0, 0x01)) {}
             If (LEqual (Arg0, Zero)) {}
-            Store (Local0, Local0)
+            Noop
         }
     }
 
@@ -1390,17 +1391,17 @@
                 {
                     Method (DISD, 1, NotSerialized)
                     {
-                        Store (Local0, Local0)
+                        Noop
                     }
 
                     Method (CKIO, 2, NotSerialized)
                     {
-                        Store (Local0, Local0)
+                        Noop
                     }
 
                     Method (SLDM, 2, NotSerialized)
                     {
-                        Store (Local0, Local0)
+                        Noop
                     }
                 }
             }
@@ -1662,13 +1663,15 @@
                         Store (PSPT, GSPT)
                         Store (PSUE, GSUE)
                         Store (PSUT, GSUT)
-                        STM ()
-                        Store (GMPT, PMPT)
-                        Store (GMUE, PMUE)
-                        Store (GMUT, PMUT)
-                        Store (GSPT, PSPT)
-                        Store (GSUE, PSUE)
-                        Store (GSUT, PSUT)
+                        If (REGF) {
+                            STM ()
+                            Store (GMPT, PMPT)
+                            Store (GMUE, PMUE)
+                            Store (GMUT, PMUT)
+                            Store (GSPT, PSPT)
+                            Store (GSUE, PSUE)
+                            Store (GSUT, PSUT)
+			}
                     }
 
                     Device (DRV0)
@@ -1707,13 +1710,15 @@
                         Store (SSPT, GSPT)
                         Store (SSUE, GSUE)
                         Store (SSUT, GSUT)
-                        STM ()
-                        Store (GMPT, SMPT)
-                        Store (GMUE, SMUE)
-                        Store (GMUT, SMUT)
-                        Store (GSPT, SSPT)
-                        Store (GSUE, SSUE)
-                        Store (GSUT, SSUT)
+                        If (REGF) {
+                            STM ()
+                            Store (GMPT, SMPT)
+                            Store (GMUE, SMUE)
+                            Store (GMUT, SMUT)
+                            Store (GSPT, SSPT)
+                            Store (GSUE, SSUE)
+                            Store (GSUT, SSUT)
+			}
                     }
 
                     Device (DRV0)
@@ -1853,11 +1858,6 @@
 
                 Method (STM, 0, Serialized)
                 {
-                    If (REGF) {}
-                    Else
-                    {
-                        Return (TMD0)
-                    }
 
                     Store (0x00, GMUE)
                     Store (0x00, GSUE)
@@ -3473,7 +3473,7 @@
                         DISD (0x01)
                     }
 
-                    Store (Local0, Local0)
+                    Noop
                 }
 
                 Method (_CRS, 0, NotSerialized)


Cheers,

-- 
Bruno Ducrot

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