svn commit: r300879 - in head/sys/contrib/dev/acpica: . compiler components/debugger components/disassembler components/dispatcher components/executer components/hardware components/namespace include
Jung-uk Kim
jkim at FreeBSD.org
Fri May 27 22:16:49 UTC 2016
Author: jkim
Date: Fri May 27 22:16:46 2016
New Revision: 300879
URL: https://svnweb.freebsd.org/changeset/base/300879
Log:
Merge ACPICA 20160527.
Relnotes: yes
Modified:
head/sys/contrib/dev/acpica/changes.txt
head/sys/contrib/dev/acpica/compiler/asloptions.c
head/sys/contrib/dev/acpica/components/debugger/dbobject.c
head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c
head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
head/sys/contrib/dev/acpica/components/executer/exfldio.c
head/sys/contrib/dev/acpica/components/hardware/hwregs.c
head/sys/contrib/dev/acpica/components/namespace/nsdump.c
head/sys/contrib/dev/acpica/include/acglobal.h
head/sys/contrib/dev/acpica/include/acmacros.h
head/sys/contrib/dev/acpica/include/acpixf.h
head/sys/contrib/dev/acpica/include/acutils.h
Directory Properties:
head/sys/contrib/dev/acpica/ (props changed)
Modified: head/sys/contrib/dev/acpica/changes.txt
==============================================================================
--- head/sys/contrib/dev/acpica/changes.txt Fri May 27 22:14:39 2016 (r300878)
+++ head/sys/contrib/dev/acpica/changes.txt Fri May 27 22:16:46 2016 (r300879)
@@ -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: head/sys/contrib/dev/acpica/compiler/asloptions.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/asloptions.c Fri May 27 22:14:39 2016 (r300878)
+++ head/sys/contrib/dev/acpica/compiler/asloptions.c Fri May 27 22:16:46 2016 (r300879)
@@ -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: head/sys/contrib/dev/acpica/components/debugger/dbobject.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/debugger/dbobject.c Fri May 27 22:14:39 2016 (r300878)
+++ head/sys/contrib/dev/acpica/components/debugger/dbobject.c Fri May 27 22:16:46 2016 (r300879)
@@ -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: head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c Fri May 27 22:14:39 2016 (r300878)
+++ head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c Fri May 27 22:16:46 2016 (r300879)
@@ -971,7 +971,16 @@ AcpiDmDisassembleOneOp (
case AML_EXTERNAL_OP:
- break;
+ if (AcpiGbl_DmEmitExternalOpcodes)
+ {
+ AcpiOsPrintf ("/* Opcode 0x15 */ ");
+
+ /* Fallthrough */
+ }
+ else
+ {
+ break;
+ }
default:
Modified: head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c Fri May 27 22:14:39 2016 (r300878)
+++ head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c Fri May 27 22:16:46 2016 (r300879)
@@ -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: head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c Fri May 27 22:14:39 2016 (r300878)
+++ head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c Fri May 27 22:16:46 2016 (r300879)
@@ -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: head/sys/contrib/dev/acpica/components/executer/exfldio.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/executer/exfldio.c Fri May 27 22:14:39 2016 (r300878)
+++ head/sys/contrib/dev/acpica/components/executer/exfldio.c Fri May 27 22:16:46 2016 (r300879)
@@ -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: head/sys/contrib/dev/acpica/components/hardware/hwregs.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/hardware/hwregs.c Fri May 27 22:14:39 2016 (r300878)
+++ head/sys/contrib/dev/acpica/components/hardware/hwregs.c Fri May 27 22:16:46 2016 (r300879)
@@ -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);
Modified: head/sys/contrib/dev/acpica/components/namespace/nsdump.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/namespace/nsdump.c Fri May 27 22:14:39 2016 (r300878)
+++ head/sys/contrib/dev/acpica/components/namespace/nsdump.c Fri May 27 22:16:46 2016 (r300879)
@@ -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: head/sys/contrib/dev/acpica/include/acglobal.h
==============================================================================
--- head/sys/contrib/dev/acpica/include/acglobal.h Fri May 27 22:14:39 2016 (r300878)
+++ head/sys/contrib/dev/acpica/include/acglobal.h Fri May 27 22:16:46 2016 (r300879)
@@ -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: head/sys/contrib/dev/acpica/include/acmacros.h
==============================================================================
--- head/sys/contrib/dev/acpica/include/acmacros.h Fri May 27 22:14:39 2016 (r300878)
+++ head/sys/contrib/dev/acpica/include/acmacros.h Fri May 27 22:16:46 2016 (r300879)
@@ -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: head/sys/contrib/dev/acpica/include/acpixf.h
==============================================================================
--- head/sys/contrib/dev/acpica/include/acpixf.h Fri May 27 22:14:39 2016 (r300878)
+++ head/sys/contrib/dev/acpica/include/acpixf.h Fri May 27 22:16:46 2016 (r300879)
@@ -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>
Modified: head/sys/contrib/dev/acpica/include/acutils.h
==============================================================================
--- head/sys/contrib/dev/acpica/include/acutils.h Fri May 27 22:14:39 2016 (r300878)
+++ head/sys/contrib/dev/acpica/include/acutils.h Fri May 27 22:16:46 2016 (r300879)
@@ -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
More information about the svn-src-all
mailing list