Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 May 2016 21:40:35 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r300876 - in vendor-sys/acpica/dist: . source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/components/executer source/component...
Message-ID:  <201605272140.u4RLeZiu065820@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Fri May 27 21:40:35 2016
New Revision: 300876
URL: https://svnweb.freebsd.org/changeset/base/300876

Log:
  Import ACPICA 20160527.

Modified:
  vendor-sys/acpica/dist/changes.txt
  vendor-sys/acpica/dist/source/compiler/asloptions.c
  vendor-sys/acpica/dist/source/components/debugger/dbobject.c
  vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c
  vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c
  vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c
  vendor-sys/acpica/dist/source/components/executer/exfldio.c
  vendor-sys/acpica/dist/source/components/hardware/hwregs.c
  vendor-sys/acpica/dist/source/components/namespace/nsaccess.c
  vendor-sys/acpica/dist/source/components/namespace/nsdump.c
  vendor-sys/acpica/dist/source/components/utilities/utdebug.c
  vendor-sys/acpica/dist/source/components/utilities/utdecode.c
  vendor-sys/acpica/dist/source/include/acglobal.h
  vendor-sys/acpica/dist/source/include/acmacros.h
  vendor-sys/acpica/dist/source/include/acoutput.h
  vendor-sys/acpica/dist/source/include/acpixf.h
  vendor-sys/acpica/dist/source/include/acutils.h
  vendor-sys/acpica/dist/source/include/platform/aclinux.h
  vendor-sys/acpica/dist/source/os_specific/service_layers/osbsdtbl.c
  vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c
  vendor-sys/acpica/dist/source/tools/acpisrc/asremove.c

Modified: vendor-sys/acpica/dist/changes.txt
==============================================================================
--- vendor-sys/acpica/dist/changes.txt	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/changes.txt	Fri May 27 21:40:35 2016	(r300876)
@@ -1,4 +1,37 @@
 ----------------------------------------
+27 May 2016. Summary of changes for version 20160527:
+
+This release is available at https://acpica.org/downloads
+
+
+1) ACPICA kernel-resident subsystem:
+
+Temporarily reverted the new arbitrary bit length/alignment support in 
+AcpiHwRead/AcpiHwWrite for the Generic Address Structure. There have been 
+a number of regressions with the new code that need to be fully resolved 
+and tested before this support can be finally integrated into ACPICA. 
+Apologies for any inconveniences these issues may have caused.
+
+The ACPI message macros are not configurable (ACPI_MSG_ERROR, 
+ACPI_MSG_EXCEPTION, ACPI_MSG_WARNING, ACPI_MSG_INFO, ACPI_MSG_BIOS_ERROR, 
+and ACPI_MSG_BIOS_WARNING). Lv Zheng.
+
+Fixed a couple of GCC warnings associated with the use of the -Wcast-qual 
+option. Adds a new return macro, return_STR. Junk-uk Kim.
+
+Example Code and Data Size: These are the sizes for the OS-independent 
+acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The 
+debug version of the code includes the debug output trace mechanism and 
+has a much larger code and data size.
+
+  Current Release:
+    Non-Debug Version: 136.8K Code, 51.6K Data, 188.4K Total
+    Debug Version:     201.5K Code, 82.2K Data, 283.7K Total
+  Previous Release:
+    Non-Debug Version: 137.4K Code, 52.6K Data, 190.0K Total
+    Debug Version:     200.9K Code, 82.2K Data, 283.1K Total
+
+----------------------------------------
 22 April 2016. Summary of changes for version 20160422:
 
 1) ACPICA kernel-resident subsystem:

Modified: vendor-sys/acpica/dist/source/compiler/asloptions.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/asloptions.c	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/compiler/asloptions.c	Fri May 27 21:40:35 2016	(r300876)
@@ -541,9 +541,13 @@ AslDoOptions (
 
         case 'e':
 
-            /* Disable External opcode generation */
+            /* iASL: Disable External opcode generation */
 
             Gbl_DoExternals = FALSE;
+
+            /* Disassembler: Emit embedded external operators */
+
+            AcpiGbl_DmEmitExternalOpcodes = TRUE;
             break;
 
         case 'f':

Modified: vendor-sys/acpica/dist/source/components/debugger/dbobject.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/debugger/dbobject.c	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/components/debugger/dbobject.c	Fri May 27 21:40:35 2016	(r300876)
@@ -161,10 +161,10 @@ AcpiDbDecodeInternalObject (
 
     case ACPI_TYPE_STRING:
 
-        AcpiOsPrintf ("(%u) \"%.24s",
+        AcpiOsPrintf ("(%u) \"%.60s",
             ObjDesc->String.Length, ObjDesc->String.Pointer);
 
-        if (ObjDesc->String.Length > 24)
+        if (ObjDesc->String.Length > 60)
         {
             AcpiOsPrintf ("...");
         }

Modified: vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c	Fri May 27 21:40:35 2016	(r300876)
@@ -971,7 +971,16 @@ AcpiDmDisassembleOneOp (
 
     case AML_EXTERNAL_OP:
 
-        break;
+        if (AcpiGbl_DmEmitExternalOpcodes)
+        {
+            AcpiOsPrintf ("/* Opcode 0x15 */ ");
+
+            /* Fallthrough */
+        }
+        else
+        {
+            break;
+        }
 
     default:
 

Modified: vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c	Fri May 27 21:40:35 2016	(r300876)
@@ -462,21 +462,26 @@ AcpiDmDescendingOp (
         {
             NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
 
-            /*
-             * A Zero predicate indicates the possibility of one or more
-             * External() opcodes within the If() block.
-             */
-            if (NextOp->Common.AmlOpcode == AML_ZERO_OP)
-            {
-                NextOp2 = NextOp->Common.Next;
+            /* Don't emit the actual embedded externals unless asked */
 
-                if (NextOp2 &&
-                    (NextOp2->Common.AmlOpcode == AML_EXTERNAL_OP))
+            if (!AcpiGbl_DmEmitExternalOpcodes)
+            {
+                /*
+                 * A Zero predicate indicates the possibility of one or more
+                 * External() opcodes within the If() block.
+                 */
+                if (NextOp->Common.AmlOpcode == AML_ZERO_OP)
                 {
-                    /* Ignore the If 0 block and all children */
+                    NextOp2 = NextOp->Common.Next;
+
+                    if (NextOp2 &&
+                        (NextOp2->Common.AmlOpcode == AML_EXTERNAL_OP))
+                    {
+                        /* Ignore the If 0 block and all children */
 
-                    Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
-                    return (AE_CTRL_DEPTH);
+                        Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
+                        return (AE_CTRL_DEPTH);
+                    }
                 }
             }
         }

Modified: vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c	Fri May 27 21:40:35 2016	(r300876)
@@ -603,12 +603,14 @@ AcpiDsCreateOperand (
                 }
                 else if (ParentOp->Common.AmlOpcode == AML_EXTERNAL_OP)
                 {
-                    /* TBD: May only be temporary */
-
-                    ObjDesc = AcpiUtCreateStringObject ((ACPI_SIZE) NameLength);
-
-                    strncpy (ObjDesc->String.Pointer, NameString, NameLength);
-                    Status = AE_OK;
+                    /*
+                     * This opcode should never appear here. It is used only
+                     * by AML disassemblers and is surrounded by an If(0)
+                     * by the ASL compiler.
+                     *
+                     * Therefore, if we see it here, it is a serious error.
+                     */
+                    Status = AE_AML_BAD_OPCODE;
                 }
                 else
                 {

Modified: vendor-sys/acpica/dist/source/components/executer/exfldio.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/executer/exfldio.c	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/components/executer/exfldio.c	Fri May 27 21:40:35 2016	(r300876)
@@ -946,9 +946,20 @@ AcpiExInsertIntoField (
 
     AccessBitWidth = ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth);
 
-    /* Create the bitmasks used for bit insertion */
+    /*
+     * Create the bitmasks used for bit insertion.
+     * Note: This if/else is used to bypass compiler differences with the
+     * shift operator
+     */
+    if (AccessBitWidth == ACPI_INTEGER_BIT_SIZE)
+    {
+        WidthMask = ACPI_UINT64_MAX;
+    }
+    else
+    {
+        WidthMask = ACPI_MASK_BITS_ABOVE (AccessBitWidth);
+    }
 
-    WidthMask = ACPI_MASK_BITS_ABOVE_64 (AccessBitWidth);
     Mask = WidthMask &
         ACPI_MASK_BITS_BELOW (ObjDesc->CommonField.StartFieldBitOffset);
 

Modified: vendor-sys/acpica/dist/source/components/hardware/hwregs.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/hardware/hwregs.c	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/components/hardware/hwregs.c	Fri May 27 21:40:35 2016	(r300876)
@@ -54,11 +54,6 @@
 
 /* Local Prototypes */
 
-static UINT8
-AcpiHwGetAccessBitWidth (
-    ACPI_GENERIC_ADDRESS    *Reg,
-    UINT8                   MaxBitWidth);
-
 static ACPI_STATUS
 AcpiHwReadMultiple (
     UINT32                  *Value,
@@ -76,43 +71,6 @@ AcpiHwWriteMultiple (
 
 /******************************************************************************
  *
- * FUNCTION:    AcpiHwGetAccessBitWidth
- *
- * PARAMETERS:  Reg                 - GAS register structure
- *              MaxBitWidth         - Max BitWidth supported (32 or 64)
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Obtain optimal access bit width
- *
- ******************************************************************************/
-
-static UINT8
-AcpiHwGetAccessBitWidth (
-    ACPI_GENERIC_ADDRESS    *Reg,
-    UINT8                   MaxBitWidth)
-{
-
-    if (!Reg->AccessWidth)
-    {
-        if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_IO)
-        {
-            return (32);
-        }
-        else
-        {
-            return (MaxBitWidth);
-        }
-    }
-    else
-    {
-        return (1 << (Reg->AccessWidth + 2));
-    }
-}
-
-
-/******************************************************************************
- *
  * FUNCTION:    AcpiHwValidateRegister
  *
  * PARAMETERS:  Reg                 - GAS register structure
@@ -133,9 +91,6 @@ AcpiHwValidateRegister (
     UINT8                   MaxBitWidth,
     UINT64                  *Address)
 {
-    UINT8                   BitWidth;
-    UINT8                   AccessWidth;
-
 
     /* Must have a valid pointer to a GAS structure */
 
@@ -165,25 +120,24 @@ AcpiHwValidateRegister (
         return (AE_SUPPORT);
     }
 
-    /* Validate the AccessWidth */
+    /* Validate the BitWidth */
 
-    if (Reg->AccessWidth > 4)
+    if ((Reg->BitWidth != 8) &&
+        (Reg->BitWidth != 16) &&
+        (Reg->BitWidth != 32) &&
+        (Reg->BitWidth != MaxBitWidth))
     {
         ACPI_ERROR ((AE_INFO,
-            "Unsupported register access width: 0x%X", Reg->AccessWidth));
+            "Unsupported register bit width: 0x%X", Reg->BitWidth));
         return (AE_SUPPORT);
     }
 
-    /* Validate the BitWidth, convert AccessWidth into number of bits */
+    /* Validate the BitOffset. Just a warning for now. */
 
-    AccessWidth = AcpiHwGetAccessBitWidth (Reg, MaxBitWidth);
-    BitWidth = ACPI_ROUND_UP (Reg->BitOffset + Reg->BitWidth, AccessWidth);
-    if (MaxBitWidth < BitWidth)
+    if (Reg->BitOffset != 0)
     {
         ACPI_WARNING ((AE_INFO,
-            "Requested bit width 0x%X is smaller than register bit width 0x%X",
-            MaxBitWidth, BitWidth));
-        return (AE_SUPPORT);
+            "Unsupported register bit offset: 0x%X", Reg->BitOffset));
     }
 
     return (AE_OK);
@@ -204,7 +158,10 @@ AcpiHwValidateRegister (
  *              64-bit values is not needed.
  *
  * LIMITATIONS: <These limitations also apply to AcpiHwWrite>
+ *      BitWidth must be exactly 8, 16, or 32.
  *      SpaceID must be SystemMemory or SystemIO.
+ *      BitOffset and AccessWidth are currently ignored, as there has
+ *          not been a need to implement these.
  *
  ******************************************************************************/
 
@@ -214,12 +171,7 @@ AcpiHwRead (
     ACPI_GENERIC_ADDRESS    *Reg)
 {
     UINT64                  Address;
-    UINT8                   AccessWidth;
-    UINT32                  BitWidth;
-    UINT8                   BitOffset;
     UINT64                  Value64;
-    UINT32                  Value32;
-    UINT8                   Index;
     ACPI_STATUS             Status;
 
 
@@ -234,64 +186,30 @@ AcpiHwRead (
         return (Status);
     }
 
-    /*
-     * Initialize entire 32-bit return value to zero, convert AccessWidth
-     * into number of bits based
-     */
+    /* Initialize entire 32-bit return value to zero */
+
     *Value = 0;
-    AccessWidth = AcpiHwGetAccessBitWidth (Reg, 32);
-    BitWidth = Reg->BitOffset + Reg->BitWidth;
-    BitOffset = Reg->BitOffset;
 
     /*
      * Two address spaces supported: Memory or IO. PCI_Config is
      * not supported here because the GAS structure is insufficient
      */
-    Index = 0;
-    while (BitWidth)
+    if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
     {
-        if (BitOffset > AccessWidth)
-        {
-            Value32 = 0;
-            BitOffset -= AccessWidth;
-        }
-        else
-        {
-            if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
-            {
-                Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
-                    Address + Index * ACPI_DIV_8 (AccessWidth),
-                    &Value64, AccessWidth);
-                Value32 = (UINT32) Value64;
-            }
-            else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
-            {
-                Status = AcpiHwReadPort ((ACPI_IO_ADDRESS)
-                    Address + Index * ACPI_DIV_8 (AccessWidth),
-                    &Value32, AccessWidth);
-            }
-
-            if (BitOffset)
-            {
-                Value32 &= ACPI_MASK_BITS_BELOW (BitOffset);
-                BitOffset = 0;
-            }
-            if (BitWidth < AccessWidth)
-            {
-                Value32 &= ACPI_MASK_BITS_ABOVE (BitWidth);
-            }
-        }
-
-        ACPI_SET_BITS (Value, Index * AccessWidth,
-            ACPI_MASK_BITS_ABOVE_32 (AccessWidth), Value32);
+        Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
+            Address, &Value64, Reg->BitWidth);
 
-        BitWidth -= BitWidth > AccessWidth ? AccessWidth : BitWidth;
-        Index++;
+        *Value = (UINT32) Value64;
+    }
+    else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
+    {
+        Status = AcpiHwReadPort ((ACPI_IO_ADDRESS)
+            Address, Value, Reg->BitWidth);
     }
 
     ACPI_DEBUG_PRINT ((ACPI_DB_IO,
         "Read:  %8.8X width %2d from %8.8X%8.8X (%s)\n",
-        *Value, AccessWidth, ACPI_FORMAT_UINT64 (Address),
+        *Value, Reg->BitWidth, ACPI_FORMAT_UINT64 (Address),
         AcpiUtGetRegionName (Reg->SpaceId)));
 
     return (Status);
@@ -319,12 +237,6 @@ AcpiHwWrite (
     ACPI_GENERIC_ADDRESS    *Reg)
 {
     UINT64                  Address;
-    UINT8                   AccessWidth;
-    UINT32                  BitWidth;
-    UINT8                   BitOffset;
-    UINT64                  Value64;
-    UINT32                  NewValue32, OldValue32;
-    UINT8                   Index;
     ACPI_STATUS             Status;
 
 
@@ -339,109 +251,24 @@ AcpiHwWrite (
         return (Status);
     }
 
-    /* Convert AccessWidth into number of bits based */
-
-    AccessWidth = AcpiHwGetAccessBitWidth (Reg, 32);
-    BitWidth = Reg->BitOffset + Reg->BitWidth;
-    BitOffset = Reg->BitOffset;
-
     /*
      * Two address spaces supported: Memory or IO. PCI_Config is
      * not supported here because the GAS structure is insufficient
      */
-    Index = 0;
-    while (BitWidth)
+    if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
     {
-        NewValue32 = ACPI_GET_BITS (&Value, Index * AccessWidth,
-            ACPI_MASK_BITS_ABOVE_32 (AccessWidth));
-
-        if (BitOffset > AccessWidth)
-        {
-            BitOffset -= AccessWidth;
-        }
-        else
-        {
-            if (BitOffset)
-            {
-                NewValue32 &= ACPI_MASK_BITS_BELOW (BitOffset);
-            }
-
-            if (BitWidth < AccessWidth)
-            {
-                NewValue32 &= ACPI_MASK_BITS_ABOVE (BitWidth);
-            }
-
-            if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
-            {
-                if (BitOffset || BitWidth < AccessWidth)
-                {
-                    /*
-                     * Read old values in order not to modify the bits that
-                     * are beyond the register BitWidth/BitOffset setting.
-                     */
-                    Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
-                        Address + Index * ACPI_DIV_8 (AccessWidth),
-                        &Value64, AccessWidth);
-                    OldValue32 = (UINT32) Value64;
-
-                    if (BitOffset)
-                    {
-                        OldValue32 &= ACPI_MASK_BITS_ABOVE (BitOffset + 1);
-                        BitOffset = 0;
-                    }
-
-                    if (BitWidth < AccessWidth)
-                    {
-                        OldValue32 &= ACPI_MASK_BITS_BELOW (BitWidth - 1);
-                    }
-
-                    NewValue32 |= OldValue32;
-                }
-
-                Value64 = (UINT64) NewValue32;
-                Status = AcpiOsWriteMemory ((ACPI_PHYSICAL_ADDRESS)
-                    Address + Index * ACPI_DIV_8 (AccessWidth),
-                    Value64, AccessWidth);
-            }
-            else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
-            {
-                if (BitOffset || BitWidth < AccessWidth)
-                {
-                    /*
-                     * Read old values in order not to modify the bits that
-                     * are beyond the register BitWidth/BitOffset setting.
-                     */
-                    Status = AcpiHwReadPort ((ACPI_IO_ADDRESS)
-                        Address + Index * ACPI_DIV_8 (AccessWidth),
-                        &OldValue32, AccessWidth);
-
-                    if (BitOffset)
-                    {
-                        OldValue32 &= ACPI_MASK_BITS_ABOVE (BitOffset + 1);
-                        BitOffset = 0;
-                    }
-
-                    if (BitWidth < AccessWidth)
-                    {
-                        OldValue32 &= ACPI_MASK_BITS_BELOW (BitWidth - 1);
-                    }
-
-                    NewValue32 |= OldValue32;
-                }
-
-                Status = AcpiHwWritePort ((ACPI_IO_ADDRESS)
-                    Address + Index * ACPI_DIV_8 (AccessWidth),
-                    NewValue32, AccessWidth);
-            }
-        }
-
-        BitWidth -= BitWidth > AccessWidth ? AccessWidth : BitWidth;
-        Index++;
+        Status = AcpiOsWriteMemory ((ACPI_PHYSICAL_ADDRESS)
+            Address, (UINT64) Value, Reg->BitWidth);
+    }
+    else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
+    {
+        Status = AcpiHwWritePort ((ACPI_IO_ADDRESS)
+            Address, Value, Reg->BitWidth);
     }
 
     ACPI_DEBUG_PRINT ((ACPI_DB_IO,
         "Wrote: %8.8X width %2d   to %8.8X%8.8X (%s)\n",
-        Value, AccessWidth, ACPI_FORMAT_UINT64 (Address),
+        Value, Reg->BitWidth, ACPI_FORMAT_UINT64 (Address),
         AcpiUtGetRegionName (Reg->SpaceId)));
 
     return (Status);

Modified: vendor-sys/acpica/dist/source/components/namespace/nsaccess.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/namespace/nsaccess.c	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/components/namespace/nsaccess.c	Fri May 27 21:40:35 2016	(r300876)
@@ -116,8 +116,8 @@ AcpiNsRootInitialize (
             continue;
         }
 
-        Status = AcpiNsLookup (NULL, (char *) InitVal->Name, InitVal->Type,
-            ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH,
+        Status = AcpiNsLookup (NULL, ACPI_CAST_PTR (char, InitVal->Name),
+            InitVal->Type, ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH,
             NULL, &NewNode);
         if (ACPI_FAILURE (Status))
         {

Modified: vendor-sys/acpica/dist/source/components/namespace/nsdump.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/namespace/nsdump.c	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/components/namespace/nsdump.c	Fri May 27 21:40:35 2016	(r300876)
@@ -381,7 +381,7 @@ AcpiNsDumpOneObject (
         case ACPI_TYPE_STRING:
 
             AcpiOsPrintf ("Len %.2X ", ObjDesc->String.Length);
-            AcpiUtPrintString (ObjDesc->String.Pointer, 32);
+            AcpiUtPrintString (ObjDesc->String.Pointer, 80);
             AcpiOsPrintf ("\n");
             break;
 

Modified: vendor-sys/acpica/dist/source/components/utilities/utdebug.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/utilities/utdebug.c	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/components/utilities/utdebug.c	Fri May 27 21:40:35 2016	(r300876)
@@ -632,6 +632,48 @@ AcpiUtPtrExit (
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiUtStrExit
+ *
+ * PARAMETERS:  LineNumber          - Caller's line number
+ *              FunctionName        - Caller's procedure name
+ *              ModuleName          - Caller's module name
+ *              ComponentId         - Caller's component ID
+ *              String              - String to display
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Function exit trace. Prints only if TRACE_FUNCTIONS bit is
+ *              set in DebugLevel. Prints exit value also.
+ *
+ ******************************************************************************/
+
+void
+AcpiUtStrExit (
+    UINT32                  LineNumber,
+    const char              *FunctionName,
+    const char              *ModuleName,
+    UINT32                  ComponentId,
+    const char              *String)
+{
+
+    /* Check if enabled up-front for performance */
+
+    if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_FUNCTIONS, ComponentId))
+    {
+        AcpiDebugPrint (ACPI_LV_FUNCTIONS,
+            LineNumber, FunctionName, ModuleName, ComponentId,
+            "%s %s\n", AcpiGbl_FunctionExitPrefix, String);
+    }
+
+    if (AcpiGbl_NestingLevel)
+    {
+        AcpiGbl_NestingLevel--;
+    }
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiTracePoint
  *
  * PARAMETERS:  Type                - Trace event type

Modified: vendor-sys/acpica/dist/source/components/utilities/utdecode.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/utilities/utdecode.c	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/components/utilities/utdecode.c	Fri May 27 21:40:35 2016	(r300876)
@@ -284,7 +284,7 @@ AcpiUtGetObjectTypeName (
         return_PTR ("Invalid object");
     }
 
-    return_PTR (AcpiUtGetTypeName (ObjDesc->Common.Type));
+    return_STR (AcpiUtGetTypeName (ObjDesc->Common.Type));
 }
 
 

Modified: vendor-sys/acpica/dist/source/include/acglobal.h
==============================================================================
--- vendor-sys/acpica/dist/source/include/acglobal.h	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/include/acglobal.h	Fri May 27 21:40:35 2016	(r300876)
@@ -321,6 +321,7 @@ ACPI_INIT_GLOBAL (BOOLEAN,              
 ACPI_INIT_GLOBAL (BOOLEAN,              AcpiGbl_CstyleDisassembly, TRUE);
 ACPI_INIT_GLOBAL (BOOLEAN,              AcpiGbl_ForceAmlDisassembly, FALSE);
 ACPI_INIT_GLOBAL (BOOLEAN,              AcpiGbl_DmOpt_Verbose, TRUE);
+ACPI_INIT_GLOBAL (BOOLEAN,              AcpiGbl_DmEmitExternalOpcodes, FALSE);
 
 ACPI_GLOBAL (BOOLEAN,                   AcpiGbl_DmOpt_Disasm);
 ACPI_GLOBAL (BOOLEAN,                   AcpiGbl_DmOpt_Listing);

Modified: vendor-sys/acpica/dist/source/include/acmacros.h
==============================================================================
--- vendor-sys/acpica/dist/source/include/acmacros.h	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/include/acmacros.h	Fri May 27 21:40:35 2016	(r300876)
@@ -264,30 +264,14 @@
 
 #define ACPI_IS_MISALIGNED(value)           (((ACPI_SIZE) value) & (sizeof(ACPI_SIZE)-1))
 
-/* Generic (power-of-two) rounding */
-
-#define ACPI_IS_POWER_OF_TWO(a)             (((a) & ((a) - 1)) == 0)
-
 /*
  * Bitmask creation
  * Bit positions start at zero.
  * MASK_BITS_ABOVE creates a mask starting AT the position and above
  * MASK_BITS_BELOW creates a mask starting one bit BELOW the position
- * MASK_BITS_ABOVE/BELOW accpets a bit offset to create a mask
- * MASK_BITS_ABOVE/BELOW_32/64 accpets a bit width to create a mask
- * Note: The ACPI_INTEGER_BIT_SIZE check is used to bypass compiler
- * differences with the shift operator
  */
 #define ACPI_MASK_BITS_ABOVE(position)      (~((ACPI_UINT64_MAX) << ((UINT32) (position))))
 #define ACPI_MASK_BITS_BELOW(position)      ((ACPI_UINT64_MAX) << ((UINT32) (position)))
-#define ACPI_MASK_BITS_ABOVE_32(width)      ((UINT32) ACPI_MASK_BITS_ABOVE(width))
-#define ACPI_MASK_BITS_BELOW_32(width)      ((UINT32) ACPI_MASK_BITS_BELOW(width))
-#define ACPI_MASK_BITS_ABOVE_64(width)      ((width) == ACPI_INTEGER_BIT_SIZE ? \
-                                                ACPI_UINT64_MAX : \
-                                                ACPI_MASK_BITS_ABOVE(width))
-#define ACPI_MASK_BITS_BELOW_64(width)      ((width) == ACPI_INTEGER_BIT_SIZE ? \
-                                                (UINT64) 0 : \
-                                                ACPI_MASK_BITS_BELOW(width))
 
 /* Bitfields within ACPI registers */
 

Modified: vendor-sys/acpica/dist/source/include/acoutput.h
==============================================================================
--- vendor-sys/acpica/dist/source/include/acoutput.h	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/include/acoutput.h	Fri May 27 21:40:35 2016	(r300876)
@@ -372,7 +372,7 @@
     ACPI_TRACE_ENTRY (Name, AcpiUtTraceU32, UINT32, Value)
 
 #define ACPI_FUNCTION_TRACE_STR(Name, String) \
-    ACPI_TRACE_ENTRY (Name, AcpiUtTraceStr, char *, String)
+    ACPI_TRACE_ENTRY (Name, AcpiUtTraceStr, const char *, String)
 
 #define ACPI_FUNCTION_ENTRY() \
     AcpiUtTrackStackPtr()
@@ -432,6 +432,9 @@
 #define return_PTR(Pointer) \
     ACPI_TRACE_EXIT (AcpiUtPtrExit, void *, Pointer)
 
+#define return_STR(String) \
+    ACPI_TRACE_EXIT (AcpiUtStrExit, const char *, String)
+
 #define return_VALUE(Value) \
     ACPI_TRACE_EXIT (AcpiUtValueExit, UINT64, Value)
 
@@ -486,6 +489,7 @@
 #define return_VOID                     return
 #define return_ACPI_STATUS(s)           return(s)
 #define return_PTR(s)                   return(s)
+#define return_STR(s)                   return(s)
 #define return_VALUE(s)                 return(s)
 #define return_UINT8(s)                 return(s)
 #define return_UINT32(s)                return(s)

Modified: vendor-sys/acpica/dist/source/include/acpixf.h
==============================================================================
--- vendor-sys/acpica/dist/source/include/acpixf.h	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/include/acpixf.h	Fri May 27 21:40:35 2016	(r300876)
@@ -46,7 +46,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20160422
+#define ACPI_CA_VERSION                 0x20160527
 
 #include "acconfig.h"
 #include "actypes.h"

Modified: vendor-sys/acpica/dist/source/include/acutils.h
==============================================================================
--- vendor-sys/acpica/dist/source/include/acutils.h	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/include/acutils.h	Fri May 27 21:40:35 2016	(r300876)
@@ -115,13 +115,25 @@ extern const char                       
 /*
  * Common error message prefixes
  */
+#ifndef ACPI_MSG_ERROR
 #define ACPI_MSG_ERROR          "ACPI Error: "
+#endif
+#ifndef ACPI_MSG_EXCEPTION
 #define ACPI_MSG_EXCEPTION      "ACPI Exception: "
+#endif
+#ifndef ACPI_MSG_WARNING
 #define ACPI_MSG_WARNING        "ACPI Warning: "
+#endif
+#ifndef ACPI_MSG_INFO
 #define ACPI_MSG_INFO           "ACPI: "
+#endif
 
+#ifndef ACPI_MSG_BIOS_ERROR
 #define ACPI_MSG_BIOS_ERROR     "ACPI BIOS Error (bug): "
+#endif
+#ifndef ACPI_MSG_BIOS_WARNING
 #define ACPI_MSG_BIOS_WARNING   "ACPI BIOS Warning (bug): "
+#endif
 
 /*
  * Common message suffix
@@ -416,6 +428,14 @@ AcpiUtPtrExit (
     UINT8                   *Ptr);
 
 void
+AcpiUtStrExit (
+    UINT32                  LineNumber,
+    const char              *FunctionName,
+    const char              *ModuleName,
+    UINT32                  ComponentId,
+    const char              *String);
+
+void
 AcpiUtDebugDumpBuffer (
     UINT8                   *Buffer,
     UINT32                  Count,

Modified: vendor-sys/acpica/dist/source/include/platform/aclinux.h
==============================================================================
--- vendor-sys/acpica/dist/source/include/platform/aclinux.h	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/include/platform/aclinux.h	Fri May 27 21:40:35 2016	(r300876)
@@ -163,6 +163,14 @@
 #define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetNextFilename
 #define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCloseDirectory
 
+#define ACPI_MSG_ERROR          KERN_ERR "ACPI Error: "
+#define ACPI_MSG_EXCEPTION      KERN_ERR "ACPI Exception: "
+#define ACPI_MSG_WARNING        KERN_WARNING "ACPI Warning: "
+#define ACPI_MSG_INFO           KERN_INFO "ACPI: "
+
+#define ACPI_MSG_BIOS_ERROR     KERN_ERR "ACPI BIOS Error (bug): "
+#define ACPI_MSG_BIOS_WARNING   KERN_WARNING "ACPI BIOS Warning (bug): "
+
 #else /* !__KERNEL__ */
 
 #include <stdarg.h>

Modified: vendor-sys/acpica/dist/source/os_specific/service_layers/osbsdtbl.c
==============================================================================
--- vendor-sys/acpica/dist/source/os_specific/service_layers/osbsdtbl.c	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/os_specific/service_layers/osbsdtbl.c	Fri May 27 21:40:35 2016	(r300876)
@@ -43,7 +43,7 @@
 
 #include "acpidump.h"
 
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined (__DragonFly__)
 #include <kenv.h>
 #endif
 #include <unistd.h>
@@ -376,7 +376,7 @@ static ACPI_STATUS
 OslTableInitialize (
     void)
 {
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
     char                    Buffer[32];
 #endif
     ACPI_TABLE_HEADER       *MappedTable;
@@ -404,7 +404,7 @@ OslTableInitialize (
     {
         Address = Gbl_RsdpBase;
     }
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined (__DragonFly__)
     else if (kenv (KENV_GET, SYSTEM_KENV, Buffer, sizeof (Buffer)) > 0)
     {
         Address = strtoul (Buffer, NULL, 0);

Modified: vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c
==============================================================================
--- vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c	Fri May 27 21:40:35 2016	(r300876)
@@ -549,7 +549,8 @@ AsProcessOneFile (
     ACPI_NATIVE_INT         FileType)
 {
     char                    *Pathname;
-    char                    *OutPathname = NULL;
+    char                    *OutPathname;
+    int                     Status = 0;
 
 
     /* Allocate a file pathname buffer for both source and target */
@@ -575,8 +576,8 @@ AsProcessOneFile (
 
     if (AsGetFile (Pathname, &Gbl_FileBuffer, &Gbl_FileSize))
     {
-        free (Pathname);
-        return (-1);
+        Status = -1;
+        goto Exit1;
     }
 
     Gbl_HeaderSize = 0;
@@ -619,7 +620,8 @@ AsProcessOneFile (
             if (!OutPathname)
             {
                 printf ("Could not allocate buffer for file pathnames\n");
-                return (-1);
+                Status = -1;
+                goto Exit2;
             }
 
             strcpy (OutPathname, TargetPath);
@@ -630,17 +632,16 @@ AsProcessOneFile (
             }
 
             AsPutFile (OutPathname, Gbl_FileBuffer, ConversionTable->Flags);
+            free (OutPathname);
         }
     }
 
+Exit2:
     free (Gbl_FileBuffer);
-    free (Pathname);
-    if (OutPathname)
-    {
-        free (OutPathname);
-    }
 
-    return (0);
+Exit1:
+    free (Pathname);
+    return (Status);
 }
 
 

Modified: vendor-sys/acpica/dist/source/tools/acpisrc/asremove.c
==============================================================================
--- vendor-sys/acpica/dist/source/tools/acpisrc/asremove.c	Fri May 27 21:26:26 2016	(r300875)
+++ vendor-sys/acpica/dist/source/tools/acpisrc/asremove.c	Fri May 27 21:40:35 2016	(r300876)
@@ -617,6 +617,7 @@ AsRemoveDebugMacros (
 
     AsReplaceString ("return_VOID",         "return", REPLACE_WHOLE_WORD, Buffer);
     AsReplaceString ("return_PTR",          "return", REPLACE_WHOLE_WORD, Buffer);
+    AsReplaceString ("return_STR",          "return", REPLACE_WHOLE_WORD, Buffer);
     AsReplaceString ("return_ACPI_STATUS",  "return", REPLACE_WHOLE_WORD, Buffer);
     AsReplaceString ("return_acpi_status",  "return", REPLACE_WHOLE_WORD, Buffer);
     AsReplaceString ("return_VALUE",        "return", REPLACE_WHOLE_WORD, Buffer);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605272140.u4RLeZiu065820>