Skip to contentSkip to conversation

acipca patches for Intel

PATCH Nate Lawson 1 participant 1 message Jul 14, 2003 ACPI

lore
Share & tools
lore
#0 lore raw

When you moved the DmDecodeNode function to dmobject.c, you left the prototype defined in two places. This gives a warning.

acdisasm.h renamed from acdisasm.h.orig +0 -4
@@ -226,10 +226,6 @@
 AcpiDmDecodeInternalObject (
     ACPI_OPERAND_OBJECT     *ObjDesc);
 
-void
-AcpiDmDecodeNode (
-    ACPI_NAMESPACE_NODE     *Node);
-
 UINT32
 AcpiDmBlockType (
     ACPI_PARSE_OBJECT       *Op);

We submitted this a while ago but it hasn't made it into the 0619 dist. Use the correct register constant for HwRegisterWrite. This fixes messages of:
ACPI-0340: *** Error: Could not release ACPI Global Lock, AE_BAD_PARAMETER
Credit: [email protected]

sys/contrib/dev/acpica/hwregs.c +2 -2
@@ -510,8 +510,8 @@
         ACPI_REGISTER_INSERT_VALUE (RegisterValue, BitRegInfo->BitPosition,
                 BitRegInfo->AccessBitMask, Value);
 
-        Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK, RegisterId,
-                (UINT16) RegisterValue);
+        Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
+                ACPI_REGISTER_PM1_CONTROL, (UINT16) RegisterValue);
         break;
 
 

This patch reverts part of 0619 to fix _BST errors on IBM thinkpads (and others. It appears many ASL versions do not implement the alluded to 2.0C copy semantics.

sys/contrib/dev/a.old/dsmthdat.c renamed from dsmthdat.c +23 -7
@@ -392,6 +392,7 @@
 {
     ACPI_STATUS             Status;
     ACPI_NAMESPACE_NODE     *Node;
+    ACPI_OPERAND_OBJECT     *NewDesc = Object;
 
 
     ACPI_FUNCTION_TRACE ("DsMethodDataSetValue");
@@ -410,17 +411,32 @@
         return_ACPI_STATUS (Status);
     }
 
-    /*
-     * Increment ref count so object can't be deleted while installed.
-     * NOTE: We do not copy the object in order to preserve the call by
-     * reference semantics of ACPI Control Method invocation.
-     * (See ACPI Specification 2.0C)
+    /*
+     * If the object has just been created and is not attached to anything,
+     * (the reference count is 1), then we can just store it directly into
+     * the arg/local.  Otherwise, we must copy it.
      */
-    AcpiUtAddReference (Object);
+    if (Object->Common.ReferenceCount > 1)
+    {
+        Status = AcpiUtCopyIobjectToIobject (Object, &NewDesc, WalkState);
+        if (ACPI_FAILURE (Status))
+        {
+            return_ACPI_STATUS (Status);
+        }
+
+       ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Object Copied %p, new %p\n",
+           Object, NewDesc));
+    }
+    else
+    {
+        /* Increment ref count so object can't be deleted while installed */
+
+        AcpiUtAddReference (NewDesc);
+    }
 
     /* Install the object */
 
-    Node->Object = Object;
+    Node->Object = NewDesc;
     return_ACPI_STATUS (Status);
 }
 

Finally, I did not commit this change but it has been necessary in the past. Can you comment on the need to specify an OwnerId?

nsalloc.c renamed from nsalloc.c.orig +1 -1
@@ -321,7 +321,7 @@
     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
 

The last two are credit: [email protected]

Thanks,
Nate

-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1