summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2016-05-27 22:16:46 +0000
committerjkim <jkim@FreeBSD.org>2016-05-27 22:16:46 +0000
commit776954ec8d7bc0477ece739955ad21868c1c9ff6 (patch)
tree4e1f98f3c4c1620a21f0223a479a30f79018efdd /sys/contrib/dev
parentc940f45437f25303c02f9ef907f7d9657ab9d3fd (diff)
downloadFreeBSD-src-776954ec8d7bc0477ece739955ad21868c1c9ff6.zip
FreeBSD-src-776954ec8d7bc0477ece739955ad21868c1c9ff6.tar.gz
Merge ACPICA 20160527.
Relnotes: yes
Diffstat (limited to 'sys/contrib/dev')
-rw-r--r--sys/contrib/dev/acpica/changes.txt33
-rw-r--r--sys/contrib/dev/acpica/compiler/asloptions.c6
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbobject.c4
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmopcode.c11
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmwalk.c29
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsutils.c14
-rw-r--r--sys/contrib/dev/acpica/components/executer/exfldio.c15
-rw-r--r--sys/contrib/dev/acpica/components/hardware/hwregs.c26
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsdump.c2
-rw-r--r--sys/contrib/dev/acpica/include/acglobal.h1
-rw-r--r--sys/contrib/dev/acpica/include/acmacros.h16
-rw-r--r--sys/contrib/dev/acpica/include/acpixf.h2
-rw-r--r--sys/contrib/dev/acpica/include/acutils.h12
13 files changed, 112 insertions, 59 deletions
diff --git a/sys/contrib/dev/acpica/changes.txt b/sys/contrib/dev/acpica/changes.txt
index 19f5c0d..ff863a7 100644
--- a/sys/contrib/dev/acpica/changes.txt
+++ b/sys/contrib/dev/acpica/changes.txt
@@ -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:
diff --git a/sys/contrib/dev/acpica/compiler/asloptions.c b/sys/contrib/dev/acpica/compiler/asloptions.c
index 6d275a2..aee4564 100644
--- a/sys/contrib/dev/acpica/compiler/asloptions.c
+++ b/sys/contrib/dev/acpica/compiler/asloptions.c
@@ -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':
diff --git a/sys/contrib/dev/acpica/components/debugger/dbobject.c b/sys/contrib/dev/acpica/components/debugger/dbobject.c
index d2439a8..062ad25 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbobject.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbobject.c
@@ -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 ("...");
}
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmopcode.c b/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
index f822e62..2ca1c85 100644
--- a/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
@@ -971,7 +971,16 @@ AcpiDmDisassembleOneOp (
case AML_EXTERNAL_OP:
- break;
+ if (AcpiGbl_DmEmitExternalOpcodes)
+ {
+ AcpiOsPrintf ("/* Opcode 0x15 */ ");
+
+ /* Fallthrough */
+ }
+ else
+ {
+ break;
+ }
default:
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmwalk.c b/sys/contrib/dev/acpica/components/disassembler/dmwalk.c
index 01afd1d..9621862 100644
--- a/sys/contrib/dev/acpica/components/disassembler/dmwalk.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmwalk.c
@@ -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);
+ }
}
}
}
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsutils.c b/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
index 0323966..1ffd0cb 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
@@ -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
{
diff --git a/sys/contrib/dev/acpica/components/executer/exfldio.c b/sys/contrib/dev/acpica/components/executer/exfldio.c
index affc9c6..e928881 100644
--- a/sys/contrib/dev/acpica/components/executer/exfldio.c
+++ b/sys/contrib/dev/acpica/components/executer/exfldio.c
@@ -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);
diff --git a/sys/contrib/dev/acpica/components/hardware/hwregs.c b/sys/contrib/dev/acpica/components/hardware/hwregs.c
index ebb4ce7..6363bba 100644
--- a/sys/contrib/dev/acpica/components/hardware/hwregs.c
+++ b/sys/contrib/dev/acpica/components/hardware/hwregs.c
@@ -91,10 +91,6 @@ AcpiHwValidateRegister (
UINT8 MaxBitWidth,
UINT64 *Address)
{
- UINT8 BitWidth;
- UINT8 BitEnd;
- UINT8 AccessWidth;
-
/* Must have a valid pointer to a GAS structure */
@@ -124,28 +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. */
- BitEnd = Reg->BitOffset + Reg->BitWidth;
- AccessWidth = Reg->AccessWidth ? Reg->AccessWidth : 1;
- AccessWidth = 1 << (AccessWidth + 2);
- BitWidth = ACPI_ROUND_UP (BitEnd, AccessWidth) -
- ACPI_ROUND_DOWN (Reg->BitOffset, 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);
diff --git a/sys/contrib/dev/acpica/components/namespace/nsdump.c b/sys/contrib/dev/acpica/components/namespace/nsdump.c
index 377bc3c..d34ff11 100644
--- a/sys/contrib/dev/acpica/components/namespace/nsdump.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsdump.c
@@ -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;
diff --git a/sys/contrib/dev/acpica/include/acglobal.h b/sys/contrib/dev/acpica/include/acglobal.h
index 1918e0c..a883ac4 100644
--- a/sys/contrib/dev/acpica/include/acglobal.h
+++ b/sys/contrib/dev/acpica/include/acglobal.h
@@ -321,6 +321,7 @@ ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_IgnoreNoopOperator, FALSE);
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);
diff --git a/sys/contrib/dev/acpica/include/acmacros.h b/sys/contrib/dev/acpica/include/acmacros.h
index d2f44a3..21256cb 100644
--- a/sys/contrib/dev/acpica/include/acmacros.h
+++ b/sys/contrib/dev/acpica/include/acmacros.h
@@ -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 */
diff --git a/sys/contrib/dev/acpica/include/acpixf.h b/sys/contrib/dev/acpica/include/acpixf.h
index a2203c1..725317c 100644
--- a/sys/contrib/dev/acpica/include/acpixf.h
+++ b/sys/contrib/dev/acpica/include/acpixf.h
@@ -46,7 +46,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20160422
+#define ACPI_CA_VERSION 0x20160527
#include <contrib/dev/acpica/include/acconfig.h>
#include <contrib/dev/acpica/include/actypes.h>
diff --git a/sys/contrib/dev/acpica/include/acutils.h b/sys/contrib/dev/acpica/include/acutils.h
index c52679f..b92a39b 100644
--- a/sys/contrib/dev/acpica/include/acutils.h
+++ b/sys/contrib/dev/acpica/include/acutils.h
@@ -115,13 +115,25 @@ extern const char *AcpiGbl_PtDecode[];
/*
* 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
OpenPOWER on IntegriCloud