Re: [acpi-jp 2267] Re: HEADSUP: acpi patches in the tree

From: Takayoshi Kochi <kochi_at_netbsd.org>
Date: Thu, 29 May 2003 01:23:49 +0900 (JST)
Hi,

From: Nate Lawson <nate_at_root.org>
Subject: [acpi-jp 2267] Re: HEADSUP: acpi patches in the tree
Date: Tue, 27 May 2003 16:58:59 -0700

> On Wed, 28 May 2003, Shin-ichi YOSHIMOTO wrote:
> > After this update, I found some error messages like this:
> >
> > acpi0: <IntelR AWRDACPI> on motherboard
> >     ACPI-0438: *** Error: Looking up [\\_OS_] in namespace, AE_NOT_FOUND
> >     ACPI-1287: *** Error: Method execution failed [\\_SB_.PCI0._INI] (Node 0xc21b73e0), AE_NOT_FOUND
> 
> Please try the attached patch and see if it changes things for you.

I'm still studying the reason why the TABLE_ID_DSDT is removed
in recent ACPI CA, but at least you should remove all TABLE_ID_DSDT's,
I think.

Also, ACPI_FIRST_METHOD_ID should be larger than 0,
otherwise 0 may be allocated to running method and make a conflict.

I've made a diff against NetBSD-current and just booted the kernel,
but haven't tested much (and still trying to make out what the
changes are intended).

Attached is the patch and should apply to the FreeBSD tree with
some appropriate option.

---
Takayoshi Kochi

Index: aclocal.h
===================================================================
RCS file: /cvsroot/src/sys/dev/acpi/acpica/Subsystem/aclocal.h,v
retrieving revision 1.5
diff -u -r1.5 aclocal.h
--- aclocal.h	2003/03/04 17:25:10	1.5
+++ aclocal.h	2003/05/28 07:24:46
_at__at_ -214,12 +214,8 _at__at_
 typedef UINT16                          ACPI_OWNER_ID;
 #define ACPI_OWNER_TYPE_TABLE           0x0
 #define ACPI_OWNER_TYPE_METHOD          0x1
-#define ACPI_FIRST_METHOD_ID            0x0000
-#define ACPI_FIRST_TABLE_ID             0x8000
-
-/* TBD: [Restructure] get rid of the need for this! */
-
-#define TABLE_ID_DSDT                   (ACPI_OWNER_ID) 0x8000
+#define ACPI_FIRST_METHOD_ID            0x0001
+#define ACPI_FIRST_TABLE_ID             0xF000
 
 
 /* Field access granularities */
Index: dbutils.c
===================================================================
RCS file: /cvsroot/src/sys/dev/acpi/acpica/Subsystem/dbutils.c,v
retrieving revision 1.6
diff -u -r1.6 dbutils.c
--- dbutils.c	2003/03/04 17:25:12	1.6
+++ dbutils.c	2003/05/28 07:24:51
_at__at_ -429,7 +429,7 _at__at_
 
             /* Create a new walk state for the parse */
 
-            WalkState = AcpiDsCreateWalkState (TABLE_ID_DSDT,
+            WalkState = AcpiDsCreateWalkState (0,
                                             NULL, NULL, NULL);
             if (!WalkState)
             {
Index: dsmethod.c
===================================================================
RCS file: /cvsroot/src/sys/dev/acpi/acpica/Subsystem/dsmethod.c,v
retrieving revision 1.7
diff -u -r1.7 dsmethod.c
--- dsmethod.c	2003/05/25 10:08:24	1.7
+++ dsmethod.c	2003/05/28 07:24:52
_at__at_ -381,7 +381,9 _at__at_
         return_ACPI_STATUS (AE_NULL_OBJECT);
     }
 
+printf("OwningId(before) = %d\n", ObjDesc->Method.OwningId);
     ObjDesc->Method.OwningId = AcpiUtAllocateOwnerId (ACPI_OWNER_TYPE_METHOD);
+printf("OwningId(after ) = %d\n", ObjDesc->Method.OwningId);
 
     /* Init for new method, wait on concurrency semaphore */
 
Index: dsopcode.c
===================================================================
RCS file: /cvsroot/src/sys/dev/acpi/acpica/Subsystem/dsopcode.c,v
retrieving revision 1.6
diff -u -r1.6 dsopcode.c
--- dsopcode.c	2003/03/04 17:25:13	1.6
+++ dsopcode.c	2003/05/28 07:24:54
_at__at_ -177,7 +177,7 _at__at_
 
     /* Create and initialize a new parser state */
 
-    WalkState = AcpiDsCreateWalkState (TABLE_ID_DSDT, NULL, NULL, NULL);
+    WalkState = AcpiDsCreateWalkState (0, NULL, NULL, NULL);
     if (!WalkState)
     {
         return_ACPI_STATUS (AE_NO_MEMORY);
_at__at_ -221,7 +221,7 _at__at_
 
     /* Create and initialize a new parser state */
 
-    WalkState = AcpiDsCreateWalkState (TABLE_ID_DSDT, NULL, NULL, NULL);
+    WalkState = AcpiDsCreateWalkState (0, NULL, NULL, NULL);
     if (!WalkState)
     {
         return_ACPI_STATUS (AE_NO_MEMORY);
Index: nsalloc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/acpi/acpica/Subsystem/nsalloc.c,v
retrieving revision 1.8
diff -u -r1.8 nsalloc.c
--- nsalloc.c	2003/05/13 13:29:00	1.8
+++ nsalloc.c	2003/05/28 07:24:56
_at__at_ -314,7 +314,7 _at__at_
     ACPI_NAMESPACE_NODE     *Node,          /* New Child*/
     ACPI_OBJECT_TYPE        Type)
 {
-    UINT16                  OwnerId = TABLE_ID_DSDT;
+    UINT16                  OwnerId = 0;
     ACPI_NAMESPACE_NODE     *ChildNode;
 #ifdef ACPI_ALPHABETIC_NAMESPACE
 
Index: nsload.c
===================================================================
RCS file: /cvsroot/src/sys/dev/acpi/acpica/Subsystem/nsload.c,v
retrieving revision 1.6
diff -u -r1.6 nsload.c
--- nsload.c	2003/03/04 17:25:22	1.6
+++ nsload.c	2003/05/28 07:24:57
_at__at_ -275,7 +275,7 _at__at_
             goto UnlockAndExit;
         }
 
-        TableDesc->TableId = TABLE_ID_DSDT;
+        TableDesc->TableId = 0;
 
         /* Now load the single DSDT */
 
Index: nsparse.c
===================================================================
RCS file: /cvsroot/src/sys/dev/acpi/acpica/Subsystem/nsparse.c,v
retrieving revision 1.2
diff -u -r1.2 nsparse.c
--- nsparse.c	2003/02/13 14:16:23	1.2
+++ nsparse.c	2003/05/28 07:24:58
_at__at_ -166,7 +166,7 _at__at_
 
     /* Create and initialize a new walk state */
 
-    WalkState = AcpiDsCreateWalkState (TABLE_ID_DSDT,
+    WalkState = AcpiDsCreateWalkState (0,
                                     NULL, NULL, NULL);
     if (!WalkState)
     {
Index: pswalk.c
===================================================================
RCS file: /cvsroot/src/sys/dev/acpi/acpica/Subsystem/pswalk.c,v
retrieving revision 1.6
diff -u -r1.6 pswalk.c
--- pswalk.c	2003/03/04 17:25:25	1.6
+++ pswalk.c	2003/05/28 07:24:59
_at__at_ -355,7 +355,7 _at__at_
         return_VOID;
     }
 
-    WalkState = AcpiDsCreateWalkState (TABLE_ID_DSDT, NULL, NULL, Thread);
+    WalkState = AcpiDsCreateWalkState (0, NULL, NULL, Thread);
     if (!WalkState)
     {
         return_VOID;
Index: psxface.c
===================================================================
RCS file: /cvsroot/src/sys/dev/acpi/acpica/Subsystem/psxface.c,v
retrieving revision 1.6
diff -u -r1.6 psxface.c
--- psxface.c	2003/03/04 17:25:25	1.6
+++ psxface.c	2003/05/28 07:24:59
_at__at_ -264,7 +264,7 _at__at_
 
     /* Create and initialize a new walk state */
 
-    WalkState = AcpiDsCreateWalkState (TABLE_ID_DSDT, NULL, NULL, NULL);
+    WalkState = AcpiDsCreateWalkState (0, NULL, NULL, NULL);
     if (!WalkState)
     {
         return_ACPI_STATUS (AE_NO_MEMORY);
Received on Wed May 28 2003 - 07:24:13 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:09 UTC