ACK: [PATCH 1/2] ACPICA: Update to version 20160422

ivanhu ivan.hu at canonical.com
Fri Apr 29 07:25:48 UTC 2016



On 04/23/2016 02:20 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Changes in this release of ACPICA are detailed at the following
> link on the ACPICA developer mailing list:
>
> https://lists.acpica.org/pipermail/devel/2016-April/000913.html
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/acpica/Makefile.am                             |   1 +
>   src/acpica/source/common/acfileio.c                |  11 +-
>   src/acpica/source/common/dmrestag.c                |   5 +-
>   src/acpica/source/common/dmtable.c                 |  57 +----
>   src/acpica/source/common/dmtbdump.c                |   5 +
>   src/acpica/source/common/dmtbinfo.c                |  25 +++
>   src/acpica/source/compiler/Makefile.am             |   3 +-
>   src/acpica/source/compiler/aslanalyze.c            | 111 ++++++++++
>   src/acpica/source/compiler/aslcompile.c            |   4 +-
>   src/acpica/source/compiler/aslcompiler.h           |   9 +
>   src/acpica/source/compiler/aslcompiler.l           |   8 +
>   src/acpica/source/compiler/aslcompiler.y           | 137 ++++++++++--
>   src/acpica/source/compiler/aslfold.c               |  15 +-
>   src/acpica/source/compiler/asllookup.c             |   5 +-
>   src/acpica/source/compiler/aslmap.c                |   3 +
>   src/acpica/source/compiler/aslmethod.c             |   6 +-
>   src/acpica/source/compiler/aslparser.y             |   4 +-
>   src/acpica/source/compiler/aslpredef.c             |   4 +-
>   src/acpica/source/compiler/aslprepkg.c             | 100 ++++++++-
>   src/acpica/source/compiler/aslresource.c           |   3 +
>   src/acpica/source/compiler/aslresources.y          |  75 ++++++-
>   src/acpica/source/compiler/aslrestype2s.c          |  54 ++++-
>   src/acpica/source/compiler/aslrules.y              |  45 ++--
>   src/acpica/source/compiler/asltokens.y             |   6 +
>   src/acpica/source/compiler/asltree.c               |  23 ++
>   src/acpica/source/compiler/asltypes.y              |   7 +-
>   src/acpica/source/compiler/dttable2.c              |   5 +
>   src/acpica/source/compiler/dttemplate.h            |  47 +++--
>   src/acpica/source/components/debugger/dbnames.c    |   2 +-
>   .../source/components/disassembler/dmcstyle.c      |  37 +++-
>   .../source/components/disassembler/dmopcode.c      |  20 +-
>   .../source/components/disassembler/dmresrcl2.c     |  24 ++-
>   .../source/components/disassembler/dmutils.c       |   8 +-
>   src/acpica/source/components/disassembler/dmwalk.c |  66 +++---
>   src/acpica/source/components/dispatcher/dsmethod.c |   3 +
>   src/acpica/source/components/executer/exfldio.c    |  15 +-
>   src/acpica/source/components/executer/exnames.c    |   2 +-
>   src/acpica/source/components/hardware/hwregs.c     |  61 +++++-
>   src/acpica/source/components/namespace/nsinit.c    |   2 +-
>   src/acpica/source/components/namespace/nsprepkg.c  |  97 +++++++++
>   src/acpica/source/components/namespace/nsxfeval.c  | 116 +++++-----
>   src/acpica/source/components/parser/psutils.c      |   2 +-
>   .../source/components/resources/rsdumpinfo.c       |   9 +-
>   src/acpica/source/components/resources/rsserial.c  |  18 +-
>   src/acpica/source/components/tables/tbdata.c       |   2 +-
>   src/acpica/source/components/tables/tbfind.c       |   2 +-
>   src/acpica/source/components/tables/tbinstal.c     |   2 +-
>   src/acpica/source/components/tables/tbutils.c      |  33 ---
>   src/acpica/source/components/utilities/utascii.c   | 233 +++++++++++++++++++++
>   src/acpica/source/components/utilities/utstring.c  |  82 +-------
>   src/acpica/source/include/acdisasm.h               |   1 +
>   src/acpica/source/include/aclocal.h                |  30 +--
>   src/acpica/source/include/acmacros.h               |  16 +-
>   src/acpica/source/include/acpixf.h                 |   2 +-
>   src/acpica/source/include/acpredef.h               |   5 +-
>   src/acpica/source/include/acrestyp.h               |   1 +
>   src/acpica/source/include/actables.h               |   4 -
>   src/acpica/source/include/actbl3.h                 |  31 ++-
>   src/acpica/source/include/acutils.h                |  28 ++-
>   59 files changed, 1299 insertions(+), 433 deletions(-)
>   create mode 100644 src/acpica/source/components/utilities/utascii.c
>
> diff --git a/src/acpica/Makefile.am b/src/acpica/Makefile.am
> index 28fab56..28b458c 100644
> --- a/src/acpica/Makefile.am
> +++ b/src/acpica/Makefile.am
> @@ -215,6 +215,7 @@ libfwtsacpica_la_SOURCES =				\
>   	source/components/tables/tbprint.c		\
>   	source/components/utilities/utaddress.c		\
>   	source/components/utilities/utalloc.c		\
> +	source/components/utilities/utascii.c		\
>   	source/components/utilities/utcache.c		\
>   	source/components/utilities/utcopy.c		\
>   	source/components/utilities/utdebug.c		\
> diff --git a/src/acpica/source/common/acfileio.c b/src/acpica/source/common/acfileio.c
> index cebfa21..c00580f 100644
> --- a/src/acpica/source/common/acfileio.c
> +++ b/src/acpica/source/common/acfileio.c
> @@ -184,7 +184,8 @@ AcGetAllTablesFromFile (
>       FileSize = CmGetFileSize (File);
>       if (FileSize == ACPI_UINT32_MAX)
>       {
> -        return (AE_ERROR);
> +        Status = AE_ERROR;
> +        goto ErrorExit;
>       }
>   
>       fprintf (stderr,
> @@ -195,7 +196,8 @@ AcGetAllTablesFromFile (
>   
>       if (FileSize < sizeof (ACPI_TABLE_HEADER))
>       {
> -        return (AE_BAD_HEADER);
> +        Status = AE_BAD_HEADER;
> +        goto ErrorExit;
>       }
>   
>       /* Check for an non-binary file */
> @@ -228,7 +230,7 @@ AcGetAllTablesFromFile (
>           }
>           else if (ACPI_FAILURE (Status))
>           {
> -            return (Status);
> +            goto ErrorExit;
>           }
>   
>           /* Print table header for iASL/disassembler only */
> @@ -275,6 +277,7 @@ AcGetAllTablesFromFile (
>           *ReturnListHead = ListHead;
>       }
>   
> +ErrorExit:
>       fclose(File);
>       return (Status);
>   }
> @@ -481,7 +484,7 @@ AcValidateTableHeader (
>   
>       /* Validate the signature (limited ASCII chars) */
>   
> -    if (!AcpiIsValidSignature (TableHeader.Signature))
> +    if (!AcpiUtValidNameseg (TableHeader.Signature))
>       {
>           fprintf (stderr, "Invalid table signature: 0x%8.8X\n",
>               *ACPI_CAST_PTR (UINT32, TableHeader.Signature));
> diff --git a/src/acpica/source/common/dmrestag.c b/src/acpica/source/common/dmrestag.c
> index d00036f..4ebcaba 100644
> --- a/src/acpica/source/common/dmrestag.c
> +++ b/src/acpica/source/common/dmrestag.c
> @@ -351,6 +351,7 @@ static const ACPI_RESOURCE_TAG      AcpiDmGpioIoTags[] =
>   static const ACPI_RESOURCE_TAG      AcpiDmI2cSerialBusTags[] =
>   {
>       {( 6 * 8) + 0,  ACPI_RESTAG_SLAVEMODE},
> +    {( 6 * 8) + 2,  ACPI_RESTAG_INTERRUPTSHARE},    /* V2 - ACPI 6.0 */
>       {( 7 * 8) + 0,  ACPI_RESTAG_MODE},
>       {(12 * 8),      ACPI_RESTAG_SPEED},
>       {(16 * 8),      ACPI_RESTAG_ADDRESS},
> @@ -360,6 +361,7 @@ static const ACPI_RESOURCE_TAG      AcpiDmI2cSerialBusTags[] =
>   static const ACPI_RESOURCE_TAG      AcpiDmSpiSerialBusTags[] =
>   {
>       {( 6 * 8) + 0,  ACPI_RESTAG_SLAVEMODE},
> +    {( 6 * 8) + 2,  ACPI_RESTAG_INTERRUPTSHARE},    /* V2 - ACPI 6.0 */
>       {( 7 * 8) + 0,  ACPI_RESTAG_MODE},
>       {( 7 * 8) + 1,  ACPI_RESTAG_DEVICEPOLARITY},
>       {(12 * 8),      ACPI_RESTAG_SPEED},
> @@ -372,7 +374,8 @@ static const ACPI_RESOURCE_TAG      AcpiDmSpiSerialBusTags[] =
>   
>   static const ACPI_RESOURCE_TAG      AcpiDmUartSerialBusTags[] =
>   {
> -    {( 6 * 8) + 0,  ACPI_RESTAG_SLAVEMODE}, /* Note: not part of original macro */
> +    {( 6 * 8) + 0,  ACPI_RESTAG_SLAVEMODE},         /* Note: not part of original macro */
> +    {( 6 * 8) + 2,  ACPI_RESTAG_INTERRUPTSHARE},    /* V2 - ACPI 6.0 */
>       {( 7 * 8) + 0,  ACPI_RESTAG_FLOWCONTROL},
>       {( 7 * 8) + 2,  ACPI_RESTAG_STOPBITS},
>       {( 7 * 8) + 4,  ACPI_RESTAG_LENGTH},
> diff --git a/src/acpica/source/common/dmtable.c b/src/acpica/source/common/dmtable.c
> index 35c4fa1..51d91f8 100644
> --- a/src/acpica/source/common/dmtable.c
> +++ b/src/acpica/source/common/dmtable.c
> @@ -130,15 +130,6 @@ AcpiAhGetTableInfo (
>       char                    *Signature);
>   
>   
> -/* Local Prototypes */
> -
> -static void
> -AcpiDmCheckAscii (
> -    UINT8                   *Target,
> -    char                    *RepairedName,
> -    UINT32                  Count);
> -
> -
>   /* Common format strings for commented values */
>   
>   #define UINT8_FORMAT        "%2.2X [%s]\n"
> @@ -327,6 +318,7 @@ static const char           *AcpiDmPcctSubnames[] =
>   {
>       "Generic Communications Subspace",  /* ACPI_PCCT_TYPE_GENERIC_SUBSPACE */
>       "HW-Reduced Comm Subspace",         /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE */
> +    "HW-Reduced Comm Subspace Type2",   /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 */
>       "Unknown Subtable Type"             /* Reserved */
>   };
>   
> @@ -1131,7 +1123,7 @@ AcpiDmDumpTable (
>   
>           case ACPI_DMT_SIG:
>   
> -            AcpiDmCheckAscii (Target, RepairedName, 4);
> +            AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
>               AcpiOsPrintf ("\"%.4s\"    ", RepairedName);
>   
>               TableData = AcpiAhGetTableInfo (ACPI_CAST_PTR (char, Target));
> @@ -1147,19 +1139,19 @@ AcpiDmDumpTable (
>   
>           case ACPI_DMT_NAME4:
>   
> -            AcpiDmCheckAscii (Target, RepairedName, 4);
> +            AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
>               AcpiOsPrintf ("\"%.4s\"\n", RepairedName);
>               break;
>   
>           case ACPI_DMT_NAME6:
>   
> -            AcpiDmCheckAscii (Target, RepairedName, 6);
> +            AcpiUtCheckAndRepairAscii (Target, RepairedName, 6);
>               AcpiOsPrintf ("\"%.6s\"\n", RepairedName);
>               break;
>   
>           case ACPI_DMT_NAME8:
>   
> -            AcpiDmCheckAscii (Target, RepairedName, 8);
> +            AcpiUtCheckAndRepairAscii (Target, RepairedName, 8);
>               AcpiOsPrintf ("\"%.8s\"\n", RepairedName);
>               break;
>   
> @@ -1562,42 +1554,3 @@ AcpiDmDumpTable (
>   
>       return (AE_OK);
>   }
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION:    AcpiDmCheckAscii
> - *
> - * PARAMETERS:  Name                - Ascii string
> - *              Count               - Number of characters to check
> - *
> - * RETURN:      None
> - *
> - * DESCRIPTION: Ensure that the requested number of characters are printable
> - *              Ascii characters. Sets non-printable and null chars to <space>.
> - *
> - ******************************************************************************/
> -
> -static void
> -AcpiDmCheckAscii (
> -    UINT8                   *Name,
> -    char                    *RepairedName,
> -    UINT32                  Count)
> -{
> -    UINT32                  i;
> -
> -
> -    for (i = 0; i < Count; i++)
> -    {
> -        RepairedName[i] = (char) Name[i];
> -
> -        if (!Name[i])
> -        {
> -            return;
> -        }
> -        if (!isprint (Name[i]))
> -        {
> -            RepairedName[i] = ' ';
> -        }
> -    }
> -}
> diff --git a/src/acpica/source/common/dmtbdump.c b/src/acpica/source/common/dmtbdump.c
> index bf09e58..ae48276 100644
> --- a/src/acpica/source/common/dmtbdump.c
> +++ b/src/acpica/source/common/dmtbdump.c
> @@ -2969,6 +2969,11 @@ AcpiDmDumpPcct (
>               InfoTable = AcpiDmTableInfoPcct1;
>               break;
>   
> +        case ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2:
> +
> +            InfoTable = AcpiDmTableInfoPcct2;
> +            break;
> +
>           default:
>   
>               AcpiOsPrintf (
> diff --git a/src/acpica/source/common/dmtbinfo.c b/src/acpica/source/common/dmtbinfo.c
> index ea30313..5520da2 100644
> --- a/src/acpica/source/common/dmtbinfo.c
> +++ b/src/acpica/source/common/dmtbinfo.c
> @@ -290,6 +290,7 @@
>   #define ACPI_NFIT6_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_NFIT_FLUSH_ADDRESS,f)
>   #define ACPI_PCCT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f)
>   #define ACPI_PCCT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED,f)
> +#define ACPI_PCCT2_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f)
>   #define ACPI_PMTT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PMTT_SOCKET,f)
>   #define ACPI_PMTT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PMTT_CONTROLLER,f)
>   #define ACPI_PMTT1A_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_PMTT_DOMAIN,f)
> @@ -351,6 +352,7 @@
>   #define ACPI_NFIT4_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_NFIT_CONTROL_REGION,f,o)
>   #define ACPI_PCCT_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (ACPI_TABLE_PCCT,f,o)
>   #define ACPI_PCCT1_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_PCCT_HW_REDUCED,f,o)
> +#define ACPI_PCCT2_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f,o)
>   #define ACPI_PMTTH_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_PMTT_HEADER,f,o)
>   #define ACPI_WDDT_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (ACPI_TABLE_WDDT,f,o)
>   #define ACPI_EINJ0_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_WHEA_HEADER,f,o)
> @@ -2411,6 +2413,29 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoPcct1[] =
>       ACPI_DMT_TERMINATOR
>   };
>   
> +/* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */
> +
> +ACPI_DMTABLE_INFO           AcpiDmTableInfoPcct2[] =
> +{
> +    {ACPI_DMT_UINT32,   ACPI_PCCT2_OFFSET (DoorbellInterrupt),      "Doorbell Interrupt", 0},
> +    {ACPI_DMT_UINT8,    ACPI_PCCT2_OFFSET (Flags),                  "Flags (Decoded Below)", DT_FLAG},
> +    {ACPI_DMT_FLAG0,    ACPI_PCCT2_FLAG_OFFSET (Flags,0),           "Polarity", 0},
> +    {ACPI_DMT_FLAG1,    ACPI_PCCT2_FLAG_OFFSET (Flags,0),           "Mode", 0},
> +    {ACPI_DMT_UINT8,    ACPI_PCCT2_OFFSET (Reserved),               "Reserved", 0},
> +    {ACPI_DMT_UINT64,   ACPI_PCCT2_OFFSET (BaseAddress),            "Base Address", 0},
> +    {ACPI_DMT_UINT64,   ACPI_PCCT2_OFFSET (Length),                 "Address Length", 0},
> +    {ACPI_DMT_GAS,      ACPI_PCCT2_OFFSET (DoorbellRegister),       "Doorbell Register", 0},
> +    {ACPI_DMT_UINT64,   ACPI_PCCT2_OFFSET (PreserveMask),           "Preserve Mask", 0},
> +    {ACPI_DMT_UINT64,   ACPI_PCCT2_OFFSET (WriteMask),              "Write Mask", 0},
> +    {ACPI_DMT_UINT32,   ACPI_PCCT2_OFFSET (Latency),                "Command Latency", 0},
> +    {ACPI_DMT_UINT32,   ACPI_PCCT2_OFFSET (MaxAccessRate),          "Maximum Access Rate", 0},
> +    {ACPI_DMT_UINT16,   ACPI_PCCT2_OFFSET (MinTurnaroundTime),      "Minimum Turnaround Time", 0},
> +    {ACPI_DMT_GAS,      ACPI_PCCT2_OFFSET (DoorbellAckRegister),    "Doorbell ACK Register", 0},
> +    {ACPI_DMT_UINT64,   ACPI_PCCT2_OFFSET (AckPreserveMask),        "ACK Preserve Mask", 0},
> +    {ACPI_DMT_UINT64,   ACPI_PCCT2_OFFSET (AckWriteMask),           "ACK Write Mask", 0},
> +    ACPI_DMT_TERMINATOR
> +};
> +
>   
>   /*******************************************************************************
>    *
> diff --git a/src/acpica/source/compiler/Makefile.am b/src/acpica/source/compiler/Makefile.am
> index 33accbf..6746488 100644
> --- a/src/acpica/source/compiler/Makefile.am
> +++ b/src/acpica/source/compiler/Makefile.am
> @@ -5,7 +5,8 @@
>   AUTOMAKE_OPTIONS = subdir-objects
>   
>   AM_CPPFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing -D_LINUX \
> -		-DACPI_ASL_COMPILER $(CFLAGS) -I$(top_srcdir)/src/acpica/source/include
> +		-DACPI_ASL_COMPILER $(CFLAGS) -I$(top_srcdir)/src/acpica/source/include \
> +	-g
>   
>   AM_YFLAGS = -v -d -y
>   
> diff --git a/src/acpica/source/compiler/aslanalyze.c b/src/acpica/source/compiler/aslanalyze.c
> index bcbdc55..eb392cb 100644
> --- a/src/acpica/source/compiler/aslanalyze.c
> +++ b/src/acpica/source/compiler/aslanalyze.c
> @@ -122,6 +122,15 @@
>           ACPI_MODULE_NAME    ("aslanalyze")
>   
>   
> +/* Local Prototypes */
> +
> +static ACPI_STATUS
> +ApDeviceSubtreeWalk (
> +    ACPI_PARSE_OBJECT       *Op,
> +    UINT32                  Level,
> +    void                    *Context);
> +
> +
>   /*******************************************************************************
>    *
>    * FUNCTION:    AnIsInternalMethod
> @@ -651,6 +660,108 @@ ApCheckRegMethod (
>   
>   /*******************************************************************************
>    *
> + * FUNCTION:    ApFindNameInDeviceTree
> + *
> + * PARAMETERS:  Name                - Name to search for
> + *              Op                  - Current parse op
> + *
> + * RETURN:      TRUE if name found in the same scope as Op.
> + *
> + * DESCRIPTION: Determine if a name appears in the same scope as Op, as either
> + *              a Method() or a Name(). "Same scope" can mean under an If or
> + *              Else statement.
> + *
> + * NOTE: Detects _HID/_ADR in this type of construct (legal in ACPI 6.1+)
> + *
> + * Scope (\_SB.PCI0)
> + * {
> + *     Device (I2C0)
> + *     {
> + *         If (SMD0 != 4) {
> + *             Name (_HID, "INT3442")
> + *         } Else {
> + *             Name (_ADR, 0x400)
> + *         }
> + *     }
> + * }
> + ******************************************************************************/
> +
> +BOOLEAN
> +ApFindNameInDeviceTree (
> +    char                    *Name,
> +    ACPI_PARSE_OBJECT       *Op)
> +{
> +    ACPI_STATUS             Status;
> +
> +
> +    Status = TrWalkParseTree (Op, ASL_WALK_VISIT_DOWNWARD,
> +        ApDeviceSubtreeWalk, NULL, Name);
> +
> +    if (Status == AE_CTRL_TRUE)
> +    {
> +        return (TRUE);  /* Found a match */
> +    }
> +
> +    return (FALSE);
> +}
> +
> +
> +/* Callback function for interface above */
> +
> +static ACPI_STATUS
> +ApDeviceSubtreeWalk (
> +    ACPI_PARSE_OBJECT       *Op,
> +    UINT32                  Level,
> +    void                    *Context)
> +{
> +    char                    *Name = ACPI_CAST_PTR (char, Context);
> +
> +
> +    switch (Op->Asl.ParseOpcode)
> +    {
> +    case PARSEOP_DEVICE:
> +
> +        /* Level 0 is the starting device, ignore it */
> +
> +        if (Level > 0)
> +        {
> +            /* Ignore sub-devices */
> +
> +            return (AE_CTRL_DEPTH);
> +        }
> +        break;
> +
> +    case PARSEOP_NAME:
> +    case PARSEOP_METHOD:
> +
> +        /* These are what we are looking for */
> +
> +        if (ACPI_COMPARE_NAME (Name, Op->Asl.NameSeg))
> +        {
> +            return (AE_CTRL_TRUE);
> +        }
> +        return (AE_CTRL_DEPTH);
> +
> +    case PARSEOP_SCOPE:
> +    case PARSEOP_FIELD:
> +    case PARSEOP_OPERATIONREGION:
> +
> +        /*
> +         * We want to ignore these, because either they can be large
> +         * subtrees or open a scope to somewhere else.
> +         */
> +        return (AE_CTRL_DEPTH);
> +
> +    default:
> +        break;
> +    }
> +
> +    return (AE_OK);
> +}
> +
> +
> +/*******************************************************************************
> + *
>    * FUNCTION:    ApFindNameInScope
>    *
>    * PARAMETERS:  Name                - Name to search for
> diff --git a/src/acpica/source/compiler/aslcompile.c b/src/acpica/source/compiler/aslcompile.c
> index b9843a9..aba05b1 100644
> --- a/src/acpica/source/compiler/aslcompile.c
> +++ b/src/acpica/source/compiler/aslcompile.c
> @@ -279,8 +279,8 @@ CmDoCompile (
>   
>       if (Gbl_FoldConstants)
>       {
> -        TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
> -            OpcAmlConstantWalk, NULL, NULL);
> +        TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD,
> +            NULL, OpcAmlConstantWalk, NULL);
>       }
>       else
>       {
> diff --git a/src/acpica/source/compiler/aslcompiler.h b/src/acpica/source/compiler/aslcompiler.h
> index ce36df6..4d02852 100644
> --- a/src/acpica/source/compiler/aslcompiler.h
> +++ b/src/acpica/source/compiler/aslcompiler.h
> @@ -359,6 +359,10 @@ ApFindNameInScope (
>       char                    *Name,
>       ACPI_PARSE_OBJECT       *Op);
>   
> +BOOLEAN
> +ApFindNameInDeviceTree (
> +    char                    *Name,
> +    ACPI_PARSE_OBJECT       *Op);
>   
>   /*
>    * aslerror - error handling/reporting
> @@ -781,6 +785,11 @@ ExDoExternal (
>   #define ASL_WALK_VISIT_TWICE        (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD)
>   
>   
> +void
> +TrSetParent (
> +    ACPI_PARSE_OBJECT       *Op,
> +    ACPI_PARSE_OBJECT       *ParentOp);
> +
>   ACPI_PARSE_OBJECT *
>   TrAllocateNode (
>       UINT32                  ParseOpcode);
> diff --git a/src/acpica/source/compiler/aslcompiler.l b/src/acpica/source/compiler/aslcompiler.l
> index 16527a9..ab7a050 100644
> --- a/src/acpica/source/compiler/aslcompiler.l
> +++ b/src/acpica/source/compiler/aslcompiler.l
> @@ -404,6 +404,7 @@ NamePathTail                [.]{NameSeg}
>   "GpioInt"                   { count (1); return (PARSEOP_GPIO_INT); }
>   "GpioIo"                    { count (1); return (PARSEOP_GPIO_IO); }
>   "I2cSerialBus"              { count (1); return (PARSEOP_I2C_SERIALBUS); }
> +"I2cSerialBusV2"            { count (1); return (PARSEOP_I2C_SERIALBUS_V2); }
>   "Interrupt"                 { count (1); return (PARSEOP_INTERRUPT); }
>   "IO"                        { count (1); return (PARSEOP_IO); }
>   "IRQ"                       { count (1); return (PARSEOP_IRQ); }
> @@ -416,9 +417,11 @@ NamePathTail                [.]{NameSeg}
>   "QWordSpace"                { count (1); return (PARSEOP_QWORDSPACE); }
>   "Register"                  { count (1); return (PARSEOP_REGISTER); }
>   "SpiSerialBus"              { count (1); return (PARSEOP_SPI_SERIALBUS); }
> +"SpiSerialBusV2"            { count (1); return (PARSEOP_SPI_SERIALBUS_V2); }
>   "StartDependentFn"          { count (1); return (PARSEOP_STARTDEPENDENTFN); }
>   "StartDependentFnNoPri"     { count (1); return (PARSEOP_STARTDEPENDENTFN_NOPRI); }
>   "UartSerialBus"             { count (1); return (PARSEOP_UART_SERIALBUS); }
> +"UartSerialBusV2"           { count (1); return (PARSEOP_UART_SERIALBUS_V2); }
>   "VendorLong"                { count (1); return (PARSEOP_VENDORLONG); }
>   "VendorShort"               { count (1); return (PARSEOP_VENDORSHORT); }
>   "WordBusNumber"             { count (1); return (PARSEOP_WORDBUSNUMBER); }
> @@ -744,9 +747,14 @@ NamePathTail                [.]{NameSeg}
>   
>   
>       /* printf debug macros */
> +
>   "printf"                    { count (0); return (PARSEOP_PRINTF); }
>   "fprintf"                   { count (0); return (PARSEOP_FPRINTF); }
>   
> +    /* Other macros */
> +
> +"For"                       { count (0); return (PARSEOP_FOR); }
> +
>       /* Predefined compiler names */
>   
>   "__DATE__"                  { count (0); return (PARSEOP___DATE__); }
> diff --git a/src/acpica/source/compiler/aslcompiler.y b/src/acpica/source/compiler/aslcompiler.y
> index efa5ce1..fa5c64b 100644
> --- a/src/acpica/source/compiler/aslcompiler.y
> +++ b/src/acpica/source/compiler/aslcompiler.y
> @@ -130,7 +130,7 @@
>    * each list element and possibly overflow on very large lists (>4000 items).
>    * This dramatically reduces use of the parse stack overall.
>    *
> - *      ArgList, TermList, Objectlist, ByteList, DWordList, PackageList,
> + *      ArgList, TermList, ByteList, DWordList, PackageList,
>    *      ResourceMacroList, and FieldUnitList
>    */
>   
> @@ -171,7 +171,7 @@ AslLocalAllocate (
>    * These shift/reduce conflicts are expected. There should be zero
>    * reduce/reduce conflicts.
>    */
> -%expect 89
> +%expect 101
>   
>   /*! [Begin] no source code translation */
>   
> @@ -308,6 +308,7 @@ AslLocalAllocate (
>   %token <i> PARSEOP_GPIO_INT
>   %token <i> PARSEOP_GPIO_IO
>   %token <i> PARSEOP_I2C_SERIALBUS
> +%token <i> PARSEOP_I2C_SERIALBUS_V2
>   %token <i> PARSEOP_IF
>   %token <i> PARSEOP_INCLUDE
>   %token <i> PARSEOP_INCLUDE_END
> @@ -465,6 +466,7 @@ AslLocalAllocate (
>   %token <i> PARSEOP_SLAVEMODE_DEVICEINIT
>   %token <i> PARSEOP_SLEEP
>   %token <i> PARSEOP_SPI_SERIALBUS
> +%token <i> PARSEOP_SPI_SERIALBUS_V2
>   %token <i> PARSEOP_STALL
>   %token <i> PARSEOP_STARTDEPENDENTFN
>   %token <i> PARSEOP_STARTDEPENDENTFN_NOPRI
> @@ -490,6 +492,7 @@ AslLocalAllocate (
>   %token <i> PARSEOP_TYPE_STATIC
>   %token <i> PARSEOP_TYPE_TRANSLATION
>   %token <i> PARSEOP_UART_SERIALBUS
> +%token <i> PARSEOP_UART_SERIALBUS_V2
>   %token <i> PARSEOP_UNICODE
>   %token <i> PARSEOP_UNLOAD
>   %token <i> PARSEOP_UPDATERULE_ONES
> @@ -599,8 +602,11 @@ AslLocalAllocate (
>   %left <i>  PARSEOP_EXP_INDEX_LEFT
>   %right <i> PARSEOP_EXP_INDEX_RIGHT
>   
> +/* Macros */
> +
>   %token <i> PARSEOP_PRINTF
>   %token <i> PARSEOP_FPRINTF
> +%token <i> PARSEOP_FOR
>   
>   /* Specific parentheses tokens are not used at this time */
>              /* PARSEOP_EXP_PAREN_OPEN */
> @@ -641,7 +647,6 @@ AslLocalAllocate (
>   %type <n> NamedObject
>   %type <n> NameSpaceModifier
>   %type <n> Object
> -%type <n> ObjectList
>   %type <n> PackageData
>   %type <n> ParameterTypePackage
>   %type <n> ParameterTypePackageList
> @@ -874,6 +879,7 @@ AslLocalAllocate (
>   %type <n> PrintfArgList
>   %type <n> PrintfTerm
>   %type <n> FprintfTerm
> +%type <n> ForTerm
>   
>   /* Resource Descriptors */
>   
> @@ -891,6 +897,7 @@ AslLocalAllocate (
>   %type <n> GpioIntTerm
>   %type <n> GpioIoTerm
>   %type <n> I2cSerialBusTerm
> +%type <n> I2cSerialBusTermV2
>   %type <n> InterruptTerm
>   %type <n> IOTerm
>   %type <n> IRQNoFlagsTerm
> @@ -905,9 +912,11 @@ AslLocalAllocate (
>   %type <n> QWordSpaceTerm
>   %type <n> RegisterTerm
>   %type <n> SpiSerialBusTerm
> +%type <n> SpiSerialBusTermV2
>   %type <n> StartDependentFnNoPriTerm
>   %type <n> StartDependentFnTerm
>   %type <n> UartSerialBusTerm
> +%type <n> UartSerialBusTermV2
>   %type <n> VendorLongTerm
>   %type <n> VendorShortTerm
>   %type <n> WordBusNumberTerm
> @@ -926,6 +935,7 @@ AslLocalAllocate (
>   %type <n> OptionalAddressRange
>   %type <n> OptionalBitsPerByte
>   %type <n> OptionalBuffer_Last
> +%type <n> OptionalBufferLength
>   %type <n> OptionalByteConstExpr
>   %type <n> OptionalCount
>   %type <n> OptionalDecodeType
> @@ -945,6 +955,7 @@ AslLocalAllocate (
>   %type <n> OptionalParameterTypePackage
>   %type <n> OptionalParameterTypesPackage
>   %type <n> OptionalParityType
> +%type <n> OptionalPredicate
>   %type <n> OptionalQWordConstExpr
>   %type <n> OptionalRangeType
>   %type <n> OptionalReference
> @@ -1009,6 +1020,10 @@ AslCode
>    * {ObjectList} portion of the DefinitionBlockTerm in ACPI 2.0 to the
>    * original use of {TermList} instead (see below.) This allows the use
>    * of Type1 and Type2 opcodes at module level.
> + *
> + * 04/2016: The module-level code is now allowed in the following terms:
> + * DeviceTerm, PowerResTerm, ProcessorTerm, ScopeTerm, ThermalZoneTerm.
> + * The ObjectList term is obsolete and has been removed.
>    */
>   DefinitionBlockTerm
>       : PARSEOP_DEFINITION_BLOCK '('  {$<n>$ = TrCreateLeafNode (PARSEOP_DEFINITION_BLOCK);}
> @@ -1124,12 +1139,6 @@ FieldUnitEntry
>           AmlPackageLengthTerm        {$$ = TrLinkChildNode ($1,$3);}
>       ;
>   
> -ObjectList
> -    :                               {$$ = NULL;}
> -    | ObjectList Object             {$$ = TrLinkPeerNode ($1,$2);}
> -    | error                         {$$ = AslDoError(); yyclearin;}
> -    ;
> -
>   Object
>       : CompilerDirective             {}
>       | NamedObject                   {}
> @@ -1424,6 +1433,7 @@ Type1Opcode
>       | BreakPointTerm                {}
>       | ContinueTerm                  {}
>       | FatalTerm                     {}
> +    | ForTerm                       {}
>       | ElseIfTerm                    {}
>       | LoadTerm                      {}
>       | NoOpTerm                      {}
> @@ -1632,7 +1642,7 @@ BreakPointTerm
>   
>   BufferTerm
>       : PARSEOP_BUFFER '('            {$<n>$ = TrCreateLeafNode (PARSEOP_BUFFER);}
> -        OptionalTermArg
> +        OptionalBufferLength
>           ')' '{'
>               BufferTermData '}'      {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
>       | PARSEOP_BUFFER '('
> @@ -1813,7 +1823,7 @@ DeviceTerm
>       : PARSEOP_DEVICE '('            {$<n>$ = TrCreateLeafNode (PARSEOP_DEVICE);}
>           NameString
>           ')' '{'
> -            ObjectList '}'          {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
> +            TermList '}'            {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
>       | PARSEOP_DEVICE '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
> @@ -1924,6 +1934,23 @@ FindSetRightBitTerm
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
>   
> +    /* Convert a For() loop to a While() loop */
> +ForTerm
> +    : PARSEOP_FOR '('               {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);}
> +        OptionalTermArg ','         {}
> +        OptionalPredicate ','
> +        OptionalTermArg             {$<n>$ = TrLinkPeerNode ($4,$<n>3);
> +                                        TrSetParent ($9,$<n>3);}                /* New parent is WHILE */
> +        ')' '{' TermList '}'        {$<n>$ = TrLinkChildren ($<n>3,2,$7,$13);}
> +                                    {$<n>$ = TrLinkPeerNode ($13,$9);
> +                                        $$ = $<n>10;}
> +    ;
> +
> +OptionalPredicate
> +    :                               {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER, 1);}
> +    | TermArg                       {$$ = $1;}
> +    ;
> +
>   FprintfTerm
>       : PARSEOP_FPRINTF '('            {$<n>$ = TrCreateLeafNode (PARSEOP_FPRINTF);}
>           TermArg ','
> @@ -2296,7 +2323,7 @@ PowerResTerm
>           ',' ByteConstExpr
>           ',' WordConstExpr
>           ')' '{'
> -            ObjectList '}'          {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$8,$11);}
> +            TermList '}'            {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$8,$11);}
>       | PARSEOP_POWERRESOURCE '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
> @@ -2324,7 +2351,7 @@ ProcessorTerm
>           OptionalDWordConstExpr
>           OptionalByteConstExpr
>           ')' '{'
> -            ObjectList '}'          {$$ = TrLinkChildren ($<n>3,5,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$7,$8,$11);}
> +            TermList '}'            {$$ = TrLinkChildren ($<n>3,5,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$7,$8,$11);}
>       | PARSEOP_PROCESSOR '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
> @@ -2379,7 +2406,7 @@ ScopeTerm
>       : PARSEOP_SCOPE '('             {$<n>$ = TrCreateLeafNode (PARSEOP_SCOPE);}
>           NameString
>           ')' '{'
> -            ObjectList '}'          {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
> +            TermList '}'            {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
>       | PARSEOP_SCOPE '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
> @@ -2468,7 +2495,7 @@ ThermalZoneTerm
>       : PARSEOP_THERMALZONE '('       {$<n>$ = TrCreateLeafNode (PARSEOP_THERMALZONE);}
>           NameString
>           ')' '{'
> -            ObjectList '}'          {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
> +            TermList '}'            {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
>       | PARSEOP_THERMALZONE '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
> @@ -2650,6 +2677,11 @@ OptionalSerializeRuleKeyword
>       ;
>   
>   OptionalTermArg
> +    :                               {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
> +    | TermArg                       {$$ = $1;}
> +    ;
> +
> +OptionalBufferLength
>       :                               {$$ = NULL;}
>       | TermArg                       {$$ = $1;}
>       ;
> @@ -3175,6 +3207,7 @@ ResourceMacroTerm
>       | GpioIntTerm                   {}
>       | GpioIoTerm                    {}
>       | I2cSerialBusTerm              {}
> +    | I2cSerialBusTermV2            {}
>       | InterruptTerm                 {}
>       | IOTerm                        {}
>       | IRQNoFlagsTerm                {}
> @@ -3187,9 +3220,11 @@ ResourceMacroTerm
>       | QWordSpaceTerm                {}
>       | RegisterTerm                  {}
>       | SpiSerialBusTerm              {}
> +    | SpiSerialBusTermV2            {}
>       | StartDependentFnNoPriTerm     {}
>       | StartDependentFnTerm          {}
>       | UartSerialBusTerm             {}
> +    | UartSerialBusTermV2           {}
>       | VendorLongTerm                {}
>       | VendorShortTerm               {}
>       | WordBusNumberTerm             {}
> @@ -3413,11 +3448,30 @@ I2cSerialBusTerm
>           OptionalResourceType        /* 12: ResourceType */
>           OptionalNameString          /* 13: DescriptorName */
>           OptionalBuffer_Last         /* 14: VendorData */
> -        ')'                         {$$ = TrLinkChildren ($<n>3,9,$4,$5,$7,$8,$10,$11,$12,$13,$14);}
> +        ')'                         {$$ = TrLinkChildren ($<n>3,10,$4,$5,$7,$8,$10,$11,$12,$13,
> +                                        TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$14);}
>       | PARSEOP_I2C_SERIALBUS '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
>   
> +I2cSerialBusTermV2
> +    : PARSEOP_I2C_SERIALBUS_V2 '('  {$<n>$ = TrCreateLeafNode (PARSEOP_I2C_SERIALBUS_V2);}
> +        WordConstExpr               /* 04: SlaveAddress */
> +        OptionalSlaveMode           /* 05: SlaveMode */
> +        ',' DWordConstExpr          /* 07: ConnectionSpeed */
> +        OptionalAddressingMode      /* 08: AddressingMode */
> +        ',' StringData              /* 10: ResourceSource */
> +        OptionalByteConstExpr       /* 11: ResourceSourceIndex */
> +        OptionalResourceType        /* 12: ResourceType */
> +        OptionalNameString          /* 13: DescriptorName */
> +        OptionalShareType           /* 14: Share */
> +        OptionalBuffer_Last         /* 15: VendorData */
> +        ')'                         {$$ = TrLinkChildren ($<n>3,10,$4,$5,$7,$8,$10,$11,$12,$13,
> +                                        $14,$15);}
> +    | PARSEOP_I2C_SERIALBUS_V2 '('
> +        error ')'                   {$$ = AslDoError(); yyclearin;}
> +    ;
> +
>   InterruptTerm
>       : PARSEOP_INTERRUPT '('         {$<n>$ = TrCreateLeafNode (PARSEOP_INTERRUPT);}
>           OptionalResourceType_First
> @@ -3598,11 +3652,34 @@ SpiSerialBusTerm
>           OptionalResourceType        /* 19: ResourceType */
>           OptionalNameString          /* 20: DescriptorName */
>           OptionalBuffer_Last         /* 21: VendorData */
> -        ')'                         {$$ = TrLinkChildren ($<n>3,13,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,$21);}
> +        ')'                         {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
> +                                        TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);}
>       | PARSEOP_SPI_SERIALBUS '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
>   
> +SpiSerialBusTermV2
> +    : PARSEOP_SPI_SERIALBUS_V2 '('  {$<n>$ = TrCreateLeafNode (PARSEOP_SPI_SERIALBUS_V2);}
> +        WordConstExpr               /* 04: DeviceSelection */
> +        OptionalDevicePolarity      /* 05: DevicePolarity */
> +        OptionalWireMode            /* 06: WireMode */
> +        ',' ByteConstExpr           /* 08: DataBitLength */
> +        OptionalSlaveMode           /* 09: SlaveMode */
> +        ',' DWordConstExpr          /* 11: ConnectionSpeed */
> +        ',' ClockPolarityKeyword    /* 13: ClockPolarity */
> +        ',' ClockPhaseKeyword       /* 15: ClockPhase */
> +        ',' StringData              /* 17: ResourceSource */
> +        OptionalByteConstExpr       /* 18: ResourceSourceIndex */
> +        OptionalResourceType        /* 19: ResourceType */
> +        OptionalNameString          /* 20: DescriptorName */
> +        OptionalShareType           /* 21: Share */
> +        OptionalBuffer_Last         /* 22: VendorData */
> +        ')'                         {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
> +                                        $21,$22);}
> +    | PARSEOP_SPI_SERIALBUS_V2 '('
> +        error ')'                   {$$ = AslDoError(); yyclearin;}
> +    ;
> +
>   StartDependentFnNoPriTerm
>       : PARSEOP_STARTDEPENDENTFN_NOPRI '('    {$<n>$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN_NOPRI);}
>           ')' '{'
> @@ -3637,11 +3714,35 @@ UartSerialBusTerm
>           OptionalResourceType        /* 19: ResourceType */
>           OptionalNameString          /* 20: DescriptorName */
>           OptionalBuffer_Last         /* 21: VendorData */
> -        ')'                         {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,$21);}
> +        ')'                         {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
> +                                        TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);}
>       | PARSEOP_UART_SERIALBUS '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
>   
> +UartSerialBusTermV2
> +    : PARSEOP_UART_SERIALBUS_V2 '(' {$<n>$ = TrCreateLeafNode (PARSEOP_UART_SERIALBUS_V2);}
> +        DWordConstExpr              /* 04: ConnectionSpeed */
> +        OptionalBitsPerByte         /* 05: BitsPerByte */
> +        OptionalStopBits            /* 06: StopBits */
> +        ',' ByteConstExpr           /* 08: LinesInUse */
> +        OptionalEndian              /* 09: Endianess */
> +        OptionalParityType          /* 10: Parity */
> +        OptionalFlowControl         /* 11: FlowControl */
> +        ',' WordConstExpr           /* 13: Rx BufferSize */
> +        ',' WordConstExpr           /* 15: Tx BufferSize */
> +        ',' StringData              /* 17: ResourceSource */
> +        OptionalByteConstExpr       /* 18: ResourceSourceIndex */
> +        OptionalResourceType        /* 19: ResourceType */
> +        OptionalNameString          /* 20: DescriptorName */
> +        OptionalShareType           /* 21: Share */
> +        OptionalBuffer_Last         /* 22: VendorData */
> +        ')'                         {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
> +                                        $21,$22);}
> +    | PARSEOP_UART_SERIALBUS_V2 '('
> +        error ')'                   {$$ = AslDoError(); yyclearin;}
> +    ;
> +
>   VendorLongTerm
>       : PARSEOP_VENDORLONG '('        {$<n>$ = TrCreateLeafNode (PARSEOP_VENDORLONG);}
>           OptionalNameString_First
> diff --git a/src/acpica/source/compiler/aslfold.c b/src/acpica/source/compiler/aslfold.c
> index 7aef301..4d28aae 100644
> --- a/src/acpica/source/compiler/aslfold.c
> +++ b/src/acpica/source/compiler/aslfold.c
> @@ -173,6 +173,7 @@ TrInstallReducedConstant (
>    * RETURN:      Status
>    *
>    * DESCRIPTION: Reduce an Op and its subtree to a constant if possible.
> + *              Called during ascent of the parse tree.
>    *
>    ******************************************************************************/
>   
> @@ -264,9 +265,7 @@ OpcAmlConstantWalk (
>           OpcUpdateIntegerNode (Op, 0);
>       }
>   
> -    /* Abort the walk of this subtree, we are done with it */
> -
> -    return (AE_CTRL_DEPTH);
> +    return (AE_OK);
>   }
>   
>   
> @@ -279,7 +278,7 @@ OpcAmlConstantWalk (
>    * RETURN:      Status
>    *
>    * DESCRIPTION: Check one Op for a reducible type 3/4/5 AML opcode.
> - *              This is performed via a downward walk of the parse subtree.
> + *              This is performed via an upward walk of the parse subtree.
>    *
>    ******************************************************************************/
>   
> @@ -445,7 +444,6 @@ OpcAmlCheckForConstant (
>           goto CleanupAndExit;
>       }
>   
> -
>       /* Debug output */
>   
>       DbgPrint (ASL_PARSE_OUTPUT, "TYPE_345");
> @@ -591,9 +589,6 @@ TrTransformToStoreOp (
>       ACPI_STATUS             Status;
>   
>   
> -    DbgPrint (ASL_PARSE_OUTPUT,
> -        "Reduction/Transform to StoreOp: Store(Constant, Target)\n");
> -
>       /* Extract the operands */
>   
>       Child1 = Op->Asl.Child;
> @@ -615,6 +610,10 @@ TrTransformToStoreOp (
>           }
>       }
>   
> +    DbgPrint (ASL_PARSE_OUTPUT,
> +        "Reduction/Transform to StoreOp: Store(%s, %s)\n",
> +        Child1->Asl.ParseOpName, Child2->Asl.ParseOpName);
> +
>       /*
>        * Create a NULL (zero) target so that we can use the
>        * interpreter to evaluate the expression.
> diff --git a/src/acpica/source/compiler/asllookup.c b/src/acpica/source/compiler/asllookup.c
> index 5085ce1..80a0d72 100644
> --- a/src/acpica/source/compiler/asllookup.c
> +++ b/src/acpica/source/compiler/asllookup.c
> @@ -279,6 +279,7 @@ LkIsObjectUsed (
>       case ACPI_TYPE_POWER:
>       case ACPI_TYPE_THERMAL:
>       case ACPI_TYPE_LOCAL_RESOURCE:
> +    case ACPI_TYPE_LOCAL_RESOURCE_FIELD: /* Names assigned to descriptor elements */
>   
>           return (AE_OK);
>   
> @@ -299,8 +300,8 @@ LkIsObjectUsed (
>                * Issue a remark even if it is a reserved name (starts
>                * with an underscore).
>                */
> -            sprintf (MsgBuffer, "Name is within method [%4.4s]",
> -                Next->Name.Ascii);
> +            sprintf (MsgBuffer, "Name [%4.4s] is within a method [%4.4s]",
> +                Node->Name.Ascii, Next->Name.Ascii);
>               AslError (ASL_REMARK, ASL_MSG_NOT_REFERENCED,
>                   LkGetNameOp (Node->Op), MsgBuffer);
>               return (AE_OK);
> diff --git a/src/acpica/source/compiler/aslmap.c b/src/acpica/source/compiler/aslmap.c
> index b664593..fb1456c 100644
> --- a/src/acpica/source/compiler/aslmap.c
> +++ b/src/acpica/source/compiler/aslmap.c
> @@ -310,6 +310,7 @@ const ASL_MAPPING_ENTRY     AslKeywordMapping [] =
>   /* GPIOINT */                   OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
>   /* GPIOIO */                    OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
>   /* I2CSERIALBUS */              OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
> +/* I2CSERIALBUSV2 */            OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
>   /* IF */                        OP_TABLE_ENTRY (AML_IF_OP,                  0,                              NODE_AML_PACKAGE,   0),
>   /* INCLUDE */                   OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
>   /* INCLUDE_END */               OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
> @@ -467,6 +468,7 @@ const ASL_MAPPING_ENTRY     AslKeywordMapping [] =
>   /* SLAVEMODE_DEVICEINIT */      OP_TABLE_ENTRY (AML_BYTE_OP,                1,                              0,                  0),
>   /* SLEEP */                     OP_TABLE_ENTRY (AML_SLEEP_OP,               0,                              0,                  0),
>   /* SPISERIALBUS */              OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
> +/* SPISERIALBUSV2 */            OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
>   /* STALL */                     OP_TABLE_ENTRY (AML_STALL_OP,               0,                              0,                  0),
>   /* STARTDEPENDENTFN */          OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
>   /* STARTDEPENDENTFN_NOPRI */    OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
> @@ -492,6 +494,7 @@ const ASL_MAPPING_ENTRY     AslKeywordMapping [] =
>   /* TYPE_STATIC */               OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
>   /* TYPE_TRANSLATION */          OP_TABLE_ENTRY (AML_BYTE_OP,                1,                              0,                  0),
>   /* UART_SERIALBUS */            OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
> +/* UART_SERIALBUSV2 */          OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
>   /* UNICODE */                   OP_TABLE_ENTRY (AML_BUFFER_OP,              0,                              NODE_AML_PACKAGE,   0),
>   /* UNLOAD */                    OP_TABLE_ENTRY (AML_UNLOAD_OP,              0,                              0,                  0),
>   /* UPDATERULE_ONES */           OP_TABLE_ENTRY (AML_BYTE_OP,                AML_FIELD_UPDATE_WRITE_AS_ONES, 0,                  0),
> diff --git a/src/acpica/source/compiler/aslmethod.c b/src/acpica/source/compiler/aslmethod.c
> index 6dce884..c8b4fec 100644
> --- a/src/acpica/source/compiler/aslmethod.c
> +++ b/src/acpica/source/compiler/aslmethod.c
> @@ -478,10 +478,8 @@ MtMethodAnalysisWalkBegin (
>   
>       case PARSEOP_DEVICE:
>   
> -        Next = Op->Asl.Child;
> -
> -        if (!ApFindNameInScope (METHOD_NAME__HID, Next) &&
> -            !ApFindNameInScope (METHOD_NAME__ADR, Next))
> +        if (!ApFindNameInDeviceTree (METHOD_NAME__HID, Op) &&
> +            !ApFindNameInDeviceTree (METHOD_NAME__ADR, Op))
>           {
>               AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
>                   "Device object requires a _HID or _ADR in same scope");
> diff --git a/src/acpica/source/compiler/aslparser.y b/src/acpica/source/compiler/aslparser.y
> index 1bbacd4..1d6210b 100644
> --- a/src/acpica/source/compiler/aslparser.y
> +++ b/src/acpica/source/compiler/aslparser.y
> @@ -130,7 +130,7 @@
>    * each list element and possibly overflow on very large lists (>4000 items).
>    * This dramatically reduces use of the parse stack overall.
>    *
> - *      ArgList, TermList, Objectlist, ByteList, DWordList, PackageList,
> + *      ArgList, TermList, ByteList, DWordList, PackageList,
>    *      ResourceMacroList, and FieldUnitList
>    */
>   
> @@ -171,7 +171,7 @@ AslLocalAllocate (
>    * These shift/reduce conflicts are expected. There should be zero
>    * reduce/reduce conflicts.
>    */
> -%expect 89
> +%expect 101
>   
>   /*! [Begin] no source code translation */
>   
> diff --git a/src/acpica/source/compiler/aslpredef.c b/src/acpica/source/compiler/aslpredef.c
> index 3c99771..36c2c22 100644
> --- a/src/acpica/source/compiler/aslpredef.c
> +++ b/src/acpica/source/compiler/aslpredef.c
> @@ -526,8 +526,8 @@ ApCheckForPredefinedName (
>   
>       if (Name[0] == 0)
>       {
> -        AcpiOsPrintf ("Found a null name, external = %s\n",
> -            Op->Asl.ExternalName);
> +        AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, Op,
> +            "zero length name found");
>       }
>   
>       /* All reserved names are prefixed with a single underscore */
> diff --git a/src/acpica/source/compiler/aslprepkg.c b/src/acpica/source/compiler/aslprepkg.c
> index 58fddd1..2fc71aa 100644
> --- a/src/acpica/source/compiler/aslprepkg.c
> +++ b/src/acpica/source/compiler/aslprepkg.c
> @@ -124,7 +124,7 @@
>   
>   /* Local prototypes */
>   
> -static void
> +static ACPI_PARSE_OBJECT *
>   ApCheckPackageElements (
>       const char                  *PredefinedName,
>       ACPI_PARSE_OBJECT           *Op,
> @@ -160,6 +160,11 @@ ApPackageTooLarge (
>       UINT32                      Count,
>       UINT32                      ExpectedCount);
>   
> +static void
> +ApCustomPackage (
> +    ACPI_PARSE_OBJECT           *ParentOp,
> +    const ACPI_PREDEFINED_INFO  *Predefined);
> +
>   
>   /*******************************************************************************
>    *
> @@ -240,6 +245,11 @@ ApCheckPackage (
>   
>       switch (Package->RetInfo.Type)
>       {
> +    case ACPI_PTYPE_CUSTOM:
> +
> +        ApCustomPackage (ParentOp, Predefined);
> +        break;
> +
>       case ACPI_PTYPE1_FIXED:
>           /*
>            * The package count is fixed and there are no subpackages
> @@ -454,6 +464,86 @@ PackageTooSmall:
>   
>   /*******************************************************************************
>    *
> + * FUNCTION:    ApCustomPackage
> + *
> + * PARAMETERS:  ParentOp            - Parse op for the package
> + *              Predefined          - Pointer to package-specific info for
> + *                                    the method
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Validate packages that don't fit into the standard model and
> + *              require custom code.
> + *
> + * NOTE: Currently used for the _BIX method only. When needed for two or more
> + * methods, probably a detect/dispatch mechanism will be required.
> + *
> + ******************************************************************************/
> +
> +static void
> +ApCustomPackage (
> +    ACPI_PARSE_OBJECT           *ParentOp,
> +    const ACPI_PREDEFINED_INFO  *Predefined)
> +{
> +    ACPI_PARSE_OBJECT           *Op;
> +    UINT32                      Count;
> +    UINT32                      ExpectedCount;
> +    UINT32                      Version;
> +
> +
> +    /* First child is the package length */
> +
> +    Op = ParentOp->Asl.Child;
> +    Count = (UINT32) Op->Asl.Value.Integer;
> +
> +    /* Get the version number, must be Integer */
> +
> +    Op = Op->Asl.Next;
> +    Version = (UINT32) Op->Asl.Value.Integer;
> +    if (Op->Asl.ParseOpcode != PARSEOP_INTEGER)
> +    {
> +        AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, MsgBuffer);
> +        return;
> +    }
> +
> +    /* Validate count (# of elements) */
> +
> +    ExpectedCount = 21;         /* Version 1 */
> +    if (Version == 0)
> +    {
> +        ExpectedCount = 20;     /* Version 0 */
> +    }
> +
> +    if (Count < ExpectedCount)
> +    {
> +        ApPackageTooSmall (Predefined->Info.Name, ParentOp,
> +            Count, ExpectedCount);
> +        return;
> +    }
> +    else if (Count > ExpectedCount)
> +    {
> +        ApPackageTooLarge (Predefined->Info.Name, ParentOp,
> +            Count, ExpectedCount);
> +    }
> +
> +    /* Validate all elements of the package */
> +
> +    Op = ApCheckPackageElements (Predefined->Info.Name, Op,
> +        ACPI_RTYPE_INTEGER, 16,
> +        ACPI_RTYPE_STRING, 4);
> +
> +    /* Version 1 has a single trailing integer */
> +
> +    if (Version > 0)
> +    {
> +        ApCheckPackageElements (Predefined->Info.Name, Op,
> +            ACPI_RTYPE_INTEGER, 1, 0, 0);
> +    }
> +}
> +
> +
> +/*******************************************************************************
> + *
>    * FUNCTION:    ApCheckPackageElements
>    *
>    * PARAMETERS:  PredefinedName      - Name of the predefined object
> @@ -463,7 +553,9 @@ PackageTooSmall:
>    *              Type2               - Object type for second group
>    *              Count2              - Count for second group
>    *
> - * RETURN:      None
> + * RETURN:      Next Op peer in the parse tree, after all specified elements
> + *              have been validated. Used for multiple validations (calls
> + *              to this function).
>    *
>    * DESCRIPTION: Validate all elements of a package. Works with packages that
>    *              are defined to contain up to two groups of different object
> @@ -471,7 +563,7 @@ PackageTooSmall:
>    *
>    ******************************************************************************/
>   
> -static void
> +static ACPI_PARSE_OBJECT *
>   ApCheckPackageElements (
>       const char              *PredefinedName,
>       ACPI_PARSE_OBJECT       *Op,
> @@ -503,6 +595,8 @@ ApCheckPackageElements (
>           ApCheckObjectType (PredefinedName, Op, Type2, (i + Count1));
>           Op = Op->Asl.Next;
>       }
> +
> +    return (Op);
>   }
>   
>   
> diff --git a/src/acpica/source/compiler/aslresource.c b/src/acpica/source/compiler/aslresource.c
> index 8f537ea..89e9c2e 100644
> --- a/src/acpica/source/compiler/aslresource.c
> +++ b/src/acpica/source/compiler/aslresource.c
> @@ -937,16 +937,19 @@ RsDoOneResourceDescriptor (
>           break;
>   
>       case PARSEOP_I2C_SERIALBUS:
> +    case PARSEOP_I2C_SERIALBUS_V2:
>   
>           Rnode = RsDoI2cSerialBusDescriptor (Info);
>           break;
>   
>       case PARSEOP_SPI_SERIALBUS:
> +    case PARSEOP_SPI_SERIALBUS_V2:
>   
>           Rnode = RsDoSpiSerialBusDescriptor (Info);
>           break;
>   
>       case PARSEOP_UART_SERIALBUS:
> +    case PARSEOP_UART_SERIALBUS_V2:
>   
>           Rnode = RsDoUartSerialBusDescriptor (Info);
>           break;
> diff --git a/src/acpica/source/compiler/aslresources.y b/src/acpica/source/compiler/aslresources.y
> index fb1c220..d3dbe99 100644
> --- a/src/acpica/source/compiler/aslresources.y
> +++ b/src/acpica/source/compiler/aslresources.y
> @@ -464,6 +464,7 @@ ResourceMacroTerm
>       | GpioIntTerm                   {}
>       | GpioIoTerm                    {}
>       | I2cSerialBusTerm              {}
> +    | I2cSerialBusTermV2            {}
>       | InterruptTerm                 {}
>       | IOTerm                        {}
>       | IRQNoFlagsTerm                {}
> @@ -476,9 +477,11 @@ ResourceMacroTerm
>       | QWordSpaceTerm                {}
>       | RegisterTerm                  {}
>       | SpiSerialBusTerm              {}
> +    | SpiSerialBusTermV2            {}
>       | StartDependentFnNoPriTerm     {}
>       | StartDependentFnTerm          {}
>       | UartSerialBusTerm             {}
> +    | UartSerialBusTermV2           {}
>       | VendorLongTerm                {}
>       | VendorShortTerm               {}
>       | WordBusNumberTerm             {}
> @@ -702,11 +705,30 @@ I2cSerialBusTerm
>           OptionalResourceType        /* 12: ResourceType */
>           OptionalNameString          /* 13: DescriptorName */
>           OptionalBuffer_Last         /* 14: VendorData */
> -        ')'                         {$$ = TrLinkChildren ($<n>3,9,$4,$5,$7,$8,$10,$11,$12,$13,$14);}
> +        ')'                         {$$ = TrLinkChildren ($<n>3,10,$4,$5,$7,$8,$10,$11,$12,$13,
> +                                        TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$14);}
>       | PARSEOP_I2C_SERIALBUS '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
>   
> +I2cSerialBusTermV2
> +    : PARSEOP_I2C_SERIALBUS_V2 '('  {$<n>$ = TrCreateLeafNode (PARSEOP_I2C_SERIALBUS_V2);}
> +        WordConstExpr               /* 04: SlaveAddress */
> +        OptionalSlaveMode           /* 05: SlaveMode */
> +        ',' DWordConstExpr          /* 07: ConnectionSpeed */
> +        OptionalAddressingMode      /* 08: AddressingMode */
> +        ',' StringData              /* 10: ResourceSource */
> +        OptionalByteConstExpr       /* 11: ResourceSourceIndex */
> +        OptionalResourceType        /* 12: ResourceType */
> +        OptionalNameString          /* 13: DescriptorName */
> +        OptionalShareType           /* 14: Share */
> +        OptionalBuffer_Last         /* 15: VendorData */
> +        ')'                         {$$ = TrLinkChildren ($<n>3,10,$4,$5,$7,$8,$10,$11,$12,$13,
> +                                        $14,$15);}
> +    | PARSEOP_I2C_SERIALBUS_V2 '('
> +        error ')'                   {$$ = AslDoError(); yyclearin;}
> +    ;
> +
>   InterruptTerm
>       : PARSEOP_INTERRUPT '('         {$<n>$ = TrCreateLeafNode (PARSEOP_INTERRUPT);}
>           OptionalResourceType_First
> @@ -887,11 +909,34 @@ SpiSerialBusTerm
>           OptionalResourceType        /* 19: ResourceType */
>           OptionalNameString          /* 20: DescriptorName */
>           OptionalBuffer_Last         /* 21: VendorData */
> -        ')'                         {$$ = TrLinkChildren ($<n>3,13,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,$21);}
> +        ')'                         {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
> +                                        TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);}
>       | PARSEOP_SPI_SERIALBUS '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
>   
> +SpiSerialBusTermV2
> +    : PARSEOP_SPI_SERIALBUS_V2 '('  {$<n>$ = TrCreateLeafNode (PARSEOP_SPI_SERIALBUS_V2);}
> +        WordConstExpr               /* 04: DeviceSelection */
> +        OptionalDevicePolarity      /* 05: DevicePolarity */
> +        OptionalWireMode            /* 06: WireMode */
> +        ',' ByteConstExpr           /* 08: DataBitLength */
> +        OptionalSlaveMode           /* 09: SlaveMode */
> +        ',' DWordConstExpr          /* 11: ConnectionSpeed */
> +        ',' ClockPolarityKeyword    /* 13: ClockPolarity */
> +        ',' ClockPhaseKeyword       /* 15: ClockPhase */
> +        ',' StringData              /* 17: ResourceSource */
> +        OptionalByteConstExpr       /* 18: ResourceSourceIndex */
> +        OptionalResourceType        /* 19: ResourceType */
> +        OptionalNameString          /* 20: DescriptorName */
> +        OptionalShareType           /* 21: Share */
> +        OptionalBuffer_Last         /* 22: VendorData */
> +        ')'                         {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
> +                                        $21,$22);}
> +    | PARSEOP_SPI_SERIALBUS_V2 '('
> +        error ')'                   {$$ = AslDoError(); yyclearin;}
> +    ;
> +
>   StartDependentFnNoPriTerm
>       : PARSEOP_STARTDEPENDENTFN_NOPRI '('    {$<n>$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN_NOPRI);}
>           ')' '{'
> @@ -926,11 +971,35 @@ UartSerialBusTerm
>           OptionalResourceType        /* 19: ResourceType */
>           OptionalNameString          /* 20: DescriptorName */
>           OptionalBuffer_Last         /* 21: VendorData */
> -        ')'                         {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,$21);}
> +        ')'                         {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
> +                                        TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);}
>       | PARSEOP_UART_SERIALBUS '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
>   
> +UartSerialBusTermV2
> +    : PARSEOP_UART_SERIALBUS_V2 '(' {$<n>$ = TrCreateLeafNode (PARSEOP_UART_SERIALBUS_V2);}
> +        DWordConstExpr              /* 04: ConnectionSpeed */
> +        OptionalBitsPerByte         /* 05: BitsPerByte */
> +        OptionalStopBits            /* 06: StopBits */
> +        ',' ByteConstExpr           /* 08: LinesInUse */
> +        OptionalEndian              /* 09: Endianess */
> +        OptionalParityType          /* 10: Parity */
> +        OptionalFlowControl         /* 11: FlowControl */
> +        ',' WordConstExpr           /* 13: Rx BufferSize */
> +        ',' WordConstExpr           /* 15: Tx BufferSize */
> +        ',' StringData              /* 17: ResourceSource */
> +        OptionalByteConstExpr       /* 18: ResourceSourceIndex */
> +        OptionalResourceType        /* 19: ResourceType */
> +        OptionalNameString          /* 20: DescriptorName */
> +        OptionalShareType           /* 21: Share */
> +        OptionalBuffer_Last         /* 22: VendorData */
> +        ')'                         {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
> +                                        $21,$22);}
> +    | PARSEOP_UART_SERIALBUS_V2 '('
> +        error ')'                   {$$ = AslDoError(); yyclearin;}
> +    ;
> +
>   VendorLongTerm
>       : PARSEOP_VENDORLONG '('        {$<n>$ = TrCreateLeafNode (PARSEOP_VENDORLONG);}
>           OptionalNameString_First
> diff --git a/src/acpica/source/compiler/aslrestype2s.c b/src/acpica/source/compiler/aslrestype2s.c
> index 64f2cb7..385674b 100644
> --- a/src/acpica/source/compiler/aslrestype2s.c
> +++ b/src/acpica/source/compiler/aslrestype2s.c
> @@ -806,6 +806,11 @@ RsDoI2cSerialBusDescriptor (
>       Descriptor->I2cSerialBus.Type = AML_RESOURCE_I2C_SERIALBUSTYPE;
>       Descriptor->I2cSerialBus.TypeDataLength = AML_RESOURCE_I2C_MIN_DATA_LEN + VendorLength;
>   
> +    if (Info->DescriptorTypeOp->Asl.ParseOpcode == PARSEOP_I2C_SERIALBUS_V2)
> +    {
> +        Descriptor->I2cSerialBus.RevisionId = 2;
> +    }
> +
>       /* Build pointers to optional areas */
>   
>       VendorData = ACPI_ADD_PTR (UINT8, Descriptor, sizeof (AML_RESOURCE_I2C_SERIALBUS));
> @@ -875,7 +880,18 @@ RsDoI2cSerialBusDescriptor (
>               UtAttachNamepathToOwner (Info->DescriptorTypeOp, InitializerOp);
>               break;
>   
> -        case 8: /* Vendor Data (Optional - Buffer of BYTEs) (_VEN) */
> +        case 8:
> +            /*
> +             * Connection Share - Added for V2 (ACPI 6.0) version of the descriptor
> +             * Note: For V1, the share bit will be zero (Op is DEFAULT_ARG from
> +             * the ASL parser)
> +             */
> +            RsSetFlagBits (&Descriptor->I2cSerialBus.Flags, InitializerOp, 2, 0);
> +            RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
> +                CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.Flags), 2);
> +            break;
> +
> +        case 9: /* Vendor Data (Optional - Buffer of BYTEs) (_VEN) */
>   
>               RsGetVendorData (InitializerOp, VendorData,
>                   CurrentByteOffset + sizeof (AML_RESOURCE_I2C_SERIALBUS));
> @@ -949,6 +965,11 @@ RsDoSpiSerialBusDescriptor (
>       Descriptor->SpiSerialBus.Type = AML_RESOURCE_SPI_SERIALBUSTYPE;
>       Descriptor->SpiSerialBus.TypeDataLength = AML_RESOURCE_SPI_MIN_DATA_LEN + VendorLength;
>   
> +    if (Info->DescriptorTypeOp->Asl.ParseOpcode == PARSEOP_SPI_SERIALBUS_V2)
> +    {
> +        Descriptor->I2cSerialBus.RevisionId = 2;
> +    }
> +
>       /* Build pointers to optional areas */
>   
>       VendorData = ACPI_ADD_PTR (UINT8, Descriptor,
> @@ -1047,7 +1068,18 @@ RsDoSpiSerialBusDescriptor (
>               UtAttachNamepathToOwner (Info->DescriptorTypeOp, InitializerOp);
>               break;
>   
> -        case 12: /* Vendor Data (Optional - Buffer of BYTEs) (_VEN) */
> +        case 12:
> +            /*
> +             * Connection Share - Added for V2 (ACPI 6.0) version of the descriptor
> +             * Note: For V1, the share bit will be zero (Op is DEFAULT_ARG from
> +             * the ASL parser)
> +             */
> +            RsSetFlagBits (&Descriptor->SpiSerialBus.Flags, InitializerOp, 2, 0);
> +            RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
> +                CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.Flags), 2);
> +            break;
> +
> +        case 13: /* Vendor Data (Optional - Buffer of BYTEs) (_VEN) */
>   
>               RsGetVendorData (InitializerOp, VendorData,
>                   CurrentByteOffset + sizeof (AML_RESOURCE_SPI_SERIALBUS));
> @@ -1121,6 +1153,11 @@ RsDoUartSerialBusDescriptor (
>       Descriptor->UartSerialBus.Type = AML_RESOURCE_UART_SERIALBUSTYPE;
>       Descriptor->UartSerialBus.TypeDataLength = AML_RESOURCE_UART_MIN_DATA_LEN + VendorLength;
>   
> +    if (Info->DescriptorTypeOp->Asl.ParseOpcode == PARSEOP_UART_SERIALBUS_V2)
> +    {
> +        Descriptor->I2cSerialBus.RevisionId = 2;
> +    }
> +
>       /* Build pointers to optional areas */
>   
>       VendorData = ACPI_ADD_PTR (UINT8, Descriptor, sizeof (AML_RESOURCE_UART_SERIALBUS));
> @@ -1235,7 +1272,18 @@ RsDoUartSerialBusDescriptor (
>               UtAttachNamepathToOwner (Info->DescriptorTypeOp, InitializerOp);
>               break;
>   
> -        case 13: /* Vendor Data (Optional - Buffer of BYTEs) (_VEN) */
> +        case 13:
> +            /*
> +             * Connection Share - Added for V2 (ACPI 6.0) version of the descriptor
> +             * Note: For V1, the share bit will be zero (Op is DEFAULT_ARG from
> +             * the ASL parser)
> +             */
> +            RsSetFlagBits (&Descriptor->UartSerialBus.Flags, InitializerOp, 2, 0);
> +            RsCreateBitField (InitializerOp, ACPI_RESTAG_INTERRUPTSHARE,
> +                CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.Flags), 2);
> +            break;
> +
> +        case 14: /* Vendor Data (Optional - Buffer of BYTEs) (_VEN) */
>   
>               RsGetVendorData (InitializerOp, VendorData,
>                   CurrentByteOffset + sizeof (AML_RESOURCE_UART_SERIALBUS));
> diff --git a/src/acpica/source/compiler/aslrules.y b/src/acpica/source/compiler/aslrules.y
> index d360573..c4b0fc2 100644
> --- a/src/acpica/source/compiler/aslrules.y
> +++ b/src/acpica/source/compiler/aslrules.y
> @@ -146,6 +146,10 @@ AslCode
>    * {ObjectList} portion of the DefinitionBlockTerm in ACPI 2.0 to the
>    * original use of {TermList} instead (see below.) This allows the use
>    * of Type1 and Type2 opcodes at module level.
> + *
> + * 04/2016: The module-level code is now allowed in the following terms:
> + * DeviceTerm, PowerResTerm, ProcessorTerm, ScopeTerm, ThermalZoneTerm.
> + * The ObjectList term is obsolete and has been removed.
>    */
>   DefinitionBlockTerm
>       : PARSEOP_DEFINITION_BLOCK '('  {$<n>$ = TrCreateLeafNode (PARSEOP_DEFINITION_BLOCK);}
> @@ -261,12 +265,6 @@ FieldUnitEntry
>           AmlPackageLengthTerm        {$$ = TrLinkChildNode ($1,$3);}
>       ;
>   
> -ObjectList
> -    :                               {$$ = NULL;}
> -    | ObjectList Object             {$$ = TrLinkPeerNode ($1,$2);}
> -    | error                         {$$ = AslDoError(); yyclearin;}
> -    ;
> -
>   Object
>       : CompilerDirective             {}
>       | NamedObject                   {}
> @@ -561,6 +559,7 @@ Type1Opcode
>       | BreakPointTerm                {}
>       | ContinueTerm                  {}
>       | FatalTerm                     {}
> +    | ForTerm                       {}
>       | ElseIfTerm                    {}
>       | LoadTerm                      {}
>       | NoOpTerm                      {}
> @@ -769,7 +768,7 @@ BreakPointTerm
>   
>   BufferTerm
>       : PARSEOP_BUFFER '('            {$<n>$ = TrCreateLeafNode (PARSEOP_BUFFER);}
> -        OptionalTermArg
> +        OptionalBufferLength
>           ')' '{'
>               BufferTermData '}'      {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
>       | PARSEOP_BUFFER '('
> @@ -950,7 +949,7 @@ DeviceTerm
>       : PARSEOP_DEVICE '('            {$<n>$ = TrCreateLeafNode (PARSEOP_DEVICE);}
>           NameString
>           ')' '{'
> -            ObjectList '}'          {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
> +            TermList '}'            {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
>       | PARSEOP_DEVICE '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
> @@ -1061,6 +1060,23 @@ FindSetRightBitTerm
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
>   
> +    /* Convert a For() loop to a While() loop */
> +ForTerm
> +    : PARSEOP_FOR '('               {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);}
> +        OptionalTermArg ','         {}
> +        OptionalPredicate ','
> +        OptionalTermArg             {$<n>$ = TrLinkPeerNode ($4,$<n>3);
> +                                        TrSetParent ($9,$<n>3);}                /* New parent is WHILE */
> +        ')' '{' TermList '}'        {$<n>$ = TrLinkChildren ($<n>3,2,$7,$13);}
> +                                    {$<n>$ = TrLinkPeerNode ($13,$9);
> +                                        $$ = $<n>10;}
> +    ;
> +
> +OptionalPredicate
> +    :                               {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER, 1);}
> +    | TermArg                       {$$ = $1;}
> +    ;
> +
>   FprintfTerm
>       : PARSEOP_FPRINTF '('            {$<n>$ = TrCreateLeafNode (PARSEOP_FPRINTF);}
>           TermArg ','
> @@ -1433,7 +1449,7 @@ PowerResTerm
>           ',' ByteConstExpr
>           ',' WordConstExpr
>           ')' '{'
> -            ObjectList '}'          {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$8,$11);}
> +            TermList '}'            {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$8,$11);}
>       | PARSEOP_POWERRESOURCE '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
> @@ -1461,7 +1477,7 @@ ProcessorTerm
>           OptionalDWordConstExpr
>           OptionalByteConstExpr
>           ')' '{'
> -            ObjectList '}'          {$$ = TrLinkChildren ($<n>3,5,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$7,$8,$11);}
> +            TermList '}'            {$$ = TrLinkChildren ($<n>3,5,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$7,$8,$11);}
>       | PARSEOP_PROCESSOR '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
> @@ -1516,7 +1532,7 @@ ScopeTerm
>       : PARSEOP_SCOPE '('             {$<n>$ = TrCreateLeafNode (PARSEOP_SCOPE);}
>           NameString
>           ')' '{'
> -            ObjectList '}'          {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
> +            TermList '}'            {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
>       | PARSEOP_SCOPE '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
> @@ -1605,7 +1621,7 @@ ThermalZoneTerm
>       : PARSEOP_THERMALZONE '('       {$<n>$ = TrCreateLeafNode (PARSEOP_THERMALZONE);}
>           NameString
>           ')' '{'
> -            ObjectList '}'          {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
> +            TermList '}'            {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
>       | PARSEOP_THERMALZONE '('
>           error ')'                   {$$ = AslDoError(); yyclearin;}
>       ;
> @@ -1787,6 +1803,11 @@ OptionalSerializeRuleKeyword
>       ;
>   
>   OptionalTermArg
> +    :                               {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
> +    | TermArg                       {$$ = $1;}
> +    ;
> +
> +OptionalBufferLength
>       :                               {$$ = NULL;}
>       | TermArg                       {$$ = $1;}
>       ;
> diff --git a/src/acpica/source/compiler/asltokens.y b/src/acpica/source/compiler/asltokens.y
> index a5de900..993d0f1 100644
> --- a/src/acpica/source/compiler/asltokens.y
> +++ b/src/acpica/source/compiler/asltokens.y
> @@ -238,6 +238,7 @@ NoEcho('
>   %token <i> PARSEOP_GPIO_INT
>   %token <i> PARSEOP_GPIO_IO
>   %token <i> PARSEOP_I2C_SERIALBUS
> +%token <i> PARSEOP_I2C_SERIALBUS_V2
>   %token <i> PARSEOP_IF
>   %token <i> PARSEOP_INCLUDE
>   %token <i> PARSEOP_INCLUDE_END
> @@ -395,6 +396,7 @@ NoEcho('
>   %token <i> PARSEOP_SLAVEMODE_DEVICEINIT
>   %token <i> PARSEOP_SLEEP
>   %token <i> PARSEOP_SPI_SERIALBUS
> +%token <i> PARSEOP_SPI_SERIALBUS_V2
>   %token <i> PARSEOP_STALL
>   %token <i> PARSEOP_STARTDEPENDENTFN
>   %token <i> PARSEOP_STARTDEPENDENTFN_NOPRI
> @@ -420,6 +422,7 @@ NoEcho('
>   %token <i> PARSEOP_TYPE_STATIC
>   %token <i> PARSEOP_TYPE_TRANSLATION
>   %token <i> PARSEOP_UART_SERIALBUS
> +%token <i> PARSEOP_UART_SERIALBUS_V2
>   %token <i> PARSEOP_UNICODE
>   %token <i> PARSEOP_UNLOAD
>   %token <i> PARSEOP_UPDATERULE_ONES
> @@ -529,8 +532,11 @@ NoEcho('
>   %left <i>  PARSEOP_EXP_INDEX_LEFT
>   %right <i> PARSEOP_EXP_INDEX_RIGHT
>   
> +/* Macros */
> +
>   %token <i> PARSEOP_PRINTF
>   %token <i> PARSEOP_FPRINTF
> +%token <i> PARSEOP_FOR
>   
>   /* Specific parentheses tokens are not used at this time */
>              /* PARSEOP_EXP_PAREN_OPEN */
> diff --git a/src/acpica/source/compiler/asltree.c b/src/acpica/source/compiler/asltree.c
> index a898584..0d29fb2 100644
> --- a/src/acpica/source/compiler/asltree.c
> +++ b/src/acpica/source/compiler/asltree.c
> @@ -130,6 +130,29 @@ TrGetNextNode (
>   
>   /*******************************************************************************
>    *
> + * FUNCTION:    TrSetParent
> + *
> + * PARAMETERS:  Op                  - To be set to new parent
> + *              ParentOp            - The parent
> + *
> + * RETURN:      None, sets Op parent directly
> + *
> + * DESCRIPTION: Change the parent of a parse op.
> + *
> + ******************************************************************************/
> +
> +void
> +TrSetParent (
> +    ACPI_PARSE_OBJECT       *Op,
> +    ACPI_PARSE_OBJECT       *ParentOp)
> +{
> +
> +    Op->Asl.Parent = ParentOp;
> +}
> +
> +
> +/*******************************************************************************
> + *
>    * FUNCTION:    TrGetNextNode
>    *
>    * PARAMETERS:  None
> diff --git a/src/acpica/source/compiler/asltypes.y b/src/acpica/source/compiler/asltypes.y
> index 58b159e..118ad57 100644
> --- a/src/acpica/source/compiler/asltypes.y
> +++ b/src/acpica/source/compiler/asltypes.y
> @@ -134,7 +134,6 @@ NoEcho('
>   %type <n> NamedObject
>   %type <n> NameSpaceModifier
>   %type <n> Object
> -%type <n> ObjectList
>   %type <n> PackageData
>   %type <n> ParameterTypePackage
>   %type <n> ParameterTypePackageList
> @@ -367,6 +366,7 @@ NoEcho('
>   %type <n> PrintfArgList
>   %type <n> PrintfTerm
>   %type <n> FprintfTerm
> +%type <n> ForTerm
>   
>   /* Resource Descriptors */
>   
> @@ -384,6 +384,7 @@ NoEcho('
>   %type <n> GpioIntTerm
>   %type <n> GpioIoTerm
>   %type <n> I2cSerialBusTerm
> +%type <n> I2cSerialBusTermV2
>   %type <n> InterruptTerm
>   %type <n> IOTerm
>   %type <n> IRQNoFlagsTerm
> @@ -398,9 +399,11 @@ NoEcho('
>   %type <n> QWordSpaceTerm
>   %type <n> RegisterTerm
>   %type <n> SpiSerialBusTerm
> +%type <n> SpiSerialBusTermV2
>   %type <n> StartDependentFnNoPriTerm
>   %type <n> StartDependentFnTerm
>   %type <n> UartSerialBusTerm
> +%type <n> UartSerialBusTermV2
>   %type <n> VendorLongTerm
>   %type <n> VendorShortTerm
>   %type <n> WordBusNumberTerm
> @@ -419,6 +422,7 @@ NoEcho('
>   %type <n> OptionalAddressRange
>   %type <n> OptionalBitsPerByte
>   %type <n> OptionalBuffer_Last
> +%type <n> OptionalBufferLength
>   %type <n> OptionalByteConstExpr
>   %type <n> OptionalCount
>   %type <n> OptionalDecodeType
> @@ -438,6 +442,7 @@ NoEcho('
>   %type <n> OptionalParameterTypePackage
>   %type <n> OptionalParameterTypesPackage
>   %type <n> OptionalParityType
> +%type <n> OptionalPredicate
>   %type <n> OptionalQWordConstExpr
>   %type <n> OptionalRangeType
>   %type <n> OptionalReference
> diff --git a/src/acpica/source/compiler/dttable2.c b/src/acpica/source/compiler/dttable2.c
> index bd5e570..74373e3 100644
> --- a/src/acpica/source/compiler/dttable2.c
> +++ b/src/acpica/source/compiler/dttable2.c
> @@ -830,6 +830,11 @@ DtCompilePcct (
>               InfoTable = AcpiDmTableInfoPcct1;
>               break;
>   
> +        case ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2:
> +
> +            InfoTable = AcpiDmTableInfoPcct2;
> +            break;
> +
>           default:
>   
>               DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "PCCT");
> diff --git a/src/acpica/source/compiler/dttemplate.h b/src/acpica/source/compiler/dttemplate.h
> index 71f0041..e420ec4 100644
> --- a/src/acpica/source/compiler/dttemplate.h
> +++ b/src/acpica/source/compiler/dttemplate.h
> @@ -916,28 +916,39 @@ const unsigned char TemplateMtmr[] =
>   
>   const unsigned char TemplatePcct[] =
>   {
> -    0x50,0x43,0x43,0x54,0xAC,0x00,0x00,0x00,  /* 00000000    "PCCT...." */
> -    0x01,0xCF,0x49,0x4E,0x54,0x45,0x4C,0x20,  /* 00000008    "..INTEL " */
> -    0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65,  /* 00000010    "Template" */
> +    0x50,0x43,0x43,0x54,0x06,0x01,0x00,0x00,  /* 00000000    "PCCT...." */
> +    0x01,0xE3,0x49,0x4E,0x54,0x45,0x4C,0x20,  /* 00000008    "..INTEL " */
> +    0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45,  /* 00000010    "TEMPLATE" */
>       0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
> -    0x27,0x06,0x14,0x20,0x01,0x00,0x00,0x00,  /* 00000020    "'.. ...." */
> +    0x18,0x03,0x16,0x20,0x01,0x00,0x00,0x00,  /* 00000020    "... ...." */
>       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000028    "........" */
>       0x00,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000030    ".>......" */
> -    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000038    "........" */
> -    0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000040    "........" */
> -    0x01,0x32,0x00,0x03,0x00,0x00,0x00,0x00,  /* 00000048    ".2......" */
> -    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000050    "........" */
> -    0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,  /* 00000058    "........" */
> -    0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x00,0x00,  /* 00000060    "........" */
> -    0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x3E,  /* 00000068    ".......>" */
> -    0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 00000070    "........" */
> -    0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,  /* 00000078    "........" */
> +    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,  /* 00000038    "........" */
> +    0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,  /* 00000040    """""""""" */
> +    0x01,0x32,0x00,0x03,0x33,0x33,0x33,0x33,  /* 00000048    ".2..3333" */
> +    0x33,0x33,0x33,0x33,0x44,0x44,0x44,0x44,  /* 00000050    "3333DDDD" */
> +    0x44,0x44,0x44,0x44,0x55,0x55,0x55,0x55,  /* 00000058    "DDDDUUUU" */
> +    0x55,0x55,0x55,0x55,0x66,0x66,0x66,0x66,  /* 00000060    "UUUUffff" */
> +    0x77,0x77,0x77,0x77,0x88,0x88,0x01,0x3E,  /* 00000068    "wwww...>" */
> +    0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 00000070    "........" */
> +    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000078    "........" */
>       0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x32,  /* 00000080    ".......2" */
> -    0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000088    "........" */
> -    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000090    "........" */
> -    0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,  /* 00000098    "........" */
> -    0xFF,0xFF,0x01,0x00,0x00,0x00,0x01,0x00,  /* 000000A0    "........" */
> -    0x00,0x00,0x01,0x00                       /* 000000A8    "...."     */
> +    0x00,0x03,0x44,0x44,0x44,0x44,0x44,0x44,  /* 00000088    "..DDDDDD" */
> +    0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,  /* 00000090    "DDDDDDDD" */
> +    0x44,0x44,0x55,0x55,0x55,0x55,0x55,0x55,  /* 00000098    "DDUUUUUU" */
> +    0x55,0x55,0x66,0x66,0x66,0x66,0x77,0x77,  /* 000000A0    "UUffffww" */
> +    0x77,0x77,0x88,0x88,0x02,0x5A,0x01,0x00,  /* 000000A8    "ww...Z.." */
> +    0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,  /* 000000B0    "........" */
> +    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000B8    "........" */
> +    0x00,0x00,0x00,0x00,0x01,0x32,0x00,0x03,  /* 000000C0    ".....2.." */
> +    0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,  /* 000000C8    "DDDDDDDD" */
> +    0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,  /* 000000D0    "DDDDDDDD" */
> +    0x55,0x55,0x55,0x55,0x55,0x55,0x55,0x55,  /* 000000D8    "UUUUUUUU" */
> +    0x66,0x66,0x66,0x66,0x77,0x77,0x77,0x77,  /* 000000E0    "ffffwwww" */
> +    0x88,0x88,0x01,0x32,0x00,0x03,0x33,0x33,  /* 000000E8    "...2..33" */
> +    0x33,0x33,0x33,0x33,0x33,0x33,0x44,0x44,  /* 000000F0    "333333DD" */
> +    0x44,0x44,0x44,0x44,0x44,0x44,0x55,0x55,  /* 000000F8    "DDDDDDUU" */
> +    0x55,0x55,0x55,0x55,0x55,0x55             /* 00000100    "UUUUUU"   */
>   };
>   
>   const unsigned char TemplatePmtt[] =
> diff --git a/src/acpica/source/components/debugger/dbnames.c b/src/acpica/source/components/debugger/dbnames.c
> index 75fbfc5..a25f9be 100644
> --- a/src/acpica/source/components/debugger/dbnames.c
> +++ b/src/acpica/source/components/debugger/dbnames.c
> @@ -870,7 +870,7 @@ AcpiDbIntegrityWalk (
>           return (AE_OK);
>       }
>   
> -    if (!AcpiUtValidAcpiName (Node->Name.Ascii))
> +    if (!AcpiUtValidNameseg (Node->Name.Ascii))
>       {
>           AcpiOsPrintf ("Invalid AcpiName for Node %p\n", Node);
>           return (AE_OK);
> diff --git a/src/acpica/source/components/disassembler/dmcstyle.c b/src/acpica/source/components/disassembler/dmcstyle.c
> index 29c0dd6..7ff388f 100644
> --- a/src/acpica/source/components/disassembler/dmcstyle.c
> +++ b/src/acpica/source/components/disassembler/dmcstyle.c
> @@ -287,6 +287,7 @@ AcpiDmCheckForSymbolicOpcode (
>   
>           Child1->Common.DisasmOpcode = ACPI_DASM_LNOT_SUFFIX;
>           Op->Common.DisasmOpcode = ACPI_DASM_LNOT_PREFIX;
> +        Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND_ASSIGNMENT;
>   
>           /* Save symbol string in the next child (not peer) */
>   
> @@ -450,7 +451,7 @@ AcpiDmCheckForSymbolicOpcode (
>   
>                   /* Convert operator to compound assignment */
>   
> -                Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND;
> +                Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND_ASSIGNMENT;
>                   Child1->Common.OperatorSymbol = NULL;
>                   return (TRUE);
>               }
> @@ -478,7 +479,7 @@ AcpiDmCheckForSymbolicOpcode (
>   
>                   /* Convert operator to compound assignment */
>   
> -                Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND;
> +                Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND_ASSIGNMENT;
>                   Child1->Common.OperatorSymbol = NULL;
>                   return (TRUE);
>               }
> @@ -594,6 +595,19 @@ AcpiDmCheckForSymbolicOpcode (
>           break;
>       }
>   
> +    /*
> +     * Nodes marked with ACPI_PARSEOP_PARAMLIST don't need a parens
> +     * output here. We also need to check the parent to see if this op
> +     * is part of a compound test (!=, >=, <=).
> +     */
> +    if ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) ||
> +       ((Op->Common.Parent->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) &&
> +        (Op->Common.DisasmOpcode == ACPI_DASM_LNOT_SUFFIX)))
> +    {
> +        /* Do Nothing. Paren already generated */
> +        return (TRUE);
> +    }
> +
>       /* All other operators, emit an open paren */
>   
>       AcpiOsPrintf ("(");
> @@ -619,6 +633,7 @@ void
>   AcpiDmCloseOperator (
>       ACPI_PARSE_OBJECT       *Op)
>   {
> +    BOOLEAN                 IsCStyleOp = FALSE;
>   
>       /* Always emit paren if ASL+ disassembly disabled */
>   
> @@ -650,7 +665,7 @@ AcpiDmCloseOperator (
>   
>           /* Emit paren only if this is not a compound assignment */
>   
> -        if (Op->Common.DisasmFlags & ACPI_PARSEOP_COMPOUND)
> +        if (Op->Common.DisasmFlags & ACPI_PARSEOP_COMPOUND_ASSIGNMENT)
>           {
>               return;
>           }
> @@ -661,6 +676,8 @@ AcpiDmCloseOperator (
>           {
>               AcpiOsPrintf (")");
>           }
> +
> +        IsCStyleOp = TRUE;
>           break;
>   
>       case AML_INDEX_OP:
> @@ -688,7 +705,21 @@ AcpiDmCloseOperator (
>           break;
>       }
>   
> +    /*
> +     * Nodes marked with ACPI_PARSEOP_PARAMLIST don't need a parens
> +     * output here. We also need to check the parent to see if this op
> +     * is part of a compound test (!=, >=, <=).
> +     */
> +    if (IsCStyleOp &&
> +       ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) ||
> +       ((Op->Common.Parent->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) &&
> +        (Op->Common.DisasmOpcode == ACPI_DASM_LNOT_SUFFIX))))
> +    {
> +        return;
> +    }
> +
>       AcpiOsPrintf (")");
> +    return;
>   }
>   
>   
> diff --git a/src/acpica/source/components/disassembler/dmopcode.c b/src/acpica/source/components/disassembler/dmopcode.c
> index 16c0e5b..f0204de 100644
> --- a/src/acpica/source/components/disassembler/dmopcode.c
> +++ b/src/acpica/source/components/disassembler/dmopcode.c
> @@ -321,11 +321,11 @@ AcpiDmPredefinedDescription (
>   
>       /* Ensure that the comment field is emitted only once */
>   
> -    if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEF_CHECKED)
> +    if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEFINED_CHECKED)
>       {
>           return;
>       }
> -    Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEF_CHECKED;
> +    Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEFINED_CHECKED;
>   
>       /* Predefined name must start with an underscore */
>   
> @@ -457,11 +457,11 @@ AcpiDmFieldPredefinedDescription (
>   
>       /* Ensure that the comment field is emitted only once */
>   
> -    if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEF_CHECKED)
> +    if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEFINED_CHECKED)
>       {
>           return;
>       }
> -    Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEF_CHECKED;
> +    Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEFINED_CHECKED;
>   
>       /*
>        * Op must be one of the Create* operators: CreateField, CreateBitField,
> @@ -1123,10 +1123,16 @@ AcpiDmConvertToElseIf (
>       ACPI_PARSE_OBJECT       *ElseOp;
>   
>   
> -    /* Examine the first child of the Else */
> -
> +    /*
> +     * To be able to perform the conversion, two conditions must be satisfied:
> +     * 1) The first child of the Else must be an If statement.
> +     * 2) The If block can only be followed by an Else block and these must
> +     *    be the only blocks under the original Else.
> +     */
>       IfOp = OriginalElseOp->Common.Value.Arg;
> -    if (!IfOp || (IfOp->Common.AmlOpcode != AML_IF_OP))
> +    if (!IfOp ||
> +        (IfOp->Common.AmlOpcode != AML_IF_OP) ||
> +        (IfOp->Asl.Next && (IfOp->Asl.Next->Common.AmlOpcode != AML_ELSE_OP)))
>       {
>           /* Not an Else..If sequence, cannot convert to ElseIf */
>   
> diff --git a/src/acpica/source/components/disassembler/dmresrcl2.c b/src/acpica/source/components/disassembler/dmresrcl2.c
> index 87c46cf..54276cd 100644
> --- a/src/acpica/source/components/disassembler/dmresrcl2.c
> +++ b/src/acpica/source/components/disassembler/dmresrcl2.c
> @@ -572,7 +572,7 @@ AcpiDmI2cSerialBusDescriptor (
>       /* SlaveAddress, SlaveMode, ConnectionSpeed, AddressingMode */
>   
>       AcpiDmIndent (Level);
> -    AcpiOsPrintf ("I2cSerialBus (0x%4.4X, %s, 0x%8.8X,\n",
> +    AcpiOsPrintf ("I2cSerialBusV2 (0x%4.4X, %s, 0x%8.8X,\n",
>           Resource->I2cSerialBus.SlaveAddress,
>           AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->I2cSerialBus.Flags)],
>           Resource->I2cSerialBus.ConnectionSpeed);
> @@ -601,7 +601,11 @@ AcpiDmI2cSerialBusDescriptor (
>       /* Insert a descriptor name */
>   
>       AcpiDmDescriptorName ();
> -    AcpiOsPrintf (",\n");
> +
> +    /* Share */
> +
> +    AcpiOsPrintf (", %s,\n",
> +        AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->I2cSerialBus.Flags, 2)]);
>   
>       /* Dump the vendor data */
>   
> @@ -642,7 +646,7 @@ AcpiDmSpiSerialBusDescriptor (
>       /* DeviceSelection, DeviceSelectionPolarity, WireMode, DataBitLength */
>   
>       AcpiDmIndent (Level);
> -    AcpiOsPrintf ("SpiSerialBus (0x%4.4X, %s, %s, 0x%2.2X,\n",
> +    AcpiOsPrintf ("SpiSerialBusV2 (0x%4.4X, %s, %s, 0x%2.2X,\n",
>           Resource->SpiSerialBus.DeviceSelection,
>           AcpiGbl_DpDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags, 1)],
>           AcpiGbl_WmDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags)],
> @@ -680,7 +684,11 @@ AcpiDmSpiSerialBusDescriptor (
>       /* Insert a descriptor name */
>   
>       AcpiDmDescriptorName ();
> -    AcpiOsPrintf (",\n");
> +
> +    /* Share */
> +
> +    AcpiOsPrintf (", %s,\n",
> +        AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.Flags, 2)]);
>   
>       /* Dump the vendor data */
>   
> @@ -721,7 +729,7 @@ AcpiDmUartSerialBusDescriptor (
>       /* ConnectionSpeed, BitsPerByte, StopBits */
>   
>       AcpiDmIndent (Level);
> -    AcpiOsPrintf ("UartSerialBus (0x%8.8X, %s, %s,\n",
> +    AcpiOsPrintf ("UartSerialBusV2 (0x%8.8X, %s, %s,\n",
>           Resource->UartSerialBus.DefaultBaudRate,
>           AcpiGbl_BpbDecode [ACPI_EXTRACT_3BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 4)],
>           AcpiGbl_SbDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 2)]);
> @@ -762,7 +770,11 @@ AcpiDmUartSerialBusDescriptor (
>       /* Insert a descriptor name */
>   
>       AcpiDmDescriptorName ();
> -    AcpiOsPrintf (",\n");
> +
> +    /* Share */
> +
> +    AcpiOsPrintf (", %s,\n",
> +        AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->UartSerialBus.Flags, 2)]);
>   
>       /* Dump the vendor data */
>   
> diff --git a/src/acpica/source/components/disassembler/dmutils.c b/src/acpica/source/components/disassembler/dmutils.c
> index 3af4736..638452f 100644
> --- a/src/acpica/source/components/disassembler/dmutils.c
> +++ b/src/acpica/source/components/disassembler/dmutils.c
> @@ -351,8 +351,8 @@ AcpiDmCommaIfListMember (
>               }
>           }
>   
> -        if ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST) &&
> -            (!(Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)))
> +        if ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) &&
> +            (!(Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST)))
>           {
>               return (FALSE);
>           }
> @@ -367,8 +367,8 @@ AcpiDmCommaIfListMember (
>           return (TRUE);
>       }
>   
> -    else if ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST) &&
> -             (Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST))
> +    else if ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) &&
> +             (Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST))
>       {
>           AcpiOsPrintf (", ");
>           return (TRUE);
> diff --git a/src/acpica/source/components/disassembler/dmwalk.c b/src/acpica/source/components/disassembler/dmwalk.c
> index 11c78f1..7c18065 100644
> --- a/src/acpica/source/components/disassembler/dmwalk.c
> +++ b/src/acpica/source/components/disassembler/dmwalk.c
> @@ -532,24 +532,24 @@ AcpiDmDescendingOp (
>           NextOp = AcpiPsGetDepthNext (NULL, Op);
>           if (NextOp)
>           {
> -            NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
> -        }
> -
> -        /*
> -         * 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;
> +            NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
>   
> -            if (NextOp2 &&
> -                (NextOp2->Common.AmlOpcode == AML_EXTERNAL_OP))
> +            /*
> +             * 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;
>   
> -                Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
> -                return (AE_CTRL_DEPTH);
> +                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);
> +                }
>               }
>           }
>       }
> @@ -586,7 +586,7 @@ AcpiDmDescendingOp (
>           }
>       }
>       else if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) &&
> -         (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
> +         (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST)) &&
>            (!(Op->Common.DisasmFlags & ACPI_PARSEOP_ELSEIF)) &&
>            (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
>       {
> @@ -740,10 +740,10 @@ AcpiDmDescendingOp (
>   
>                   AcpiOsPrintf (", ");
>                   NextOp = AcpiPsGetDepthNext (NULL, Op);
> -                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
> +                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
>   
>                   NextOp = NextOp->Common.Next;
> -                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
> +                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
>                   return (AE_OK);
>   
>               case AML_PROCESSOR_OP:
> @@ -752,13 +752,13 @@ AcpiDmDescendingOp (
>   
>                   AcpiOsPrintf (", ");
>                   NextOp = AcpiPsGetDepthNext (NULL, Op);
> -                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
> +                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
>   
>                   NextOp = NextOp->Common.Next;
> -                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
> +                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
>   
>                   NextOp = NextOp->Common.Next;
> -                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
> +                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
>                   return (AE_OK);
>   
>               case AML_MUTEX_OP:
> @@ -817,12 +817,12 @@ AcpiDmDescendingOp (
>                    * Bank Value. This is a TermArg in the middle of the parameter
>                    * list, must handle it here.
>                    *
> -                 * Disassemble the TermArg parse tree. ACPI_PARSEOP_PARAMLIST
> +                 * Disassemble the TermArg parse tree. ACPI_PARSEOP_PARAMETER_LIST
>                    * eliminates newline in the output.
>                    */
>                   NextOp = NextOp->Common.Next;
>   
> -                Info->Flags = ACPI_PARSEOP_PARAMLIST;
> +                Info->Flags = ACPI_PARSEOP_PARAMETER_LIST;
>                   AcpiDmWalkParseTree (NextOp, AcpiDmDescendingOp,
>                       AcpiDmAscendingOp, Info);
>                   Info->Flags = 0;
> @@ -884,7 +884,7 @@ AcpiDmDescendingOp (
>   
>               /* Normal Buffer, mark size as in the parameter list */
>   
> -            NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
> +            NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
>               return (AE_OK);
>   
>           case AML_IF_OP:
> @@ -896,7 +896,7 @@ AcpiDmDescendingOp (
>               NextOp = AcpiPsGetDepthNext (NULL, Op);
>               if (NextOp)
>               {
> -                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
> +                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
>               }
>               return (AE_OK);
>   
> @@ -907,7 +907,7 @@ AcpiDmDescendingOp (
>               NextOp = AcpiPsGetDepthNext (NULL, Op);
>               if (NextOp)
>               {
> -                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
> +                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
>               }
>               return (AE_OK);
>   
> @@ -1006,14 +1006,14 @@ AcpiDmAscendingOp (
>           if (!AcpiDmCommaIfListMember (Op))
>           {
>               if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) &&
> -                 (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
> +                 (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST)) &&
>                    (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
>               {
>                   /*
>                    * This is a first-level element of a term list
>                    * start a new line
>                    */
> -                if (!(Info->Flags & ACPI_PARSEOP_PARAMLIST))
> +                if (!(Info->Flags & ACPI_PARSEOP_PARAMETER_LIST))
>                   {
>                       AcpiOsPrintf ("\n");
>                   }
> @@ -1068,7 +1068,7 @@ AcpiDmAscendingOp (
>           if (!AcpiDmCommaIfListMember (Op))
>           {
>               if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) &&
> -                 (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
> +                 (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST)) &&
>                    (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
>               {
>                   /*
> @@ -1085,7 +1085,7 @@ AcpiDmAscendingOp (
>               case AML_PACKAGE_OP:
>               case AML_VAR_PACKAGE_OP:
>   
> -                if (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST))
> +                if (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST))
>                   {
>                       AcpiOsPrintf ("\n");
>                   }
> @@ -1099,17 +1099,17 @@ AcpiDmAscendingOp (
>           break;
>       }
>   
> -    if (Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)
> +    if (Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST)
>       {
>           if ((Op->Common.Next) &&
> -            (Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST))
> +            (Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST))
>           {
>               return (AE_OK);
>           }
>   
>           /*
>            * The parent Op is guaranteed to be valid because of the flag
> -         * ACPI_PARSEOP_PARAMLIST -- which means that this op is part of
> +         * ACPI_PARSEOP_PARAMETER_LIST -- which means that this op is part of
>            * a parameter list and thus has a valid parent.
>            */
>           ParentOp = Op->Common.Parent;
> diff --git a/src/acpica/source/components/dispatcher/dsmethod.c b/src/acpica/source/components/dispatcher/dsmethod.c
> index a861838..f2c980e 100644
> --- a/src/acpica/source/components/dispatcher/dsmethod.c
> +++ b/src/acpica/source/components/dispatcher/dsmethod.c
> @@ -532,6 +532,9 @@ AcpiDsBeginMethodExecution (
>               {
>                   ObjDesc->Method.Mutex->Mutex.OriginalSyncLevel =
>                       ObjDesc->Method.Mutex->Mutex.SyncLevel;
> +
> +                ObjDesc->Method.Mutex->Mutex.ThreadId =
> +                    AcpiOsGetThreadId ();
>               }
>           }
>   
> diff --git a/src/acpica/source/components/executer/exfldio.c b/src/acpica/source/components/executer/exfldio.c
> index b7e86fd..578ba48 100644
> --- a/src/acpica/source/components/executer/exfldio.c
> +++ b/src/acpica/source/components/executer/exfldio.c
> @@ -1018,20 +1018,9 @@ AcpiExInsertIntoField (
>   
>       AccessBitWidth = ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth);
>   
> -    /*
> -     * 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);
> -    }
> +    /* Create the bitmasks used for bit insertion */
>   
> +    WidthMask = ACPI_MASK_BITS_ABOVE_64 (AccessBitWidth);
>       Mask = WidthMask &
>           ACPI_MASK_BITS_BELOW (ObjDesc->CommonField.StartFieldBitOffset);
>   
> diff --git a/src/acpica/source/components/executer/exnames.c b/src/acpica/source/components/executer/exnames.c
> index 75b1121..14ac3c8 100644
> --- a/src/acpica/source/components/executer/exnames.c
> +++ b/src/acpica/source/components/executer/exnames.c
> @@ -276,7 +276,7 @@ AcpiExNameSegment (
>       ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Bytes from stream:\n"));
>   
>       for (Index = 0;
> -        (Index < ACPI_NAME_SIZE) && (AcpiUtValidAcpiChar (*AmlAddress, 0));
> +        (Index < ACPI_NAME_SIZE) && (AcpiUtValidNameChar (*AmlAddress, 0));
>           Index++)
>       {
>           CharBuf[Index] = *AmlAddress++;
> diff --git a/src/acpica/source/components/hardware/hwregs.c b/src/acpica/source/components/hardware/hwregs.c
> index e0f3053..9e4c3bf 100644
> --- a/src/acpica/source/components/hardware/hwregs.c
> +++ b/src/acpica/source/components/hardware/hwregs.c
> @@ -126,6 +126,11 @@
>   
>   /* Local Prototypes */
>   
> +static UINT8
> +AcpiHwGetAccessBitWidth (
> +    ACPI_GENERIC_ADDRESS    *Reg,
> +    UINT8                   MaxBitWidth);
> +
>   static ACPI_STATUS
>   AcpiHwReadMultiple (
>       UINT32                  *Value,
> @@ -143,6 +148,43 @@ 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
> @@ -206,8 +248,7 @@ AcpiHwValidateRegister (
>   
>       /* Validate the BitWidth, convert AccessWidth into number of bits */
>   
> -    AccessWidth = Reg->AccessWidth ? Reg->AccessWidth : 1;
> -    AccessWidth = 1 << (AccessWidth + 2);
> +    AccessWidth = AcpiHwGetAccessBitWidth (Reg, MaxBitWidth);
>       BitWidth = ACPI_ROUND_UP (Reg->BitOffset + Reg->BitWidth, AccessWidth);
>       if (MaxBitWidth < BitWidth)
>       {
> @@ -270,9 +311,8 @@ AcpiHwRead (
>        * into number of bits based
>        */
>       *Value = 0;
> -    AccessWidth = Reg->AccessWidth ? Reg->AccessWidth : 1;
> -    AccessWidth = 1 << (AccessWidth + 2);
> -    BitWidth = ACPI_ROUND_UP (Reg->BitOffset + Reg->BitWidth, AccessWidth);
> +    AccessWidth = AcpiHwGetAccessBitWidth (Reg, 32);
> +    BitWidth = Reg->BitOffset + Reg->BitWidth;
>       BitOffset = Reg->BitOffset;
>   
>       /*
> @@ -315,7 +355,7 @@ AcpiHwRead (
>           }
>   
>           ACPI_SET_BITS (Value, Index * AccessWidth,
> -            ((1 << AccessWidth) - 1), Value32);
> +            ACPI_MASK_BITS_ABOVE_32 (AccessWidth), Value32);
>   
>           BitWidth -= BitWidth > AccessWidth ? AccessWidth : BitWidth;
>           Index++;
> @@ -373,9 +413,8 @@ AcpiHwWrite (
>   
>       /* Convert AccessWidth into number of bits based */
>   
> -    AccessWidth = Reg->AccessWidth ? Reg->AccessWidth : 1;
> -    AccessWidth = 1 << (AccessWidth + 2);
> -    BitWidth = ACPI_ROUND_UP (Reg->BitOffset + Reg->BitWidth, AccessWidth);
> +    AccessWidth = AcpiHwGetAccessBitWidth (Reg, 32);
> +    BitWidth = Reg->BitOffset + Reg->BitWidth;
>       BitOffset = Reg->BitOffset;
>   
>       /*
> @@ -385,8 +424,8 @@ AcpiHwWrite (
>       Index = 0;
>       while (BitWidth)
>       {
> -        NewValue32 = ACPI_GET_BITS (&Value, (Index * AccessWidth),
> -            ((1 << AccessWidth) - 1));
> +        NewValue32 = ACPI_GET_BITS (&Value, Index * AccessWidth,
> +            ACPI_MASK_BITS_ABOVE_32 (AccessWidth));
>   
>           if (BitOffset > AccessWidth)
>           {
> diff --git a/src/acpica/source/components/namespace/nsinit.c b/src/acpica/source/components/namespace/nsinit.c
> index fedbcf2..a2afd00 100644
> --- a/src/acpica/source/components/namespace/nsinit.c
> +++ b/src/acpica/source/components/namespace/nsinit.c
> @@ -287,7 +287,7 @@ AcpiNsInitializeDevices (
>   
>           /*
>            * Execute \_SB._INI.
> -	 * There appears to be a strict order requirement for \_SB._INI,
> +         * There appears to be a strict order requirement for \_SB._INI,
>            * which should be evaluated before any _REG evaluations.
>            */
>           Status = AcpiGetHandle (NULL, "\\_SB", &Handle);
> diff --git a/src/acpica/source/components/namespace/nsprepkg.c b/src/acpica/source/components/namespace/nsprepkg.c
> index bb82674..93d8c1c 100644
> --- a/src/acpica/source/components/namespace/nsprepkg.c
> +++ b/src/acpica/source/components/namespace/nsprepkg.c
> @@ -142,6 +142,12 @@ AcpiNsCheckPackageElements (
>       UINT32                      Count2,
>       UINT32                      StartIndex);
>   
> +static ACPI_STATUS
> +AcpiNsCustomPackage (
> +    ACPI_EVALUATE_INFO          *Info,
> +    ACPI_OPERAND_OBJECT         **Elements,
> +    UINT32                      Count);
> +
>   
>   /*******************************************************************************
>    *
> @@ -220,6 +226,11 @@ AcpiNsCheckPackage (
>        */
>       switch (Package->RetInfo.Type)
>       {
> +    case ACPI_PTYPE_CUSTOM:
> +
> +        Status = AcpiNsCustomPackage (Info, Elements, Count);
> +        break;
> +
>       case ACPI_PTYPE1_FIXED:
>           /*
>            * The package count is fixed and there are no subpackages
> @@ -698,6 +709,92 @@ PackageTooSmall:
>   
>   /*******************************************************************************
>    *
> + * FUNCTION:    AcpiNsCustomPackage
> + *
> + * PARAMETERS:  Info                - Method execution information block
> + *              Elements            - Pointer to the package elements array
> + *              Count               - Element count for the package
> + *
> + * RETURN:      Status
> + *
> + * DESCRIPTION: Check a returned package object for the correct count and
> + *              correct type of all sub-objects.
> + *
> + * NOTE: Currently used for the _BIX method only. When needed for two or more
> + * methods, probably a detect/dispatch mechanism will be required.
> + *
> + ******************************************************************************/
> +
> +static ACPI_STATUS
> +AcpiNsCustomPackage (
> +    ACPI_EVALUATE_INFO          *Info,
> +    ACPI_OPERAND_OBJECT         **Elements,
> +    UINT32                      Count)
> +{
> +    UINT32                      ExpectedCount;
> +    UINT32                      Version;
> +    ACPI_STATUS                 Status = AE_OK;
> +
> +
> +    ACPI_FUNCTION_NAME (NsCustomPackage);
> +
> +
> +    /* Get version number, must be Integer */
> +
> +    if ((*Elements)->Common.Type != ACPI_TYPE_INTEGER)
> +    {
> +        ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
> +            "Return Package has invalid object type for version number"));
> +        return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
> +    }
> +
> +    Version = (UINT32) (*Elements)->Integer.Value;
> +    ExpectedCount = 21;         /* Version 1 */
> +
> +    if (Version == 0)
> +    {
> +        ExpectedCount = 20;     /* Version 0 */
> +    }
> +
> +    if (Count < ExpectedCount)
> +    {
> +        ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
> +            "Return Package is too small - found %u elements, expected %u",
> +            Count, ExpectedCount));
> +        return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
> +    }
> +    else if (Count > ExpectedCount)
> +    {
> +        ACPI_DEBUG_PRINT ((ACPI_DB_REPAIR,
> +            "%s: Return Package is larger than needed - "
> +            "found %u, expected %u\n",
> +            Info->FullPathname, Count, ExpectedCount));
> +    }
> +
> +    /* Validate all elements of the returned package */
> +
> +    Status = AcpiNsCheckPackageElements (Info, Elements,
> +        ACPI_RTYPE_INTEGER, 16,
> +        ACPI_RTYPE_STRING, 4, 0);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        return_ACPI_STATUS (Status);
> +    }
> +
> +    /* Version 1 has a single trailing integer */
> +
> +    if (Version > 0)
> +    {
> +        Status = AcpiNsCheckPackageElements (Info, Elements + 20,
> +            ACPI_RTYPE_INTEGER, 1, 0, 0, 20);
> +    }
> +
> +    return_ACPI_STATUS (Status);
> +}
> +
> +
> +/*******************************************************************************
> + *
>    * FUNCTION:    AcpiNsCheckPackageElements
>    *
>    * PARAMETERS:  Info            - Method execution information block
> diff --git a/src/acpica/source/components/namespace/nsxfeval.c b/src/acpica/source/components/namespace/nsxfeval.c
> index 23c4374..7f2fd1f 100644
> --- a/src/acpica/source/components/namespace/nsxfeval.c
> +++ b/src/acpica/source/components/namespace/nsxfeval.c
> @@ -377,13 +377,12 @@ AcpiEvaluateObject (
>       }
>   
>   
> -#if 0
> +#ifdef _FUTURE_FEATURE
>   
>       /*
>        * Begin incoming argument count analysis. Check for too few args
>        * and too many args.
>        */
> -
>       switch (AcpiNsGetType (Info->Node))
>       {
>       case ACPI_TYPE_METHOD:
> @@ -471,69 +470,74 @@ AcpiEvaluateObject (
>        * If we are expecting a return value, and all went well above,
>        * copy the return value to an external object.
>        */
> -    if (ReturnBuffer)
> +    if (!ReturnBuffer)
> +    {
> +        goto CleanupReturnObject;
> +    }
> +
> +    if (!Info->ReturnObject)
> +    {
> +        ReturnBuffer->Length = 0;
> +        goto Cleanup;
> +    }
> +
> +    if (ACPI_GET_DESCRIPTOR_TYPE (Info->ReturnObject) ==
> +        ACPI_DESC_TYPE_NAMED)
>       {
> -        if (!Info->ReturnObject)
> +        /*
> +         * If we received a NS Node as a return object, this means that
> +         * the object we are evaluating has nothing interesting to
> +         * return (such as a mutex, etc.)  We return an error because
> +         * these types are essentially unsupported by this interface.
> +         * We don't check up front because this makes it easier to add
> +         * support for various types at a later date if necessary.
> +         */
> +        Status = AE_TYPE;
> +        Info->ReturnObject = NULL;   /* No need to delete a NS Node */
> +        ReturnBuffer->Length = 0;
> +    }
> +
> +    if (ACPI_FAILURE (Status))
> +    {
> +        goto CleanupReturnObject;
> +    }
> +
> +    /* Dereference Index and RefOf references */
> +
> +    AcpiNsResolveReferences (Info);
> +
> +    /* Get the size of the returned object */
> +
> +    Status = AcpiUtGetObjectSize (Info->ReturnObject,
> +        &BufferSpaceNeeded);
> +    if (ACPI_SUCCESS (Status))
> +    {
> +        /* Validate/Allocate/Clear caller buffer */
> +
> +        Status = AcpiUtInitializeBuffer (ReturnBuffer,
> +            BufferSpaceNeeded);
> +        if (ACPI_FAILURE (Status))
>           {
> -            ReturnBuffer->Length = 0;
> +            /*
> +             * Caller's buffer is too small or a new one can't
> +             * be allocated
> +             */
> +            ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> +                "Needed buffer size %X, %s\n",
> +                (UINT32) BufferSpaceNeeded,
> +                AcpiFormatException (Status)));
>           }
>           else
>           {
> -            if (ACPI_GET_DESCRIPTOR_TYPE (Info->ReturnObject) ==
> -                ACPI_DESC_TYPE_NAMED)
> -            {
> -                /*
> -                 * If we received a NS Node as a return object, this means that
> -                 * the object we are evaluating has nothing interesting to
> -                 * return (such as a mutex, etc.)  We return an error because
> -                 * these types are essentially unsupported by this interface.
> -                 * We don't check up front because this makes it easier to add
> -                 * support for various types at a later date if necessary.
> -                 */
> -                Status = AE_TYPE;
> -                Info->ReturnObject = NULL;   /* No need to delete a NS Node */
> -                ReturnBuffer->Length = 0;
> -            }
> +            /* We have enough space for the object, build it */
>   
> -            if (ACPI_SUCCESS (Status))
> -            {
> -                /* Dereference Index and RefOf references */
> -
> -                AcpiNsResolveReferences (Info);
> -
> -                /* Get the size of the returned object */
> -
> -                Status = AcpiUtGetObjectSize (Info->ReturnObject,
> -                    &BufferSpaceNeeded);
> -                if (ACPI_SUCCESS (Status))
> -                {
> -                    /* Validate/Allocate/Clear caller buffer */
> -
> -                    Status = AcpiUtInitializeBuffer (ReturnBuffer,
> -                        BufferSpaceNeeded);
> -                    if (ACPI_FAILURE (Status))
> -                    {
> -                        /*
> -                         * Caller's buffer is too small or a new one can't
> -                         * be allocated
> -                         */
> -                        ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> -                            "Needed buffer size %X, %s\n",
> -                            (UINT32) BufferSpaceNeeded,
> -                            AcpiFormatException (Status)));
> -                    }
> -                    else
> -                    {
> -                        /* We have enough space for the object, build it */
> -
> -                        Status = AcpiUtCopyIobjectToEobject (
> -                            Info->ReturnObject, ReturnBuffer);
> -                    }
> -                }
> -            }
> +            Status = AcpiUtCopyIobjectToEobject (
> +                Info->ReturnObject, ReturnBuffer);
>           }
>       }
>   
> +CleanupReturnObject:
> +
>       if (Info->ReturnObject)
>       {
>           /*
> diff --git a/src/acpica/source/components/parser/psutils.c b/src/acpica/source/components/parser/psutils.c
> index f60e60c..8440769 100644
> --- a/src/acpica/source/components/parser/psutils.c
> +++ b/src/acpica/source/components/parser/psutils.c
> @@ -220,7 +220,7 @@ AcpiPsAllocOp (
>       }
>       else if (OpInfo->Flags & AML_NAMED)
>       {
> -        Flags = ACPI_PARSEOP_NAMED;
> +        Flags = ACPI_PARSEOP_NAMED_OBJECT;
>       }
>       else if (Opcode == AML_INT_BYTELIST_OP)
>       {
> diff --git a/src/acpica/source/components/resources/rsdumpinfo.c b/src/acpica/source/components/resources/rsdumpinfo.c
> index a2e45c3..b447e82 100644
> --- a/src/acpica/source/components/resources/rsdumpinfo.c
> +++ b/src/acpica/source/components/resources/rsdumpinfo.c
> @@ -337,19 +337,20 @@ ACPI_RSDUMP_INFO        AcpiRsDumpFixedDma[4] =
>       {ACPI_RSD_UINT8,    ACPI_RSD_OFFSET (CommonSerialBus.Type),             "Type",                     AcpiGbl_SbtDecode}, \
>       {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (CommonSerialBus.ProducerConsumer), "ProducerConsumer",         AcpiGbl_ConsumeDecode}, \
>       {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (CommonSerialBus.SlaveMode),        "SlaveMode",                AcpiGbl_SmDecode}, \
> +    {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (CommonSerialBus.ConnectionSharing),"ConnectionSharing",        AcpiGbl_ShrDecode}, \
>       {ACPI_RSD_UINT8,    ACPI_RSD_OFFSET (CommonSerialBus.TypeRevisionId),   "TypeRevisionId",           NULL}, \
>       {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (CommonSerialBus.TypeDataLength),   "TypeDataLength",           NULL}, \
>       {ACPI_RSD_SOURCE,   ACPI_RSD_OFFSET (CommonSerialBus.ResourceSource),   "ResourceSource",           NULL}, \
>       {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (CommonSerialBus.VendorLength),     "VendorLength",             NULL}, \
>       {ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (CommonSerialBus.VendorData),      "VendorData",               NULL},
>   
> -ACPI_RSDUMP_INFO        AcpiRsDumpCommonSerialBus[10] =
> +ACPI_RSDUMP_INFO        AcpiRsDumpCommonSerialBus[11] =
>   {
>       {ACPI_RSD_TITLE,    ACPI_RSD_TABLE_SIZE (AcpiRsDumpCommonSerialBus),    "Common Serial Bus",        NULL},
>       ACPI_RS_DUMP_COMMON_SERIAL_BUS
>   };
>   
> -ACPI_RSDUMP_INFO        AcpiRsDumpI2cSerialBus[13] =
> +ACPI_RSDUMP_INFO        AcpiRsDumpI2cSerialBus[14] =
>   {
>       {ACPI_RSD_TITLE,    ACPI_RSD_TABLE_SIZE (AcpiRsDumpI2cSerialBus),       "I2C Serial Bus",           NULL},
>       ACPI_RS_DUMP_COMMON_SERIAL_BUS
> @@ -358,7 +359,7 @@ ACPI_RSDUMP_INFO        AcpiRsDumpI2cSerialBus[13] =
>       {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (I2cSerialBus.SlaveAddress),        "SlaveAddress",             NULL},
>   };
>   
> -ACPI_RSDUMP_INFO        AcpiRsDumpSpiSerialBus[17] =
> +ACPI_RSDUMP_INFO        AcpiRsDumpSpiSerialBus[18] =
>   {
>       {ACPI_RSD_TITLE,    ACPI_RSD_TABLE_SIZE (AcpiRsDumpSpiSerialBus),       "Spi Serial Bus",           NULL},
>       ACPI_RS_DUMP_COMMON_SERIAL_BUS
> @@ -371,7 +372,7 @@ ACPI_RSDUMP_INFO        AcpiRsDumpSpiSerialBus[17] =
>       {ACPI_RSD_UINT32,   ACPI_RSD_OFFSET (SpiSerialBus.ConnectionSpeed),     "ConnectionSpeed",          NULL},
>   };
>   
> -ACPI_RSDUMP_INFO        AcpiRsDumpUartSerialBus[19] =
> +ACPI_RSDUMP_INFO        AcpiRsDumpUartSerialBus[20] =
>   {
>       {ACPI_RSD_TITLE,    ACPI_RSD_TABLE_SIZE (AcpiRsDumpUartSerialBus),       "Uart Serial Bus",         NULL},
>       ACPI_RS_DUMP_COMMON_SERIAL_BUS
> diff --git a/src/acpica/source/components/resources/rsserial.c b/src/acpica/source/components/resources/rsserial.c
> index 6ac7a50..e578f1c 100644
> --- a/src/acpica/source/components/resources/rsserial.c
> +++ b/src/acpica/source/components/resources/rsserial.c
> @@ -225,7 +225,7 @@ ACPI_RSCONVERT_INFO     AcpiRsConvertGpio[18] =
>    *
>    ******************************************************************************/
>   
> -ACPI_RSCONVERT_INFO     AcpiRsConvertI2cSerialBus[16] =
> +ACPI_RSCONVERT_INFO     AcpiRsConvertI2cSerialBus[17] =
>   {
>       {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_SERIAL_BUS,
>                           ACPI_RS_SIZE (ACPI_RESOURCE_I2C_SERIALBUS),
> @@ -251,6 +251,10 @@ ACPI_RSCONVERT_INFO     AcpiRsConvertI2cSerialBus[16] =
>                           AML_OFFSET (CommonSerialBus.Flags),
>                           1},
>   
> +    {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing),
> +                        AML_OFFSET (CommonSerialBus.Flags),
> +                        2},
> +
>       {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
>                           AML_OFFSET (CommonSerialBus.TypeRevisionId),
>                           1},
> @@ -305,7 +309,7 @@ ACPI_RSCONVERT_INFO     AcpiRsConvertI2cSerialBus[16] =
>    *
>    ******************************************************************************/
>   
> -ACPI_RSCONVERT_INFO     AcpiRsConvertSpiSerialBus[20] =
> +ACPI_RSCONVERT_INFO     AcpiRsConvertSpiSerialBus[21] =
>   {
>       {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_SERIAL_BUS,
>                           ACPI_RS_SIZE (ACPI_RESOURCE_SPI_SERIALBUS),
> @@ -331,6 +335,10 @@ ACPI_RSCONVERT_INFO     AcpiRsConvertSpiSerialBus[20] =
>                           AML_OFFSET (CommonSerialBus.Flags),
>                           1},
>   
> +    {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing),
> +                        AML_OFFSET (CommonSerialBus.Flags),
> +                        2},
> +
>       {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
>                           AML_OFFSET (CommonSerialBus.TypeRevisionId),
>                           1},
> @@ -401,7 +409,7 @@ ACPI_RSCONVERT_INFO     AcpiRsConvertSpiSerialBus[20] =
>    *
>    ******************************************************************************/
>   
> -ACPI_RSCONVERT_INFO     AcpiRsConvertUartSerialBus[22] =
> +ACPI_RSCONVERT_INFO     AcpiRsConvertUartSerialBus[23] =
>   {
>       {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_SERIAL_BUS,
>                           ACPI_RS_SIZE (ACPI_RESOURCE_UART_SERIALBUS),
> @@ -427,6 +435,10 @@ ACPI_RSCONVERT_INFO     AcpiRsConvertUartSerialBus[22] =
>                           AML_OFFSET (CommonSerialBus.Flags),
>                           1},
>   
> +    {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing),
> +                        AML_OFFSET (CommonSerialBus.Flags),
> +                        2},
> +
>       {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
>                           AML_OFFSET (CommonSerialBus.TypeRevisionId),
>                           1},
> diff --git a/src/acpica/source/components/tables/tbdata.c b/src/acpica/source/components/tables/tbdata.c
> index 9c7dcfd..9cb9015 100644
> --- a/src/acpica/source/components/tables/tbdata.c
> +++ b/src/acpica/source/components/tables/tbdata.c
> @@ -513,7 +513,7 @@ AcpiTbVerifyTempTable (
>               ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
>                   "%4.4s 0x%8.8X%8.8X"
>                   " Attempted table install failed",
> -                AcpiUtValidAcpiName (TableDesc->Signature.Ascii) ?
> +                AcpiUtValidNameseg (TableDesc->Signature.Ascii) ?
>                       TableDesc->Signature.Ascii : "????",
>                   ACPI_FORMAT_UINT64 (TableDesc->Address)));
>   
> diff --git a/src/acpica/source/components/tables/tbfind.c b/src/acpica/source/components/tables/tbfind.c
> index dd83bd7..bd68aaf 100644
> --- a/src/acpica/source/components/tables/tbfind.c
> +++ b/src/acpica/source/components/tables/tbfind.c
> @@ -155,7 +155,7 @@ AcpiTbFindTable (
>   
>       /* Validate the input table signature */
>   
> -    if (!AcpiIsValidSignature (Signature))
> +    if (!AcpiUtValidNameseg (Signature))
>       {
>           return_ACPI_STATUS (AE_BAD_SIGNATURE);
>       }
> diff --git a/src/acpica/source/components/tables/tbinstal.c b/src/acpica/source/components/tables/tbinstal.c
> index 85fcedc..6d664d6 100644
> --- a/src/acpica/source/components/tables/tbinstal.c
> +++ b/src/acpica/source/components/tables/tbinstal.c
> @@ -398,7 +398,7 @@ AcpiTbInstallStandardTable (
>               ACPI_BIOS_ERROR ((AE_INFO,
>                   "Table has invalid signature [%4.4s] (0x%8.8X), "
>                   "must be SSDT or OEMx",
> -                AcpiUtValidAcpiName (NewTableDesc.Signature.Ascii) ?
> +                AcpiUtValidNameseg (NewTableDesc.Signature.Ascii) ?
>                       NewTableDesc.Signature.Ascii : "????",
>                   NewTableDesc.Signature.Integer));
>   
> diff --git a/src/acpica/source/components/tables/tbutils.c b/src/acpica/source/components/tables/tbutils.c
> index ba6d2f9..fd1d427 100644
> --- a/src/acpica/source/components/tables/tbutils.c
> +++ b/src/acpica/source/components/tables/tbutils.c
> @@ -483,36 +483,3 @@ NextTable:
>       AcpiOsUnmapMemory (Table, Length);
>       return_ACPI_STATUS (AE_OK);
>   }
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION:    AcpiIsValidSignature
> - *
> - * PARAMETERS:  Signature           - Sig string to be validated
> - *
> - * RETURN:      TRUE if signature is has 4 valid ACPI characters
> - *
> - * DESCRIPTION: Validate an ACPI table signature.
> - *
> - ******************************************************************************/
> -
> -BOOLEAN
> -AcpiIsValidSignature (
> -    char                    *Signature)
> -{
> -    UINT32                  i;
> -
> -
> -    /* Validate each character in the signature */
> -
> -    for (i = 0; i < ACPI_NAME_SIZE; i++)
> -    {
> -        if (!AcpiUtValidAcpiChar (Signature[i], i))
> -        {
> -            return (FALSE);
> -        }
> -    }
> -
> -    return (TRUE);
> -}
> diff --git a/src/acpica/source/components/utilities/utascii.c b/src/acpica/source/components/utilities/utascii.c
> new file mode 100644
> index 0000000..48c8fac
> --- /dev/null
> +++ b/src/acpica/source/components/utilities/utascii.c
> @@ -0,0 +1,233 @@
> +/******************************************************************************
> + *
> + * Module Name: utascii - Utility ascii functions
> + *
> + *****************************************************************************/
> +
> +/******************************************************************************
> + *
> + * 1. Copyright Notice
> + *
> + * Some or all of this work - Copyright (c) 1999 - 2016, Intel Corp.
> + * All rights reserved.
> + *
> + * 2. License
> + *
> + * 2.1. This is your license from Intel Corp. under its intellectual property
> + * rights. You may have additional license terms from the party that provided
> + * you this software, covering your right to use that party's intellectual
> + * property rights.
> + *
> + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
> + * copy of the source code appearing in this file ("Covered Code") an
> + * irrevocable, perpetual, worldwide license under Intel's copyrights in the
> + * base code distributed originally by Intel ("Original Intel Code") to copy,
> + * make derivatives, distribute, use and display any portion of the Covered
> + * Code in any form, with the right to sublicense such rights; and
> + *
> + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
> + * license (with the right to sublicense), under only those claims of Intel
> + * patents that are infringed by the Original Intel Code, to make, use, sell,
> + * offer to sell, and import the Covered Code and derivative works thereof
> + * solely to the minimum extent necessary to exercise the above copyright
> + * license, and in no event shall the patent license extend to any additions
> + * to or modifications of the Original Intel Code. No other license or right
> + * is granted directly or by implication, estoppel or otherwise;
> + *
> + * The above copyright and patent license is granted only if the following
> + * conditions are met:
> + *
> + * 3. Conditions
> + *
> + * 3.1. Redistribution of Source with Rights to Further Distribute Source.
> + * Redistribution of source code of any substantial portion of the Covered
> + * Code or modification with rights to further distribute source must include
> + * the above Copyright Notice, the above License, this list of Conditions,
> + * and the following Disclaimer and Export Compliance provision. In addition,
> + * Licensee must cause all Covered Code to which Licensee contributes to
> + * contain a file documenting the changes Licensee made to create that Covered
> + * Code and the date of any change. Licensee must include in that file the
> + * documentation of any changes made by any predecessor Licensee. Licensee
> + * must include a prominent statement that the modification is derived,
> + * directly or indirectly, from Original Intel Code.
> + *
> + * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
> + * Redistribution of source code of any substantial portion of the Covered
> + * Code or modification without rights to further distribute source must
> + * include the following Disclaimer and Export Compliance provision in the
> + * documentation and/or other materials provided with distribution. In
> + * addition, Licensee may not authorize further sublicense of source of any
> + * portion of the Covered Code, and must include terms to the effect that the
> + * license from Licensee to its licensee is limited to the intellectual
> + * property embodied in the software Licensee provides to its licensee, and
> + * not to intellectual property embodied in modifications its licensee may
> + * make.
> + *
> + * 3.3. Redistribution of Executable. Redistribution in executable form of any
> + * substantial portion of the Covered Code or modification must reproduce the
> + * above Copyright Notice, and the following Disclaimer and Export Compliance
> + * provision in the documentation and/or other materials provided with the
> + * distribution.
> + *
> + * 3.4. Intel retains all right, title, and interest in and to the Original
> + * Intel Code.
> + *
> + * 3.5. Neither the name Intel nor any other trademark owned or controlled by
> + * Intel shall be used in advertising or otherwise to promote the sale, use or
> + * other dealings in products derived from or relating to the Covered Code
> + * without prior written authorization from Intel.
> + *
> + * 4. Disclaimer and Export Compliance
> + *
> + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
> + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
> + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
> + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
> + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
> + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
> + * PARTICULAR PURPOSE.
> + *
> + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
> + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
> + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
> + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
> + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
> + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
> + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
> + * LIMITED REMEDY.
> + *
> + * 4.3. Licensee shall not export, either directly or indirectly, any of this
> + * software or system incorporating such software without first obtaining any
> + * required license or other approval from the U. S. Department of Commerce or
> + * any other agency or department of the United States Government. In the
> + * event Licensee exports any such software from the United States or
> + * re-exports any such software from a foreign destination, Licensee shall
> + * ensure that the distribution and export/re-export of the software is in
> + * compliance with all laws, regulations, orders, or other restrictions of the
> + * U.S. Export Administration Regulations. Licensee agrees that neither it nor
> + * any of its subsidiaries will export/re-export any technical data, process,
> + * software, or service, directly or indirectly, to any country for which the
> + * United States government or any agency thereof requires an export license,
> + * other governmental approval, or letter of assurance, without first obtaining
> + * such license, approval or letter.
> + *
> + *****************************************************************************/
> +
> +#include "acpi.h"
> +#include "accommon.h"
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiUtValidNameseg
> + *
> + * PARAMETERS:  Name            - The name or table signature to be examined.
> + *                                Four characters, does not have to be a
> + *                                NULL terminated string.
> + *
> + * RETURN:      TRUE if signature is has 4 valid ACPI characters
> + *
> + * DESCRIPTION: Validate an ACPI table signature.
> + *
> + ******************************************************************************/
> +
> +BOOLEAN
> +AcpiUtValidNameseg (
> +    char                    *Name)
> +{
> +    UINT32                  i;
> +
> +
> +    /* Validate each character in the signature */
> +
> +    for (i = 0; i < ACPI_NAME_SIZE; i++)
> +    {
> +        if (!AcpiUtValidNameChar (Name[i], i))
> +        {
> +            return (FALSE);
> +        }
> +    }
> +
> +    return (TRUE);
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiUtValidNameChar
> + *
> + * PARAMETERS:  Char            - The character to be examined
> + *              Position        - Byte position (0-3)
> + *
> + * RETURN:      TRUE if the character is valid, FALSE otherwise
> + *
> + * DESCRIPTION: Check for a valid ACPI character. Must be one of:
> + *              1) Upper case alpha
> + *              2) numeric
> + *              3) underscore
> + *
> + *              We allow a '!' as the last character because of the ASF! table
> + *
> + ******************************************************************************/
> +
> +BOOLEAN
> +AcpiUtValidNameChar (
> +    char                    Character,
> +    UINT32                  Position)
> +{
> +
> +    if (!((Character >= 'A' && Character <= 'Z') ||
> +          (Character >= '0' && Character <= '9') ||
> +          (Character == '_')))
> +    {
> +        /* Allow a '!' in the last position */
> +
> +        if (Character == '!' && Position == 3)
> +        {
> +            return (TRUE);
> +        }
> +
> +        return (FALSE);
> +    }
> +
> +    return (TRUE);
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiUtCheckAndRepairAscii
> + *
> + * PARAMETERS:  Name                - Ascii string
> + *              Count               - Number of characters to check
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Ensure that the requested number of characters are printable
> + *              Ascii characters. Sets non-printable and null chars to <space>.
> + *
> + ******************************************************************************/
> +
> +void
> +AcpiUtCheckAndRepairAscii (
> +    UINT8                   *Name,
> +    char                    *RepairedName,
> +    UINT32                  Count)
> +{
> +    UINT32                  i;
> +
> +
> +    for (i = 0; i < Count; i++)
> +    {
> +        RepairedName[i] = (char) Name[i];
> +
> +        if (!Name[i])
> +        {
> +            return;
> +        }
> +        if (!isprint (Name[i]))
> +        {
> +            RepairedName[i] = ' ';
> +        }
> +    }
> +}
> diff --git a/src/acpica/source/components/utilities/utstring.c b/src/acpica/source/components/utilities/utstring.c
> index 2dfb102..746bf41 100644
> --- a/src/acpica/source/components/utilities/utstring.c
> +++ b/src/acpica/source/components/utilities/utstring.c
> @@ -231,86 +231,6 @@ AcpiUtPrintString (
>   
>   /*******************************************************************************
>    *
> - * FUNCTION:    AcpiUtValidAcpiChar
> - *
> - * PARAMETERS:  Char            - The character to be examined
> - *              Position        - Byte position (0-3)
> - *
> - * RETURN:      TRUE if the character is valid, FALSE otherwise
> - *
> - * DESCRIPTION: Check for a valid ACPI character. Must be one of:
> - *              1) Upper case alpha
> - *              2) numeric
> - *              3) underscore
> - *
> - *              We allow a '!' as the last character because of the ASF! table
> - *
> - ******************************************************************************/
> -
> -BOOLEAN
> -AcpiUtValidAcpiChar (
> -    char                    Character,
> -    UINT32                  Position)
> -{
> -
> -    if (!((Character >= 'A' && Character <= 'Z') ||
> -          (Character >= '0' && Character <= '9') ||
> -          (Character == '_')))
> -    {
> -        /* Allow a '!' in the last position */
> -
> -        if (Character == '!' && Position == 3)
> -        {
> -            return (TRUE);
> -        }
> -
> -        return (FALSE);
> -    }
> -
> -    return (TRUE);
> -}
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION:    AcpiUtValidAcpiName
> - *
> - * PARAMETERS:  Name            - The name to be examined. Does not have to
> - *                                be NULL terminated string.
> - *
> - * RETURN:      TRUE if the name is valid, FALSE otherwise
> - *
> - * DESCRIPTION: Check for a valid ACPI name. Each character must be one of:
> - *              1) Upper case alpha
> - *              2) numeric
> - *              3) underscore
> - *
> - ******************************************************************************/
> -
> -BOOLEAN
> -AcpiUtValidAcpiName (
> -    char                    *Name)
> -{
> -    UINT32                  i;
> -
> -
> -    ACPI_FUNCTION_ENTRY ();
> -
> -
> -    for (i = 0; i < ACPI_NAME_SIZE; i++)
> -    {
> -        if (!AcpiUtValidAcpiChar (Name[i], i))
> -        {
> -            return (FALSE);
> -        }
> -    }
> -
> -    return (TRUE);
> -}
> -
> -
> -/*******************************************************************************
> - *
>    * FUNCTION:    AcpiUtRepairName
>    *
>    * PARAMETERS:  Name            - The ACPI name to be repaired
> @@ -358,7 +278,7 @@ AcpiUtRepairName (
>   
>       for (i = 0; i < ACPI_NAME_SIZE; i++)
>       {
> -        if (AcpiUtValidAcpiChar (Name[i], i))
> +        if (AcpiUtValidNameChar (Name[i], i))
>           {
>               continue;
>           }
> diff --git a/src/acpica/source/include/acdisasm.h b/src/acpica/source/include/acdisasm.h
> index b62568d..ba8f274 100644
> --- a/src/acpica/source/include/acdisasm.h
> +++ b/src/acpica/source/include/acdisasm.h
> @@ -457,6 +457,7 @@ extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcct[];
>   extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcctHdr[];
>   extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcct0[];
>   extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcct1[];
> +extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcct2[];
>   extern ACPI_DMTABLE_INFO        AcpiDmTableInfoRsdp1[];
>   extern ACPI_DMTABLE_INFO        AcpiDmTableInfoRsdp2[];
>   extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3pt[];
> diff --git a/src/acpica/source/include/aclocal.h b/src/acpica/source/include/aclocal.h
> index 39bad5b..660dccd 100644
> --- a/src/acpica/source/include/aclocal.h
> +++ b/src/acpica/source/include/aclocal.h
> @@ -1097,24 +1097,24 @@ typedef struct acpi_parse_state
>   
>   /* Parse object flags */
>   
> -#define ACPI_PARSEOP_GENERIC            0x01
> -#define ACPI_PARSEOP_NAMED              0x02
> -#define ACPI_PARSEOP_DEFERRED           0x04
> -#define ACPI_PARSEOP_BYTELIST           0x08
> -#define ACPI_PARSEOP_IN_STACK           0x10
> -#define ACPI_PARSEOP_TARGET             0x20
> -#define ACPI_PARSEOP_IN_CACHE           0x80
> +#define ACPI_PARSEOP_GENERIC                0x01
> +#define ACPI_PARSEOP_NAMED_OBJECT           0x02
> +#define ACPI_PARSEOP_DEFERRED               0x04
> +#define ACPI_PARSEOP_BYTELIST               0x08
> +#define ACPI_PARSEOP_IN_STACK               0x10
> +#define ACPI_PARSEOP_TARGET                 0x20
> +#define ACPI_PARSEOP_IN_CACHE               0x80
>   
>   /* Parse object DisasmFlags */
>   
> -#define ACPI_PARSEOP_IGNORE             0x01
> -#define ACPI_PARSEOP_PARAMLIST          0x02
> -#define ACPI_PARSEOP_EMPTY_TERMLIST     0x04
> -#define ACPI_PARSEOP_PREDEF_CHECKED     0x08
> -#define ACPI_PARSEOP_CLOSING_PAREN      0x10
> -#define ACPI_PARSEOP_COMPOUND           0x20
> -#define ACPI_PARSEOP_ASSIGNMENT         0x40
> -#define ACPI_PARSEOP_ELSEIF             0x80
> +#define ACPI_PARSEOP_IGNORE                 0x01
> +#define ACPI_PARSEOP_PARAMETER_LIST         0x02
> +#define ACPI_PARSEOP_EMPTY_TERMLIST         0x04
> +#define ACPI_PARSEOP_PREDEFINED_CHECKED     0x08
> +#define ACPI_PARSEOP_CLOSING_PAREN          0x10
> +#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT    0x20
> +#define ACPI_PARSEOP_ASSIGNMENT             0x40
> +#define ACPI_PARSEOP_ELSEIF                 0x80
>   
>   
>   /*****************************************************************************
> diff --git a/src/acpica/source/include/acmacros.h b/src/acpica/source/include/acmacros.h
> index 529a285..d0514a1 100644
> --- a/src/acpica/source/include/acmacros.h
> +++ b/src/acpica/source/include/acmacros.h
> @@ -345,9 +345,21 @@
>    * 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 */
>   
> @@ -363,10 +375,10 @@
>   /* Generic bitfield macros and masks */
>   
>   #define ACPI_GET_BITS(SourcePtr, Position, Mask) \
> -    ((*SourcePtr >> Position) & Mask)
> +    ((*(SourcePtr) >> (Position)) & (Mask))
>   
>   #define ACPI_SET_BITS(TargetPtr, Position, Mask, Value) \
> -    (*TargetPtr |= ((Value & Mask) << Position))
> +    (*(TargetPtr) |= (((Value) & (Mask)) << (Position)))
>   
>   #define ACPI_1BIT_MASK      0x00000001
>   #define ACPI_2BIT_MASK      0x00000003
> diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
> index b9ef5df..6ced00d 100644
> --- a/src/acpica/source/include/acpixf.h
> +++ b/src/acpica/source/include/acpixf.h
> @@ -118,7 +118,7 @@
>   
>   /* Current ACPICA subsystem version in YYYYMMDD format */
>   
> -#define ACPI_CA_VERSION                 0x20160318
> +#define ACPI_CA_VERSION                 0x20160422
>   
>   #include "acconfig.h"
>   #include "actypes.h"
> diff --git a/src/acpica/source/include/acpredef.h b/src/acpica/source/include/acpredef.h
> index 95abf0a..851c0b5 100644
> --- a/src/acpica/source/include/acpredef.h
> +++ b/src/acpica/source/include/acpredef.h
> @@ -203,7 +203,8 @@ enum AcpiReturnPackageTypes
>       ACPI_PTYPE2_REV_FIXED   = 9,
>       ACPI_PTYPE2_FIX_VAR     = 10,
>       ACPI_PTYPE2_VAR_VAR     = 11,
> -    ACPI_PTYPE2_UUID_PAIR   = 12
> +    ACPI_PTYPE2_UUID_PAIR   = 12,
> +    ACPI_PTYPE_CUSTOM       = 13
>   };
>   
>   
> @@ -416,7 +417,7 @@ const ACPI_PREDEFINED_INFO          AcpiGbl_PredefinedMethods[] =
>   
>       {{"_BIX",   METHOD_0ARGS,
>                   METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Fixed-length (16 Int),(4 Str) */
> -                    PACKAGE_INFO (ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 16, ACPI_RTYPE_STRING, 4,0),
> +                    PACKAGE_INFO (ACPI_PTYPE_CUSTOM, ACPI_RTYPE_INTEGER, 16, ACPI_RTYPE_STRING, 4,0),
>   
>       {{"_BLT",   METHOD_3ARGS (ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER),
>                   METHOD_NO_RETURN_VALUE}},
> diff --git a/src/acpica/source/include/acrestyp.h b/src/acpica/source/include/acrestyp.h
> index 9abde22..396a2d5 100644
> --- a/src/acpica/source/include/acrestyp.h
> +++ b/src/acpica/source/include/acrestyp.h
> @@ -557,6 +557,7 @@ typedef struct acpi_resource_gpio
>       UINT8                           Type; \
>       UINT8                           ProducerConsumer;    /* For values, see Producer/Consumer above */\
>       UINT8                           SlaveMode; \
> +    UINT8                           ConnectionSharing; \
>       UINT8                           TypeRevisionId; \
>       UINT16                          TypeDataLength; \
>       UINT16                          VendorLength; \
> diff --git a/src/acpica/source/include/actables.h b/src/acpica/source/include/actables.h
> index acdf082..204af43 100644
> --- a/src/acpica/source/include/actables.h
> +++ b/src/acpica/source/include/actables.h
> @@ -318,10 +318,6 @@ ACPI_STATUS
>   AcpiTbParseRootTable (
>       ACPI_PHYSICAL_ADDRESS   RsdpAddress);
>   
> -BOOLEAN
> -AcpiIsValidSignature (
> -    char                    *Signature);
> -
>   
>   /*
>    * tbxfload
> diff --git a/src/acpica/source/include/actbl3.h b/src/acpica/source/include/actbl3.h
> index 933a155..0d3ee44 100644
> --- a/src/acpica/source/include/actbl3.h
> +++ b/src/acpica/source/include/actbl3.h
> @@ -635,9 +635,10 @@ typedef struct acpi_table_pcct
>   
>   enum AcpiPcctType
>   {
> -    ACPI_PCCT_TYPE_GENERIC_SUBSPACE     = 0,
> -    ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE  = 1,
> -    ACPI_PCCT_TYPE_RESERVED             = 2     /* 2 and greater are reserved */
> +    ACPI_PCCT_TYPE_GENERIC_SUBSPACE             = 0,
> +    ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE          = 1,
> +    ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2    = 2,    /* ACPI 6.1 */
> +    ACPI_PCCT_TYPE_RESERVED                     = 3     /* 3 and greater are reserved */
>   };
>   
>   /*
> @@ -681,6 +682,30 @@ typedef struct acpi_pcct_hw_reduced
>   
>   } ACPI_PCCT_HW_REDUCED;
>   
> +
> +/* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */
> +
> +typedef struct acpi_pcct_hw_reduced_type2
> +{
> +    ACPI_SUBTABLE_HEADER    Header;
> +    UINT32                  DoorbellInterrupt;
> +    UINT8                   Flags;
> +    UINT8                   Reserved;
> +    UINT64                  BaseAddress;
> +    UINT64                  Length;
> +    ACPI_GENERIC_ADDRESS    DoorbellRegister;
> +    UINT64                  PreserveMask;
> +    UINT64                  WriteMask;
> +    UINT32                  Latency;
> +    UINT32                  MaxAccessRate;
> +    UINT16                  MinTurnaroundTime;
> +    ACPI_GENERIC_ADDRESS    DoorbellAckRegister;
> +    UINT64                  AckPreserveMask;
> +    UINT64                  AckWriteMask;
> +
> +} ACPI_PCCT_HW_REDUCED_TYPE2;
> +
> +
>   /* Values for doorbell flags above */
>   
>   #define ACPI_PCCT_INTERRUPT_POLARITY    (1)
> diff --git a/src/acpica/source/include/acutils.h b/src/acpica/source/include/acutils.h
> index 90069f5..b6f42d1 100644
> --- a/src/acpica/source/include/acutils.h
> +++ b/src/acpica/source/include/acutils.h
> @@ -247,6 +247,25 @@ typedef struct acpi_pkg_info
>   
>   
>   /*
> + * utascii - ASCII utilities
> + */
> +BOOLEAN
> +AcpiUtValidNameseg (
> +    char                    *Signature);
> +
> +BOOLEAN
> +AcpiUtValidNameChar (
> +    char                    Character,
> +    UINT32                  Position);
> +
> +void
> +AcpiUtCheckAndRepairAscii (
> +    UINT8                   *Name,
> +    char                    *RepairedName,
> +    UINT32                  Count);
> +
> +
> +/*
>    * utnonansi - Non-ANSI C library functions
>    */
>   void
> @@ -904,15 +923,6 @@ UtConvertBackslashes (
>       char                    *Pathname);
>   #endif
>   
> -BOOLEAN
> -AcpiUtValidAcpiName (
> -    char                    *Name);
> -
> -BOOLEAN
> -AcpiUtValidAcpiChar (
> -    char                    Character,
> -    UINT32                  Position);
> -
>   void
>   AcpiUtRepairName (
>       char                    *Name);

Acked-by: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list