Module Name: src
Committed By: christos
Date: Mon Jul 18 17:26:12 UTC 2016
Modified Files:
src/sys/external/bsd/acpica/dist/disassembler: dmwalk.c
src/sys/external/bsd/acpica/dist/dispatcher: dsutils.c
src/sys/external/bsd/acpica/dist/hardware: hwregs.c
src/sys/external/bsd/acpica/dist/include: acglobal.h acmacros.h
acoutput.h acpixf.h acutils.h
src/sys/external/bsd/acpica/dist/namespace: nsaccess.c nsdump.c
src/sys/external/bsd/acpica/dist/utilities: utdebug.c utdecode.c
Log Message:
merge conflicts.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/acpica/dist/disassembler/dmwalk.c
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/acpica/dist/dispatcher/dsutils.c
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/acpica/dist/hardware/hwregs.c
cvs rdiff -u -r1.11 -r1.12 \
src/sys/external/bsd/acpica/dist/include/acglobal.h \
src/sys/external/bsd/acpica/dist/include/acpixf.h \
src/sys/external/bsd/acpica/dist/include/acutils.h
cvs rdiff -u -r1.10 -r1.11 \
src/sys/external/bsd/acpica/dist/include/acmacros.h
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/acpica/dist/include/acoutput.h
cvs rdiff -u -r1.8 -r1.9 \
src/sys/external/bsd/acpica/dist/namespace/nsaccess.c
cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/acpica/dist/namespace/nsdump.c
cvs rdiff -u -r1.10 -r1.11 \
src/sys/external/bsd/acpica/dist/utilities/utdebug.c
cvs rdiff -u -r1.9 -r1.10 \
src/sys/external/bsd/acpica/dist/utilities/utdecode.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/acpica/dist/disassembler/dmwalk.c
diff -u src/sys/external/bsd/acpica/dist/disassembler/dmwalk.c:1.5 src/sys/external/bsd/acpica/dist/disassembler/dmwalk.c:1.6
--- src/sys/external/bsd/acpica/dist/disassembler/dmwalk.c:1.5 Wed May 4 15:27:57 2016
+++ src/sys/external/bsd/acpica/dist/disassembler/dmwalk.c Mon Jul 18 13:26:12 2016
@@ -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);
+ }
}
}
}
Index: src/sys/external/bsd/acpica/dist/dispatcher/dsutils.c
diff -u src/sys/external/bsd/acpica/dist/dispatcher/dsutils.c:1.5 src/sys/external/bsd/acpica/dist/dispatcher/dsutils.c:1.6
--- src/sys/external/bsd/acpica/dist/dispatcher/dsutils.c:1.5 Sat Jan 9 16:14:19 2016
+++ src/sys/external/bsd/acpica/dist/dispatcher/dsutils.c Mon Jul 18 13:26:12 2016
@@ -603,18 +603,14 @@ AcpiDsCreateOperand (
}
else if (ParentOp->Common.AmlOpcode == AML_EXTERNAL_OP)
{
- /* TBD: May only be temporary */
-
- ObjDesc = AcpiUtCreateStringObject ((ACPI_SIZE) NameLength);
- if (!ObjDesc)
- {
- Status = AE_NO_MEMORY;
- }
- else
- {
- 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
{
Index: src/sys/external/bsd/acpica/dist/hardware/hwregs.c
diff -u src/sys/external/bsd/acpica/dist/hardware/hwregs.c:1.2 src/sys/external/bsd/acpica/dist/hardware/hwregs.c:1.3
--- src/sys/external/bsd/acpica/dist/hardware/hwregs.c:1.2 Wed May 25 14:35:13 2016
+++ src/sys/external/bsd/acpica/dist/hardware/hwregs.c Mon Jul 18 13:26:12 2016
@@ -54,11 +54,6 @@
/* Local Prototypes */
-static UINT8
-AcpiHwGetAccessBitWidth (
- ACPI_GENERIC_ADDRESS *Reg,
- UINT8 MaxBitWidth);
-
static ACPI_STATUS
AcpiHwReadMultiple (
UINT32 *Value,
@@ -76,61 +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)
-{
- UINT64 Address;
-
-
- if (!Reg->AccessWidth)
- {
- /*
- * Detect old register descriptors where only the BitWidth field
- * makes senses. The target address is copied to handle possible
- * alignment issues.
- */
- ACPI_MOVE_64_TO_64 (&Address, &Reg->Address);
- if (!Reg->BitOffset && Reg->BitWidth &&
- ACPI_IS_POWER_OF_TWO (Reg->BitWidth) &&
- ACPI_IS_ALIGNED (Reg->BitWidth, 8) &&
- ACPI_IS_ALIGNED (Address, Reg->BitWidth))
- {
- return (Reg->BitWidth);
- }
- else
- {
- 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
@@ -151,9 +91,6 @@ AcpiHwValidateRegister (
UINT8 MaxBitWidth,
UINT64 *Address)
{
- UINT8 BitWidth;
- UINT8 AccessWidth;
-
/* Must have a valid pointer to a GAS structure */
@@ -183,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);
@@ -222,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.
*
******************************************************************************/
@@ -232,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;
@@ -252,74 +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);
- }
-
- /*
- * Use offset style bit masks because:
- * BitOffset < AccessWidth/BitWidth < AccessWidth, and
- * AccessWidth is ensured to be less than 32-bits by
- * AcpiHwValidateRegister().
- */
- if (BitOffset)
- {
- Value32 &= ACPI_MASK_BITS_BELOW (BitOffset);
- BitOffset = 0;
- }
- if (BitWidth < AccessWidth)
- {
- Value32 &= ACPI_MASK_BITS_ABOVE (BitWidth);
- }
- }
+ Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
+ Address, &Value64, Reg->BitWidth);
- /*
- * Use offset style bit writes because "Index * AccessWidth" is
- * ensured to be less than 32-bits by AcpiHwValidateRegister().
- */
- ACPI_SET_BITS (Value, Index * AccessWidth,
- ACPI_MASK_BITS_ABOVE_32 (AccessWidth), Value32);
-
- 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);
@@ -347,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;
@@ -367,131 +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)
{
- /*
- * Use offset style bit reads because "Index * AccessWidth" is
- * ensured to be less than 32-bits by AcpiHwValidateRegister().
- */
- NewValue32 = ACPI_GET_BITS (&Value, Index * AccessWidth,
- ACPI_MASK_BITS_ABOVE_32 (AccessWidth));
-
- if (BitOffset >= AccessWidth)
- {
- BitOffset -= AccessWidth;
- }
- else
- {
- /*
- * Use offset style bit masks because AccessWidth is ensured
- * to be less than 32-bits by AcpiHwValidateRegister() and
- * BitOffset/BitWidth is less than AccessWidth here.
- */
- 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;
-
- /*
- * Use offset style bit masks because AccessWidth is
- * ensured to be less than 32-bits by
- * AcpiHwValidateRegister() and BitOffset/BitWidth is
- * less than AccessWidth here.
- */
- if (BitOffset)
- {
- OldValue32 &= ACPI_MASK_BITS_ABOVE (BitOffset);
- BitOffset = 0;
- }
- if (BitWidth < AccessWidth)
- {
- OldValue32 &= ACPI_MASK_BITS_BELOW (BitWidth);
- }
-
- 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);
-
- /*
- * Use offset style bit masks because AccessWidth is
- * ensured to be less than 32-bits by
- * AcpiHwValidateRegister() and BitOffset/BitWidth is
- * less than AccessWidth here.
- */
- if (BitOffset)
- {
- OldValue32 &= ACPI_MASK_BITS_ABOVE (BitOffset);
- BitOffset = 0;
- }
- if (BitWidth < AccessWidth)
- {
- OldValue32 &= ACPI_MASK_BITS_BELOW (BitWidth);
- }
-
- NewValue32 |= OldValue32;
- }
-
- Status = AcpiHwWritePort ((ACPI_IO_ADDRESS)
- Address + Index * ACPI_DIV_8 (AccessWidth),
- NewValue32, AccessWidth);
- }
- }
-
- /*
- * Index * AccessWidth is ensured to be less than 32-bits by
- * AcpiHwValidateRegister().
- */
- 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);
Index: src/sys/external/bsd/acpica/dist/include/acglobal.h
diff -u src/sys/external/bsd/acpica/dist/include/acglobal.h:1.11 src/sys/external/bsd/acpica/dist/include/acglobal.h:1.12
--- src/sys/external/bsd/acpica/dist/include/acglobal.h:1.11 Wed May 4 15:27:58 2016
+++ src/sys/external/bsd/acpica/dist/include/acglobal.h Mon Jul 18 13:26:12 2016
@@ -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);
Index: src/sys/external/bsd/acpica/dist/include/acpixf.h
diff -u src/sys/external/bsd/acpica/dist/include/acpixf.h:1.11 src/sys/external/bsd/acpica/dist/include/acpixf.h:1.12
--- src/sys/external/bsd/acpica/dist/include/acpixf.h:1.11 Wed May 4 15:27:58 2016
+++ src/sys/external/bsd/acpica/dist/include/acpixf.h Mon Jul 18 13:26:12 2016
@@ -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"
Index: src/sys/external/bsd/acpica/dist/include/acutils.h
diff -u src/sys/external/bsd/acpica/dist/include/acutils.h:1.11 src/sys/external/bsd/acpica/dist/include/acutils.h:1.12
--- src/sys/external/bsd/acpica/dist/include/acutils.h:1.11 Wed May 4 15:27:58 2016
+++ src/sys/external/bsd/acpica/dist/include/acutils.h Mon Jul 18 13:26:12 2016
@@ -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,
Index: src/sys/external/bsd/acpica/dist/include/acmacros.h
diff -u src/sys/external/bsd/acpica/dist/include/acmacros.h:1.10 src/sys/external/bsd/acpica/dist/include/acmacros.h:1.11
--- src/sys/external/bsd/acpica/dist/include/acmacros.h:1.10 Wed May 25 14:35:13 2016
+++ src/sys/external/bsd/acpica/dist/include/acmacros.h Mon Jul 18 13:26:12 2016
@@ -264,31 +264,14 @@
#define ACPI_IS_MISALIGNED(value) (((ACPI_SIZE) value) & (sizeof(ACPI_SIZE)-1))
-/* Generic (power-of-two) rounding */
-
-#define ACPI_IS_ALIGNED(a, s) (((a) & ((s) - 1)) == 0)
-#define ACPI_IS_POWER_OF_TWO(a) ACPI_IS_ALIGNED(a, a)
-
/*
* 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 */
Index: src/sys/external/bsd/acpica/dist/include/acoutput.h
diff -u src/sys/external/bsd/acpica/dist/include/acoutput.h:1.2 src/sys/external/bsd/acpica/dist/include/acoutput.h:1.3
--- src/sys/external/bsd/acpica/dist/include/acoutput.h:1.2 Wed May 4 15:27:58 2016
+++ src/sys/external/bsd/acpica/dist/include/acoutput.h Mon Jul 18 13:26:12 2016
@@ -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)
Index: src/sys/external/bsd/acpica/dist/namespace/nsaccess.c
diff -u src/sys/external/bsd/acpica/dist/namespace/nsaccess.c:1.8 src/sys/external/bsd/acpica/dist/namespace/nsaccess.c:1.9
--- src/sys/external/bsd/acpica/dist/namespace/nsaccess.c:1.8 Sat Jan 9 16:14:19 2016
+++ src/sys/external/bsd/acpica/dist/namespace/nsaccess.c Mon Jul 18 13:26:12 2016
@@ -116,8 +116,8 @@ AcpiNsRootInitialize (
continue;
}
- Status = AcpiNsLookup (NULL, __UNCONST(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))
{
Index: src/sys/external/bsd/acpica/dist/namespace/nsdump.c
diff -u src/sys/external/bsd/acpica/dist/namespace/nsdump.c:1.9 src/sys/external/bsd/acpica/dist/namespace/nsdump.c:1.10
--- src/sys/external/bsd/acpica/dist/namespace/nsdump.c:1.9 Wed May 4 15:27:58 2016
+++ src/sys/external/bsd/acpica/dist/namespace/nsdump.c Mon Jul 18 13:26:12 2016
@@ -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;
Index: src/sys/external/bsd/acpica/dist/utilities/utdebug.c
diff -u src/sys/external/bsd/acpica/dist/utilities/utdebug.c:1.10 src/sys/external/bsd/acpica/dist/utilities/utdebug.c:1.11
--- src/sys/external/bsd/acpica/dist/utilities/utdebug.c:1.10 Wed May 4 15:27:58 2016
+++ src/sys/external/bsd/acpica/dist/utilities/utdebug.c Mon Jul 18 13:26:12 2016
@@ -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
Index: src/sys/external/bsd/acpica/dist/utilities/utdecode.c
diff -u src/sys/external/bsd/acpica/dist/utilities/utdecode.c:1.9 src/sys/external/bsd/acpica/dist/utilities/utdecode.c:1.10
--- src/sys/external/bsd/acpica/dist/utilities/utdecode.c:1.9 Wed May 4 15:27:58 2016
+++ src/sys/external/bsd/acpica/dist/utilities/utdecode.c Mon Jul 18 13:26:12 2016
@@ -284,7 +284,7 @@ AcpiUtGetObjectTypeName (
return_PTR (__UNCONST("Invalid object"));
}
- return_PTR (__UNCONST(AcpiUtGetTypeName (ObjDesc->Common.Type)));
+ return_STR (AcpiUtGetTypeName (ObjDesc->Common.Type));
}