diff mbox

[2/4] acpica: use latest ACPICA source

Message ID 1342569140-21829-3-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King July 17, 2012, 11:52 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Update to ACPICA version 20120711, commit
b9058029d3bd6216f594a3b5e70b2f6cba1052ad to get the latest
goodness.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpica/Makefile.am                             |    2 +
 src/acpica/source/common/adfile.c                  |   19 +-
 src/acpica/source/common/adwalk.c                  |   30 +-
 src/acpica/source/common/dmextern.c                |   36 +-
 src/acpica/source/common/dmrestag.c                |   21 +-
 src/acpica/source/compiler/Makefile.am             |    1 +
 src/acpica/source/compiler/aslcompile.c            |  121 ++++---
 src/acpica/source/compiler/aslcompiler.h           |    9 +-
 src/acpica/source/compiler/aslcompiler.l           |    1 +
 src/acpica/source/compiler/aslcompiler.y           |    4 +-
 src/acpica/source/compiler/aslerror.c              |   23 +-
 src/acpica/source/compiler/aslfiles.c              |  126 ++++++-
 src/acpica/source/compiler/asllookup.c             |    2 +-
 src/acpica/source/compiler/aslmain.c               |   66 ++--
 src/acpica/source/compiler/aslmap.c                |    1 +
 src/acpica/source/compiler/aslmessages.h           |   11 +-
 src/acpica/source/compiler/aslstartup.c            |    2 +-
 src/acpica/source/compiler/aslsupport.l            |   52 ++-
 src/acpica/source/compiler/aslutils.c              |   90 ++---
 src/acpica/source/compiler/dtio.c                  |   45 ++-
 src/acpica/source/compiler/dttemplate.c            |    2 +-
 src/acpica/source/compiler/prscan.c                |    2 +-
 src/acpica/source/compiler/prutils.c               |   15 +-
 src/acpica/source/components/debugger/dbcmds.c     |  120 ++++---
 src/acpica/source/components/debugger/dbdisply.c   |   15 +-
 src/acpica/source/components/debugger/dbexec.c     |    6 +-
 src/acpica/source/components/debugger/dbfileio.c   |   13 +
 src/acpica/source/components/debugger/dbinput.c    |    4 +-
 src/acpica/source/components/debugger/dbstats.c    |   28 +-
 src/acpica/source/components/debugger/dbutils.c    |    4 +-
 .../source/components/disassembler/dmopcode.c      |  213 ++++++++++++
 src/acpica/source/components/disassembler/dmwalk.c |   55 +++-
 src/acpica/source/components/dispatcher/dsfield.c  |   88 ++++-
 src/acpica/source/components/dispatcher/dsopcode.c |   14 +-
 src/acpica/source/components/dispatcher/dswload.c  |   14 +
 src/acpica/source/components/dispatcher/dswload2.c |   14 +
 src/acpica/source/components/events/evgpe.c        |   15 +-
 src/acpica/source/components/events/evgpeutil.c    |   19 ++
 src/acpica/source/components/events/evmisc.c       |  183 ++++-------
 src/acpica/source/components/events/evxface.c      |  344 ++++++++++----------
 src/acpica/source/components/events/evxfgpe.c      |   86 ++++-
 src/acpica/source/components/executer/exconfig.c   |    2 +-
 src/acpica/source/components/executer/exdump.c     |   24 +-
 src/acpica/source/components/executer/exprep.c     |    4 +-
 src/acpica/source/components/executer/exresolv.c   |    2 +-
 src/acpica/source/components/executer/exstore.c    |    6 +-
 src/acpica/source/components/executer/exutils.c    |    2 +-
 src/acpica/source/components/hardware/hwsleep.c    |   25 --
 src/acpica/source/components/hardware/hwxfsleep.c  |    8 +
 src/acpica/source/components/namespace/nspredef.c  |    2 +-
 src/acpica/source/components/parser/psxface.c      |    4 +-
 src/acpica/source/components/resources/rscreate.c  |    6 +-
 src/acpica/source/components/resources/rsutils.c   |    2 +-
 src/acpica/source/components/tables/tbfadt.c       |   64 ++--
 src/acpica/source/components/tables/tbinstal.c     |    5 +-
 src/acpica/source/components/tables/tbutils.c      |   17 +-
 src/acpica/source/components/tables/tbxface.c      |  159 +--------
 src/acpica/source/components/tables/tbxfroot.c     |    2 +-
 src/acpica/source/components/utilities/utdecode.c  |   62 +---
 src/acpica/source/components/utilities/utdelete.c  |   21 +-
 src/acpica/source/components/utilities/utglobal.c  |    9 +-
 src/acpica/source/components/utilities/utmisc.c    |   81 +----
 src/acpica/source/components/utilities/utobject.c  |    6 +-
 src/acpica/source/components/utilities/utresrc.c   |    4 +-
 src/acpica/source/components/utilities/uttrack.c   |    6 +-
 src/acpica/source/components/utilities/utxferror.c |   81 +++++
 src/acpica/source/include/acdebug.h                |    5 +-
 src/acpica/source/include/acdisasm.h               |    8 +
 src/acpica/source/include/acexcep.h                |    5 +-
 src/acpica/source/include/acglobal.h               |   22 +-
 src/acpica/source/include/aclocal.h                |   45 ++-
 src/acpica/source/include/acmacros.h               |    4 +-
 src/acpica/source/include/acobject.h               |   15 +-
 src/acpica/source/include/acoutput.h               |    4 +
 src/acpica/source/include/acpiosxf.h               |    2 +-
 src/acpica/source/include/acpixf.h                 |   36 +-
 src/acpica/source/include/acpredef.h               |    6 +-
 src/acpica/source/include/actbl1.h                 |    2 +-
 src/acpica/source/include/actypes.h                |    7 +-
 src/acpica/source/include/acutils.h                |    6 +-
 src/acpica/source/include/platform/acenv.h         |    5 +-
 .../source/os_specific/service_layers/osunixxf.c   |   31 +-
 src/acpica/source/tools/acpiexec/aecommon.h        |    1 +
 src/acpica/source/tools/acpiexec/aehandlers.c      |  163 ++++++++--
 84 files changed, 1846 insertions(+), 1041 deletions(-)

Comments

Ivan Hu July 20, 2012, 9:48 a.m. UTC | #1
On 07/18/2012 07:52 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Update to ACPICA version 20120711, commit
> b9058029d3bd6216f594a3b5e70b2f6cba1052ad to get the latest
> goodness.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpica/Makefile.am                             |    2 +
>   src/acpica/source/common/adfile.c                  |   19 +-
>   src/acpica/source/common/adwalk.c                  |   30 +-
>   src/acpica/source/common/dmextern.c                |   36 +-
>   src/acpica/source/common/dmrestag.c                |   21 +-
>   src/acpica/source/compiler/Makefile.am             |    1 +
>   src/acpica/source/compiler/aslcompile.c            |  121 ++++---
>   src/acpica/source/compiler/aslcompiler.h           |    9 +-
>   src/acpica/source/compiler/aslcompiler.l           |    1 +
>   src/acpica/source/compiler/aslcompiler.y           |    4 +-
>   src/acpica/source/compiler/aslerror.c              |   23 +-
>   src/acpica/source/compiler/aslfiles.c              |  126 ++++++-
>   src/acpica/source/compiler/asllookup.c             |    2 +-
>   src/acpica/source/compiler/aslmain.c               |   66 ++--
>   src/acpica/source/compiler/aslmap.c                |    1 +
>   src/acpica/source/compiler/aslmessages.h           |   11 +-
>   src/acpica/source/compiler/aslstartup.c            |    2 +-
>   src/acpica/source/compiler/aslsupport.l            |   52 ++-
>   src/acpica/source/compiler/aslutils.c              |   90 ++---
>   src/acpica/source/compiler/dtio.c                  |   45 ++-
>   src/acpica/source/compiler/dttemplate.c            |    2 +-
>   src/acpica/source/compiler/prscan.c                |    2 +-
>   src/acpica/source/compiler/prutils.c               |   15 +-
>   src/acpica/source/components/debugger/dbcmds.c     |  120 ++++---
>   src/acpica/source/components/debugger/dbdisply.c   |   15 +-
>   src/acpica/source/components/debugger/dbexec.c     |    6 +-
>   src/acpica/source/components/debugger/dbfileio.c   |   13 +
>   src/acpica/source/components/debugger/dbinput.c    |    4 +-
>   src/acpica/source/components/debugger/dbstats.c    |   28 +-
>   src/acpica/source/components/debugger/dbutils.c    |    4 +-
>   .../source/components/disassembler/dmopcode.c      |  213 ++++++++++++
>   src/acpica/source/components/disassembler/dmwalk.c |   55 +++-
>   src/acpica/source/components/dispatcher/dsfield.c  |   88 ++++-
>   src/acpica/source/components/dispatcher/dsopcode.c |   14 +-
>   src/acpica/source/components/dispatcher/dswload.c  |   14 +
>   src/acpica/source/components/dispatcher/dswload2.c |   14 +
>   src/acpica/source/components/events/evgpe.c        |   15 +-
>   src/acpica/source/components/events/evgpeutil.c    |   19 ++
>   src/acpica/source/components/events/evmisc.c       |  183 ++++-------
>   src/acpica/source/components/events/evxface.c      |  344 ++++++++++----------
>   src/acpica/source/components/events/evxfgpe.c      |   86 ++++-
>   src/acpica/source/components/executer/exconfig.c   |    2 +-
>   src/acpica/source/components/executer/exdump.c     |   24 +-
>   src/acpica/source/components/executer/exprep.c     |    4 +-
>   src/acpica/source/components/executer/exresolv.c   |    2 +-
>   src/acpica/source/components/executer/exstore.c    |    6 +-
>   src/acpica/source/components/executer/exutils.c    |    2 +-
>   src/acpica/source/components/hardware/hwsleep.c    |   25 --
>   src/acpica/source/components/hardware/hwxfsleep.c  |    8 +
>   src/acpica/source/components/namespace/nspredef.c  |    2 +-
>   src/acpica/source/components/parser/psxface.c      |    4 +-
>   src/acpica/source/components/resources/rscreate.c  |    6 +-
>   src/acpica/source/components/resources/rsutils.c   |    2 +-
>   src/acpica/source/components/tables/tbfadt.c       |   64 ++--
>   src/acpica/source/components/tables/tbinstal.c     |    5 +-
>   src/acpica/source/components/tables/tbutils.c      |   17 +-
>   src/acpica/source/components/tables/tbxface.c      |  159 +--------
>   src/acpica/source/components/tables/tbxfroot.c     |    2 +-
>   src/acpica/source/components/utilities/utdecode.c  |   62 +---
>   src/acpica/source/components/utilities/utdelete.c  |   21 +-
>   src/acpica/source/components/utilities/utglobal.c  |    9 +-
>   src/acpica/source/components/utilities/utmisc.c    |   81 +----
>   src/acpica/source/components/utilities/utobject.c  |    6 +-
>   src/acpica/source/components/utilities/utresrc.c   |    4 +-
>   src/acpica/source/components/utilities/uttrack.c   |    6 +-
>   src/acpica/source/components/utilities/utxferror.c |   81 +++++
>   src/acpica/source/include/acdebug.h                |    5 +-
>   src/acpica/source/include/acdisasm.h               |    8 +
>   src/acpica/source/include/acexcep.h                |    5 +-
>   src/acpica/source/include/acglobal.h               |   22 +-
>   src/acpica/source/include/aclocal.h                |   45 ++-
>   src/acpica/source/include/acmacros.h               |    4 +-
>   src/acpica/source/include/acobject.h               |   15 +-
>   src/acpica/source/include/acoutput.h               |    4 +
>   src/acpica/source/include/acpiosxf.h               |    2 +-
>   src/acpica/source/include/acpixf.h                 |   36 +-
>   src/acpica/source/include/acpredef.h               |    6 +-
>   src/acpica/source/include/actbl1.h                 |    2 +-
>   src/acpica/source/include/actypes.h                |    7 +-
>   src/acpica/source/include/acutils.h                |    6 +-
>   src/acpica/source/include/platform/acenv.h         |    5 +-
>   .../source/os_specific/service_layers/osunixxf.c   |   31 +-
>   src/acpica/source/tools/acpiexec/aecommon.h        |    1 +
>   src/acpica/source/tools/acpiexec/aehandlers.c      |  163 ++++++++--
>   84 files changed, 1846 insertions(+), 1041 deletions(-)
>
> diff --git a/src/acpica/Makefile.am b/src/acpica/Makefile.am
> index 3187432..e2213d5 100644
> --- a/src/acpica/Makefile.am
> +++ b/src/acpica/Makefile.am
> @@ -175,6 +175,7 @@ libfwtsacpica_la_SOURCES = \
>   	$(ACPICA_COMP)/tables/tbutils.c \
>   	$(ACPICA_COMP)/tables/tbxface.c \
>   	$(ACPICA_COMP)/tables/tbxfroot.c \
> +	$(ACPICA_COMP)/tables/tbxfload.c \
>   	$(ACPICA_COMP)/utilities/utaddress.c \
>   	$(ACPICA_COMP)/utilities/utalloc.c \
>   	$(ACPICA_COMP)/utilities/utcache.c \
> @@ -197,6 +198,7 @@ libfwtsacpica_la_SOURCES = \
>   	$(ACPICA_COMP)/utilities/utxferror.c \
>   	$(ACPICA_COMP)/utilities/utxface.c \
>   	$(ACPICA_COMP)/utilities/utdecode.c \
> +	$(ACPICA_COMP)/utilities/utexcep.c \
>   	$(ACPICA_SRC)/tools/acpiexec/aehandlers.c
>
>   libfwtsacpica_la_LIBADD = \
> diff --git a/src/acpica/source/common/adfile.c b/src/acpica/source/common/adfile.c
> index f4e33e2..36c3176 100644
> --- a/src/acpica/source/common/adfile.c
> +++ b/src/acpica/source/common/adfile.c
> @@ -370,20 +370,24 @@ FlSplitInputPathname (
>           return (AE_NO_MEMORY);
>       }
>
> -    Substring = strrchr (DirectoryPath, '\\');
> +    /* Convert backslashes to slashes in the entire path */
> +
> +    UtConvertBackslashes (DirectoryPath);
> +
> +    /* Backup to last slash or colon */
> +
> +    Substring = strrchr (DirectoryPath, '/');
>       if (!Substring)
>       {
> -        Substring = strrchr (DirectoryPath, '/');
> -        if (!Substring)
> -        {
> -            Substring = strrchr (DirectoryPath, ':');
> -        }
> +        Substring = strrchr (DirectoryPath, ':');
>       }
>
> +    /* Extract the simple filename */
> +
>       if (!Substring)
>       {
> +        Filename = FlStrdup (DirectoryPath);
>           DirectoryPath[0] = 0;
> -        Filename = FlStrdup (InputPath);
>       }
>       else
>       {
> @@ -398,7 +402,6 @@ FlSplitInputPathname (
>
>       *OutDirectoryPath = DirectoryPath;
>       *OutFilename = Filename;
> -
>       return (AE_OK);
>   }
>
> diff --git a/src/acpica/source/common/adwalk.c b/src/acpica/source/common/adwalk.c
> index eeb61d8..00d9bb6 100644
> --- a/src/acpica/source/common/adwalk.c
> +++ b/src/acpica/source/common/adwalk.c
> @@ -593,6 +593,7 @@ AcpiDmFindOrphanDescending (
>
>           if ((OpInfo->Class != AML_CLASS_EXECUTE) &&
>               (OpInfo->Class != AML_CLASS_CREATE) &&
> +            (OpInfo->ObjectType != ACPI_TYPE_LOCAL_ALIAS) &&
>               (ParentOp->Common.AmlOpcode != AML_INT_METHODCALL_OP) &&
>               !Op->Common.Node)
>           {
> @@ -815,13 +816,23 @@ AcpiDmXrefDescendingOp (
>
>       if (OpInfo->Flags & AML_NAMED)
>       {
> -        if ((Op->Common.AmlOpcode == AML_ALIAS_OP) ||
> -            (Op->Common.AmlOpcode == AML_SCOPE_OP))
> +        /*
> +         * Only these two operators (Alias, Scope) refer to an existing
> +         * name, it is the first argument
> +         */
> +        if (Op->Common.AmlOpcode == AML_ALIAS_OP)
> +        {
> +            ObjectType = ACPI_TYPE_ANY;
> +
> +            NextOp = Op->Common.Value.Arg;
> +            NextOp = NextOp->Common.Value.Arg;
> +            if (NextOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
> +            {
> +                Path = NextOp->Common.Value.String;
> +            }
> +        }
> +        else if (Op->Common.AmlOpcode == AML_SCOPE_OP)
>           {
> -            /*
> -             * Only these two operators refer to an existing name,
> -             * first argument
> -             */
>               Path = (char *) Op->Named.Path;
>           }
>       }
> @@ -829,6 +840,8 @@ AcpiDmXrefDescendingOp (
>       {
>           /* Referenced Buffer Name is the first child */
>
> +        ObjectType = ACPI_TYPE_BUFFER; /* Change from TYPE_BUFFER_FIELD */
> +
>           NextOp = Op->Common.Value.Arg;
>           if (NextOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
>           {
> @@ -855,6 +868,11 @@ AcpiDmXrefDescendingOp (
>       Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY,
>                   ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
>                   WalkState, &Node);
> +    if (ACPI_SUCCESS (Status) && (Node->Flags & ANOBJ_IS_EXTERNAL))
> +    {
> +        Status = AE_NOT_FOUND;
> +    }
> +
>       if (ACPI_FAILURE (Status))
>       {
>           if (Status == AE_NOT_FOUND)
> diff --git a/src/acpica/source/common/dmextern.c b/src/acpica/source/common/dmextern.c
> index 8b8402e..622db8a 100644
> --- a/src/acpica/source/common/dmextern.c
> +++ b/src/acpica/source/common/dmextern.c
> @@ -293,8 +293,10 @@ AcpiDmNormalizeParentPrefix (
>        */
>       ACPI_STRCAT (Fullpath, ParentPath);
>
> -    /* Add dot separator (don't need dot if parent fullpath is a single "\") */
> -
> +    /*
> +     * Add dot separator
> +     * (don't need dot if parent fullpath is a single backslash)
> +     */
>       if (ParentPath[1])
>       {
>           ACPI_STRCAT (Fullpath, ".");
> @@ -526,12 +528,12 @@ AcpiDmAddToExternalList (
>
>       NewExternal->InternalPath = Path;
>
> -    /* Link the new descriptor into the global list, ordered by string length */
> +    /* Link the new descriptor into the global list, alphabetically ordered */
>
>       NextExternal = AcpiGbl_ExternalList;
>       while (NextExternal)
>       {
> -        if (NewExternal->Length <= NextExternal->Length)
> +        if (AcpiUtStricmp (NewExternal->Path, NextExternal->Path) < 0)
>           {
>               if (PrevExternal)
>               {
> @@ -580,7 +582,7 @@ AcpiDmAddExternalsToNamespace (
>   {
>       ACPI_STATUS             Status;
>       ACPI_NAMESPACE_NODE     *Node;
> -    ACPI_OPERAND_OBJECT     *MethodDesc;
> +    ACPI_OPERAND_OBJECT     *ObjDesc;
>       ACPI_EXTERNAL_LIST      *External = AcpiGbl_ExternalList;
>
>
> @@ -599,13 +601,29 @@ AcpiDmAddExternalsToNamespace (
>                   "while adding external to namespace [%s]",
>                   External->Path));
>           }
> -        else if (External->Type == ACPI_TYPE_METHOD)
> +
> +        else switch (External->Type)
>           {
> +        case ACPI_TYPE_METHOD:
> +
>               /* For methods, we need to save the argument count */
>
> -            MethodDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD);
> -            MethodDesc->Method.ParamCount = (UINT8) External->Value;
> -            Node->Object = MethodDesc;
> +            ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD);
> +            ObjDesc->Method.ParamCount = (UINT8) External->Value;
> +            Node->Object = ObjDesc;
> +            break;
> +
> +        case ACPI_TYPE_REGION:
> +
> +            /* Regions require a region sub-object */
> +
> +            ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION);
> +            ObjDesc->Region.Node = Node;
> +            Node->Object = ObjDesc;
> +            break;
> +
> +        default:
> +            break;
>           }
>
>           External = External->Next;
> diff --git a/src/acpica/source/common/dmrestag.c b/src/acpica/source/common/dmrestag.c
> index 1f0c5fb..9afaad3 100644
> --- a/src/acpica/source/common/dmrestag.c
> +++ b/src/acpica/source/common/dmrestag.c
> @@ -145,6 +145,7 @@ AcpiDmGetResourceTag (
>
>   static char *
>   AcpiGetTagPathname (
> +    ACPI_PARSE_OBJECT       *Op,
>       ACPI_NAMESPACE_NODE     *BufferNode,
>       ACPI_NAMESPACE_NODE     *ResourceNode,
>       UINT32                  BitIndex);
> @@ -515,7 +516,6 @@ AcpiDmCheckResourceReference (
>       ACPI_NAMESPACE_NODE     *BufferNode;
>       ACPI_NAMESPACE_NODE     *ResourceNode;
>       const ACPI_OPCODE_INFO  *OpInfo;
> -    char                    *Pathname;
>       UINT32                  BitIndex;
>
>
> @@ -591,14 +591,7 @@ AcpiDmCheckResourceReference (
>
>       /* Translate the Index to a resource tag pathname */
>
> -    Pathname = AcpiGetTagPathname (BufferNode, ResourceNode, BitIndex);
> -    if (Pathname)
> -    {
> -        /* Complete the conversion of the Index to a symbol */
> -
> -        IndexOp->Common.AmlOpcode = AML_INT_NAMEPATH_OP;
> -        IndexOp->Common.Value.String = Pathname;
> -    }
> +    AcpiGetTagPathname (IndexOp, BufferNode, ResourceNode, BitIndex);
>   }
>
>
> @@ -669,6 +662,7 @@ AcpiDmGetResourceNode (
>
>   static char *
>   AcpiGetTagPathname (
> +    ACPI_PARSE_OBJECT       *IndexOp,
>       ACPI_NAMESPACE_NODE     *BufferNode,
>       ACPI_NAMESPACE_NODE     *ResourceNode,
>       UINT32                  BitIndex)
> @@ -761,6 +755,15 @@ AcpiGetTagPathname (
>
>       AcpiNsInternalizeName (Pathname, &InternalPath);
>       ACPI_FREE (Pathname);
> +
> +    /* Update the Op with the symbol */
> +
> +    AcpiPsInitOp (IndexOp, AML_INT_NAMEPATH_OP);
> +    IndexOp->Common.Value.String = InternalPath;
> +
> +    /* We will need the tag later. Cheat by putting it in the Node field */
> +
> +    IndexOp->Common.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Tag);
>       return (InternalPath);
>   }
>
> diff --git a/src/acpica/source/compiler/Makefile.am b/src/acpica/source/compiler/Makefile.am
> index cee1f4f..b7a72c9 100644
> --- a/src/acpica/source/compiler/Makefile.am
> +++ b/src/acpica/source/compiler/Makefile.am
> @@ -183,6 +183,7 @@ libfwtsiasl_la_SOURCES = \
>   	$(ACPICA_COMMON)/adfile.c \
>   	$(ACPICA_COMMON)/adisasm.c \
>   	$(ACPICA_COMMON)/adwalk.c \
> +	$(ACPICA_COMMON)/ahpredef.c \
>   	$(ACPICA_COMMON)/dmextern.c \
>   	$(ACPICA_COMMON)/dmrestag.c \
>   	$(ACPICA_COMMON)/dmtable.c \
> diff --git a/src/acpica/source/compiler/aslcompile.c b/src/acpica/source/compiler/aslcompile.c
> index 371a6e3..623bc3d 100644
> --- a/src/acpica/source/compiler/aslcompile.c
> +++ b/src/acpica/source/compiler/aslcompile.c
> @@ -131,14 +131,18 @@ CmFlushSourceCode (
>
>   static void
>   FlConsumeAnsiComment (
> -    ASL_FILE_INFO           *FileInfo,
> +    FILE                    *Handle,
>       ASL_FILE_STATUS         *Status);
>
>   static void
>   FlConsumeNewComment (
> -    ASL_FILE_INFO           *FileInfo,
> +    FILE                    *Handle,
>       ASL_FILE_STATUS         *Status);
>
> +static void
> +CmDumpAllEvents (
> +    void);
> +
>
>   /*******************************************************************************
>    *
> @@ -325,7 +329,8 @@ CmFlushSourceCode (
>    *
>    * FUNCTION:    FlConsume*
>    *
> - * PARAMETERS:  FileInfo        - Points to an open input file
> + * PARAMETERS:  Handle              - Open input file
> + *              Status              - File current status struct
>    *
>    * RETURN:      Number of lines consumed
>    *
> @@ -335,14 +340,14 @@ CmFlushSourceCode (
>
>   static void
>   FlConsumeAnsiComment (
> -    ASL_FILE_INFO           *FileInfo,
> +    FILE                    *Handle,
>       ASL_FILE_STATUS         *Status)
>   {
>       UINT8                   Byte;
>       BOOLEAN                 ClosingComment = FALSE;
>
>
> -    while (fread (&Byte, 1, 1, FileInfo->Handle))
> +    while (fread (&Byte, 1, 1, Handle))
>       {
>           /* Scan until comment close is found */
>
> @@ -379,13 +384,13 @@ FlConsumeAnsiComment (
>
>   static void
>   FlConsumeNewComment (
> -    ASL_FILE_INFO           *FileInfo,
> +    FILE                    *Handle,
>       ASL_FILE_STATUS         *Status)
>   {
>       UINT8                   Byte;
>
>
> -    while (fread (&Byte, 1, 1, FileInfo->Handle))
> +    while (fread (&Byte, 1, 1, Handle))
>       {
>           Status->Offset++;
>
> @@ -404,7 +409,9 @@ FlConsumeNewComment (
>    *
>    * FUNCTION:    FlCheckForAscii
>    *
> - * PARAMETERS:  FileInfo        - Points to an open input file
> + * PARAMETERS:  Handle              - Open input file
> + *              Filename            - Input filename
> + *              DisplayErrors       - TRUE if error messages desired
>    *
>    * RETURN:      Status
>    *
> @@ -419,7 +426,9 @@ FlConsumeNewComment (
>
>   ACPI_STATUS
>   FlCheckForAscii (
> -    ASL_FILE_INFO           *FileInfo)
> +    FILE                    *Handle,
> +    char                    *Filename,
> +    BOOLEAN                 DisplayErrors)
>   {
>       UINT8                   Byte;
>       ACPI_SIZE               BadBytes = 0;
> @@ -432,7 +441,7 @@ FlCheckForAscii (
>
>       /* Read the entire file */
>
> -    while (fread (&Byte, 1, 1, FileInfo->Handle))
> +    while (fread (&Byte, 1, 1, Handle))
>       {
>           /* Ignore comment fields (allow non-ascii within) */
>
> @@ -442,12 +451,12 @@ FlCheckForAscii (
>
>               if (Byte == '*')
>               {
> -                FlConsumeAnsiComment (FileInfo, &Status);
> +                FlConsumeAnsiComment (Handle, &Status);
>               }
>
>               if (Byte == '/')
>               {
> -                FlConsumeNewComment (FileInfo, &Status);
> +                FlConsumeNewComment (Handle, &Status);
>               }
>
>               /* Reset */
> @@ -463,7 +472,7 @@ FlCheckForAscii (
>
>           if (!ACPI_IS_ASCII (Byte))
>           {
> -            if (BadBytes < 10)
> +            if ((BadBytes < 10) && (DisplayErrors))
>               {
>                   AcpiOsPrintf (
>                       "Non-ASCII character [0x%2.2X] found in line %u, file offset 0x%.2X\n",
> @@ -485,20 +494,24 @@ FlCheckForAscii (
>
>       /* Seek back to the beginning of the source file */
>
> -    fseek (FileInfo->Handle, 0, SEEK_SET);
> +    fseek (Handle, 0, SEEK_SET);
>
>       /* Were there any non-ASCII characters in the file? */
>
>       if (BadBytes)
>       {
> -        AcpiOsPrintf (
> -            "%u non-ASCII characters found in input source text, could be a binary file\n",
> -            BadBytes);
> -        AslError (ASL_ERROR, ASL_MSG_NON_ASCII, NULL, FileInfo->Filename);
> +        if (DisplayErrors)
> +        {
> +            AcpiOsPrintf (
> +                "%u non-ASCII characters found in input source text, could be a binary file\n",
> +                BadBytes);
> +            AslError (ASL_ERROR, ASL_MSG_NON_ASCII, NULL, Filename);
> +        }
> +
>           return (AE_BAD_CHARACTER);
>       }
>
> -    /* File is OK */
> +    /* File is OK (100% ASCII) */
>
>       return (AE_OK);
>   }
> @@ -780,45 +793,65 @@ CmDoOutputFiles (
>
>   /*******************************************************************************
>    *
> - * FUNCTION:    CmDumpEvent
> + * FUNCTION:    CmDumpAllEvents
>    *
> - * PARAMETERS:  Event           - A compiler event struct
> + * PARAMETERS:  None
>    *
>    * RETURN:      None.
>    *
> - * DESCRIPTION: Dump a compiler event struct
> + * DESCRIPTION: Dump all compiler events
>    *
>    ******************************************************************************/
>
>   static void
> -CmDumpEvent (
> -    ASL_EVENT_INFO          *Event)
> +CmDumpAllEvents (
> +    void)
>   {
> +    ASL_EVENT_INFO          *Event;
>       UINT32                  Delta;
>       UINT32                  USec;
>       UINT32                  MSec;
> +    UINT32                  i;
>
> -    if (!Event->Valid)
> +
> +    Event = AslGbl_Events;
> +
> +    DbgPrint (ASL_DEBUG_OUTPUT, "\n\nElapsed time for major events\n\n");
> +    if (Gbl_CompileTimesFlag)
>       {
> -        return;
> +        printf ("\nElapsed time for major events\n\n");
>       }
>
> -    /* Delta will be in 100-nanosecond units */
> +    for (i = 0; i < AslGbl_NextEvent; i++)
> +    {
> +        if (Event->Valid)
> +        {
> +            /* Delta will be in 100-nanosecond units */
>
> -    Delta = (UINT32) (Event->EndTime - Event->StartTime);
> +            Delta = (UINT32) (Event->EndTime - Event->StartTime);
>
> -    USec = Delta / 10;
> -    MSec = Delta / 10000;
> +            USec = Delta / 10;
> +            MSec = Delta / 10000;
>
> -    /* Round milliseconds up */
> +            /* Round milliseconds up */
>
> -    if ((USec - (MSec * 1000)) >= 500)
> -    {
> -        MSec++;
> -    }
> +            if ((USec - (MSec * 1000)) >= 500)
> +            {
> +                MSec++;
> +            }
>
> -    DbgPrint (ASL_DEBUG_OUTPUT, "%8u usec %8u msec - %s\n",
> -        USec, MSec, Event->EventName);
> +            DbgPrint (ASL_DEBUG_OUTPUT, "%8u usec %8u msec - %s\n",
> +                USec, MSec, Event->EventName);
> +
> +            if (Gbl_CompileTimesFlag)
> +            {
> +                printf ("%8u usec %8u msec - %s\n",
> +                    USec, MSec, Event->EventName);
> +            }
> +        }
> +
> +        Event++;
> +    }
>   }
>
>
> @@ -849,20 +882,12 @@ CmCleanupAndExit (
>           AePrintErrorLog (ASL_FILE_STDOUT);
>       }
>
> -    DbgPrint (ASL_DEBUG_OUTPUT, "\n\nElapsed time for major events\n\n");
> -    for (i = 0; i < AslGbl_NextEvent; i++)
> -    {
> -        CmDumpEvent (&AslGbl_Events[i]);
> -    }
> +    /* Emit compile times if enabled */
> +
> +    CmDumpAllEvents ();
>
>       if (Gbl_CompileTimesFlag)
>       {
> -        printf ("\nElapsed time for major events\n\n");
> -        for (i = 0; i < AslGbl_NextEvent; i++)
> -        {
> -            CmDumpEvent (&AslGbl_Events[i]);
> -        }
> -
>           printf ("\nMiscellaneous compile statistics\n\n");
>           printf ("%11u : %s\n", TotalParseNodes, "Parse nodes");
>           printf ("%11u : %s\n", Gbl_NsLookupCount, "Namespace searches");
> diff --git a/src/acpica/source/compiler/aslcompiler.h b/src/acpica/source/compiler/aslcompiler.h
> index 29558fc..03303f5 100644
> --- a/src/acpica/source/compiler/aslcompiler.h
> +++ b/src/acpica/source/compiler/aslcompiler.h
> @@ -238,7 +238,9 @@ CmCleanupAndExit (
>
>   ACPI_STATUS
>   FlCheckForAscii (
> -    ASL_FILE_INFO           *FileInfo);
> +    FILE                    *Handle,
> +    char                    *Filename,
> +    BOOLEAN                 DisplayErrors);
>
>
>   /*
> @@ -680,6 +682,11 @@ void
>   FlAddIncludeDirectory (
>       char                    *Dir);
>
> +char *
> +FlMergePathnames (
> +    char                    *PrefixDir,
> +    char                    *FilePathname);
> +
>   void
>   FlOpenIncludeFile (
>       ACPI_PARSE_OBJECT       *Op);
> diff --git a/src/acpica/source/compiler/aslcompiler.l b/src/acpica/source/compiler/aslcompiler.l
> index f911072..98f9e7e 100644
> --- a/src/acpica/source/compiler/aslcompiler.l
> +++ b/src/acpica/source/compiler/aslcompiler.l
> @@ -595,6 +595,7 @@ NamePathTail                [.]{NameSeg}
>   "IPMI"                      { count (0); return (PARSEOP_REGIONSPACE_IPMI); }
>   "GeneralPurposeIo"          { count (0); return (PARSEOP_REGIONSPACE_GPIO); }       /* ACPI 5.0 */
>   "GenericSerialBus"          { count (0); return (PARSEOP_REGIONSPACE_GSBUS); }      /* ACPI 5.0 */
> +"PCC"                       { count (0); return (PARSEOP_REGIONSPACE_PCC); }        /* ACPI 5.0 */
>   "FFixedHW"                  { count (0); return (PARSEOP_REGIONSPACE_FFIXEDHW); }
>
>       /* ResourceTypeKeyword: Resource Usage - Resource Descriptors */
> diff --git a/src/acpica/source/compiler/aslcompiler.y b/src/acpica/source/compiler/aslcompiler.y
> index 9aa8b51..9675b1d 100644
> --- a/src/acpica/source/compiler/aslcompiler.y
> +++ b/src/acpica/source/compiler/aslcompiler.y
> @@ -435,6 +435,7 @@ void *                      AslLocalAllocate (unsigned int Size);
>   %token <i> PARSEOP_REGIONSPACE_IO
>   %token <i> PARSEOP_REGIONSPACE_IPMI
>   %token <i> PARSEOP_REGIONSPACE_MEM
> +%token <i> PARSEOP_REGIONSPACE_PCC
>   %token <i> PARSEOP_REGIONSPACE_PCI
>   %token <i> PARSEOP_REGIONSPACE_PCIBAR
>   %token <i> PARSEOP_REGIONSPACE_SMBUS
> @@ -2271,7 +2272,7 @@ AddressKeyword
>       ;
>
>   AddressSpaceKeyword
> -    : ByteConst                             {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);}
> +    : ByteConst                             {$$ = UtCheckIntegerRange ($1, 0x0A, 0xFF);}
>       | RegionSpaceKeyword                    {}
>       ;
>
> @@ -2431,6 +2432,7 @@ RegionSpaceKeyword
>       | PARSEOP_REGIONSPACE_IPMI              {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_IPMI);}
>       | PARSEOP_REGIONSPACE_GPIO              {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GPIO);}
>       | PARSEOP_REGIONSPACE_GSBUS             {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GSBUS);}
> +    | PARSEOP_REGIONSPACE_PCC               {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCC);}
>       | PARSEOP_REGIONSPACE_FFIXEDHW          {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_FFIXEDHW);}
>       ;
>
> diff --git a/src/acpica/source/compiler/aslerror.c b/src/acpica/source/compiler/aslerror.c
> index c93a1a2..4d7c846 100644
> --- a/src/acpica/source/compiler/aslerror.c
> +++ b/src/acpica/source/compiler/aslerror.c
> @@ -387,12 +387,16 @@ AePrintException (
>           }
>           else
>           {
> +            /*
> +             * Less verbose version of the error message, enabled via the
> +             * -vi switch. The format is compatible with MS Visual Studio.
> +             */
>               fprintf (OutputFile, "%s", Enode->Filename);
>
>               if (Enode->LineNumber)
>               {
> -                fprintf (OutputFile, "(%u) i:%6u : ",
> -                    Enode->LineNumber, Enode->LineNumber);
> +                fprintf (OutputFile, "(%u) : ",
> +                    Enode->LineNumber);
>               }
>           }
>       }
> @@ -407,9 +411,18 @@ AePrintException (
>       {
>           /* Decode the message ID */
>
> -        fprintf (OutputFile, "%s %4.4d - ",
> -                    AslErrorLevel[Enode->Level],
> -                    Enode->MessageId + ((Enode->Level+1) * 1000));
> +        if (Gbl_VerboseErrors)
> +        {
> +            fprintf (OutputFile, "%s %4.4d -",
> +                        AslErrorLevel[Enode->Level],
> +                        Enode->MessageId + ((Enode->Level+1) * 1000));
> +        }
> +        else /* IDE case */
> +        {
> +            fprintf (OutputFile, "%s %4.4d:",
> +                        AslErrorLevelIde[Enode->Level],
> +                        Enode->MessageId + ((Enode->Level+1) * 1000));
> +        }
>
>           MainMessage = AslMessages[Enode->MessageId];
>           ExtraMessage = Enode->Message;
> diff --git a/src/acpica/source/compiler/aslfiles.c b/src/acpica/source/compiler/aslfiles.c
> index ef10668..a2512a6 100644
> --- a/src/acpica/source/compiler/aslfiles.c
> +++ b/src/acpica/source/compiler/aslfiles.c
> @@ -564,6 +564,107 @@ FlAddIncludeDirectory (
>
>   /*******************************************************************************
>    *
> + * FUNCTION:    FlMergePathnames
> + *
> + * PARAMETERS:  PrefixDir       - Prefix directory pathname. Can be NULL or
> + *                                a zero length string.
> + *              FilePathname    - The include filename from the source ASL.
> + *
> + * RETURN:      Merged pathname string
> + *
> + * DESCRIPTION: Merge two pathnames that (probably) have common elements, to
> + *              arrive at a minimal length string. Merge can occur if the
> + *              FilePathname is relative to the PrefixDir.
> + *
> + ******************************************************************************/
> +
> +char *
> +FlMergePathnames (
> +    char                    *PrefixDir,
> +    char                    *FilePathname)
> +{
> +    char                    *CommonPath;
> +    char                    *Pathname;
> +    char                    *LastElement;
> +
> +
> +    DbgPrint (ASL_PARSE_OUTPUT, "Include: Prefix path - \"%s\"\n"
> +        "Include: FilePathname - \"%s\"\n",
> +         PrefixDir, FilePathname);
> +
> +    /*
> +     * If there is no prefix directory or if the file pathname is absolute,
> +     * just return the original file pathname
> +     */
> +    if (!PrefixDir || (!*PrefixDir) ||
> +        (*FilePathname == '/') ||
> +         (FilePathname[1] == ':'))
> +    {
> +        Pathname = ACPI_ALLOCATE (strlen (FilePathname) + 1);
> +        strcpy (Pathname, FilePathname);
> +        goto ConvertBackslashes;
> +    }
> +
> +    /* Need a local copy of the prefix directory path */
> +
> +    CommonPath = ACPI_ALLOCATE (strlen (PrefixDir) + 1);
> +    strcpy (CommonPath, PrefixDir);
> +
> +    /*
> +     * Walk forward through the file path, and simultaneously backward
> +     * through the prefix directory path until there are no more
> +     * relative references at the start of the file path.
> +     */
> +    while (*FilePathname && (!strncmp (FilePathname, "../", 3)))
> +    {
> +        /* Remove last element of the prefix directory path */
> +
> +        LastElement = strrchr (CommonPath, '/');
> +        if (!LastElement)
> +        {
> +            goto ConcatenatePaths;
> +        }
> +
> +        *LastElement = 0;   /* Terminate CommonPath string */
> +        FilePathname += 3;  /* Point to next path element */
> +    }
> +
> +    /*
> +     * Remove the last element of the prefix directory path (it is the same as
> +     * the first element of the file pathname), and build the final merged
> +     * pathname.
> +     */
> +    LastElement = strrchr (CommonPath, '/');
> +    if (LastElement)
> +    {
> +        *LastElement = 0;
> +    }
> +
> +    /* Build the final merged pathname */
> +
> +ConcatenatePaths:
> +    Pathname = ACPI_ALLOCATE_ZEROED (strlen (CommonPath) + strlen (FilePathname) + 2);
> +    if (LastElement && *CommonPath)
> +    {
> +        strcpy (Pathname, CommonPath);
> +        strcat (Pathname, "/");
> +    }
> +    strcat (Pathname, FilePathname);
> +    ACPI_FREE (CommonPath);
> +
> +    /* Convert all backslashes to normal slashes */
> +
> +ConvertBackslashes:
> +    UtConvertBackslashes (Pathname);
> +
> +    DbgPrint (ASL_PARSE_OUTPUT, "Include: Merged Pathname - \"%s\"\n",
> +         Pathname);
> +    return (Pathname);
> +}
> +
> +
> +/*******************************************************************************
> + *
>    * FUNCTION:    FlOpenIncludeWithPrefix
>    *
>    * PARAMETERS:  PrefixDir       - Prefix directory pathname. Can be a zero
> @@ -587,12 +688,9 @@ FlOpenIncludeWithPrefix (
>
>       /* Build the full pathname to the file */
>
> -    Pathname = ACPI_ALLOCATE (strlen (PrefixDir) + strlen (Filename) + 1);
> -
> -    strcpy (Pathname, PrefixDir);
> -    strcat (Pathname, Filename);
> +    Pathname = FlMergePathnames (PrefixDir, Filename);
>
> -    DbgPrint (ASL_PARSE_OUTPUT, "\nAttempt to open include file: path %s\n\n",
> +    DbgPrint (ASL_PARSE_OUTPUT, "Include: Opening file - \"%s\"\n\n",
>           Pathname);
>
>       /* Attempt to open the file, push if successful */
> @@ -728,7 +826,7 @@ FlOpenInputFile (
>
>       /* Open the input ASL file, text mode */
>
> -    FlOpenFile (ASL_FILE_INPUT, InputFilename, "r");
> +    FlOpenFile (ASL_FILE_INPUT, InputFilename, "rt");
>       AslCompilerin = Gbl_Files[ASL_FILE_INPUT].Handle;
>
>       return (AE_OK);
> @@ -812,7 +910,7 @@ FlOpenMiscOutputFiles (
>
>           /* Open the hex file, text mode */
>
> -        FlOpenFile (ASL_FILE_HEX_OUTPUT, Filename, "w+");
> +        FlOpenFile (ASL_FILE_HEX_OUTPUT, Filename, "w+t");
>
>           AslCompilerSignon (ASL_FILE_HEX_OUTPUT);
>           AslCompilerFileHeader (ASL_FILE_HEX_OUTPUT);
> @@ -863,7 +961,7 @@ FlOpenMiscOutputFiles (
>
>           /* Open the listing file, text mode */
>
> -        FlOpenFile (ASL_FILE_LISTING_OUTPUT, Filename, "w+");
> +        FlOpenFile (ASL_FILE_LISTING_OUTPUT, Filename, "w+t");
>
>           AslCompilerSignon (ASL_FILE_LISTING_OUTPUT);
>           AslCompilerFileHeader (ASL_FILE_LISTING_OUTPUT);
> @@ -881,7 +979,7 @@ FlOpenMiscOutputFiles (
>               return (AE_ERROR);
>           }
>
> -        FlOpenFile (ASL_FILE_PREPROCESSOR, Filename, "w+b");
> +        FlOpenFile (ASL_FILE_PREPROCESSOR, Filename, "w+t");
>       }
>
>       /* All done for data table compiler */
> @@ -926,7 +1024,7 @@ FlOpenMiscOutputFiles (
>
>           /* Open the assembly code source file, text mode */
>
> -        FlOpenFile (ASL_FILE_ASM_SOURCE_OUTPUT, Filename, "w+");
> +        FlOpenFile (ASL_FILE_ASM_SOURCE_OUTPUT, Filename, "w+t");
>
>           AslCompilerSignon (ASL_FILE_ASM_SOURCE_OUTPUT);
>           AslCompilerFileHeader (ASL_FILE_ASM_SOURCE_OUTPUT);
> @@ -946,7 +1044,7 @@ FlOpenMiscOutputFiles (
>
>           /* Open the C code source file, text mode */
>
> -        FlOpenFile (ASL_FILE_C_SOURCE_OUTPUT, Filename, "w+");
> +        FlOpenFile (ASL_FILE_C_SOURCE_OUTPUT, Filename, "w+t");
>
>           FlPrintFile (ASL_FILE_C_SOURCE_OUTPUT, "/*\n");
>           AslCompilerSignon (ASL_FILE_C_SOURCE_OUTPUT);
> @@ -967,7 +1065,7 @@ FlOpenMiscOutputFiles (
>
>           /* Open the assembly include file, text mode */
>
> -        FlOpenFile (ASL_FILE_ASM_INCLUDE_OUTPUT, Filename, "w+");
> +        FlOpenFile (ASL_FILE_ASM_INCLUDE_OUTPUT, Filename, "w+t");
>
>           AslCompilerSignon (ASL_FILE_ASM_INCLUDE_OUTPUT);
>           AslCompilerFileHeader (ASL_FILE_ASM_INCLUDE_OUTPUT);
> @@ -987,7 +1085,7 @@ FlOpenMiscOutputFiles (
>
>           /* Open the C include file, text mode */
>
> -        FlOpenFile (ASL_FILE_C_INCLUDE_OUTPUT, Filename, "w+");
> +        FlOpenFile (ASL_FILE_C_INCLUDE_OUTPUT, Filename, "w+t");
>
>           FlPrintFile (ASL_FILE_C_INCLUDE_OUTPUT, "/*\n");
>           AslCompilerSignon (ASL_FILE_C_INCLUDE_OUTPUT);
> @@ -1008,7 +1106,7 @@ FlOpenMiscOutputFiles (
>
>           /* Open the namespace file, text mode */
>
> -        FlOpenFile (ASL_FILE_NAMESPACE_OUTPUT, Filename, "w+");
> +        FlOpenFile (ASL_FILE_NAMESPACE_OUTPUT, Filename, "w+t");
>
>           AslCompilerSignon (ASL_FILE_NAMESPACE_OUTPUT);
>           AslCompilerFileHeader (ASL_FILE_NAMESPACE_OUTPUT);
> diff --git a/src/acpica/source/compiler/asllookup.c b/src/acpica/source/compiler/asllookup.c
> index 0d92c91..8f8dc5d 100644
> --- a/src/acpica/source/compiler/asllookup.c
> +++ b/src/acpica/source/compiler/asllookup.c
> @@ -1170,7 +1170,7 @@ LkNamespaceLocateBegin (
>
>               if (Message)
>               {
> -                sprintf (MsgBuffer, "Tag: %u bit%s, Field: %u bit%s",
> +                sprintf (MsgBuffer, "Size mismatch, Tag: %u bit%s, Field: %u bit%s",
>                       TagBitLength, (TagBitLength > 1) ? "s" : "",
>                       FieldBitLength, (FieldBitLength > 1) ? "s" : "");
>
> diff --git a/src/acpica/source/compiler/aslmain.c b/src/acpica/source/compiler/aslmain.c
> index 285d765..efd5906 100644
> --- a/src/acpica/source/compiler/aslmain.c
> +++ b/src/acpica/source/compiler/aslmain.c
> @@ -135,7 +135,7 @@ Options (
>       void);
>
>   static void
> -HelpMessage (
> +FilenameHelp (
>       void);
>
>   static void
> @@ -168,7 +168,7 @@ AslDoResponseFile (
>
>
>   #define ASL_TOKEN_SEPARATORS    " \t\n"
> -#define ASL_SUPPORTED_OPTIONS   "@:2b|c|d^D:e:fgh^i|I:l^mno|p:P^r:s|t|T:G^v|w|x:z"
> +#define ASL_SUPPORTED_OPTIONS   "@:2b|c|d^D:e:fgh^i|I:l^mno|p:P^r:s|t|T:G^v^w|x:z"
>
>
>   /*******************************************************************************
> @@ -191,6 +191,7 @@ Options (
>       printf ("\nGlobal:\n");
>       ACPI_OPTION ("-@ <file>",       "Specify command file");
>       ACPI_OPTION ("-I <dir>",        "Specify additional include directory");
> +    ACPI_OPTION ("-v",              "Display compiler version");
>
>       printf ("\nPreprocessor:\n");
>       ACPI_OPTION ("-D <symbol>",     "Define symbol for preprocessor use");
> @@ -242,27 +243,36 @@ Options (
>       ACPI_OPTION ("-g",              "Get ACPI tables and write to files (*.dat)");
>
>       printf ("\nHelp:\n");
> -    ACPI_OPTION ("-h",              "Additional help and compiler debug options");
> +    ACPI_OPTION ("-h",              "This message");
>       ACPI_OPTION ("-hc",             "Display operators allowed in constant expressions");
> +    ACPI_OPTION ("-hf",             "Display help for output filename generation");
>       ACPI_OPTION ("-hr",             "Display ACPI reserved method names");
>       ACPI_OPTION ("-ht",             "Display currently supported ACPI table names");
> +
> +    printf ("\nDebug Options:\n");
> +    ACPI_OPTION ("-bf -bt",         "Create debug file (full or parse tree only) (*.txt)");
> +    ACPI_OPTION ("-f",              "Ignore errors, force creation of AML output file(s)");
> +    ACPI_OPTION ("-n",              "Parse only, no output generation");
> +    ACPI_OPTION ("-ot",             "Display compile times and statistics");
> +    ACPI_OPTION ("-x <level>",      "Set debug level for trace output");
> +    ACPI_OPTION ("-z",              "Do not insert new compiler ID for DataTables");
>   }
>
>
>   /*******************************************************************************
>    *
> - * FUNCTION:    HelpMessage
> + * FUNCTION:    FilenameHelp
>    *
>    * PARAMETERS:  None
>    *
>    * RETURN:      None
>    *
> - * DESCRIPTION: Display help message
> + * DESCRIPTION: Display help message for output filename generation
>    *
>    ******************************************************************************/
>
>   static void
> -HelpMessage (
> +FilenameHelp (
>       void)
>   {
>
> @@ -274,17 +284,6 @@ HelpMessage (
>       printf ("    2) The prefix of the AMLFileName in the ASL Definition Block\n");
>       printf ("    3) The prefix of the input filename\n");
>       printf ("\n");
> -
> -    Options ();
> -
> -    printf ("\nCompiler/Disassembler Debug Options:\n");
> -    ACPI_OPTION ("-bb -bp -bt",     "Create compiler debug/trace file (*.txt)");
> -    ACPI_OPTION ("",                "Types: Parse/Tree/Both");
> -    ACPI_OPTION ("-f",              "Ignore errors, force creation of AML output file(s)");
> -    ACPI_OPTION ("-n",              "Parse only, no output generation");
> -    ACPI_OPTION ("-ot",             "Display compile times");
> -    ACPI_OPTION ("-x <level>",      "Set debug level for trace output");
> -    ACPI_OPTION ("-z",              "Do not insert new compiler ID for DataTables");
>   }
>
>
> @@ -502,13 +501,7 @@ AslDoOptions (
>       case 'b':   /* Debug output options */
>           switch (AcpiGbl_Optarg[0])
>           {
> -        case 'b':
> -            AslCompilerdebug = 1; /* same as yydebug */
> -            DtParserdebug = 1;
> -            PrParserdebug = 1;
> -            break;
> -
> -        case 'p':
> +        case 'f':
>               AslCompilerdebug = 1; /* same as yydebug */
>               DtParserdebug = 1;
>               PrParserdebug = 1;
> @@ -602,13 +595,17 @@ AslDoOptions (
>           switch (AcpiGbl_Optarg[0])
>           {
>           case '^':
> -            HelpMessage ();
> +            Usage ();
>               exit (0);
>
>           case 'c':
>               UtDisplayConstantOpcodes ();
>               exit (0);
>
> +        case 'f':
> +            FilenameHelp ();
> +            exit (0);
> +
>           case 'r':
>               /* reserved names */
>
> @@ -827,9 +824,13 @@ AslDoOptions (
>           break;
>
>
> -    case 'v':   /* Verbosity settings */
> +    case 'v':   /* Version and verbosity settings */
>           switch (AcpiGbl_Optarg[0])
>           {
> +        case '^':
> +            printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
> +            exit (0);
> +
>           case 'a':
>               /* Disable All error/warning messages */
>
> @@ -837,9 +838,18 @@ AslDoOptions (
>               break;
>
>           case 'i':
> -            /* Less verbose error messages */
> -
> +            /*
> +             * Support for integrated development environment(s).
> +             *
> +             * 1) No compiler signon
> +             * 2) Send stderr messages to stdout
> +             * 3) Less verbose error messages (single line only for each)
> +             * 4) Error/warning messages are formatted appropriately to
> +             *    be recognized by MS Visual Studio
> +             */
>               Gbl_VerboseErrors = FALSE;
> +            Gbl_DoSignon = FALSE;
> +            Gbl_Files[ASL_FILE_STDERR].Handle = stdout;
>               break;
>
>           case 'o':
> diff --git a/src/acpica/source/compiler/aslmap.c b/src/acpica/source/compiler/aslmap.c
> index 498ca42..c276972 100644
> --- a/src/acpica/source/compiler/aslmap.c
> +++ b/src/acpica/source/compiler/aslmap.c
> @@ -439,6 +439,7 @@ const ASL_MAPPING_ENTRY     AslKeywordMapping [] =
>   /* REGIONSPACE_IO */            OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_SYSTEM_IO,       0,                  0),
>   /* REGIONSPACE_IPMI */          OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_IPMI,            0,                  0),
>   /* REGIONSPACE_MEM */           OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_SYSTEM_MEMORY,   0,                  0),
> +/* REGIONSPACE_PCC */           OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_PLATFORM_COMM,   0,                  0),
>   /* REGIONSPACE_PCI */           OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_PCI_CONFIG,      0,                  0),
>   /* REGIONSPACE_PCIBAR */        OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_PCI_BAR_TARGET,  0,                  0),
>   /* REGIONSPACE_SMBUS */         OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_SMBUS,           0,                  0),
> diff --git a/src/acpica/source/compiler/aslmessages.h b/src/acpica/source/compiler/aslmessages.h
> index 4e5bb31..56951bc 100644
> --- a/src/acpica/source/compiler/aslmessages.h
> +++ b/src/acpica/source/compiler/aslmessages.h
> @@ -474,7 +474,7 @@ char                        *AslMessages [] = {
>   };
>
>
> -char                    *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = {
> +const char              *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = {
>       "Warning ",
>       "Warning ",
>       "Warning ",
> @@ -483,6 +483,15 @@ char                    *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = {
>       "Optimize"
>   };
>
> +const char              *AslErrorLevelIde [ASL_NUM_REPORT_LEVELS] = {
> +    "warning ",
> +    "warning ",
> +    "warning ",
> +    "error   ",
> +    "remark  ",
> +    "optimize"
> +};
> +
>   #define ASL_ERROR_LEVEL_LENGTH          8       /* Length of strings above */
>
>   #endif  /* ASL_EXCEPTIONS */
> diff --git a/src/acpica/source/compiler/aslstartup.c b/src/acpica/source/compiler/aslstartup.c
> index 49b25d9..2fbe0d3 100644
> --- a/src/acpica/source/compiler/aslstartup.c
> +++ b/src/acpica/source/compiler/aslstartup.c
> @@ -299,7 +299,7 @@ AslDetectSourceFileType (
>
>       /* Check for 100% ASCII source file (comments are ignored) */
>
> -    Status = FlCheckForAscii (Info);
> +    Status = FlCheckForAscii (Info->Handle, Info->Filename, TRUE);
>       if (ACPI_FAILURE (Status))
>       {
>           printf ("Non-ascii input file - %s\n", Info->Filename);
> diff --git a/src/acpica/source/compiler/aslsupport.l b/src/acpica/source/compiler/aslsupport.l
> index cdaf2b8..0ce5a20 100644
> --- a/src/acpica/source/compiler/aslsupport.l
> +++ b/src/acpica/source/compiler/aslsupport.l
> @@ -164,19 +164,23 @@ static void
>   AslDoLineDirective (
>       void)
>   {
> -    char                    c;
> +    int                     c;
>       char                    *Token;
>       UINT32                  LineNumber;
>       char                    *Filename;
> +    UINT32                  i;
>
>
>       /* Eat the entire line that contains the #line directive */
>
> -    while ((c = (char) input()) != '\n' && c != EOF)
> +    Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
> +
> +    while ((c = input()) != '\n' && c != EOF)
>       {
> -        AslInsertLineBuffer (c);
> +        *Gbl_LineBufPtr = c;
> +        Gbl_LineBufPtr++;
>       }
> -    AslInsertLineBuffer (0);
> +    *Gbl_LineBufPtr = 0;
>
>       /* First argument is the actual line number */
>
> @@ -186,10 +190,23 @@ AslDoLineDirective (
>           goto ResetAndExit;
>       }
>
> -    /* Convert line number. Subtract one to handle _this_ line */
> +    /* First argument is the line number */
>
>       LineNumber = (UINT32) UtDoConstant (Token);
> -    FlSetLineNumber (LineNumber - 1);
> +
> +    /* Emit the appropriate number of newlines */
> +
> +    Gbl_CurrentColumn = 0;
> +    if (LineNumber > Gbl_CurrentLineNumber)
> +    {
> +        for (i = 0; i < (LineNumber - Gbl_CurrentLineNumber); i++)
> +        {
> +            FlWriteFile (ASL_FILE_SOURCE_OUTPUT, "\n", 1);
> +            Gbl_CurrentColumn++;
> +        }
> +    }
> +
> +    FlSetLineNumber (LineNumber);
>
>       /* Second argument is the optional filename (in double quotes) */
>
> @@ -204,7 +221,12 @@ AslDoLineDirective (
>       /* Third argument is not supported at this time */
>
>   ResetAndExit:
> -    AslResetCurrentLineBuffer ();
> +
> +    /* Reset globals for a new line */
> +
> +    Gbl_CurrentLineOffset += Gbl_CurrentColumn;
> +    Gbl_CurrentColumn = 0;
> +    Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
>   }
>
>
> @@ -480,8 +502,8 @@ static char
>   AslDoComment (
>       void)
>   {
> -    char                c;
> -    char                c1 = 0;
> +    int                 c;
> +    int                 c1 = 0;
>
>
>       AslInsertLineBuffer ('/');
> @@ -491,7 +513,7 @@ loop:
>
>       /* Eat chars until end-of-comment */
>
> -    while ((c = (char) input()) != '*' && c != EOF)
> +    while ((c = input()) != '*' && c != EOF)
>       {
>           AslInsertLineBuffer (c);
>           c1 = c;
> @@ -518,7 +540,7 @@ loop:
>
>       AslInsertLineBuffer (c);
>
> -    if ((c1 = (char) input()) != '/' && c1 != EOF)
> +    if ((c1 = input()) != '/' && c1 != EOF)
>       {
>           unput(c1);
>           goto loop;
> @@ -561,13 +583,13 @@ static char
>   AslDoCommentType2 (
>       void)
>   {
> -    char                c;
> +    int                 c;
>
>
>       AslInsertLineBuffer ('/');
>       AslInsertLineBuffer ('/');
>
> -    while ((c = (char) input()) != '\n' && c != EOF)
> +    while ((c = input()) != '\n' && c != EOF)
>       {
>           AslInsertLineBuffer (c);
>       }
> @@ -603,7 +625,7 @@ AslDoStringLiteral (
>       char                *StringBuffer = MsgBuffer;
>       char                *EndBuffer = MsgBuffer + ASL_MSG_BUFFER_SIZE;
>       char                *CleanString;
> -    char                StringChar;
> +    int                 StringChar;
>       UINT32              State = ASL_NORMAL_CHAR;
>       UINT32              i = 0;
>       UINT8               Digit;
> @@ -616,7 +638,7 @@ AslDoStringLiteral (
>        * source line buffer.
>        */
>       AslInsertLineBuffer ('\"');
> -    while ((StringChar = (char) input()) != EOF)
> +    while ((StringChar = input()) != EOF)
>       {
>           AslInsertLineBuffer (StringChar);
>
> diff --git a/src/acpica/source/compiler/aslutils.c b/src/acpica/source/compiler/aslutils.c
> index 8a7dbba..de7ea0d 100644
> --- a/src/acpica/source/compiler/aslutils.c
> +++ b/src/acpica/source/compiler/aslutils.c
> @@ -211,7 +211,7 @@ UtDisplaySupportedTables (
>
>   /*******************************************************************************
>    *
> - * FUNCTION:    AcpiPsDisplayConstantOpcodes
> + * FUNCTION:    UtDisplayConstantOpcodes
>    *
>    * PARAMETERS:  None
>    *
> @@ -244,11 +244,11 @@ UtDisplayConstantOpcodes (
>    *
>    * FUNCTION:    UtLocalCalloc
>    *
> - * PARAMETERS:  Size        - Bytes to be allocated
> + * PARAMETERS:  Size                - Bytes to be allocated
>    *
> - * RETURN:      Pointer to the allocated memory.  Guaranteed to be valid.
> + * RETURN:      Pointer to the allocated memory. Guaranteed to be valid.
>    *
> - * DESCRIPTION: Allocate zero-initialized memory.  Aborts the compile on an
> + * DESCRIPTION: Allocate zero-initialized memory. Aborts the compile on an
>    *              allocation failure, on the assumption that nothing more can be
>    *              accomplished.
>    *
> @@ -283,9 +283,9 @@ UtLocalCalloc (
>    *
>    * FUNCTION:    UtBeginEvent
>    *
> - * PARAMETERS:  Name        - Ascii name of this event
> + * PARAMETERS:  Name                - Ascii name of this event
>    *
> - * RETURN:      Event       - Event number (integer index)
> + * RETURN:      Event number (integer index)
>    *
>    * DESCRIPTION: Saves the current time with this event
>    *
> @@ -316,7 +316,7 @@ UtBeginEvent (
>    *
>    * FUNCTION:    UtEndEvent
>    *
> - * PARAMETERS:  Event       - Event number (integer index)
> + * PARAMETERS:  Event               - Event number (integer index)
>    *
>    * RETURN:      None
>    *
> @@ -326,7 +326,7 @@ UtBeginEvent (
>
>   void
>   UtEndEvent (
> -    UINT8                  Event)
> +    UINT8                   Event)
>   {
>
>       if (Event >= ASL_NUM_EVENTS)
> @@ -344,7 +344,7 @@ UtEndEvent (
>    *
>    * FUNCTION:    UtHexCharToValue
>    *
> - * PARAMETERS:  HexChar         - Hex character in Ascii
> + * PARAMETERS:  HexChar             - Hex character in Ascii
>    *
>    * RETURN:      The binary value of the hex character
>    *
> @@ -375,12 +375,13 @@ UtHexCharToValue (
>    *
>    * FUNCTION:    UtConvertByteToHex
>    *
> - * PARAMETERS:  RawByte         - Binary data
> - *              Buffer          - Pointer to where the hex bytes will be stored
> + * PARAMETERS:  RawByte             - Binary data
> + *              Buffer              - Pointer to where the hex bytes will be
> + *                                    stored
>    *
>    * RETURN:      Ascii hex byte is stored in Buffer.
>    *
> - * DESCRIPTION: Perform hex-to-ascii translation.  The return data is prefixed
> + * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed
>    *              with "0x"
>    *
>    ******************************************************************************/
> @@ -403,12 +404,13 @@ UtConvertByteToHex (
>    *
>    * FUNCTION:    UtConvertByteToAsmHex
>    *
> - * PARAMETERS:  RawByte         - Binary data
> - *              Buffer          - Pointer to where the hex bytes will be stored
> + * PARAMETERS:  RawByte             - Binary data
> + *              Buffer              - Pointer to where the hex bytes will be
> + *                                    stored
>    *
>    * RETURN:      Ascii hex byte is stored in Buffer.
>    *
> - * DESCRIPTION: Perform hex-to-ascii translation.  The return data is prefixed
> + * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed
>    *              with "0x"
>    *
>    ******************************************************************************/
> @@ -430,13 +432,13 @@ UtConvertByteToAsmHex (
>    *
>    * FUNCTION:    DbgPrint
>    *
> - * PARAMETERS:  Type            - Type of output
> - *              Fmt             - Printf format string
> - *              ...             - variable printf list
> + * PARAMETERS:  Type                - Type of output
> + *              Fmt                 - Printf format string
> + *              ...                 - variable printf list
>    *
>    * RETURN:      None
>    *
> - * DESCRIPTION: Conditional print statement.  Prints to stderr only if the
> + * DESCRIPTION: Conditional print statement. Prints to stderr only if the
>    *              debug flag is set.
>    *
>    ******************************************************************************/
> @@ -510,7 +512,7 @@ UtPrintFormattedName (
>    *
>    * FUNCTION:    UtSetParseOpName
>    *
> - * PARAMETERS:  Op
> + * PARAMETERS:  Op                  - Parse op to be named.
>    *
>    * RETURN:      None
>    *
> @@ -532,7 +534,7 @@ UtSetParseOpName (
>    *
>    * FUNCTION:    UtDisplaySummary
>    *
> - * PARAMETERS:  FileID          - ID of outpout file
> + * PARAMETERS:  FileID              - ID of outpout file
>    *
>    * RETURN:      None
>    *
> @@ -643,11 +645,11 @@ UtDisplaySummary (
>
>   /*******************************************************************************
>    *
> - * FUNCTION:    UtDisplaySummary
> + * FUNCTION:    UtCheckIntegerRange
>    *
> - * PARAMETERS:  Op              - Integer parse node
> - *              LowValue        - Smallest allowed value
> - *              HighValue       - Largest allowed value
> + * PARAMETERS:  Op                  - Integer parse node
> + *              LowValue            - Smallest allowed value
> + *              HighValue           - Largest allowed value
>    *
>    * RETURN:      Op if OK, otherwise NULL
>    *
> @@ -698,11 +700,11 @@ UtCheckIntegerRange (
>    *
>    * FUNCTION:    UtGetStringBuffer
>    *
> - * PARAMETERS:  Length          - Size of buffer requested
> + * PARAMETERS:  Length              - Size of buffer requested
>    *
> - * RETURN:      Pointer to the buffer.  Aborts on allocation failure
> + * RETURN:      Pointer to the buffer. Aborts on allocation failure
>    *
> - * DESCRIPTION: Allocate a string buffer.  Bypass the local
> + * DESCRIPTION: Allocate a string buffer. Bypass the local
>    *              dynamic memory manager for performance reasons (This has a
>    *              major impact on the speed of the compiler.)
>    *
> @@ -733,8 +735,8 @@ UtGetStringBuffer (
>    *
>    * FUNCTION:    UtInternalizeName
>    *
> - * PARAMETERS:  ExternalName            - Name to convert
> - *              ConvertedName           - Where the converted name is returned
> + * PARAMETERS:  ExternalName        - Name to convert
> + *              ConvertedName       - Where the converted name is returned
>    *
>    * RETURN:      Status
>    *
> @@ -786,8 +788,8 @@ UtInternalizeName (
>    *
>    * FUNCTION:    UtPadNameWithUnderscores
>    *
> - * PARAMETERS:  NameSeg         - Input nameseg
> - *              PaddedNameSeg   - Output padded nameseg
> + * PARAMETERS:  NameSeg             - Input nameseg
> + *              PaddedNameSeg       - Output padded nameseg
>    *
>    * RETURN:      Padded nameseg.
>    *
> @@ -824,8 +826,8 @@ UtPadNameWithUnderscores (
>    *
>    * FUNCTION:    UtAttachNameseg
>    *
> - * PARAMETERS:  Op              - Parent parse node
> - *              Name            - Full ExternalName
> + * PARAMETERS:  Op                  - Parent parse node
> + *              Name                - Full ExternalName
>    *
>    * RETURN:      None; Sets the NameSeg field in parent node
>    *
> @@ -881,12 +883,12 @@ UtAttachNameseg (
>    *
>    * FUNCTION:    UtAttachNamepathToOwner
>    *
> - * PARAMETERS:  Op            - Parent parse node
> - *              NameOp        - Node that contains the name
> + * PARAMETERS:  Op                  - Parent parse node
> + *              NameOp              - Node that contains the name
>    *
>    * RETURN:      Sets the ExternalName and Namepath in the parent node
>    *
> - * DESCRIPTION: Store the name in two forms in the parent node:  The original
> + * DESCRIPTION: Store the name in two forms in the parent node: The original
>    *              (external) name, and the internalized name that is used within
>    *              the ACPI namespace manager.
>    *
> @@ -926,11 +928,11 @@ UtAttachNamepathToOwner (
>    *
>    * FUNCTION:    UtDoConstant
>    *
> - * PARAMETERS:  String      - Hex, Octal, or Decimal string
> + * PARAMETERS:  String              - Hex, Octal, or Decimal string
>    *
>    * RETURN:      Converted Integer
>    *
> - * DESCRIPTION: Convert a string to an integer.  With error checking.
> + * DESCRIPTION: Convert a string to an integer, with error checking.
>    *
>    ******************************************************************************/
>
> @@ -961,10 +963,10 @@ UtDoConstant (
>    *
>    * FUNCTION:    UtStrtoul64
>    *
> - * PARAMETERS:  String          - Null terminated string
> - *              Terminater      - Where a pointer to the terminating byte is
> - *                                returned
> - *              Base            - Radix of the string
> + * PARAMETERS:  String              - Null terminated string
> + *              Terminater          - Where a pointer to the terminating byte
> + *                                    is returned
> + *              Base                - Radix of the string
>    *
>    * RETURN:      Converted value
>    *
> @@ -1144,5 +1146,3 @@ ErrorExit:
>
>       return (Status);
>   }
> -
> -
> diff --git a/src/acpica/source/compiler/dtio.c b/src/acpica/source/compiler/dtio.c
> index 91d4aba..7a68e84 100644
> --- a/src/acpica/source/compiler/dtio.c
> +++ b/src/acpica/source/compiler/dtio.c
> @@ -161,6 +161,7 @@ DtDumpBuffer (
>   #define DT_SLASH_SLASH_COMMENT      4
>   #define DT_END_COMMENT              5
>   #define DT_MERGE_LINES              6
> +#define DT_ESCAPE_SEQUENCE          7
>
>   static UINT32  Gbl_NextLineOffset;
>
> @@ -498,7 +499,6 @@ DtGetNextLine (
>               {
>               case DT_START_QUOTED_STRING:
>               case DT_SLASH_ASTERISK_COMMENT:
> -            case DT_SLASH_SLASH_COMMENT:
>
>                   AcpiOsPrintf ("**** EOF within comment/string %u\n", State);
>                   break;
> @@ -507,7 +507,22 @@ DtGetNextLine (
>                   break;
>               }
>
> -            return (ASL_EOF);
> +            /* Standalone EOF is OK */
> +
> +            if (i == 0)
> +            {
> +                return (ASL_EOF);
> +            }
> +
> +            /*
> +             * Received an EOF in the middle of a line. Terminate the
> +             * line with a newline. The next call to this function will
> +             * return a standalone EOF. Thus, the upper parsing software
> +             * never has to deal with an EOF within a valid line (or
> +             * the last line does not get tossed on the floor.)
> +             */
> +            c = '\n';
> +            State = DT_NORMAL_TEXT;
>           }
>
>           switch (State)
> @@ -576,12 +591,36 @@ DtGetNextLine (
>               Gbl_CurrentLineBuffer[i] = c;
>               i++;
>
> -            if (c == '"')
> +            switch (c)
>               {
> +            case '"':
>                   State = DT_NORMAL_TEXT;
> +                break;
> +
> +            case '\\':
> +                State = DT_ESCAPE_SEQUENCE;
> +                break;
> +
> +            case '\n':
> +                AcpiOsPrintf ("ERROR at line %u: Unterminated quoted string\n",
> +                    Gbl_CurrentLineNumber++);
> +                State = DT_NORMAL_TEXT;
> +                break;
> +
> +            default:    /* Get next character */
> +                break;
>               }
>               break;
>
> +        case DT_ESCAPE_SEQUENCE:
> +
> +            /* Just copy the escaped character. TBD: sufficient for table compiler? */
> +
> +            Gbl_CurrentLineBuffer[i] = c;
> +            i++;
> +            State = DT_START_QUOTED_STRING;
> +            break;
> +
>           case DT_START_COMMENT:
>
>               /* Open comment if this character is an asterisk or slash */
> diff --git a/src/acpica/source/compiler/dttemplate.c b/src/acpica/source/compiler/dttemplate.c
> index ed5f79b..1d92b78 100644
> --- a/src/acpica/source/compiler/dttemplate.c
> +++ b/src/acpica/source/compiler/dttemplate.c
> @@ -298,7 +298,7 @@ DtCreateAllTemplates (
>       }
>
>       /*
> -     * Create the "special ACPI tables:
> +     * Create the special ACPI tables:
>        * 1) DSDT/SSDT are AML tables, not data tables
>        * 2) FACS and RSDP have non-standard headers
>        */
> diff --git a/src/acpica/source/compiler/prscan.c b/src/acpica/source/compiler/prscan.c
> index e98e186..687af45 100644
> --- a/src/acpica/source/compiler/prscan.c
> +++ b/src/acpica/source/compiler/prscan.c
> @@ -726,7 +726,7 @@ PrDoDirective (
>           }
>
>           DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
> -            "Start #include file %s\n", Gbl_CurrentLineNumber,
> +            "Start #include file \"%s\"\n", Gbl_CurrentLineNumber,
>               Token, Gbl_CurrentLineNumber);
>
>           PrOpenIncludeFile (Token);
> diff --git a/src/acpica/source/compiler/prutils.c b/src/acpica/source/compiler/prutils.c
> index a5fb46a..64dc9e8 100644
> --- a/src/acpica/source/compiler/prutils.c
> +++ b/src/acpica/source/compiler/prutils.c
> @@ -318,13 +318,11 @@ PrOpenIncludeFile (
>       ASL_INCLUDE_DIR         *NextDir;
>
>
> -    /*
> -     * start the actual include file on the next line
> -     */
> +    /* Start the actual include file on the next line */
> +
>       Gbl_CurrentLineOffset++;
>
>       /* Attempt to open the include file */
> -
>       /* If the file specifies an absolute path, just open it */
>
>       if ((Filename[0] == '/')  ||
> @@ -402,13 +400,10 @@ PrOpenIncludeWithPrefix (
>
>       /* Build the full pathname to the file */
>
> -    Pathname = ACPI_ALLOCATE (strlen (PrefixDir) + strlen (Filename) + 1);
> +    Pathname = FlMergePathnames (PrefixDir, Filename);
>
> -    strcpy (Pathname, PrefixDir);
> -    strcat (Pathname, Filename);
> -
> -    DbgPrint (ASL_PARSE_OUTPUT, "\n" PR_PREFIX_ID
> -        "Opening include file: path %s\n",
> +    DbgPrint (ASL_PARSE_OUTPUT, PR_PREFIX_ID
> +        "Include: Opening file - \"%s\"\n",
>           Gbl_CurrentLineNumber, Pathname);
>
>       /* Attempt to open the file, push if successful */
> diff --git a/src/acpica/source/components/debugger/dbcmds.c b/src/acpica/source/components/debugger/dbcmds.c
> index 4c34a79..27aa4cd 100644
> --- a/src/acpica/source/components/debugger/dbcmds.c
> +++ b/src/acpica/source/components/debugger/dbcmds.c
> @@ -326,12 +326,53 @@ AcpiDbDisplayTableInfo (
>       ACPI_STATUS             Status;
>
>
> +    /* Header */
> +
> +    AcpiOsPrintf ("Idx ID Status    Type            Sig  Address  Len   Header\n");
> +
>       /* Walk the entire root table list */
>
>       for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++)
>       {
>           TableDesc = &AcpiGbl_RootTableList.Tables[i];
> -        AcpiOsPrintf ("%u ", i);
> +
> +        /* Index and Table ID */
> +
> +        AcpiOsPrintf ("%3u %.2u ", i, TableDesc->OwnerId);
> +
> +        /* Decode the table flags */
> +
> +        if (!(TableDesc->Flags & ACPI_TABLE_IS_LOADED))
> +        {
> +            AcpiOsPrintf ("NotLoaded ");
> +        }
> +        else
> +        {
> +            AcpiOsPrintf ("   Loaded ");
> +        }
> +
> +        switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK)
> +        {
> +        case ACPI_TABLE_ORIGIN_UNKNOWN:
> +            AcpiOsPrintf ("Unknown   ");
> +            break;
> +
> +        case ACPI_TABLE_ORIGIN_MAPPED:
> +            AcpiOsPrintf ("Mapped    ");
> +            break;
> +
> +        case ACPI_TABLE_ORIGIN_ALLOCATED:
> +            AcpiOsPrintf ("Allocated ");
> +            break;
> +
> +        case ACPI_TABLE_ORIGIN_OVERRIDE:
> +            AcpiOsPrintf ("Override  ");
> +            break;
> +
> +        default:
> +            AcpiOsPrintf ("INVALID   ");
> +            break;
> +        }
>
>           /* Make sure that the table is mapped */
>
> @@ -362,55 +403,45 @@ AcpiDbDisplayTableInfo (
>    *
>    * FUNCTION:    AcpiDbUnloadAcpiTable
>    *
> - * PARAMETERS:  TableArg        - Name of the table to be unloaded
> - *              InstanceArg     - Which instance of the table to unload (if
> - *                                there are multiple tables of the same type)
> + * PARAMETERS:  ObjectName          - Namespace pathname for an object that
> + *                                    is owned by the table to be unloaded
>    *
> - * RETURN:      Nonde
> + * RETURN:      None
>    *
> - * DESCRIPTION: Unload an ACPI table.
> - *              Instance is not implemented
> + * DESCRIPTION: Unload an ACPI table, via any namespace node that is owned
> + *              by the table.
>    *
>    ******************************************************************************/
>
>   void
>   AcpiDbUnloadAcpiTable (
> -    char                    *TableArg,
> -    char                    *InstanceArg)
> +    char                    *ObjectName)
>   {
> -/* TBD: Need to reimplement for new data structures */
> -
> -#if 0
> -    UINT32                  i;
> +    ACPI_NAMESPACE_NODE     *Node;
>       ACPI_STATUS             Status;
>
>
> -    /* Search all tables for the target type */
> +    /* Translate name to an Named object */
>
> -    for (i = 0; i < (ACPI_TABLE_ID_MAX+1); i++)
> +    Node = AcpiDbConvertToNode (ObjectName);
> +    if (!Node)
>       {
> -        if (!ACPI_STRNCMP (TableArg, AcpiGbl_TableData[i].Signature,
> -                AcpiGbl_TableData[i].SigLength))
> -        {
> -            /* Found the table, unload it */
> -
> -            Status = AcpiUnloadTable (i);
> -            if (ACPI_SUCCESS (Status))
> -            {
> -                AcpiOsPrintf ("[%s] unloaded and uninstalled\n", TableArg);
> -            }
> -            else
> -            {
> -                AcpiOsPrintf ("%s, while unloading [%s]\n",
> -                    AcpiFormatException (Status), TableArg);
> -            }
> -
> -            return;
> -        }
> +        AcpiOsPrintf ("Could not find [%s] in namespace\n",
> +            ObjectName);
> +        return;
>       }
>
> -    AcpiOsPrintf ("Unknown table type [%s]\n", TableArg);
> -#endif
> +    Status = AcpiUnloadParentTable (ACPI_CAST_PTR (ACPI_HANDLE, Node));
> +    if (ACPI_SUCCESS (Status))
> +    {
> +        AcpiOsPrintf ("Parent of [%s] (%p) unloaded and uninstalled\n",
> +            ObjectName, Node);
> +    }
> +    else
> +    {
> +        AcpiOsPrintf ("%s, while unloading parent table of [%s]\n",
> +            AcpiFormatException (Status), ObjectName);
> +    }
>   }
>
>
> @@ -445,25 +476,20 @@ AcpiDbSendNotify (
>           return;
>       }
>
> -    /* Decode Named object type */
> +    /* Dispatch the notify if legal */
>
> -    switch (Node->Type)
> +    if (AcpiEvIsNotifyObject (Node))
>       {
> -    case ACPI_TYPE_DEVICE:
> -    case ACPI_TYPE_THERMAL:
> -
> -         /* Send the notify */
> -
>           Status = AcpiEvQueueNotifyRequest (Node, Value);
>           if (ACPI_FAILURE (Status))
>           {
>               AcpiOsPrintf ("Could not queue notify\n");
>           }
> -        break;
> -
> -    default:
> -        AcpiOsPrintf ("Named object is not a device or a thermal object\n");
> -        break;
> +    }
> +    else
> +    {
> +        AcpiOsPrintf ("Named object [%4.4s] Type %s, must be Device/Thermal/Processor type\n",
> +            AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type));
>       }
>   }
>
> diff --git a/src/acpica/source/components/debugger/dbdisply.c b/src/acpica/source/components/debugger/dbdisply.c
> index d8b3aa9..2e91c88 100644
> --- a/src/acpica/source/components/debugger/dbdisply.c
> +++ b/src/acpica/source/components/debugger/dbdisply.c
> @@ -179,8 +179,8 @@ typedef struct acpi_handler_info
>
>   static ACPI_HANDLER_INFO    AcpiGbl_HandlerList[] =
>   {
> -    {&AcpiGbl_SystemNotify.Handler,     "System Notifications"},
> -    {&AcpiGbl_DeviceNotify.Handler,     "Device Notifications"},
> +    {&AcpiGbl_GlobalNotify[0].Handler,  "System Notifications"},
> +    {&AcpiGbl_GlobalNotify[1].Handler,  "Device Notifications"},
>       {&AcpiGbl_TableHandler,             "ACPI Table Events"},
>       {&AcpiGbl_ExceptionHandler,         "Control Method Exceptions"},
>       {&AcpiGbl_InterfaceHandler,         "OSI Invocations"}
> @@ -864,10 +864,12 @@ AcpiDbDisplayGpes (
>       ACPI_GPE_EVENT_INFO     *GpeEventInfo;
>       ACPI_GPE_REGISTER_INFO  *GpeRegisterInfo;
>       char                    *GpeType;
> +    ACPI_GPE_NOTIFY_INFO    *Notify;
>       UINT32                  GpeIndex;
>       UINT32                  Block = 0;
>       UINT32                  i;
>       UINT32                  j;
> +    UINT32                  Count;
>       char                    Buffer[80];
>       ACPI_BUFFER             RetBuf;
>       ACPI_STATUS             Status;
> @@ -988,7 +990,14 @@ AcpiDbDisplayGpes (
>                           AcpiOsPrintf ("Handler");
>                           break;
>                       case ACPI_GPE_DISPATCH_NOTIFY:
> -                        AcpiOsPrintf ("Notify");
> +                        Count = 0;
> +                        Notify = GpeEventInfo->Dispatch.NotifyList;
> +                        while (Notify)
> +                        {
> +                            Count++;
> +                            Notify = Notify->Next;
> +                        }
> +                        AcpiOsPrintf ("Implicit Notify on %u devices", Count);
>                           break;
>                       default:
>                           AcpiOsPrintf ("UNKNOWN: %X",
> diff --git a/src/acpica/source/components/debugger/dbexec.c b/src/acpica/source/components/debugger/dbexec.c
> index eb85998..174f77a 100644
> --- a/src/acpica/source/components/debugger/dbexec.c
> +++ b/src/acpica/source/components/debugger/dbexec.c
> @@ -944,8 +944,8 @@ AcpiDbMethodThread (
>
>       if (Info->InitArgs)
>       {
> -        AcpiDbUInt32ToHexString (Info->NumCreated, Info->IndexOfThreadStr);
> -        AcpiDbUInt32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr);
> +        AcpiDbUint32ToHexString (Info->NumCreated, Info->IndexOfThreadStr);
> +        AcpiDbUint32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr);
>       }
>
>       if (Info->Threads && (Info->NumCreated < Info->NumThreads))
> @@ -1135,7 +1135,7 @@ AcpiDbCreateExecutionThreads (
>       AcpiGbl_DbMethodInfo.ArgTypes[1] = ACPI_TYPE_INTEGER;
>       AcpiGbl_DbMethodInfo.ArgTypes[2] = ACPI_TYPE_INTEGER;
>
> -    AcpiDbUInt32ToHexString (NumThreads, AcpiGbl_DbMethodInfo.NumThreadsStr);
> +    AcpiDbUint32ToHexString (NumThreads, AcpiGbl_DbMethodInfo.NumThreadsStr);
>
>       AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
>
> diff --git a/src/acpica/source/components/debugger/dbfileio.c b/src/acpica/source/components/debugger/dbfileio.c
> index 495d609..8e36c87 100644
> --- a/src/acpica/source/components/debugger/dbfileio.c
> +++ b/src/acpica/source/components/debugger/dbfileio.c
> @@ -123,6 +123,10 @@
>   #include "actables.h"
>   #endif
>
> +#ifdef ACPI_ASL_COMPILER
> +#include "aslcompiler.h"
> +#endif
> +
>   #if (defined ACPI_DEBUGGER || defined ACPI_DISASSEMBLER)
>
>   #define _COMPONENT          ACPI_CA_DEBUGGER
> @@ -381,6 +385,15 @@ AcpiDbReadTable (
>               AcpiOsPrintf (
>                   "TableHeader length [0x%X] greater than the input file size [0x%X]\n",
>                   TableHeader.Length, FileSize);
> +
> +#ifdef ACPI_ASL_COMPILER
> +            Status = FlCheckForAscii (fp, NULL, FALSE);
> +            if (ACPI_SUCCESS (Status))
> +            {
> +                AcpiOsPrintf ("File appears to be ASCII only, must be binary\n",
> +                    TableHeader.Length, FileSize);
> +            }
> +#endif
>               return (AE_BAD_HEADER);
>           }
>
> diff --git a/src/acpica/source/components/debugger/dbinput.c b/src/acpica/source/components/debugger/dbinput.c
> index 3e61bdb..1b2ee1d 100644
> --- a/src/acpica/source/components/debugger/dbinput.c
> +++ b/src/acpica/source/components/debugger/dbinput.c
> @@ -322,7 +322,7 @@ AcpiDbDisplayHelp (
>       AcpiOsPrintf ("     Stack                            Display CPU stack usage\n");
>       AcpiOsPrintf ("     Tables                           Info about current ACPI table(s)\n");
>       AcpiOsPrintf ("  Tables                              Display info about loaded ACPI tables\n");
> -    AcpiOsPrintf ("  Unload <TableSig> [Instance]        Unload an ACPI table\n");
> +    AcpiOsPrintf ("  Unload <Namepath>                   Unload an ACPI table via namespace object\n");
>       AcpiOsPrintf ("  ! <CommandNumber>                   Execute command from history buffer\n");
>       AcpiOsPrintf ("  !!                                  Execute last command again\n");
>
> @@ -966,7 +966,7 @@ AcpiDbCommandDispatch (
>           break;
>
>       case CMD_UNLOAD:
> -        AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
> +        AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1]);
>           break;
>
>       case CMD_EXIT:
> diff --git a/src/acpica/source/components/debugger/dbstats.c b/src/acpica/source/components/debugger/dbstats.c
> index 8a6e713..e309668 100644
> --- a/src/acpica/source/components/debugger/dbstats.c
> +++ b/src/acpica/source/components/debugger/dbstats.c
> @@ -299,8 +299,8 @@ AcpiDbEnumerateObject (
>
>       case ACPI_TYPE_DEVICE:
>
> -        AcpiDbEnumerateObject (ObjDesc->Device.SystemNotify);
> -        AcpiDbEnumerateObject (ObjDesc->Device.DeviceNotify);
> +        AcpiDbEnumerateObject (ObjDesc->Device.NotifyList[0]);
> +        AcpiDbEnumerateObject (ObjDesc->Device.NotifyList[1]);
>           AcpiDbEnumerateObject (ObjDesc->Device.Handler);
>           break;
>
> @@ -320,21 +320,21 @@ AcpiDbEnumerateObject (
>
>       case ACPI_TYPE_POWER:
>
> -        AcpiDbEnumerateObject (ObjDesc->PowerResource.SystemNotify);
> -        AcpiDbEnumerateObject (ObjDesc->PowerResource.DeviceNotify);
> +        AcpiDbEnumerateObject (ObjDesc->PowerResource.NotifyList[0]);
> +        AcpiDbEnumerateObject (ObjDesc->PowerResource.NotifyList[1]);
>           break;
>
>       case ACPI_TYPE_PROCESSOR:
>
> -        AcpiDbEnumerateObject (ObjDesc->Processor.SystemNotify);
> -        AcpiDbEnumerateObject (ObjDesc->Processor.DeviceNotify);
> +        AcpiDbEnumerateObject (ObjDesc->Processor.NotifyList[0]);
> +        AcpiDbEnumerateObject (ObjDesc->Processor.NotifyList[1]);
>           AcpiDbEnumerateObject (ObjDesc->Processor.Handler);
>           break;
>
>       case ACPI_TYPE_THERMAL:
>
> -        AcpiDbEnumerateObject (ObjDesc->ThermalZone.SystemNotify);
> -        AcpiDbEnumerateObject (ObjDesc->ThermalZone.DeviceNotify);
> +        AcpiDbEnumerateObject (ObjDesc->ThermalZone.NotifyList[0]);
> +        AcpiDbEnumerateObject (ObjDesc->ThermalZone.NotifyList[1]);
>           AcpiDbEnumerateObject (ObjDesc->ThermalZone.Handler);
>           break;
>
> @@ -594,6 +594,18 @@ AcpiDbDisplayStatistics (
>           AcpiOsPrintf ("NamespaceNode    %3d\n", sizeof (ACPI_NAMESPACE_NODE));
>           AcpiOsPrintf ("AcpiObject       %3d\n", sizeof (ACPI_OBJECT));
>
> +        AcpiOsPrintf ("\n");
> +
> +        AcpiOsPrintf ("Generic State    %3d\n", sizeof (ACPI_GENERIC_STATE));
> +        AcpiOsPrintf ("Common State     %3d\n", sizeof (ACPI_COMMON_STATE));
> +        AcpiOsPrintf ("Control State    %3d\n", sizeof (ACPI_CONTROL_STATE));
> +        AcpiOsPrintf ("Update State     %3d\n", sizeof (ACPI_UPDATE_STATE));
> +        AcpiOsPrintf ("Scope State      %3d\n", sizeof (ACPI_SCOPE_STATE));
> +        AcpiOsPrintf ("Parse Scope      %3d\n", sizeof (ACPI_PSCOPE_STATE));
> +        AcpiOsPrintf ("Package State    %3d\n", sizeof (ACPI_PKG_STATE));
> +        AcpiOsPrintf ("Thread State     %3d\n", sizeof (ACPI_THREAD_STATE));
> +        AcpiOsPrintf ("Result Values    %3d\n", sizeof (ACPI_RESULT_VALUES));
> +        AcpiOsPrintf ("Notify Info      %3d\n", sizeof (ACPI_NOTIFY_INFO));
>           break;
>
>
> diff --git a/src/acpica/source/components/debugger/dbutils.c b/src/acpica/source/components/debugger/dbutils.c
> index fd318d9..f913c64 100644
> --- a/src/acpica/source/components/debugger/dbutils.c
> +++ b/src/acpica/source/components/debugger/dbutils.c
> @@ -432,7 +432,7 @@ AcpiDbLocalNsLookup (
>
>   /*******************************************************************************
>    *
> - * FUNCTION:    AcpiDbUInt32ToHexString
> + * FUNCTION:    AcpiDbUint32ToHexString
>    *
>    * PARAMETERS:  Value           - The value to be converted to string
>    *              Buffer          - Buffer for result (not less than 11 bytes)
> @@ -447,7 +447,7 @@ AcpiDbLocalNsLookup (
>    ******************************************************************************/
>
>   void
> -AcpiDbUInt32ToHexString (
> +AcpiDbUint32ToHexString (
>       UINT32                  Value,
>       char                    *Buffer)
>   {
> diff --git a/src/acpica/source/components/disassembler/dmopcode.c b/src/acpica/source/components/disassembler/dmopcode.c
> index ed457ed..252b1b8 100644
> --- a/src/acpica/source/components/disassembler/dmopcode.c
> +++ b/src/acpica/source/components/disassembler/dmopcode.c
> @@ -118,6 +118,7 @@
>   #include "acparser.h"
>   #include "amlcode.h"
>   #include "acdisasm.h"
> +#include "acnamesp.h"
>
>   #ifdef ACPI_DISASSEMBLER
>
> @@ -133,6 +134,218 @@ AcpiDmMatchKeyword (
>
>   /*******************************************************************************
>    *
> + * FUNCTION:    AcpiDmPredefinedDescription
> + *
> + * PARAMETERS:  Op              - Name() parse object
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Emit a description comment for a predefined ACPI name.
> + *              Used for iASL compiler only.
> + *
> + ******************************************************************************/
> +
> +void
> +AcpiDmPredefinedDescription (
> +    ACPI_PARSE_OBJECT       *Op)
> +{
> +#ifdef ACPI_ASL_COMPILER
> +    const AH_PREDEFINED_NAME    *Info;
> +    char                        *NameString;
> +    int                         LastCharIsDigit;
> +    int                         LastCharsAreHex;
> +
> +
> +    if (!Op)
> +    {
> +        return;
> +    }
> +
> +    /* Ensure that the comment field is emitted only once */
> +
> +    if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEF_CHECKED)
> +    {
> +        return;
> +    }
> +    Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEF_CHECKED;
> +
> +    /* Predefined name must start with an underscore */
> +
> +    NameString = ACPI_CAST_PTR (char, &Op->Named.Name);
> +    if (NameString[0] != '_')
> +    {
> +        return;
> +    }
> +
> +    /*
> +     * Check for the special ACPI names:
> +     * _ACd, _ALd, _EJd, _Exx, _Lxx, _Qxx, _Wxx, _T_a
> +     * (where d=decimal_digit, x=hex_digit, a=anything)
> +     *
> +     * Convert these to the generic name for table lookup.
> +     * Note: NameString is guaranteed to be upper case here.
> +     */
> +    LastCharIsDigit =
> +        (ACPI_IS_DIGIT (NameString[3]));    /* d */
> +    LastCharsAreHex =
> +        (ACPI_IS_XDIGIT (NameString[2]) &&  /* xx */
> +         ACPI_IS_XDIGIT (NameString[3]));
> +
> +    switch (NameString[1])
> +    {
> +    case 'A':
> +        if ((NameString[2] == 'C') && (LastCharIsDigit))
> +        {
> +            NameString = "_ACx";
> +        }
> +        else if ((NameString[2] == 'L') && (LastCharIsDigit))
> +        {
> +            NameString = "_ALx";
> +        }
> +        break;
> +
> +    case 'E':
> +        if ((NameString[2] == 'J') && (LastCharIsDigit))
> +        {
> +            NameString = "_EJx";
> +        }
> +        else if (LastCharsAreHex)
> +        {
> +            NameString = "_Exx";
> +        }
> +        break;
> +
> +    case 'L':
> +        if (LastCharsAreHex)
> +        {
> +            NameString = "_Lxx";
> +        }
> +        break;
> +
> +    case 'Q':
> +        if (LastCharsAreHex)
> +        {
> +            NameString = "_Qxx";
> +        }
> +        break;
> +
> +    case 'T':
> +        if (NameString[2] == '_')
> +        {
> +            NameString = "_T_x";
> +        }
> +        break;
> +
> +    case 'W':
> +        if (LastCharsAreHex)
> +        {
> +            NameString = "_Wxx";
> +        }
> +        break;
> +
> +    default:
> +        break;
> +    }
> +
> +    /* Match the name in the info table */
> +
> +    for (Info = AslPredefinedInfo; Info->Name; Info++)
> +    {
> +        if (ACPI_COMPARE_NAME (NameString, Info->Name))
> +        {
> +            AcpiOsPrintf ("  // %4.4s: %s",
> +                NameString, ACPI_CAST_PTR (char, Info->Description));
> +            return;
> +        }
> +    }
> +
> +#endif
> +    return;
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiDmFieldPredefinedDescription
> + *
> + * PARAMETERS:  Op              - Parse object
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Emit a description comment for a resource descriptor tag
> + *              (which is a predefined ACPI name.) Used for iASL compiler only.
> + *
> + ******************************************************************************/
> +
> +void
> +AcpiDmFieldPredefinedDescription (
> +    ACPI_PARSE_OBJECT       *Op)
> +{
> +#ifdef ACPI_ASL_COMPILER
> +    ACPI_PARSE_OBJECT       *IndexOp;
> +    char                    *Tag;
> +    const ACPI_OPCODE_INFO  *OpInfo;
> +    const AH_PREDEFINED_NAME *Info;
> +
> +
> +    if (!Op)
> +    {
> +        return;
> +    }
> +
> +    /* Ensure that the comment field is emitted only once */
> +
> +    if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEF_CHECKED)
> +    {
> +        return;
> +    }
> +    Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEF_CHECKED;
> +
> +    /*
> +     * Op must be one of the Create* operators: CreateField, CreateBitField,
> +     * CreateByteField, CreateWordField, CreateDwordField, CreateQwordField
> +     */
> +    OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
> +    if (!(OpInfo->Flags & AML_CREATE))
> +    {
> +        return;
> +    }
> +
> +    /* Second argument is the Index argument */
> +
> +    IndexOp = Op->Common.Value.Arg;
> +    IndexOp = IndexOp->Common.Next;
> +
> +    /* Index argument must be a namepath */
> +
> +    if (IndexOp->Common.AmlOpcode != AML_INT_NAMEPATH_OP)
> +    {
> +        return;
> +    }
> +
> +    /* Major cheat: We previously put the Tag ptr in the Node field */
> +
> +    Tag = ACPI_CAST_PTR (char, IndexOp->Common.Node);
> +
> +    /* Match the name in the info table */
> +
> +    for (Info = AslPredefinedInfo; Info->Name; Info++)
> +    {
> +        if (ACPI_COMPARE_NAME (Tag, Info->Name))
> +        {
> +            AcpiOsPrintf ("  // %4.4s: %s", Tag,
> +                ACPI_CAST_PTR (char, Info->Description));
> +            return;
> +        }
> +    }
> +
> +#endif
> +    return;
> +}
> +
> +
> +/*******************************************************************************
> + *
>    * FUNCTION:    AcpiDmMethodFlags
>    *
>    * PARAMETERS:  Op              - Method Object to be examined
> diff --git a/src/acpica/source/components/disassembler/dmwalk.c b/src/acpica/source/components/disassembler/dmwalk.c
> index 2bec308..dd655d8 100644
> --- a/src/acpica/source/components/disassembler/dmwalk.c
> +++ b/src/acpica/source/components/disassembler/dmwalk.c
> @@ -525,7 +525,7 @@ AcpiDmDescendingOp (
>        * keep track of the current column.
>        */
>       Info->Count++;
> -    if (Info->Count /*+Info->LastLevel*/ > 10)
> +    if (Info->Count /* +Info->LastLevel */ > 10)
>       {
>           Info->Count = 0;
>           AcpiOsPrintf ("\n");
> @@ -605,6 +605,10 @@ AcpiDmDescendingOp (
>
>                   AcpiDmMethodFlags (Op);
>                   AcpiOsPrintf (")");
> +
> +                /* Emit description comment for Method() with a predefined ACPI name */
> +
> +                AcpiDmPredefinedDescription (Op);
>                   break;
>
>
> @@ -675,7 +679,8 @@ AcpiDmDescendingOp (
>
>               default:
>
> -                AcpiOsPrintf ("*** Unhandled named opcode %X\n", Op->Common.AmlOpcode);
> +                AcpiOsPrintf ("*** Unhandled named opcode %X\n",
> +                    Op->Common.AmlOpcode);
>                   break;
>               }
>           }
> @@ -716,7 +721,8 @@ AcpiDmDescendingOp (
>                   NextOp = NextOp->Common.Next;
>
>                   Info->Flags = ACPI_PARSEOP_PARAMLIST;
> -                AcpiDmWalkParseTree (NextOp, AcpiDmDescendingOp, AcpiDmAscendingOp, Info);
> +                AcpiDmWalkParseTree (NextOp, AcpiDmDescendingOp,
> +                    AcpiDmAscendingOp, Info);
>                   Info->Flags = 0;
>                   Info->Level = Level;
>
> @@ -758,12 +764,18 @@ AcpiDmDescendingOp (
>               if (Op->Common.DisasmOpcode == ACPI_DASM_RESOURCE)
>               {
>                   /*
> -                 * We have a resource list.  Don't need to output
> -                 * the buffer size Op.  Open up a new block
> +                 * We have a resource list. Don't need to output
> +                 * the buffer size Op. Open up a new block
>                    */
>                   NextOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
>                   NextOp = NextOp->Common.Next;
> -                AcpiOsPrintf (")\n");
> +                AcpiOsPrintf (")");
> +
> +                /* Emit description comment for Name() with a predefined ACPI name */
> +
> +                AcpiDmPredefinedDescription (Op->Asl.Parent);
> +
> +                AcpiOsPrintf ("\n");
>                   AcpiDmIndent (Info->Level);
>                   AcpiOsPrintf ("{\n");
>                   return (AE_OK);
> @@ -791,7 +803,7 @@ AcpiDmDescendingOp (
>
>           case AML_PACKAGE_OP:
>
> -            /* The next op is the size or predicate parameter */
> +            /* The next op is the size parameter */
>
>               NextOp = AcpiPsGetDepthNext (NULL, Op);
>               if (NextOp)
> @@ -844,6 +856,7 @@ AcpiDmAscendingOp (
>       void                    *Context)
>   {
>       ACPI_OP_WALK_INFO       *Info = Context;
> +    ACPI_PARSE_OBJECT       *ParentOp;
>
>
>       if (Op->Common.DisasmFlags & ACPI_PARSEOP_IGNORE)
> @@ -869,6 +882,19 @@ AcpiDmAscendingOp (
>
>           AcpiOsPrintf (")");
>
> +        if (Op->Common.AmlOpcode == AML_NAME_OP)
> +        {
> +            /* Emit description comment for Name() with a predefined ACPI name */
> +
> +            AcpiDmPredefinedDescription (Op);
> +        }
> +        else
> +        {
> +            /* For Create* operators, attempt to emit resource tag description */
> +
> +            AcpiDmFieldPredefinedDescription (Op);
> +        }
> +
>           /* Could be a nested operator, check if comma required */
>
>           if (!AcpiDmCommaIfListMember (Op))
> @@ -983,7 +1009,20 @@ AcpiDmAscendingOp (
>            */
>           if (Op->Common.Next)
>           {
> -            AcpiOsPrintf (")\n");
> +            AcpiOsPrintf (")");
> +
> +            /* Emit description comment for Name() with a predefined ACPI name */
> +
> +            ParentOp = Op->Common.Parent;
> +            if (ParentOp)
> +            {
> +                ParentOp = ParentOp->Common.Parent;
> +                if (ParentOp && ParentOp->Asl.AmlOpcode == AML_NAME_OP)
> +                {
> +                    AcpiDmPredefinedDescription (ParentOp);
> +                }
> +            }
> +            AcpiOsPrintf ("\n");
>               AcpiDmIndent (Level - 1);
>               AcpiOsPrintf ("{\n");
>           }
> diff --git a/src/acpica/source/components/dispatcher/dsfield.c b/src/acpica/source/components/dispatcher/dsfield.c
> index 526d478..3047c5f 100644
> --- a/src/acpica/source/components/dispatcher/dsfield.c
> +++ b/src/acpica/source/components/dispatcher/dsfield.c
> @@ -129,6 +129,18 @@
>
>   /* Local prototypes */
>
> +#ifdef ACPI_ASL_COMPILER
> +#include "acdisasm.h"
> +
> +static ACPI_STATUS
> +AcpiDsCreateExternalRegion (
> +    ACPI_STATUS             LookupStatus,
> +    ACPI_PARSE_OBJECT       *Op,
> +    char                    *Path,
> +    ACPI_WALK_STATE         *WalkState,
> +    ACPI_NAMESPACE_NODE     **Node);
> +#endif
> +
>   static ACPI_STATUS
>   AcpiDsGetFieldNames (
>       ACPI_CREATE_FIELD_INFO  *Info,
> @@ -136,6 +148,69 @@ AcpiDsGetFieldNames (
>       ACPI_PARSE_OBJECT       *Arg);
>
>
> +#ifdef ACPI_ASL_COMPILER
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiDsCreateExternalRegion (iASL Disassembler only)
> + *
> + * PARAMETERS:  LookupStatus    - Status from NsLookup operation
> + *              Op              - Op containing the Field definition and args
> + *              Path            - Pathname of the region
> + *  `           WalkState       - Current method state
> + *              Node            - Where the new region node is returned
> + *
> + * RETURN:      Status
> + *
> + * DESCRIPTION: Add region to the external list if NOT_FOUND. Create a new
> + *              region node/object.
> + *
> + ******************************************************************************/
> +
> +static ACPI_STATUS
> +AcpiDsCreateExternalRegion (
> +    ACPI_STATUS             LookupStatus,
> +    ACPI_PARSE_OBJECT       *Op,
> +    char                    *Path,
> +    ACPI_WALK_STATE         *WalkState,
> +    ACPI_NAMESPACE_NODE     **Node)
> +{
> +    ACPI_STATUS             Status;
> +    ACPI_OPERAND_OBJECT     *ObjDesc;
> +
> +
> +    if (LookupStatus != AE_NOT_FOUND)
> +    {
> +        return (LookupStatus);
> +    }
> +
> +    /*
> +     * Table disassembly:
> +     * OperationRegion not found. Generate an External for it, and
> +     * insert the name into the namespace.
> +     */
> +    AcpiDmAddToExternalList (Op, Path, ACPI_TYPE_REGION, 0);
> +    Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_REGION,
> +       ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT, WalkState, Node);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        return (Status);
> +    }
> +
> +    /* Must create and install a region object for the new node */
> +
> +    ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION);
> +    if (!ObjDesc)
> +    {
> +        return (AE_NO_MEMORY);
> +    }
> +
> +    ObjDesc->Region.Node = *Node;
> +    Status = AcpiNsAttachObject (*Node, ObjDesc, ACPI_TYPE_REGION);
> +    return (Status);
> +}
> +#endif
> +
> +
>   /*******************************************************************************
>    *
>    * FUNCTION:    AcpiDsCreateBufferField
> @@ -149,8 +224,8 @@ AcpiDsGetFieldNames (
>    *              CreateBitFieldOp,
>    *              CreateByteFieldOp,
>    *              CreateWordFieldOp,
> - *              CreateDWordFieldOp,
> - *              CreateQWordFieldOp,
> + *              CreateDwordFieldOp,
> + *              CreateQwordFieldOp,
>    *              CreateFieldOp       (all of which define a field in a buffer)
>    *
>    ******************************************************************************/
> @@ -510,11 +585,16 @@ AcpiDsCreateField (
>       /* First arg is the name of the parent OpRegion (must already exist) */
>
>       Arg = Op->Common.Value.Arg;
> +
>       if (!RegionNode)
>       {
>           Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.Name,
>                           ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE,
>                           ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode);
> +#ifdef ACPI_ASL_COMPILER
> +        Status = AcpiDsCreateExternalRegion (Status, Arg,
> +            Arg->Common.Value.Name, WalkState, &RegionNode);
> +#endif
>           if (ACPI_FAILURE (Status))
>           {
>               ACPI_ERROR_NAMESPACE (Arg->Common.Value.Name, Status);
> @@ -700,6 +780,10 @@ AcpiDsCreateBankField (
>           Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.Name,
>                           ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE,
>                           ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode);
> +#ifdef ACPI_ASL_COMPILER
> +        Status = AcpiDsCreateExternalRegion (Status, Arg,
> +            Arg->Common.Value.Name, WalkState, &RegionNode);
> +#endif
>           if (ACPI_FAILURE (Status))
>           {
>               ACPI_ERROR_NAMESPACE (Arg->Common.Value.Name, Status);
> diff --git a/src/acpica/source/components/dispatcher/dsopcode.c b/src/acpica/source/components/dispatcher/dsopcode.c
> index 5da09bd..d6ddbfa 100644
> --- a/src/acpica/source/components/dispatcher/dsopcode.c
> +++ b/src/acpica/source/components/dispatcher/dsopcode.c
> @@ -595,18 +595,18 @@ AcpiDsEvalTableRegionOperands (
>
>
>       /*
> -     * This is where we evaluate the SignatureString and OemIDString
> -     * and OemTableIDString of the DataTableRegion declaration
> +     * This is where we evaluate the Signature string, OemId string,
> +     * and OemTableId string of the Data Table Region declaration
>        */
>       Node =  Op->Common.Node;
>
> -    /* NextOp points to SignatureString op */
> +    /* NextOp points to Signature string op */
>
>       NextOp = Op->Common.Value.Arg;
>
>       /*
> -     * Evaluate/create the SignatureString and OemIDString
> -     * and OemTableIDString operands
> +     * Evaluate/create the Signature string, OemId string,
> +     * and OemTableId string operands
>        */
>       Status = AcpiDsCreateOperands (WalkState, NextOp);
>       if (ACPI_FAILURE (Status))
> @@ -615,8 +615,8 @@ AcpiDsEvalTableRegionOperands (
>       }
>
>       /*
> -     * Resolve the SignatureString and OemIDString
> -     * and OemTableIDString operands
> +     * Resolve the Signature string, OemId string,
> +     * and OemTableId string operands
>        */
>       Status = AcpiExResolveOperands (Op->Common.AmlOpcode,
>                   ACPI_WALK_OPERANDS, WalkState);
> diff --git a/src/acpica/source/components/dispatcher/dswload.c b/src/acpica/source/components/dispatcher/dswload.c
> index 1f689d6..7a4a84f 100644
> --- a/src/acpica/source/components/dispatcher/dswload.c
> +++ b/src/acpica/source/components/dispatcher/dswload.c
> @@ -313,6 +313,20 @@ AcpiDsLoad1BeginOp (
>               WalkState->ScopeInfo->Common.Value = ACPI_TYPE_ANY;
>               break;
>
> +        case ACPI_TYPE_METHOD:
> +
> +            /*
> +             * Allow scope change to root during execution of module-level
> +             * code. Root is typed METHOD during this time.
> +             */
> +            if ((Node == AcpiGbl_RootNode) &&
> +                (WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL))
> +            {
> +                break;
> +            }
> +
> +            /*lint -fallthrough */
> +
>           default:
>
>               /* All other types are an error */
> diff --git a/src/acpica/source/components/dispatcher/dswload2.c b/src/acpica/source/components/dispatcher/dswload2.c
> index 85a86ec..139ff95 100644
> --- a/src/acpica/source/components/dispatcher/dswload2.c
> +++ b/src/acpica/source/components/dispatcher/dswload2.c
> @@ -315,6 +315,20 @@ AcpiDsLoad2BeginOp (
>               WalkState->ScopeInfo->Common.Value = ACPI_TYPE_ANY;
>               break;
>
> +        case ACPI_TYPE_METHOD:
> +
> +            /*
> +             * Allow scope change to root during execution of module-level
> +             * code. Root is typed METHOD during this time.
> +             */
> +            if ((Node == AcpiGbl_RootNode) &&
> +                (WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL))
> +            {
> +                break;
> +            }
> +
> +            /*lint -fallthrough */
> +
>           default:
>
>               /* All other types are an error */
> diff --git a/src/acpica/source/components/events/evgpe.c b/src/acpica/source/components/events/evgpe.c
> index de32275..bb72a6e 100644
> --- a/src/acpica/source/components/events/evgpe.c
> +++ b/src/acpica/source/components/events/evgpe.c
> @@ -590,6 +590,7 @@ AcpiEvAsynchExecuteGpeMethod (
>       ACPI_STATUS             Status;
>       ACPI_GPE_EVENT_INFO     *LocalGpeEventInfo;
>       ACPI_EVALUATE_INFO      *Info;
> +    ACPI_GPE_NOTIFY_INFO    *Notify;
>
>
>       ACPI_FUNCTION_TRACE (EvAsynchExecuteGpeMethod);
> @@ -645,10 +646,18 @@ AcpiEvAsynchExecuteGpeMethod (
>            * completes. The notify handlers are NOT invoked synchronously
>            * from this thread -- because handlers may in turn run other
>            * control methods.
> +         *
> +         * June 2012: Expand implicit notify mechanism to support
> +         * notifies on multiple device objects.
>            */
> -        Status = AcpiEvQueueNotifyRequest (
> -                    LocalGpeEventInfo->Dispatch.DeviceNode,
> -                    ACPI_NOTIFY_DEVICE_WAKE);
> +        Notify = LocalGpeEventInfo->Dispatch.NotifyList;
> +        while (ACPI_SUCCESS (Status) && Notify)
> +        {
> +            Status = AcpiEvQueueNotifyRequest (Notify->DeviceNode,
> +                        ACPI_NOTIFY_DEVICE_WAKE);
> +
> +            Notify = Notify->Next;
> +        }
>           break;
>
>       case ACPI_GPE_DISPATCH_METHOD:
> diff --git a/src/acpica/source/components/events/evgpeutil.c b/src/acpica/source/components/events/evgpeutil.c
> index a5ad320..38c7928 100644
> --- a/src/acpica/source/components/events/evgpeutil.c
> +++ b/src/acpica/source/components/events/evgpeutil.c
> @@ -463,6 +463,8 @@ AcpiEvDeleteGpeHandlers (
>       void                    *Context)
>   {
>       ACPI_GPE_EVENT_INFO     *GpeEventInfo;
> +    ACPI_GPE_NOTIFY_INFO    *Notify;
> +    ACPI_GPE_NOTIFY_INFO    *Next;
>       UINT32                  i;
>       UINT32                  j;
>
> @@ -484,10 +486,27 @@ AcpiEvDeleteGpeHandlers (
>               if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
>                       ACPI_GPE_DISPATCH_HANDLER)
>               {
> +                /* Delete an installed handler block */
> +
>                   ACPI_FREE (GpeEventInfo->Dispatch.Handler);
>                   GpeEventInfo->Dispatch.Handler = NULL;
>                   GpeEventInfo->Flags &= ~ACPI_GPE_DISPATCH_MASK;
>               }
> +            else if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
> +                    ACPI_GPE_DISPATCH_NOTIFY)
> +            {
> +                /* Delete the implicit notification device list */
> +
> +                Notify = GpeEventInfo->Dispatch.NotifyList;
> +                while (Notify)
> +                {
> +                    Next = Notify->Next;
> +                    ACPI_FREE (Notify);
> +                    Notify = Next;
> +                }
> +                GpeEventInfo->Dispatch.NotifyList = NULL;
> +                GpeEventInfo->Flags &= ~ACPI_GPE_DISPATCH_MASK;
> +            }
>           }
>       }
>
> diff --git a/src/acpica/source/components/events/evmisc.c b/src/acpica/source/components/events/evmisc.c
> index 7369daa..ae3cecd 100644
> --- a/src/acpica/source/components/events/evmisc.c
> +++ b/src/acpica/source/components/events/evmisc.c
> @@ -183,107 +183,82 @@ AcpiEvQueueNotifyRequest (
>       UINT32                  NotifyValue)
>   {
>       ACPI_OPERAND_OBJECT     *ObjDesc;
> -    ACPI_OPERAND_OBJECT     *HandlerObj = NULL;
> -    ACPI_GENERIC_STATE      *NotifyInfo;
> +    ACPI_OPERAND_OBJECT     *HandlerListHead = NULL;
> +    ACPI_GENERIC_STATE      *Info;
> +    UINT8                   HandlerListId = 0;
>       ACPI_STATUS             Status = AE_OK;
>
>
>       ACPI_FUNCTION_NAME (EvQueueNotifyRequest);
>
>
> -    /*
> -     * For value 0x03 (Ejection Request), may need to run a device method.
> -     * For value 0x02 (Device Wake), if _PRW exists, may need to run
> -     *   the _PS0 method.
> -     * For value 0x80 (Status Change) on the power button or sleep button,
> -     *   initiate soft-off or sleep operation.
> -     *
> -     * For all cases, simply dispatch the notify to the handler.
> -     */
> -    ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> -        "Dispatching Notify on [%4.4s] (%s) Value 0x%2.2X (%s) Node %p\n",
> -        AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type),
> -        NotifyValue, AcpiUtGetNotifyName (NotifyValue), Node));
> +    /* Are Notifies allowed on this object? */
>
> -    /* Get the notify object attached to the NS Node */
> -
> -    ObjDesc = AcpiNsGetAttachedObject (Node);
> -    if (ObjDesc)
> +    if (!AcpiEvIsNotifyObject (Node))
>       {
> -        /* We have the notify object, Get the correct handler */
> -
> -        switch (Node->Type)
> -        {
> -        /* Notify is allowed only on these types */
> +        return (AE_TYPE);
> +    }
>
> -        case ACPI_TYPE_DEVICE:
> -        case ACPI_TYPE_THERMAL:
> -        case ACPI_TYPE_PROCESSOR:
> +    /* Get the correct notify list type (System or Device) */
>
> -            if (NotifyValue <= ACPI_MAX_SYS_NOTIFY)
> -            {
> -                HandlerObj = ObjDesc->CommonNotify.SystemNotify;
> -            }
> -            else
> -            {
> -                HandlerObj = ObjDesc->CommonNotify.DeviceNotify;
> -            }
> -            break;
> +    if (NotifyValue <= ACPI_MAX_SYS_NOTIFY)
> +    {
> +        HandlerListId = ACPI_SYSTEM_HANDLER_LIST;
> +    }
> +    else
> +    {
> +        HandlerListId = ACPI_DEVICE_HANDLER_LIST;
> +    }
>
> -        default:
> +    /* Get the notify object attached to the namespace Node */
>
> -            /* All other types are not supported */
> +    ObjDesc = AcpiNsGetAttachedObject (Node);
> +    if (ObjDesc)
> +    {
> +        /* We have an attached object, Get the correct handler list */
>
> -            return (AE_TYPE);
> -        }
> +        HandlerListHead = ObjDesc->CommonNotify.NotifyList[HandlerListId];
>       }
>
>       /*
> -     * If there is a handler to run, schedule the dispatcher.
> -     * Check for:
> -     * 1) Global system notify handler
> -     * 2) Global device notify handler
> -     * 3) Per-device notify handler
> +     * If there is no notify handler (Global or Local)
> +     * for this object, just ignore the notify
>        */
> -    if ((AcpiGbl_SystemNotify.Handler &&
> -            (NotifyValue <= ACPI_MAX_SYS_NOTIFY)) ||
> -        (AcpiGbl_DeviceNotify.Handler &&
> -            (NotifyValue > ACPI_MAX_SYS_NOTIFY))  ||
> -        HandlerObj)
> +    if (!AcpiGbl_GlobalNotify[HandlerListId].Handler && !HandlerListHead)
>       {
> -        NotifyInfo = AcpiUtCreateGenericState ();
> -        if (!NotifyInfo)
> -        {
> -            return (AE_NO_MEMORY);
> -        }
> +        ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> +            "No notify handler for Notify, ignoring (%4.4s, %X) node %p\n",
> +            AcpiUtGetNodeName (Node), NotifyValue, Node));
>
> -        if (!HandlerObj)
> -        {
> -            ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> -                "Executing system notify handler for Notify (%4.4s, %X) "
> -                "node %p\n",
> -                AcpiUtGetNodeName (Node), NotifyValue, Node));
> -        }
> +        return (AE_OK);
> +    }
>
> -        NotifyInfo->Common.DescriptorType = ACPI_DESC_TYPE_STATE_NOTIFY;
> -        NotifyInfo->Notify.Node = Node;
> -        NotifyInfo->Notify.Value = (UINT16) NotifyValue;
> -        NotifyInfo->Notify.HandlerObj = HandlerObj;
> +    /* Setup notify info and schedule the notify dispatcher */
>
> -        Status = AcpiOsExecute (
> -                    OSL_NOTIFY_HANDLER, AcpiEvNotifyDispatch, NotifyInfo);
> -        if (ACPI_FAILURE (Status))
> -        {
> -            AcpiUtDeleteGenericState (NotifyInfo);
> -        }
> -    }
> -    else
> +    Info = AcpiUtCreateGenericState ();
> +    if (!Info)
>       {
> -        /* There is no notify handler (per-device or system) for this device */
> +        return (AE_NO_MEMORY);
> +    }
>
> -        ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> -            "No notify handler for Notify (%4.4s, %X) node %p\n",
> -            AcpiUtGetNodeName (Node), NotifyValue, Node));
> +    Info->Common.DescriptorType = ACPI_DESC_TYPE_STATE_NOTIFY;
> +
> +    Info->Notify.Node = Node;
> +    Info->Notify.Value = (UINT16) NotifyValue;
> +    Info->Notify.HandlerListId = HandlerListId;
> +    Info->Notify.HandlerListHead = HandlerListHead;
> +    Info->Notify.Global = &AcpiGbl_GlobalNotify[HandlerListId];
> +
> +    ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> +        "Dispatching Notify on [%4.4s] (%s) Value 0x%2.2X (%s) Node %p\n",
> +        AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type),
> +        NotifyValue, AcpiUtGetNotifyName (NotifyValue), Node));
> +
> +    Status = AcpiOsExecute (OSL_NOTIFY_HANDLER, AcpiEvNotifyDispatch,
> +        Info);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        AcpiUtDeleteGenericState (Info);
>       }
>
>       return (Status);
> @@ -307,61 +282,37 @@ static void ACPI_SYSTEM_XFACE
>   AcpiEvNotifyDispatch (
>       void                    *Context)
>   {
> -    ACPI_GENERIC_STATE      *NotifyInfo = (ACPI_GENERIC_STATE *) Context;
> -    ACPI_NOTIFY_HANDLER     GlobalHandler = NULL;
> -    void                    *GlobalContext = NULL;
> +    ACPI_GENERIC_STATE      *Info = (ACPI_GENERIC_STATE *) Context;
>       ACPI_OPERAND_OBJECT     *HandlerObj;
>
>
>       ACPI_FUNCTION_ENTRY ();
>
>
> -    /*
> -     * We will invoke a global notify handler if installed. This is done
> -     * _before_ we invoke the per-device handler attached to the device.
> -     */
> -    if (NotifyInfo->Notify.Value <= ACPI_MAX_SYS_NOTIFY)
> -    {
> -        /* Global system notification handler */
> +    /* Invoke a global notify handler if installed */
>
> -        if (AcpiGbl_SystemNotify.Handler)
> -        {
> -            GlobalHandler = AcpiGbl_SystemNotify.Handler;
> -            GlobalContext = AcpiGbl_SystemNotify.Context;
> -        }
> -    }
> -    else
> +    if (Info->Notify.Global->Handler)
>       {
> -        /* Global driver notification handler */
> -
> -        if (AcpiGbl_DeviceNotify.Handler)
> -        {
> -            GlobalHandler = AcpiGbl_DeviceNotify.Handler;
> -            GlobalContext = AcpiGbl_DeviceNotify.Context;
> -        }
> +        Info->Notify.Global->Handler (Info->Notify.Node,
> +            Info->Notify.Value,
> +            Info->Notify.Global->Context);
>       }
>
> -    /* Invoke the system handler first, if present */
> +    /* Now invoke the local notify handler(s) if any are installed */
>
> -    if (GlobalHandler)
> +    HandlerObj = Info->Notify.HandlerListHead;
> +    while (HandlerObj)
>       {
> -        GlobalHandler (NotifyInfo->Notify.Node, NotifyInfo->Notify.Value,
> -            GlobalContext);
> -    }
> -
> -    /* Now invoke the per-device handler, if present */
> -
> -    HandlerObj = NotifyInfo->Notify.HandlerObj;
> -    if (HandlerObj)
> -    {
> -        HandlerObj->Notify.Handler (NotifyInfo->Notify.Node,
> -            NotifyInfo->Notify.Value,
> +        HandlerObj->Notify.Handler (Info->Notify.Node,
> +            Info->Notify.Value,
>               HandlerObj->Notify.Context);
> +
> +        HandlerObj = HandlerObj->Notify.Next[Info->Notify.HandlerListId];
>       }
>
>       /* All done with the info object */
>
> -    AcpiUtDeleteGenericState (NotifyInfo);
> +    AcpiUtDeleteGenericState (Info);
>   }
>
>
> diff --git a/src/acpica/source/components/events/evxface.c b/src/acpica/source/components/events/evxface.c
> index a6aea09..b0c5ce3 100644
> --- a/src/acpica/source/components/events/evxface.c
> +++ b/src/acpica/source/components/events/evxface.c
> @@ -132,15 +132,21 @@
>    *
>    * PARAMETERS:  Device          - The device for which notifies will be handled
>    *              HandlerType     - The type of handler:
> - *                                  ACPI_SYSTEM_NOTIFY: SystemHandler (00-7f)
> - *                                  ACPI_DEVICE_NOTIFY: DriverHandler (80-ff)
> - *                                  ACPI_ALL_NOTIFY:  both system and device
> + *                                  ACPI_SYSTEM_NOTIFY: System Handler (00-7F)
> + *                                  ACPI_DEVICE_NOTIFY: Device Handler (80-FF)
> + *                                  ACPI_ALL_NOTIFY:    Both System and Device
>    *              Handler         - Address of the handler
>    *              Context         - Value passed to the handler on each GPE
>    *
>    * RETURN:      Status
>    *
> - * DESCRIPTION: Install a handler for notifies on an ACPI device
> + * DESCRIPTION: Install a handler for notifications on an ACPI Device,
> + *              ThermalZone, or Processor object.
> + *
> + * NOTES:       The Root namespace object may have only one handler for each
> + *              type of notify (System/Device). Device/Thermal/Processor objects
> + *              may have one device notify handler, and multiple system notify
> + *              handlers.
>    *
>    ******************************************************************************/
>
> @@ -151,10 +157,11 @@ AcpiInstallNotifyHandler (
>       ACPI_NOTIFY_HANDLER     Handler,
>       void                    *Context)
>   {
> +    ACPI_NAMESPACE_NODE     *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Device);
>       ACPI_OPERAND_OBJECT     *ObjDesc;
> -    ACPI_OPERAND_OBJECT     *NotifyObj;
> -    ACPI_NAMESPACE_NODE     *Node;
> +    ACPI_OPERAND_OBJECT     *HandlerObj;
>       ACPI_STATUS             Status;
> +    UINT32                  i;
>
>
>       ACPI_FUNCTION_TRACE (AcpiInstallNotifyHandler);
> @@ -162,8 +169,7 @@ AcpiInstallNotifyHandler (
>
>       /* Parameter validation */
>
> -    if ((!Device)  ||
> -        (!Handler) ||
> +    if ((!Device) || (!Handler) || (!HandlerType) ||
>           (HandlerType > ACPI_MAX_NOTIFY_HANDLER_TYPE))
>       {
>           return_ACPI_STATUS (AE_BAD_PARAMETER);
> @@ -175,135 +181,124 @@ AcpiInstallNotifyHandler (
>           return_ACPI_STATUS (Status);
>       }
>
> -    /* Convert and validate the device handle */
> -
> -    Node = AcpiNsValidateHandle (Device);
> -    if (!Node)
> -    {
> -        Status = AE_BAD_PARAMETER;
> -        goto UnlockAndExit;
> -    }
> -
>       /*
>        * Root Object:
>        * Registering a notify handler on the root object indicates that the
>        * caller wishes to receive notifications for all objects. Note that
> -     * only one <external> global handler can be regsitered (per notify type).
> +     * only one global handler can be registered per notify type.
> +     * Ensure that a handler is not already installed.
>        */
>       if (Device == ACPI_ROOT_OBJECT)
>       {
> -        /* Make sure the handler is not already installed */
> -
> -        if (((HandlerType & ACPI_SYSTEM_NOTIFY) &&
> -                AcpiGbl_SystemNotify.Handler)       ||
> -            ((HandlerType & ACPI_DEVICE_NOTIFY) &&
> -                AcpiGbl_DeviceNotify.Handler))
> -        {
> -            Status = AE_ALREADY_EXISTS;
> -            goto UnlockAndExit;
> -        }
> -
> -        if (HandlerType & ACPI_SYSTEM_NOTIFY)
> -        {
> -            AcpiGbl_SystemNotify.Node    = Node;
> -            AcpiGbl_SystemNotify.Handler = Handler;
> -            AcpiGbl_SystemNotify.Context = Context;
> -        }
> -
> -        if (HandlerType & ACPI_DEVICE_NOTIFY)
> +        for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
>           {
> -            AcpiGbl_DeviceNotify.Node    = Node;
> -            AcpiGbl_DeviceNotify.Handler = Handler;
> -            AcpiGbl_DeviceNotify.Context = Context;
> +            if (HandlerType & (i+1))
> +            {
> +                if (AcpiGbl_GlobalNotify[i].Handler)
> +                {
> +                    Status = AE_ALREADY_EXISTS;
> +                    goto UnlockAndExit;
> +                }
> +
> +                AcpiGbl_GlobalNotify[i].Handler = Handler;
> +                AcpiGbl_GlobalNotify[i].Context = Context;
> +            }
>           }
>
> -        /* Global notify handler installed */
> +        goto UnlockAndExit; /* Global notify handler installed, all done */
>       }
>
>       /*
>        * All Other Objects:
> -     * Caller will only receive notifications specific to the target object.
> -     * Note that only certain object types can receive notifications.
> +     * Caller will only receive notifications specific to the target
> +     * object. Note that only certain object types are allowed to
> +     * receive notifications.
>        */
> -    else
> +
> +    /* Are Notifies allowed on this object? */
> +
> +    if (!AcpiEvIsNotifyObject (Node))
> +    {
> +        Status = AE_TYPE;
> +        goto UnlockAndExit;
> +    }
> +
> +    /* Check for an existing internal object, might not exist */
> +
> +    ObjDesc = AcpiNsGetAttachedObject (Node);
> +    if (!ObjDesc)
>       {
> -        /* Notifies allowed on this object? */
> +        /* Create a new object */
>
> -        if (!AcpiEvIsNotifyObject (Node))
> +        ObjDesc = AcpiUtCreateInternalObject (Node->Type);
> +        if (!ObjDesc)
>           {
> -            Status = AE_TYPE;
> +            Status = AE_NO_MEMORY;
>               goto UnlockAndExit;
>           }
>
> -        /* Check for an existing internal object */
> +        /* Attach new object to the Node, remove local reference */
>
> -        ObjDesc = AcpiNsGetAttachedObject (Node);
> -        if (ObjDesc)
> +        Status = AcpiNsAttachObject (Device, ObjDesc, Node->Type);
> +        AcpiUtRemoveReference (ObjDesc);
> +        if (ACPI_FAILURE (Status))
>           {
> -            /* Object exists - make sure there's no handler */
> -
> -            if (((HandlerType & ACPI_SYSTEM_NOTIFY) &&
> -                    ObjDesc->CommonNotify.SystemNotify)   ||
> -                ((HandlerType & ACPI_DEVICE_NOTIFY) &&
> -                    ObjDesc->CommonNotify.DeviceNotify))
> -            {
> -                Status = AE_ALREADY_EXISTS;
> -                goto UnlockAndExit;
> -            }
> +            goto UnlockAndExit;
>           }
> -        else
> -        {
> -            /* Create a new object */
> -
> -            ObjDesc = AcpiUtCreateInternalObject (Node->Type);
> -            if (!ObjDesc)
> -            {
> -                Status = AE_NO_MEMORY;
> -                goto UnlockAndExit;
> -            }
> -
> -            /* Attach new object to the Node */
> -
> -            Status = AcpiNsAttachObject (Device, ObjDesc, Node->Type);
> +    }
>
> -            /* Remove local reference to the object */
> +    /* Ensure that the handler is not already installed in the lists */
>
> -            AcpiUtRemoveReference (ObjDesc);
> -            if (ACPI_FAILURE (Status))
> +    for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
> +    {
> +        if (HandlerType & (i+1))
> +        {
> +            HandlerObj = ObjDesc->CommonNotify.NotifyList[i];
> +            while (HandlerObj)
>               {
> -                goto UnlockAndExit;
> +                if (HandlerObj->Notify.Handler == Handler)
> +                {
> +                    Status = AE_ALREADY_EXISTS;
> +                    goto UnlockAndExit;
> +                }
> +
> +                HandlerObj = HandlerObj->Notify.Next[i];
>               }
>           }
> +    }
>
> -        /* Install the handler */
> +    /* Create and populate a new notify handler object */
>
> -        NotifyObj = AcpiUtCreateInternalObject (ACPI_TYPE_LOCAL_NOTIFY);
> -        if (!NotifyObj)
> -        {
> -            Status = AE_NO_MEMORY;
> -            goto UnlockAndExit;
> -        }
> +    HandlerObj = AcpiUtCreateInternalObject (ACPI_TYPE_LOCAL_NOTIFY);
> +    if (!HandlerObj)
> +    {
> +        Status = AE_NO_MEMORY;
> +        goto UnlockAndExit;
> +    }
>
> -        NotifyObj->Notify.Node    = Node;
> -        NotifyObj->Notify.Handler = Handler;
> -        NotifyObj->Notify.Context = Context;
> +    HandlerObj->Notify.Node = Node;
> +    HandlerObj->Notify.HandlerType = HandlerType;
> +    HandlerObj->Notify.Handler = Handler;
> +    HandlerObj->Notify.Context = Context;
>
> -        if (HandlerType & ACPI_SYSTEM_NOTIFY)
> -        {
> -            ObjDesc->CommonNotify.SystemNotify = NotifyObj;
> -        }
> +    /* Install the handler at the list head(s) */
>
> -        if (HandlerType & ACPI_DEVICE_NOTIFY)
> +    for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
> +    {
> +        if (HandlerType & (i+1))
>           {
> -            ObjDesc->CommonNotify.DeviceNotify = NotifyObj;
> +            HandlerObj->Notify.Next[i] =
> +                ObjDesc->CommonNotify.NotifyList[i];
> +
> +            ObjDesc->CommonNotify.NotifyList[i] = HandlerObj;
>           }
> +    }
>
> -        if (HandlerType == ACPI_ALL_NOTIFY)
> -        {
> -            /* Extra ref if installed in both */
> +    /* Add an extra reference if handler was installed in both lists */
>
> -            AcpiUtAddReference (NotifyObj);
> -        }
> +    if (HandlerType == ACPI_ALL_NOTIFY)
> +    {
> +        AcpiUtAddReference (HandlerObj);
>       }
>
>
> @@ -319,11 +314,11 @@ ACPI_EXPORT_SYMBOL (AcpiInstallNotifyHandler)
>    *
>    * FUNCTION:    AcpiRemoveNotifyHandler
>    *
> - * PARAMETERS:  Device          - The device for which notifies will be handled
> + * PARAMETERS:  Device          - The device for which the handler is installed
>    *              HandlerType     - The type of handler:
> - *                                  ACPI_SYSTEM_NOTIFY: SystemHandler (00-7f)
> - *                                  ACPI_DEVICE_NOTIFY: DriverHandler (80-ff)
> - *                                  ACPI_ALL_NOTIFY:  both system and device
> + *                                  ACPI_SYSTEM_NOTIFY: System Handler (00-7F)
> + *                                  ACPI_DEVICE_NOTIFY: Device Handler (80-FF)
> + *                                  ACPI_ALL_NOTIFY:    Both System and Device
>    *              Handler         - Address of the handler
>    *
>    * RETURN:      Status
> @@ -338,10 +333,12 @@ AcpiRemoveNotifyHandler (
>       UINT32                  HandlerType,
>       ACPI_NOTIFY_HANDLER     Handler)
>   {
> -    ACPI_OPERAND_OBJECT     *NotifyObj;
> +    ACPI_NAMESPACE_NODE     *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Device);
>       ACPI_OPERAND_OBJECT     *ObjDesc;
> -    ACPI_NAMESPACE_NODE     *Node;
> +    ACPI_OPERAND_OBJECT     *HandlerObj;
> +    ACPI_OPERAND_OBJECT     *PreviousHandlerObj;
>       ACPI_STATUS             Status;
> +    UINT32                  i;
>
>
>       ACPI_FUNCTION_TRACE (AcpiRemoveNotifyHandler);
> @@ -349,122 +346,103 @@ AcpiRemoveNotifyHandler (
>
>       /* Parameter validation */
>
> -    if ((!Device)  ||
> -        (!Handler) ||
> +    if ((!Device) || (!Handler) || (!HandlerType) ||
>           (HandlerType > ACPI_MAX_NOTIFY_HANDLER_TYPE))
>       {
>           return_ACPI_STATUS (AE_BAD_PARAMETER);
>       }
>
> +    /* Make sure all deferred notify tasks are completed */
> +
> +    AcpiOsWaitEventsComplete ();
> +
>       Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
>       if (ACPI_FAILURE (Status))
>       {
>           return_ACPI_STATUS (Status);
>       }
>
> -    /* Convert and validate the device handle */
> -
> -    Node = AcpiNsValidateHandle (Device);
> -    if (!Node)
> -    {
> -        Status = AE_BAD_PARAMETER;
> -        goto UnlockAndExit;
> -    }
> -
> -    /* Root Object */
> +    /* Root Object. Global handlers are removed here */
>
>       if (Device == ACPI_ROOT_OBJECT)
>       {
> -        ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> -            "Removing notify handler for namespace root object\n"));
> -
> -        if (((HandlerType & ACPI_SYSTEM_NOTIFY) &&
> -              !AcpiGbl_SystemNotify.Handler)        ||
> -            ((HandlerType & ACPI_DEVICE_NOTIFY) &&
> -              !AcpiGbl_DeviceNotify.Handler))
> -        {
> -            Status = AE_NOT_EXIST;
> -            goto UnlockAndExit;
> -        }
> -
> -        if (HandlerType & ACPI_SYSTEM_NOTIFY)
> +        for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
>           {
> -            AcpiGbl_SystemNotify.Node    = NULL;
> -            AcpiGbl_SystemNotify.Handler = NULL;
> -            AcpiGbl_SystemNotify.Context = NULL;
> +            if (HandlerType & (i+1))
> +            {
> +                if (!AcpiGbl_GlobalNotify[i].Handler ||
> +                    (AcpiGbl_GlobalNotify[i].Handler != Handler))
> +                {
> +                    Status = AE_NOT_EXIST;
> +                    goto UnlockAndExit;
> +                }
> +
> +                ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> +                    "Removing global notify handler\n"));
> +
> +                AcpiGbl_GlobalNotify[i].Handler = NULL;
> +                AcpiGbl_GlobalNotify[i].Context = NULL;
> +            }
>           }
>
> -        if (HandlerType & ACPI_DEVICE_NOTIFY)
> -        {
> -            AcpiGbl_DeviceNotify.Node    = NULL;
> -            AcpiGbl_DeviceNotify.Handler = NULL;
> -            AcpiGbl_DeviceNotify.Context = NULL;
> -        }
> +        goto UnlockAndExit;
>       }
>
> -    /* All Other Objects */
> +    /* All other objects: Are Notifies allowed on this object? */
>
> -    else
> +    if (!AcpiEvIsNotifyObject (Node))
>       {
> -        /* Notifies allowed on this object? */
> +        Status = AE_TYPE;
> +        goto UnlockAndExit;
> +    }
>
> -        if (!AcpiEvIsNotifyObject (Node))
> -        {
> -            Status = AE_TYPE;
> -            goto UnlockAndExit;
> -        }
> +    /* Must have an existing internal object */
> +
> +    ObjDesc = AcpiNsGetAttachedObject (Node);
> +    if (!ObjDesc)
> +    {
> +        Status = AE_NOT_EXIST;
> +        goto UnlockAndExit;
> +    }
>
> -        /* Check for an existing internal object */
> +    /* Internal object exists. Find the handler and remove it */
>
> -        ObjDesc = AcpiNsGetAttachedObject (Node);
> -        if (!ObjDesc)
> +    for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
> +    {
> +        if (HandlerType & (i+1))
>           {
> -            Status = AE_NOT_EXIST;
> -            goto UnlockAndExit;
> -        }
> +            HandlerObj = ObjDesc->CommonNotify.NotifyList[i];
> +            PreviousHandlerObj = NULL;
>
> -        /* Object exists - make sure there's an existing handler */
> +            /* Attempt to find the handler in the handler list */
>
> -        if (HandlerType & ACPI_SYSTEM_NOTIFY)
> -        {
> -            NotifyObj = ObjDesc->CommonNotify.SystemNotify;
> -            if (!NotifyObj)
> +            while (HandlerObj &&
> +                  (HandlerObj->Notify.Handler != Handler))
>               {
> -                Status = AE_NOT_EXIST;
> -                goto UnlockAndExit;
> +                PreviousHandlerObj = HandlerObj;
> +                HandlerObj = HandlerObj->Notify.Next[i];
>               }
>
> -            if (NotifyObj->Notify.Handler != Handler)
> +            if (!HandlerObj)
>               {
> -                Status = AE_BAD_PARAMETER;
> +                Status = AE_NOT_EXIST;
>                   goto UnlockAndExit;
>               }
>
> -            /* Remove the handler */
> +            /* Remove the handler object from the list */
>
> -            ObjDesc->CommonNotify.SystemNotify = NULL;
> -            AcpiUtRemoveReference (NotifyObj);
> -        }
> -
> -        if (HandlerType & ACPI_DEVICE_NOTIFY)
> -        {
> -            NotifyObj = ObjDesc->CommonNotify.DeviceNotify;
> -            if (!NotifyObj)
> +            if (PreviousHandlerObj) /* Handler is not at the list head */
>               {
> -                Status = AE_NOT_EXIST;
> -                goto UnlockAndExit;
> +                PreviousHandlerObj->Notify.Next[i] =
> +                    HandlerObj->Notify.Next[i];
>               }
> -
> -            if (NotifyObj->Notify.Handler != Handler)
> +            else /* Handler is at the list head */
>               {
> -                Status = AE_BAD_PARAMETER;
> -                goto UnlockAndExit;
> +                ObjDesc->CommonNotify.NotifyList[i] =
> +                    HandlerObj->Notify.Next[i];
>               }
>
> -            /* Remove the handler */
> -
> -            ObjDesc->CommonNotify.DeviceNotify = NULL;
> -            AcpiUtRemoveReference (NotifyObj);
> +            AcpiUtRemoveReference (HandlerObj);
>           }
>       }
>
> @@ -894,6 +872,10 @@ AcpiRemoveGpeHandler (
>           return_ACPI_STATUS (AE_BAD_PARAMETER);
>       }
>
> +    /* Make sure all deferred GPE tasks are completed */
> +
> +    AcpiOsWaitEventsComplete ();
> +
>       Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
>       if (ACPI_FAILURE (Status))
>       {
> diff --git a/src/acpica/source/components/events/evxfgpe.c b/src/acpica/source/components/events/evxfgpe.c
> index 7018513..29e1d68 100644
> --- a/src/acpica/source/components/events/evxfgpe.c
> +++ b/src/acpica/source/components/events/evxfgpe.c
> @@ -155,7 +155,7 @@ AcpiUpdateAllGpes (
>       ACPI_STATUS             Status;
>
>
> -    ACPI_FUNCTION_TRACE (AcpiUpdateGpes);
> +    ACPI_FUNCTION_TRACE (AcpiUpdateAllGpes);
>
>
>       Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
> @@ -367,9 +367,11 @@ AcpiSetupGpeForWake (
>       ACPI_HANDLE             GpeDevice,
>       UINT32                  GpeNumber)
>   {
> -    ACPI_STATUS             Status = AE_BAD_PARAMETER;
> +    ACPI_STATUS             Status;
>       ACPI_GPE_EVENT_INFO     *GpeEventInfo;
>       ACPI_NAMESPACE_NODE     *DeviceNode;
> +    ACPI_GPE_NOTIFY_INFO    *Notify;
> +    ACPI_GPE_NOTIFY_INFO    *NewNotify;
>       ACPI_CPU_FLAGS          Flags;
>
>
> @@ -405,32 +407,88 @@ AcpiSetupGpeForWake (
>           return_ACPI_STATUS (AE_BAD_PARAMETER);
>       }
>
> +    /*
> +     * Allocate a new notify object up front, in case it is needed.
> +     * Memory allocation while holding a spinlock is a big no-no
> +     * on some hosts.
> +     */
> +    NewNotify = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_GPE_NOTIFY_INFO));
> +    if (!NewNotify)
> +    {
> +        return_ACPI_STATUS (AE_NO_MEMORY);
> +    }
> +
>       Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
>
>       /* Ensure that we have a valid GPE number */
>
>       GpeEventInfo = AcpiEvGetGpeEventInfo (GpeDevice, GpeNumber);
> -    if (GpeEventInfo)
> +    if (!GpeEventInfo)
> +    {
> +        Status = AE_BAD_PARAMETER;
> +        goto UnlockAndExit;
> +    }
> +
> +    /*
> +     * If there is no method or handler for this GPE, then the
> +     * WakeDevice will be notified whenever this GPE fires. This is
> +     * known as an "implicit notify". Note: The GPE is assumed to be
> +     * level-triggered (for windows compatibility).
> +     */
> +    if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
> +            ACPI_GPE_DISPATCH_NONE)
>       {
>           /*
> -         * If there is no method or handler for this GPE, then the
> -         * WakeDevice will be notified whenever this GPE fires (aka
> -         * "implicit notify") Note: The GPE is assumed to be
> -         * level-triggered (for windows compatibility).
> +         * This is the first device for implicit notify on this GPE.
> +         * Just set the flags here, and enter the NOTIFY block below.
>            */
> -        if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
> -                ACPI_GPE_DISPATCH_NONE)
> +        GpeEventInfo->Flags =
> +            (ACPI_GPE_DISPATCH_NOTIFY | ACPI_GPE_LEVEL_TRIGGERED);
> +    }
> +
> +    /*
> +     * If we already have an implicit notify on this GPE, add
> +     * this device to the notify list.
> +     */
> +    if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
> +            ACPI_GPE_DISPATCH_NOTIFY)
> +    {
> +        /* Ensure that the device is not already in the list */
> +
> +        Notify = GpeEventInfo->Dispatch.NotifyList;
> +        while (Notify)
>           {
> -            GpeEventInfo->Flags =
> -                (ACPI_GPE_DISPATCH_NOTIFY | ACPI_GPE_LEVEL_TRIGGERED);
> -            GpeEventInfo->Dispatch.DeviceNode = DeviceNode;
> +            if (Notify->DeviceNode == DeviceNode)
> +            {
> +                Status = AE_ALREADY_EXISTS;
> +                goto UnlockAndExit;
> +            }
> +            Notify = Notify->Next;
>           }
>
> -        GpeEventInfo->Flags |= ACPI_GPE_CAN_WAKE;
> -        Status = AE_OK;
> +        /* Add this device to the notify list for this GPE */
> +
> +        NewNotify->DeviceNode = DeviceNode;
> +        NewNotify->Next = GpeEventInfo->Dispatch.NotifyList;
> +        GpeEventInfo->Dispatch.NotifyList = NewNotify;
> +        NewNotify = NULL;
>       }
>
> +    /* Mark the GPE as a possible wake event */
> +
> +    GpeEventInfo->Flags |= ACPI_GPE_CAN_WAKE;
> +    Status = AE_OK;
> +
> +
> +UnlockAndExit:
>       AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
> +
> +    /* Delete the notify object if it was not used above */
> +
> +    if (NewNotify)
> +    {
> +        ACPI_FREE (NewNotify);
> +    }
>       return_ACPI_STATUS (Status);
>   }
>
> diff --git a/src/acpica/source/components/executer/exconfig.c b/src/acpica/source/components/executer/exconfig.c
> index 69361d5..55cef28 100644
> --- a/src/acpica/source/components/executer/exconfig.c
> +++ b/src/acpica/source/components/executer/exconfig.c
> @@ -252,7 +252,7 @@ AcpiExLoadTableOp (
>       ACPI_FUNCTION_TRACE (ExLoadTableOp);
>
>
> -    /* Validate lengths for the SignatureString, OEMIDString, OEMTableID */
> +    /* Validate lengths for the Signature, OemId, and OemTableId strings */
>
>       if ((Operand[0]->String.Length > ACPI_NAME_SIZE) ||
>           (Operand[1]->String.Length > ACPI_OEM_ID_SIZE) ||
> diff --git a/src/acpica/source/components/executer/exdump.c b/src/acpica/source/components/executer/exdump.c
> index 5aab606..b525333 100644
> --- a/src/acpica/source/components/executer/exdump.c
> +++ b/src/acpica/source/components/executer/exdump.c
> @@ -203,8 +203,8 @@ static ACPI_EXDUMP_INFO     AcpiExDumpDevice[4] =
>   {
>       {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpDevice),         NULL},
>       {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.Handler),               "Handler"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.SystemNotify),          "System Notify"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.DeviceNotify),          "Device Notify"}
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.NotifyList[0]),         "System Notify"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.NotifyList[1]),         "Device Notify"}
>   };
>
>   static ACPI_EXDUMP_INFO     AcpiExDumpEvent[2] =
> @@ -251,8 +251,8 @@ static ACPI_EXDUMP_INFO     AcpiExDumpPower[5] =
>       {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpPower),          NULL},
>       {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (PowerResource.SystemLevel),    "System Level"},
>       {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (PowerResource.ResourceOrder),  "Resource Order"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.SystemNotify),   "System Notify"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.DeviceNotify),   "Device Notify"}
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.NotifyList[0]),  "System Notify"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.NotifyList[1]),  "Device Notify"}
>   };
>
>   static ACPI_EXDUMP_INFO     AcpiExDumpProcessor[7] =
> @@ -261,16 +261,16 @@ static ACPI_EXDUMP_INFO     AcpiExDumpProcessor[7] =
>       {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Processor.ProcId),             "Processor ID"},
>       {ACPI_EXD_UINT8 ,   ACPI_EXD_OFFSET (Processor.Length),             "Length"},
>       {ACPI_EXD_ADDRESS,  ACPI_EXD_OFFSET (Processor.Address),            "Address"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.SystemNotify),       "System Notify"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.DeviceNotify),       "Device Notify"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.NotifyList[0]),      "System Notify"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.NotifyList[1]),      "Device Notify"},
>       {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.Handler),            "Handler"}
>   };
>
>   static ACPI_EXDUMP_INFO     AcpiExDumpThermal[4] =
>   {
>       {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpThermal),        NULL},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.SystemNotify),     "System Notify"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.DeviceNotify),     "Device Notify"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.NotifyList[0]),    "System Notify"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.NotifyList[1]),    "Device Notify"},
>       {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.Handler),          "Handler"}
>   };
>
> @@ -330,11 +330,15 @@ static ACPI_EXDUMP_INFO     AcpiExDumpAddressHandler[6] =
>       {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (AddressSpace.Context),         "Context"}
>   };
>
> -static ACPI_EXDUMP_INFO     AcpiExDumpNotify[3] =
> +static ACPI_EXDUMP_INFO     AcpiExDumpNotify[7] =
>   {
>       {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpNotify),         NULL},
>       {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Node),                  "Node"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Context),               "Context"}
> +    {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (Notify.HandlerType),           "Handler Type"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Handler),               "Handler"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Context),               "Context"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Next[0]),               "Next System Notify"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Next[1]),               "Next Device Notify"}
>   };
>
>
> diff --git a/src/acpica/source/components/executer/exprep.c b/src/acpica/source/components/executer/exprep.c
> index 0b65ab9..9b05f9d 100644
> --- a/src/acpica/source/components/executer/exprep.c
> +++ b/src/acpica/source/components/executer/exprep.c
> @@ -490,8 +490,8 @@ AcpiExPrepCommonFieldObject (
>    *
>    * RETURN:      Status
>    *
> - * DESCRIPTION: Construct an ACPI_OPERAND_OBJECT of type DefField and
> - *              connect it to the parent Node.
> + * DESCRIPTION: Construct an object of type ACPI_OPERAND_OBJECT with a
> + *              subtype of DefField and connect it to the parent Node.
>    *
>    ******************************************************************************/
>
> diff --git a/src/acpica/source/components/executer/exresolv.c b/src/acpica/source/components/executer/exresolv.c
> index 8d3893b..4b9e9b3 100644
> --- a/src/acpica/source/components/executer/exresolv.c
> +++ b/src/acpica/source/components/executer/exresolv.c
> @@ -237,7 +237,7 @@ AcpiExResolveObjectToValue (
>
>       StackDesc = *StackPtr;
>
> -    /* This is an ACPI_OPERAND_OBJECT  */
> +    /* This is an object of type ACPI_OPERAND_OBJECT */
>
>       switch (StackDesc->Common.Type)
>       {
> diff --git a/src/acpica/source/components/executer/exstore.c b/src/acpica/source/components/executer/exstore.c
> index 8bea79b..36fccf8 100644
> --- a/src/acpica/source/components/executer/exstore.c
> +++ b/src/acpica/source/components/executer/exstore.c
> @@ -140,15 +140,15 @@ AcpiExStoreObjectToIndex (
>    * FUNCTION:    AcpiExStore
>    *
>    * PARAMETERS:  *SourceDesc         - Value to be stored
> - *              *DestDesc           - Where to store it.  Must be an NS node
> - *                                    or an ACPI_OPERAND_OBJECT of type
> + *              *DestDesc           - Where to store it. Must be an NS node
> + *                                    or ACPI_OPERAND_OBJECT of type
>    *                                    Reference;
>    *              WalkState           - Current walk state
>    *
>    * RETURN:      Status
>    *
>    * DESCRIPTION: Store the value described by SourceDesc into the location
> - *              described by DestDesc.  Called by various interpreter
> + *              described by DestDesc. Called by various interpreter
>    *              functions to store the result of an operation into
>    *              the destination operand -- not just simply the actual "Store"
>    *              ASL operator.
> diff --git a/src/acpica/source/components/executer/exutils.c b/src/acpica/source/components/executer/exutils.c
> index 3ebcbe5..28a18ad 100644
> --- a/src/acpica/source/components/executer/exutils.c
> +++ b/src/acpica/source/components/executer/exutils.c
> @@ -193,7 +193,7 @@ AcpiExEnterInterpreter (
>    *
>    * DESCRIPTION: Reacquire the interpreter execution region from within the
>    *              interpreter code. Failure to enter the interpreter region is a
> - *              fatal system error. Used in  conjuction with
> + *              fatal system error. Used in conjunction with
>    *              RelinquishInterpreter
>    *
>    ******************************************************************************/
> diff --git a/src/acpica/source/components/hardware/hwsleep.c b/src/acpica/source/components/hardware/hwsleep.c
> index 6fd9d66..a2e4c43 100644
> --- a/src/acpica/source/components/hardware/hwsleep.c
> +++ b/src/acpica/source/components/hardware/hwsleep.c
> @@ -171,20 +171,6 @@ AcpiHwLegacySleep (
>           return_ACPI_STATUS (Status);
>       }
>
> -    if (SleepState != ACPI_STATE_S5)
> -    {
> -        /*
> -         * Disable BM arbitration. This feature is contained within an
> -         * optional register (PM2 Control), so ignore a BAD_ADDRESS
> -         * exception.
> -         */
> -        Status = AcpiWriteBitRegister (ACPI_BITREG_ARB_DISABLE, 1);
> -        if (ACPI_FAILURE (Status) && (Status != AE_BAD_ADDRESS))
> -        {
> -            return_ACPI_STATUS (Status);
> -        }
> -    }
> -
>       /*
>        * 1) Disable/Clear all GPEs
>        * 2) Enable all wakeup GPEs
> @@ -452,17 +438,6 @@ AcpiHwLegacyWake (
>               AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].StatusRegisterId,
>               ACPI_CLEAR_STATUS);
>
> -    /*
> -     * Enable BM arbitration. This feature is contained within an
> -     * optional register (PM2 Control), so ignore a BAD_ADDRESS
> -     * exception.
> -     */
> -    Status = AcpiWriteBitRegister (ACPI_BITREG_ARB_DISABLE, 0);
> -    if (ACPI_FAILURE (Status) && (Status != AE_BAD_ADDRESS))
> -    {
> -        return_ACPI_STATUS (Status);
> -    }
> -
>       AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING);
>       return_ACPI_STATUS (Status);
>   }
> diff --git a/src/acpica/source/components/hardware/hwxfsleep.c b/src/acpica/source/components/hardware/hwxfsleep.c
> index 631b81e..dfb7112 100644
> --- a/src/acpica/source/components/hardware/hwxfsleep.c
> +++ b/src/acpica/source/components/hardware/hwxfsleep.c
> @@ -173,6 +173,14 @@ AcpiSetFirmwareWakingVector (
>       ACPI_FUNCTION_TRACE (AcpiSetFirmwareWakingVector);
>
>
> +    /*
> +     * According to the ACPI specification 2.0c and later, the 64-bit
> +     * waking vector should be cleared and the 32-bit waking vector should
> +     * be used, unless we want the wake-up code to be called by the BIOS in
> +     * Protected Mode. Some systems (for example HP dv5-1004nr) are known
> +     * to fail to resume if the 64-bit vector is used.
> +     */
> +
>       /* Set the 32-bit vector */
>
>       AcpiGbl_FACS->FirmwareWakingVector = PhysicalAddress;
> diff --git a/src/acpica/source/components/namespace/nspredef.c b/src/acpica/source/components/namespace/nspredef.c
> index e6c7cf6..8bc2591 100644
> --- a/src/acpica/source/components/namespace/nspredef.c
> +++ b/src/acpica/source/components/namespace/nspredef.c
> @@ -753,7 +753,7 @@ AcpiNsCheckPackage (
>           {
>               /* Create the new outer package and populate it */
>
> -            Status = AcpiNsWrapWithPackage (Data, *Elements, ReturnObjectPtr);
> +            Status = AcpiNsWrapWithPackage (Data, ReturnObject, ReturnObjectPtr);
>               if (ACPI_FAILURE (Status))
>               {
>                   return (Status);
> diff --git a/src/acpica/source/components/parser/psxface.c b/src/acpica/source/components/parser/psxface.c
> index 11c5fc2..5da1b6a 100644
> --- a/src/acpica/source/components/parser/psxface.c
> +++ b/src/acpica/source/components/parser/psxface.c
> @@ -420,8 +420,8 @@ AcpiPsExecuteMethod (
>       }
>
>       /*
> -     * Start method evaluation with an implicit return of zero. This is done
> -     * for Windows compatibility.
> +     * Start method evaluation with an implicit return of zero.
> +     * This is done for Windows compatibility.
>        */
>       if (AcpiGbl_EnableInterpreterSlack)
>       {
> diff --git a/src/acpica/source/components/resources/rscreate.c b/src/acpica/source/components/resources/rscreate.c
> index d75ceb6..6aaf4bb 100644
> --- a/src/acpica/source/components/resources/rscreate.c
> +++ b/src/acpica/source/components/resources/rscreate.c
> @@ -281,8 +281,8 @@ AcpiRsCreateResourceList (
>    *
>    * FUNCTION:    AcpiRsCreatePciRoutingTable
>    *
> - * PARAMETERS:  PackageObject           - Pointer to an ACPI_OPERAND_OBJECT
> - *                                        package
> + * PARAMETERS:  PackageObject           - Pointer to a package containing one
> + *                                        of more ACPI_OPERAND_OBJECTs
>    *              OutputBuffer            - Pointer to the user's buffer
>    *
>    * RETURN:      Status  AE_OK if okay, else a valid ACPI_STATUS code.
> @@ -290,7 +290,7 @@ AcpiRsCreateResourceList (
>    *              AE_BUFFER_OVERFLOW and OutputBuffer->Length will point
>    *              to the size buffer needed.
>    *
> - * DESCRIPTION: Takes the ACPI_OPERAND_OBJECT  package and creates a
> + * DESCRIPTION: Takes the ACPI_OPERAND_OBJECT package and creates a
>    *              linked list of PCI interrupt descriptions
>    *
>    * NOTE: It is the caller's responsibility to ensure that the start of the
> diff --git a/src/acpica/source/components/resources/rsutils.c b/src/acpica/source/components/resources/rsutils.c
> index ce3143c..a45b3d6 100644
> --- a/src/acpica/source/components/resources/rsutils.c
> +++ b/src/acpica/source/components/resources/rsutils.c
> @@ -253,7 +253,7 @@ AcpiRsMoveData (
>
>           /*
>            * 16-, 32-, and 64-bit cases must use the move macros that perform
> -         * endian conversion and/or accomodate hardware that cannot perform
> +         * endian conversion and/or accommodate hardware that cannot perform
>            * misaligned memory transfers
>            */
>           case ACPI_RSC_MOVE16:
> diff --git a/src/acpica/source/components/tables/tbfadt.c b/src/acpica/source/components/tables/tbfadt.c
> index fa43dbb..2c51511 100644
> --- a/src/acpica/source/components/tables/tbfadt.c
> +++ b/src/acpica/source/components/tables/tbfadt.c
> @@ -124,12 +124,13 @@
>
>   /* Local prototypes */
>
> -static ACPI_INLINE void
> +static void
>   AcpiTbInitGenericAddress (
>       ACPI_GENERIC_ADDRESS    *GenericAddress,
>       UINT8                   SpaceId,
>       UINT8                   ByteWidth,
> -    UINT64                  Address);
> +    UINT64                  Address,
> +    char                    *RegisterName);
>
>   static void
>   AcpiTbConvertFadt (
> @@ -263,7 +264,7 @@ static ACPI_FADT_PM_INFO    FadtPmInfoTable[] =
>    *
>    * PARAMETERS:  GenericAddress      - GAS struct to be initialized
>    *              SpaceId             - ACPI Space ID for this register
> - *              ByteWidth           - Width of this register, in bytes
> + *              ByteWidth           - Width of this register
>    *              Address             - Address of the register
>    *
>    * RETURN:      None
> @@ -274,13 +275,30 @@ static ACPI_FADT_PM_INFO    FadtPmInfoTable[] =
>    *
>    ******************************************************************************/
>
> -static ACPI_INLINE void
> +static void
>   AcpiTbInitGenericAddress (
>       ACPI_GENERIC_ADDRESS    *GenericAddress,
>       UINT8                   SpaceId,
>       UINT8                   ByteWidth,
> -    UINT64                  Address)
> +    UINT64                  Address,
> +    char                    *RegisterName)
>   {
> +    UINT8                   BitWidth;
> +
> +
> +    /* Bit width field in the GAS is only one byte long, 255 max */
> +
> +    BitWidth = (UINT8) (ByteWidth * 8);
> +
> +    if (ByteWidth > 31) /* (31*8)=248 */
> +    {
> +        ACPI_ERROR ((AE_INFO,
> +            "%s - 32-bit FADT register is too long (%u bytes, %u bits) "
> +            "to convert to GAS struct - 255 bits max, truncating",
> +            RegisterName, ByteWidth, (ByteWidth * 8)));
> +
> +        BitWidth = 255;
> +    }
>
>       /*
>        * The 64-bit Address field is non-aligned in the byte packed
> @@ -291,7 +309,7 @@ AcpiTbInitGenericAddress (
>       /* All other fields are byte-wide */
>
>       GenericAddress->SpaceId = SpaceId;
> -    GenericAddress->BitWidth = (UINT8) ACPI_MUL_8 (ByteWidth);
> +    GenericAddress->BitWidth = BitWidth;
>       GenericAddress->BitOffset = 0;
>       GenericAddress->AccessWidth = 0; /* Access width ANY */
>   }
> @@ -392,7 +410,7 @@ AcpiTbCreateLocalFadt (
>        */
>       if (Length > sizeof (ACPI_TABLE_FADT))
>       {
> -        ACPI_WARNING ((AE_INFO,
> +        ACPI_BIOS_WARNING ((AE_INFO,
>               "FADT (revision %u) is longer than ACPI 5.0 version, "
>               "truncating length %u to %u",
>               Table->Revision, Length, (UINT32) sizeof (ACPI_TABLE_FADT)));
> @@ -540,8 +558,9 @@ AcpiTbConvertFadt (
>           if (Address64->Address && Address32 &&
>              (Address64->Address != (UINT64) Address32))
>           {
> -            ACPI_ERROR ((AE_INFO,
> -                "32/64X address mismatch in %s: 0x%8.8X/0x%8.8X%8.8X, using 32",
> +            ACPI_BIOS_ERROR ((AE_INFO,
> +                "32/64X address mismatch in FADT/%s: "
> +                "0x%8.8X/0x%8.8X%8.8X, using 32",
>                   FadtInfoTable[i].Name, Address32,
>                   ACPI_FORMAT_UINT64 (Address64->Address)));
>           }
> @@ -556,7 +575,7 @@ AcpiTbConvertFadt (
>                */
>               AcpiTbInitGenericAddress (Address64, ACPI_ADR_SPACE_SYSTEM_IO,
>                   *ACPI_ADD_PTR (UINT8, &AcpiGbl_FADT, FadtInfoTable[i].Length),
> -                (UINT64) Address32);
> +                (UINT64) Address32, FadtInfoTable[i].Name);
>           }
>       }
>   }
> @@ -600,7 +619,7 @@ AcpiTbValidateFadt (
>       if (AcpiGbl_FADT.Facs &&
>           (AcpiGbl_FADT.XFacs != (UINT64) AcpiGbl_FADT.Facs))
>       {
> -        ACPI_WARNING ((AE_INFO,
> +        ACPI_BIOS_WARNING ((AE_INFO,
>               "32/64X FACS address mismatch in FADT - "
>               "0x%8.8X/0x%8.8X%8.8X, using 32",
>               AcpiGbl_FADT.Facs, ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XFacs)));
> @@ -611,7 +630,7 @@ AcpiTbValidateFadt (
>       if (AcpiGbl_FADT.Dsdt &&
>           (AcpiGbl_FADT.XDsdt != (UINT64) AcpiGbl_FADT.Dsdt))
>       {
> -        ACPI_WARNING ((AE_INFO,
> +        ACPI_BIOS_WARNING ((AE_INFO,
>               "32/64X DSDT address mismatch in FADT - "
>               "0x%8.8X/0x%8.8X%8.8X, using 32",
>               AcpiGbl_FADT.Dsdt, ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XDsdt)));
> @@ -647,8 +666,8 @@ AcpiTbValidateFadt (
>           if (Address64->Address &&
>              (Address64->BitWidth != ACPI_MUL_8 (Length)))
>           {
> -            ACPI_WARNING ((AE_INFO,
> -                "32/64X length mismatch in %s: %u/%u",
> +            ACPI_BIOS_WARNING ((AE_INFO,
> +                "32/64X length mismatch in FADT/%s: %u/%u",
>                   Name, ACPI_MUL_8 (Length), Address64->BitWidth));
>           }
>
> @@ -660,9 +679,9 @@ AcpiTbValidateFadt (
>                */
>               if (!Address64->Address || !Length)
>               {
> -                ACPI_ERROR ((AE_INFO,
> -                    "Required field %s has zero address and/or length:"
> -                    " 0x%8.8X%8.8X/0x%X",
> +                ACPI_BIOS_ERROR ((AE_INFO,
> +                    "Required FADT field %s has zero address and/or length: "
> +                    "0x%8.8X%8.8X/0x%X",
>                       Name, ACPI_FORMAT_UINT64 (Address64->Address), Length));
>               }
>           }
> @@ -676,8 +695,8 @@ AcpiTbValidateFadt (
>               if ((Address64->Address && !Length) ||
>                   (!Address64->Address && Length))
>               {
> -                ACPI_WARNING ((AE_INFO,
> -                    "Optional field %s has zero address or length: "
> +                ACPI_BIOS_WARNING ((AE_INFO,
> +                    "Optional FADT field %s has zero address or length: "
>                       "0x%8.8X%8.8X/0x%X",
>                       Name, ACPI_FORMAT_UINT64 (Address64->Address), Length));
>               }
> @@ -728,8 +747,8 @@ AcpiTbSetupFadtRegisters (
>                   (FadtInfoTable[i].DefaultLength > 0) &&
>                   (FadtInfoTable[i].DefaultLength != Target64->BitWidth))
>               {
> -                ACPI_WARNING ((AE_INFO,
> -                    "Invalid length for %s: %u, using default %u",
> +                ACPI_BIOS_WARNING ((AE_INFO,
> +                    "Invalid length for FADT/%s: %u, using default %u",
>                       FadtInfoTable[i].Name, Target64->BitWidth,
>                       FadtInfoTable[i].DefaultLength));
>
> @@ -772,7 +791,8 @@ AcpiTbSetupFadtRegisters (
>               AcpiTbInitGenericAddress (FadtPmInfoTable[i].Target,
>                   Source64->SpaceId, Pm1RegisterByteWidth,
>                   Source64->Address +
> -                    (FadtPmInfoTable[i].RegisterNum * Pm1RegisterByteWidth));
> +                    (FadtPmInfoTable[i].RegisterNum * Pm1RegisterByteWidth),
> +                "PmRegisters");
>           }
>       }
>   }
> diff --git a/src/acpica/source/components/tables/tbinstal.c b/src/acpica/source/components/tables/tbinstal.c
> index 00fd2a2..5e112dc 100644
> --- a/src/acpica/source/components/tables/tbinstal.c
> +++ b/src/acpica/source/components/tables/tbinstal.c
> @@ -229,8 +229,9 @@ AcpiTbAddTable (
>          (!ACPI_COMPARE_NAME (TableDesc->Pointer->Signature, ACPI_SIG_SSDT)) &&
>          (ACPI_STRNCMP (TableDesc->Pointer->Signature, "OEM", 3)))
>       {
> -        ACPI_ERROR ((AE_INFO,
> -            "Table has invalid signature [%4.4s] (0x%8.8X), must be SSDT or OEMx",
> +        ACPI_BIOS_ERROR ((AE_INFO,
> +            "Table has invalid signature [%4.4s] (0x%8.8X), "
> +            "must be SSDT or OEMx",
>               AcpiUtValidAcpiName (*(UINT32 *) TableDesc->Pointer->Signature) ?
>                   TableDesc->Pointer->Signature : "????",
>               *(UINT32 *) TableDesc->Pointer->Signature));
> diff --git a/src/acpica/source/components/tables/tbutils.c b/src/acpica/source/components/tables/tbutils.c
> index 4ad777c..4f0b75d 100644
> --- a/src/acpica/source/components/tables/tbutils.c
> +++ b/src/acpica/source/components/tables/tbutils.c
> @@ -359,8 +359,9 @@ AcpiTbVerifyChecksum (
>
>       if (Checksum)
>       {
> -        ACPI_WARNING ((AE_INFO,
> -            "Incorrect checksum in table [%4.4s] - 0x%2.2X, should be 0x%2.2X",
> +        ACPI_BIOS_WARNING ((AE_INFO,
> +            "Incorrect checksum in table [%4.4s] - 0x%2.2X, "
> +            "should be 0x%2.2X",
>               Table->Signature, Table->Checksum,
>               (UINT8) (Table->Checksum - Checksum)));
>
> @@ -428,8 +429,9 @@ AcpiTbCheckDsdtHeader (
>       if (AcpiGbl_OriginalDsdtHeader.Length != AcpiGbl_DSDT->Length ||
>           AcpiGbl_OriginalDsdtHeader.Checksum != AcpiGbl_DSDT->Checksum)
>       {
> -        ACPI_ERROR ((AE_INFO,
> -            "The DSDT has been corrupted or replaced - old, new headers below"));
> +        ACPI_BIOS_ERROR ((AE_INFO,
> +            "The DSDT has been corrupted or replaced - "
> +            "old, new headers below"));
>           AcpiTbPrintTableHeader (0, &AcpiGbl_OriginalDsdtHeader);
>           AcpiTbPrintTableHeader (0, AcpiGbl_DSDT);
>
> @@ -537,7 +539,7 @@ AcpiTbInstallTable (
>       if (Signature &&
>           !ACPI_COMPARE_NAME (Table->Signature, Signature))
>       {
> -        ACPI_ERROR ((AE_INFO,
> +        ACPI_BIOS_ERROR ((AE_INFO,
>               "Invalid signature 0x%X for ACPI table, expected [%s]",
>               *ACPI_CAST_PTR (UINT32, Table->Signature), Signature));
>           goto UnmapAndExit;
> @@ -656,7 +658,7 @@ AcpiTbGetRootTableEntry (
>           {
>               /* Will truncate 64-bit address to 32 bits, issue warning */
>
> -            ACPI_WARNING ((AE_INFO,
> +            ACPI_BIOS_WARNING ((AE_INFO,
>                   "64-bit Physical Address in XSDT is too large (0x%8.8X%8.8X),"
>                   " truncating",
>                   ACPI_FORMAT_UINT64 (Address64)));
> @@ -758,7 +760,8 @@ AcpiTbParseRootTable (
>
>       if (Length < sizeof (ACPI_TABLE_HEADER))
>       {
> -        ACPI_ERROR ((AE_INFO, "Invalid length 0x%X in RSDT/XSDT", Length));
> +        ACPI_BIOS_ERROR ((AE_INFO,
> +            "Invalid table length 0x%X in RSDT/XSDT", Length));
>           return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH);
>       }
>
> diff --git a/src/acpica/source/components/tables/tbxface.c b/src/acpica/source/components/tables/tbxface.c
> index 860dc2e..b91cce1 100644
> --- a/src/acpica/source/components/tables/tbxface.c
> +++ b/src/acpica/source/components/tables/tbxface.c
> @@ -1,7 +1,6 @@
>   /******************************************************************************
>    *
> - * Module Name: tbxface - Public interfaces to the ACPI subsystem
> - *                         ACPI table oriented interfaces
> + * Module Name: tbxface - ACPI table oriented external interfaces
>    *
>    *****************************************************************************/
>
> @@ -118,18 +117,11 @@
>
>   #include "acpi.h"
>   #include "accommon.h"
> -#include "acnamesp.h"
>   #include "actables.h"
>
>   #define _COMPONENT          ACPI_TABLES
>           ACPI_MODULE_NAME    ("tbxface")
>
> -/* Local prototypes */
> -
> -static ACPI_STATUS
> -AcpiTbLoadNamespace (
> -    void);
> -
>
>   /*******************************************************************************
>    *
> @@ -530,155 +522,6 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableByIndex)
>
>   /*******************************************************************************
>    *
> - * FUNCTION:    AcpiTbLoadNamespace
> - *
> - * PARAMETERS:  None
> - *
> - * RETURN:      Status
> - *
> - * DESCRIPTION: Load the namespace from the DSDT and all SSDTs/PSDTs found in
> - *              the RSDT/XSDT.
> - *
> - ******************************************************************************/
> -
> -static ACPI_STATUS
> -AcpiTbLoadNamespace (
> -    void)
> -{
> -    ACPI_STATUS             Status;
> -    UINT32                  i;
> -    ACPI_TABLE_HEADER       *NewDsdt;
> -
> -
> -    ACPI_FUNCTION_TRACE (TbLoadNamespace);
> -
> -
> -    (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
> -
> -    /*
> -     * Load the namespace. The DSDT is required, but any SSDT and
> -     * PSDT tables are optional. Verify the DSDT.
> -     */
> -    if (!AcpiGbl_RootTableList.CurrentTableCount ||
> -        !ACPI_COMPARE_NAME (
> -            &(AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Signature),
> -            ACPI_SIG_DSDT) ||
> -         ACPI_FAILURE (AcpiTbVerifyTable (
> -            &AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT])))
> -    {
> -        Status = AE_NO_ACPI_TABLES;
> -        goto UnlockAndExit;
> -    }
> -
> -    /*
> -     * Save the DSDT pointer for simple access. This is the mapped memory
> -     * address. We must take care here because the address of the .Tables
> -     * array can change dynamically as tables are loaded at run-time. Note:
> -     * .Pointer field is not validated until after call to AcpiTbVerifyTable.
> -     */
> -    AcpiGbl_DSDT = AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer;
> -
> -    /*
> -     * Optionally copy the entire DSDT to local memory (instead of simply
> -     * mapping it.) There are some BIOSs that corrupt or replace the original
> -     * DSDT, creating the need for this option. Default is FALSE, do not copy
> -     * the DSDT.
> -     */
> -    if (AcpiGbl_CopyDsdtLocally)
> -    {
> -        NewDsdt = AcpiTbCopyDsdt (ACPI_TABLE_INDEX_DSDT);
> -        if (NewDsdt)
> -        {
> -            AcpiGbl_DSDT = NewDsdt;
> -        }
> -    }
> -
> -    /*
> -     * Save the original DSDT header for detection of table corruption
> -     * and/or replacement of the DSDT from outside the OS.
> -     */
> -    ACPI_MEMCPY (&AcpiGbl_OriginalDsdtHeader, AcpiGbl_DSDT,
> -        sizeof (ACPI_TABLE_HEADER));
> -
> -    (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
> -
> -    /* Load and parse tables */
> -
> -    Status = AcpiNsLoadTable (ACPI_TABLE_INDEX_DSDT, AcpiGbl_RootNode);
> -    if (ACPI_FAILURE (Status))
> -    {
> -        return_ACPI_STATUS (Status);
> -    }
> -
> -    /* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */
> -
> -    (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
> -    for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)
> -    {
> -        if ((!ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),
> -                    ACPI_SIG_SSDT) &&
> -             !ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),
> -                    ACPI_SIG_PSDT)) ||
> -             ACPI_FAILURE (AcpiTbVerifyTable (
> -                &AcpiGbl_RootTableList.Tables[i])))
> -        {
> -            continue;
> -        }
> -
> -        /* Ignore errors while loading tables, get as many as possible */
> -
> -        (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
> -        (void) AcpiNsLoadTable (i, AcpiGbl_RootNode);
> -        (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
> -    }
> -
> -    ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "ACPI Tables successfully acquired\n"));
> -
> -UnlockAndExit:
> -    (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
> -    return_ACPI_STATUS (Status);
> -}
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION:    AcpiLoadTables
> - *
> - * PARAMETERS:  None
> - *
> - * RETURN:      Status
> - *
> - * DESCRIPTION: Load the ACPI tables from the RSDT/XSDT
> - *
> - ******************************************************************************/
> -
> -ACPI_STATUS
> -AcpiLoadTables (
> -    void)
> -{
> -    ACPI_STATUS             Status;
> -
> -
> -    ACPI_FUNCTION_TRACE (AcpiLoadTables);
> -
> -
> -    /* Load the namespace from the tables */
> -
> -    Status = AcpiTbLoadNamespace ();
> -    if (ACPI_FAILURE (Status))
> -    {
> -        ACPI_EXCEPTION ((AE_INFO, Status,
> -            "While loading namespace from ACPI tables"));
> -    }
> -
> -    return_ACPI_STATUS (Status);
> -}
> -
> -ACPI_EXPORT_SYMBOL (AcpiLoadTables)
> -
> -
> -/*******************************************************************************
> - *
>    * FUNCTION:    AcpiInstallTableHandler
>    *
>    * PARAMETERS:  Handler         - Table event handler
> diff --git a/src/acpica/source/components/tables/tbxfroot.c b/src/acpica/source/components/tables/tbxfroot.c
> index e85c1fd..d00db5f 100644
> --- a/src/acpica/source/components/tables/tbxfroot.c
> +++ b/src/acpica/source/components/tables/tbxfroot.c
> @@ -306,7 +306,7 @@ AcpiFindRootPointer (
>
>       /* A valid RSDP was not found */
>
> -    ACPI_ERROR ((AE_INFO, "A valid RSDP was not found"));
> +    ACPI_BIOS_ERROR ((AE_INFO, "A valid RSDP was not found"));
>       return_ACPI_STATUS (AE_NOT_FOUND);
>   }
>
> diff --git a/src/acpica/source/components/utilities/utdecode.c b/src/acpica/source/components/utilities/utdecode.c
> index b36aa45..a88c581 100644
> --- a/src/acpica/source/components/utilities/utdecode.c
> +++ b/src/acpica/source/components/utilities/utdecode.c
> @@ -123,47 +123,6 @@
>           ACPI_MODULE_NAME    ("utdecode")
>
>
> -/*******************************************************************************
> - *
> - * FUNCTION:    AcpiFormatException
> - *
> - * PARAMETERS:  Status       - The ACPI_STATUS code to be formatted
> - *
> - * RETURN:      A string containing the exception text. A valid pointer is
> - *              always returned.
> - *
> - * DESCRIPTION: This function translates an ACPI exception into an ASCII string
> - *              It is here instead of utxface.c so it is always present.
> - *
> - ******************************************************************************/
> -
> -const char *
> -AcpiFormatException (
> -    ACPI_STATUS             Status)
> -{
> -    const char              *Exception = NULL;
> -
> -
> -    ACPI_FUNCTION_ENTRY ();
> -
> -
> -    Exception = AcpiUtValidateException (Status);
> -    if (!Exception)
> -    {
> -        /* Exception code was not recognized */
> -
> -        ACPI_ERROR ((AE_INFO,
> -            "Unknown exception code: 0x%8.8X", Status));
> -
> -        Exception = "UNKNOWN_STATUS_CODE";
> -    }
> -
> -    return (ACPI_CAST_PTR (const char, Exception));
> -}
> -
> -ACPI_EXPORT_SYMBOL (AcpiFormatException)
> -
> -
>   /*
>    * Properties of the ACPI Object Types, both internal and external.
>    * The table is indexed by values of ACPI_OBJECT_TYPE
> @@ -252,16 +211,17 @@ AcpiUtHexToAsciiChar (
>
>   const char        *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] =
>   {
> -    "SystemMemory",
> -    "SystemIO",
> -    "PCI_Config",
> -    "EmbeddedControl",
> -    "SMBus",
> -    "SystemCMOS",
> -    "PCIBARTarget",
> -    "IPMI",
> -    "GeneralPurposeIo",
> -    "GenericSerialBus"
> +    "SystemMemory",     /* 0x00 */
> +    "SystemIO",         /* 0x01 */
> +    "PCI_Config",       /* 0x02 */
> +    "EmbeddedControl",  /* 0x03 */
> +    "SMBus",            /* 0x04 */
> +    "SystemCMOS",       /* 0x05 */
> +    "PCIBARTarget",     /* 0x06 */
> +    "IPMI",             /* 0x07 */
> +    "GeneralPurposeIo", /* 0x08 */
> +    "GenericSerialBus", /* 0x09 */
> +    "PCC"               /* 0x0A */
>   };
>
>
> diff --git a/src/acpica/source/components/utilities/utdelete.c b/src/acpica/source/components/utilities/utdelete.c
> index 3130e6d..b64a585 100644
> --- a/src/acpica/source/components/utilities/utdelete.c
> +++ b/src/acpica/source/components/utilities/utdelete.c
> @@ -239,7 +239,7 @@ AcpiUtDeleteInternalObj (
>       case ACPI_TYPE_PROCESSOR:
>       case ACPI_TYPE_THERMAL:
>
> -        /* Walk the notify handler list for this object */
> +        /* Walk the address handler list for this object */
>
>           HandlerDesc = Object->CommonNotify.Handler;
>           while (HandlerDesc)
> @@ -595,6 +595,7 @@ AcpiUtUpdateObjectReference (
>       ACPI_STATUS             Status = AE_OK;
>       ACPI_GENERIC_STATE      *StateList = NULL;
>       ACPI_OPERAND_OBJECT     *NextObject = NULL;
> +    ACPI_OPERAND_OBJECT     *PrevObject;
>       ACPI_GENERIC_STATE      *State;
>       UINT32                  i;
>
> @@ -624,10 +625,20 @@ AcpiUtUpdateObjectReference (
>           case ACPI_TYPE_POWER:
>           case ACPI_TYPE_THERMAL:
>
> -            /* Update the notify objects for these types (if present) */
> -
> -            AcpiUtUpdateRefCount (Object->CommonNotify.SystemNotify, Action);
> -            AcpiUtUpdateRefCount (Object->CommonNotify.DeviceNotify, Action);
> +            /*
> +             * Update the notify objects for these types (if present)
> +             * Two lists, system and device notify handlers.
> +             */
> +            for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
> +            {
> +                PrevObject = Object->CommonNotify.NotifyList[i];
> +                while (PrevObject)
> +                {
> +                    NextObject = PrevObject->Notify.Next[i];
> +                    AcpiUtUpdateRefCount (PrevObject, Action);
> +                    PrevObject = NextObject;
> +                }
> +            }
>               break;
>
>           case ACPI_TYPE_PACKAGE:
> diff --git a/src/acpica/source/components/utilities/utglobal.c b/src/acpica/source/components/utilities/utglobal.c
> index 8ebbaec..98b1e48 100644
> --- a/src/acpica/source/components/utilities/utglobal.c
> +++ b/src/acpica/source/components/utilities/utglobal.c
> @@ -283,8 +283,9 @@ ACPI_FIXED_EVENT_INFO       AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS] =
>    *
>    * RETURN:      Status
>    *
> - * DESCRIPTION: Init ACPICA globals.  All globals that require specific
> - *              initialization should be initialized here!
> + * DESCRIPTION: Initialize ACPICA globals. All globals that require specific
> + *              initialization should be initialized here. This allows for
> + *              a warm restart.
>    *
>    ******************************************************************************/
>
> @@ -359,8 +360,8 @@ AcpiUtInitGlobals (
>
>       /* Global handlers */
>
> -    AcpiGbl_SystemNotify.Handler        = NULL;
> -    AcpiGbl_DeviceNotify.Handler        = NULL;
> +    AcpiGbl_GlobalNotify[0].Handler     = NULL;
> +    AcpiGbl_GlobalNotify[1].Handler     = NULL;
>       AcpiGbl_ExceptionHandler            = NULL;
>       AcpiGbl_InitHandler                 = NULL;
>       AcpiGbl_TableHandler                = NULL;
> diff --git a/src/acpica/source/components/utilities/utmisc.c b/src/acpica/source/components/utilities/utmisc.c
> index 44dd533..7318f68 100644
> --- a/src/acpica/source/components/utilities/utmisc.c
> +++ b/src/acpica/source/components/utilities/utmisc.c
> @@ -125,84 +125,41 @@
>           ACPI_MODULE_NAME    ("utmisc")
>
>
> +#if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP
>   /*******************************************************************************
>    *
> - * FUNCTION:    AcpiUtValidateException
> + * FUNCTION:    UtConvertBackslashes
>    *
> - * PARAMETERS:  Status       - The ACPI_STATUS code to be formatted
> + * PARAMETERS:  Pathname        - File pathname string to be converted
>    *
> - * RETURN:      A string containing the exception text. NULL if exception is
> - *              not valid.
> + * RETURN:      Modifies the input Pathname
>    *
> - * DESCRIPTION: This function validates and translates an ACPI exception into
> - *              an ASCII string.
> + * DESCRIPTION: Convert all backslashes (0x5C) to forward slashes (0x2F) within
> + *              the entire input file pathname string.
>    *
>    ******************************************************************************/
>
> -const char *
> -AcpiUtValidateException (
> -    ACPI_STATUS             Status)
> +void
> +UtConvertBackslashes (
> +    char                    *Pathname)
>   {
> -    UINT32                  SubStatus;
> -    const char              *Exception = NULL;
> -
> -
> -    ACPI_FUNCTION_ENTRY ();
> -
>
> -    /*
> -     * Status is composed of two parts, a "type" and an actual code
> -     */
> -    SubStatus = (Status & ~AE_CODE_MASK);
> -
> -    switch (Status & AE_CODE_MASK)
> +    if (!Pathname)
>       {
> -    case AE_CODE_ENVIRONMENTAL:
> -
> -        if (SubStatus <= AE_CODE_ENV_MAX)
> -        {
> -            Exception = AcpiGbl_ExceptionNames_Env [SubStatus];
> -        }
> -        break;
> -
> -    case AE_CODE_PROGRAMMER:
> -
> -        if (SubStatus <= AE_CODE_PGM_MAX)
> -        {
> -            Exception = AcpiGbl_ExceptionNames_Pgm [SubStatus];
> -        }
> -        break;
> -
> -    case AE_CODE_ACPI_TABLES:
> -
> -        if (SubStatus <= AE_CODE_TBL_MAX)
> -        {
> -            Exception = AcpiGbl_ExceptionNames_Tbl [SubStatus];
> -        }
> -        break;
> -
> -    case AE_CODE_AML:
> -
> -        if (SubStatus <= AE_CODE_AML_MAX)
> -        {
> -            Exception = AcpiGbl_ExceptionNames_Aml [SubStatus];
> -        }
> -        break;
> -
> -    case AE_CODE_CONTROL:
> +        return;
> +    }
>
> -        if (SubStatus <= AE_CODE_CTRL_MAX)
> +    while (*Pathname)
> +    {
> +        if (*Pathname == '\\')
>           {
> -            Exception = AcpiGbl_ExceptionNames_Ctrl [SubStatus];
> +            *Pathname = '/';
>           }
> -        break;
>
> -    default:
> -        break;
> +        Pathname++;
>       }
> -
> -    return (ACPI_CAST_PTR (const char, Exception));
>   }
> +#endif
>
>
>   /*******************************************************************************
> @@ -1367,5 +1324,3 @@ AcpiUtWalkPackageTree (
>
>       return_ACPI_STATUS (AE_AML_INTERNAL);
>   }
> -
> -
> diff --git a/src/acpica/source/components/utilities/utobject.c b/src/acpica/source/components/utilities/utobject.c
> index ade2980..4914159 100644
> --- a/src/acpica/source/components/utilities/utobject.c
> +++ b/src/acpica/source/components/utilities/utobject.c
> @@ -438,7 +438,7 @@ AcpiUtCreateStringObject (
>    *
>    * RETURN:      TRUE if object is valid, FALSE otherwise
>    *
> - * DESCRIPTION: Validate a pointer to be an ACPI_OPERAND_OBJECT
> + * DESCRIPTION: Validate a pointer to be of type ACPI_OPERAND_OBJECT
>    *
>    ******************************************************************************/
>
> @@ -464,7 +464,7 @@ AcpiUtValidInternalObject (
>       {
>       case ACPI_DESC_TYPE_OPERAND:
>
> -        /* The object appears to be a valid ACPI_OPERAND_OBJECT  */
> +        /* The object appears to be a valid ACPI_OPERAND_OBJECT */
>
>           return (TRUE);
>
> @@ -545,7 +545,7 @@ AcpiUtDeleteObjectDesc (
>       ACPI_FUNCTION_TRACE_PTR (UtDeleteObjectDesc, Object);
>
>
> -    /* Object must be an ACPI_OPERAND_OBJECT  */
> +    /* Object must be of type ACPI_OPERAND_OBJECT */
>
>       if (ACPI_GET_DESCRIPTOR_TYPE (Object) != ACPI_DESC_TYPE_OPERAND)
>       {
> diff --git a/src/acpica/source/components/utilities/utresrc.c b/src/acpica/source/components/utilities/utresrc.c
> index 69df740..3835b47 100644
> --- a/src/acpica/source/components/utilities/utresrc.c
> +++ b/src/acpica/source/components/utilities/utresrc.c
> @@ -1,6 +1,6 @@
>   /*******************************************************************************
>    *
> - * Module Name: utresrc - Resource managment utilities
> + * Module Name: utresrc - Resource management utilities
>    *
>    ******************************************************************************/
>
> @@ -129,7 +129,7 @@
>
>   /*
>    * Strings used to decode resource descriptors.
> - * Used by both the disasssembler and the debugger resource dump routines
> + * Used by both the disassembler and the debugger resource dump routines
>    */
>   const char                      *AcpiGbl_BmDecode[] =
>   {
> diff --git a/src/acpica/source/components/utilities/uttrack.c b/src/acpica/source/components/utilities/uttrack.c
> index 7f2311a..3d73fc5 100644
> --- a/src/acpica/source/components/utilities/uttrack.c
> +++ b/src/acpica/source/components/utilities/uttrack.c
> @@ -705,21 +705,21 @@ AcpiUtDumpAllocations (
>                       switch (ACPI_GET_DESCRIPTOR_TYPE (Descriptor))
>                       {
>                       case ACPI_DESC_TYPE_OPERAND:
> -                        if (Element->Size == sizeof (ACPI_DESC_TYPE_OPERAND))
> +                        if (Element->Size == sizeof (ACPI_OPERAND_OBJECT))
>                           {
>                               DescriptorType = ACPI_DESC_TYPE_OPERAND;
>                           }
>                           break;
>
>                       case ACPI_DESC_TYPE_PARSER:
> -                        if (Element->Size == sizeof (ACPI_DESC_TYPE_PARSER))
> +                        if (Element->Size == sizeof (ACPI_PARSE_OBJECT))
>                           {
>                               DescriptorType = ACPI_DESC_TYPE_PARSER;
>                           }
>                           break;
>
>                       case ACPI_DESC_TYPE_NAMED:
> -                        if (Element->Size == sizeof (ACPI_DESC_TYPE_NAMED))
> +                        if (Element->Size == sizeof (ACPI_NAMESPACE_NODE))
>                           {
>                               DescriptorType = ACPI_DESC_TYPE_NAMED;
>                           }
> diff --git a/src/acpica/source/components/utilities/utxferror.c b/src/acpica/source/components/utilities/utxferror.c
> index 8a98a89..c0961a2 100644
> --- a/src/acpica/source/components/utilities/utxferror.c
> +++ b/src/acpica/source/components/utilities/utxferror.c
> @@ -159,6 +159,9 @@ extern FILE                 *AcpiGbl_OutputFile;
>   #define ACPI_MSG_WARNING        "ACPI Warning: "
>   #define ACPI_MSG_INFO           "ACPI: "
>
> +#define ACPI_MSG_BIOS_ERROR     "ACPI Firmware Error: "
> +#define ACPI_MSG_BIOS_WARNING   "ACPI Firmware Warning: "
> +
>   /*
>    * Common message suffix
>    */
> @@ -324,6 +327,84 @@ AcpiInfo (
>   ACPI_EXPORT_SYMBOL (AcpiInfo)
>
>
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiBiosError
> + *
> + * PARAMETERS:  ModuleName          - Caller's module name (for error output)
> + *              LineNumber          - Caller's line number (for error output)
> + *              Format              - Printf format string + additional args
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Print "ACPI Firmware Error" message with module/line/version
> + *              info
> + *
> + ******************************************************************************/
> +
> +void ACPI_INTERNAL_VAR_XFACE
> +AcpiBiosError (
> +    const char              *ModuleName,
> +    UINT32                  LineNumber,
> +    const char              *Format,
> +    ...)
> +{
> +    va_list                 ArgList;
> +
> +
> +    ACPI_MSG_REDIRECT_BEGIN;
> +    AcpiOsPrintf (ACPI_MSG_BIOS_ERROR);
> +
> +    va_start (ArgList, Format);
> +    AcpiOsVprintf (Format, ArgList);
> +    ACPI_MSG_SUFFIX;
> +    va_end (ArgList);
> +
> +    ACPI_MSG_REDIRECT_END;
> +}
> +
> +ACPI_EXPORT_SYMBOL (AcpiBiosError)
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiBiosWarning
> + *
> + * PARAMETERS:  ModuleName          - Caller's module name (for error output)
> + *              LineNumber          - Caller's line number (for error output)
> + *              Format              - Printf format string + additional args
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Print "ACPI Firmware Warning" message with module/line/version
> + *              info
> + *
> + ******************************************************************************/
> +
> +void ACPI_INTERNAL_VAR_XFACE
> +AcpiBiosWarning (
> +    const char              *ModuleName,
> +    UINT32                  LineNumber,
> +    const char              *Format,
> +    ...)
> +{
> +    va_list                 ArgList;
> +
> +
> +    ACPI_MSG_REDIRECT_BEGIN;
> +    AcpiOsPrintf (ACPI_MSG_BIOS_WARNING);
> +
> +    va_start (ArgList, Format);
> +    AcpiOsVprintf (Format, ArgList);
> +    ACPI_MSG_SUFFIX;
> +    va_end (ArgList);
> +
> +    ACPI_MSG_REDIRECT_END;
> +}
> +
> +ACPI_EXPORT_SYMBOL (AcpiBiosWarning)
> +
> +
>   /*
>    * The remainder of this module contains internal error functions that may
>    * be configured out.
> diff --git a/src/acpica/source/include/acdebug.h b/src/acpica/source/include/acdebug.h
> index 4a9ecf0..45cfb26 100644
> --- a/src/acpica/source/include/acdebug.h
> +++ b/src/acpica/source/include/acdebug.h
> @@ -184,8 +184,7 @@ AcpiDbDisplayTemplate (
>
>   void
>   AcpiDbUnloadAcpiTable (
> -    char                    *TableArg,
> -    char                    *InstanceArg);
> +    char                    *Name);
>
>   void
>   AcpiDbSendNotify (
> @@ -477,7 +476,7 @@ AcpiDbLocalNsLookup (
>       char                    *Name);
>
>   void
> -AcpiDbUInt32ToHexString (
> +AcpiDbUint32ToHexString (
>       UINT32                  Value,
>       char                    *Buffer);
>
> diff --git a/src/acpica/source/include/acdisasm.h b/src/acpica/source/include/acdisasm.h
> index 9e8f2e3..056e8ea 100644
> --- a/src/acpica/source/include/acdisasm.h
> +++ b/src/acpica/source/include/acdisasm.h
> @@ -591,6 +591,14 @@ AcpiDmMethodFlags (
>       ACPI_PARSE_OBJECT       *Op);
>
>   void
> +AcpiDmPredefinedDescription (
> +    ACPI_PARSE_OBJECT       *Op);
> +
> +void
> +AcpiDmFieldPredefinedDescription (
> +    ACPI_PARSE_OBJECT       *Op);
> +
> +void
>   AcpiDmFieldFlags (
>       ACPI_PARSE_OBJECT       *Op);
>
> diff --git a/src/acpica/source/include/acexcep.h b/src/acpica/source/include/acexcep.h
> index 7129954..ccc6f71 100644
> --- a/src/acpica/source/include/acexcep.h
> +++ b/src/acpica/source/include/acexcep.h
> @@ -125,6 +125,7 @@
>   #define AE_CODE_ACPI_TABLES             0x2000
>   #define AE_CODE_AML                     0x3000
>   #define AE_CODE_CONTROL                 0x4000
> +#define AE_CODE_MAX                     0x4000
>   #define AE_CODE_MASK                    0xF000
>
>
> @@ -260,7 +261,7 @@
>
>   /* Exception strings for AcpiFormatException */
>
> -#ifdef DEFINE_ACPI_GLOBALS
> +#ifdef ACPI_DEFINE_EXCEPTION_TABLE
>
>   /*
>    * String versions of the exception codes above
> @@ -379,6 +380,6 @@ char const   *AcpiGbl_ExceptionNames_Ctrl[] =
>       "AE_CTRL_PARSE_PENDING"
>   };
>
> -#endif /* ACPI GLOBALS */
> +#endif /* EXCEPTION_TABLE */
>
>   #endif /* __ACEXCEP_H__ */
> diff --git a/src/acpica/source/include/acglobal.h b/src/acpica/source/include/acglobal.h
> index b27ee3a..b96b658 100644
> --- a/src/acpica/source/include/acglobal.h
> +++ b/src/acpica/source/include/acglobal.h
> @@ -326,8 +326,7 @@ ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_OperandCache;
>
>   /* Global handlers */
>
> -ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER  AcpiGbl_DeviceNotify;
> -ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER  AcpiGbl_SystemNotify;
> +ACPI_EXTERN ACPI_GLOBAL_NOTIFY_HANDLER  AcpiGbl_GlobalNotify[2];
>   ACPI_EXTERN ACPI_EXCEPTION_HANDLER      AcpiGbl_ExceptionHandler;
>   ACPI_EXTERN ACPI_INIT_HANDLER           AcpiGbl_InitHandler;
>   ACPI_EXTERN ACPI_TABLE_HANDLER          AcpiGbl_TableHandler;
> @@ -360,17 +359,8 @@ ACPI_EXTERN UINT8                       AcpiGbl_OsiData;
>   ACPI_EXTERN ACPI_INTERFACE_INFO        *AcpiGbl_SupportedInterfaces;
>   ACPI_EXTERN ACPI_ADDRESS_RANGE         *AcpiGbl_AddressRangeList[ACPI_ADDRESS_RANGE_MAX];
>
> -
>   #ifndef DEFINE_ACPI_GLOBALS
>
> -/* Exception codes */
> -
> -extern char const                       *AcpiGbl_ExceptionNames_Env[];
> -extern char const                       *AcpiGbl_ExceptionNames_Pgm[];
> -extern char const                       *AcpiGbl_ExceptionNames_Tbl[];
> -extern char const                       *AcpiGbl_ExceptionNames_Aml[];
> -extern char const                       *AcpiGbl_ExceptionNames_Ctrl[];
> -
>   /* Other miscellaneous */
>
>   extern BOOLEAN                          AcpiGbl_Shutdown;
> @@ -552,4 +542,14 @@ ACPI_EXTERN UINT32                      AcpiGbl_SizeOfAcpiObjects;
>
>   #endif /* ACPI_DEBUGGER */
>
> +
> +/*****************************************************************************
> + *
> + * Info/help support
> + *
> + ****************************************************************************/
> +
> +extern const AH_PREDEFINED_NAME     AslPredefinedInfo[];
> +
> +
>   #endif /* __ACGLOBAL_H__ */
> diff --git a/src/acpica/source/include/aclocal.h b/src/acpica/source/include/aclocal.h
> index f9065af..00d933e 100644
> --- a/src/acpica/source/include/aclocal.h
> +++ b/src/acpica/source/include/aclocal.h
> @@ -534,6 +534,15 @@ typedef struct acpi_gpe_handler_info
>
>   } ACPI_GPE_HANDLER_INFO;
>
> +/* Notify info for implicit notify, multiple device objects */
> +
> +typedef struct acpi_gpe_notify_info
> +{
> +    ACPI_NAMESPACE_NODE             *DeviceNode;    /* Device to be notified */
> +    struct acpi_gpe_notify_info     *Next;
> +
> +} ACPI_GPE_NOTIFY_INFO;
> +
>   /*
>    * GPE dispatch info. At any time, the GPE can have at most one type
>    * of dispatch - Method, Handler, or Implicit Notify.
> @@ -541,8 +550,8 @@ typedef struct acpi_gpe_handler_info
>   typedef union acpi_gpe_dispatch_info
>   {
>       ACPI_NAMESPACE_NODE             *MethodNode;    /* Method node for this GPE level */
> -    struct acpi_gpe_handler_info    *Handler;       /* Installed GPE handler */
> -    ACPI_NAMESPACE_NODE             *DeviceNode;    /* Parent _PRW device for implicit notify */
> +    ACPI_GPE_HANDLER_INFO           *Handler;       /* Installed GPE handler */
> +    ACPI_GPE_NOTIFY_INFO            *NotifyList;    /* List of _PRW devices for implicit notifies */
>
>   } ACPI_GPE_DISPATCH_INFO;
>
> @@ -552,7 +561,7 @@ typedef union acpi_gpe_dispatch_info
>    */
>   typedef struct acpi_gpe_event_info
>   {
> -    union acpi_gpe_dispatch_info    Dispatch;       /* Either Method or Handler */
> +    union acpi_gpe_dispatch_info    Dispatch;       /* Either Method, Handler, or NotifyList */
>       struct acpi_gpe_register_info   *RegisterInfo;  /* Backpointer to register info */
>       UINT8                           Flags;          /* Misc info about this GPE */
>       UINT8                           GpeNumber;      /* This GPE */
> @@ -788,6 +797,15 @@ ACPI_STATUS (*ACPI_PARSE_UPWARDS) (
>       struct acpi_walk_state          *WalkState);
>
>
> +/* Global handlers for AML Notifies */
> +
> +typedef struct acpi_global_notify_handler
> +{
> +    ACPI_NOTIFY_HANDLER             Handler;
> +    void                            *Context;
> +
> +} ACPI_GLOBAL_NOTIFY_HANDLER;
> +
>   /*
>    * Notify info - used to pass info to the deferred notify
>    * handler/dispatcher.
> @@ -795,8 +813,10 @@ ACPI_STATUS (*ACPI_PARSE_UPWARDS) (
>   typedef struct acpi_notify_info
>   {
>       ACPI_STATE_COMMON
> +    UINT8                           HandlerListId;
>       ACPI_NAMESPACE_NODE             *Node;
> -    union acpi_operand_object       *HandlerObj;
> +    union acpi_operand_object       *HandlerListHead;
> +    ACPI_GLOBAL_NOTIFY_HANDLER      *Global;
>
>   } ACPI_NOTIFY_INFO;
>
> @@ -1021,6 +1041,7 @@ typedef struct acpi_parse_state
>   #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_SPECIAL            0x10
>
>
> @@ -1372,4 +1393,20 @@ typedef struct acpi_debug_mem_block
>   #define ACPI_NUM_MEM_LISTS              2
>
>
> +/*****************************************************************************
> + *
> + * Info/help support
> + *
> + ****************************************************************************/
> +
> +typedef struct ah_predefined_name
> +{
> +    char            *Name;
> +    char            *Description;
> +#ifndef ACPI_ASL_COMPILER
> +    char            *Action;
> +#endif
> +
> +} AH_PREDEFINED_NAME;
> +
>   #endif /* __ACLOCAL_H__ */
> diff --git a/src/acpica/source/include/acmacros.h b/src/acpica/source/include/acmacros.h
> index 5451d84..3cf0ac0 100644
> --- a/src/acpica/source/include/acmacros.h
> +++ b/src/acpica/source/include/acmacros.h
> @@ -346,8 +346,8 @@
>   #define ACPI_INSERT_BITS(Target, Mask, Source)          Target = ((Target & (~(Mask))) | (Source & Mask))
>
>   /*
> - * An ACPI_NAMESPACE_NODE can appear in some contexts
> - * where a pointer to an ACPI_OPERAND_OBJECT can also
> + * An object of type ACPI_NAMESPACE_NODE can appear in some contexts
> + * where a pointer to an object of type ACPI_OPERAND_OBJECT can also
>    * appear. This macro is used to distinguish them.
>    *
>    * The "Descriptor" field is the first field in both structures.
> diff --git a/src/acpica/source/include/acobject.h b/src/acpica/source/include/acobject.h
> index 009232a..9014d4f 100644
> --- a/src/acpica/source/include/acobject.h
> +++ b/src/acpica/source/include/acobject.h
> @@ -166,7 +166,7 @@
>
>   #define AOPOBJ_AML_CONSTANT         0x01    /* Integer is an AML constant */
>   #define AOPOBJ_STATIC_POINTER       0x02    /* Data is part of an ACPI table, don't delete */
> -#define AOPOBJ_DATA_VALID           0x04    /* Object is intialized and data is valid */
> +#define AOPOBJ_DATA_VALID           0x04    /* Object is initialized and data is valid */
>   #define AOPOBJ_OBJECT_INITIALIZED   0x08    /* Region is initialized, _REG was run */
>   #define AOPOBJ_SETUP_COMPLETE       0x10    /* Region setup is complete */
>   #define AOPOBJ_INVALID              0x20    /* Host OS won't allow a Region address */
> @@ -195,8 +195,8 @@ typedef struct acpi_object_integer
>
>
>   /*
> - * Note: The String and Buffer object must be identical through the Pointer
> - * and length elements.  There is code that depends on this.
> + * Note: The String and Buffer object must be identical through the
> + * pointer and length elements. There is code that depends on this.
>    *
>    * Fields common to both Strings and Buffers
>    */
> @@ -318,8 +318,7 @@ typedef struct acpi_object_method
>    * Common fields for objects that support ASL notifications
>    */
>   #define ACPI_COMMON_NOTIFY_INFO \
> -    union acpi_operand_object       *SystemNotify;      /* Handler for system notifies */\
> -    union acpi_operand_object       *DeviceNotify;      /* Handler for driver notifies */\
> +    union acpi_operand_object       *NotifyList[2];     /* Handlers for system/device notifies */\
>       union acpi_operand_object       *Handler;           /* Handler for Address space */
>
>
> @@ -461,8 +460,10 @@ typedef struct acpi_object_notify_handler
>   {
>       ACPI_OBJECT_COMMON_HEADER
>       ACPI_NAMESPACE_NODE             *Node;              /* Parent device */
> -    ACPI_NOTIFY_HANDLER             Handler;
> +    UINT32                          HandlerType;        /* Type: Device/System/Both */
> +    ACPI_NOTIFY_HANDLER             Handler;            /* Handler address */
>       void                            *Context;
> +    union acpi_operand_object       *Next[2];           /* Device and System handler lists */
>
>   } ACPI_OBJECT_NOTIFY_HANDLER;
>
> @@ -476,7 +477,7 @@ typedef struct acpi_object_addr_handler
>       ACPI_NAMESPACE_NODE             *Node;              /* Parent device */
>       void                            *Context;
>       ACPI_ADR_SPACE_SETUP            Setup;
> -    union acpi_operand_object       *RegionList;        /* regions using this handler */
> +    union acpi_operand_object       *RegionList;        /* Regions using this handler */
>       union acpi_operand_object       *Next;
>
>   } ACPI_OBJECT_ADDR_HANDLER;
> diff --git a/src/acpica/source/include/acoutput.h b/src/acpica/source/include/acoutput.h
> index 12f7851..cbdbd8f 100644
> --- a/src/acpica/source/include/acoutput.h
> +++ b/src/acpica/source/include/acoutput.h
> @@ -289,6 +289,8 @@
>   #define ACPI_WARNING(plist)             AcpiWarning plist
>   #define ACPI_EXCEPTION(plist)           AcpiException plist
>   #define ACPI_ERROR(plist)               AcpiError plist
> +#define ACPI_BIOS_WARNING(plist)        AcpiBiosWarning plist
> +#define ACPI_BIOS_ERROR(plist)          AcpiBiosError plist
>   #define ACPI_DEBUG_OBJECT(obj,l,i)      AcpiExDoDebugObject(obj,l,i)
>
>   #else
> @@ -299,6 +301,8 @@
>   #define ACPI_WARNING(plist)
>   #define ACPI_EXCEPTION(plist)
>   #define ACPI_ERROR(plist)
> +#define ACPI_BIOS_WARNING(plist)
> +#define ACPI_BIOS_ERROR(plist)
>   #define ACPI_DEBUG_OBJECT(obj,l,i)
>
>   #endif /* ACPI_NO_ERROR_MESSAGES */
> diff --git a/src/acpica/source/include/acpiosxf.h b/src/acpica/source/include/acpiosxf.h
> index d6d205f..48d8aa4 100644
> --- a/src/acpica/source/include/acpiosxf.h
> +++ b/src/acpica/source/include/acpiosxf.h
> @@ -348,7 +348,7 @@ AcpiOsExecute (
>
>   void
>   AcpiOsWaitEventsComplete (
> -    void                    *Context);
> +    void);
>
>   void
>   AcpiOsSleep (
> diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
> index 2d4a5f8..036d817 100644
> --- a/src/acpica/source/include/acpixf.h
> +++ b/src/acpica/source/include/acpixf.h
> @@ -120,7 +120,7 @@
>
>   /* Current ACPICA subsystem version in YYYYMMDD format */
>
> -#define ACPI_CA_VERSION                 0x20120320
> +#define ACPI_CA_VERSION                 0x20120711
>
>   #include "acconfig.h"
>   #include "actypes.h"
> @@ -273,6 +273,22 @@ AcpiFree (
>
>
>   /*
> + * ACPI table load/unload interfaces
> + */
> +ACPI_STATUS
> +AcpiLoadTable (
> +    ACPI_TABLE_HEADER       *Table);
> +
> +ACPI_STATUS
> +AcpiUnloadParentTable (
> +    ACPI_HANDLE             Object);
> +
> +ACPI_STATUS
> +AcpiLoadTables (
> +    void);
> +
> +
> +/*
>    * ACPI table manipulation interfaces
>    */
>   ACPI_STATUS
> @@ -284,10 +300,6 @@ AcpiFindRootPointer (
>       ACPI_SIZE               *RsdpAddress);
>
>   ACPI_STATUS
> -AcpiLoadTables (
> -    void);
> -
> -ACPI_STATUS
>   AcpiGetTableHeader (
>       ACPI_STRING             Signature,
>       UINT32                  Instance,
> @@ -829,6 +841,20 @@ AcpiInfo (
>       const char              *Format,
>       ...) ACPI_PRINTF_LIKE(3);
>
> +void ACPI_INTERNAL_VAR_XFACE
> +AcpiBiosError (
> +    const char              *ModuleName,
> +    UINT32                  LineNumber,
> +    const char              *Format,
> +    ...) ACPI_PRINTF_LIKE(3);
> +
> +void ACPI_INTERNAL_VAR_XFACE
> +AcpiBiosWarning (
> +    const char              *ModuleName,
> +    UINT32                  LineNumber,
> +    const char              *Format,
> +    ...) ACPI_PRINTF_LIKE(3);
> +
>
>   /*
>    * Debug output
> diff --git a/src/acpica/source/include/acpredef.h b/src/acpica/source/include/acpredef.h
> index 82a1cb3..8da4836 100644
> --- a/src/acpica/source/include/acpredef.h
> +++ b/src/acpica/source/include/acpredef.h
> @@ -584,14 +584,14 @@ static const ACPI_PREDEFINED_INFO     PredefinedNames[] =
>       {{"_TMP", 0, ACPI_RTYPE_INTEGER}},
>       {{"_TPC", 0, ACPI_RTYPE_INTEGER}},
>       {{"_TPT", 1, 0}},
> -    {{"_TRT", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 2Ref/6Int */
> +    {{"_TRT", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 2 Ref/6 Int */
>                       {{{ACPI_PTYPE2, ACPI_RTYPE_REFERENCE, 2, ACPI_RTYPE_INTEGER}, 6, 0}},
>
> -    {{"_TSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5Int with count */
> +    {{"_TSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5 Int with count */
>                       {{{ACPI_PTYPE2_COUNT,ACPI_RTYPE_INTEGER, 5,0}, 0,0}},
>
>       {{"_TSP", 0, ACPI_RTYPE_INTEGER}},
> -    {{"_TSS", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5Int */
> +    {{"_TSS", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5 Int */
>                       {{{ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 5,0}, 0,0}},
>
>       {{"_TST", 0, ACPI_RTYPE_INTEGER}},
> diff --git a/src/acpica/source/include/actbl1.h b/src/acpica/source/include/actbl1.h
> index 6e6edcc..c046b05 100644
> --- a/src/acpica/source/include/actbl1.h
> +++ b/src/acpica/source/include/actbl1.h
> @@ -202,7 +202,7 @@ typedef struct acpi_table_bert
>   {
>       ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
>       UINT32                  RegionLength;       /* Length of the boot error region */
> -    UINT64                  Address;            /* Physical addresss of the error region */
> +    UINT64                  Address;            /* Physical address of the error region */
>
>   } ACPI_TABLE_BERT;
>
> diff --git a/src/acpica/source/include/actypes.h b/src/acpica/source/include/actypes.h
> index ff90c38..5d01e32 100644
> --- a/src/acpica/source/include/actypes.h
> +++ b/src/acpica/source/include/actypes.h
> @@ -780,10 +780,14 @@ typedef UINT32                          ACPI_EVENT_STATUS;
>   #define ACPI_DEVICE_NOTIFY              0x2
>   #define ACPI_ALL_NOTIFY                 (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY)
>   #define ACPI_MAX_NOTIFY_HANDLER_TYPE    0x3
> +#define ACPI_NUM_NOTIFY_TYPES           2
>
>   #define ACPI_MAX_SYS_NOTIFY             0x7F
>   #define ACPI_MAX_DEVICE_SPECIFIC_NOTIFY 0xBF
>
> +#define ACPI_SYSTEM_HANDLER_LIST        0 /* Used as index, must be SYSTEM_NOTIFY -1 */
> +#define ACPI_DEVICE_HANDLER_LIST        1 /* Used as index, must be DEVICE_NOTIFY -1 */
> +
>
>   /* Address Space (Operation Region) Types */
>
> @@ -799,8 +803,9 @@ typedef UINT8                           ACPI_ADR_SPACE_TYPE;
>   #define ACPI_ADR_SPACE_IPMI             (ACPI_ADR_SPACE_TYPE) 7
>   #define ACPI_ADR_SPACE_GPIO             (ACPI_ADR_SPACE_TYPE) 8
>   #define ACPI_ADR_SPACE_GSBUS            (ACPI_ADR_SPACE_TYPE) 9
> +#define ACPI_ADR_SPACE_PLATFORM_COMM    (ACPI_ADR_SPACE_TYPE) 10
>
> -#define ACPI_NUM_PREDEFINED_REGIONS     10
> +#define ACPI_NUM_PREDEFINED_REGIONS     11
>
>   /*
>    * Special Address Spaces
> diff --git a/src/acpica/source/include/acutils.h b/src/acpica/source/include/acutils.h
> index 5c21320..50b5b99 100644
> --- a/src/acpica/source/include/acutils.h
> +++ b/src/acpica/source/include/acutils.h
> @@ -501,7 +501,7 @@ AcpiUtDumpBuffer (
>       UINT8                   *Buffer,
>       UINT32                  Count,
>       UINT32                  Display,
> -    UINT32                  componentId);
> +    UINT32                  ComponentId);
>
>   void
>   AcpiUtDumpBuffer2 (
> @@ -775,6 +775,10 @@ AcpiUtShortDivide (
>   /*
>    * utmisc
>    */
> +void
> +UtConvertBackslashes (
> +    char                    *Pathname);
> +
>   const char *
>   AcpiUtValidateException (
>       ACPI_STATUS             Status);
> diff --git a/src/acpica/source/include/platform/acenv.h b/src/acpica/source/include/platform/acenv.h
> index 342615f..1f3596a 100644
> --- a/src/acpica/source/include/platform/acenv.h
> +++ b/src/acpica/source/include/platform/acenv.h
> @@ -180,9 +180,9 @@
>   #endif
>
>   #ifdef ACPI_HELP_APP
> -#define ACPI_DEBUG_OUTPUT
>   #define ACPI_APPLICATION
>   #define ACPI_SINGLE_THREADED
> +#define ACPI_NO_ERROR_MESSAGES
>   #endif
>
>   /* Linkable ACPICA library */
> @@ -252,6 +252,9 @@
>   #elif defined(_AED_EFI)
>   #include "acefi.h"
>
> +#elif defined(__HAIKU__)
> +#include "achaiku.h"
> +
>   #else
>
>   /* Unknown environment */
> diff --git a/src/acpica/source/os_specific/service_layers/osunixxf.c b/src/acpica/source/os_specific/service_layers/osunixxf.c
> index d5e3af9..840328b 100644
> --- a/src/acpica/source/os_specific/service_layers/osunixxf.c
> +++ b/src/acpica/source/os_specific/service_layers/osunixxf.c
> @@ -425,7 +425,7 @@ AcpiOsGetLine (
>       UINT32                  BufferLength,
>       UINT32                  *BytesRead)
>   {
> -    UINT8                   Temp;
> +    int                     Temp;
>       UINT32                  i;
>
>
> @@ -436,13 +436,17 @@ AcpiOsGetLine (
>               return (AE_BUFFER_OVERFLOW);
>           }
>
> -        scanf ("%1c", &Temp);
> +        if ((Temp = getchar ()) == EOF)
> +        {
> +            return (AE_ERROR);
> +        }
> +
>           if (!Temp || Temp == '\n')
>           {
>               break;
>           }
>
> -        Buffer [i] = Temp;
> +        Buffer [i] = (char) Temp;
>       }
>
>       /* Null terminate the buffer */
> @@ -1313,3 +1317,24 @@ AcpiOsExecute (
>   }
>
>   #endif /* ACPI_SINGLE_THREADED */
> +
> +
> +/******************************************************************************
> + *
> + * FUNCTION:    AcpiOsWaitEventsComplete
> + *
> + * PARAMETERS:  None
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Wait for all asynchronous events to complete. This
> + *              implementation does nothing.
> + *
> + *****************************************************************************/
> +
> +void
> +AcpiOsWaitEventsComplete (
> +    void)
> +{
> +    return;
> +}
> diff --git a/src/acpica/source/tools/acpiexec/aecommon.h b/src/acpica/source/tools/acpiexec/aecommon.h
> index 01615b1..0f5f789 100644
> --- a/src/acpica/source/tools/acpiexec/aecommon.h
> +++ b/src/acpica/source/tools/acpiexec/aecommon.h
> @@ -140,6 +140,7 @@ extern BOOLEAN              AcpiGbl_IgnoreErrors;
>   extern UINT8                AcpiGbl_RegionFillValue;
>   extern UINT8                AcpiGbl_UseHwReducedFadt;
>   extern BOOLEAN              AcpiGbl_DisplayRegionAccess;
> +extern BOOLEAN              AcpiGbl_DoInterfaceTests;
>
>   /* Check for unexpected exceptions */
>
> diff --git a/src/acpica/source/tools/acpiexec/aehandlers.c b/src/acpica/source/tools/acpiexec/aehandlers.c
> index ccf6966..ba7e5a1 100644
> --- a/src/acpica/source/tools/acpiexec/aehandlers.c
> +++ b/src/acpica/source/tools/acpiexec/aehandlers.c
> @@ -121,12 +121,24 @@
>   /* Local prototypes */
>
>   static void
> -AeNotifyHandler (
> +AeNotifyHandler1 (
>       ACPI_HANDLE             Device,
>       UINT32                  Value,
>       void                    *Context);
>
>   static void
> +AeNotifyHandler2 (
> +    ACPI_HANDLE             Device,
> +    UINT32                  Value,
> +    void                    *Context);
> +
> +static void
> +AeCommonNotifyHandler (
> +    ACPI_HANDLE             Device,
> +    UINT32                  Value,
> +    UINT32                  HandlerId);
> +
> +static void
>   AeDeviceNotifyHandler (
>       ACPI_HANDLE             Device,
>       UINT32                  Value,
> @@ -258,24 +270,51 @@ AeCtrlCHandler (
>
>   /******************************************************************************
>    *
> - * FUNCTION:    AeNotifyHandler
> + * FUNCTION:    AeNotifyHandler(s)
>    *
>    * PARAMETERS:  Standard notify handler parameters
>    *
>    * RETURN:      Status
>    *
> - * DESCRIPTION: System notify handler for AcpiExec utility.  Used by the ASL
> + * DESCRIPTION: Notify handlers for AcpiExec utility. Used by the ASL
>    *              test suite(s) to communicate errors and other information to
> - *              this utility via the Notify() operator.
> + *              this utility via the Notify() operator. Tests notify handling
> + *              and multiple notify handler support.
>    *
>    *****************************************************************************/
>
>   static void
> -AeNotifyHandler (
> -    ACPI_HANDLE                 Device,
> -    UINT32                      Value,
> -    void                        *Context)
> +AeNotifyHandler1 (
> +    ACPI_HANDLE             Device,
> +    UINT32                  Value,
> +    void                    *Context)
> +{
> +    AeCommonNotifyHandler (Device, Value, 1);
> +}
> +
> +static void
> +AeNotifyHandler2 (
> +    ACPI_HANDLE             Device,
> +    UINT32                  Value,
> +    void                    *Context)
>   {
> +    AeCommonNotifyHandler (Device, Value, 2);
> +}
> +
> +static void
> +AeCommonNotifyHandler (
> +    ACPI_HANDLE             Device,
> +    UINT32                  Value,
> +    UINT32                  HandlerId)
> +{
> +    char                    *Type;
> +
> +
> +    Type = "Device";
> +    if (Value <= ACPI_MAX_SYS_NOTIFY)
> +    {
> +        Type = "System";
> +    }
>
>       switch (Value)
>       {
> @@ -309,12 +348,13 @@ AeNotifyHandler (
>   #endif
>
>       default:
> -        printf ("[AcpiExec] Received a System Notify on [%4.4s] %p Value 0x%2.2X (%s)\n",
> -            AcpiUtGetNodeName (Device), Device, Value,
> +        printf ("[AcpiExec] Handler %u: Received a %s Notify on [%4.4s] %p Value 0x%2.2X (%s)\n",
> +            HandlerId, Type, AcpiUtGetNodeName (Device), Device, Value,
>               AcpiUtGetNotifyName (Value));
>           if (AcpiGbl_DebugFile)
>           {
> -            AcpiOsPrintf ("[AcpiExec] Received a system notify, Value 0x%2.2X\n", Value);
> +            AcpiOsPrintf ("[AcpiExec] Handler %u: Received a %s notify, Value 0x%2.2X\n",
> +                HandlerId, Type, Value);
>           }
>
>           (void) AcpiEvaluateObject (Device, "_NOT", NULL, NULL);
> @@ -325,6 +365,39 @@ AeNotifyHandler (
>
>   /******************************************************************************
>    *
> + * FUNCTION:    AeSystemNotifyHandler
> + *
> + * PARAMETERS:  Standard notify handler parameters
> + *
> + * RETURN:      Status
> + *
> + * DESCRIPTION: System notify handler for AcpiExec utility.  Used by the ASL
> + *              test suite(s) to communicate errors and other information to
> + *              this utility via the Notify() operator.
> + *
> + *****************************************************************************/
> +
> +static void
> +AeSystemNotifyHandler (
> +    ACPI_HANDLE                 Device,
> +    UINT32                      Value,
> +    void                        *Context)
> +{
> +
> +    printf ("[AcpiExec] Global:    Received a System Notify on [%4.4s] %p Value 0x%2.2X (%s)\n",
> +        AcpiUtGetNodeName (Device), Device, Value,
> +        AcpiUtGetNotifyName (Value));
> +    if (AcpiGbl_DebugFile)
> +    {
> +        AcpiOsPrintf ("[AcpiExec] Global:    Received a System Notify, Value 0x%2.2X\n", Value);
> +    }
> +
> +    (void) AcpiEvaluateObject (Device, "_NOT", NULL, NULL);
> +}
> +
> +
> +/******************************************************************************
> + *
>    * FUNCTION:    AeDeviceNotifyHandler
>    *
>    * PARAMETERS:  Standard notify handler parameters
> @@ -344,12 +417,12 @@ AeDeviceNotifyHandler (
>       void                        *Context)
>   {
>
> -    printf ("[AcpiExec] Received a Device Notify on [%4.4s] %p Value 0x%2.2X (%s)\n",
> +    printf ("[AcpiExec] Global:    Received a Device Notify on [%4.4s] %p Value 0x%2.2X (%s)\n",
>           AcpiUtGetNodeName (Device), Device, Value,
>           AcpiUtGetNotifyName (Value));
>       if (AcpiGbl_DebugFile)
>       {
> -        AcpiOsPrintf ("[AcpiExec] Received a device notify, Value 0x%2.2X\n", Value);
> +        AcpiOsPrintf ("[AcpiExec] Global:    Received a Device Notify, Value 0x%2.2X\n", Value);
>       }
>
>       (void) AcpiEvaluateObject (Device, "_NOT", NULL, NULL);
> @@ -759,18 +832,18 @@ AeInstallEarlyHandlers (
>               AcpiFormatException (Status));
>       }
>
> -    /* Install global notify handler */
> +    /* Install global notify handlers */
>
>       Status = AcpiInstallNotifyHandler (ACPI_ROOT_OBJECT, ACPI_SYSTEM_NOTIFY,
> -                                        AeNotifyHandler, NULL);
> +        AeSystemNotifyHandler, NULL);
>       if (ACPI_FAILURE (Status))
>       {
> -        printf ("Could not install a global notify handler, %s\n",
> +        printf ("Could not install a global system notify handler, %s\n",
>               AcpiFormatException (Status));
>       }
>
>       Status = AcpiInstallNotifyHandler (ACPI_ROOT_OBJECT, ACPI_DEVICE_NOTIFY,
> -                                        AeDeviceNotifyHandler, NULL);
> +        AeDeviceNotifyHandler, NULL);
>       if (ACPI_FAILURE (Status))
>       {
>           printf ("Could not install a global notify handler, %s\n",
> @@ -781,7 +854,7 @@ AeInstallEarlyHandlers (
>       if (ACPI_SUCCESS (Status))
>       {
>           Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
> -                                            AeNotifyHandler, NULL);
> +            AeNotifyHandler1, NULL);
>           if (ACPI_FAILURE (Status))
>           {
>               printf ("Could not install a notify handler, %s\n",
> @@ -789,7 +862,7 @@ AeInstallEarlyHandlers (
>           }
>
>           Status = AcpiRemoveNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
> -                                            AeNotifyHandler);
> +            AeNotifyHandler1);
>           if (ACPI_FAILURE (Status))
>           {
>               printf ("Could not remove a notify handler, %s\n",
> @@ -797,20 +870,35 @@ AeInstallEarlyHandlers (
>           }
>
>           Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> -                                            AeNotifyHandler, NULL);
> +            AeNotifyHandler1, NULL);
>           AE_CHECK_OK (AcpiInstallNotifyHandler, Status);
>
>           Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> -                                            AeNotifyHandler);
> +            AeNotifyHandler1);
>           AE_CHECK_OK (AcpiRemoveNotifyHandler, Status);
>
> +#if 0
>           Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> -                                            AeNotifyHandler, NULL);
> +            AeNotifyHandler1, NULL);
>           if (ACPI_FAILURE (Status))
>           {
>               printf ("Could not install a notify handler, %s\n",
>                   AcpiFormatException (Status));
>           }
> +#endif
> +
> +        /* Install two handlers for _SB_ */
> +
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
> +            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
> +            AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +
> +        /* Attempt duplicate handler installation, should fail */
> +
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
> +            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x77777777));
>
>           Status = AcpiAttachData (Handle, AeAttachedDataHandler, Handle);
>           AE_CHECK_OK (AcpiAttachData, Status);
> @@ -827,6 +915,37 @@ AeInstallEarlyHandlers (
>       }
>
>
> +    Status = AcpiGetHandle (NULL, "\\_TZ.TZ1", &Handle);
> +    if (ACPI_SUCCESS (Status))
> +    {
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> +            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> +            AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +
> +        Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> +            AeNotifyHandler1);
> +        Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> +            AeNotifyHandler2);
> +
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> +            AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> +            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +    }
> +
> +    Status = AcpiGetHandle (NULL, "\\_PR.CPU0", &Handle);
> +    if (ACPI_SUCCESS (Status))
> +    {
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> +            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
> +            AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +    }
> +
>       /*
>        * Install handlers that will override the default handlers for some of
>        * the space IDs.
>
Acked-by: Ivan Hu<ivan.hu@canonical.com>
Keng-Yu Lin July 23, 2012, 5:39 a.m. UTC | #2
On Wed, Jul 18, 2012 at 7:52 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Update to ACPICA version 20120711, commit
> b9058029d3bd6216f594a3b5e70b2f6cba1052ad to get the latest
> goodness.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpica/Makefile.am                             |    2 +
>  src/acpica/source/common/adfile.c                  |   19 +-
>  src/acpica/source/common/adwalk.c                  |   30 +-
>  src/acpica/source/common/dmextern.c                |   36 +-
>  src/acpica/source/common/dmrestag.c                |   21 +-
>  src/acpica/source/compiler/Makefile.am             |    1 +
>  src/acpica/source/compiler/aslcompile.c            |  121 ++++---
>  src/acpica/source/compiler/aslcompiler.h           |    9 +-
>  src/acpica/source/compiler/aslcompiler.l           |    1 +
>  src/acpica/source/compiler/aslcompiler.y           |    4 +-
>  src/acpica/source/compiler/aslerror.c              |   23 +-
>  src/acpica/source/compiler/aslfiles.c              |  126 ++++++-
>  src/acpica/source/compiler/asllookup.c             |    2 +-
>  src/acpica/source/compiler/aslmain.c               |   66 ++--
>  src/acpica/source/compiler/aslmap.c                |    1 +
>  src/acpica/source/compiler/aslmessages.h           |   11 +-
>  src/acpica/source/compiler/aslstartup.c            |    2 +-
>  src/acpica/source/compiler/aslsupport.l            |   52 ++-
>  src/acpica/source/compiler/aslutils.c              |   90 ++---
>  src/acpica/source/compiler/dtio.c                  |   45 ++-
>  src/acpica/source/compiler/dttemplate.c            |    2 +-
>  src/acpica/source/compiler/prscan.c                |    2 +-
>  src/acpica/source/compiler/prutils.c               |   15 +-
>  src/acpica/source/components/debugger/dbcmds.c     |  120 ++++---
>  src/acpica/source/components/debugger/dbdisply.c   |   15 +-
>  src/acpica/source/components/debugger/dbexec.c     |    6 +-
>  src/acpica/source/components/debugger/dbfileio.c   |   13 +
>  src/acpica/source/components/debugger/dbinput.c    |    4 +-
>  src/acpica/source/components/debugger/dbstats.c    |   28 +-
>  src/acpica/source/components/debugger/dbutils.c    |    4 +-
>  .../source/components/disassembler/dmopcode.c      |  213 ++++++++++++
>  src/acpica/source/components/disassembler/dmwalk.c |   55 +++-
>  src/acpica/source/components/dispatcher/dsfield.c  |   88 ++++-
>  src/acpica/source/components/dispatcher/dsopcode.c |   14 +-
>  src/acpica/source/components/dispatcher/dswload.c  |   14 +
>  src/acpica/source/components/dispatcher/dswload2.c |   14 +
>  src/acpica/source/components/events/evgpe.c        |   15 +-
>  src/acpica/source/components/events/evgpeutil.c    |   19 ++
>  src/acpica/source/components/events/evmisc.c       |  183 ++++-------
>  src/acpica/source/components/events/evxface.c      |  344 ++++++++++----------
>  src/acpica/source/components/events/evxfgpe.c      |   86 ++++-
>  src/acpica/source/components/executer/exconfig.c   |    2 +-
>  src/acpica/source/components/executer/exdump.c     |   24 +-
>  src/acpica/source/components/executer/exprep.c     |    4 +-
>  src/acpica/source/components/executer/exresolv.c   |    2 +-
>  src/acpica/source/components/executer/exstore.c    |    6 +-
>  src/acpica/source/components/executer/exutils.c    |    2 +-
>  src/acpica/source/components/hardware/hwsleep.c    |   25 --
>  src/acpica/source/components/hardware/hwxfsleep.c  |    8 +
>  src/acpica/source/components/namespace/nspredef.c  |    2 +-
>  src/acpica/source/components/parser/psxface.c      |    4 +-
>  src/acpica/source/components/resources/rscreate.c  |    6 +-
>  src/acpica/source/components/resources/rsutils.c   |    2 +-
>  src/acpica/source/components/tables/tbfadt.c       |   64 ++--
>  src/acpica/source/components/tables/tbinstal.c     |    5 +-
>  src/acpica/source/components/tables/tbutils.c      |   17 +-
>  src/acpica/source/components/tables/tbxface.c      |  159 +--------
>  src/acpica/source/components/tables/tbxfroot.c     |    2 +-
>  src/acpica/source/components/utilities/utdecode.c  |   62 +---
>  src/acpica/source/components/utilities/utdelete.c  |   21 +-
>  src/acpica/source/components/utilities/utglobal.c  |    9 +-
>  src/acpica/source/components/utilities/utmisc.c    |   81 +----
>  src/acpica/source/components/utilities/utobject.c  |    6 +-
>  src/acpica/source/components/utilities/utresrc.c   |    4 +-
>  src/acpica/source/components/utilities/uttrack.c   |    6 +-
>  src/acpica/source/components/utilities/utxferror.c |   81 +++++
>  src/acpica/source/include/acdebug.h                |    5 +-
>  src/acpica/source/include/acdisasm.h               |    8 +
>  src/acpica/source/include/acexcep.h                |    5 +-
>  src/acpica/source/include/acglobal.h               |   22 +-
>  src/acpica/source/include/aclocal.h                |   45 ++-
>  src/acpica/source/include/acmacros.h               |    4 +-
>  src/acpica/source/include/acobject.h               |   15 +-
>  src/acpica/source/include/acoutput.h               |    4 +
>  src/acpica/source/include/acpiosxf.h               |    2 +-
>  src/acpica/source/include/acpixf.h                 |   36 +-
>  src/acpica/source/include/acpredef.h               |    6 +-
>  src/acpica/source/include/actbl1.h                 |    2 +-
>  src/acpica/source/include/actypes.h                |    7 +-
>  src/acpica/source/include/acutils.h                |    6 +-
>  src/acpica/source/include/platform/acenv.h         |    5 +-
>  .../source/os_specific/service_layers/osunixxf.c   |   31 +-
>  src/acpica/source/tools/acpiexec/aecommon.h        |    1 +
>  src/acpica/source/tools/acpiexec/aehandlers.c      |  163 ++++++++--
>  84 files changed, 1846 insertions(+), 1041 deletions(-)
>
> diff --git a/src/acpica/Makefile.am b/src/acpica/Makefile.am
> index 3187432..e2213d5 100644
> --- a/src/acpica/Makefile.am
> +++ b/src/acpica/Makefile.am
> @@ -175,6 +175,7 @@ libfwtsacpica_la_SOURCES = \
>         $(ACPICA_COMP)/tables/tbutils.c \
>         $(ACPICA_COMP)/tables/tbxface.c \
>         $(ACPICA_COMP)/tables/tbxfroot.c \
> +       $(ACPICA_COMP)/tables/tbxfload.c \
>         $(ACPICA_COMP)/utilities/utaddress.c \
>         $(ACPICA_COMP)/utilities/utalloc.c \
>         $(ACPICA_COMP)/utilities/utcache.c \
> @@ -197,6 +198,7 @@ libfwtsacpica_la_SOURCES = \
>         $(ACPICA_COMP)/utilities/utxferror.c \
>         $(ACPICA_COMP)/utilities/utxface.c \
>         $(ACPICA_COMP)/utilities/utdecode.c \
> +       $(ACPICA_COMP)/utilities/utexcep.c \
>         $(ACPICA_SRC)/tools/acpiexec/aehandlers.c
>
>  libfwtsacpica_la_LIBADD = \
> diff --git a/src/acpica/source/common/adfile.c b/src/acpica/source/common/adfile.c
> index f4e33e2..36c3176 100644
> --- a/src/acpica/source/common/adfile.c
> +++ b/src/acpica/source/common/adfile.c
> @@ -370,20 +370,24 @@ FlSplitInputPathname (
>          return (AE_NO_MEMORY);
>      }
>
> -    Substring = strrchr (DirectoryPath, '\\');
> +    /* Convert backslashes to slashes in the entire path */
> +
> +    UtConvertBackslashes (DirectoryPath);
> +
> +    /* Backup to last slash or colon */
> +
> +    Substring = strrchr (DirectoryPath, '/');
>      if (!Substring)
>      {
> -        Substring = strrchr (DirectoryPath, '/');
> -        if (!Substring)
> -        {
> -            Substring = strrchr (DirectoryPath, ':');
> -        }
> +        Substring = strrchr (DirectoryPath, ':');
>      }
>
> +    /* Extract the simple filename */
> +
>      if (!Substring)
>      {
> +        Filename = FlStrdup (DirectoryPath);
>          DirectoryPath[0] = 0;
> -        Filename = FlStrdup (InputPath);
>      }
>      else
>      {
> @@ -398,7 +402,6 @@ FlSplitInputPathname (
>
>      *OutDirectoryPath = DirectoryPath;
>      *OutFilename = Filename;
> -
>      return (AE_OK);
>  }
>
> diff --git a/src/acpica/source/common/adwalk.c b/src/acpica/source/common/adwalk.c
> index eeb61d8..00d9bb6 100644
> --- a/src/acpica/source/common/adwalk.c
> +++ b/src/acpica/source/common/adwalk.c
> @@ -593,6 +593,7 @@ AcpiDmFindOrphanDescending (
>
>          if ((OpInfo->Class != AML_CLASS_EXECUTE) &&
>              (OpInfo->Class != AML_CLASS_CREATE) &&
> +            (OpInfo->ObjectType != ACPI_TYPE_LOCAL_ALIAS) &&
>              (ParentOp->Common.AmlOpcode != AML_INT_METHODCALL_OP) &&
>              !Op->Common.Node)
>          {
> @@ -815,13 +816,23 @@ AcpiDmXrefDescendingOp (
>
>      if (OpInfo->Flags & AML_NAMED)
>      {
> -        if ((Op->Common.AmlOpcode == AML_ALIAS_OP) ||
> -            (Op->Common.AmlOpcode == AML_SCOPE_OP))
> +        /*
> +         * Only these two operators (Alias, Scope) refer to an existing
> +         * name, it is the first argument
> +         */
> +        if (Op->Common.AmlOpcode == AML_ALIAS_OP)
> +        {
> +            ObjectType = ACPI_TYPE_ANY;
> +
> +            NextOp = Op->Common.Value.Arg;
> +            NextOp = NextOp->Common.Value.Arg;
> +            if (NextOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
> +            {
> +                Path = NextOp->Common.Value.String;
> +            }
> +        }
> +        else if (Op->Common.AmlOpcode == AML_SCOPE_OP)
>          {
> -            /*
> -             * Only these two operators refer to an existing name,
> -             * first argument
> -             */
>              Path = (char *) Op->Named.Path;
>          }
>      }
> @@ -829,6 +840,8 @@ AcpiDmXrefDescendingOp (
>      {
>          /* Referenced Buffer Name is the first child */
>
> +        ObjectType = ACPI_TYPE_BUFFER; /* Change from TYPE_BUFFER_FIELD */
> +
>          NextOp = Op->Common.Value.Arg;
>          if (NextOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
>          {
> @@ -855,6 +868,11 @@ AcpiDmXrefDescendingOp (
>      Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY,
>                  ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
>                  WalkState, &Node);
> +    if (ACPI_SUCCESS (Status) && (Node->Flags & ANOBJ_IS_EXTERNAL))
> +    {
> +        Status = AE_NOT_FOUND;
> +    }
> +
>      if (ACPI_FAILURE (Status))
>      {
>          if (Status == AE_NOT_FOUND)
> diff --git a/src/acpica/source/common/dmextern.c b/src/acpica/source/common/dmextern.c
> index 8b8402e..622db8a 100644
> --- a/src/acpica/source/common/dmextern.c
> +++ b/src/acpica/source/common/dmextern.c
> @@ -293,8 +293,10 @@ AcpiDmNormalizeParentPrefix (
>       */
>      ACPI_STRCAT (Fullpath, ParentPath);
>
> -    /* Add dot separator (don't need dot if parent fullpath is a single "\") */
> -
> +    /*
> +     * Add dot separator
> +     * (don't need dot if parent fullpath is a single backslash)
> +     */
>      if (ParentPath[1])
>      {
>          ACPI_STRCAT (Fullpath, ".");
> @@ -526,12 +528,12 @@ AcpiDmAddToExternalList (
>
>      NewExternal->InternalPath = Path;
>
> -    /* Link the new descriptor into the global list, ordered by string length */
> +    /* Link the new descriptor into the global list, alphabetically ordered */
>
>      NextExternal = AcpiGbl_ExternalList;
>      while (NextExternal)
>      {
> -        if (NewExternal->Length <= NextExternal->Length)
> +        if (AcpiUtStricmp (NewExternal->Path, NextExternal->Path) < 0)
>          {
>              if (PrevExternal)
>              {
> @@ -580,7 +582,7 @@ AcpiDmAddExternalsToNamespace (
>  {
>      ACPI_STATUS             Status;
>      ACPI_NAMESPACE_NODE     *Node;
> -    ACPI_OPERAND_OBJECT     *MethodDesc;
> +    ACPI_OPERAND_OBJECT     *ObjDesc;
>      ACPI_EXTERNAL_LIST      *External = AcpiGbl_ExternalList;
>
>
> @@ -599,13 +601,29 @@ AcpiDmAddExternalsToNamespace (
>                  "while adding external to namespace [%s]",
>                  External->Path));
>          }
> -        else if (External->Type == ACPI_TYPE_METHOD)
> +
> +        else switch (External->Type)
>          {
> +        case ACPI_TYPE_METHOD:
> +
>              /* For methods, we need to save the argument count */
>
> -            MethodDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD);
> -            MethodDesc->Method.ParamCount = (UINT8) External->Value;
> -            Node->Object = MethodDesc;
> +            ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD);
> +            ObjDesc->Method.ParamCount = (UINT8) External->Value;
> +            Node->Object = ObjDesc;
> +            break;
> +
> +        case ACPI_TYPE_REGION:
> +
> +            /* Regions require a region sub-object */
> +
> +            ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION);
> +            ObjDesc->Region.Node = Node;
> +            Node->Object = ObjDesc;
> +            break;
> +
> +        default:
> +            break;
>          }
>
>          External = External->Next;
> diff --git a/src/acpica/source/common/dmrestag.c b/src/acpica/source/common/dmrestag.c
> index 1f0c5fb..9afaad3 100644
> --- a/src/acpica/source/common/dmrestag.c
> +++ b/src/acpica/source/common/dmrestag.c
> @@ -145,6 +145,7 @@ AcpiDmGetResourceTag (
>
>  static char *
>  AcpiGetTagPathname (
> +    ACPI_PARSE_OBJECT       *Op,
>      ACPI_NAMESPACE_NODE     *BufferNode,
>      ACPI_NAMESPACE_NODE     *ResourceNode,
>      UINT32                  BitIndex);
> @@ -515,7 +516,6 @@ AcpiDmCheckResourceReference (
>      ACPI_NAMESPACE_NODE     *BufferNode;
>      ACPI_NAMESPACE_NODE     *ResourceNode;
>      const ACPI_OPCODE_INFO  *OpInfo;
> -    char                    *Pathname;
>      UINT32                  BitIndex;
>
>
> @@ -591,14 +591,7 @@ AcpiDmCheckResourceReference (
>
>      /* Translate the Index to a resource tag pathname */
>
> -    Pathname = AcpiGetTagPathname (BufferNode, ResourceNode, BitIndex);
> -    if (Pathname)
> -    {
> -        /* Complete the conversion of the Index to a symbol */
> -
> -        IndexOp->Common.AmlOpcode = AML_INT_NAMEPATH_OP;
> -        IndexOp->Common.Value.String = Pathname;
> -    }
> +    AcpiGetTagPathname (IndexOp, BufferNode, ResourceNode, BitIndex);
>  }
>
>
> @@ -669,6 +662,7 @@ AcpiDmGetResourceNode (
>
>  static char *
>  AcpiGetTagPathname (
> +    ACPI_PARSE_OBJECT       *IndexOp,
>      ACPI_NAMESPACE_NODE     *BufferNode,
>      ACPI_NAMESPACE_NODE     *ResourceNode,
>      UINT32                  BitIndex)
> @@ -761,6 +755,15 @@ AcpiGetTagPathname (
>
>      AcpiNsInternalizeName (Pathname, &InternalPath);
>      ACPI_FREE (Pathname);
> +
> +    /* Update the Op with the symbol */
> +
> +    AcpiPsInitOp (IndexOp, AML_INT_NAMEPATH_OP);
> +    IndexOp->Common.Value.String = InternalPath;
> +
> +    /* We will need the tag later. Cheat by putting it in the Node field */
> +
> +    IndexOp->Common.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Tag);
>      return (InternalPath);
>  }
>
> diff --git a/src/acpica/source/compiler/Makefile.am b/src/acpica/source/compiler/Makefile.am
> index cee1f4f..b7a72c9 100644
> --- a/src/acpica/source/compiler/Makefile.am
> +++ b/src/acpica/source/compiler/Makefile.am
> @@ -183,6 +183,7 @@ libfwtsiasl_la_SOURCES = \
>         $(ACPICA_COMMON)/adfile.c \
>         $(ACPICA_COMMON)/adisasm.c \
>         $(ACPICA_COMMON)/adwalk.c \
> +       $(ACPICA_COMMON)/ahpredef.c \
>         $(ACPICA_COMMON)/dmextern.c \
>         $(ACPICA_COMMON)/dmrestag.c \
>         $(ACPICA_COMMON)/dmtable.c \
> diff --git a/src/acpica/source/compiler/aslcompile.c b/src/acpica/source/compiler/aslcompile.c
> index 371a6e3..623bc3d 100644
> --- a/src/acpica/source/compiler/aslcompile.c
> +++ b/src/acpica/source/compiler/aslcompile.c
> @@ -131,14 +131,18 @@ CmFlushSourceCode (
>
>  static void
>  FlConsumeAnsiComment (
> -    ASL_FILE_INFO           *FileInfo,
> +    FILE                    *Handle,
>      ASL_FILE_STATUS         *Status);
>
>  static void
>  FlConsumeNewComment (
> -    ASL_FILE_INFO           *FileInfo,
> +    FILE                    *Handle,
>      ASL_FILE_STATUS         *Status);
>
> +static void
> +CmDumpAllEvents (
> +    void);
> +
>
>  /*******************************************************************************
>   *
> @@ -325,7 +329,8 @@ CmFlushSourceCode (
>   *
>   * FUNCTION:    FlConsume*
>   *
> - * PARAMETERS:  FileInfo        - Points to an open input file
> + * PARAMETERS:  Handle              - Open input file
> + *              Status              - File current status struct
>   *
>   * RETURN:      Number of lines consumed
>   *
> @@ -335,14 +340,14 @@ CmFlushSourceCode (
>
>  static void
>  FlConsumeAnsiComment (
> -    ASL_FILE_INFO           *FileInfo,
> +    FILE                    *Handle,
>      ASL_FILE_STATUS         *Status)
>  {
>      UINT8                   Byte;
>      BOOLEAN                 ClosingComment = FALSE;
>
>
> -    while (fread (&Byte, 1, 1, FileInfo->Handle))
> +    while (fread (&Byte, 1, 1, Handle))
>      {
>          /* Scan until comment close is found */
>
> @@ -379,13 +384,13 @@ FlConsumeAnsiComment (
>
>  static void
>  FlConsumeNewComment (
> -    ASL_FILE_INFO           *FileInfo,
> +    FILE                    *Handle,
>      ASL_FILE_STATUS         *Status)
>  {
>      UINT8                   Byte;
>
>
> -    while (fread (&Byte, 1, 1, FileInfo->Handle))
> +    while (fread (&Byte, 1, 1, Handle))
>      {
>          Status->Offset++;
>
> @@ -404,7 +409,9 @@ FlConsumeNewComment (
>   *
>   * FUNCTION:    FlCheckForAscii
>   *
> - * PARAMETERS:  FileInfo        - Points to an open input file
> + * PARAMETERS:  Handle              - Open input file
> + *              Filename            - Input filename
> + *              DisplayErrors       - TRUE if error messages desired
>   *
>   * RETURN:      Status
>   *
> @@ -419,7 +426,9 @@ FlConsumeNewComment (
>
>  ACPI_STATUS
>  FlCheckForAscii (
> -    ASL_FILE_INFO           *FileInfo)
> +    FILE                    *Handle,
> +    char                    *Filename,
> +    BOOLEAN                 DisplayErrors)
>  {
>      UINT8                   Byte;
>      ACPI_SIZE               BadBytes = 0;
> @@ -432,7 +441,7 @@ FlCheckForAscii (
>
>      /* Read the entire file */
>
> -    while (fread (&Byte, 1, 1, FileInfo->Handle))
> +    while (fread (&Byte, 1, 1, Handle))
>      {
>          /* Ignore comment fields (allow non-ascii within) */
>
> @@ -442,12 +451,12 @@ FlCheckForAscii (
>
>              if (Byte == '*')
>              {
> -                FlConsumeAnsiComment (FileInfo, &Status);
> +                FlConsumeAnsiComment (Handle, &Status);
>              }
>
>              if (Byte == '/')
>              {
> -                FlConsumeNewComment (FileInfo, &Status);
> +                FlConsumeNewComment (Handle, &Status);
>              }
>
>              /* Reset */
> @@ -463,7 +472,7 @@ FlCheckForAscii (
>
>          if (!ACPI_IS_ASCII (Byte))
>          {
> -            if (BadBytes < 10)
> +            if ((BadBytes < 10) && (DisplayErrors))
>              {
>                  AcpiOsPrintf (
>                      "Non-ASCII character [0x%2.2X] found in line %u, file offset 0x%.2X\n",
> @@ -485,20 +494,24 @@ FlCheckForAscii (
>
>      /* Seek back to the beginning of the source file */
>
> -    fseek (FileInfo->Handle, 0, SEEK_SET);
> +    fseek (Handle, 0, SEEK_SET);
>
>      /* Were there any non-ASCII characters in the file? */
>
>      if (BadBytes)
>      {
> -        AcpiOsPrintf (
> -            "%u non-ASCII characters found in input source text, could be a binary file\n",
> -            BadBytes);
> -        AslError (ASL_ERROR, ASL_MSG_NON_ASCII, NULL, FileInfo->Filename);
> +        if (DisplayErrors)
> +        {
> +            AcpiOsPrintf (
> +                "%u non-ASCII characters found in input source text, could be a binary file\n",
> +                BadBytes);
> +            AslError (ASL_ERROR, ASL_MSG_NON_ASCII, NULL, Filename);
> +        }
> +
>          return (AE_BAD_CHARACTER);
>      }
>
> -    /* File is OK */
> +    /* File is OK (100% ASCII) */
>
>      return (AE_OK);
>  }
> @@ -780,45 +793,65 @@ CmDoOutputFiles (
>
>  /*******************************************************************************
>   *
> - * FUNCTION:    CmDumpEvent
> + * FUNCTION:    CmDumpAllEvents
>   *
> - * PARAMETERS:  Event           - A compiler event struct
> + * PARAMETERS:  None
>   *
>   * RETURN:      None.
>   *
> - * DESCRIPTION: Dump a compiler event struct
> + * DESCRIPTION: Dump all compiler events
>   *
>   ******************************************************************************/
>
>  static void
> -CmDumpEvent (
> -    ASL_EVENT_INFO          *Event)
> +CmDumpAllEvents (
> +    void)
>  {
> +    ASL_EVENT_INFO          *Event;
>      UINT32                  Delta;
>      UINT32                  USec;
>      UINT32                  MSec;
> +    UINT32                  i;
>
> -    if (!Event->Valid)
> +
> +    Event = AslGbl_Events;
> +
> +    DbgPrint (ASL_DEBUG_OUTPUT, "\n\nElapsed time for major events\n\n");
> +    if (Gbl_CompileTimesFlag)
>      {
> -        return;
> +        printf ("\nElapsed time for major events\n\n");
>      }
>
> -    /* Delta will be in 100-nanosecond units */
> +    for (i = 0; i < AslGbl_NextEvent; i++)
> +    {
> +        if (Event->Valid)
> +        {
> +            /* Delta will be in 100-nanosecond units */
>
> -    Delta = (UINT32) (Event->EndTime - Event->StartTime);
> +            Delta = (UINT32) (Event->EndTime - Event->StartTime);
>
> -    USec = Delta / 10;
> -    MSec = Delta / 10000;
> +            USec = Delta / 10;
> +            MSec = Delta / 10000;
>
> -    /* Round milliseconds up */
> +            /* Round milliseconds up */
>
> -    if ((USec - (MSec * 1000)) >= 500)
> -    {
> -        MSec++;
> -    }
> +            if ((USec - (MSec * 1000)) >= 500)
> +            {
> +                MSec++;
> +            }
>
> -    DbgPrint (ASL_DEBUG_OUTPUT, "%8u usec %8u msec - %s\n",
> -        USec, MSec, Event->EventName);
> +            DbgPrint (ASL_DEBUG_OUTPUT, "%8u usec %8u msec - %s\n",
> +                USec, MSec, Event->EventName);
> +
> +            if (Gbl_CompileTimesFlag)
> +            {
> +                printf ("%8u usec %8u msec - %s\n",
> +                    USec, MSec, Event->EventName);
> +            }
> +        }
> +
> +        Event++;
> +    }
>  }
>
>
> @@ -849,20 +882,12 @@ CmCleanupAndExit (
>          AePrintErrorLog (ASL_FILE_STDOUT);
>      }
>
> -    DbgPrint (ASL_DEBUG_OUTPUT, "\n\nElapsed time for major events\n\n");
> -    for (i = 0; i < AslGbl_NextEvent; i++)
> -    {
> -        CmDumpEvent (&AslGbl_Events[i]);
> -    }
> +    /* Emit compile times if enabled */
> +
> +    CmDumpAllEvents ();
>
>      if (Gbl_CompileTimesFlag)
>      {
> -        printf ("\nElapsed time for major events\n\n");
> -        for (i = 0; i < AslGbl_NextEvent; i++)
> -        {
> -            CmDumpEvent (&AslGbl_Events[i]);
> -        }
> -
>          printf ("\nMiscellaneous compile statistics\n\n");
>          printf ("%11u : %s\n", TotalParseNodes, "Parse nodes");
>          printf ("%11u : %s\n", Gbl_NsLookupCount, "Namespace searches");
> diff --git a/src/acpica/source/compiler/aslcompiler.h b/src/acpica/source/compiler/aslcompiler.h
> index 29558fc..03303f5 100644
> --- a/src/acpica/source/compiler/aslcompiler.h
> +++ b/src/acpica/source/compiler/aslcompiler.h
> @@ -238,7 +238,9 @@ CmCleanupAndExit (
>
>  ACPI_STATUS
>  FlCheckForAscii (
> -    ASL_FILE_INFO           *FileInfo);
> +    FILE                    *Handle,
> +    char                    *Filename,
> +    BOOLEAN                 DisplayErrors);
>
>
>  /*
> @@ -680,6 +682,11 @@ void
>  FlAddIncludeDirectory (
>      char                    *Dir);
>
> +char *
> +FlMergePathnames (
> +    char                    *PrefixDir,
> +    char                    *FilePathname);
> +
>  void
>  FlOpenIncludeFile (
>      ACPI_PARSE_OBJECT       *Op);
> diff --git a/src/acpica/source/compiler/aslcompiler.l b/src/acpica/source/compiler/aslcompiler.l
> index f911072..98f9e7e 100644
> --- a/src/acpica/source/compiler/aslcompiler.l
> +++ b/src/acpica/source/compiler/aslcompiler.l
> @@ -595,6 +595,7 @@ NamePathTail                [.]{NameSeg}
>  "IPMI"                      { count (0); return (PARSEOP_REGIONSPACE_IPMI); }
>  "GeneralPurposeIo"          { count (0); return (PARSEOP_REGIONSPACE_GPIO); }       /* ACPI 5.0 */
>  "GenericSerialBus"          { count (0); return (PARSEOP_REGIONSPACE_GSBUS); }      /* ACPI 5.0 */
> +"PCC"                       { count (0); return (PARSEOP_REGIONSPACE_PCC); }        /* ACPI 5.0 */
>  "FFixedHW"                  { count (0); return (PARSEOP_REGIONSPACE_FFIXEDHW); }
>
>      /* ResourceTypeKeyword: Resource Usage - Resource Descriptors */
> diff --git a/src/acpica/source/compiler/aslcompiler.y b/src/acpica/source/compiler/aslcompiler.y
> index 9aa8b51..9675b1d 100644
> --- a/src/acpica/source/compiler/aslcompiler.y
> +++ b/src/acpica/source/compiler/aslcompiler.y
> @@ -435,6 +435,7 @@ void *                      AslLocalAllocate (unsigned int Size);
>  %token <i> PARSEOP_REGIONSPACE_IO
>  %token <i> PARSEOP_REGIONSPACE_IPMI
>  %token <i> PARSEOP_REGIONSPACE_MEM
> +%token <i> PARSEOP_REGIONSPACE_PCC
>  %token <i> PARSEOP_REGIONSPACE_PCI
>  %token <i> PARSEOP_REGIONSPACE_PCIBAR
>  %token <i> PARSEOP_REGIONSPACE_SMBUS
> @@ -2271,7 +2272,7 @@ AddressKeyword
>      ;
>
>  AddressSpaceKeyword
> -    : ByteConst                             {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);}
> +    : ByteConst                             {$$ = UtCheckIntegerRange ($1, 0x0A, 0xFF);}
>      | RegionSpaceKeyword                    {}
>      ;
>
> @@ -2431,6 +2432,7 @@ RegionSpaceKeyword
>      | PARSEOP_REGIONSPACE_IPMI              {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_IPMI);}
>      | PARSEOP_REGIONSPACE_GPIO              {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GPIO);}
>      | PARSEOP_REGIONSPACE_GSBUS             {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GSBUS);}
> +    | PARSEOP_REGIONSPACE_PCC               {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCC);}
>      | PARSEOP_REGIONSPACE_FFIXEDHW          {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_FFIXEDHW);}
>      ;
>
> diff --git a/src/acpica/source/compiler/aslerror.c b/src/acpica/source/compiler/aslerror.c
> index c93a1a2..4d7c846 100644
> --- a/src/acpica/source/compiler/aslerror.c
> +++ b/src/acpica/source/compiler/aslerror.c
> @@ -387,12 +387,16 @@ AePrintException (
>          }
>          else
>          {
> +            /*
> +             * Less verbose version of the error message, enabled via the
> +             * -vi switch. The format is compatible with MS Visual Studio.
> +             */
>              fprintf (OutputFile, "%s", Enode->Filename);
>
>              if (Enode->LineNumber)
>              {
> -                fprintf (OutputFile, "(%u) i:%6u : ",
> -                    Enode->LineNumber, Enode->LineNumber);
> +                fprintf (OutputFile, "(%u) : ",
> +                    Enode->LineNumber);
>              }
>          }
>      }
> @@ -407,9 +411,18 @@ AePrintException (
>      {
>          /* Decode the message ID */
>
> -        fprintf (OutputFile, "%s %4.4d - ",
> -                    AslErrorLevel[Enode->Level],
> -                    Enode->MessageId + ((Enode->Level+1) * 1000));
> +        if (Gbl_VerboseErrors)
> +        {
> +            fprintf (OutputFile, "%s %4.4d -",
> +                        AslErrorLevel[Enode->Level],
> +                        Enode->MessageId + ((Enode->Level+1) * 1000));
> +        }
> +        else /* IDE case */
> +        {
> +            fprintf (OutputFile, "%s %4.4d:",
> +                        AslErrorLevelIde[Enode->Level],
> +                        Enode->MessageId + ((Enode->Level+1) * 1000));
> +        }
>
>          MainMessage = AslMessages[Enode->MessageId];
>          ExtraMessage = Enode->Message;
> diff --git a/src/acpica/source/compiler/aslfiles.c b/src/acpica/source/compiler/aslfiles.c
> index ef10668..a2512a6 100644
> --- a/src/acpica/source/compiler/aslfiles.c
> +++ b/src/acpica/source/compiler/aslfiles.c
> @@ -564,6 +564,107 @@ FlAddIncludeDirectory (
>
>  /*******************************************************************************
>   *
> + * FUNCTION:    FlMergePathnames
> + *
> + * PARAMETERS:  PrefixDir       - Prefix directory pathname. Can be NULL or
> + *                                a zero length string.
> + *              FilePathname    - The include filename from the source ASL.
> + *
> + * RETURN:      Merged pathname string
> + *
> + * DESCRIPTION: Merge two pathnames that (probably) have common elements, to
> + *              arrive at a minimal length string. Merge can occur if the
> + *              FilePathname is relative to the PrefixDir.
> + *
> + ******************************************************************************/
> +
> +char *
> +FlMergePathnames (
> +    char                    *PrefixDir,
> +    char                    *FilePathname)
> +{
> +    char                    *CommonPath;
> +    char                    *Pathname;
> +    char                    *LastElement;
> +
> +
> +    DbgPrint (ASL_PARSE_OUTPUT, "Include: Prefix path - \"%s\"\n"
> +        "Include: FilePathname - \"%s\"\n",
> +         PrefixDir, FilePathname);
> +
> +    /*
> +     * If there is no prefix directory or if the file pathname is absolute,
> +     * just return the original file pathname
> +     */
> +    if (!PrefixDir || (!*PrefixDir) ||
> +        (*FilePathname == '/') ||
> +         (FilePathname[1] == ':'))
> +    {
> +        Pathname = ACPI_ALLOCATE (strlen (FilePathname) + 1);
> +        strcpy (Pathname, FilePathname);
> +        goto ConvertBackslashes;
> +    }
> +
> +    /* Need a local copy of the prefix directory path */
> +
> +    CommonPath = ACPI_ALLOCATE (strlen (PrefixDir) + 1);
> +    strcpy (CommonPath, PrefixDir);
> +
> +    /*
> +     * Walk forward through the file path, and simultaneously backward
> +     * through the prefix directory path until there are no more
> +     * relative references at the start of the file path.
> +     */
> +    while (*FilePathname && (!strncmp (FilePathname, "../", 3)))
> +    {
> +        /* Remove last element of the prefix directory path */
> +
> +        LastElement = strrchr (CommonPath, '/');
> +        if (!LastElement)
> +        {
> +            goto ConcatenatePaths;
> +        }
> +
> +        *LastElement = 0;   /* Terminate CommonPath string */
> +        FilePathname += 3;  /* Point to next path element */
> +    }
> +
> +    /*
> +     * Remove the last element of the prefix directory path (it is the same as
> +     * the first element of the file pathname), and build the final merged
> +     * pathname.
> +     */
> +    LastElement = strrchr (CommonPath, '/');
> +    if (LastElement)
> +    {
> +        *LastElement = 0;
> +    }
> +
> +    /* Build the final merged pathname */
> +
> +ConcatenatePaths:
> +    Pathname = ACPI_ALLOCATE_ZEROED (strlen (CommonPath) + strlen (FilePathname) + 2);
> +    if (LastElement && *CommonPath)
> +    {
> +        strcpy (Pathname, CommonPath);
> +        strcat (Pathname, "/");
> +    }
> +    strcat (Pathname, FilePathname);
> +    ACPI_FREE (CommonPath);
> +
> +    /* Convert all backslashes to normal slashes */
> +
> +ConvertBackslashes:
> +    UtConvertBackslashes (Pathname);
> +
> +    DbgPrint (ASL_PARSE_OUTPUT, "Include: Merged Pathname - \"%s\"\n",
> +         Pathname);
> +    return (Pathname);
> +}
> +
> +
> +/*******************************************************************************
> + *
>   * FUNCTION:    FlOpenIncludeWithPrefix
>   *
>   * PARAMETERS:  PrefixDir       - Prefix directory pathname. Can be a zero
> @@ -587,12 +688,9 @@ FlOpenIncludeWithPrefix (
>
>      /* Build the full pathname to the file */
>
> -    Pathname = ACPI_ALLOCATE (strlen (PrefixDir) + strlen (Filename) + 1);
> -
> -    strcpy (Pathname, PrefixDir);
> -    strcat (Pathname, Filename);
> +    Pathname = FlMergePathnames (PrefixDir, Filename);
>
> -    DbgPrint (ASL_PARSE_OUTPUT, "\nAttempt to open include file: path %s\n\n",
> +    DbgPrint (ASL_PARSE_OUTPUT, "Include: Opening file - \"%s\"\n\n",
>          Pathname);
>
>      /* Attempt to open the file, push if successful */
> @@ -728,7 +826,7 @@ FlOpenInputFile (
>
>      /* Open the input ASL file, text mode */
>
> -    FlOpenFile (ASL_FILE_INPUT, InputFilename, "r");
> +    FlOpenFile (ASL_FILE_INPUT, InputFilename, "rt");
>      AslCompilerin = Gbl_Files[ASL_FILE_INPUT].Handle;
>
>      return (AE_OK);
> @@ -812,7 +910,7 @@ FlOpenMiscOutputFiles (
>
>          /* Open the hex file, text mode */
>
> -        FlOpenFile (ASL_FILE_HEX_OUTPUT, Filename, "w+");
> +        FlOpenFile (ASL_FILE_HEX_OUTPUT, Filename, "w+t");
>
>          AslCompilerSignon (ASL_FILE_HEX_OUTPUT);
>          AslCompilerFileHeader (ASL_FILE_HEX_OUTPUT);
> @@ -863,7 +961,7 @@ FlOpenMiscOutputFiles (
>
>          /* Open the listing file, text mode */
>
> -        FlOpenFile (ASL_FILE_LISTING_OUTPUT, Filename, "w+");
> +        FlOpenFile (ASL_FILE_LISTING_OUTPUT, Filename, "w+t");
>
>          AslCompilerSignon (ASL_FILE_LISTING_OUTPUT);
>          AslCompilerFileHeader (ASL_FILE_LISTING_OUTPUT);
> @@ -881,7 +979,7 @@ FlOpenMiscOutputFiles (
>              return (AE_ERROR);
>          }
>
> -        FlOpenFile (ASL_FILE_PREPROCESSOR, Filename, "w+b");
> +        FlOpenFile (ASL_FILE_PREPROCESSOR, Filename, "w+t");
>      }
>
>      /* All done for data table compiler */
> @@ -926,7 +1024,7 @@ FlOpenMiscOutputFiles (
>
>          /* Open the assembly code source file, text mode */
>
> -        FlOpenFile (ASL_FILE_ASM_SOURCE_OUTPUT, Filename, "w+");
> +        FlOpenFile (ASL_FILE_ASM_SOURCE_OUTPUT, Filename, "w+t");
>
>          AslCompilerSignon (ASL_FILE_ASM_SOURCE_OUTPUT);
>          AslCompilerFileHeader (ASL_FILE_ASM_SOURCE_OUTPUT);
> @@ -946,7 +1044,7 @@ FlOpenMiscOutputFiles (
>
>          /* Open the C code source file, text mode */
>
> -        FlOpenFile (ASL_FILE_C_SOURCE_OUTPUT, Filename, "w+");
> +        FlOpenFile (ASL_FILE_C_SOURCE_OUTPUT, Filename, "w+t");
>
>          FlPrintFile (ASL_FILE_C_SOURCE_OUTPUT, "/*\n");
>          AslCompilerSignon (ASL_FILE_C_SOURCE_OUTPUT);
> @@ -967,7 +1065,7 @@ FlOpenMiscOutputFiles (
>
>          /* Open the assembly include file, text mode */
>
> -        FlOpenFile (ASL_FILE_ASM_INCLUDE_OUTPUT, Filename, "w+");
> +        FlOpenFile (ASL_FILE_ASM_INCLUDE_OUTPUT, Filename, "w+t");
>
>          AslCompilerSignon (ASL_FILE_ASM_INCLUDE_OUTPUT);
>          AslCompilerFileHeader (ASL_FILE_ASM_INCLUDE_OUTPUT);
> @@ -987,7 +1085,7 @@ FlOpenMiscOutputFiles (
>
>          /* Open the C include file, text mode */
>
> -        FlOpenFile (ASL_FILE_C_INCLUDE_OUTPUT, Filename, "w+");
> +        FlOpenFile (ASL_FILE_C_INCLUDE_OUTPUT, Filename, "w+t");
>
>          FlPrintFile (ASL_FILE_C_INCLUDE_OUTPUT, "/*\n");
>          AslCompilerSignon (ASL_FILE_C_INCLUDE_OUTPUT);
> @@ -1008,7 +1106,7 @@ FlOpenMiscOutputFiles (
>
>          /* Open the namespace file, text mode */
>
> -        FlOpenFile (ASL_FILE_NAMESPACE_OUTPUT, Filename, "w+");
> +        FlOpenFile (ASL_FILE_NAMESPACE_OUTPUT, Filename, "w+t");
>
>          AslCompilerSignon (ASL_FILE_NAMESPACE_OUTPUT);
>          AslCompilerFileHeader (ASL_FILE_NAMESPACE_OUTPUT);
> diff --git a/src/acpica/source/compiler/asllookup.c b/src/acpica/source/compiler/asllookup.c
> index 0d92c91..8f8dc5d 100644
> --- a/src/acpica/source/compiler/asllookup.c
> +++ b/src/acpica/source/compiler/asllookup.c
> @@ -1170,7 +1170,7 @@ LkNamespaceLocateBegin (
>
>              if (Message)
>              {
> -                sprintf (MsgBuffer, "Tag: %u bit%s, Field: %u bit%s",
> +                sprintf (MsgBuffer, "Size mismatch, Tag: %u bit%s, Field: %u bit%s",
>                      TagBitLength, (TagBitLength > 1) ? "s" : "",
>                      FieldBitLength, (FieldBitLength > 1) ? "s" : "");
>
> diff --git a/src/acpica/source/compiler/aslmain.c b/src/acpica/source/compiler/aslmain.c
> index 285d765..efd5906 100644
> --- a/src/acpica/source/compiler/aslmain.c
> +++ b/src/acpica/source/compiler/aslmain.c
> @@ -135,7 +135,7 @@ Options (
>      void);
>
>  static void
> -HelpMessage (
> +FilenameHelp (
>      void);
>
>  static void
> @@ -168,7 +168,7 @@ AslDoResponseFile (
>
>
>  #define ASL_TOKEN_SEPARATORS    " \t\n"
> -#define ASL_SUPPORTED_OPTIONS   "@:2b|c|d^D:e:fgh^i|I:l^mno|p:P^r:s|t|T:G^v|w|x:z"
> +#define ASL_SUPPORTED_OPTIONS   "@:2b|c|d^D:e:fgh^i|I:l^mno|p:P^r:s|t|T:G^v^w|x:z"
>
>
>  /*******************************************************************************
> @@ -191,6 +191,7 @@ Options (
>      printf ("\nGlobal:\n");
>      ACPI_OPTION ("-@ <file>",       "Specify command file");
>      ACPI_OPTION ("-I <dir>",        "Specify additional include directory");
> +    ACPI_OPTION ("-v",              "Display compiler version");
>
>      printf ("\nPreprocessor:\n");
>      ACPI_OPTION ("-D <symbol>",     "Define symbol for preprocessor use");
> @@ -242,27 +243,36 @@ Options (
>      ACPI_OPTION ("-g",              "Get ACPI tables and write to files (*.dat)");
>
>      printf ("\nHelp:\n");
> -    ACPI_OPTION ("-h",              "Additional help and compiler debug options");
> +    ACPI_OPTION ("-h",              "This message");
>      ACPI_OPTION ("-hc",             "Display operators allowed in constant expressions");
> +    ACPI_OPTION ("-hf",             "Display help for output filename generation");
>      ACPI_OPTION ("-hr",             "Display ACPI reserved method names");
>      ACPI_OPTION ("-ht",             "Display currently supported ACPI table names");
> +
> +    printf ("\nDebug Options:\n");
> +    ACPI_OPTION ("-bf -bt",         "Create debug file (full or parse tree only) (*.txt)");
> +    ACPI_OPTION ("-f",              "Ignore errors, force creation of AML output file(s)");
> +    ACPI_OPTION ("-n",              "Parse only, no output generation");
> +    ACPI_OPTION ("-ot",             "Display compile times and statistics");
> +    ACPI_OPTION ("-x <level>",      "Set debug level for trace output");
> +    ACPI_OPTION ("-z",              "Do not insert new compiler ID for DataTables");
>  }
>
>
>  /*******************************************************************************
>   *
> - * FUNCTION:    HelpMessage
> + * FUNCTION:    FilenameHelp
>   *
>   * PARAMETERS:  None
>   *
>   * RETURN:      None
>   *
> - * DESCRIPTION: Display help message
> + * DESCRIPTION: Display help message for output filename generation
>   *
>   ******************************************************************************/
>
>  static void
> -HelpMessage (
> +FilenameHelp (
>      void)
>  {
>
> @@ -274,17 +284,6 @@ HelpMessage (
>      printf ("    2) The prefix of the AMLFileName in the ASL Definition Block\n");
>      printf ("    3) The prefix of the input filename\n");
>      printf ("\n");
> -
> -    Options ();
> -
> -    printf ("\nCompiler/Disassembler Debug Options:\n");
> -    ACPI_OPTION ("-bb -bp -bt",     "Create compiler debug/trace file (*.txt)");
> -    ACPI_OPTION ("",                "Types: Parse/Tree/Both");
> -    ACPI_OPTION ("-f",              "Ignore errors, force creation of AML output file(s)");
> -    ACPI_OPTION ("-n",              "Parse only, no output generation");
> -    ACPI_OPTION ("-ot",             "Display compile times");
> -    ACPI_OPTION ("-x <level>",      "Set debug level for trace output");
> -    ACPI_OPTION ("-z",              "Do not insert new compiler ID for DataTables");
>  }
>
>
> @@ -502,13 +501,7 @@ AslDoOptions (
>      case 'b':   /* Debug output options */
>          switch (AcpiGbl_Optarg[0])
>          {
> -        case 'b':
> -            AslCompilerdebug = 1; /* same as yydebug */
> -            DtParserdebug = 1;
> -            PrParserdebug = 1;
> -            break;
> -
> -        case 'p':
> +        case 'f':
>              AslCompilerdebug = 1; /* same as yydebug */
>              DtParserdebug = 1;
>              PrParserdebug = 1;
> @@ -602,13 +595,17 @@ AslDoOptions (
>          switch (AcpiGbl_Optarg[0])
>          {
>          case '^':
> -            HelpMessage ();
> +            Usage ();
>              exit (0);
>
>          case 'c':
>              UtDisplayConstantOpcodes ();
>              exit (0);
>
> +        case 'f':
> +            FilenameHelp ();
> +            exit (0);
> +
>          case 'r':
>              /* reserved names */
>
> @@ -827,9 +824,13 @@ AslDoOptions (
>          break;
>
>
> -    case 'v':   /* Verbosity settings */
> +    case 'v':   /* Version and verbosity settings */
>          switch (AcpiGbl_Optarg[0])
>          {
> +        case '^':
> +            printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
> +            exit (0);
> +
>          case 'a':
>              /* Disable All error/warning messages */
>
> @@ -837,9 +838,18 @@ AslDoOptions (
>              break;
>
>          case 'i':
> -            /* Less verbose error messages */
> -
> +            /*
> +             * Support for integrated development environment(s).
> +             *
> +             * 1) No compiler signon
> +             * 2) Send stderr messages to stdout
> +             * 3) Less verbose error messages (single line only for each)
> +             * 4) Error/warning messages are formatted appropriately to
> +             *    be recognized by MS Visual Studio
> +             */
>              Gbl_VerboseErrors = FALSE;
> +            Gbl_DoSignon = FALSE;
> +            Gbl_Files[ASL_FILE_STDERR].Handle = stdout;
>              break;
>
>          case 'o':
> diff --git a/src/acpica/source/compiler/aslmap.c b/src/acpica/source/compiler/aslmap.c
> index 498ca42..c276972 100644
> --- a/src/acpica/source/compiler/aslmap.c
> +++ b/src/acpica/source/compiler/aslmap.c
> @@ -439,6 +439,7 @@ const ASL_MAPPING_ENTRY     AslKeywordMapping [] =
>  /* REGIONSPACE_IO */            OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_SYSTEM_IO,       0,                  0),
>  /* REGIONSPACE_IPMI */          OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_IPMI,            0,                  0),
>  /* REGIONSPACE_MEM */           OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_SYSTEM_MEMORY,   0,                  0),
> +/* REGIONSPACE_PCC */           OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_PLATFORM_COMM,   0,                  0),
>  /* REGIONSPACE_PCI */           OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_PCI_CONFIG,      0,                  0),
>  /* REGIONSPACE_PCIBAR */        OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_PCI_BAR_TARGET,  0,                  0),
>  /* REGIONSPACE_SMBUS */         OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_SMBUS,           0,                  0),
> diff --git a/src/acpica/source/compiler/aslmessages.h b/src/acpica/source/compiler/aslmessages.h
> index 4e5bb31..56951bc 100644
> --- a/src/acpica/source/compiler/aslmessages.h
> +++ b/src/acpica/source/compiler/aslmessages.h
> @@ -474,7 +474,7 @@ char                        *AslMessages [] = {
>  };
>
>
> -char                    *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = {
> +const char              *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = {
>      "Warning ",
>      "Warning ",
>      "Warning ",
> @@ -483,6 +483,15 @@ char                    *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = {
>      "Optimize"
>  };
>
> +const char              *AslErrorLevelIde [ASL_NUM_REPORT_LEVELS] = {
> +    "warning ",
> +    "warning ",
> +    "warning ",
> +    "error   ",
> +    "remark  ",
> +    "optimize"
> +};
> +
>  #define ASL_ERROR_LEVEL_LENGTH          8       /* Length of strings above */
>
>  #endif  /* ASL_EXCEPTIONS */
> diff --git a/src/acpica/source/compiler/aslstartup.c b/src/acpica/source/compiler/aslstartup.c
> index 49b25d9..2fbe0d3 100644
> --- a/src/acpica/source/compiler/aslstartup.c
> +++ b/src/acpica/source/compiler/aslstartup.c
> @@ -299,7 +299,7 @@ AslDetectSourceFileType (
>
>      /* Check for 100% ASCII source file (comments are ignored) */
>
> -    Status = FlCheckForAscii (Info);
> +    Status = FlCheckForAscii (Info->Handle, Info->Filename, TRUE);
>      if (ACPI_FAILURE (Status))
>      {
>          printf ("Non-ascii input file - %s\n", Info->Filename);
> diff --git a/src/acpica/source/compiler/aslsupport.l b/src/acpica/source/compiler/aslsupport.l
> index cdaf2b8..0ce5a20 100644
> --- a/src/acpica/source/compiler/aslsupport.l
> +++ b/src/acpica/source/compiler/aslsupport.l
> @@ -164,19 +164,23 @@ static void
>  AslDoLineDirective (
>      void)
>  {
> -    char                    c;
> +    int                     c;
>      char                    *Token;
>      UINT32                  LineNumber;
>      char                    *Filename;
> +    UINT32                  i;
>
>
>      /* Eat the entire line that contains the #line directive */
>
> -    while ((c = (char) input()) != '\n' && c != EOF)
> +    Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
> +
> +    while ((c = input()) != '\n' && c != EOF)
>      {
> -        AslInsertLineBuffer (c);
> +        *Gbl_LineBufPtr = c;
> +        Gbl_LineBufPtr++;
>      }
> -    AslInsertLineBuffer (0);
> +    *Gbl_LineBufPtr = 0;
>
>      /* First argument is the actual line number */
>
> @@ -186,10 +190,23 @@ AslDoLineDirective (
>          goto ResetAndExit;
>      }
>
> -    /* Convert line number. Subtract one to handle _this_ line */
> +    /* First argument is the line number */
>
>      LineNumber = (UINT32) UtDoConstant (Token);
> -    FlSetLineNumber (LineNumber - 1);
> +
> +    /* Emit the appropriate number of newlines */
> +
> +    Gbl_CurrentColumn = 0;
> +    if (LineNumber > Gbl_CurrentLineNumber)
> +    {
> +        for (i = 0; i < (LineNumber - Gbl_CurrentLineNumber); i++)
> +        {
> +            FlWriteFile (ASL_FILE_SOURCE_OUTPUT, "\n", 1);
> +            Gbl_CurrentColumn++;
> +        }
> +    }
> +
> +    FlSetLineNumber (LineNumber);
>
>      /* Second argument is the optional filename (in double quotes) */
>
> @@ -204,7 +221,12 @@ AslDoLineDirective (
>      /* Third argument is not supported at this time */
>
>  ResetAndExit:
> -    AslResetCurrentLineBuffer ();
> +
> +    /* Reset globals for a new line */
> +
> +    Gbl_CurrentLineOffset += Gbl_CurrentColumn;
> +    Gbl_CurrentColumn = 0;
> +    Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
>  }
>
>
> @@ -480,8 +502,8 @@ static char
>  AslDoComment (
>      void)
>  {
> -    char                c;
> -    char                c1 = 0;
> +    int                 c;
> +    int                 c1 = 0;
>
>
>      AslInsertLineBuffer ('/');
> @@ -491,7 +513,7 @@ loop:
>
>      /* Eat chars until end-of-comment */
>
> -    while ((c = (char) input()) != '*' && c != EOF)
> +    while ((c = input()) != '*' && c != EOF)
>      {
>          AslInsertLineBuffer (c);
>          c1 = c;
> @@ -518,7 +540,7 @@ loop:
>
>      AslInsertLineBuffer (c);
>
> -    if ((c1 = (char) input()) != '/' && c1 != EOF)
> +    if ((c1 = input()) != '/' && c1 != EOF)
>      {
>          unput(c1);
>          goto loop;
> @@ -561,13 +583,13 @@ static char
>  AslDoCommentType2 (
>      void)
>  {
> -    char                c;
> +    int                 c;
>
>
>      AslInsertLineBuffer ('/');
>      AslInsertLineBuffer ('/');
>
> -    while ((c = (char) input()) != '\n' && c != EOF)
> +    while ((c = input()) != '\n' && c != EOF)
>      {
>          AslInsertLineBuffer (c);
>      }
> @@ -603,7 +625,7 @@ AslDoStringLiteral (
>      char                *StringBuffer = MsgBuffer;
>      char                *EndBuffer = MsgBuffer + ASL_MSG_BUFFER_SIZE;
>      char                *CleanString;
> -    char                StringChar;
> +    int                 StringChar;
>      UINT32              State = ASL_NORMAL_CHAR;
>      UINT32              i = 0;
>      UINT8               Digit;
> @@ -616,7 +638,7 @@ AslDoStringLiteral (
>       * source line buffer.
>       */
>      AslInsertLineBuffer ('\"');
> -    while ((StringChar = (char) input()) != EOF)
> +    while ((StringChar = input()) != EOF)
>      {
>          AslInsertLineBuffer (StringChar);
>
> diff --git a/src/acpica/source/compiler/aslutils.c b/src/acpica/source/compiler/aslutils.c
> index 8a7dbba..de7ea0d 100644
> --- a/src/acpica/source/compiler/aslutils.c
> +++ b/src/acpica/source/compiler/aslutils.c
> @@ -211,7 +211,7 @@ UtDisplaySupportedTables (
>
>  /*******************************************************************************
>   *
> - * FUNCTION:    AcpiPsDisplayConstantOpcodes
> + * FUNCTION:    UtDisplayConstantOpcodes
>   *
>   * PARAMETERS:  None
>   *
> @@ -244,11 +244,11 @@ UtDisplayConstantOpcodes (
>   *
>   * FUNCTION:    UtLocalCalloc
>   *
> - * PARAMETERS:  Size        - Bytes to be allocated
> + * PARAMETERS:  Size                - Bytes to be allocated
>   *
> - * RETURN:      Pointer to the allocated memory.  Guaranteed to be valid.
> + * RETURN:      Pointer to the allocated memory. Guaranteed to be valid.
>   *
> - * DESCRIPTION: Allocate zero-initialized memory.  Aborts the compile on an
> + * DESCRIPTION: Allocate zero-initialized memory. Aborts the compile on an
>   *              allocation failure, on the assumption that nothing more can be
>   *              accomplished.
>   *
> @@ -283,9 +283,9 @@ UtLocalCalloc (
>   *
>   * FUNCTION:    UtBeginEvent
>   *
> - * PARAMETERS:  Name        - Ascii name of this event
> + * PARAMETERS:  Name                - Ascii name of this event
>   *
> - * RETURN:      Event       - Event number (integer index)
> + * RETURN:      Event number (integer index)
>   *
>   * DESCRIPTION: Saves the current time with this event
>   *
> @@ -316,7 +316,7 @@ UtBeginEvent (
>   *
>   * FUNCTION:    UtEndEvent
>   *
> - * PARAMETERS:  Event       - Event number (integer index)
> + * PARAMETERS:  Event               - Event number (integer index)
>   *
>   * RETURN:      None
>   *
> @@ -326,7 +326,7 @@ UtBeginEvent (
>
>  void
>  UtEndEvent (
> -    UINT8                  Event)
> +    UINT8                   Event)
>  {
>
>      if (Event >= ASL_NUM_EVENTS)
> @@ -344,7 +344,7 @@ UtEndEvent (
>   *
>   * FUNCTION:    UtHexCharToValue
>   *
> - * PARAMETERS:  HexChar         - Hex character in Ascii
> + * PARAMETERS:  HexChar             - Hex character in Ascii
>   *
>   * RETURN:      The binary value of the hex character
>   *
> @@ -375,12 +375,13 @@ UtHexCharToValue (
>   *
>   * FUNCTION:    UtConvertByteToHex
>   *
> - * PARAMETERS:  RawByte         - Binary data
> - *              Buffer          - Pointer to where the hex bytes will be stored
> + * PARAMETERS:  RawByte             - Binary data
> + *              Buffer              - Pointer to where the hex bytes will be
> + *                                    stored
>   *
>   * RETURN:      Ascii hex byte is stored in Buffer.
>   *
> - * DESCRIPTION: Perform hex-to-ascii translation.  The return data is prefixed
> + * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed
>   *              with "0x"
>   *
>   ******************************************************************************/
> @@ -403,12 +404,13 @@ UtConvertByteToHex (
>   *
>   * FUNCTION:    UtConvertByteToAsmHex
>   *
> - * PARAMETERS:  RawByte         - Binary data
> - *              Buffer          - Pointer to where the hex bytes will be stored
> + * PARAMETERS:  RawByte             - Binary data
> + *              Buffer              - Pointer to where the hex bytes will be
> + *                                    stored
>   *
>   * RETURN:      Ascii hex byte is stored in Buffer.
>   *
> - * DESCRIPTION: Perform hex-to-ascii translation.  The return data is prefixed
> + * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed
>   *              with "0x"
>   *
>   ******************************************************************************/
> @@ -430,13 +432,13 @@ UtConvertByteToAsmHex (
>   *
>   * FUNCTION:    DbgPrint
>   *
> - * PARAMETERS:  Type            - Type of output
> - *              Fmt             - Printf format string
> - *              ...             - variable printf list
> + * PARAMETERS:  Type                - Type of output
> + *              Fmt                 - Printf format string
> + *              ...                 - variable printf list
>   *
>   * RETURN:      None
>   *
> - * DESCRIPTION: Conditional print statement.  Prints to stderr only if the
> + * DESCRIPTION: Conditional print statement. Prints to stderr only if the
>   *              debug flag is set.
>   *
>   ******************************************************************************/
> @@ -510,7 +512,7 @@ UtPrintFormattedName (
>   *
>   * FUNCTION:    UtSetParseOpName
>   *
> - * PARAMETERS:  Op
> + * PARAMETERS:  Op                  - Parse op to be named.
>   *
>   * RETURN:      None
>   *
> @@ -532,7 +534,7 @@ UtSetParseOpName (
>   *
>   * FUNCTION:    UtDisplaySummary
>   *
> - * PARAMETERS:  FileID          - ID of outpout file
> + * PARAMETERS:  FileID              - ID of outpout file
>   *
>   * RETURN:      None
>   *
> @@ -643,11 +645,11 @@ UtDisplaySummary (
>
>  /*******************************************************************************
>   *
> - * FUNCTION:    UtDisplaySummary
> + * FUNCTION:    UtCheckIntegerRange
>   *
> - * PARAMETERS:  Op              - Integer parse node
> - *              LowValue        - Smallest allowed value
> - *              HighValue       - Largest allowed value
> + * PARAMETERS:  Op                  - Integer parse node
> + *              LowValue            - Smallest allowed value
> + *              HighValue           - Largest allowed value
>   *
>   * RETURN:      Op if OK, otherwise NULL
>   *
> @@ -698,11 +700,11 @@ UtCheckIntegerRange (
>   *
>   * FUNCTION:    UtGetStringBuffer
>   *
> - * PARAMETERS:  Length          - Size of buffer requested
> + * PARAMETERS:  Length              - Size of buffer requested
>   *
> - * RETURN:      Pointer to the buffer.  Aborts on allocation failure
> + * RETURN:      Pointer to the buffer. Aborts on allocation failure
>   *
> - * DESCRIPTION: Allocate a string buffer.  Bypass the local
> + * DESCRIPTION: Allocate a string buffer. Bypass the local
>   *              dynamic memory manager for performance reasons (This has a
>   *              major impact on the speed of the compiler.)
>   *
> @@ -733,8 +735,8 @@ UtGetStringBuffer (
>   *
>   * FUNCTION:    UtInternalizeName
>   *
> - * PARAMETERS:  ExternalName            - Name to convert
> - *              ConvertedName           - Where the converted name is returned
> + * PARAMETERS:  ExternalName        - Name to convert
> + *              ConvertedName       - Where the converted name is returned
>   *
>   * RETURN:      Status
>   *
> @@ -786,8 +788,8 @@ UtInternalizeName (
>   *
>   * FUNCTION:    UtPadNameWithUnderscores
>   *
> - * PARAMETERS:  NameSeg         - Input nameseg
> - *              PaddedNameSeg   - Output padded nameseg
> + * PARAMETERS:  NameSeg             - Input nameseg
> + *              PaddedNameSeg       - Output padded nameseg
>   *
>   * RETURN:      Padded nameseg.
>   *
> @@ -824,8 +826,8 @@ UtPadNameWithUnderscores (
>   *
>   * FUNCTION:    UtAttachNameseg
>   *
> - * PARAMETERS:  Op              - Parent parse node
> - *              Name            - Full ExternalName
> + * PARAMETERS:  Op                  - Parent parse node
> + *              Name                - Full ExternalName
>   *
>   * RETURN:      None; Sets the NameSeg field in parent node
>   *
> @@ -881,12 +883,12 @@ UtAttachNameseg (
>   *
>   * FUNCTION:    UtAttachNamepathToOwner
>   *
> - * PARAMETERS:  Op            - Parent parse node
> - *              NameOp        - Node that contains the name
> + * PARAMETERS:  Op                  - Parent parse node
> + *              NameOp              - Node that contains the name
>   *
>   * RETURN:      Sets the ExternalName and Namepath in the parent node
>   *
> - * DESCRIPTION: Store the name in two forms in the parent node:  The original
> + * DESCRIPTION: Store the name in two forms in the parent node: The original
>   *              (external) name, and the internalized name that is used within
>   *              the ACPI namespace manager.
>   *
> @@ -926,11 +928,11 @@ UtAttachNamepathToOwner (
>   *
>   * FUNCTION:    UtDoConstant
>   *
> - * PARAMETERS:  String      - Hex, Octal, or Decimal string
> + * PARAMETERS:  String              - Hex, Octal, or Decimal string
>   *
>   * RETURN:      Converted Integer
>   *
> - * DESCRIPTION: Convert a string to an integer.  With error checking.
> + * DESCRIPTION: Convert a string to an integer, with error checking.
>   *
>   ******************************************************************************/
>
> @@ -961,10 +963,10 @@ UtDoConstant (
>   *
>   * FUNCTION:    UtStrtoul64
>   *
> - * PARAMETERS:  String          - Null terminated string
> - *              Terminater      - Where a pointer to the terminating byte is
> - *                                returned
> - *              Base            - Radix of the string
> + * PARAMETERS:  String              - Null terminated string
> + *              Terminater          - Where a pointer to the terminating byte
> + *                                    is returned
> + *              Base                - Radix of the string
>   *
>   * RETURN:      Converted value
>   *
> @@ -1144,5 +1146,3 @@ ErrorExit:
>
>      return (Status);
>  }
> -
> -
> diff --git a/src/acpica/source/compiler/dtio.c b/src/acpica/source/compiler/dtio.c
> index 91d4aba..7a68e84 100644
> --- a/src/acpica/source/compiler/dtio.c
> +++ b/src/acpica/source/compiler/dtio.c
> @@ -161,6 +161,7 @@ DtDumpBuffer (
>  #define DT_SLASH_SLASH_COMMENT      4
>  #define DT_END_COMMENT              5
>  #define DT_MERGE_LINES              6
> +#define DT_ESCAPE_SEQUENCE          7
>
>  static UINT32  Gbl_NextLineOffset;
>
> @@ -498,7 +499,6 @@ DtGetNextLine (
>              {
>              case DT_START_QUOTED_STRING:
>              case DT_SLASH_ASTERISK_COMMENT:
> -            case DT_SLASH_SLASH_COMMENT:
>
>                  AcpiOsPrintf ("**** EOF within comment/string %u\n", State);
>                  break;
> @@ -507,7 +507,22 @@ DtGetNextLine (
>                  break;
>              }
>
> -            return (ASL_EOF);
> +            /* Standalone EOF is OK */
> +
> +            if (i == 0)
> +            {
> +                return (ASL_EOF);
> +            }
> +
> +            /*
> +             * Received an EOF in the middle of a line. Terminate the
> +             * line with a newline. The next call to this function will
> +             * return a standalone EOF. Thus, the upper parsing software
> +             * never has to deal with an EOF within a valid line (or
> +             * the last line does not get tossed on the floor.)
> +             */
> +            c = '\n';
> +            State = DT_NORMAL_TEXT;
>          }
>
>          switch (State)
> @@ -576,12 +591,36 @@ DtGetNextLine (
>              Gbl_CurrentLineBuffer[i] = c;
>              i++;
>
> -            if (c == '"')
> +            switch (c)
>              {
> +            case '"':
>                  State = DT_NORMAL_TEXT;
> +                break;
> +
> +            case '\\':
> +                State = DT_ESCAPE_SEQUENCE;
> +                break;
> +
> +            case '\n':
> +                AcpiOsPrintf ("ERROR at line %u: Unterminated quoted string\n",
> +                    Gbl_CurrentLineNumber++);
> +                State = DT_NORMAL_TEXT;
> +                break;
> +
> +            default:    /* Get next character */
> +                break;
>              }
>              break;
>
> +        case DT_ESCAPE_SEQUENCE:
> +
> +            /* Just copy the escaped character. TBD: sufficient for table compiler? */
> +
> +            Gbl_CurrentLineBuffer[i] = c;
> +            i++;
> +            State = DT_START_QUOTED_STRING;
> +            break;
> +
>          case DT_START_COMMENT:
>
>              /* Open comment if this character is an asterisk or slash */
> diff --git a/src/acpica/source/compiler/dttemplate.c b/src/acpica/source/compiler/dttemplate.c
> index ed5f79b..1d92b78 100644
> --- a/src/acpica/source/compiler/dttemplate.c
> +++ b/src/acpica/source/compiler/dttemplate.c
> @@ -298,7 +298,7 @@ DtCreateAllTemplates (
>      }
>
>      /*
> -     * Create the "special ACPI tables:
> +     * Create the special ACPI tables:
>       * 1) DSDT/SSDT are AML tables, not data tables
>       * 2) FACS and RSDP have non-standard headers
>       */
> diff --git a/src/acpica/source/compiler/prscan.c b/src/acpica/source/compiler/prscan.c
> index e98e186..687af45 100644
> --- a/src/acpica/source/compiler/prscan.c
> +++ b/src/acpica/source/compiler/prscan.c
> @@ -726,7 +726,7 @@ PrDoDirective (
>          }
>
>          DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
> -            "Start #include file %s\n", Gbl_CurrentLineNumber,
> +            "Start #include file \"%s\"\n", Gbl_CurrentLineNumber,
>              Token, Gbl_CurrentLineNumber);
>
>          PrOpenIncludeFile (Token);
> diff --git a/src/acpica/source/compiler/prutils.c b/src/acpica/source/compiler/prutils.c
> index a5fb46a..64dc9e8 100644
> --- a/src/acpica/source/compiler/prutils.c
> +++ b/src/acpica/source/compiler/prutils.c
> @@ -318,13 +318,11 @@ PrOpenIncludeFile (
>      ASL_INCLUDE_DIR         *NextDir;
>
>
> -    /*
> -     * start the actual include file on the next line
> -     */
> +    /* Start the actual include file on the next line */
> +
>      Gbl_CurrentLineOffset++;
>
>      /* Attempt to open the include file */
> -
>      /* If the file specifies an absolute path, just open it */
>
>      if ((Filename[0] == '/')  ||
> @@ -402,13 +400,10 @@ PrOpenIncludeWithPrefix (
>
>      /* Build the full pathname to the file */
>
> -    Pathname = ACPI_ALLOCATE (strlen (PrefixDir) + strlen (Filename) + 1);
> +    Pathname = FlMergePathnames (PrefixDir, Filename);
>
> -    strcpy (Pathname, PrefixDir);
> -    strcat (Pathname, Filename);
> -
> -    DbgPrint (ASL_PARSE_OUTPUT, "\n" PR_PREFIX_ID
> -        "Opening include file: path %s\n",
> +    DbgPrint (ASL_PARSE_OUTPUT, PR_PREFIX_ID
> +        "Include: Opening file - \"%s\"\n",
>          Gbl_CurrentLineNumber, Pathname);
>
>      /* Attempt to open the file, push if successful */
> diff --git a/src/acpica/source/components/debugger/dbcmds.c b/src/acpica/source/components/debugger/dbcmds.c
> index 4c34a79..27aa4cd 100644
> --- a/src/acpica/source/components/debugger/dbcmds.c
> +++ b/src/acpica/source/components/debugger/dbcmds.c
> @@ -326,12 +326,53 @@ AcpiDbDisplayTableInfo (
>      ACPI_STATUS             Status;
>
>
> +    /* Header */
> +
> +    AcpiOsPrintf ("Idx ID Status    Type            Sig  Address  Len   Header\n");
> +
>      /* Walk the entire root table list */
>
>      for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++)
>      {
>          TableDesc = &AcpiGbl_RootTableList.Tables[i];
> -        AcpiOsPrintf ("%u ", i);
> +
> +        /* Index and Table ID */
> +
> +        AcpiOsPrintf ("%3u %.2u ", i, TableDesc->OwnerId);
> +
> +        /* Decode the table flags */
> +
> +        if (!(TableDesc->Flags & ACPI_TABLE_IS_LOADED))
> +        {
> +            AcpiOsPrintf ("NotLoaded ");
> +        }
> +        else
> +        {
> +            AcpiOsPrintf ("   Loaded ");
> +        }
> +
> +        switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK)
> +        {
> +        case ACPI_TABLE_ORIGIN_UNKNOWN:
> +            AcpiOsPrintf ("Unknown   ");
> +            break;
> +
> +        case ACPI_TABLE_ORIGIN_MAPPED:
> +            AcpiOsPrintf ("Mapped    ");
> +            break;
> +
> +        case ACPI_TABLE_ORIGIN_ALLOCATED:
> +            AcpiOsPrintf ("Allocated ");
> +            break;
> +
> +        case ACPI_TABLE_ORIGIN_OVERRIDE:
> +            AcpiOsPrintf ("Override  ");
> +            break;
> +
> +        default:
> +            AcpiOsPrintf ("INVALID   ");
> +            break;
> +        }
>
>          /* Make sure that the table is mapped */
>
> @@ -362,55 +403,45 @@ AcpiDbDisplayTableInfo (
>   *
>   * FUNCTION:    AcpiDbUnloadAcpiTable
>   *
> - * PARAMETERS:  TableArg        - Name of the table to be unloaded
> - *              InstanceArg     - Which instance of the table to unload (if
> - *                                there are multiple tables of the same type)
> + * PARAMETERS:  ObjectName          - Namespace pathname for an object that
> + *                                    is owned by the table to be unloaded
>   *
> - * RETURN:      Nonde
> + * RETURN:      None
>   *
> - * DESCRIPTION: Unload an ACPI table.
> - *              Instance is not implemented
> + * DESCRIPTION: Unload an ACPI table, via any namespace node that is owned
> + *              by the table.
>   *
>   ******************************************************************************/
>
>  void
>  AcpiDbUnloadAcpiTable (
> -    char                    *TableArg,
> -    char                    *InstanceArg)
> +    char                    *ObjectName)
>  {
> -/* TBD: Need to reimplement for new data structures */
> -
> -#if 0
> -    UINT32                  i;
> +    ACPI_NAMESPACE_NODE     *Node;
>      ACPI_STATUS             Status;
>
>
> -    /* Search all tables for the target type */
> +    /* Translate name to an Named object */
>
> -    for (i = 0; i < (ACPI_TABLE_ID_MAX+1); i++)
> +    Node = AcpiDbConvertToNode (ObjectName);
> +    if (!Node)
>      {
> -        if (!ACPI_STRNCMP (TableArg, AcpiGbl_TableData[i].Signature,
> -                AcpiGbl_TableData[i].SigLength))
> -        {
> -            /* Found the table, unload it */
> -
> -            Status = AcpiUnloadTable (i);
> -            if (ACPI_SUCCESS (Status))
> -            {
> -                AcpiOsPrintf ("[%s] unloaded and uninstalled\n", TableArg);
> -            }
> -            else
> -            {
> -                AcpiOsPrintf ("%s, while unloading [%s]\n",
> -                    AcpiFormatException (Status), TableArg);
> -            }
> -
> -            return;
> -        }
> +        AcpiOsPrintf ("Could not find [%s] in namespace\n",
> +            ObjectName);
> +        return;
>      }
>
> -    AcpiOsPrintf ("Unknown table type [%s]\n", TableArg);
> -#endif
> +    Status = AcpiUnloadParentTable (ACPI_CAST_PTR (ACPI_HANDLE, Node));
> +    if (ACPI_SUCCESS (Status))
> +    {
> +        AcpiOsPrintf ("Parent of [%s] (%p) unloaded and uninstalled\n",
> +            ObjectName, Node);
> +    }
> +    else
> +    {
> +        AcpiOsPrintf ("%s, while unloading parent table of [%s]\n",
> +            AcpiFormatException (Status), ObjectName);
> +    }
>  }
>
>
> @@ -445,25 +476,20 @@ AcpiDbSendNotify (
>          return;
>      }
>
> -    /* Decode Named object type */
> +    /* Dispatch the notify if legal */
>
> -    switch (Node->Type)
> +    if (AcpiEvIsNotifyObject (Node))
>      {
> -    case ACPI_TYPE_DEVICE:
> -    case ACPI_TYPE_THERMAL:
> -
> -         /* Send the notify */
> -
>          Status = AcpiEvQueueNotifyRequest (Node, Value);
>          if (ACPI_FAILURE (Status))
>          {
>              AcpiOsPrintf ("Could not queue notify\n");
>          }
> -        break;
> -
> -    default:
> -        AcpiOsPrintf ("Named object is not a device or a thermal object\n");
> -        break;
> +    }
> +    else
> +    {
> +        AcpiOsPrintf ("Named object [%4.4s] Type %s, must be Device/Thermal/Processor type\n",
> +            AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type));
>      }
>  }
>
> diff --git a/src/acpica/source/components/debugger/dbdisply.c b/src/acpica/source/components/debugger/dbdisply.c
> index d8b3aa9..2e91c88 100644
> --- a/src/acpica/source/components/debugger/dbdisply.c
> +++ b/src/acpica/source/components/debugger/dbdisply.c
> @@ -179,8 +179,8 @@ typedef struct acpi_handler_info
>
>  static ACPI_HANDLER_INFO    AcpiGbl_HandlerList[] =
>  {
> -    {&AcpiGbl_SystemNotify.Handler,     "System Notifications"},
> -    {&AcpiGbl_DeviceNotify.Handler,     "Device Notifications"},
> +    {&AcpiGbl_GlobalNotify[0].Handler,  "System Notifications"},
> +    {&AcpiGbl_GlobalNotify[1].Handler,  "Device Notifications"},
>      {&AcpiGbl_TableHandler,             "ACPI Table Events"},
>      {&AcpiGbl_ExceptionHandler,         "Control Method Exceptions"},
>      {&AcpiGbl_InterfaceHandler,         "OSI Invocations"}
> @@ -864,10 +864,12 @@ AcpiDbDisplayGpes (
>      ACPI_GPE_EVENT_INFO     *GpeEventInfo;
>      ACPI_GPE_REGISTER_INFO  *GpeRegisterInfo;
>      char                    *GpeType;
> +    ACPI_GPE_NOTIFY_INFO    *Notify;
>      UINT32                  GpeIndex;
>      UINT32                  Block = 0;
>      UINT32                  i;
>      UINT32                  j;
> +    UINT32                  Count;
>      char                    Buffer[80];
>      ACPI_BUFFER             RetBuf;
>      ACPI_STATUS             Status;
> @@ -988,7 +990,14 @@ AcpiDbDisplayGpes (
>                          AcpiOsPrintf ("Handler");
>                          break;
>                      case ACPI_GPE_DISPATCH_NOTIFY:
> -                        AcpiOsPrintf ("Notify");
> +                        Count = 0;
> +                        Notify = GpeEventInfo->Dispatch.NotifyList;
> +                        while (Notify)
> +                        {
> +                            Count++;
> +                            Notify = Notify->Next;
> +                        }
> +                        AcpiOsPrintf ("Implicit Notify on %u devices", Count);
>                          break;
>                      default:
>                          AcpiOsPrintf ("UNKNOWN: %X",
> diff --git a/src/acpica/source/components/debugger/dbexec.c b/src/acpica/source/components/debugger/dbexec.c
> index eb85998..174f77a 100644
> --- a/src/acpica/source/components/debugger/dbexec.c
> +++ b/src/acpica/source/components/debugger/dbexec.c
> @@ -944,8 +944,8 @@ AcpiDbMethodThread (
>
>      if (Info->InitArgs)
>      {
> -        AcpiDbUInt32ToHexString (Info->NumCreated, Info->IndexOfThreadStr);
> -        AcpiDbUInt32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr);
> +        AcpiDbUint32ToHexString (Info->NumCreated, Info->IndexOfThreadStr);
> +        AcpiDbUint32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr);
>      }
>
>      if (Info->Threads && (Info->NumCreated < Info->NumThreads))
> @@ -1135,7 +1135,7 @@ AcpiDbCreateExecutionThreads (
>      AcpiGbl_DbMethodInfo.ArgTypes[1] = ACPI_TYPE_INTEGER;
>      AcpiGbl_DbMethodInfo.ArgTypes[2] = ACPI_TYPE_INTEGER;
>
> -    AcpiDbUInt32ToHexString (NumThreads, AcpiGbl_DbMethodInfo.NumThreadsStr);
> +    AcpiDbUint32ToHexString (NumThreads, AcpiGbl_DbMethodInfo.NumThreadsStr);
>
>      AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
>
> diff --git a/src/acpica/source/components/debugger/dbfileio.c b/src/acpica/source/components/debugger/dbfileio.c
> index 495d609..8e36c87 100644
> --- a/src/acpica/source/components/debugger/dbfileio.c
> +++ b/src/acpica/source/components/debugger/dbfileio.c
> @@ -123,6 +123,10 @@
>  #include "actables.h"
>  #endif
>
> +#ifdef ACPI_ASL_COMPILER
> +#include "aslcompiler.h"
> +#endif
> +
>  #if (defined ACPI_DEBUGGER || defined ACPI_DISASSEMBLER)
>
>  #define _COMPONENT          ACPI_CA_DEBUGGER
> @@ -381,6 +385,15 @@ AcpiDbReadTable (
>              AcpiOsPrintf (
>                  "TableHeader length [0x%X] greater than the input file size [0x%X]\n",
>                  TableHeader.Length, FileSize);
> +
> +#ifdef ACPI_ASL_COMPILER
> +            Status = FlCheckForAscii (fp, NULL, FALSE);
> +            if (ACPI_SUCCESS (Status))
> +            {
> +                AcpiOsPrintf ("File appears to be ASCII only, must be binary\n",
> +                    TableHeader.Length, FileSize);
> +            }
> +#endif
>              return (AE_BAD_HEADER);
>          }
>
> diff --git a/src/acpica/source/components/debugger/dbinput.c b/src/acpica/source/components/debugger/dbinput.c
> index 3e61bdb..1b2ee1d 100644
> --- a/src/acpica/source/components/debugger/dbinput.c
> +++ b/src/acpica/source/components/debugger/dbinput.c
> @@ -322,7 +322,7 @@ AcpiDbDisplayHelp (
>      AcpiOsPrintf ("     Stack                            Display CPU stack usage\n");
>      AcpiOsPrintf ("     Tables                           Info about current ACPI table(s)\n");
>      AcpiOsPrintf ("  Tables                              Display info about loaded ACPI tables\n");
> -    AcpiOsPrintf ("  Unload <TableSig> [Instance]        Unload an ACPI table\n");
> +    AcpiOsPrintf ("  Unload <Namepath>                   Unload an ACPI table via namespace object\n");
>      AcpiOsPrintf ("  ! <CommandNumber>                   Execute command from history buffer\n");
>      AcpiOsPrintf ("  !!                                  Execute last command again\n");
>
> @@ -966,7 +966,7 @@ AcpiDbCommandDispatch (
>          break;
>
>      case CMD_UNLOAD:
> -        AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
> +        AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1]);
>          break;
>
>      case CMD_EXIT:
> diff --git a/src/acpica/source/components/debugger/dbstats.c b/src/acpica/source/components/debugger/dbstats.c
> index 8a6e713..e309668 100644
> --- a/src/acpica/source/components/debugger/dbstats.c
> +++ b/src/acpica/source/components/debugger/dbstats.c
> @@ -299,8 +299,8 @@ AcpiDbEnumerateObject (
>
>      case ACPI_TYPE_DEVICE:
>
> -        AcpiDbEnumerateObject (ObjDesc->Device.SystemNotify);
> -        AcpiDbEnumerateObject (ObjDesc->Device.DeviceNotify);
> +        AcpiDbEnumerateObject (ObjDesc->Device.NotifyList[0]);
> +        AcpiDbEnumerateObject (ObjDesc->Device.NotifyList[1]);
>          AcpiDbEnumerateObject (ObjDesc->Device.Handler);
>          break;
>
> @@ -320,21 +320,21 @@ AcpiDbEnumerateObject (
>
>      case ACPI_TYPE_POWER:
>
> -        AcpiDbEnumerateObject (ObjDesc->PowerResource.SystemNotify);
> -        AcpiDbEnumerateObject (ObjDesc->PowerResource.DeviceNotify);
> +        AcpiDbEnumerateObject (ObjDesc->PowerResource.NotifyList[0]);
> +        AcpiDbEnumerateObject (ObjDesc->PowerResource.NotifyList[1]);
>          break;
>
>      case ACPI_TYPE_PROCESSOR:
>
> -        AcpiDbEnumerateObject (ObjDesc->Processor.SystemNotify);
> -        AcpiDbEnumerateObject (ObjDesc->Processor.DeviceNotify);
> +        AcpiDbEnumerateObject (ObjDesc->Processor.NotifyList[0]);
> +        AcpiDbEnumerateObject (ObjDesc->Processor.NotifyList[1]);
>          AcpiDbEnumerateObject (ObjDesc->Processor.Handler);
>          break;
>
>      case ACPI_TYPE_THERMAL:
>
> -        AcpiDbEnumerateObject (ObjDesc->ThermalZone.SystemNotify);
> -        AcpiDbEnumerateObject (ObjDesc->ThermalZone.DeviceNotify);
> +        AcpiDbEnumerateObject (ObjDesc->ThermalZone.NotifyList[0]);
> +        AcpiDbEnumerateObject (ObjDesc->ThermalZone.NotifyList[1]);
>          AcpiDbEnumerateObject (ObjDesc->ThermalZone.Handler);
>          break;
>
> @@ -594,6 +594,18 @@ AcpiDbDisplayStatistics (
>          AcpiOsPrintf ("NamespaceNode    %3d\n", sizeof (ACPI_NAMESPACE_NODE));
>          AcpiOsPrintf ("AcpiObject       %3d\n", sizeof (ACPI_OBJECT));
>
> +        AcpiOsPrintf ("\n");
> +
> +        AcpiOsPrintf ("Generic State    %3d\n", sizeof (ACPI_GENERIC_STATE));
> +        AcpiOsPrintf ("Common State     %3d\n", sizeof (ACPI_COMMON_STATE));
> +        AcpiOsPrintf ("Control State    %3d\n", sizeof (ACPI_CONTROL_STATE));
> +        AcpiOsPrintf ("Update State     %3d\n", sizeof (ACPI_UPDATE_STATE));
> +        AcpiOsPrintf ("Scope State      %3d\n", sizeof (ACPI_SCOPE_STATE));
> +        AcpiOsPrintf ("Parse Scope      %3d\n", sizeof (ACPI_PSCOPE_STATE));
> +        AcpiOsPrintf ("Package State    %3d\n", sizeof (ACPI_PKG_STATE));
> +        AcpiOsPrintf ("Thread State     %3d\n", sizeof (ACPI_THREAD_STATE));
> +        AcpiOsPrintf ("Result Values    %3d\n", sizeof (ACPI_RESULT_VALUES));
> +        AcpiOsPrintf ("Notify Info      %3d\n", sizeof (ACPI_NOTIFY_INFO));
>          break;
>
>
> diff --git a/src/acpica/source/components/debugger/dbutils.c b/src/acpica/source/components/debugger/dbutils.c
> index fd318d9..f913c64 100644
> --- a/src/acpica/source/components/debugger/dbutils.c
> +++ b/src/acpica/source/components/debugger/dbutils.c
> @@ -432,7 +432,7 @@ AcpiDbLocalNsLookup (
>
>  /*******************************************************************************
>   *
> - * FUNCTION:    AcpiDbUInt32ToHexString
> + * FUNCTION:    AcpiDbUint32ToHexString
>   *
>   * PARAMETERS:  Value           - The value to be converted to string
>   *              Buffer          - Buffer for result (not less than 11 bytes)
> @@ -447,7 +447,7 @@ AcpiDbLocalNsLookup (
>   ******************************************************************************/
>
>  void
> -AcpiDbUInt32ToHexString (
> +AcpiDbUint32ToHexString (
>      UINT32                  Value,
>      char                    *Buffer)
>  {
> diff --git a/src/acpica/source/components/disassembler/dmopcode.c b/src/acpica/source/components/disassembler/dmopcode.c
> index ed457ed..252b1b8 100644
> --- a/src/acpica/source/components/disassembler/dmopcode.c
> +++ b/src/acpica/source/components/disassembler/dmopcode.c
> @@ -118,6 +118,7 @@
>  #include "acparser.h"
>  #include "amlcode.h"
>  #include "acdisasm.h"
> +#include "acnamesp.h"
>
>  #ifdef ACPI_DISASSEMBLER
>
> @@ -133,6 +134,218 @@ AcpiDmMatchKeyword (
>
>  /*******************************************************************************
>   *
> + * FUNCTION:    AcpiDmPredefinedDescription
> + *
> + * PARAMETERS:  Op              - Name() parse object
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Emit a description comment for a predefined ACPI name.
> + *              Used for iASL compiler only.
> + *
> + ******************************************************************************/
> +
> +void
> +AcpiDmPredefinedDescription (
> +    ACPI_PARSE_OBJECT       *Op)
> +{
> +#ifdef ACPI_ASL_COMPILER
> +    const AH_PREDEFINED_NAME    *Info;
> +    char                        *NameString;
> +    int                         LastCharIsDigit;
> +    int                         LastCharsAreHex;
> +
> +
> +    if (!Op)
> +    {
> +        return;
> +    }
> +
> +    /* Ensure that the comment field is emitted only once */
> +
> +    if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEF_CHECKED)
> +    {
> +        return;
> +    }
> +    Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEF_CHECKED;
> +
> +    /* Predefined name must start with an underscore */
> +
> +    NameString = ACPI_CAST_PTR (char, &Op->Named.Name);
> +    if (NameString[0] != '_')
> +    {
> +        return;
> +    }
> +
> +    /*
> +     * Check for the special ACPI names:
> +     * _ACd, _ALd, _EJd, _Exx, _Lxx, _Qxx, _Wxx, _T_a
> +     * (where d=decimal_digit, x=hex_digit, a=anything)
> +     *
> +     * Convert these to the generic name for table lookup.
> +     * Note: NameString is guaranteed to be upper case here.
> +     */
> +    LastCharIsDigit =
> +        (ACPI_IS_DIGIT (NameString[3]));    /* d */
> +    LastCharsAreHex =
> +        (ACPI_IS_XDIGIT (NameString[2]) &&  /* xx */
> +         ACPI_IS_XDIGIT (NameString[3]));
> +
> +    switch (NameString[1])
> +    {
> +    case 'A':
> +        if ((NameString[2] == 'C') && (LastCharIsDigit))
> +        {
> +            NameString = "_ACx";
> +        }
> +        else if ((NameString[2] == 'L') && (LastCharIsDigit))
> +        {
> +            NameString = "_ALx";
> +        }
> +        break;
> +
> +    case 'E':
> +        if ((NameString[2] == 'J') && (LastCharIsDigit))
> +        {
> +            NameString = "_EJx";
> +        }
> +        else if (LastCharsAreHex)
> +        {
> +            NameString = "_Exx";
> +        }
> +        break;
> +
> +    case 'L':
> +        if (LastCharsAreHex)
> +        {
> +            NameString = "_Lxx";
> +        }
> +        break;
> +
> +    case 'Q':
> +        if (LastCharsAreHex)
> +        {
> +            NameString = "_Qxx";
> +        }
> +        break;
> +
> +    case 'T':
> +        if (NameString[2] == '_')
> +        {
> +            NameString = "_T_x";
> +        }
> +        break;
> +
> +    case 'W':
> +        if (LastCharsAreHex)
> +        {
> +            NameString = "_Wxx";
> +        }
> +        break;
> +
> +    default:
> +        break;
> +    }
> +
> +    /* Match the name in the info table */
> +
> +    for (Info = AslPredefinedInfo; Info->Name; Info++)
> +    {
> +        if (ACPI_COMPARE_NAME (NameString, Info->Name))
> +        {
> +            AcpiOsPrintf ("  // %4.4s: %s",
> +                NameString, ACPI_CAST_PTR (char, Info->Description));
> +            return;
> +        }
> +    }
> +
> +#endif
> +    return;
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiDmFieldPredefinedDescription
> + *
> + * PARAMETERS:  Op              - Parse object
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Emit a description comment for a resource descriptor tag
> + *              (which is a predefined ACPI name.) Used for iASL compiler only.
> + *
> + ******************************************************************************/
> +
> +void
> +AcpiDmFieldPredefinedDescription (
> +    ACPI_PARSE_OBJECT       *Op)
> +{
> +#ifdef ACPI_ASL_COMPILER
> +    ACPI_PARSE_OBJECT       *IndexOp;
> +    char                    *Tag;
> +    const ACPI_OPCODE_INFO  *OpInfo;
> +    const AH_PREDEFINED_NAME *Info;
> +
> +
> +    if (!Op)
> +    {
> +        return;
> +    }
> +
> +    /* Ensure that the comment field is emitted only once */
> +
> +    if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEF_CHECKED)
> +    {
> +        return;
> +    }
> +    Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEF_CHECKED;
> +
> +    /*
> +     * Op must be one of the Create* operators: CreateField, CreateBitField,
> +     * CreateByteField, CreateWordField, CreateDwordField, CreateQwordField
> +     */
> +    OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
> +    if (!(OpInfo->Flags & AML_CREATE))
> +    {
> +        return;
> +    }
> +
> +    /* Second argument is the Index argument */
> +
> +    IndexOp = Op->Common.Value.Arg;
> +    IndexOp = IndexOp->Common.Next;
> +
> +    /* Index argument must be a namepath */
> +
> +    if (IndexOp->Common.AmlOpcode != AML_INT_NAMEPATH_OP)
> +    {
> +        return;
> +    }
> +
> +    /* Major cheat: We previously put the Tag ptr in the Node field */
> +
> +    Tag = ACPI_CAST_PTR (char, IndexOp->Common.Node);
> +
> +    /* Match the name in the info table */
> +
> +    for (Info = AslPredefinedInfo; Info->Name; Info++)
> +    {
> +        if (ACPI_COMPARE_NAME (Tag, Info->Name))
> +        {
> +            AcpiOsPrintf ("  // %4.4s: %s", Tag,
> +                ACPI_CAST_PTR (char, Info->Description));
> +            return;
> +        }
> +    }
> +
> +#endif
> +    return;
> +}
> +
> +
> +/*******************************************************************************
> + *
>   * FUNCTION:    AcpiDmMethodFlags
>   *
>   * PARAMETERS:  Op              - Method Object to be examined
> diff --git a/src/acpica/source/components/disassembler/dmwalk.c b/src/acpica/source/components/disassembler/dmwalk.c
> index 2bec308..dd655d8 100644
> --- a/src/acpica/source/components/disassembler/dmwalk.c
> +++ b/src/acpica/source/components/disassembler/dmwalk.c
> @@ -525,7 +525,7 @@ AcpiDmDescendingOp (
>       * keep track of the current column.
>       */
>      Info->Count++;
> -    if (Info->Count /*+Info->LastLevel*/ > 10)
> +    if (Info->Count /* +Info->LastLevel */ > 10)
>      {
>          Info->Count = 0;
>          AcpiOsPrintf ("\n");
> @@ -605,6 +605,10 @@ AcpiDmDescendingOp (
>
>                  AcpiDmMethodFlags (Op);
>                  AcpiOsPrintf (")");
> +
> +                /* Emit description comment for Method() with a predefined ACPI name */
> +
> +                AcpiDmPredefinedDescription (Op);
>                  break;
>
>
> @@ -675,7 +679,8 @@ AcpiDmDescendingOp (
>
>              default:
>
> -                AcpiOsPrintf ("*** Unhandled named opcode %X\n", Op->Common.AmlOpcode);
> +                AcpiOsPrintf ("*** Unhandled named opcode %X\n",
> +                    Op->Common.AmlOpcode);
>                  break;
>              }
>          }
> @@ -716,7 +721,8 @@ AcpiDmDescendingOp (
>                  NextOp = NextOp->Common.Next;
>
>                  Info->Flags = ACPI_PARSEOP_PARAMLIST;
> -                AcpiDmWalkParseTree (NextOp, AcpiDmDescendingOp, AcpiDmAscendingOp, Info);
> +                AcpiDmWalkParseTree (NextOp, AcpiDmDescendingOp,
> +                    AcpiDmAscendingOp, Info);
>                  Info->Flags = 0;
>                  Info->Level = Level;
>
> @@ -758,12 +764,18 @@ AcpiDmDescendingOp (
>              if (Op->Common.DisasmOpcode == ACPI_DASM_RESOURCE)
>              {
>                  /*
> -                 * We have a resource list.  Don't need to output
> -                 * the buffer size Op.  Open up a new block
> +                 * We have a resource list. Don't need to output
> +                 * the buffer size Op. Open up a new block
>                   */
>                  NextOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
>                  NextOp = NextOp->Common.Next;
> -                AcpiOsPrintf (")\n");
> +                AcpiOsPrintf (")");
> +
> +                /* Emit description comment for Name() with a predefined ACPI name */
> +
> +                AcpiDmPredefinedDescription (Op->Asl.Parent);
> +
> +                AcpiOsPrintf ("\n");
>                  AcpiDmIndent (Info->Level);
>                  AcpiOsPrintf ("{\n");
>                  return (AE_OK);
> @@ -791,7 +803,7 @@ AcpiDmDescendingOp (
>
>          case AML_PACKAGE_OP:
>
> -            /* The next op is the size or predicate parameter */
> +            /* The next op is the size parameter */
>
>              NextOp = AcpiPsGetDepthNext (NULL, Op);
>              if (NextOp)
> @@ -844,6 +856,7 @@ AcpiDmAscendingOp (
>      void                    *Context)
>  {
>      ACPI_OP_WALK_INFO       *Info = Context;
> +    ACPI_PARSE_OBJECT       *ParentOp;
>
>
>      if (Op->Common.DisasmFlags & ACPI_PARSEOP_IGNORE)
> @@ -869,6 +882,19 @@ AcpiDmAscendingOp (
>
>          AcpiOsPrintf (")");
>
> +        if (Op->Common.AmlOpcode == AML_NAME_OP)
> +        {
> +            /* Emit description comment for Name() with a predefined ACPI name */
> +
> +            AcpiDmPredefinedDescription (Op);
> +        }
> +        else
> +        {
> +            /* For Create* operators, attempt to emit resource tag description */
> +
> +            AcpiDmFieldPredefinedDescription (Op);
> +        }
> +
>          /* Could be a nested operator, check if comma required */
>
>          if (!AcpiDmCommaIfListMember (Op))
> @@ -983,7 +1009,20 @@ AcpiDmAscendingOp (
>           */
>          if (Op->Common.Next)
>          {
> -            AcpiOsPrintf (")\n");
> +            AcpiOsPrintf (")");
> +
> +            /* Emit description comment for Name() with a predefined ACPI name */
> +
> +            ParentOp = Op->Common.Parent;
> +            if (ParentOp)
> +            {
> +                ParentOp = ParentOp->Common.Parent;
> +                if (ParentOp && ParentOp->Asl.AmlOpcode == AML_NAME_OP)
> +                {
> +                    AcpiDmPredefinedDescription (ParentOp);
> +                }
> +            }
> +            AcpiOsPrintf ("\n");
>              AcpiDmIndent (Level - 1);
>              AcpiOsPrintf ("{\n");
>          }
> diff --git a/src/acpica/source/components/dispatcher/dsfield.c b/src/acpica/source/components/dispatcher/dsfield.c
> index 526d478..3047c5f 100644
> --- a/src/acpica/source/components/dispatcher/dsfield.c
> +++ b/src/acpica/source/components/dispatcher/dsfield.c
> @@ -129,6 +129,18 @@
>
>  /* Local prototypes */
>
> +#ifdef ACPI_ASL_COMPILER
> +#include "acdisasm.h"
> +
> +static ACPI_STATUS
> +AcpiDsCreateExternalRegion (
> +    ACPI_STATUS             LookupStatus,
> +    ACPI_PARSE_OBJECT       *Op,
> +    char                    *Path,
> +    ACPI_WALK_STATE         *WalkState,
> +    ACPI_NAMESPACE_NODE     **Node);
> +#endif
> +
>  static ACPI_STATUS
>  AcpiDsGetFieldNames (
>      ACPI_CREATE_FIELD_INFO  *Info,
> @@ -136,6 +148,69 @@ AcpiDsGetFieldNames (
>      ACPI_PARSE_OBJECT       *Arg);
>
>
> +#ifdef ACPI_ASL_COMPILER
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiDsCreateExternalRegion (iASL Disassembler only)
> + *
> + * PARAMETERS:  LookupStatus    - Status from NsLookup operation
> + *              Op              - Op containing the Field definition and args
> + *              Path            - Pathname of the region
> + *  `           WalkState       - Current method state
> + *              Node            - Where the new region node is returned
> + *
> + * RETURN:      Status
> + *
> + * DESCRIPTION: Add region to the external list if NOT_FOUND. Create a new
> + *              region node/object.
> + *
> + ******************************************************************************/
> +
> +static ACPI_STATUS
> +AcpiDsCreateExternalRegion (
> +    ACPI_STATUS             LookupStatus,
> +    ACPI_PARSE_OBJECT       *Op,
> +    char                    *Path,
> +    ACPI_WALK_STATE         *WalkState,
> +    ACPI_NAMESPACE_NODE     **Node)
> +{
> +    ACPI_STATUS             Status;
> +    ACPI_OPERAND_OBJECT     *ObjDesc;
> +
> +
> +    if (LookupStatus != AE_NOT_FOUND)
> +    {
> +        return (LookupStatus);
> +    }
> +
> +    /*
> +     * Table disassembly:
> +     * OperationRegion not found. Generate an External for it, and
> +     * insert the name into the namespace.
> +     */
> +    AcpiDmAddToExternalList (Op, Path, ACPI_TYPE_REGION, 0);
> +    Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_REGION,
> +       ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT, WalkState, Node);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        return (Status);
> +    }
> +
> +    /* Must create and install a region object for the new node */
> +
> +    ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION);
> +    if (!ObjDesc)
> +    {
> +        return (AE_NO_MEMORY);
> +    }
> +
> +    ObjDesc->Region.Node = *Node;
> +    Status = AcpiNsAttachObject (*Node, ObjDesc, ACPI_TYPE_REGION);
> +    return (Status);
> +}
> +#endif
> +
> +
>  /*******************************************************************************
>   *
>   * FUNCTION:    AcpiDsCreateBufferField
> @@ -149,8 +224,8 @@ AcpiDsGetFieldNames (
>   *              CreateBitFieldOp,
>   *              CreateByteFieldOp,
>   *              CreateWordFieldOp,
> - *              CreateDWordFieldOp,
> - *              CreateQWordFieldOp,
> + *              CreateDwordFieldOp,
> + *              CreateQwordFieldOp,
>   *              CreateFieldOp       (all of which define a field in a buffer)
>   *
>   ******************************************************************************/
> @@ -510,11 +585,16 @@ AcpiDsCreateField (
>      /* First arg is the name of the parent OpRegion (must already exist) */
>
>      Arg = Op->Common.Value.Arg;
> +
>      if (!RegionNode)
>      {
>          Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.Name,
>                          ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE,
>                          ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode);
> +#ifdef ACPI_ASL_COMPILER
> +        Status = AcpiDsCreateExternalRegion (Status, Arg,
> +            Arg->Common.Value.Name, WalkState, &RegionNode);
> +#endif
>          if (ACPI_FAILURE (Status))
>          {
>              ACPI_ERROR_NAMESPACE (Arg->Common.Value.Name, Status);
> @@ -700,6 +780,10 @@ AcpiDsCreateBankField (
>          Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.Name,
>                          ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE,
>                          ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode);
> +#ifdef ACPI_ASL_COMPILER
> +        Status = AcpiDsCreateExternalRegion (Status, Arg,
> +            Arg->Common.Value.Name, WalkState, &RegionNode);
> +#endif
>          if (ACPI_FAILURE (Status))
>          {
>              ACPI_ERROR_NAMESPACE (Arg->Common.Value.Name, Status);
> diff --git a/src/acpica/source/components/dispatcher/dsopcode.c b/src/acpica/source/components/dispatcher/dsopcode.c
> index 5da09bd..d6ddbfa 100644
> --- a/src/acpica/source/components/dispatcher/dsopcode.c
> +++ b/src/acpica/source/components/dispatcher/dsopcode.c
> @@ -595,18 +595,18 @@ AcpiDsEvalTableRegionOperands (
>
>
>      /*
> -     * This is where we evaluate the SignatureString and OemIDString
> -     * and OemTableIDString of the DataTableRegion declaration
> +     * This is where we evaluate the Signature string, OemId string,
> +     * and OemTableId string of the Data Table Region declaration
>       */
>      Node =  Op->Common.Node;
>
> -    /* NextOp points to SignatureString op */
> +    /* NextOp points to Signature string op */
>
>      NextOp = Op->Common.Value.Arg;
>
>      /*
> -     * Evaluate/create the SignatureString and OemIDString
> -     * and OemTableIDString operands
> +     * Evaluate/create the Signature string, OemId string,
> +     * and OemTableId string operands
>       */
>      Status = AcpiDsCreateOperands (WalkState, NextOp);
>      if (ACPI_FAILURE (Status))
> @@ -615,8 +615,8 @@ AcpiDsEvalTableRegionOperands (
>      }
>
>      /*
> -     * Resolve the SignatureString and OemIDString
> -     * and OemTableIDString operands
> +     * Resolve the Signature string, OemId string,
> +     * and OemTableId string operands
>       */
>      Status = AcpiExResolveOperands (Op->Common.AmlOpcode,
>                  ACPI_WALK_OPERANDS, WalkState);
> diff --git a/src/acpica/source/components/dispatcher/dswload.c b/src/acpica/source/components/dispatcher/dswload.c
> index 1f689d6..7a4a84f 100644
> --- a/src/acpica/source/components/dispatcher/dswload.c
> +++ b/src/acpica/source/components/dispatcher/dswload.c
> @@ -313,6 +313,20 @@ AcpiDsLoad1BeginOp (
>              WalkState->ScopeInfo->Common.Value = ACPI_TYPE_ANY;
>              break;
>
> +        case ACPI_TYPE_METHOD:
> +
> +            /*
> +             * Allow scope change to root during execution of module-level
> +             * code. Root is typed METHOD during this time.
> +             */
> +            if ((Node == AcpiGbl_RootNode) &&
> +                (WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL))
> +            {
> +                break;
> +            }
> +
> +            /*lint -fallthrough */
> +
>          default:
>
>              /* All other types are an error */
> diff --git a/src/acpica/source/components/dispatcher/dswload2.c b/src/acpica/source/components/dispatcher/dswload2.c
> index 85a86ec..139ff95 100644
> --- a/src/acpica/source/components/dispatcher/dswload2.c
> +++ b/src/acpica/source/components/dispatcher/dswload2.c
> @@ -315,6 +315,20 @@ AcpiDsLoad2BeginOp (
>              WalkState->ScopeInfo->Common.Value = ACPI_TYPE_ANY;
>              break;
>
> +        case ACPI_TYPE_METHOD:
> +
> +            /*
> +             * Allow scope change to root during execution of module-level
> +             * code. Root is typed METHOD during this time.
> +             */
> +            if ((Node == AcpiGbl_RootNode) &&
> +                (WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL))
> +            {
> +                break;
> +            }
> +
> +            /*lint -fallthrough */
> +
>          default:
>
>              /* All other types are an error */
> diff --git a/src/acpica/source/components/events/evgpe.c b/src/acpica/source/components/events/evgpe.c
> index de32275..bb72a6e 100644
> --- a/src/acpica/source/components/events/evgpe.c
> +++ b/src/acpica/source/components/events/evgpe.c
> @@ -590,6 +590,7 @@ AcpiEvAsynchExecuteGpeMethod (
>      ACPI_STATUS             Status;
>      ACPI_GPE_EVENT_INFO     *LocalGpeEventInfo;
>      ACPI_EVALUATE_INFO      *Info;
> +    ACPI_GPE_NOTIFY_INFO    *Notify;
>
>
>      ACPI_FUNCTION_TRACE (EvAsynchExecuteGpeMethod);
> @@ -645,10 +646,18 @@ AcpiEvAsynchExecuteGpeMethod (
>           * completes. The notify handlers are NOT invoked synchronously
>           * from this thread -- because handlers may in turn run other
>           * control methods.
> +         *
> +         * June 2012: Expand implicit notify mechanism to support
> +         * notifies on multiple device objects.
>           */
> -        Status = AcpiEvQueueNotifyRequest (
> -                    LocalGpeEventInfo->Dispatch.DeviceNode,
> -                    ACPI_NOTIFY_DEVICE_WAKE);
> +        Notify = LocalGpeEventInfo->Dispatch.NotifyList;
> +        while (ACPI_SUCCESS (Status) && Notify)
> +        {
> +            Status = AcpiEvQueueNotifyRequest (Notify->DeviceNode,
> +                        ACPI_NOTIFY_DEVICE_WAKE);
> +
> +            Notify = Notify->Next;
> +        }
>          break;
>
>      case ACPI_GPE_DISPATCH_METHOD:
> diff --git a/src/acpica/source/components/events/evgpeutil.c b/src/acpica/source/components/events/evgpeutil.c
> index a5ad320..38c7928 100644
> --- a/src/acpica/source/components/events/evgpeutil.c
> +++ b/src/acpica/source/components/events/evgpeutil.c
> @@ -463,6 +463,8 @@ AcpiEvDeleteGpeHandlers (
>      void                    *Context)
>  {
>      ACPI_GPE_EVENT_INFO     *GpeEventInfo;
> +    ACPI_GPE_NOTIFY_INFO    *Notify;
> +    ACPI_GPE_NOTIFY_INFO    *Next;
>      UINT32                  i;
>      UINT32                  j;
>
> @@ -484,10 +486,27 @@ AcpiEvDeleteGpeHandlers (
>              if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
>                      ACPI_GPE_DISPATCH_HANDLER)
>              {
> +                /* Delete an installed handler block */
> +
>                  ACPI_FREE (GpeEventInfo->Dispatch.Handler);
>                  GpeEventInfo->Dispatch.Handler = NULL;
>                  GpeEventInfo->Flags &= ~ACPI_GPE_DISPATCH_MASK;
>              }
> +            else if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
> +                    ACPI_GPE_DISPATCH_NOTIFY)
> +            {
> +                /* Delete the implicit notification device list */
> +
> +                Notify = GpeEventInfo->Dispatch.NotifyList;
> +                while (Notify)
> +                {
> +                    Next = Notify->Next;
> +                    ACPI_FREE (Notify);
> +                    Notify = Next;
> +                }
> +                GpeEventInfo->Dispatch.NotifyList = NULL;
> +                GpeEventInfo->Flags &= ~ACPI_GPE_DISPATCH_MASK;
> +            }
>          }
>      }
>
> diff --git a/src/acpica/source/components/events/evmisc.c b/src/acpica/source/components/events/evmisc.c
> index 7369daa..ae3cecd 100644
> --- a/src/acpica/source/components/events/evmisc.c
> +++ b/src/acpica/source/components/events/evmisc.c
> @@ -183,107 +183,82 @@ AcpiEvQueueNotifyRequest (
>      UINT32                  NotifyValue)
>  {
>      ACPI_OPERAND_OBJECT     *ObjDesc;
> -    ACPI_OPERAND_OBJECT     *HandlerObj = NULL;
> -    ACPI_GENERIC_STATE      *NotifyInfo;
> +    ACPI_OPERAND_OBJECT     *HandlerListHead = NULL;
> +    ACPI_GENERIC_STATE      *Info;
> +    UINT8                   HandlerListId = 0;
>      ACPI_STATUS             Status = AE_OK;
>
>
>      ACPI_FUNCTION_NAME (EvQueueNotifyRequest);
>
>
> -    /*
> -     * For value 0x03 (Ejection Request), may need to run a device method.
> -     * For value 0x02 (Device Wake), if _PRW exists, may need to run
> -     *   the _PS0 method.
> -     * For value 0x80 (Status Change) on the power button or sleep button,
> -     *   initiate soft-off or sleep operation.
> -     *
> -     * For all cases, simply dispatch the notify to the handler.
> -     */
> -    ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> -        "Dispatching Notify on [%4.4s] (%s) Value 0x%2.2X (%s) Node %p\n",
> -        AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type),
> -        NotifyValue, AcpiUtGetNotifyName (NotifyValue), Node));
> +    /* Are Notifies allowed on this object? */
>
> -    /* Get the notify object attached to the NS Node */
> -
> -    ObjDesc = AcpiNsGetAttachedObject (Node);
> -    if (ObjDesc)
> +    if (!AcpiEvIsNotifyObject (Node))
>      {
> -        /* We have the notify object, Get the correct handler */
> -
> -        switch (Node->Type)
> -        {
> -        /* Notify is allowed only on these types */
> +        return (AE_TYPE);
> +    }
>
> -        case ACPI_TYPE_DEVICE:
> -        case ACPI_TYPE_THERMAL:
> -        case ACPI_TYPE_PROCESSOR:
> +    /* Get the correct notify list type (System or Device) */
>
> -            if (NotifyValue <= ACPI_MAX_SYS_NOTIFY)
> -            {
> -                HandlerObj = ObjDesc->CommonNotify.SystemNotify;
> -            }
> -            else
> -            {
> -                HandlerObj = ObjDesc->CommonNotify.DeviceNotify;
> -            }
> -            break;
> +    if (NotifyValue <= ACPI_MAX_SYS_NOTIFY)
> +    {
> +        HandlerListId = ACPI_SYSTEM_HANDLER_LIST;
> +    }
> +    else
> +    {
> +        HandlerListId = ACPI_DEVICE_HANDLER_LIST;
> +    }
>
> -        default:
> +    /* Get the notify object attached to the namespace Node */
>
> -            /* All other types are not supported */
> +    ObjDesc = AcpiNsGetAttachedObject (Node);
> +    if (ObjDesc)
> +    {
> +        /* We have an attached object, Get the correct handler list */
>
> -            return (AE_TYPE);
> -        }
> +        HandlerListHead = ObjDesc->CommonNotify.NotifyList[HandlerListId];
>      }
>
>      /*
> -     * If there is a handler to run, schedule the dispatcher.
> -     * Check for:
> -     * 1) Global system notify handler
> -     * 2) Global device notify handler
> -     * 3) Per-device notify handler
> +     * If there is no notify handler (Global or Local)
> +     * for this object, just ignore the notify
>       */
> -    if ((AcpiGbl_SystemNotify.Handler &&
> -            (NotifyValue <= ACPI_MAX_SYS_NOTIFY)) ||
> -        (AcpiGbl_DeviceNotify.Handler &&
> -            (NotifyValue > ACPI_MAX_SYS_NOTIFY))  ||
> -        HandlerObj)
> +    if (!AcpiGbl_GlobalNotify[HandlerListId].Handler && !HandlerListHead)
>      {
> -        NotifyInfo = AcpiUtCreateGenericState ();
> -        if (!NotifyInfo)
> -        {
> -            return (AE_NO_MEMORY);
> -        }
> +        ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> +            "No notify handler for Notify, ignoring (%4.4s, %X) node %p\n",
> +            AcpiUtGetNodeName (Node), NotifyValue, Node));
>
> -        if (!HandlerObj)
> -        {
> -            ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> -                "Executing system notify handler for Notify (%4.4s, %X) "
> -                "node %p\n",
> -                AcpiUtGetNodeName (Node), NotifyValue, Node));
> -        }
> +        return (AE_OK);
> +    }
>
> -        NotifyInfo->Common.DescriptorType = ACPI_DESC_TYPE_STATE_NOTIFY;
> -        NotifyInfo->Notify.Node = Node;
> -        NotifyInfo->Notify.Value = (UINT16) NotifyValue;
> -        NotifyInfo->Notify.HandlerObj = HandlerObj;
> +    /* Setup notify info and schedule the notify dispatcher */
>
> -        Status = AcpiOsExecute (
> -                    OSL_NOTIFY_HANDLER, AcpiEvNotifyDispatch, NotifyInfo);
> -        if (ACPI_FAILURE (Status))
> -        {
> -            AcpiUtDeleteGenericState (NotifyInfo);
> -        }
> -    }
> -    else
> +    Info = AcpiUtCreateGenericState ();
> +    if (!Info)
>      {
> -        /* There is no notify handler (per-device or system) for this device */
> +        return (AE_NO_MEMORY);
> +    }
>
> -        ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> -            "No notify handler for Notify (%4.4s, %X) node %p\n",
> -            AcpiUtGetNodeName (Node), NotifyValue, Node));
> +    Info->Common.DescriptorType = ACPI_DESC_TYPE_STATE_NOTIFY;
> +
> +    Info->Notify.Node = Node;
> +    Info->Notify.Value = (UINT16) NotifyValue;
> +    Info->Notify.HandlerListId = HandlerListId;
> +    Info->Notify.HandlerListHead = HandlerListHead;
> +    Info->Notify.Global = &AcpiGbl_GlobalNotify[HandlerListId];
> +
> +    ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> +        "Dispatching Notify on [%4.4s] (%s) Value 0x%2.2X (%s) Node %p\n",
> +        AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type),
> +        NotifyValue, AcpiUtGetNotifyName (NotifyValue), Node));
> +
> +    Status = AcpiOsExecute (OSL_NOTIFY_HANDLER, AcpiEvNotifyDispatch,
> +        Info);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        AcpiUtDeleteGenericState (Info);
>      }
>
>      return (Status);
> @@ -307,61 +282,37 @@ static void ACPI_SYSTEM_XFACE
>  AcpiEvNotifyDispatch (
>      void                    *Context)
>  {
> -    ACPI_GENERIC_STATE      *NotifyInfo = (ACPI_GENERIC_STATE *) Context;
> -    ACPI_NOTIFY_HANDLER     GlobalHandler = NULL;
> -    void                    *GlobalContext = NULL;
> +    ACPI_GENERIC_STATE      *Info = (ACPI_GENERIC_STATE *) Context;
>      ACPI_OPERAND_OBJECT     *HandlerObj;
>
>
>      ACPI_FUNCTION_ENTRY ();
>
>
> -    /*
> -     * We will invoke a global notify handler if installed. This is done
> -     * _before_ we invoke the per-device handler attached to the device.
> -     */
> -    if (NotifyInfo->Notify.Value <= ACPI_MAX_SYS_NOTIFY)
> -    {
> -        /* Global system notification handler */
> +    /* Invoke a global notify handler if installed */
>
> -        if (AcpiGbl_SystemNotify.Handler)
> -        {
> -            GlobalHandler = AcpiGbl_SystemNotify.Handler;
> -            GlobalContext = AcpiGbl_SystemNotify.Context;
> -        }
> -    }
> -    else
> +    if (Info->Notify.Global->Handler)
>      {
> -        /* Global driver notification handler */
> -
> -        if (AcpiGbl_DeviceNotify.Handler)
> -        {
> -            GlobalHandler = AcpiGbl_DeviceNotify.Handler;
> -            GlobalContext = AcpiGbl_DeviceNotify.Context;
> -        }
> +        Info->Notify.Global->Handler (Info->Notify.Node,
> +            Info->Notify.Value,
> +            Info->Notify.Global->Context);
>      }
>
> -    /* Invoke the system handler first, if present */
> +    /* Now invoke the local notify handler(s) if any are installed */
>
> -    if (GlobalHandler)
> +    HandlerObj = Info->Notify.HandlerListHead;
> +    while (HandlerObj)
>      {
> -        GlobalHandler (NotifyInfo->Notify.Node, NotifyInfo->Notify.Value,
> -            GlobalContext);
> -    }
> -
> -    /* Now invoke the per-device handler, if present */
> -
> -    HandlerObj = NotifyInfo->Notify.HandlerObj;
> -    if (HandlerObj)
> -    {
> -        HandlerObj->Notify.Handler (NotifyInfo->Notify.Node,
> -            NotifyInfo->Notify.Value,
> +        HandlerObj->Notify.Handler (Info->Notify.Node,
> +            Info->Notify.Value,
>              HandlerObj->Notify.Context);
> +
> +        HandlerObj = HandlerObj->Notify.Next[Info->Notify.HandlerListId];
>      }
>
>      /* All done with the info object */
>
> -    AcpiUtDeleteGenericState (NotifyInfo);
> +    AcpiUtDeleteGenericState (Info);
>  }
>
>
> diff --git a/src/acpica/source/components/events/evxface.c b/src/acpica/source/components/events/evxface.c
> index a6aea09..b0c5ce3 100644
> --- a/src/acpica/source/components/events/evxface.c
> +++ b/src/acpica/source/components/events/evxface.c
> @@ -132,15 +132,21 @@
>   *
>   * PARAMETERS:  Device          - The device for which notifies will be handled
>   *              HandlerType     - The type of handler:
> - *                                  ACPI_SYSTEM_NOTIFY: SystemHandler (00-7f)
> - *                                  ACPI_DEVICE_NOTIFY: DriverHandler (80-ff)
> - *                                  ACPI_ALL_NOTIFY:  both system and device
> + *                                  ACPI_SYSTEM_NOTIFY: System Handler (00-7F)
> + *                                  ACPI_DEVICE_NOTIFY: Device Handler (80-FF)
> + *                                  ACPI_ALL_NOTIFY:    Both System and Device
>   *              Handler         - Address of the handler
>   *              Context         - Value passed to the handler on each GPE
>   *
>   * RETURN:      Status
>   *
> - * DESCRIPTION: Install a handler for notifies on an ACPI device
> + * DESCRIPTION: Install a handler for notifications on an ACPI Device,
> + *              ThermalZone, or Processor object.
> + *
> + * NOTES:       The Root namespace object may have only one handler for each
> + *              type of notify (System/Device). Device/Thermal/Processor objects
> + *              may have one device notify handler, and multiple system notify
> + *              handlers.
>   *
>   ******************************************************************************/
>
> @@ -151,10 +157,11 @@ AcpiInstallNotifyHandler (
>      ACPI_NOTIFY_HANDLER     Handler,
>      void                    *Context)
>  {
> +    ACPI_NAMESPACE_NODE     *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Device);
>      ACPI_OPERAND_OBJECT     *ObjDesc;
> -    ACPI_OPERAND_OBJECT     *NotifyObj;
> -    ACPI_NAMESPACE_NODE     *Node;
> +    ACPI_OPERAND_OBJECT     *HandlerObj;
>      ACPI_STATUS             Status;
> +    UINT32                  i;
>
>
>      ACPI_FUNCTION_TRACE (AcpiInstallNotifyHandler);
> @@ -162,8 +169,7 @@ AcpiInstallNotifyHandler (
>
>      /* Parameter validation */
>
> -    if ((!Device)  ||
> -        (!Handler) ||
> +    if ((!Device) || (!Handler) || (!HandlerType) ||
>          (HandlerType > ACPI_MAX_NOTIFY_HANDLER_TYPE))
>      {
>          return_ACPI_STATUS (AE_BAD_PARAMETER);
> @@ -175,135 +181,124 @@ AcpiInstallNotifyHandler (
>          return_ACPI_STATUS (Status);
>      }
>
> -    /* Convert and validate the device handle */
> -
> -    Node = AcpiNsValidateHandle (Device);
> -    if (!Node)
> -    {
> -        Status = AE_BAD_PARAMETER;
> -        goto UnlockAndExit;
> -    }
> -
>      /*
>       * Root Object:
>       * Registering a notify handler on the root object indicates that the
>       * caller wishes to receive notifications for all objects. Note that
> -     * only one <external> global handler can be regsitered (per notify type).
> +     * only one global handler can be registered per notify type.
> +     * Ensure that a handler is not already installed.
>       */
>      if (Device == ACPI_ROOT_OBJECT)
>      {
> -        /* Make sure the handler is not already installed */
> -
> -        if (((HandlerType & ACPI_SYSTEM_NOTIFY) &&
> -                AcpiGbl_SystemNotify.Handler)       ||
> -            ((HandlerType & ACPI_DEVICE_NOTIFY) &&
> -                AcpiGbl_DeviceNotify.Handler))
> -        {
> -            Status = AE_ALREADY_EXISTS;
> -            goto UnlockAndExit;
> -        }
> -
> -        if (HandlerType & ACPI_SYSTEM_NOTIFY)
> -        {
> -            AcpiGbl_SystemNotify.Node    = Node;
> -            AcpiGbl_SystemNotify.Handler = Handler;
> -            AcpiGbl_SystemNotify.Context = Context;
> -        }
> -
> -        if (HandlerType & ACPI_DEVICE_NOTIFY)
> +        for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
>          {
> -            AcpiGbl_DeviceNotify.Node    = Node;
> -            AcpiGbl_DeviceNotify.Handler = Handler;
> -            AcpiGbl_DeviceNotify.Context = Context;
> +            if (HandlerType & (i+1))
> +            {
> +                if (AcpiGbl_GlobalNotify[i].Handler)
> +                {
> +                    Status = AE_ALREADY_EXISTS;
> +                    goto UnlockAndExit;
> +                }
> +
> +                AcpiGbl_GlobalNotify[i].Handler = Handler;
> +                AcpiGbl_GlobalNotify[i].Context = Context;
> +            }
>          }
>
> -        /* Global notify handler installed */
> +        goto UnlockAndExit; /* Global notify handler installed, all done */
>      }
>
>      /*
>       * All Other Objects:
> -     * Caller will only receive notifications specific to the target object.
> -     * Note that only certain object types can receive notifications.
> +     * Caller will only receive notifications specific to the target
> +     * object. Note that only certain object types are allowed to
> +     * receive notifications.
>       */
> -    else
> +
> +    /* Are Notifies allowed on this object? */
> +
> +    if (!AcpiEvIsNotifyObject (Node))
> +    {
> +        Status = AE_TYPE;
> +        goto UnlockAndExit;
> +    }
> +
> +    /* Check for an existing internal object, might not exist */
> +
> +    ObjDesc = AcpiNsGetAttachedObject (Node);
> +    if (!ObjDesc)
>      {
> -        /* Notifies allowed on this object? */
> +        /* Create a new object */
>
> -        if (!AcpiEvIsNotifyObject (Node))
> +        ObjDesc = AcpiUtCreateInternalObject (Node->Type);
> +        if (!ObjDesc)
>          {
> -            Status = AE_TYPE;
> +            Status = AE_NO_MEMORY;
>              goto UnlockAndExit;
>          }
>
> -        /* Check for an existing internal object */
> +        /* Attach new object to the Node, remove local reference */
>
> -        ObjDesc = AcpiNsGetAttachedObject (Node);
> -        if (ObjDesc)
> +        Status = AcpiNsAttachObject (Device, ObjDesc, Node->Type);
> +        AcpiUtRemoveReference (ObjDesc);
> +        if (ACPI_FAILURE (Status))
>          {
> -            /* Object exists - make sure there's no handler */
> -
> -            if (((HandlerType & ACPI_SYSTEM_NOTIFY) &&
> -                    ObjDesc->CommonNotify.SystemNotify)   ||
> -                ((HandlerType & ACPI_DEVICE_NOTIFY) &&
> -                    ObjDesc->CommonNotify.DeviceNotify))
> -            {
> -                Status = AE_ALREADY_EXISTS;
> -                goto UnlockAndExit;
> -            }
> +            goto UnlockAndExit;
>          }
> -        else
> -        {
> -            /* Create a new object */
> -
> -            ObjDesc = AcpiUtCreateInternalObject (Node->Type);
> -            if (!ObjDesc)
> -            {
> -                Status = AE_NO_MEMORY;
> -                goto UnlockAndExit;
> -            }
> -
> -            /* Attach new object to the Node */
> -
> -            Status = AcpiNsAttachObject (Device, ObjDesc, Node->Type);
> +    }
>
> -            /* Remove local reference to the object */
> +    /* Ensure that the handler is not already installed in the lists */
>
> -            AcpiUtRemoveReference (ObjDesc);
> -            if (ACPI_FAILURE (Status))
> +    for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
> +    {
> +        if (HandlerType & (i+1))
> +        {
> +            HandlerObj = ObjDesc->CommonNotify.NotifyList[i];
> +            while (HandlerObj)
>              {
> -                goto UnlockAndExit;
> +                if (HandlerObj->Notify.Handler == Handler)
> +                {
> +                    Status = AE_ALREADY_EXISTS;
> +                    goto UnlockAndExit;
> +                }
> +
> +                HandlerObj = HandlerObj->Notify.Next[i];
>              }
>          }
> +    }
>
> -        /* Install the handler */
> +    /* Create and populate a new notify handler object */
>
> -        NotifyObj = AcpiUtCreateInternalObject (ACPI_TYPE_LOCAL_NOTIFY);
> -        if (!NotifyObj)
> -        {
> -            Status = AE_NO_MEMORY;
> -            goto UnlockAndExit;
> -        }
> +    HandlerObj = AcpiUtCreateInternalObject (ACPI_TYPE_LOCAL_NOTIFY);
> +    if (!HandlerObj)
> +    {
> +        Status = AE_NO_MEMORY;
> +        goto UnlockAndExit;
> +    }
>
> -        NotifyObj->Notify.Node    = Node;
> -        NotifyObj->Notify.Handler = Handler;
> -        NotifyObj->Notify.Context = Context;
> +    HandlerObj->Notify.Node = Node;
> +    HandlerObj->Notify.HandlerType = HandlerType;
> +    HandlerObj->Notify.Handler = Handler;
> +    HandlerObj->Notify.Context = Context;
>
> -        if (HandlerType & ACPI_SYSTEM_NOTIFY)
> -        {
> -            ObjDesc->CommonNotify.SystemNotify = NotifyObj;
> -        }
> +    /* Install the handler at the list head(s) */
>
> -        if (HandlerType & ACPI_DEVICE_NOTIFY)
> +    for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
> +    {
> +        if (HandlerType & (i+1))
>          {
> -            ObjDesc->CommonNotify.DeviceNotify = NotifyObj;
> +            HandlerObj->Notify.Next[i] =
> +                ObjDesc->CommonNotify.NotifyList[i];
> +
> +            ObjDesc->CommonNotify.NotifyList[i] = HandlerObj;
>          }
> +    }
>
> -        if (HandlerType == ACPI_ALL_NOTIFY)
> -        {
> -            /* Extra ref if installed in both */
> +    /* Add an extra reference if handler was installed in both lists */
>
> -            AcpiUtAddReference (NotifyObj);
> -        }
> +    if (HandlerType == ACPI_ALL_NOTIFY)
> +    {
> +        AcpiUtAddReference (HandlerObj);
>      }
>
>
> @@ -319,11 +314,11 @@ ACPI_EXPORT_SYMBOL (AcpiInstallNotifyHandler)
>   *
>   * FUNCTION:    AcpiRemoveNotifyHandler
>   *
> - * PARAMETERS:  Device          - The device for which notifies will be handled
> + * PARAMETERS:  Device          - The device for which the handler is installed
>   *              HandlerType     - The type of handler:
> - *                                  ACPI_SYSTEM_NOTIFY: SystemHandler (00-7f)
> - *                                  ACPI_DEVICE_NOTIFY: DriverHandler (80-ff)
> - *                                  ACPI_ALL_NOTIFY:  both system and device
> + *                                  ACPI_SYSTEM_NOTIFY: System Handler (00-7F)
> + *                                  ACPI_DEVICE_NOTIFY: Device Handler (80-FF)
> + *                                  ACPI_ALL_NOTIFY:    Both System and Device
>   *              Handler         - Address of the handler
>   *
>   * RETURN:      Status
> @@ -338,10 +333,12 @@ AcpiRemoveNotifyHandler (
>      UINT32                  HandlerType,
>      ACPI_NOTIFY_HANDLER     Handler)
>  {
> -    ACPI_OPERAND_OBJECT     *NotifyObj;
> +    ACPI_NAMESPACE_NODE     *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Device);
>      ACPI_OPERAND_OBJECT     *ObjDesc;
> -    ACPI_NAMESPACE_NODE     *Node;
> +    ACPI_OPERAND_OBJECT     *HandlerObj;
> +    ACPI_OPERAND_OBJECT     *PreviousHandlerObj;
>      ACPI_STATUS             Status;
> +    UINT32                  i;
>
>
>      ACPI_FUNCTION_TRACE (AcpiRemoveNotifyHandler);
> @@ -349,122 +346,103 @@ AcpiRemoveNotifyHandler (
>
>      /* Parameter validation */
>
> -    if ((!Device)  ||
> -        (!Handler) ||
> +    if ((!Device) || (!Handler) || (!HandlerType) ||
>          (HandlerType > ACPI_MAX_NOTIFY_HANDLER_TYPE))
>      {
>          return_ACPI_STATUS (AE_BAD_PARAMETER);
>      }
>
> +    /* Make sure all deferred notify tasks are completed */
> +
> +    AcpiOsWaitEventsComplete ();
> +
>      Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
>      if (ACPI_FAILURE (Status))
>      {
>          return_ACPI_STATUS (Status);
>      }
>
> -    /* Convert and validate the device handle */
> -
> -    Node = AcpiNsValidateHandle (Device);
> -    if (!Node)
> -    {
> -        Status = AE_BAD_PARAMETER;
> -        goto UnlockAndExit;
> -    }
> -
> -    /* Root Object */
> +    /* Root Object. Global handlers are removed here */
>
>      if (Device == ACPI_ROOT_OBJECT)
>      {
> -        ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> -            "Removing notify handler for namespace root object\n"));
> -
> -        if (((HandlerType & ACPI_SYSTEM_NOTIFY) &&
> -              !AcpiGbl_SystemNotify.Handler)        ||
> -            ((HandlerType & ACPI_DEVICE_NOTIFY) &&
> -              !AcpiGbl_DeviceNotify.Handler))
> -        {
> -            Status = AE_NOT_EXIST;
> -            goto UnlockAndExit;
> -        }
> -
> -        if (HandlerType & ACPI_SYSTEM_NOTIFY)
> +        for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
>          {
> -            AcpiGbl_SystemNotify.Node    = NULL;
> -            AcpiGbl_SystemNotify.Handler = NULL;
> -            AcpiGbl_SystemNotify.Context = NULL;
> +            if (HandlerType & (i+1))
> +            {
> +                if (!AcpiGbl_GlobalNotify[i].Handler ||
> +                    (AcpiGbl_GlobalNotify[i].Handler != Handler))
> +                {
> +                    Status = AE_NOT_EXIST;
> +                    goto UnlockAndExit;
> +                }
> +
> +                ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> +                    "Removing global notify handler\n"));
> +
> +                AcpiGbl_GlobalNotify[i].Handler = NULL;
> +                AcpiGbl_GlobalNotify[i].Context = NULL;
> +            }
>          }
>
> -        if (HandlerType & ACPI_DEVICE_NOTIFY)
> -        {
> -            AcpiGbl_DeviceNotify.Node    = NULL;
> -            AcpiGbl_DeviceNotify.Handler = NULL;
> -            AcpiGbl_DeviceNotify.Context = NULL;
> -        }
> +        goto UnlockAndExit;
>      }
>
> -    /* All Other Objects */
> +    /* All other objects: Are Notifies allowed on this object? */
>
> -    else
> +    if (!AcpiEvIsNotifyObject (Node))
>      {
> -        /* Notifies allowed on this object? */
> +        Status = AE_TYPE;
> +        goto UnlockAndExit;
> +    }
>
> -        if (!AcpiEvIsNotifyObject (Node))
> -        {
> -            Status = AE_TYPE;
> -            goto UnlockAndExit;
> -        }
> +    /* Must have an existing internal object */
> +
> +    ObjDesc = AcpiNsGetAttachedObject (Node);
> +    if (!ObjDesc)
> +    {
> +        Status = AE_NOT_EXIST;
> +        goto UnlockAndExit;
> +    }
>
> -        /* Check for an existing internal object */
> +    /* Internal object exists. Find the handler and remove it */
>
> -        ObjDesc = AcpiNsGetAttachedObject (Node);
> -        if (!ObjDesc)
> +    for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
> +    {
> +        if (HandlerType & (i+1))
>          {
> -            Status = AE_NOT_EXIST;
> -            goto UnlockAndExit;
> -        }
> +            HandlerObj = ObjDesc->CommonNotify.NotifyList[i];
> +            PreviousHandlerObj = NULL;
>
> -        /* Object exists - make sure there's an existing handler */
> +            /* Attempt to find the handler in the handler list */
>
> -        if (HandlerType & ACPI_SYSTEM_NOTIFY)
> -        {
> -            NotifyObj = ObjDesc->CommonNotify.SystemNotify;
> -            if (!NotifyObj)
> +            while (HandlerObj &&
> +                  (HandlerObj->Notify.Handler != Handler))
>              {
> -                Status = AE_NOT_EXIST;
> -                goto UnlockAndExit;
> +                PreviousHandlerObj = HandlerObj;
> +                HandlerObj = HandlerObj->Notify.Next[i];
>              }
>
> -            if (NotifyObj->Notify.Handler != Handler)
> +            if (!HandlerObj)
>              {
> -                Status = AE_BAD_PARAMETER;
> +                Status = AE_NOT_EXIST;
>                  goto UnlockAndExit;
>              }
>
> -            /* Remove the handler */
> +            /* Remove the handler object from the list */
>
> -            ObjDesc->CommonNotify.SystemNotify = NULL;
> -            AcpiUtRemoveReference (NotifyObj);
> -        }
> -
> -        if (HandlerType & ACPI_DEVICE_NOTIFY)
> -        {
> -            NotifyObj = ObjDesc->CommonNotify.DeviceNotify;
> -            if (!NotifyObj)
> +            if (PreviousHandlerObj) /* Handler is not at the list head */
>              {
> -                Status = AE_NOT_EXIST;
> -                goto UnlockAndExit;
> +                PreviousHandlerObj->Notify.Next[i] =
> +                    HandlerObj->Notify.Next[i];
>              }
> -
> -            if (NotifyObj->Notify.Handler != Handler)
> +            else /* Handler is at the list head */
>              {
> -                Status = AE_BAD_PARAMETER;
> -                goto UnlockAndExit;
> +                ObjDesc->CommonNotify.NotifyList[i] =
> +                    HandlerObj->Notify.Next[i];
>              }
>
> -            /* Remove the handler */
> -
> -            ObjDesc->CommonNotify.DeviceNotify = NULL;
> -            AcpiUtRemoveReference (NotifyObj);
> +            AcpiUtRemoveReference (HandlerObj);
>          }
>      }
>
> @@ -894,6 +872,10 @@ AcpiRemoveGpeHandler (
>          return_ACPI_STATUS (AE_BAD_PARAMETER);
>      }
>
> +    /* Make sure all deferred GPE tasks are completed */
> +
> +    AcpiOsWaitEventsComplete ();
> +
>      Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
>      if (ACPI_FAILURE (Status))
>      {
> diff --git a/src/acpica/source/components/events/evxfgpe.c b/src/acpica/source/components/events/evxfgpe.c
> index 7018513..29e1d68 100644
> --- a/src/acpica/source/components/events/evxfgpe.c
> +++ b/src/acpica/source/components/events/evxfgpe.c
> @@ -155,7 +155,7 @@ AcpiUpdateAllGpes (
>      ACPI_STATUS             Status;
>
>
> -    ACPI_FUNCTION_TRACE (AcpiUpdateGpes);
> +    ACPI_FUNCTION_TRACE (AcpiUpdateAllGpes);
>
>
>      Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
> @@ -367,9 +367,11 @@ AcpiSetupGpeForWake (
>      ACPI_HANDLE             GpeDevice,
>      UINT32                  GpeNumber)
>  {
> -    ACPI_STATUS             Status = AE_BAD_PARAMETER;
> +    ACPI_STATUS             Status;
>      ACPI_GPE_EVENT_INFO     *GpeEventInfo;
>      ACPI_NAMESPACE_NODE     *DeviceNode;
> +    ACPI_GPE_NOTIFY_INFO    *Notify;
> +    ACPI_GPE_NOTIFY_INFO    *NewNotify;
>      ACPI_CPU_FLAGS          Flags;
>
>
> @@ -405,32 +407,88 @@ AcpiSetupGpeForWake (
>          return_ACPI_STATUS (AE_BAD_PARAMETER);
>      }
>
> +    /*
> +     * Allocate a new notify object up front, in case it is needed.
> +     * Memory allocation while holding a spinlock is a big no-no
> +     * on some hosts.
> +     */
> +    NewNotify = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_GPE_NOTIFY_INFO));
> +    if (!NewNotify)
> +    {
> +        return_ACPI_STATUS (AE_NO_MEMORY);
> +    }
> +
>      Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
>
>      /* Ensure that we have a valid GPE number */
>
>      GpeEventInfo = AcpiEvGetGpeEventInfo (GpeDevice, GpeNumber);
> -    if (GpeEventInfo)
> +    if (!GpeEventInfo)
> +    {
> +        Status = AE_BAD_PARAMETER;
> +        goto UnlockAndExit;
> +    }
> +
> +    /*
> +     * If there is no method or handler for this GPE, then the
> +     * WakeDevice will be notified whenever this GPE fires. This is
> +     * known as an "implicit notify". Note: The GPE is assumed to be
> +     * level-triggered (for windows compatibility).
> +     */
> +    if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
> +            ACPI_GPE_DISPATCH_NONE)
>      {
>          /*
> -         * If there is no method or handler for this GPE, then the
> -         * WakeDevice will be notified whenever this GPE fires (aka
> -         * "implicit notify") Note: The GPE is assumed to be
> -         * level-triggered (for windows compatibility).
> +         * This is the first device for implicit notify on this GPE.
> +         * Just set the flags here, and enter the NOTIFY block below.
>           */
> -        if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
> -                ACPI_GPE_DISPATCH_NONE)
> +        GpeEventInfo->Flags =
> +            (ACPI_GPE_DISPATCH_NOTIFY | ACPI_GPE_LEVEL_TRIGGERED);
> +    }
> +
> +    /*
> +     * If we already have an implicit notify on this GPE, add
> +     * this device to the notify list.
> +     */
> +    if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
> +            ACPI_GPE_DISPATCH_NOTIFY)
> +    {
> +        /* Ensure that the device is not already in the list */
> +
> +        Notify = GpeEventInfo->Dispatch.NotifyList;
> +        while (Notify)
>          {
> -            GpeEventInfo->Flags =
> -                (ACPI_GPE_DISPATCH_NOTIFY | ACPI_GPE_LEVEL_TRIGGERED);
> -            GpeEventInfo->Dispatch.DeviceNode = DeviceNode;
> +            if (Notify->DeviceNode == DeviceNode)
> +            {
> +                Status = AE_ALREADY_EXISTS;
> +                goto UnlockAndExit;
> +            }
> +            Notify = Notify->Next;
>          }
>
> -        GpeEventInfo->Flags |= ACPI_GPE_CAN_WAKE;
> -        Status = AE_OK;
> +        /* Add this device to the notify list for this GPE */
> +
> +        NewNotify->DeviceNode = DeviceNode;
> +        NewNotify->Next = GpeEventInfo->Dispatch.NotifyList;
> +        GpeEventInfo->Dispatch.NotifyList = NewNotify;
> +        NewNotify = NULL;
>      }
>
> +    /* Mark the GPE as a possible wake event */
> +
> +    GpeEventInfo->Flags |= ACPI_GPE_CAN_WAKE;
> +    Status = AE_OK;
> +
> +
> +UnlockAndExit:
>      AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
> +
> +    /* Delete the notify object if it was not used above */
> +
> +    if (NewNotify)
> +    {
> +        ACPI_FREE (NewNotify);
> +    }
>      return_ACPI_STATUS (Status);
>  }
>
> diff --git a/src/acpica/source/components/executer/exconfig.c b/src/acpica/source/components/executer/exconfig.c
> index 69361d5..55cef28 100644
> --- a/src/acpica/source/components/executer/exconfig.c
> +++ b/src/acpica/source/components/executer/exconfig.c
> @@ -252,7 +252,7 @@ AcpiExLoadTableOp (
>      ACPI_FUNCTION_TRACE (ExLoadTableOp);
>
>
> -    /* Validate lengths for the SignatureString, OEMIDString, OEMTableID */
> +    /* Validate lengths for the Signature, OemId, and OemTableId strings */
>
>      if ((Operand[0]->String.Length > ACPI_NAME_SIZE) ||
>          (Operand[1]->String.Length > ACPI_OEM_ID_SIZE) ||
> diff --git a/src/acpica/source/components/executer/exdump.c b/src/acpica/source/components/executer/exdump.c
> index 5aab606..b525333 100644
> --- a/src/acpica/source/components/executer/exdump.c
> +++ b/src/acpica/source/components/executer/exdump.c
> @@ -203,8 +203,8 @@ static ACPI_EXDUMP_INFO     AcpiExDumpDevice[4] =
>  {
>      {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpDevice),         NULL},
>      {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.Handler),               "Handler"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.SystemNotify),          "System Notify"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.DeviceNotify),          "Device Notify"}
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.NotifyList[0]),         "System Notify"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.NotifyList[1]),         "Device Notify"}
>  };
>
>  static ACPI_EXDUMP_INFO     AcpiExDumpEvent[2] =
> @@ -251,8 +251,8 @@ static ACPI_EXDUMP_INFO     AcpiExDumpPower[5] =
>      {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpPower),          NULL},
>      {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (PowerResource.SystemLevel),    "System Level"},
>      {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (PowerResource.ResourceOrder),  "Resource Order"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.SystemNotify),   "System Notify"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.DeviceNotify),   "Device Notify"}
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.NotifyList[0]),  "System Notify"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.NotifyList[1]),  "Device Notify"}
>  };
>
>  static ACPI_EXDUMP_INFO     AcpiExDumpProcessor[7] =
> @@ -261,16 +261,16 @@ static ACPI_EXDUMP_INFO     AcpiExDumpProcessor[7] =
>      {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Processor.ProcId),             "Processor ID"},
>      {ACPI_EXD_UINT8 ,   ACPI_EXD_OFFSET (Processor.Length),             "Length"},
>      {ACPI_EXD_ADDRESS,  ACPI_EXD_OFFSET (Processor.Address),            "Address"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.SystemNotify),       "System Notify"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.DeviceNotify),       "Device Notify"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.NotifyList[0]),      "System Notify"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.NotifyList[1]),      "Device Notify"},
>      {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.Handler),            "Handler"}
>  };
>
>  static ACPI_EXDUMP_INFO     AcpiExDumpThermal[4] =
>  {
>      {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpThermal),        NULL},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.SystemNotify),     "System Notify"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.DeviceNotify),     "Device Notify"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.NotifyList[0]),    "System Notify"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.NotifyList[1]),    "Device Notify"},
>      {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.Handler),          "Handler"}
>  };
>
> @@ -330,11 +330,15 @@ static ACPI_EXDUMP_INFO     AcpiExDumpAddressHandler[6] =
>      {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (AddressSpace.Context),         "Context"}
>  };
>
> -static ACPI_EXDUMP_INFO     AcpiExDumpNotify[3] =
> +static ACPI_EXDUMP_INFO     AcpiExDumpNotify[7] =
>  {
>      {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpNotify),         NULL},
>      {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Node),                  "Node"},
> -    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Context),               "Context"}
> +    {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (Notify.HandlerType),           "Handler Type"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Handler),               "Handler"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Context),               "Context"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Next[0]),               "Next System Notify"},
> +    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Next[1]),               "Next Device Notify"}
>  };
>
>
> diff --git a/src/acpica/source/components/executer/exprep.c b/src/acpica/source/components/executer/exprep.c
> index 0b65ab9..9b05f9d 100644
> --- a/src/acpica/source/components/executer/exprep.c
> +++ b/src/acpica/source/components/executer/exprep.c
> @@ -490,8 +490,8 @@ AcpiExPrepCommonFieldObject (
>   *
>   * RETURN:      Status
>   *
> - * DESCRIPTION: Construct an ACPI_OPERAND_OBJECT of type DefField and
> - *              connect it to the parent Node.
> + * DESCRIPTION: Construct an object of type ACPI_OPERAND_OBJECT with a
> + *              subtype of DefField and connect it to the parent Node.
>   *
>   ******************************************************************************/
>
> diff --git a/src/acpica/source/components/executer/exresolv.c b/src/acpica/source/components/executer/exresolv.c
> index 8d3893b..4b9e9b3 100644
> --- a/src/acpica/source/components/executer/exresolv.c
> +++ b/src/acpica/source/components/executer/exresolv.c
> @@ -237,7 +237,7 @@ AcpiExResolveObjectToValue (
>
>      StackDesc = *StackPtr;
>
> -    /* This is an ACPI_OPERAND_OBJECT  */
> +    /* This is an object of type ACPI_OPERAND_OBJECT */
>
>      switch (StackDesc->Common.Type)
>      {
> diff --git a/src/acpica/source/components/executer/exstore.c b/src/acpica/source/components/executer/exstore.c
> index 8bea79b..36fccf8 100644
> --- a/src/acpica/source/components/executer/exstore.c
> +++ b/src/acpica/source/components/executer/exstore.c
> @@ -140,15 +140,15 @@ AcpiExStoreObjectToIndex (
>   * FUNCTION:    AcpiExStore
>   *
>   * PARAMETERS:  *SourceDesc         - Value to be stored
> - *              *DestDesc           - Where to store it.  Must be an NS node
> - *                                    or an ACPI_OPERAND_OBJECT of type
> + *              *DestDesc           - Where to store it. Must be an NS node
> + *                                    or ACPI_OPERAND_OBJECT of type
>   *                                    Reference;
>   *              WalkState           - Current walk state
>   *
>   * RETURN:      Status
>   *
>   * DESCRIPTION: Store the value described by SourceDesc into the location
> - *              described by DestDesc.  Called by various interpreter
> + *              described by DestDesc. Called by various interpreter
>   *              functions to store the result of an operation into
>   *              the destination operand -- not just simply the actual "Store"
>   *              ASL operator.
> diff --git a/src/acpica/source/components/executer/exutils.c b/src/acpica/source/components/executer/exutils.c
> index 3ebcbe5..28a18ad 100644
> --- a/src/acpica/source/components/executer/exutils.c
> +++ b/src/acpica/source/components/executer/exutils.c
> @@ -193,7 +193,7 @@ AcpiExEnterInterpreter (
>   *
>   * DESCRIPTION: Reacquire the interpreter execution region from within the
>   *              interpreter code. Failure to enter the interpreter region is a
> - *              fatal system error. Used in  conjuction with
> + *              fatal system error. Used in conjunction with
>   *              RelinquishInterpreter
>   *
>   ******************************************************************************/
> diff --git a/src/acpica/source/components/hardware/hwsleep.c b/src/acpica/source/components/hardware/hwsleep.c
> index 6fd9d66..a2e4c43 100644
> --- a/src/acpica/source/components/hardware/hwsleep.c
> +++ b/src/acpica/source/components/hardware/hwsleep.c
> @@ -171,20 +171,6 @@ AcpiHwLegacySleep (
>          return_ACPI_STATUS (Status);
>      }
>
> -    if (SleepState != ACPI_STATE_S5)
> -    {
> -        /*
> -         * Disable BM arbitration. This feature is contained within an
> -         * optional register (PM2 Control), so ignore a BAD_ADDRESS
> -         * exception.
> -         */
> -        Status = AcpiWriteBitRegister (ACPI_BITREG_ARB_DISABLE, 1);
> -        if (ACPI_FAILURE (Status) && (Status != AE_BAD_ADDRESS))
> -        {
> -            return_ACPI_STATUS (Status);
> -        }
> -    }
> -
>      /*
>       * 1) Disable/Clear all GPEs
>       * 2) Enable all wakeup GPEs
> @@ -452,17 +438,6 @@ AcpiHwLegacyWake (
>              AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].StatusRegisterId,
>              ACPI_CLEAR_STATUS);
>
> -    /*
> -     * Enable BM arbitration. This feature is contained within an
> -     * optional register (PM2 Control), so ignore a BAD_ADDRESS
> -     * exception.
> -     */
> -    Status = AcpiWriteBitRegister (ACPI_BITREG_ARB_DISABLE, 0);
> -    if (ACPI_FAILURE (Status) && (Status != AE_BAD_ADDRESS))
> -    {
> -        return_ACPI_STATUS (Status);
> -    }
> -
>      AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING);
>      return_ACPI_STATUS (Status);
>  }
> diff --git a/src/acpica/source/components/hardware/hwxfsleep.c b/src/acpica/source/components/hardware/hwxfsleep.c
> index 631b81e..dfb7112 100644
> --- a/src/acpica/source/components/hardware/hwxfsleep.c
> +++ b/src/acpica/source/components/hardware/hwxfsleep.c
> @@ -173,6 +173,14 @@ AcpiSetFirmwareWakingVector (
>      ACPI_FUNCTION_TRACE (AcpiSetFirmwareWakingVector);
>
>
> +    /*
> +     * According to the ACPI specification 2.0c and later, the 64-bit
> +     * waking vector should be cleared and the 32-bit waking vector should
> +     * be used, unless we want the wake-up code to be called by the BIOS in
> +     * Protected Mode. Some systems (for example HP dv5-1004nr) are known
> +     * to fail to resume if the 64-bit vector is used.
> +     */
> +
>      /* Set the 32-bit vector */
>
>      AcpiGbl_FACS->FirmwareWakingVector = PhysicalAddress;
> diff --git a/src/acpica/source/components/namespace/nspredef.c b/src/acpica/source/components/namespace/nspredef.c
> index e6c7cf6..8bc2591 100644
> --- a/src/acpica/source/components/namespace/nspredef.c
> +++ b/src/acpica/source/components/namespace/nspredef.c
> @@ -753,7 +753,7 @@ AcpiNsCheckPackage (
>          {
>              /* Create the new outer package and populate it */
>
> -            Status = AcpiNsWrapWithPackage (Data, *Elements, ReturnObjectPtr);
> +            Status = AcpiNsWrapWithPackage (Data, ReturnObject, ReturnObjectPtr);
>              if (ACPI_FAILURE (Status))
>              {
>                  return (Status);
> diff --git a/src/acpica/source/components/parser/psxface.c b/src/acpica/source/components/parser/psxface.c
> index 11c5fc2..5da1b6a 100644
> --- a/src/acpica/source/components/parser/psxface.c
> +++ b/src/acpica/source/components/parser/psxface.c
> @@ -420,8 +420,8 @@ AcpiPsExecuteMethod (
>      }
>
>      /*
> -     * Start method evaluation with an implicit return of zero. This is done
> -     * for Windows compatibility.
> +     * Start method evaluation with an implicit return of zero.
> +     * This is done for Windows compatibility.
>       */
>      if (AcpiGbl_EnableInterpreterSlack)
>      {
> diff --git a/src/acpica/source/components/resources/rscreate.c b/src/acpica/source/components/resources/rscreate.c
> index d75ceb6..6aaf4bb 100644
> --- a/src/acpica/source/components/resources/rscreate.c
> +++ b/src/acpica/source/components/resources/rscreate.c
> @@ -281,8 +281,8 @@ AcpiRsCreateResourceList (
>   *
>   * FUNCTION:    AcpiRsCreatePciRoutingTable
>   *
> - * PARAMETERS:  PackageObject           - Pointer to an ACPI_OPERAND_OBJECT
> - *                                        package
> + * PARAMETERS:  PackageObject           - Pointer to a package containing one
> + *                                        of more ACPI_OPERAND_OBJECTs
>   *              OutputBuffer            - Pointer to the user's buffer
>   *
>   * RETURN:      Status  AE_OK if okay, else a valid ACPI_STATUS code.
> @@ -290,7 +290,7 @@ AcpiRsCreateResourceList (
>   *              AE_BUFFER_OVERFLOW and OutputBuffer->Length will point
>   *              to the size buffer needed.
>   *
> - * DESCRIPTION: Takes the ACPI_OPERAND_OBJECT  package and creates a
> + * DESCRIPTION: Takes the ACPI_OPERAND_OBJECT package and creates a
>   *              linked list of PCI interrupt descriptions
>   *
>   * NOTE: It is the caller's responsibility to ensure that the start of the
> diff --git a/src/acpica/source/components/resources/rsutils.c b/src/acpica/source/components/resources/rsutils.c
> index ce3143c..a45b3d6 100644
> --- a/src/acpica/source/components/resources/rsutils.c
> +++ b/src/acpica/source/components/resources/rsutils.c
> @@ -253,7 +253,7 @@ AcpiRsMoveData (
>
>          /*
>           * 16-, 32-, and 64-bit cases must use the move macros that perform
> -         * endian conversion and/or accomodate hardware that cannot perform
> +         * endian conversion and/or accommodate hardware that cannot perform
>           * misaligned memory transfers
>           */
>          case ACPI_RSC_MOVE16:
> diff --git a/src/acpica/source/components/tables/tbfadt.c b/src/acpica/source/components/tables/tbfadt.c
> index fa43dbb..2c51511 100644
> --- a/src/acpica/source/components/tables/tbfadt.c
> +++ b/src/acpica/source/components/tables/tbfadt.c
> @@ -124,12 +124,13 @@
>
>  /* Local prototypes */
>
> -static ACPI_INLINE void
> +static void
>  AcpiTbInitGenericAddress (
>      ACPI_GENERIC_ADDRESS    *GenericAddress,
>      UINT8                   SpaceId,
>      UINT8                   ByteWidth,
> -    UINT64                  Address);
> +    UINT64                  Address,
> +    char                    *RegisterName);
>
>  static void
>  AcpiTbConvertFadt (
> @@ -263,7 +264,7 @@ static ACPI_FADT_PM_INFO    FadtPmInfoTable[] =
>   *
>   * PARAMETERS:  GenericAddress      - GAS struct to be initialized
>   *              SpaceId             - ACPI Space ID for this register
> - *              ByteWidth           - Width of this register, in bytes
> + *              ByteWidth           - Width of this register
>   *              Address             - Address of the register
>   *
>   * RETURN:      None
> @@ -274,13 +275,30 @@ static ACPI_FADT_PM_INFO    FadtPmInfoTable[] =
>   *
>   ******************************************************************************/
>
> -static ACPI_INLINE void
> +static void
>  AcpiTbInitGenericAddress (
>      ACPI_GENERIC_ADDRESS    *GenericAddress,
>      UINT8                   SpaceId,
>      UINT8                   ByteWidth,
> -    UINT64                  Address)
> +    UINT64                  Address,
> +    char                    *RegisterName)
>  {
> +    UINT8                   BitWidth;
> +
> +
> +    /* Bit width field in the GAS is only one byte long, 255 max */
> +
> +    BitWidth = (UINT8) (ByteWidth * 8);
> +
> +    if (ByteWidth > 31) /* (31*8)=248 */
> +    {
> +        ACPI_ERROR ((AE_INFO,
> +            "%s - 32-bit FADT register is too long (%u bytes, %u bits) "
> +            "to convert to GAS struct - 255 bits max, truncating",
> +            RegisterName, ByteWidth, (ByteWidth * 8)));
> +
> +        BitWidth = 255;
> +    }
>
>      /*
>       * The 64-bit Address field is non-aligned in the byte packed
> @@ -291,7 +309,7 @@ AcpiTbInitGenericAddress (
>      /* All other fields are byte-wide */
>
>      GenericAddress->SpaceId = SpaceId;
> -    GenericAddress->BitWidth = (UINT8) ACPI_MUL_8 (ByteWidth);
> +    GenericAddress->BitWidth = BitWidth;
>      GenericAddress->BitOffset = 0;
>      GenericAddress->AccessWidth = 0; /* Access width ANY */
>  }
> @@ -392,7 +410,7 @@ AcpiTbCreateLocalFadt (
>       */
>      if (Length > sizeof (ACPI_TABLE_FADT))
>      {
> -        ACPI_WARNING ((AE_INFO,
> +        ACPI_BIOS_WARNING ((AE_INFO,
>              "FADT (revision %u) is longer than ACPI 5.0 version, "
>              "truncating length %u to %u",
>              Table->Revision, Length, (UINT32) sizeof (ACPI_TABLE_FADT)));
> @@ -540,8 +558,9 @@ AcpiTbConvertFadt (
>          if (Address64->Address && Address32 &&
>             (Address64->Address != (UINT64) Address32))
>          {
> -            ACPI_ERROR ((AE_INFO,
> -                "32/64X address mismatch in %s: 0x%8.8X/0x%8.8X%8.8X, using 32",
> +            ACPI_BIOS_ERROR ((AE_INFO,
> +                "32/64X address mismatch in FADT/%s: "
> +                "0x%8.8X/0x%8.8X%8.8X, using 32",
>                  FadtInfoTable[i].Name, Address32,
>                  ACPI_FORMAT_UINT64 (Address64->Address)));
>          }
> @@ -556,7 +575,7 @@ AcpiTbConvertFadt (
>               */
>              AcpiTbInitGenericAddress (Address64, ACPI_ADR_SPACE_SYSTEM_IO,
>                  *ACPI_ADD_PTR (UINT8, &AcpiGbl_FADT, FadtInfoTable[i].Length),
> -                (UINT64) Address32);
> +                (UINT64) Address32, FadtInfoTable[i].Name);
>          }
>      }
>  }
> @@ -600,7 +619,7 @@ AcpiTbValidateFadt (
>      if (AcpiGbl_FADT.Facs &&
>          (AcpiGbl_FADT.XFacs != (UINT64) AcpiGbl_FADT.Facs))
>      {
> -        ACPI_WARNING ((AE_INFO,
> +        ACPI_BIOS_WARNING ((AE_INFO,
>              "32/64X FACS address mismatch in FADT - "
>              "0x%8.8X/0x%8.8X%8.8X, using 32",
>              AcpiGbl_FADT.Facs, ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XFacs)));
> @@ -611,7 +630,7 @@ AcpiTbValidateFadt (
>      if (AcpiGbl_FADT.Dsdt &&
>          (AcpiGbl_FADT.XDsdt != (UINT64) AcpiGbl_FADT.Dsdt))
>      {
> -        ACPI_WARNING ((AE_INFO,
> +        ACPI_BIOS_WARNING ((AE_INFO,
>              "32/64X DSDT address mismatch in FADT - "
>              "0x%8.8X/0x%8.8X%8.8X, using 32",
>              AcpiGbl_FADT.Dsdt, ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XDsdt)));
> @@ -647,8 +666,8 @@ AcpiTbValidateFadt (
>          if (Address64->Address &&
>             (Address64->BitWidth != ACPI_MUL_8 (Length)))
>          {
> -            ACPI_WARNING ((AE_INFO,
> -                "32/64X length mismatch in %s: %u/%u",
> +            ACPI_BIOS_WARNING ((AE_INFO,
> +                "32/64X length mismatch in FADT/%s: %u/%u",
>                  Name, ACPI_MUL_8 (Length), Address64->BitWidth));
>          }
>
> @@ -660,9 +679,9 @@ AcpiTbValidateFadt (
>               */
>              if (!Address64->Address || !Length)
>              {
> -                ACPI_ERROR ((AE_INFO,
> -                    "Required field %s has zero address and/or length:"
> -                    " 0x%8.8X%8.8X/0x%X",
> +                ACPI_BIOS_ERROR ((AE_INFO,
> +                    "Required FADT field %s has zero address and/or length: "
> +                    "0x%8.8X%8.8X/0x%X",
>                      Name, ACPI_FORMAT_UINT64 (Address64->Address), Length));
>              }
>          }
> @@ -676,8 +695,8 @@ AcpiTbValidateFadt (
>              if ((Address64->Address && !Length) ||
>                  (!Address64->Address && Length))
>              {
> -                ACPI_WARNING ((AE_INFO,
> -                    "Optional field %s has zero address or length: "
> +                ACPI_BIOS_WARNING ((AE_INFO,
> +                    "Optional FADT field %s has zero address or length: "
>                      "0x%8.8X%8.8X/0x%X",
>                      Name, ACPI_FORMAT_UINT64 (Address64->Address), Length));
>              }
> @@ -728,8 +747,8 @@ AcpiTbSetupFadtRegisters (
>                  (FadtInfoTable[i].DefaultLength > 0) &&
>                  (FadtInfoTable[i].DefaultLength != Target64->BitWidth))
>              {
> -                ACPI_WARNING ((AE_INFO,
> -                    "Invalid length for %s: %u, using default %u",
> +                ACPI_BIOS_WARNING ((AE_INFO,
> +                    "Invalid length for FADT/%s: %u, using default %u",
>                      FadtInfoTable[i].Name, Target64->BitWidth,
>                      FadtInfoTable[i].DefaultLength));
>
> @@ -772,7 +791,8 @@ AcpiTbSetupFadtRegisters (
>              AcpiTbInitGenericAddress (FadtPmInfoTable[i].Target,
>                  Source64->SpaceId, Pm1RegisterByteWidth,
>                  Source64->Address +
> -                    (FadtPmInfoTable[i].RegisterNum * Pm1RegisterByteWidth));
> +                    (FadtPmInfoTable[i].RegisterNum * Pm1RegisterByteWidth),
> +                "PmRegisters");
>          }
>      }
>  }
> diff --git a/src/acpica/source/components/tables/tbinstal.c b/src/acpica/source/components/tables/tbinstal.c
> index 00fd2a2..5e112dc 100644
> --- a/src/acpica/source/components/tables/tbinstal.c
> +++ b/src/acpica/source/components/tables/tbinstal.c
> @@ -229,8 +229,9 @@ AcpiTbAddTable (
>         (!ACPI_COMPARE_NAME (TableDesc->Pointer->Signature, ACPI_SIG_SSDT)) &&
>         (ACPI_STRNCMP (TableDesc->Pointer->Signature, "OEM", 3)))
>      {
> -        ACPI_ERROR ((AE_INFO,
> -            "Table has invalid signature [%4.4s] (0x%8.8X), must be SSDT or OEMx",
> +        ACPI_BIOS_ERROR ((AE_INFO,
> +            "Table has invalid signature [%4.4s] (0x%8.8X), "
> +            "must be SSDT or OEMx",
>              AcpiUtValidAcpiName (*(UINT32 *) TableDesc->Pointer->Signature) ?
>                  TableDesc->Pointer->Signature : "????",
>              *(UINT32 *) TableDesc->Pointer->Signature));
> diff --git a/src/acpica/source/components/tables/tbutils.c b/src/acpica/source/components/tables/tbutils.c
> index 4ad777c..4f0b75d 100644
> --- a/src/acpica/source/components/tables/tbutils.c
> +++ b/src/acpica/source/components/tables/tbutils.c
> @@ -359,8 +359,9 @@ AcpiTbVerifyChecksum (
>
>      if (Checksum)
>      {
> -        ACPI_WARNING ((AE_INFO,
> -            "Incorrect checksum in table [%4.4s] - 0x%2.2X, should be 0x%2.2X",
> +        ACPI_BIOS_WARNING ((AE_INFO,
> +            "Incorrect checksum in table [%4.4s] - 0x%2.2X, "
> +            "should be 0x%2.2X",
>              Table->Signature, Table->Checksum,
>              (UINT8) (Table->Checksum - Checksum)));
>
> @@ -428,8 +429,9 @@ AcpiTbCheckDsdtHeader (
>      if (AcpiGbl_OriginalDsdtHeader.Length != AcpiGbl_DSDT->Length ||
>          AcpiGbl_OriginalDsdtHeader.Checksum != AcpiGbl_DSDT->Checksum)
>      {
> -        ACPI_ERROR ((AE_INFO,
> -            "The DSDT has been corrupted or replaced - old, new headers below"));
> +        ACPI_BIOS_ERROR ((AE_INFO,
> +            "The DSDT has been corrupted or replaced - "
> +            "old, new headers below"));
>          AcpiTbPrintTableHeader (0, &AcpiGbl_OriginalDsdtHeader);
>          AcpiTbPrintTableHeader (0, AcpiGbl_DSDT);
>
> @@ -537,7 +539,7 @@ AcpiTbInstallTable (
>      if (Signature &&
>          !ACPI_COMPARE_NAME (Table->Signature, Signature))
>      {
> -        ACPI_ERROR ((AE_INFO,
> +        ACPI_BIOS_ERROR ((AE_INFO,
>              "Invalid signature 0x%X for ACPI table, expected [%s]",
>              *ACPI_CAST_PTR (UINT32, Table->Signature), Signature));
>          goto UnmapAndExit;
> @@ -656,7 +658,7 @@ AcpiTbGetRootTableEntry (
>          {
>              /* Will truncate 64-bit address to 32 bits, issue warning */
>
> -            ACPI_WARNING ((AE_INFO,
> +            ACPI_BIOS_WARNING ((AE_INFO,
>                  "64-bit Physical Address in XSDT is too large (0x%8.8X%8.8X),"
>                  " truncating",
>                  ACPI_FORMAT_UINT64 (Address64)));
> @@ -758,7 +760,8 @@ AcpiTbParseRootTable (
>
>      if (Length < sizeof (ACPI_TABLE_HEADER))
>      {
> -        ACPI_ERROR ((AE_INFO, "Invalid length 0x%X in RSDT/XSDT", Length));
> +        ACPI_BIOS_ERROR ((AE_INFO,
> +            "Invalid table length 0x%X in RSDT/XSDT", Length));
>          return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH);
>      }
>
> diff --git a/src/acpica/source/components/tables/tbxface.c b/src/acpica/source/components/tables/tbxface.c
> index 860dc2e..b91cce1 100644
> --- a/src/acpica/source/components/tables/tbxface.c
> +++ b/src/acpica/source/components/tables/tbxface.c
> @@ -1,7 +1,6 @@
>  /******************************************************************************
>   *
> - * Module Name: tbxface - Public interfaces to the ACPI subsystem
> - *                         ACPI table oriented interfaces
> + * Module Name: tbxface - ACPI table oriented external interfaces
>   *
>   *****************************************************************************/
>
> @@ -118,18 +117,11 @@
>
>  #include "acpi.h"
>  #include "accommon.h"
> -#include "acnamesp.h"
>  #include "actables.h"
>
>  #define _COMPONENT          ACPI_TABLES
>          ACPI_MODULE_NAME    ("tbxface")
>
> -/* Local prototypes */
> -
> -static ACPI_STATUS
> -AcpiTbLoadNamespace (
> -    void);
> -
>
>  /*******************************************************************************
>   *
> @@ -530,155 +522,6 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableByIndex)
>
>  /*******************************************************************************
>   *
> - * FUNCTION:    AcpiTbLoadNamespace
> - *
> - * PARAMETERS:  None
> - *
> - * RETURN:      Status
> - *
> - * DESCRIPTION: Load the namespace from the DSDT and all SSDTs/PSDTs found in
> - *              the RSDT/XSDT.
> - *
> - ******************************************************************************/
> -
> -static ACPI_STATUS
> -AcpiTbLoadNamespace (
> -    void)
> -{
> -    ACPI_STATUS             Status;
> -    UINT32                  i;
> -    ACPI_TABLE_HEADER       *NewDsdt;
> -
> -
> -    ACPI_FUNCTION_TRACE (TbLoadNamespace);
> -
> -
> -    (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
> -
> -    /*
> -     * Load the namespace. The DSDT is required, but any SSDT and
> -     * PSDT tables are optional. Verify the DSDT.
> -     */
> -    if (!AcpiGbl_RootTableList.CurrentTableCount ||
> -        !ACPI_COMPARE_NAME (
> -            &(AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Signature),
> -            ACPI_SIG_DSDT) ||
> -         ACPI_FAILURE (AcpiTbVerifyTable (
> -            &AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT])))
> -    {
> -        Status = AE_NO_ACPI_TABLES;
> -        goto UnlockAndExit;
> -    }
> -
> -    /*
> -     * Save the DSDT pointer for simple access. This is the mapped memory
> -     * address. We must take care here because the address of the .Tables
> -     * array can change dynamically as tables are loaded at run-time. Note:
> -     * .Pointer field is not validated until after call to AcpiTbVerifyTable.
> -     */
> -    AcpiGbl_DSDT = AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer;
> -
> -    /*
> -     * Optionally copy the entire DSDT to local memory (instead of simply
> -     * mapping it.) There are some BIOSs that corrupt or replace the original
> -     * DSDT, creating the need for this option. Default is FALSE, do not copy
> -     * the DSDT.
> -     */
> -    if (AcpiGbl_CopyDsdtLocally)
> -    {
> -        NewDsdt = AcpiTbCopyDsdt (ACPI_TABLE_INDEX_DSDT);
> -        if (NewDsdt)
> -        {
> -            AcpiGbl_DSDT = NewDsdt;
> -        }
> -    }
> -
> -    /*
> -     * Save the original DSDT header for detection of table corruption
> -     * and/or replacement of the DSDT from outside the OS.
> -     */
> -    ACPI_MEMCPY (&AcpiGbl_OriginalDsdtHeader, AcpiGbl_DSDT,
> -        sizeof (ACPI_TABLE_HEADER));
> -
> -    (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
> -
> -    /* Load and parse tables */
> -
> -    Status = AcpiNsLoadTable (ACPI_TABLE_INDEX_DSDT, AcpiGbl_RootNode);
> -    if (ACPI_FAILURE (Status))
> -    {
> -        return_ACPI_STATUS (Status);
> -    }
> -
> -    /* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */
> -
> -    (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
> -    for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)
> -    {
> -        if ((!ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),
> -                    ACPI_SIG_SSDT) &&
> -             !ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),
> -                    ACPI_SIG_PSDT)) ||
> -             ACPI_FAILURE (AcpiTbVerifyTable (
> -                &AcpiGbl_RootTableList.Tables[i])))
> -        {
> -            continue;
> -        }
> -
> -        /* Ignore errors while loading tables, get as many as possible */
> -
> -        (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
> -        (void) AcpiNsLoadTable (i, AcpiGbl_RootNode);
> -        (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
> -    }
> -
> -    ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "ACPI Tables successfully acquired\n"));
> -
> -UnlockAndExit:
> -    (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
> -    return_ACPI_STATUS (Status);
> -}
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION:    AcpiLoadTables
> - *
> - * PARAMETERS:  None
> - *
> - * RETURN:      Status
> - *
> - * DESCRIPTION: Load the ACPI tables from the RSDT/XSDT
> - *
> - ******************************************************************************/
> -
> -ACPI_STATUS
> -AcpiLoadTables (
> -    void)
> -{
> -    ACPI_STATUS             Status;
> -
> -
> -    ACPI_FUNCTION_TRACE (AcpiLoadTables);
> -
> -
> -    /* Load the namespace from the tables */
> -
> -    Status = AcpiTbLoadNamespace ();
> -    if (ACPI_FAILURE (Status))
> -    {
> -        ACPI_EXCEPTION ((AE_INFO, Status,
> -            "While loading namespace from ACPI tables"));
> -    }
> -
> -    return_ACPI_STATUS (Status);
> -}
> -
> -ACPI_EXPORT_SYMBOL (AcpiLoadTables)
> -
> -
> -/*******************************************************************************
> - *
>   * FUNCTION:    AcpiInstallTableHandler
>   *
>   * PARAMETERS:  Handler         - Table event handler
> diff --git a/src/acpica/source/components/tables/tbxfroot.c b/src/acpica/source/components/tables/tbxfroot.c
> index e85c1fd..d00db5f 100644
> --- a/src/acpica/source/components/tables/tbxfroot.c
> +++ b/src/acpica/source/components/tables/tbxfroot.c
> @@ -306,7 +306,7 @@ AcpiFindRootPointer (
>
>      /* A valid RSDP was not found */
>
> -    ACPI_ERROR ((AE_INFO, "A valid RSDP was not found"));
> +    ACPI_BIOS_ERROR ((AE_INFO, "A valid RSDP was not found"));
>      return_ACPI_STATUS (AE_NOT_FOUND);
>  }
>
> diff --git a/src/acpica/source/components/utilities/utdecode.c b/src/acpica/source/components/utilities/utdecode.c
> index b36aa45..a88c581 100644
> --- a/src/acpica/source/components/utilities/utdecode.c
> +++ b/src/acpica/source/components/utilities/utdecode.c
> @@ -123,47 +123,6 @@
>          ACPI_MODULE_NAME    ("utdecode")
>
>
> -/*******************************************************************************
> - *
> - * FUNCTION:    AcpiFormatException
> - *
> - * PARAMETERS:  Status       - The ACPI_STATUS code to be formatted
> - *
> - * RETURN:      A string containing the exception text. A valid pointer is
> - *              always returned.
> - *
> - * DESCRIPTION: This function translates an ACPI exception into an ASCII string
> - *              It is here instead of utxface.c so it is always present.
> - *
> - ******************************************************************************/
> -
> -const char *
> -AcpiFormatException (
> -    ACPI_STATUS             Status)
> -{
> -    const char              *Exception = NULL;
> -
> -
> -    ACPI_FUNCTION_ENTRY ();
> -
> -
> -    Exception = AcpiUtValidateException (Status);
> -    if (!Exception)
> -    {
> -        /* Exception code was not recognized */
> -
> -        ACPI_ERROR ((AE_INFO,
> -            "Unknown exception code: 0x%8.8X", Status));
> -
> -        Exception = "UNKNOWN_STATUS_CODE";
> -    }
> -
> -    return (ACPI_CAST_PTR (const char, Exception));
> -}
> -
> -ACPI_EXPORT_SYMBOL (AcpiFormatException)
> -
> -
>  /*
>   * Properties of the ACPI Object Types, both internal and external.
>   * The table is indexed by values of ACPI_OBJECT_TYPE
> @@ -252,16 +211,17 @@ AcpiUtHexToAsciiChar (
>
>  const char        *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] =
>  {
> -    "SystemMemory",
> -    "SystemIO",
> -    "PCI_Config",
> -    "EmbeddedControl",
> -    "SMBus",
> -    "SystemCMOS",
> -    "PCIBARTarget",
> -    "IPMI",
> -    "GeneralPurposeIo",
> -    "GenericSerialBus"
> +    "SystemMemory",     /* 0x00 */
> +    "SystemIO",         /* 0x01 */
> +    "PCI_Config",       /* 0x02 */
> +    "EmbeddedControl",  /* 0x03 */
> +    "SMBus",            /* 0x04 */
> +    "SystemCMOS",       /* 0x05 */
> +    "PCIBARTarget",     /* 0x06 */
> +    "IPMI",             /* 0x07 */
> +    "GeneralPurposeIo", /* 0x08 */
> +    "GenericSerialBus", /* 0x09 */
> +    "PCC"               /* 0x0A */
>  };
>
>
> diff --git a/src/acpica/source/components/utilities/utdelete.c b/src/acpica/source/components/utilities/utdelete.c
> index 3130e6d..b64a585 100644
> --- a/src/acpica/source/components/utilities/utdelete.c
> +++ b/src/acpica/source/components/utilities/utdelete.c
> @@ -239,7 +239,7 @@ AcpiUtDeleteInternalObj (
>      case ACPI_TYPE_PROCESSOR:
>      case ACPI_TYPE_THERMAL:
>
> -        /* Walk the notify handler list for this object */
> +        /* Walk the address handler list for this object */
>
>          HandlerDesc = Object->CommonNotify.Handler;
>          while (HandlerDesc)
> @@ -595,6 +595,7 @@ AcpiUtUpdateObjectReference (
>      ACPI_STATUS             Status = AE_OK;
>      ACPI_GENERIC_STATE      *StateList = NULL;
>      ACPI_OPERAND_OBJECT     *NextObject = NULL;
> +    ACPI_OPERAND_OBJECT     *PrevObject;
>      ACPI_GENERIC_STATE      *State;
>      UINT32                  i;
>
> @@ -624,10 +625,20 @@ AcpiUtUpdateObjectReference (
>          case ACPI_TYPE_POWER:
>          case ACPI_TYPE_THERMAL:
>
> -            /* Update the notify objects for these types (if present) */
> -
> -            AcpiUtUpdateRefCount (Object->CommonNotify.SystemNotify, Action);
> -            AcpiUtUpdateRefCount (Object->CommonNotify.DeviceNotify, Action);
> +            /*
> +             * Update the notify objects for these types (if present)
> +             * Two lists, system and device notify handlers.
> +             */
> +            for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
> +            {
> +                PrevObject = Object->CommonNotify.NotifyList[i];
> +                while (PrevObject)
> +                {
> +                    NextObject = PrevObject->Notify.Next[i];
> +                    AcpiUtUpdateRefCount (PrevObject, Action);
> +                    PrevObject = NextObject;
> +                }
> +            }
>              break;
>
>          case ACPI_TYPE_PACKAGE:
> diff --git a/src/acpica/source/components/utilities/utglobal.c b/src/acpica/source/components/utilities/utglobal.c
> index 8ebbaec..98b1e48 100644
> --- a/src/acpica/source/components/utilities/utglobal.c
> +++ b/src/acpica/source/components/utilities/utglobal.c
> @@ -283,8 +283,9 @@ ACPI_FIXED_EVENT_INFO       AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS] =
>   *
>   * RETURN:      Status
>   *
> - * DESCRIPTION: Init ACPICA globals.  All globals that require specific
> - *              initialization should be initialized here!
> + * DESCRIPTION: Initialize ACPICA globals. All globals that require specific
> + *              initialization should be initialized here. This allows for
> + *              a warm restart.
>   *
>   ******************************************************************************/
>
> @@ -359,8 +360,8 @@ AcpiUtInitGlobals (
>
>      /* Global handlers */
>
> -    AcpiGbl_SystemNotify.Handler        = NULL;
> -    AcpiGbl_DeviceNotify.Handler        = NULL;
> +    AcpiGbl_GlobalNotify[0].Handler     = NULL;
> +    AcpiGbl_GlobalNotify[1].Handler     = NULL;
>      AcpiGbl_ExceptionHandler            = NULL;
>      AcpiGbl_InitHandler                 = NULL;
>      AcpiGbl_TableHandler                = NULL;
> diff --git a/src/acpica/source/components/utilities/utmisc.c b/src/acpica/source/components/utilities/utmisc.c
> index 44dd533..7318f68 100644
> --- a/src/acpica/source/components/utilities/utmisc.c
> +++ b/src/acpica/source/components/utilities/utmisc.c
> @@ -125,84 +125,41 @@
>          ACPI_MODULE_NAME    ("utmisc")
>
>
> +#if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP
>  /*******************************************************************************
>   *
> - * FUNCTION:    AcpiUtValidateException
> + * FUNCTION:    UtConvertBackslashes
>   *
> - * PARAMETERS:  Status       - The ACPI_STATUS code to be formatted
> + * PARAMETERS:  Pathname        - File pathname string to be converted
>   *
> - * RETURN:      A string containing the exception text. NULL if exception is
> - *              not valid.
> + * RETURN:      Modifies the input Pathname
>   *
> - * DESCRIPTION: This function validates and translates an ACPI exception into
> - *              an ASCII string.
> + * DESCRIPTION: Convert all backslashes (0x5C) to forward slashes (0x2F) within
> + *              the entire input file pathname string.
>   *
>   ******************************************************************************/
>
> -const char *
> -AcpiUtValidateException (
> -    ACPI_STATUS             Status)
> +void
> +UtConvertBackslashes (
> +    char                    *Pathname)
>  {
> -    UINT32                  SubStatus;
> -    const char              *Exception = NULL;
> -
> -
> -    ACPI_FUNCTION_ENTRY ();
> -
>
> -    /*
> -     * Status is composed of two parts, a "type" and an actual code
> -     */
> -    SubStatus = (Status & ~AE_CODE_MASK);
> -
> -    switch (Status & AE_CODE_MASK)
> +    if (!Pathname)
>      {
> -    case AE_CODE_ENVIRONMENTAL:
> -
> -        if (SubStatus <= AE_CODE_ENV_MAX)
> -        {
> -            Exception = AcpiGbl_ExceptionNames_Env [SubStatus];
> -        }
> -        break;
> -
> -    case AE_CODE_PROGRAMMER:
> -
> -        if (SubStatus <= AE_CODE_PGM_MAX)
> -        {
> -            Exception = AcpiGbl_ExceptionNames_Pgm [SubStatus];
> -        }
> -        break;
> -
> -    case AE_CODE_ACPI_TABLES:
> -
> -        if (SubStatus <= AE_CODE_TBL_MAX)
> -        {
> -            Exception = AcpiGbl_ExceptionNames_Tbl [SubStatus];
> -        }
> -        break;
> -
> -    case AE_CODE_AML:
> -
> -        if (SubStatus <= AE_CODE_AML_MAX)
> -        {
> -            Exception = AcpiGbl_ExceptionNames_Aml [SubStatus];
> -        }
> -        break;
> -
> -    case AE_CODE_CONTROL:
> +        return;
> +    }
>
> -        if (SubStatus <= AE_CODE_CTRL_MAX)
> +    while (*Pathname)
> +    {
> +        if (*Pathname == '\\')
>          {
> -            Exception = AcpiGbl_ExceptionNames_Ctrl [SubStatus];
> +            *Pathname = '/';
>          }
> -        break;
>
> -    default:
> -        break;
> +        Pathname++;
>      }
> -
> -    return (ACPI_CAST_PTR (const char, Exception));
>  }
> +#endif
>
>
>  /*******************************************************************************
> @@ -1367,5 +1324,3 @@ AcpiUtWalkPackageTree (
>
>      return_ACPI_STATUS (AE_AML_INTERNAL);
>  }
> -
> -
> diff --git a/src/acpica/source/components/utilities/utobject.c b/src/acpica/source/components/utilities/utobject.c
> index ade2980..4914159 100644
> --- a/src/acpica/source/components/utilities/utobject.c
> +++ b/src/acpica/source/components/utilities/utobject.c
> @@ -438,7 +438,7 @@ AcpiUtCreateStringObject (
>   *
>   * RETURN:      TRUE if object is valid, FALSE otherwise
>   *
> - * DESCRIPTION: Validate a pointer to be an ACPI_OPERAND_OBJECT
> + * DESCRIPTION: Validate a pointer to be of type ACPI_OPERAND_OBJECT
>   *
>   ******************************************************************************/
>
> @@ -464,7 +464,7 @@ AcpiUtValidInternalObject (
>      {
>      case ACPI_DESC_TYPE_OPERAND:
>
> -        /* The object appears to be a valid ACPI_OPERAND_OBJECT  */
> +        /* The object appears to be a valid ACPI_OPERAND_OBJECT */
>
>          return (TRUE);
>
> @@ -545,7 +545,7 @@ AcpiUtDeleteObjectDesc (
>      ACPI_FUNCTION_TRACE_PTR (UtDeleteObjectDesc, Object);
>
>
> -    /* Object must be an ACPI_OPERAND_OBJECT  */
> +    /* Object must be of type ACPI_OPERAND_OBJECT */
>
>      if (ACPI_GET_DESCRIPTOR_TYPE (Object) != ACPI_DESC_TYPE_OPERAND)
>      {
> diff --git a/src/acpica/source/components/utilities/utresrc.c b/src/acpica/source/components/utilities/utresrc.c
> index 69df740..3835b47 100644
> --- a/src/acpica/source/components/utilities/utresrc.c
> +++ b/src/acpica/source/components/utilities/utresrc.c
> @@ -1,6 +1,6 @@
>  /*******************************************************************************
>   *
> - * Module Name: utresrc - Resource managment utilities
> + * Module Name: utresrc - Resource management utilities
>   *
>   ******************************************************************************/
>
> @@ -129,7 +129,7 @@
>
>  /*
>   * Strings used to decode resource descriptors.
> - * Used by both the disasssembler and the debugger resource dump routines
> + * Used by both the disassembler and the debugger resource dump routines
>   */
>  const char                      *AcpiGbl_BmDecode[] =
>  {
> diff --git a/src/acpica/source/components/utilities/uttrack.c b/src/acpica/source/components/utilities/uttrack.c
> index 7f2311a..3d73fc5 100644
> --- a/src/acpica/source/components/utilities/uttrack.c
> +++ b/src/acpica/source/components/utilities/uttrack.c
> @@ -705,21 +705,21 @@ AcpiUtDumpAllocations (
>                      switch (ACPI_GET_DESCRIPTOR_TYPE (Descriptor))
>                      {
>                      case ACPI_DESC_TYPE_OPERAND:
> -                        if (Element->Size == sizeof (ACPI_DESC_TYPE_OPERAND))
> +                        if (Element->Size == sizeof (ACPI_OPERAND_OBJECT))
>                          {
>                              DescriptorType = ACPI_DESC_TYPE_OPERAND;
>                          }
>                          break;
>
>                      case ACPI_DESC_TYPE_PARSER:
> -                        if (Element->Size == sizeof (ACPI_DESC_TYPE_PARSER))
> +                        if (Element->Size == sizeof (ACPI_PARSE_OBJECT))
>                          {
>                              DescriptorType = ACPI_DESC_TYPE_PARSER;
>                          }
>                          break;
>
>                      case ACPI_DESC_TYPE_NAMED:
> -                        if (Element->Size == sizeof (ACPI_DESC_TYPE_NAMED))
> +                        if (Element->Size == sizeof (ACPI_NAMESPACE_NODE))
>                          {
>                              DescriptorType = ACPI_DESC_TYPE_NAMED;
>                          }
> diff --git a/src/acpica/source/components/utilities/utxferror.c b/src/acpica/source/components/utilities/utxferror.c
> index 8a98a89..c0961a2 100644
> --- a/src/acpica/source/components/utilities/utxferror.c
> +++ b/src/acpica/source/components/utilities/utxferror.c
> @@ -159,6 +159,9 @@ extern FILE                 *AcpiGbl_OutputFile;
>  #define ACPI_MSG_WARNING        "ACPI Warning: "
>  #define ACPI_MSG_INFO           "ACPI: "
>
> +#define ACPI_MSG_BIOS_ERROR     "ACPI Firmware Error: "
> +#define ACPI_MSG_BIOS_WARNING   "ACPI Firmware Warning: "
> +
>  /*
>   * Common message suffix
>   */
> @@ -324,6 +327,84 @@ AcpiInfo (
>  ACPI_EXPORT_SYMBOL (AcpiInfo)
>
>
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiBiosError
> + *
> + * PARAMETERS:  ModuleName          - Caller's module name (for error output)
> + *              LineNumber          - Caller's line number (for error output)
> + *              Format              - Printf format string + additional args
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Print "ACPI Firmware Error" message with module/line/version
> + *              info
> + *
> + ******************************************************************************/
> +
> +void ACPI_INTERNAL_VAR_XFACE
> +AcpiBiosError (
> +    const char              *ModuleName,
> +    UINT32                  LineNumber,
> +    const char              *Format,
> +    ...)
> +{
> +    va_list                 ArgList;
> +
> +
> +    ACPI_MSG_REDIRECT_BEGIN;
> +    AcpiOsPrintf (ACPI_MSG_BIOS_ERROR);
> +
> +    va_start (ArgList, Format);
> +    AcpiOsVprintf (Format, ArgList);
> +    ACPI_MSG_SUFFIX;
> +    va_end (ArgList);
> +
> +    ACPI_MSG_REDIRECT_END;
> +}
> +
> +ACPI_EXPORT_SYMBOL (AcpiBiosError)
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiBiosWarning
> + *
> + * PARAMETERS:  ModuleName          - Caller's module name (for error output)
> + *              LineNumber          - Caller's line number (for error output)
> + *              Format              - Printf format string + additional args
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Print "ACPI Firmware Warning" message with module/line/version
> + *              info
> + *
> + ******************************************************************************/
> +
> +void ACPI_INTERNAL_VAR_XFACE
> +AcpiBiosWarning (
> +    const char              *ModuleName,
> +    UINT32                  LineNumber,
> +    const char              *Format,
> +    ...)
> +{
> +    va_list                 ArgList;
> +
> +
> +    ACPI_MSG_REDIRECT_BEGIN;
> +    AcpiOsPrintf (ACPI_MSG_BIOS_WARNING);
> +
> +    va_start (ArgList, Format);
> +    AcpiOsVprintf (Format, ArgList);
> +    ACPI_MSG_SUFFIX;
> +    va_end (ArgList);
> +
> +    ACPI_MSG_REDIRECT_END;
> +}
> +
> +ACPI_EXPORT_SYMBOL (AcpiBiosWarning)
> +
> +
>  /*
>   * The remainder of this module contains internal error functions that may
>   * be configured out.
> diff --git a/src/acpica/source/include/acdebug.h b/src/acpica/source/include/acdebug.h
> index 4a9ecf0..45cfb26 100644
> --- a/src/acpica/source/include/acdebug.h
> +++ b/src/acpica/source/include/acdebug.h
> @@ -184,8 +184,7 @@ AcpiDbDisplayTemplate (
>
>  void
>  AcpiDbUnloadAcpiTable (
> -    char                    *TableArg,
> -    char                    *InstanceArg);
> +    char                    *Name);
>
>  void
>  AcpiDbSendNotify (
> @@ -477,7 +476,7 @@ AcpiDbLocalNsLookup (
>      char                    *Name);
>
>  void
> -AcpiDbUInt32ToHexString (
> +AcpiDbUint32ToHexString (
>      UINT32                  Value,
>      char                    *Buffer);
>
> diff --git a/src/acpica/source/include/acdisasm.h b/src/acpica/source/include/acdisasm.h
> index 9e8f2e3..056e8ea 100644
> --- a/src/acpica/source/include/acdisasm.h
> +++ b/src/acpica/source/include/acdisasm.h
> @@ -591,6 +591,14 @@ AcpiDmMethodFlags (
>      ACPI_PARSE_OBJECT       *Op);
>
>  void
> +AcpiDmPredefinedDescription (
> +    ACPI_PARSE_OBJECT       *Op);
> +
> +void
> +AcpiDmFieldPredefinedDescription (
> +    ACPI_PARSE_OBJECT       *Op);
> +
> +void
>  AcpiDmFieldFlags (
>      ACPI_PARSE_OBJECT       *Op);
>
> diff --git a/src/acpica/source/include/acexcep.h b/src/acpica/source/include/acexcep.h
> index 7129954..ccc6f71 100644
> --- a/src/acpica/source/include/acexcep.h
> +++ b/src/acpica/source/include/acexcep.h
> @@ -125,6 +125,7 @@
>  #define AE_CODE_ACPI_TABLES             0x2000
>  #define AE_CODE_AML                     0x3000
>  #define AE_CODE_CONTROL                 0x4000
> +#define AE_CODE_MAX                     0x4000
>  #define AE_CODE_MASK                    0xF000
>
>
> @@ -260,7 +261,7 @@
>
>  /* Exception strings for AcpiFormatException */
>
> -#ifdef DEFINE_ACPI_GLOBALS
> +#ifdef ACPI_DEFINE_EXCEPTION_TABLE
>
>  /*
>   * String versions of the exception codes above
> @@ -379,6 +380,6 @@ char const   *AcpiGbl_ExceptionNames_Ctrl[] =
>      "AE_CTRL_PARSE_PENDING"
>  };
>
> -#endif /* ACPI GLOBALS */
> +#endif /* EXCEPTION_TABLE */
>
>  #endif /* __ACEXCEP_H__ */
> diff --git a/src/acpica/source/include/acglobal.h b/src/acpica/source/include/acglobal.h
> index b27ee3a..b96b658 100644
> --- a/src/acpica/source/include/acglobal.h
> +++ b/src/acpica/source/include/acglobal.h
> @@ -326,8 +326,7 @@ ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_OperandCache;
>
>  /* Global handlers */
>
> -ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER  AcpiGbl_DeviceNotify;
> -ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER  AcpiGbl_SystemNotify;
> +ACPI_EXTERN ACPI_GLOBAL_NOTIFY_HANDLER  AcpiGbl_GlobalNotify[2];
>  ACPI_EXTERN ACPI_EXCEPTION_HANDLER      AcpiGbl_ExceptionHandler;
>  ACPI_EXTERN ACPI_INIT_HANDLER           AcpiGbl_InitHandler;
>  ACPI_EXTERN ACPI_TABLE_HANDLER          AcpiGbl_TableHandler;
> @@ -360,17 +359,8 @@ ACPI_EXTERN UINT8                       AcpiGbl_OsiData;
>  ACPI_EXTERN ACPI_INTERFACE_INFO        *AcpiGbl_SupportedInterfaces;
>  ACPI_EXTERN ACPI_ADDRESS_RANGE         *AcpiGbl_AddressRangeList[ACPI_ADDRESS_RANGE_MAX];
>
> -
>  #ifndef DEFINE_ACPI_GLOBALS
>
> -/* Exception codes */
> -
> -extern char const                       *AcpiGbl_ExceptionNames_Env[];
> -extern char const                       *AcpiGbl_ExceptionNames_Pgm[];
> -extern char const                       *AcpiGbl_ExceptionNames_Tbl[];
> -extern char const                       *AcpiGbl_ExceptionNames_Aml[];
> -extern char const                       *AcpiGbl_ExceptionNames_Ctrl[];
> -
>  /* Other miscellaneous */
>
>  extern BOOLEAN                          AcpiGbl_Shutdown;
> @@ -552,4 +542,14 @@ ACPI_EXTERN UINT32                      AcpiGbl_SizeOfAcpiObjects;
>
>  #endif /* ACPI_DEBUGGER */
>
> +
> +/*****************************************************************************
> + *
> + * Info/help support
> + *
> + ****************************************************************************/
> +
> +extern const AH_PREDEFINED_NAME     AslPredefinedInfo[];
> +
> +
>  #endif /* __ACGLOBAL_H__ */
> diff --git a/src/acpica/source/include/aclocal.h b/src/acpica/source/include/aclocal.h
> index f9065af..00d933e 100644
> --- a/src/acpica/source/include/aclocal.h
> +++ b/src/acpica/source/include/aclocal.h
> @@ -534,6 +534,15 @@ typedef struct acpi_gpe_handler_info
>
>  } ACPI_GPE_HANDLER_INFO;
>
> +/* Notify info for implicit notify, multiple device objects */
> +
> +typedef struct acpi_gpe_notify_info
> +{
> +    ACPI_NAMESPACE_NODE             *DeviceNode;    /* Device to be notified */
> +    struct acpi_gpe_notify_info     *Next;
> +
> +} ACPI_GPE_NOTIFY_INFO;
> +
>  /*
>   * GPE dispatch info. At any time, the GPE can have at most one type
>   * of dispatch - Method, Handler, or Implicit Notify.
> @@ -541,8 +550,8 @@ typedef struct acpi_gpe_handler_info
>  typedef union acpi_gpe_dispatch_info
>  {
>      ACPI_NAMESPACE_NODE             *MethodNode;    /* Method node for this GPE level */
> -    struct acpi_gpe_handler_info    *Handler;       /* Installed GPE handler */
> -    ACPI_NAMESPACE_NODE             *DeviceNode;    /* Parent _PRW device for implicit notify */
> +    ACPI_GPE_HANDLER_INFO           *Handler;       /* Installed GPE handler */
> +    ACPI_GPE_NOTIFY_INFO            *NotifyList;    /* List of _PRW devices for implicit notifies */
>
>  } ACPI_GPE_DISPATCH_INFO;
>
> @@ -552,7 +561,7 @@ typedef union acpi_gpe_dispatch_info
>   */
>  typedef struct acpi_gpe_event_info
>  {
> -    union acpi_gpe_dispatch_info    Dispatch;       /* Either Method or Handler */
> +    union acpi_gpe_dispatch_info    Dispatch;       /* Either Method, Handler, or NotifyList */
>      struct acpi_gpe_register_info   *RegisterInfo;  /* Backpointer to register info */
>      UINT8                           Flags;          /* Misc info about this GPE */
>      UINT8                           GpeNumber;      /* This GPE */
> @@ -788,6 +797,15 @@ ACPI_STATUS (*ACPI_PARSE_UPWARDS) (
>      struct acpi_walk_state          *WalkState);
>
>
> +/* Global handlers for AML Notifies */
> +
> +typedef struct acpi_global_notify_handler
> +{
> +    ACPI_NOTIFY_HANDLER             Handler;
> +    void                            *Context;
> +
> +} ACPI_GLOBAL_NOTIFY_HANDLER;
> +
>  /*
>   * Notify info - used to pass info to the deferred notify
>   * handler/dispatcher.
> @@ -795,8 +813,10 @@ ACPI_STATUS (*ACPI_PARSE_UPWARDS) (
>  typedef struct acpi_notify_info
>  {
>      ACPI_STATE_COMMON
> +    UINT8                           HandlerListId;
>      ACPI_NAMESPACE_NODE             *Node;
> -    union acpi_operand_object       *HandlerObj;
> +    union acpi_operand_object       *HandlerListHead;
> +    ACPI_GLOBAL_NOTIFY_HANDLER      *Global;
>
>  } ACPI_NOTIFY_INFO;
>
> @@ -1021,6 +1041,7 @@ typedef struct acpi_parse_state
>  #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_SPECIAL            0x10
>
>
> @@ -1372,4 +1393,20 @@ typedef struct acpi_debug_mem_block
>  #define ACPI_NUM_MEM_LISTS              2
>
>
> +/*****************************************************************************
> + *
> + * Info/help support
> + *
> + ****************************************************************************/
> +
> +typedef struct ah_predefined_name
> +{
> +    char            *Name;
> +    char            *Description;
> +#ifndef ACPI_ASL_COMPILER
> +    char            *Action;
> +#endif
> +
> +} AH_PREDEFINED_NAME;
> +
>  #endif /* __ACLOCAL_H__ */
> diff --git a/src/acpica/source/include/acmacros.h b/src/acpica/source/include/acmacros.h
> index 5451d84..3cf0ac0 100644
> --- a/src/acpica/source/include/acmacros.h
> +++ b/src/acpica/source/include/acmacros.h
> @@ -346,8 +346,8 @@
>  #define ACPI_INSERT_BITS(Target, Mask, Source)          Target = ((Target & (~(Mask))) | (Source & Mask))
>
>  /*
> - * An ACPI_NAMESPACE_NODE can appear in some contexts
> - * where a pointer to an ACPI_OPERAND_OBJECT can also
> + * An object of type ACPI_NAMESPACE_NODE can appear in some contexts
> + * where a pointer to an object of type ACPI_OPERAND_OBJECT can also
>   * appear. This macro is used to distinguish them.
>   *
>   * The "Descriptor" field is the first field in both structures.
> diff --git a/src/acpica/source/include/acobject.h b/src/acpica/source/include/acobject.h
> index 009232a..9014d4f 100644
> --- a/src/acpica/source/include/acobject.h
> +++ b/src/acpica/source/include/acobject.h
> @@ -166,7 +166,7 @@
>
>  #define AOPOBJ_AML_CONSTANT         0x01    /* Integer is an AML constant */
>  #define AOPOBJ_STATIC_POINTER       0x02    /* Data is part of an ACPI table, don't delete */
> -#define AOPOBJ_DATA_VALID           0x04    /* Object is intialized and data is valid */
> +#define AOPOBJ_DATA_VALID           0x04    /* Object is initialized and data is valid */
>  #define AOPOBJ_OBJECT_INITIALIZED   0x08    /* Region is initialized, _REG was run */
>  #define AOPOBJ_SETUP_COMPLETE       0x10    /* Region setup is complete */
>  #define AOPOBJ_INVALID              0x20    /* Host OS won't allow a Region address */
> @@ -195,8 +195,8 @@ typedef struct acpi_object_integer
>
>
>  /*
> - * Note: The String and Buffer object must be identical through the Pointer
> - * and length elements.  There is code that depends on this.
> + * Note: The String and Buffer object must be identical through the
> + * pointer and length elements. There is code that depends on this.
>   *
>   * Fields common to both Strings and Buffers
>   */
> @@ -318,8 +318,7 @@ typedef struct acpi_object_method
>   * Common fields for objects that support ASL notifications
>   */
>  #define ACPI_COMMON_NOTIFY_INFO \
> -    union acpi_operand_object       *SystemNotify;      /* Handler for system notifies */\
> -    union acpi_operand_object       *DeviceNotify;      /* Handler for driver notifies */\
> +    union acpi_operand_object       *NotifyList[2];     /* Handlers for system/device notifies */\
>      union acpi_operand_object       *Handler;           /* Handler for Address space */
>
>
> @@ -461,8 +460,10 @@ typedef struct acpi_object_notify_handler
>  {
>      ACPI_OBJECT_COMMON_HEADER
>      ACPI_NAMESPACE_NODE             *Node;              /* Parent device */
> -    ACPI_NOTIFY_HANDLER             Handler;
> +    UINT32                          HandlerType;        /* Type: Device/System/Both */
> +    ACPI_NOTIFY_HANDLER             Handler;            /* Handler address */
>      void                            *Context;
> +    union acpi_operand_object       *Next[2];           /* Device and System handler lists */
>
>  } ACPI_OBJECT_NOTIFY_HANDLER;
>
> @@ -476,7 +477,7 @@ typedef struct acpi_object_addr_handler
>      ACPI_NAMESPACE_NODE             *Node;              /* Parent device */
>      void                            *Context;
>      ACPI_ADR_SPACE_SETUP            Setup;
> -    union acpi_operand_object       *RegionList;        /* regions using this handler */
> +    union acpi_operand_object       *RegionList;        /* Regions using this handler */
>      union acpi_operand_object       *Next;
>
>  } ACPI_OBJECT_ADDR_HANDLER;
> diff --git a/src/acpica/source/include/acoutput.h b/src/acpica/source/include/acoutput.h
> index 12f7851..cbdbd8f 100644
> --- a/src/acpica/source/include/acoutput.h
> +++ b/src/acpica/source/include/acoutput.h
> @@ -289,6 +289,8 @@
>  #define ACPI_WARNING(plist)             AcpiWarning plist
>  #define ACPI_EXCEPTION(plist)           AcpiException plist
>  #define ACPI_ERROR(plist)               AcpiError plist
> +#define ACPI_BIOS_WARNING(plist)        AcpiBiosWarning plist
> +#define ACPI_BIOS_ERROR(plist)          AcpiBiosError plist
>  #define ACPI_DEBUG_OBJECT(obj,l,i)      AcpiExDoDebugObject(obj,l,i)
>
>  #else
> @@ -299,6 +301,8 @@
>  #define ACPI_WARNING(plist)
>  #define ACPI_EXCEPTION(plist)
>  #define ACPI_ERROR(plist)
> +#define ACPI_BIOS_WARNING(plist)
> +#define ACPI_BIOS_ERROR(plist)
>  #define ACPI_DEBUG_OBJECT(obj,l,i)
>
>  #endif /* ACPI_NO_ERROR_MESSAGES */
> diff --git a/src/acpica/source/include/acpiosxf.h b/src/acpica/source/include/acpiosxf.h
> index d6d205f..48d8aa4 100644
> --- a/src/acpica/source/include/acpiosxf.h
> +++ b/src/acpica/source/include/acpiosxf.h
> @@ -348,7 +348,7 @@ AcpiOsExecute (
>
>  void
>  AcpiOsWaitEventsComplete (
> -    void                    *Context);
> +    void);
>
>  void
>  AcpiOsSleep (
> diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
> index 2d4a5f8..036d817 100644
> --- a/src/acpica/source/include/acpixf.h
> +++ b/src/acpica/source/include/acpixf.h
> @@ -120,7 +120,7 @@
>
>  /* Current ACPICA subsystem version in YYYYMMDD format */
>
> -#define ACPI_CA_VERSION                 0x20120320
> +#define ACPI_CA_VERSION                 0x20120711
>
>  #include "acconfig.h"
>  #include "actypes.h"
> @@ -273,6 +273,22 @@ AcpiFree (
>
>
>  /*
> + * ACPI table load/unload interfaces
> + */
> +ACPI_STATUS
> +AcpiLoadTable (
> +    ACPI_TABLE_HEADER       *Table);
> +
> +ACPI_STATUS
> +AcpiUnloadParentTable (
> +    ACPI_HANDLE             Object);
> +
> +ACPI_STATUS
> +AcpiLoadTables (
> +    void);
> +
> +
> +/*
>   * ACPI table manipulation interfaces
>   */
>  ACPI_STATUS
> @@ -284,10 +300,6 @@ AcpiFindRootPointer (
>      ACPI_SIZE               *RsdpAddress);
>
>  ACPI_STATUS
> -AcpiLoadTables (
> -    void);
> -
> -ACPI_STATUS
>  AcpiGetTableHeader (
>      ACPI_STRING             Signature,
>      UINT32                  Instance,
> @@ -829,6 +841,20 @@ AcpiInfo (
>      const char              *Format,
>      ...) ACPI_PRINTF_LIKE(3);
>
> +void ACPI_INTERNAL_VAR_XFACE
> +AcpiBiosError (
> +    const char              *ModuleName,
> +    UINT32                  LineNumber,
> +    const char              *Format,
> +    ...) ACPI_PRINTF_LIKE(3);
> +
> +void ACPI_INTERNAL_VAR_XFACE
> +AcpiBiosWarning (
> +    const char              *ModuleName,
> +    UINT32                  LineNumber,
> +    const char              *Format,
> +    ...) ACPI_PRINTF_LIKE(3);
> +
>
>  /*
>   * Debug output
> diff --git a/src/acpica/source/include/acpredef.h b/src/acpica/source/include/acpredef.h
> index 82a1cb3..8da4836 100644
> --- a/src/acpica/source/include/acpredef.h
> +++ b/src/acpica/source/include/acpredef.h
> @@ -584,14 +584,14 @@ static const ACPI_PREDEFINED_INFO     PredefinedNames[] =
>      {{"_TMP", 0, ACPI_RTYPE_INTEGER}},
>      {{"_TPC", 0, ACPI_RTYPE_INTEGER}},
>      {{"_TPT", 1, 0}},
> -    {{"_TRT", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 2Ref/6Int */
> +    {{"_TRT", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 2 Ref/6 Int */
>                      {{{ACPI_PTYPE2, ACPI_RTYPE_REFERENCE, 2, ACPI_RTYPE_INTEGER}, 6, 0}},
>
> -    {{"_TSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5Int with count */
> +    {{"_TSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5 Int with count */
>                      {{{ACPI_PTYPE2_COUNT,ACPI_RTYPE_INTEGER, 5,0}, 0,0}},
>
>      {{"_TSP", 0, ACPI_RTYPE_INTEGER}},
> -    {{"_TSS", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5Int */
> +    {{"_TSS", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5 Int */
>                      {{{ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 5,0}, 0,0}},
>
>      {{"_TST", 0, ACPI_RTYPE_INTEGER}},
> diff --git a/src/acpica/source/include/actbl1.h b/src/acpica/source/include/actbl1.h
> index 6e6edcc..c046b05 100644
> --- a/src/acpica/source/include/actbl1.h
> +++ b/src/acpica/source/include/actbl1.h
> @@ -202,7 +202,7 @@ typedef struct acpi_table_bert
>  {
>      ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
>      UINT32                  RegionLength;       /* Length of the boot error region */
> -    UINT64                  Address;            /* Physical addresss of the error region */
> +    UINT64                  Address;            /* Physical address of the error region */
>
>  } ACPI_TABLE_BERT;
>
> diff --git a/src/acpica/source/include/actypes.h b/src/acpica/source/include/actypes.h
> index ff90c38..5d01e32 100644
> --- a/src/acpica/source/include/actypes.h
> +++ b/src/acpica/source/include/actypes.h
> @@ -780,10 +780,14 @@ typedef UINT32                          ACPI_EVENT_STATUS;
>  #define ACPI_DEVICE_NOTIFY              0x2
>  #define ACPI_ALL_NOTIFY                 (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY)
>  #define ACPI_MAX_NOTIFY_HANDLER_TYPE    0x3
> +#define ACPI_NUM_NOTIFY_TYPES           2
>
>  #define ACPI_MAX_SYS_NOTIFY             0x7F
>  #define ACPI_MAX_DEVICE_SPECIFIC_NOTIFY 0xBF
>
> +#define ACPI_SYSTEM_HANDLER_LIST        0 /* Used as index, must be SYSTEM_NOTIFY -1 */
> +#define ACPI_DEVICE_HANDLER_LIST        1 /* Used as index, must be DEVICE_NOTIFY -1 */
> +
>
>  /* Address Space (Operation Region) Types */
>
> @@ -799,8 +803,9 @@ typedef UINT8                           ACPI_ADR_SPACE_TYPE;
>  #define ACPI_ADR_SPACE_IPMI             (ACPI_ADR_SPACE_TYPE) 7
>  #define ACPI_ADR_SPACE_GPIO             (ACPI_ADR_SPACE_TYPE) 8
>  #define ACPI_ADR_SPACE_GSBUS            (ACPI_ADR_SPACE_TYPE) 9
> +#define ACPI_ADR_SPACE_PLATFORM_COMM    (ACPI_ADR_SPACE_TYPE) 10
>
> -#define ACPI_NUM_PREDEFINED_REGIONS     10
> +#define ACPI_NUM_PREDEFINED_REGIONS     11
>
>  /*
>   * Special Address Spaces
> diff --git a/src/acpica/source/include/acutils.h b/src/acpica/source/include/acutils.h
> index 5c21320..50b5b99 100644
> --- a/src/acpica/source/include/acutils.h
> +++ b/src/acpica/source/include/acutils.h
> @@ -501,7 +501,7 @@ AcpiUtDumpBuffer (
>      UINT8                   *Buffer,
>      UINT32                  Count,
>      UINT32                  Display,
> -    UINT32                  componentId);
> +    UINT32                  ComponentId);
>
>  void
>  AcpiUtDumpBuffer2 (
> @@ -775,6 +775,10 @@ AcpiUtShortDivide (
>  /*
>   * utmisc
>   */
> +void
> +UtConvertBackslashes (
> +    char                    *Pathname);
> +
>  const char *
>  AcpiUtValidateException (
>      ACPI_STATUS             Status);
> diff --git a/src/acpica/source/include/platform/acenv.h b/src/acpica/source/include/platform/acenv.h
> index 342615f..1f3596a 100644
> --- a/src/acpica/source/include/platform/acenv.h
> +++ b/src/acpica/source/include/platform/acenv.h
> @@ -180,9 +180,9 @@
>  #endif
>
>  #ifdef ACPI_HELP_APP
> -#define ACPI_DEBUG_OUTPUT
>  #define ACPI_APPLICATION
>  #define ACPI_SINGLE_THREADED
> +#define ACPI_NO_ERROR_MESSAGES
>  #endif
>
>  /* Linkable ACPICA library */
> @@ -252,6 +252,9 @@
>  #elif defined(_AED_EFI)
>  #include "acefi.h"
>
> +#elif defined(__HAIKU__)
> +#include "achaiku.h"
> +
>  #else
>
>  /* Unknown environment */
> diff --git a/src/acpica/source/os_specific/service_layers/osunixxf.c b/src/acpica/source/os_specific/service_layers/osunixxf.c
> index d5e3af9..840328b 100644
> --- a/src/acpica/source/os_specific/service_layers/osunixxf.c
> +++ b/src/acpica/source/os_specific/service_layers/osunixxf.c
> @@ -425,7 +425,7 @@ AcpiOsGetLine (
>      UINT32                  BufferLength,
>      UINT32                  *BytesRead)
>  {
> -    UINT8                   Temp;
> +    int                     Temp;
>      UINT32                  i;
>
>
> @@ -436,13 +436,17 @@ AcpiOsGetLine (
>              return (AE_BUFFER_OVERFLOW);
>          }
>
> -        scanf ("%1c", &Temp);
> +        if ((Temp = getchar ()) == EOF)
> +        {
> +            return (AE_ERROR);
> +        }
> +
>          if (!Temp || Temp == '\n')
>          {
>              break;
>          }
>
> -        Buffer [i] = Temp;
> +        Buffer [i] = (char) Temp;
>      }
>
>      /* Null terminate the buffer */
> @@ -1313,3 +1317,24 @@ AcpiOsExecute (
>  }
>
>  #endif /* ACPI_SINGLE_THREADED */
> +
> +
> +/******************************************************************************
> + *
> + * FUNCTION:    AcpiOsWaitEventsComplete
> + *
> + * PARAMETERS:  None
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Wait for all asynchronous events to complete. This
> + *              implementation does nothing.
> + *
> + *****************************************************************************/
> +
> +void
> +AcpiOsWaitEventsComplete (
> +    void)
> +{
> +    return;
> +}
> diff --git a/src/acpica/source/tools/acpiexec/aecommon.h b/src/acpica/source/tools/acpiexec/aecommon.h
> index 01615b1..0f5f789 100644
> --- a/src/acpica/source/tools/acpiexec/aecommon.h
> +++ b/src/acpica/source/tools/acpiexec/aecommon.h
> @@ -140,6 +140,7 @@ extern BOOLEAN              AcpiGbl_IgnoreErrors;
>  extern UINT8                AcpiGbl_RegionFillValue;
>  extern UINT8                AcpiGbl_UseHwReducedFadt;
>  extern BOOLEAN              AcpiGbl_DisplayRegionAccess;
> +extern BOOLEAN              AcpiGbl_DoInterfaceTests;
>
>  /* Check for unexpected exceptions */
>
> diff --git a/src/acpica/source/tools/acpiexec/aehandlers.c b/src/acpica/source/tools/acpiexec/aehandlers.c
> index ccf6966..ba7e5a1 100644
> --- a/src/acpica/source/tools/acpiexec/aehandlers.c
> +++ b/src/acpica/source/tools/acpiexec/aehandlers.c
> @@ -121,12 +121,24 @@
>  /* Local prototypes */
>
>  static void
> -AeNotifyHandler (
> +AeNotifyHandler1 (
>      ACPI_HANDLE             Device,
>      UINT32                  Value,
>      void                    *Context);
>
>  static void
> +AeNotifyHandler2 (
> +    ACPI_HANDLE             Device,
> +    UINT32                  Value,
> +    void                    *Context);
> +
> +static void
> +AeCommonNotifyHandler (
> +    ACPI_HANDLE             Device,
> +    UINT32                  Value,
> +    UINT32                  HandlerId);
> +
> +static void
>  AeDeviceNotifyHandler (
>      ACPI_HANDLE             Device,
>      UINT32                  Value,
> @@ -258,24 +270,51 @@ AeCtrlCHandler (
>
>  /******************************************************************************
>   *
> - * FUNCTION:    AeNotifyHandler
> + * FUNCTION:    AeNotifyHandler(s)
>   *
>   * PARAMETERS:  Standard notify handler parameters
>   *
>   * RETURN:      Status
>   *
> - * DESCRIPTION: System notify handler for AcpiExec utility.  Used by the ASL
> + * DESCRIPTION: Notify handlers for AcpiExec utility. Used by the ASL
>   *              test suite(s) to communicate errors and other information to
> - *              this utility via the Notify() operator.
> + *              this utility via the Notify() operator. Tests notify handling
> + *              and multiple notify handler support.
>   *
>   *****************************************************************************/
>
>  static void
> -AeNotifyHandler (
> -    ACPI_HANDLE                 Device,
> -    UINT32                      Value,
> -    void                        *Context)
> +AeNotifyHandler1 (
> +    ACPI_HANDLE             Device,
> +    UINT32                  Value,
> +    void                    *Context)
> +{
> +    AeCommonNotifyHandler (Device, Value, 1);
> +}
> +
> +static void
> +AeNotifyHandler2 (
> +    ACPI_HANDLE             Device,
> +    UINT32                  Value,
> +    void                    *Context)
>  {
> +    AeCommonNotifyHandler (Device, Value, 2);
> +}
> +
> +static void
> +AeCommonNotifyHandler (
> +    ACPI_HANDLE             Device,
> +    UINT32                  Value,
> +    UINT32                  HandlerId)
> +{
> +    char                    *Type;
> +
> +
> +    Type = "Device";
> +    if (Value <= ACPI_MAX_SYS_NOTIFY)
> +    {
> +        Type = "System";
> +    }
>
>      switch (Value)
>      {
> @@ -309,12 +348,13 @@ AeNotifyHandler (
>  #endif
>
>      default:
> -        printf ("[AcpiExec] Received a System Notify on [%4.4s] %p Value 0x%2.2X (%s)\n",
> -            AcpiUtGetNodeName (Device), Device, Value,
> +        printf ("[AcpiExec] Handler %u: Received a %s Notify on [%4.4s] %p Value 0x%2.2X (%s)\n",
> +            HandlerId, Type, AcpiUtGetNodeName (Device), Device, Value,
>              AcpiUtGetNotifyName (Value));
>          if (AcpiGbl_DebugFile)
>          {
> -            AcpiOsPrintf ("[AcpiExec] Received a system notify, Value 0x%2.2X\n", Value);
> +            AcpiOsPrintf ("[AcpiExec] Handler %u: Received a %s notify, Value 0x%2.2X\n",
> +                HandlerId, Type, Value);
>          }
>
>          (void) AcpiEvaluateObject (Device, "_NOT", NULL, NULL);
> @@ -325,6 +365,39 @@ AeNotifyHandler (
>
>  /******************************************************************************
>   *
> + * FUNCTION:    AeSystemNotifyHandler
> + *
> + * PARAMETERS:  Standard notify handler parameters
> + *
> + * RETURN:      Status
> + *
> + * DESCRIPTION: System notify handler for AcpiExec utility.  Used by the ASL
> + *              test suite(s) to communicate errors and other information to
> + *              this utility via the Notify() operator.
> + *
> + *****************************************************************************/
> +
> +static void
> +AeSystemNotifyHandler (
> +    ACPI_HANDLE                 Device,
> +    UINT32                      Value,
> +    void                        *Context)
> +{
> +
> +    printf ("[AcpiExec] Global:    Received a System Notify on [%4.4s] %p Value 0x%2.2X (%s)\n",
> +        AcpiUtGetNodeName (Device), Device, Value,
> +        AcpiUtGetNotifyName (Value));
> +    if (AcpiGbl_DebugFile)
> +    {
> +        AcpiOsPrintf ("[AcpiExec] Global:    Received a System Notify, Value 0x%2.2X\n", Value);
> +    }
> +
> +    (void) AcpiEvaluateObject (Device, "_NOT", NULL, NULL);
> +}
> +
> +
> +/******************************************************************************
> + *
>   * FUNCTION:    AeDeviceNotifyHandler
>   *
>   * PARAMETERS:  Standard notify handler parameters
> @@ -344,12 +417,12 @@ AeDeviceNotifyHandler (
>      void                        *Context)
>  {
>
> -    printf ("[AcpiExec] Received a Device Notify on [%4.4s] %p Value 0x%2.2X (%s)\n",
> +    printf ("[AcpiExec] Global:    Received a Device Notify on [%4.4s] %p Value 0x%2.2X (%s)\n",
>          AcpiUtGetNodeName (Device), Device, Value,
>          AcpiUtGetNotifyName (Value));
>      if (AcpiGbl_DebugFile)
>      {
> -        AcpiOsPrintf ("[AcpiExec] Received a device notify, Value 0x%2.2X\n", Value);
> +        AcpiOsPrintf ("[AcpiExec] Global:    Received a Device Notify, Value 0x%2.2X\n", Value);
>      }
>
>      (void) AcpiEvaluateObject (Device, "_NOT", NULL, NULL);
> @@ -759,18 +832,18 @@ AeInstallEarlyHandlers (
>              AcpiFormatException (Status));
>      }
>
> -    /* Install global notify handler */
> +    /* Install global notify handlers */
>
>      Status = AcpiInstallNotifyHandler (ACPI_ROOT_OBJECT, ACPI_SYSTEM_NOTIFY,
> -                                        AeNotifyHandler, NULL);
> +        AeSystemNotifyHandler, NULL);
>      if (ACPI_FAILURE (Status))
>      {
> -        printf ("Could not install a global notify handler, %s\n",
> +        printf ("Could not install a global system notify handler, %s\n",
>              AcpiFormatException (Status));
>      }
>
>      Status = AcpiInstallNotifyHandler (ACPI_ROOT_OBJECT, ACPI_DEVICE_NOTIFY,
> -                                        AeDeviceNotifyHandler, NULL);
> +        AeDeviceNotifyHandler, NULL);
>      if (ACPI_FAILURE (Status))
>      {
>          printf ("Could not install a global notify handler, %s\n",
> @@ -781,7 +854,7 @@ AeInstallEarlyHandlers (
>      if (ACPI_SUCCESS (Status))
>      {
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
> -                                            AeNotifyHandler, NULL);
> +            AeNotifyHandler1, NULL);
>          if (ACPI_FAILURE (Status))
>          {
>              printf ("Could not install a notify handler, %s\n",
> @@ -789,7 +862,7 @@ AeInstallEarlyHandlers (
>          }
>
>          Status = AcpiRemoveNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
> -                                            AeNotifyHandler);
> +            AeNotifyHandler1);
>          if (ACPI_FAILURE (Status))
>          {
>              printf ("Could not remove a notify handler, %s\n",
> @@ -797,20 +870,35 @@ AeInstallEarlyHandlers (
>          }
>
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> -                                            AeNotifyHandler, NULL);
> +            AeNotifyHandler1, NULL);
>          AE_CHECK_OK (AcpiInstallNotifyHandler, Status);
>
>          Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> -                                            AeNotifyHandler);
> +            AeNotifyHandler1);
>          AE_CHECK_OK (AcpiRemoveNotifyHandler, Status);
>
> +#if 0
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> -                                            AeNotifyHandler, NULL);
> +            AeNotifyHandler1, NULL);
>          if (ACPI_FAILURE (Status))
>          {
>              printf ("Could not install a notify handler, %s\n",
>                  AcpiFormatException (Status));
>          }
> +#endif
> +
> +        /* Install two handlers for _SB_ */
> +
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
> +            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
> +            AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +
> +        /* Attempt duplicate handler installation, should fail */
> +
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
> +            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x77777777));
>
>          Status = AcpiAttachData (Handle, AeAttachedDataHandler, Handle);
>          AE_CHECK_OK (AcpiAttachData, Status);
> @@ -827,6 +915,37 @@ AeInstallEarlyHandlers (
>      }
>
>
> +    Status = AcpiGetHandle (NULL, "\\_TZ.TZ1", &Handle);
> +    if (ACPI_SUCCESS (Status))
> +    {
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> +            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> +            AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +
> +        Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> +            AeNotifyHandler1);
> +        Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> +            AeNotifyHandler2);
> +
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> +            AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> +            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +    }
> +
> +    Status = AcpiGetHandle (NULL, "\\_PR.CPU0", &Handle);
> +    if (ACPI_SUCCESS (Status))
> +    {
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
> +            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +
> +        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
> +            AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +    }
> +
>      /*
>       * Install handlers that will override the default handlers for some of
>       * the space IDs.
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
diff mbox

Patch

diff --git a/src/acpica/Makefile.am b/src/acpica/Makefile.am
index 3187432..e2213d5 100644
--- a/src/acpica/Makefile.am
+++ b/src/acpica/Makefile.am
@@ -175,6 +175,7 @@  libfwtsacpica_la_SOURCES = \
 	$(ACPICA_COMP)/tables/tbutils.c \
 	$(ACPICA_COMP)/tables/tbxface.c \
 	$(ACPICA_COMP)/tables/tbxfroot.c \
+	$(ACPICA_COMP)/tables/tbxfload.c \
 	$(ACPICA_COMP)/utilities/utaddress.c \
 	$(ACPICA_COMP)/utilities/utalloc.c \
 	$(ACPICA_COMP)/utilities/utcache.c \
@@ -197,6 +198,7 @@  libfwtsacpica_la_SOURCES = \
 	$(ACPICA_COMP)/utilities/utxferror.c \
 	$(ACPICA_COMP)/utilities/utxface.c \
 	$(ACPICA_COMP)/utilities/utdecode.c \
+	$(ACPICA_COMP)/utilities/utexcep.c \
 	$(ACPICA_SRC)/tools/acpiexec/aehandlers.c
 
 libfwtsacpica_la_LIBADD = \
diff --git a/src/acpica/source/common/adfile.c b/src/acpica/source/common/adfile.c
index f4e33e2..36c3176 100644
--- a/src/acpica/source/common/adfile.c
+++ b/src/acpica/source/common/adfile.c
@@ -370,20 +370,24 @@  FlSplitInputPathname (
         return (AE_NO_MEMORY);
     }
 
-    Substring = strrchr (DirectoryPath, '\\');
+    /* Convert backslashes to slashes in the entire path */
+
+    UtConvertBackslashes (DirectoryPath);
+
+    /* Backup to last slash or colon */
+
+    Substring = strrchr (DirectoryPath, '/');
     if (!Substring)
     {
-        Substring = strrchr (DirectoryPath, '/');
-        if (!Substring)
-        {
-            Substring = strrchr (DirectoryPath, ':');
-        }
+        Substring = strrchr (DirectoryPath, ':');
     }
 
+    /* Extract the simple filename */
+
     if (!Substring)
     {
+        Filename = FlStrdup (DirectoryPath);
         DirectoryPath[0] = 0;
-        Filename = FlStrdup (InputPath);
     }
     else
     {
@@ -398,7 +402,6 @@  FlSplitInputPathname (
 
     *OutDirectoryPath = DirectoryPath;
     *OutFilename = Filename;
-
     return (AE_OK);
 }
 
diff --git a/src/acpica/source/common/adwalk.c b/src/acpica/source/common/adwalk.c
index eeb61d8..00d9bb6 100644
--- a/src/acpica/source/common/adwalk.c
+++ b/src/acpica/source/common/adwalk.c
@@ -593,6 +593,7 @@  AcpiDmFindOrphanDescending (
 
         if ((OpInfo->Class != AML_CLASS_EXECUTE) &&
             (OpInfo->Class != AML_CLASS_CREATE) &&
+            (OpInfo->ObjectType != ACPI_TYPE_LOCAL_ALIAS) &&
             (ParentOp->Common.AmlOpcode != AML_INT_METHODCALL_OP) &&
             !Op->Common.Node)
         {
@@ -815,13 +816,23 @@  AcpiDmXrefDescendingOp (
 
     if (OpInfo->Flags & AML_NAMED)
     {
-        if ((Op->Common.AmlOpcode == AML_ALIAS_OP) ||
-            (Op->Common.AmlOpcode == AML_SCOPE_OP))
+        /*
+         * Only these two operators (Alias, Scope) refer to an existing
+         * name, it is the first argument
+         */
+        if (Op->Common.AmlOpcode == AML_ALIAS_OP)
+        {
+            ObjectType = ACPI_TYPE_ANY;
+
+            NextOp = Op->Common.Value.Arg;
+            NextOp = NextOp->Common.Value.Arg;
+            if (NextOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
+            {
+                Path = NextOp->Common.Value.String;
+            }
+        }
+        else if (Op->Common.AmlOpcode == AML_SCOPE_OP)
         {
-            /*
-             * Only these two operators refer to an existing name,
-             * first argument
-             */
             Path = (char *) Op->Named.Path;
         }
     }
@@ -829,6 +840,8 @@  AcpiDmXrefDescendingOp (
     {
         /* Referenced Buffer Name is the first child */
 
+        ObjectType = ACPI_TYPE_BUFFER; /* Change from TYPE_BUFFER_FIELD */
+
         NextOp = Op->Common.Value.Arg;
         if (NextOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
         {
@@ -855,6 +868,11 @@  AcpiDmXrefDescendingOp (
     Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY,
                 ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
                 WalkState, &Node);
+    if (ACPI_SUCCESS (Status) && (Node->Flags & ANOBJ_IS_EXTERNAL))
+    {
+        Status = AE_NOT_FOUND;
+    }
+
     if (ACPI_FAILURE (Status))
     {
         if (Status == AE_NOT_FOUND)
diff --git a/src/acpica/source/common/dmextern.c b/src/acpica/source/common/dmextern.c
index 8b8402e..622db8a 100644
--- a/src/acpica/source/common/dmextern.c
+++ b/src/acpica/source/common/dmextern.c
@@ -293,8 +293,10 @@  AcpiDmNormalizeParentPrefix (
      */
     ACPI_STRCAT (Fullpath, ParentPath);
 
-    /* Add dot separator (don't need dot if parent fullpath is a single "\") */
-
+    /*
+     * Add dot separator
+     * (don't need dot if parent fullpath is a single backslash)
+     */
     if (ParentPath[1])
     {
         ACPI_STRCAT (Fullpath, ".");
@@ -526,12 +528,12 @@  AcpiDmAddToExternalList (
 
     NewExternal->InternalPath = Path;
 
-    /* Link the new descriptor into the global list, ordered by string length */
+    /* Link the new descriptor into the global list, alphabetically ordered */
 
     NextExternal = AcpiGbl_ExternalList;
     while (NextExternal)
     {
-        if (NewExternal->Length <= NextExternal->Length)
+        if (AcpiUtStricmp (NewExternal->Path, NextExternal->Path) < 0)
         {
             if (PrevExternal)
             {
@@ -580,7 +582,7 @@  AcpiDmAddExternalsToNamespace (
 {
     ACPI_STATUS             Status;
     ACPI_NAMESPACE_NODE     *Node;
-    ACPI_OPERAND_OBJECT     *MethodDesc;
+    ACPI_OPERAND_OBJECT     *ObjDesc;
     ACPI_EXTERNAL_LIST      *External = AcpiGbl_ExternalList;
 
 
@@ -599,13 +601,29 @@  AcpiDmAddExternalsToNamespace (
                 "while adding external to namespace [%s]",
                 External->Path));
         }
-        else if (External->Type == ACPI_TYPE_METHOD)
+
+        else switch (External->Type)
         {
+        case ACPI_TYPE_METHOD:
+
             /* For methods, we need to save the argument count */
 
-            MethodDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD);
-            MethodDesc->Method.ParamCount = (UINT8) External->Value;
-            Node->Object = MethodDesc;
+            ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD);
+            ObjDesc->Method.ParamCount = (UINT8) External->Value;
+            Node->Object = ObjDesc;
+            break;
+
+        case ACPI_TYPE_REGION:
+
+            /* Regions require a region sub-object */
+
+            ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION);
+            ObjDesc->Region.Node = Node;
+            Node->Object = ObjDesc;
+            break;
+
+        default:
+            break;
         }
 
         External = External->Next;
diff --git a/src/acpica/source/common/dmrestag.c b/src/acpica/source/common/dmrestag.c
index 1f0c5fb..9afaad3 100644
--- a/src/acpica/source/common/dmrestag.c
+++ b/src/acpica/source/common/dmrestag.c
@@ -145,6 +145,7 @@  AcpiDmGetResourceTag (
 
 static char *
 AcpiGetTagPathname (
+    ACPI_PARSE_OBJECT       *Op,
     ACPI_NAMESPACE_NODE     *BufferNode,
     ACPI_NAMESPACE_NODE     *ResourceNode,
     UINT32                  BitIndex);
@@ -515,7 +516,6 @@  AcpiDmCheckResourceReference (
     ACPI_NAMESPACE_NODE     *BufferNode;
     ACPI_NAMESPACE_NODE     *ResourceNode;
     const ACPI_OPCODE_INFO  *OpInfo;
-    char                    *Pathname;
     UINT32                  BitIndex;
 
 
@@ -591,14 +591,7 @@  AcpiDmCheckResourceReference (
 
     /* Translate the Index to a resource tag pathname */
 
-    Pathname = AcpiGetTagPathname (BufferNode, ResourceNode, BitIndex);
-    if (Pathname)
-    {
-        /* Complete the conversion of the Index to a symbol */
-
-        IndexOp->Common.AmlOpcode = AML_INT_NAMEPATH_OP;
-        IndexOp->Common.Value.String = Pathname;
-    }
+    AcpiGetTagPathname (IndexOp, BufferNode, ResourceNode, BitIndex);
 }
 
 
@@ -669,6 +662,7 @@  AcpiDmGetResourceNode (
 
 static char *
 AcpiGetTagPathname (
+    ACPI_PARSE_OBJECT       *IndexOp,
     ACPI_NAMESPACE_NODE     *BufferNode,
     ACPI_NAMESPACE_NODE     *ResourceNode,
     UINT32                  BitIndex)
@@ -761,6 +755,15 @@  AcpiGetTagPathname (
 
     AcpiNsInternalizeName (Pathname, &InternalPath);
     ACPI_FREE (Pathname);
+
+    /* Update the Op with the symbol */
+
+    AcpiPsInitOp (IndexOp, AML_INT_NAMEPATH_OP);
+    IndexOp->Common.Value.String = InternalPath;
+
+    /* We will need the tag later. Cheat by putting it in the Node field */
+
+    IndexOp->Common.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Tag);
     return (InternalPath);
 }
 
diff --git a/src/acpica/source/compiler/Makefile.am b/src/acpica/source/compiler/Makefile.am
index cee1f4f..b7a72c9 100644
--- a/src/acpica/source/compiler/Makefile.am
+++ b/src/acpica/source/compiler/Makefile.am
@@ -183,6 +183,7 @@  libfwtsiasl_la_SOURCES = \
 	$(ACPICA_COMMON)/adfile.c \
 	$(ACPICA_COMMON)/adisasm.c \
 	$(ACPICA_COMMON)/adwalk.c \
+	$(ACPICA_COMMON)/ahpredef.c \
 	$(ACPICA_COMMON)/dmextern.c \
 	$(ACPICA_COMMON)/dmrestag.c \
 	$(ACPICA_COMMON)/dmtable.c \
diff --git a/src/acpica/source/compiler/aslcompile.c b/src/acpica/source/compiler/aslcompile.c
index 371a6e3..623bc3d 100644
--- a/src/acpica/source/compiler/aslcompile.c
+++ b/src/acpica/source/compiler/aslcompile.c
@@ -131,14 +131,18 @@  CmFlushSourceCode (
 
 static void
 FlConsumeAnsiComment (
-    ASL_FILE_INFO           *FileInfo,
+    FILE                    *Handle,
     ASL_FILE_STATUS         *Status);
 
 static void
 FlConsumeNewComment (
-    ASL_FILE_INFO           *FileInfo,
+    FILE                    *Handle,
     ASL_FILE_STATUS         *Status);
 
+static void
+CmDumpAllEvents (
+    void);
+
 
 /*******************************************************************************
  *
@@ -325,7 +329,8 @@  CmFlushSourceCode (
  *
  * FUNCTION:    FlConsume*
  *
- * PARAMETERS:  FileInfo        - Points to an open input file
+ * PARAMETERS:  Handle              - Open input file
+ *              Status              - File current status struct
  *
  * RETURN:      Number of lines consumed
  *
@@ -335,14 +340,14 @@  CmFlushSourceCode (
 
 static void
 FlConsumeAnsiComment (
-    ASL_FILE_INFO           *FileInfo,
+    FILE                    *Handle,
     ASL_FILE_STATUS         *Status)
 {
     UINT8                   Byte;
     BOOLEAN                 ClosingComment = FALSE;
 
 
-    while (fread (&Byte, 1, 1, FileInfo->Handle))
+    while (fread (&Byte, 1, 1, Handle))
     {
         /* Scan until comment close is found */
 
@@ -379,13 +384,13 @@  FlConsumeAnsiComment (
 
 static void
 FlConsumeNewComment (
-    ASL_FILE_INFO           *FileInfo,
+    FILE                    *Handle,
     ASL_FILE_STATUS         *Status)
 {
     UINT8                   Byte;
 
 
-    while (fread (&Byte, 1, 1, FileInfo->Handle))
+    while (fread (&Byte, 1, 1, Handle))
     {
         Status->Offset++;
 
@@ -404,7 +409,9 @@  FlConsumeNewComment (
  *
  * FUNCTION:    FlCheckForAscii
  *
- * PARAMETERS:  FileInfo        - Points to an open input file
+ * PARAMETERS:  Handle              - Open input file
+ *              Filename            - Input filename
+ *              DisplayErrors       - TRUE if error messages desired
  *
  * RETURN:      Status
  *
@@ -419,7 +426,9 @@  FlConsumeNewComment (
 
 ACPI_STATUS
 FlCheckForAscii (
-    ASL_FILE_INFO           *FileInfo)
+    FILE                    *Handle,
+    char                    *Filename,
+    BOOLEAN                 DisplayErrors)
 {
     UINT8                   Byte;
     ACPI_SIZE               BadBytes = 0;
@@ -432,7 +441,7 @@  FlCheckForAscii (
 
     /* Read the entire file */
 
-    while (fread (&Byte, 1, 1, FileInfo->Handle))
+    while (fread (&Byte, 1, 1, Handle))
     {
         /* Ignore comment fields (allow non-ascii within) */
 
@@ -442,12 +451,12 @@  FlCheckForAscii (
 
             if (Byte == '*')
             {
-                FlConsumeAnsiComment (FileInfo, &Status);
+                FlConsumeAnsiComment (Handle, &Status);
             }
 
             if (Byte == '/')
             {
-                FlConsumeNewComment (FileInfo, &Status);
+                FlConsumeNewComment (Handle, &Status);
             }
 
             /* Reset */
@@ -463,7 +472,7 @@  FlCheckForAscii (
 
         if (!ACPI_IS_ASCII (Byte))
         {
-            if (BadBytes < 10)
+            if ((BadBytes < 10) && (DisplayErrors))
             {
                 AcpiOsPrintf (
                     "Non-ASCII character [0x%2.2X] found in line %u, file offset 0x%.2X\n",
@@ -485,20 +494,24 @@  FlCheckForAscii (
 
     /* Seek back to the beginning of the source file */
 
-    fseek (FileInfo->Handle, 0, SEEK_SET);
+    fseek (Handle, 0, SEEK_SET);
 
     /* Were there any non-ASCII characters in the file? */
 
     if (BadBytes)
     {
-        AcpiOsPrintf (
-            "%u non-ASCII characters found in input source text, could be a binary file\n",
-            BadBytes);
-        AslError (ASL_ERROR, ASL_MSG_NON_ASCII, NULL, FileInfo->Filename);
+        if (DisplayErrors)
+        {
+            AcpiOsPrintf (
+                "%u non-ASCII characters found in input source text, could be a binary file\n",
+                BadBytes);
+            AslError (ASL_ERROR, ASL_MSG_NON_ASCII, NULL, Filename);
+        }
+
         return (AE_BAD_CHARACTER);
     }
 
-    /* File is OK */
+    /* File is OK (100% ASCII) */
 
     return (AE_OK);
 }
@@ -780,45 +793,65 @@  CmDoOutputFiles (
 
 /*******************************************************************************
  *
- * FUNCTION:    CmDumpEvent
+ * FUNCTION:    CmDumpAllEvents
  *
- * PARAMETERS:  Event           - A compiler event struct
+ * PARAMETERS:  None
  *
  * RETURN:      None.
  *
- * DESCRIPTION: Dump a compiler event struct
+ * DESCRIPTION: Dump all compiler events
  *
  ******************************************************************************/
 
 static void
-CmDumpEvent (
-    ASL_EVENT_INFO          *Event)
+CmDumpAllEvents (
+    void)
 {
+    ASL_EVENT_INFO          *Event;
     UINT32                  Delta;
     UINT32                  USec;
     UINT32                  MSec;
+    UINT32                  i;
 
-    if (!Event->Valid)
+
+    Event = AslGbl_Events;
+
+    DbgPrint (ASL_DEBUG_OUTPUT, "\n\nElapsed time for major events\n\n");
+    if (Gbl_CompileTimesFlag)
     {
-        return;
+        printf ("\nElapsed time for major events\n\n");
     }
 
-    /* Delta will be in 100-nanosecond units */
+    for (i = 0; i < AslGbl_NextEvent; i++)
+    {
+        if (Event->Valid)
+        {
+            /* Delta will be in 100-nanosecond units */
 
-    Delta = (UINT32) (Event->EndTime - Event->StartTime);
+            Delta = (UINT32) (Event->EndTime - Event->StartTime);
 
-    USec = Delta / 10;
-    MSec = Delta / 10000;
+            USec = Delta / 10;
+            MSec = Delta / 10000;
 
-    /* Round milliseconds up */
+            /* Round milliseconds up */
 
-    if ((USec - (MSec * 1000)) >= 500)
-    {
-        MSec++;
-    }
+            if ((USec - (MSec * 1000)) >= 500)
+            {
+                MSec++;
+            }
 
-    DbgPrint (ASL_DEBUG_OUTPUT, "%8u usec %8u msec - %s\n",
-        USec, MSec, Event->EventName);
+            DbgPrint (ASL_DEBUG_OUTPUT, "%8u usec %8u msec - %s\n",
+                USec, MSec, Event->EventName);
+
+            if (Gbl_CompileTimesFlag)
+            {
+                printf ("%8u usec %8u msec - %s\n",
+                    USec, MSec, Event->EventName);
+            }
+        }
+
+        Event++;
+    }
 }
 
 
@@ -849,20 +882,12 @@  CmCleanupAndExit (
         AePrintErrorLog (ASL_FILE_STDOUT);
     }
 
-    DbgPrint (ASL_DEBUG_OUTPUT, "\n\nElapsed time for major events\n\n");
-    for (i = 0; i < AslGbl_NextEvent; i++)
-    {
-        CmDumpEvent (&AslGbl_Events[i]);
-    }
+    /* Emit compile times if enabled */
+
+    CmDumpAllEvents ();
 
     if (Gbl_CompileTimesFlag)
     {
-        printf ("\nElapsed time for major events\n\n");
-        for (i = 0; i < AslGbl_NextEvent; i++)
-        {
-            CmDumpEvent (&AslGbl_Events[i]);
-        }
-
         printf ("\nMiscellaneous compile statistics\n\n");
         printf ("%11u : %s\n", TotalParseNodes, "Parse nodes");
         printf ("%11u : %s\n", Gbl_NsLookupCount, "Namespace searches");
diff --git a/src/acpica/source/compiler/aslcompiler.h b/src/acpica/source/compiler/aslcompiler.h
index 29558fc..03303f5 100644
--- a/src/acpica/source/compiler/aslcompiler.h
+++ b/src/acpica/source/compiler/aslcompiler.h
@@ -238,7 +238,9 @@  CmCleanupAndExit (
 
 ACPI_STATUS
 FlCheckForAscii (
-    ASL_FILE_INFO           *FileInfo);
+    FILE                    *Handle,
+    char                    *Filename,
+    BOOLEAN                 DisplayErrors);
 
 
 /*
@@ -680,6 +682,11 @@  void
 FlAddIncludeDirectory (
     char                    *Dir);
 
+char *
+FlMergePathnames (
+    char                    *PrefixDir,
+    char                    *FilePathname);
+
 void
 FlOpenIncludeFile (
     ACPI_PARSE_OBJECT       *Op);
diff --git a/src/acpica/source/compiler/aslcompiler.l b/src/acpica/source/compiler/aslcompiler.l
index f911072..98f9e7e 100644
--- a/src/acpica/source/compiler/aslcompiler.l
+++ b/src/acpica/source/compiler/aslcompiler.l
@@ -595,6 +595,7 @@  NamePathTail                [.]{NameSeg}
 "IPMI"                      { count (0); return (PARSEOP_REGIONSPACE_IPMI); }
 "GeneralPurposeIo"          { count (0); return (PARSEOP_REGIONSPACE_GPIO); }       /* ACPI 5.0 */
 "GenericSerialBus"          { count (0); return (PARSEOP_REGIONSPACE_GSBUS); }      /* ACPI 5.0 */
+"PCC"                       { count (0); return (PARSEOP_REGIONSPACE_PCC); }        /* ACPI 5.0 */
 "FFixedHW"                  { count (0); return (PARSEOP_REGIONSPACE_FFIXEDHW); }
 
     /* ResourceTypeKeyword: Resource Usage - Resource Descriptors */
diff --git a/src/acpica/source/compiler/aslcompiler.y b/src/acpica/source/compiler/aslcompiler.y
index 9aa8b51..9675b1d 100644
--- a/src/acpica/source/compiler/aslcompiler.y
+++ b/src/acpica/source/compiler/aslcompiler.y
@@ -435,6 +435,7 @@  void *                      AslLocalAllocate (unsigned int Size);
 %token <i> PARSEOP_REGIONSPACE_IO
 %token <i> PARSEOP_REGIONSPACE_IPMI
 %token <i> PARSEOP_REGIONSPACE_MEM
+%token <i> PARSEOP_REGIONSPACE_PCC
 %token <i> PARSEOP_REGIONSPACE_PCI
 %token <i> PARSEOP_REGIONSPACE_PCIBAR
 %token <i> PARSEOP_REGIONSPACE_SMBUS
@@ -2271,7 +2272,7 @@  AddressKeyword
     ;
 
 AddressSpaceKeyword
-    : ByteConst                             {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);}
+    : ByteConst                             {$$ = UtCheckIntegerRange ($1, 0x0A, 0xFF);}
     | RegionSpaceKeyword                    {}
     ;
 
@@ -2431,6 +2432,7 @@  RegionSpaceKeyword
     | PARSEOP_REGIONSPACE_IPMI              {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_IPMI);}
     | PARSEOP_REGIONSPACE_GPIO              {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GPIO);}
     | PARSEOP_REGIONSPACE_GSBUS             {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GSBUS);}
+    | PARSEOP_REGIONSPACE_PCC               {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCC);}
     | PARSEOP_REGIONSPACE_FFIXEDHW          {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_FFIXEDHW);}
     ;
 
diff --git a/src/acpica/source/compiler/aslerror.c b/src/acpica/source/compiler/aslerror.c
index c93a1a2..4d7c846 100644
--- a/src/acpica/source/compiler/aslerror.c
+++ b/src/acpica/source/compiler/aslerror.c
@@ -387,12 +387,16 @@  AePrintException (
         }
         else
         {
+            /*
+             * Less verbose version of the error message, enabled via the
+             * -vi switch. The format is compatible with MS Visual Studio.
+             */
             fprintf (OutputFile, "%s", Enode->Filename);
 
             if (Enode->LineNumber)
             {
-                fprintf (OutputFile, "(%u) i:%6u : ",
-                    Enode->LineNumber, Enode->LineNumber);
+                fprintf (OutputFile, "(%u) : ",
+                    Enode->LineNumber);
             }
         }
     }
@@ -407,9 +411,18 @@  AePrintException (
     {
         /* Decode the message ID */
 
-        fprintf (OutputFile, "%s %4.4d - ",
-                    AslErrorLevel[Enode->Level],
-                    Enode->MessageId + ((Enode->Level+1) * 1000));
+        if (Gbl_VerboseErrors)
+        {
+            fprintf (OutputFile, "%s %4.4d -",
+                        AslErrorLevel[Enode->Level],
+                        Enode->MessageId + ((Enode->Level+1) * 1000));
+        }
+        else /* IDE case */
+        {
+            fprintf (OutputFile, "%s %4.4d:",
+                        AslErrorLevelIde[Enode->Level],
+                        Enode->MessageId + ((Enode->Level+1) * 1000));
+        }
 
         MainMessage = AslMessages[Enode->MessageId];
         ExtraMessage = Enode->Message;
diff --git a/src/acpica/source/compiler/aslfiles.c b/src/acpica/source/compiler/aslfiles.c
index ef10668..a2512a6 100644
--- a/src/acpica/source/compiler/aslfiles.c
+++ b/src/acpica/source/compiler/aslfiles.c
@@ -564,6 +564,107 @@  FlAddIncludeDirectory (
 
 /*******************************************************************************
  *
+ * FUNCTION:    FlMergePathnames
+ *
+ * PARAMETERS:  PrefixDir       - Prefix directory pathname. Can be NULL or
+ *                                a zero length string.
+ *              FilePathname    - The include filename from the source ASL.
+ *
+ * RETURN:      Merged pathname string
+ *
+ * DESCRIPTION: Merge two pathnames that (probably) have common elements, to
+ *              arrive at a minimal length string. Merge can occur if the
+ *              FilePathname is relative to the PrefixDir.
+ *
+ ******************************************************************************/
+
+char *
+FlMergePathnames (
+    char                    *PrefixDir,
+    char                    *FilePathname)
+{
+    char                    *CommonPath;
+    char                    *Pathname;
+    char                    *LastElement;
+
+
+    DbgPrint (ASL_PARSE_OUTPUT, "Include: Prefix path - \"%s\"\n"
+        "Include: FilePathname - \"%s\"\n",
+         PrefixDir, FilePathname);
+
+    /*
+     * If there is no prefix directory or if the file pathname is absolute,
+     * just return the original file pathname
+     */
+    if (!PrefixDir || (!*PrefixDir) ||
+        (*FilePathname == '/') ||
+         (FilePathname[1] == ':'))
+    {
+        Pathname = ACPI_ALLOCATE (strlen (FilePathname) + 1);
+        strcpy (Pathname, FilePathname);
+        goto ConvertBackslashes;
+    }
+
+    /* Need a local copy of the prefix directory path */
+
+    CommonPath = ACPI_ALLOCATE (strlen (PrefixDir) + 1);
+    strcpy (CommonPath, PrefixDir);
+
+    /*
+     * Walk forward through the file path, and simultaneously backward
+     * through the prefix directory path until there are no more
+     * relative references at the start of the file path.
+     */
+    while (*FilePathname && (!strncmp (FilePathname, "../", 3)))
+    {
+        /* Remove last element of the prefix directory path */
+
+        LastElement = strrchr (CommonPath, '/');
+        if (!LastElement)
+        {
+            goto ConcatenatePaths;
+        }
+
+        *LastElement = 0;   /* Terminate CommonPath string */
+        FilePathname += 3;  /* Point to next path element */
+    }
+
+    /*
+     * Remove the last element of the prefix directory path (it is the same as
+     * the first element of the file pathname), and build the final merged
+     * pathname.
+     */
+    LastElement = strrchr (CommonPath, '/');
+    if (LastElement)
+    {
+        *LastElement = 0;
+    }
+
+    /* Build the final merged pathname */
+
+ConcatenatePaths:
+    Pathname = ACPI_ALLOCATE_ZEROED (strlen (CommonPath) + strlen (FilePathname) + 2);
+    if (LastElement && *CommonPath)
+    {
+        strcpy (Pathname, CommonPath);
+        strcat (Pathname, "/");
+    }
+    strcat (Pathname, FilePathname);
+    ACPI_FREE (CommonPath);
+
+    /* Convert all backslashes to normal slashes */
+
+ConvertBackslashes:
+    UtConvertBackslashes (Pathname);
+
+    DbgPrint (ASL_PARSE_OUTPUT, "Include: Merged Pathname - \"%s\"\n",
+         Pathname);
+    return (Pathname);
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    FlOpenIncludeWithPrefix
  *
  * PARAMETERS:  PrefixDir       - Prefix directory pathname. Can be a zero
@@ -587,12 +688,9 @@  FlOpenIncludeWithPrefix (
 
     /* Build the full pathname to the file */
 
-    Pathname = ACPI_ALLOCATE (strlen (PrefixDir) + strlen (Filename) + 1);
-
-    strcpy (Pathname, PrefixDir);
-    strcat (Pathname, Filename);
+    Pathname = FlMergePathnames (PrefixDir, Filename);
 
-    DbgPrint (ASL_PARSE_OUTPUT, "\nAttempt to open include file: path %s\n\n",
+    DbgPrint (ASL_PARSE_OUTPUT, "Include: Opening file - \"%s\"\n\n",
         Pathname);
 
     /* Attempt to open the file, push if successful */
@@ -728,7 +826,7 @@  FlOpenInputFile (
 
     /* Open the input ASL file, text mode */
 
-    FlOpenFile (ASL_FILE_INPUT, InputFilename, "r");
+    FlOpenFile (ASL_FILE_INPUT, InputFilename, "rt");
     AslCompilerin = Gbl_Files[ASL_FILE_INPUT].Handle;
 
     return (AE_OK);
@@ -812,7 +910,7 @@  FlOpenMiscOutputFiles (
 
         /* Open the hex file, text mode */
 
-        FlOpenFile (ASL_FILE_HEX_OUTPUT, Filename, "w+");
+        FlOpenFile (ASL_FILE_HEX_OUTPUT, Filename, "w+t");
 
         AslCompilerSignon (ASL_FILE_HEX_OUTPUT);
         AslCompilerFileHeader (ASL_FILE_HEX_OUTPUT);
@@ -863,7 +961,7 @@  FlOpenMiscOutputFiles (
 
         /* Open the listing file, text mode */
 
-        FlOpenFile (ASL_FILE_LISTING_OUTPUT, Filename, "w+");
+        FlOpenFile (ASL_FILE_LISTING_OUTPUT, Filename, "w+t");
 
         AslCompilerSignon (ASL_FILE_LISTING_OUTPUT);
         AslCompilerFileHeader (ASL_FILE_LISTING_OUTPUT);
@@ -881,7 +979,7 @@  FlOpenMiscOutputFiles (
             return (AE_ERROR);
         }
 
-        FlOpenFile (ASL_FILE_PREPROCESSOR, Filename, "w+b");
+        FlOpenFile (ASL_FILE_PREPROCESSOR, Filename, "w+t");
     }
 
     /* All done for data table compiler */
@@ -926,7 +1024,7 @@  FlOpenMiscOutputFiles (
 
         /* Open the assembly code source file, text mode */
 
-        FlOpenFile (ASL_FILE_ASM_SOURCE_OUTPUT, Filename, "w+");
+        FlOpenFile (ASL_FILE_ASM_SOURCE_OUTPUT, Filename, "w+t");
 
         AslCompilerSignon (ASL_FILE_ASM_SOURCE_OUTPUT);
         AslCompilerFileHeader (ASL_FILE_ASM_SOURCE_OUTPUT);
@@ -946,7 +1044,7 @@  FlOpenMiscOutputFiles (
 
         /* Open the C code source file, text mode */
 
-        FlOpenFile (ASL_FILE_C_SOURCE_OUTPUT, Filename, "w+");
+        FlOpenFile (ASL_FILE_C_SOURCE_OUTPUT, Filename, "w+t");
 
         FlPrintFile (ASL_FILE_C_SOURCE_OUTPUT, "/*\n");
         AslCompilerSignon (ASL_FILE_C_SOURCE_OUTPUT);
@@ -967,7 +1065,7 @@  FlOpenMiscOutputFiles (
 
         /* Open the assembly include file, text mode */
 
-        FlOpenFile (ASL_FILE_ASM_INCLUDE_OUTPUT, Filename, "w+");
+        FlOpenFile (ASL_FILE_ASM_INCLUDE_OUTPUT, Filename, "w+t");
 
         AslCompilerSignon (ASL_FILE_ASM_INCLUDE_OUTPUT);
         AslCompilerFileHeader (ASL_FILE_ASM_INCLUDE_OUTPUT);
@@ -987,7 +1085,7 @@  FlOpenMiscOutputFiles (
 
         /* Open the C include file, text mode */
 
-        FlOpenFile (ASL_FILE_C_INCLUDE_OUTPUT, Filename, "w+");
+        FlOpenFile (ASL_FILE_C_INCLUDE_OUTPUT, Filename, "w+t");
 
         FlPrintFile (ASL_FILE_C_INCLUDE_OUTPUT, "/*\n");
         AslCompilerSignon (ASL_FILE_C_INCLUDE_OUTPUT);
@@ -1008,7 +1106,7 @@  FlOpenMiscOutputFiles (
 
         /* Open the namespace file, text mode */
 
-        FlOpenFile (ASL_FILE_NAMESPACE_OUTPUT, Filename, "w+");
+        FlOpenFile (ASL_FILE_NAMESPACE_OUTPUT, Filename, "w+t");
 
         AslCompilerSignon (ASL_FILE_NAMESPACE_OUTPUT);
         AslCompilerFileHeader (ASL_FILE_NAMESPACE_OUTPUT);
diff --git a/src/acpica/source/compiler/asllookup.c b/src/acpica/source/compiler/asllookup.c
index 0d92c91..8f8dc5d 100644
--- a/src/acpica/source/compiler/asllookup.c
+++ b/src/acpica/source/compiler/asllookup.c
@@ -1170,7 +1170,7 @@  LkNamespaceLocateBegin (
 
             if (Message)
             {
-                sprintf (MsgBuffer, "Tag: %u bit%s, Field: %u bit%s",
+                sprintf (MsgBuffer, "Size mismatch, Tag: %u bit%s, Field: %u bit%s",
                     TagBitLength, (TagBitLength > 1) ? "s" : "",
                     FieldBitLength, (FieldBitLength > 1) ? "s" : "");
 
diff --git a/src/acpica/source/compiler/aslmain.c b/src/acpica/source/compiler/aslmain.c
index 285d765..efd5906 100644
--- a/src/acpica/source/compiler/aslmain.c
+++ b/src/acpica/source/compiler/aslmain.c
@@ -135,7 +135,7 @@  Options (
     void);
 
 static void
-HelpMessage (
+FilenameHelp (
     void);
 
 static void
@@ -168,7 +168,7 @@  AslDoResponseFile (
 
 
 #define ASL_TOKEN_SEPARATORS    " \t\n"
-#define ASL_SUPPORTED_OPTIONS   "@:2b|c|d^D:e:fgh^i|I:l^mno|p:P^r:s|t|T:G^v|w|x:z"
+#define ASL_SUPPORTED_OPTIONS   "@:2b|c|d^D:e:fgh^i|I:l^mno|p:P^r:s|t|T:G^v^w|x:z"
 
 
 /*******************************************************************************
@@ -191,6 +191,7 @@  Options (
     printf ("\nGlobal:\n");
     ACPI_OPTION ("-@ <file>",       "Specify command file");
     ACPI_OPTION ("-I <dir>",        "Specify additional include directory");
+    ACPI_OPTION ("-v",              "Display compiler version");
 
     printf ("\nPreprocessor:\n");
     ACPI_OPTION ("-D <symbol>",     "Define symbol for preprocessor use");
@@ -242,27 +243,36 @@  Options (
     ACPI_OPTION ("-g",              "Get ACPI tables and write to files (*.dat)");
 
     printf ("\nHelp:\n");
-    ACPI_OPTION ("-h",              "Additional help and compiler debug options");
+    ACPI_OPTION ("-h",              "This message");
     ACPI_OPTION ("-hc",             "Display operators allowed in constant expressions");
+    ACPI_OPTION ("-hf",             "Display help for output filename generation");
     ACPI_OPTION ("-hr",             "Display ACPI reserved method names");
     ACPI_OPTION ("-ht",             "Display currently supported ACPI table names");
+
+    printf ("\nDebug Options:\n");
+    ACPI_OPTION ("-bf -bt",         "Create debug file (full or parse tree only) (*.txt)");
+    ACPI_OPTION ("-f",              "Ignore errors, force creation of AML output file(s)");
+    ACPI_OPTION ("-n",              "Parse only, no output generation");
+    ACPI_OPTION ("-ot",             "Display compile times and statistics");
+    ACPI_OPTION ("-x <level>",      "Set debug level for trace output");
+    ACPI_OPTION ("-z",              "Do not insert new compiler ID for DataTables");
 }
 
 
 /*******************************************************************************
  *
- * FUNCTION:    HelpMessage
+ * FUNCTION:    FilenameHelp
  *
  * PARAMETERS:  None
  *
  * RETURN:      None
  *
- * DESCRIPTION: Display help message
+ * DESCRIPTION: Display help message for output filename generation
  *
  ******************************************************************************/
 
 static void
-HelpMessage (
+FilenameHelp (
     void)
 {
 
@@ -274,17 +284,6 @@  HelpMessage (
     printf ("    2) The prefix of the AMLFileName in the ASL Definition Block\n");
     printf ("    3) The prefix of the input filename\n");
     printf ("\n");
-
-    Options ();
-
-    printf ("\nCompiler/Disassembler Debug Options:\n");
-    ACPI_OPTION ("-bb -bp -bt",     "Create compiler debug/trace file (*.txt)");
-    ACPI_OPTION ("",                "Types: Parse/Tree/Both");
-    ACPI_OPTION ("-f",              "Ignore errors, force creation of AML output file(s)");
-    ACPI_OPTION ("-n",              "Parse only, no output generation");
-    ACPI_OPTION ("-ot",             "Display compile times");
-    ACPI_OPTION ("-x <level>",      "Set debug level for trace output");
-    ACPI_OPTION ("-z",              "Do not insert new compiler ID for DataTables");
 }
 
 
@@ -502,13 +501,7 @@  AslDoOptions (
     case 'b':   /* Debug output options */
         switch (AcpiGbl_Optarg[0])
         {
-        case 'b':
-            AslCompilerdebug = 1; /* same as yydebug */
-            DtParserdebug = 1;
-            PrParserdebug = 1;
-            break;
-
-        case 'p':
+        case 'f':
             AslCompilerdebug = 1; /* same as yydebug */
             DtParserdebug = 1;
             PrParserdebug = 1;
@@ -602,13 +595,17 @@  AslDoOptions (
         switch (AcpiGbl_Optarg[0])
         {
         case '^':
-            HelpMessage ();
+            Usage ();
             exit (0);
 
         case 'c':
             UtDisplayConstantOpcodes ();
             exit (0);
 
+        case 'f':
+            FilenameHelp ();
+            exit (0);
+
         case 'r':
             /* reserved names */
 
@@ -827,9 +824,13 @@  AslDoOptions (
         break;
 
 
-    case 'v':   /* Verbosity settings */
+    case 'v':   /* Version and verbosity settings */
         switch (AcpiGbl_Optarg[0])
         {
+        case '^':
+            printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
+            exit (0);
+
         case 'a':
             /* Disable All error/warning messages */
 
@@ -837,9 +838,18 @@  AslDoOptions (
             break;
 
         case 'i':
-            /* Less verbose error messages */
-
+            /*
+             * Support for integrated development environment(s).
+             *
+             * 1) No compiler signon
+             * 2) Send stderr messages to stdout
+             * 3) Less verbose error messages (single line only for each)
+             * 4) Error/warning messages are formatted appropriately to
+             *    be recognized by MS Visual Studio
+             */
             Gbl_VerboseErrors = FALSE;
+            Gbl_DoSignon = FALSE;
+            Gbl_Files[ASL_FILE_STDERR].Handle = stdout;
             break;
 
         case 'o':
diff --git a/src/acpica/source/compiler/aslmap.c b/src/acpica/source/compiler/aslmap.c
index 498ca42..c276972 100644
--- a/src/acpica/source/compiler/aslmap.c
+++ b/src/acpica/source/compiler/aslmap.c
@@ -439,6 +439,7 @@  const ASL_MAPPING_ENTRY     AslKeywordMapping [] =
 /* REGIONSPACE_IO */            OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_SYSTEM_IO,       0,                  0),
 /* REGIONSPACE_IPMI */          OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_IPMI,            0,                  0),
 /* REGIONSPACE_MEM */           OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_SYSTEM_MEMORY,   0,                  0),
+/* REGIONSPACE_PCC */           OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_PLATFORM_COMM,   0,                  0),
 /* REGIONSPACE_PCI */           OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_PCI_CONFIG,      0,                  0),
 /* REGIONSPACE_PCIBAR */        OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_PCI_BAR_TARGET,  0,                  0),
 /* REGIONSPACE_SMBUS */         OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_SMBUS,           0,                  0),
diff --git a/src/acpica/source/compiler/aslmessages.h b/src/acpica/source/compiler/aslmessages.h
index 4e5bb31..56951bc 100644
--- a/src/acpica/source/compiler/aslmessages.h
+++ b/src/acpica/source/compiler/aslmessages.h
@@ -474,7 +474,7 @@  char                        *AslMessages [] = {
 };
 
 
-char                    *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = {
+const char              *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = {
     "Warning ",
     "Warning ",
     "Warning ",
@@ -483,6 +483,15 @@  char                    *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = {
     "Optimize"
 };
 
+const char              *AslErrorLevelIde [ASL_NUM_REPORT_LEVELS] = {
+    "warning ",
+    "warning ",
+    "warning ",
+    "error   ",
+    "remark  ",
+    "optimize"
+};
+
 #define ASL_ERROR_LEVEL_LENGTH          8       /* Length of strings above */
 
 #endif  /* ASL_EXCEPTIONS */
diff --git a/src/acpica/source/compiler/aslstartup.c b/src/acpica/source/compiler/aslstartup.c
index 49b25d9..2fbe0d3 100644
--- a/src/acpica/source/compiler/aslstartup.c
+++ b/src/acpica/source/compiler/aslstartup.c
@@ -299,7 +299,7 @@  AslDetectSourceFileType (
 
     /* Check for 100% ASCII source file (comments are ignored) */
 
-    Status = FlCheckForAscii (Info);
+    Status = FlCheckForAscii (Info->Handle, Info->Filename, TRUE);
     if (ACPI_FAILURE (Status))
     {
         printf ("Non-ascii input file - %s\n", Info->Filename);
diff --git a/src/acpica/source/compiler/aslsupport.l b/src/acpica/source/compiler/aslsupport.l
index cdaf2b8..0ce5a20 100644
--- a/src/acpica/source/compiler/aslsupport.l
+++ b/src/acpica/source/compiler/aslsupport.l
@@ -164,19 +164,23 @@  static void
 AslDoLineDirective (
     void)
 {
-    char                    c;
+    int                     c;
     char                    *Token;
     UINT32                  LineNumber;
     char                    *Filename;
+    UINT32                  i;
 
 
     /* Eat the entire line that contains the #line directive */
 
-    while ((c = (char) input()) != '\n' && c != EOF)
+    Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
+
+    while ((c = input()) != '\n' && c != EOF)
     {
-        AslInsertLineBuffer (c);
+        *Gbl_LineBufPtr = c;
+        Gbl_LineBufPtr++;
     }
-    AslInsertLineBuffer (0);
+    *Gbl_LineBufPtr = 0;
 
     /* First argument is the actual line number */
 
@@ -186,10 +190,23 @@  AslDoLineDirective (
         goto ResetAndExit;
     }
 
-    /* Convert line number. Subtract one to handle _this_ line */
+    /* First argument is the line number */
 
     LineNumber = (UINT32) UtDoConstant (Token);
-    FlSetLineNumber (LineNumber - 1);
+
+    /* Emit the appropriate number of newlines */
+
+    Gbl_CurrentColumn = 0;
+    if (LineNumber > Gbl_CurrentLineNumber)
+    {
+        for (i = 0; i < (LineNumber - Gbl_CurrentLineNumber); i++)
+        {
+            FlWriteFile (ASL_FILE_SOURCE_OUTPUT, "\n", 1);
+            Gbl_CurrentColumn++;
+        }
+    }
+
+    FlSetLineNumber (LineNumber);
 
     /* Second argument is the optional filename (in double quotes) */
 
@@ -204,7 +221,12 @@  AslDoLineDirective (
     /* Third argument is not supported at this time */
 
 ResetAndExit:
-    AslResetCurrentLineBuffer ();
+
+    /* Reset globals for a new line */
+
+    Gbl_CurrentLineOffset += Gbl_CurrentColumn;
+    Gbl_CurrentColumn = 0;
+    Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
 }
 
 
@@ -480,8 +502,8 @@  static char
 AslDoComment (
     void)
 {
-    char                c;
-    char                c1 = 0;
+    int                 c;
+    int                 c1 = 0;
 
 
     AslInsertLineBuffer ('/');
@@ -491,7 +513,7 @@  loop:
 
     /* Eat chars until end-of-comment */
 
-    while ((c = (char) input()) != '*' && c != EOF)
+    while ((c = input()) != '*' && c != EOF)
     {
         AslInsertLineBuffer (c);
         c1 = c;
@@ -518,7 +540,7 @@  loop:
 
     AslInsertLineBuffer (c);
 
-    if ((c1 = (char) input()) != '/' && c1 != EOF)
+    if ((c1 = input()) != '/' && c1 != EOF)
     {
         unput(c1);
         goto loop;
@@ -561,13 +583,13 @@  static char
 AslDoCommentType2 (
     void)
 {
-    char                c;
+    int                 c;
 
 
     AslInsertLineBuffer ('/');
     AslInsertLineBuffer ('/');
 
-    while ((c = (char) input()) != '\n' && c != EOF)
+    while ((c = input()) != '\n' && c != EOF)
     {
         AslInsertLineBuffer (c);
     }
@@ -603,7 +625,7 @@  AslDoStringLiteral (
     char                *StringBuffer = MsgBuffer;
     char                *EndBuffer = MsgBuffer + ASL_MSG_BUFFER_SIZE;
     char                *CleanString;
-    char                StringChar;
+    int                 StringChar;
     UINT32              State = ASL_NORMAL_CHAR;
     UINT32              i = 0;
     UINT8               Digit;
@@ -616,7 +638,7 @@  AslDoStringLiteral (
      * source line buffer.
      */
     AslInsertLineBuffer ('\"');
-    while ((StringChar = (char) input()) != EOF)
+    while ((StringChar = input()) != EOF)
     {
         AslInsertLineBuffer (StringChar);
 
diff --git a/src/acpica/source/compiler/aslutils.c b/src/acpica/source/compiler/aslutils.c
index 8a7dbba..de7ea0d 100644
--- a/src/acpica/source/compiler/aslutils.c
+++ b/src/acpica/source/compiler/aslutils.c
@@ -211,7 +211,7 @@  UtDisplaySupportedTables (
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiPsDisplayConstantOpcodes
+ * FUNCTION:    UtDisplayConstantOpcodes
  *
  * PARAMETERS:  None
  *
@@ -244,11 +244,11 @@  UtDisplayConstantOpcodes (
  *
  * FUNCTION:    UtLocalCalloc
  *
- * PARAMETERS:  Size        - Bytes to be allocated
+ * PARAMETERS:  Size                - Bytes to be allocated
  *
- * RETURN:      Pointer to the allocated memory.  Guaranteed to be valid.
+ * RETURN:      Pointer to the allocated memory. Guaranteed to be valid.
  *
- * DESCRIPTION: Allocate zero-initialized memory.  Aborts the compile on an
+ * DESCRIPTION: Allocate zero-initialized memory. Aborts the compile on an
  *              allocation failure, on the assumption that nothing more can be
  *              accomplished.
  *
@@ -283,9 +283,9 @@  UtLocalCalloc (
  *
  * FUNCTION:    UtBeginEvent
  *
- * PARAMETERS:  Name        - Ascii name of this event
+ * PARAMETERS:  Name                - Ascii name of this event
  *
- * RETURN:      Event       - Event number (integer index)
+ * RETURN:      Event number (integer index)
  *
  * DESCRIPTION: Saves the current time with this event
  *
@@ -316,7 +316,7 @@  UtBeginEvent (
  *
  * FUNCTION:    UtEndEvent
  *
- * PARAMETERS:  Event       - Event number (integer index)
+ * PARAMETERS:  Event               - Event number (integer index)
  *
  * RETURN:      None
  *
@@ -326,7 +326,7 @@  UtBeginEvent (
 
 void
 UtEndEvent (
-    UINT8                  Event)
+    UINT8                   Event)
 {
 
     if (Event >= ASL_NUM_EVENTS)
@@ -344,7 +344,7 @@  UtEndEvent (
  *
  * FUNCTION:    UtHexCharToValue
  *
- * PARAMETERS:  HexChar         - Hex character in Ascii
+ * PARAMETERS:  HexChar             - Hex character in Ascii
  *
  * RETURN:      The binary value of the hex character
  *
@@ -375,12 +375,13 @@  UtHexCharToValue (
  *
  * FUNCTION:    UtConvertByteToHex
  *
- * PARAMETERS:  RawByte         - Binary data
- *              Buffer          - Pointer to where the hex bytes will be stored
+ * PARAMETERS:  RawByte             - Binary data
+ *              Buffer              - Pointer to where the hex bytes will be
+ *                                    stored
  *
  * RETURN:      Ascii hex byte is stored in Buffer.
  *
- * DESCRIPTION: Perform hex-to-ascii translation.  The return data is prefixed
+ * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed
  *              with "0x"
  *
  ******************************************************************************/
@@ -403,12 +404,13 @@  UtConvertByteToHex (
  *
  * FUNCTION:    UtConvertByteToAsmHex
  *
- * PARAMETERS:  RawByte         - Binary data
- *              Buffer          - Pointer to where the hex bytes will be stored
+ * PARAMETERS:  RawByte             - Binary data
+ *              Buffer              - Pointer to where the hex bytes will be
+ *                                    stored
  *
  * RETURN:      Ascii hex byte is stored in Buffer.
  *
- * DESCRIPTION: Perform hex-to-ascii translation.  The return data is prefixed
+ * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed
  *              with "0x"
  *
  ******************************************************************************/
@@ -430,13 +432,13 @@  UtConvertByteToAsmHex (
  *
  * FUNCTION:    DbgPrint
  *
- * PARAMETERS:  Type            - Type of output
- *              Fmt             - Printf format string
- *              ...             - variable printf list
+ * PARAMETERS:  Type                - Type of output
+ *              Fmt                 - Printf format string
+ *              ...                 - variable printf list
  *
  * RETURN:      None
  *
- * DESCRIPTION: Conditional print statement.  Prints to stderr only if the
+ * DESCRIPTION: Conditional print statement. Prints to stderr only if the
  *              debug flag is set.
  *
  ******************************************************************************/
@@ -510,7 +512,7 @@  UtPrintFormattedName (
  *
  * FUNCTION:    UtSetParseOpName
  *
- * PARAMETERS:  Op
+ * PARAMETERS:  Op                  - Parse op to be named.
  *
  * RETURN:      None
  *
@@ -532,7 +534,7 @@  UtSetParseOpName (
  *
  * FUNCTION:    UtDisplaySummary
  *
- * PARAMETERS:  FileID          - ID of outpout file
+ * PARAMETERS:  FileID              - ID of outpout file
  *
  * RETURN:      None
  *
@@ -643,11 +645,11 @@  UtDisplaySummary (
 
 /*******************************************************************************
  *
- * FUNCTION:    UtDisplaySummary
+ * FUNCTION:    UtCheckIntegerRange
  *
- * PARAMETERS:  Op              - Integer parse node
- *              LowValue        - Smallest allowed value
- *              HighValue       - Largest allowed value
+ * PARAMETERS:  Op                  - Integer parse node
+ *              LowValue            - Smallest allowed value
+ *              HighValue           - Largest allowed value
  *
  * RETURN:      Op if OK, otherwise NULL
  *
@@ -698,11 +700,11 @@  UtCheckIntegerRange (
  *
  * FUNCTION:    UtGetStringBuffer
  *
- * PARAMETERS:  Length          - Size of buffer requested
+ * PARAMETERS:  Length              - Size of buffer requested
  *
- * RETURN:      Pointer to the buffer.  Aborts on allocation failure
+ * RETURN:      Pointer to the buffer. Aborts on allocation failure
  *
- * DESCRIPTION: Allocate a string buffer.  Bypass the local
+ * DESCRIPTION: Allocate a string buffer. Bypass the local
  *              dynamic memory manager for performance reasons (This has a
  *              major impact on the speed of the compiler.)
  *
@@ -733,8 +735,8 @@  UtGetStringBuffer (
  *
  * FUNCTION:    UtInternalizeName
  *
- * PARAMETERS:  ExternalName            - Name to convert
- *              ConvertedName           - Where the converted name is returned
+ * PARAMETERS:  ExternalName        - Name to convert
+ *              ConvertedName       - Where the converted name is returned
  *
  * RETURN:      Status
  *
@@ -786,8 +788,8 @@  UtInternalizeName (
  *
  * FUNCTION:    UtPadNameWithUnderscores
  *
- * PARAMETERS:  NameSeg         - Input nameseg
- *              PaddedNameSeg   - Output padded nameseg
+ * PARAMETERS:  NameSeg             - Input nameseg
+ *              PaddedNameSeg       - Output padded nameseg
  *
  * RETURN:      Padded nameseg.
  *
@@ -824,8 +826,8 @@  UtPadNameWithUnderscores (
  *
  * FUNCTION:    UtAttachNameseg
  *
- * PARAMETERS:  Op              - Parent parse node
- *              Name            - Full ExternalName
+ * PARAMETERS:  Op                  - Parent parse node
+ *              Name                - Full ExternalName
  *
  * RETURN:      None; Sets the NameSeg field in parent node
  *
@@ -881,12 +883,12 @@  UtAttachNameseg (
  *
  * FUNCTION:    UtAttachNamepathToOwner
  *
- * PARAMETERS:  Op            - Parent parse node
- *              NameOp        - Node that contains the name
+ * PARAMETERS:  Op                  - Parent parse node
+ *              NameOp              - Node that contains the name
  *
  * RETURN:      Sets the ExternalName and Namepath in the parent node
  *
- * DESCRIPTION: Store the name in two forms in the parent node:  The original
+ * DESCRIPTION: Store the name in two forms in the parent node: The original
  *              (external) name, and the internalized name that is used within
  *              the ACPI namespace manager.
  *
@@ -926,11 +928,11 @@  UtAttachNamepathToOwner (
  *
  * FUNCTION:    UtDoConstant
  *
- * PARAMETERS:  String      - Hex, Octal, or Decimal string
+ * PARAMETERS:  String              - Hex, Octal, or Decimal string
  *
  * RETURN:      Converted Integer
  *
- * DESCRIPTION: Convert a string to an integer.  With error checking.
+ * DESCRIPTION: Convert a string to an integer, with error checking.
  *
  ******************************************************************************/
 
@@ -961,10 +963,10 @@  UtDoConstant (
  *
  * FUNCTION:    UtStrtoul64
  *
- * PARAMETERS:  String          - Null terminated string
- *              Terminater      - Where a pointer to the terminating byte is
- *                                returned
- *              Base            - Radix of the string
+ * PARAMETERS:  String              - Null terminated string
+ *              Terminater          - Where a pointer to the terminating byte
+ *                                    is returned
+ *              Base                - Radix of the string
  *
  * RETURN:      Converted value
  *
@@ -1144,5 +1146,3 @@  ErrorExit:
 
     return (Status);
 }
-
-
diff --git a/src/acpica/source/compiler/dtio.c b/src/acpica/source/compiler/dtio.c
index 91d4aba..7a68e84 100644
--- a/src/acpica/source/compiler/dtio.c
+++ b/src/acpica/source/compiler/dtio.c
@@ -161,6 +161,7 @@  DtDumpBuffer (
 #define DT_SLASH_SLASH_COMMENT      4
 #define DT_END_COMMENT              5
 #define DT_MERGE_LINES              6
+#define DT_ESCAPE_SEQUENCE          7
 
 static UINT32  Gbl_NextLineOffset;
 
@@ -498,7 +499,6 @@  DtGetNextLine (
             {
             case DT_START_QUOTED_STRING:
             case DT_SLASH_ASTERISK_COMMENT:
-            case DT_SLASH_SLASH_COMMENT:
 
                 AcpiOsPrintf ("**** EOF within comment/string %u\n", State);
                 break;
@@ -507,7 +507,22 @@  DtGetNextLine (
                 break;
             }
 
-            return (ASL_EOF);
+            /* Standalone EOF is OK */
+
+            if (i == 0)
+            {
+                return (ASL_EOF);
+            }
+
+            /*
+             * Received an EOF in the middle of a line. Terminate the
+             * line with a newline. The next call to this function will
+             * return a standalone EOF. Thus, the upper parsing software
+             * never has to deal with an EOF within a valid line (or
+             * the last line does not get tossed on the floor.)
+             */
+            c = '\n';
+            State = DT_NORMAL_TEXT;
         }
 
         switch (State)
@@ -576,12 +591,36 @@  DtGetNextLine (
             Gbl_CurrentLineBuffer[i] = c;
             i++;
 
-            if (c == '"')
+            switch (c)
             {
+            case '"':
                 State = DT_NORMAL_TEXT;
+                break;
+
+            case '\\':
+                State = DT_ESCAPE_SEQUENCE;
+                break;
+
+            case '\n':
+                AcpiOsPrintf ("ERROR at line %u: Unterminated quoted string\n",
+                    Gbl_CurrentLineNumber++);
+                State = DT_NORMAL_TEXT;
+                break;
+
+            default:    /* Get next character */
+                break;
             }
             break;
 
+        case DT_ESCAPE_SEQUENCE:
+
+            /* Just copy the escaped character. TBD: sufficient for table compiler? */
+
+            Gbl_CurrentLineBuffer[i] = c;
+            i++;
+            State = DT_START_QUOTED_STRING;
+            break;
+
         case DT_START_COMMENT:
 
             /* Open comment if this character is an asterisk or slash */
diff --git a/src/acpica/source/compiler/dttemplate.c b/src/acpica/source/compiler/dttemplate.c
index ed5f79b..1d92b78 100644
--- a/src/acpica/source/compiler/dttemplate.c
+++ b/src/acpica/source/compiler/dttemplate.c
@@ -298,7 +298,7 @@  DtCreateAllTemplates (
     }
 
     /*
-     * Create the "special ACPI tables:
+     * Create the special ACPI tables:
      * 1) DSDT/SSDT are AML tables, not data tables
      * 2) FACS and RSDP have non-standard headers
      */
diff --git a/src/acpica/source/compiler/prscan.c b/src/acpica/source/compiler/prscan.c
index e98e186..687af45 100644
--- a/src/acpica/source/compiler/prscan.c
+++ b/src/acpica/source/compiler/prscan.c
@@ -726,7 +726,7 @@  PrDoDirective (
         }
 
         DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
-            "Start #include file %s\n", Gbl_CurrentLineNumber,
+            "Start #include file \"%s\"\n", Gbl_CurrentLineNumber,
             Token, Gbl_CurrentLineNumber);
 
         PrOpenIncludeFile (Token);
diff --git a/src/acpica/source/compiler/prutils.c b/src/acpica/source/compiler/prutils.c
index a5fb46a..64dc9e8 100644
--- a/src/acpica/source/compiler/prutils.c
+++ b/src/acpica/source/compiler/prutils.c
@@ -318,13 +318,11 @@  PrOpenIncludeFile (
     ASL_INCLUDE_DIR         *NextDir;
 
 
-    /*
-     * start the actual include file on the next line
-     */
+    /* Start the actual include file on the next line */
+
     Gbl_CurrentLineOffset++;
 
     /* Attempt to open the include file */
-
     /* If the file specifies an absolute path, just open it */
 
     if ((Filename[0] == '/')  ||
@@ -402,13 +400,10 @@  PrOpenIncludeWithPrefix (
 
     /* Build the full pathname to the file */
 
-    Pathname = ACPI_ALLOCATE (strlen (PrefixDir) + strlen (Filename) + 1);
+    Pathname = FlMergePathnames (PrefixDir, Filename);
 
-    strcpy (Pathname, PrefixDir);
-    strcat (Pathname, Filename);
-
-    DbgPrint (ASL_PARSE_OUTPUT, "\n" PR_PREFIX_ID
-        "Opening include file: path %s\n",
+    DbgPrint (ASL_PARSE_OUTPUT, PR_PREFIX_ID
+        "Include: Opening file - \"%s\"\n",
         Gbl_CurrentLineNumber, Pathname);
 
     /* Attempt to open the file, push if successful */
diff --git a/src/acpica/source/components/debugger/dbcmds.c b/src/acpica/source/components/debugger/dbcmds.c
index 4c34a79..27aa4cd 100644
--- a/src/acpica/source/components/debugger/dbcmds.c
+++ b/src/acpica/source/components/debugger/dbcmds.c
@@ -326,12 +326,53 @@  AcpiDbDisplayTableInfo (
     ACPI_STATUS             Status;
 
 
+    /* Header */
+
+    AcpiOsPrintf ("Idx ID Status    Type            Sig  Address  Len   Header\n");
+
     /* Walk the entire root table list */
 
     for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++)
     {
         TableDesc = &AcpiGbl_RootTableList.Tables[i];
-        AcpiOsPrintf ("%u ", i);
+
+        /* Index and Table ID */
+
+        AcpiOsPrintf ("%3u %.2u ", i, TableDesc->OwnerId);
+
+        /* Decode the table flags */
+
+        if (!(TableDesc->Flags & ACPI_TABLE_IS_LOADED))
+        {
+            AcpiOsPrintf ("NotLoaded ");
+        }
+        else
+        {
+            AcpiOsPrintf ("   Loaded ");
+        }
+
+        switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK)
+        {
+        case ACPI_TABLE_ORIGIN_UNKNOWN:
+            AcpiOsPrintf ("Unknown   ");
+            break;
+
+        case ACPI_TABLE_ORIGIN_MAPPED:
+            AcpiOsPrintf ("Mapped    ");
+            break;
+
+        case ACPI_TABLE_ORIGIN_ALLOCATED:
+            AcpiOsPrintf ("Allocated ");
+            break;
+
+        case ACPI_TABLE_ORIGIN_OVERRIDE:
+            AcpiOsPrintf ("Override  ");
+            break;
+
+        default:
+            AcpiOsPrintf ("INVALID   ");
+            break;
+        }
 
         /* Make sure that the table is mapped */
 
@@ -362,55 +403,45 @@  AcpiDbDisplayTableInfo (
  *
  * FUNCTION:    AcpiDbUnloadAcpiTable
  *
- * PARAMETERS:  TableArg        - Name of the table to be unloaded
- *              InstanceArg     - Which instance of the table to unload (if
- *                                there are multiple tables of the same type)
+ * PARAMETERS:  ObjectName          - Namespace pathname for an object that
+ *                                    is owned by the table to be unloaded
  *
- * RETURN:      Nonde
+ * RETURN:      None
  *
- * DESCRIPTION: Unload an ACPI table.
- *              Instance is not implemented
+ * DESCRIPTION: Unload an ACPI table, via any namespace node that is owned
+ *              by the table.
  *
  ******************************************************************************/
 
 void
 AcpiDbUnloadAcpiTable (
-    char                    *TableArg,
-    char                    *InstanceArg)
+    char                    *ObjectName)
 {
-/* TBD: Need to reimplement for new data structures */
-
-#if 0
-    UINT32                  i;
+    ACPI_NAMESPACE_NODE     *Node;
     ACPI_STATUS             Status;
 
 
-    /* Search all tables for the target type */
+    /* Translate name to an Named object */
 
-    for (i = 0; i < (ACPI_TABLE_ID_MAX+1); i++)
+    Node = AcpiDbConvertToNode (ObjectName);
+    if (!Node)
     {
-        if (!ACPI_STRNCMP (TableArg, AcpiGbl_TableData[i].Signature,
-                AcpiGbl_TableData[i].SigLength))
-        {
-            /* Found the table, unload it */
-
-            Status = AcpiUnloadTable (i);
-            if (ACPI_SUCCESS (Status))
-            {
-                AcpiOsPrintf ("[%s] unloaded and uninstalled\n", TableArg);
-            }
-            else
-            {
-                AcpiOsPrintf ("%s, while unloading [%s]\n",
-                    AcpiFormatException (Status), TableArg);
-            }
-
-            return;
-        }
+        AcpiOsPrintf ("Could not find [%s] in namespace\n",
+            ObjectName);
+        return;
     }
 
-    AcpiOsPrintf ("Unknown table type [%s]\n", TableArg);
-#endif
+    Status = AcpiUnloadParentTable (ACPI_CAST_PTR (ACPI_HANDLE, Node));
+    if (ACPI_SUCCESS (Status))
+    {
+        AcpiOsPrintf ("Parent of [%s] (%p) unloaded and uninstalled\n",
+            ObjectName, Node);
+    }
+    else
+    {
+        AcpiOsPrintf ("%s, while unloading parent table of [%s]\n",
+            AcpiFormatException (Status), ObjectName);
+    }
 }
 
 
@@ -445,25 +476,20 @@  AcpiDbSendNotify (
         return;
     }
 
-    /* Decode Named object type */
+    /* Dispatch the notify if legal */
 
-    switch (Node->Type)
+    if (AcpiEvIsNotifyObject (Node))
     {
-    case ACPI_TYPE_DEVICE:
-    case ACPI_TYPE_THERMAL:
-
-         /* Send the notify */
-
         Status = AcpiEvQueueNotifyRequest (Node, Value);
         if (ACPI_FAILURE (Status))
         {
             AcpiOsPrintf ("Could not queue notify\n");
         }
-        break;
-
-    default:
-        AcpiOsPrintf ("Named object is not a device or a thermal object\n");
-        break;
+    }
+    else
+    {
+        AcpiOsPrintf ("Named object [%4.4s] Type %s, must be Device/Thermal/Processor type\n",
+            AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type));
     }
 }
 
diff --git a/src/acpica/source/components/debugger/dbdisply.c b/src/acpica/source/components/debugger/dbdisply.c
index d8b3aa9..2e91c88 100644
--- a/src/acpica/source/components/debugger/dbdisply.c
+++ b/src/acpica/source/components/debugger/dbdisply.c
@@ -179,8 +179,8 @@  typedef struct acpi_handler_info
 
 static ACPI_HANDLER_INFO    AcpiGbl_HandlerList[] =
 {
-    {&AcpiGbl_SystemNotify.Handler,     "System Notifications"},
-    {&AcpiGbl_DeviceNotify.Handler,     "Device Notifications"},
+    {&AcpiGbl_GlobalNotify[0].Handler,  "System Notifications"},
+    {&AcpiGbl_GlobalNotify[1].Handler,  "Device Notifications"},
     {&AcpiGbl_TableHandler,             "ACPI Table Events"},
     {&AcpiGbl_ExceptionHandler,         "Control Method Exceptions"},
     {&AcpiGbl_InterfaceHandler,         "OSI Invocations"}
@@ -864,10 +864,12 @@  AcpiDbDisplayGpes (
     ACPI_GPE_EVENT_INFO     *GpeEventInfo;
     ACPI_GPE_REGISTER_INFO  *GpeRegisterInfo;
     char                    *GpeType;
+    ACPI_GPE_NOTIFY_INFO    *Notify;
     UINT32                  GpeIndex;
     UINT32                  Block = 0;
     UINT32                  i;
     UINT32                  j;
+    UINT32                  Count;
     char                    Buffer[80];
     ACPI_BUFFER             RetBuf;
     ACPI_STATUS             Status;
@@ -988,7 +990,14 @@  AcpiDbDisplayGpes (
                         AcpiOsPrintf ("Handler");
                         break;
                     case ACPI_GPE_DISPATCH_NOTIFY:
-                        AcpiOsPrintf ("Notify");
+                        Count = 0;
+                        Notify = GpeEventInfo->Dispatch.NotifyList;
+                        while (Notify)
+                        {
+                            Count++;
+                            Notify = Notify->Next;
+                        }
+                        AcpiOsPrintf ("Implicit Notify on %u devices", Count);
                         break;
                     default:
                         AcpiOsPrintf ("UNKNOWN: %X",
diff --git a/src/acpica/source/components/debugger/dbexec.c b/src/acpica/source/components/debugger/dbexec.c
index eb85998..174f77a 100644
--- a/src/acpica/source/components/debugger/dbexec.c
+++ b/src/acpica/source/components/debugger/dbexec.c
@@ -944,8 +944,8 @@  AcpiDbMethodThread (
 
     if (Info->InitArgs)
     {
-        AcpiDbUInt32ToHexString (Info->NumCreated, Info->IndexOfThreadStr);
-        AcpiDbUInt32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr);
+        AcpiDbUint32ToHexString (Info->NumCreated, Info->IndexOfThreadStr);
+        AcpiDbUint32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr);
     }
 
     if (Info->Threads && (Info->NumCreated < Info->NumThreads))
@@ -1135,7 +1135,7 @@  AcpiDbCreateExecutionThreads (
     AcpiGbl_DbMethodInfo.ArgTypes[1] = ACPI_TYPE_INTEGER;
     AcpiGbl_DbMethodInfo.ArgTypes[2] = ACPI_TYPE_INTEGER;
 
-    AcpiDbUInt32ToHexString (NumThreads, AcpiGbl_DbMethodInfo.NumThreadsStr);
+    AcpiDbUint32ToHexString (NumThreads, AcpiGbl_DbMethodInfo.NumThreadsStr);
 
     AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
 
diff --git a/src/acpica/source/components/debugger/dbfileio.c b/src/acpica/source/components/debugger/dbfileio.c
index 495d609..8e36c87 100644
--- a/src/acpica/source/components/debugger/dbfileio.c
+++ b/src/acpica/source/components/debugger/dbfileio.c
@@ -123,6 +123,10 @@ 
 #include "actables.h"
 #endif
 
+#ifdef ACPI_ASL_COMPILER
+#include "aslcompiler.h"
+#endif
+
 #if (defined ACPI_DEBUGGER || defined ACPI_DISASSEMBLER)
 
 #define _COMPONENT          ACPI_CA_DEBUGGER
@@ -381,6 +385,15 @@  AcpiDbReadTable (
             AcpiOsPrintf (
                 "TableHeader length [0x%X] greater than the input file size [0x%X]\n",
                 TableHeader.Length, FileSize);
+
+#ifdef ACPI_ASL_COMPILER
+            Status = FlCheckForAscii (fp, NULL, FALSE);
+            if (ACPI_SUCCESS (Status))
+            {
+                AcpiOsPrintf ("File appears to be ASCII only, must be binary\n",
+                    TableHeader.Length, FileSize);
+            }
+#endif
             return (AE_BAD_HEADER);
         }
 
diff --git a/src/acpica/source/components/debugger/dbinput.c b/src/acpica/source/components/debugger/dbinput.c
index 3e61bdb..1b2ee1d 100644
--- a/src/acpica/source/components/debugger/dbinput.c
+++ b/src/acpica/source/components/debugger/dbinput.c
@@ -322,7 +322,7 @@  AcpiDbDisplayHelp (
     AcpiOsPrintf ("     Stack                            Display CPU stack usage\n");
     AcpiOsPrintf ("     Tables                           Info about current ACPI table(s)\n");
     AcpiOsPrintf ("  Tables                              Display info about loaded ACPI tables\n");
-    AcpiOsPrintf ("  Unload <TableSig> [Instance]        Unload an ACPI table\n");
+    AcpiOsPrintf ("  Unload <Namepath>                   Unload an ACPI table via namespace object\n");
     AcpiOsPrintf ("  ! <CommandNumber>                   Execute command from history buffer\n");
     AcpiOsPrintf ("  !!                                  Execute last command again\n");
 
@@ -966,7 +966,7 @@  AcpiDbCommandDispatch (
         break;
 
     case CMD_UNLOAD:
-        AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
+        AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1]);
         break;
 
     case CMD_EXIT:
diff --git a/src/acpica/source/components/debugger/dbstats.c b/src/acpica/source/components/debugger/dbstats.c
index 8a6e713..e309668 100644
--- a/src/acpica/source/components/debugger/dbstats.c
+++ b/src/acpica/source/components/debugger/dbstats.c
@@ -299,8 +299,8 @@  AcpiDbEnumerateObject (
 
     case ACPI_TYPE_DEVICE:
 
-        AcpiDbEnumerateObject (ObjDesc->Device.SystemNotify);
-        AcpiDbEnumerateObject (ObjDesc->Device.DeviceNotify);
+        AcpiDbEnumerateObject (ObjDesc->Device.NotifyList[0]);
+        AcpiDbEnumerateObject (ObjDesc->Device.NotifyList[1]);
         AcpiDbEnumerateObject (ObjDesc->Device.Handler);
         break;
 
@@ -320,21 +320,21 @@  AcpiDbEnumerateObject (
 
     case ACPI_TYPE_POWER:
 
-        AcpiDbEnumerateObject (ObjDesc->PowerResource.SystemNotify);
-        AcpiDbEnumerateObject (ObjDesc->PowerResource.DeviceNotify);
+        AcpiDbEnumerateObject (ObjDesc->PowerResource.NotifyList[0]);
+        AcpiDbEnumerateObject (ObjDesc->PowerResource.NotifyList[1]);
         break;
 
     case ACPI_TYPE_PROCESSOR:
 
-        AcpiDbEnumerateObject (ObjDesc->Processor.SystemNotify);
-        AcpiDbEnumerateObject (ObjDesc->Processor.DeviceNotify);
+        AcpiDbEnumerateObject (ObjDesc->Processor.NotifyList[0]);
+        AcpiDbEnumerateObject (ObjDesc->Processor.NotifyList[1]);
         AcpiDbEnumerateObject (ObjDesc->Processor.Handler);
         break;
 
     case ACPI_TYPE_THERMAL:
 
-        AcpiDbEnumerateObject (ObjDesc->ThermalZone.SystemNotify);
-        AcpiDbEnumerateObject (ObjDesc->ThermalZone.DeviceNotify);
+        AcpiDbEnumerateObject (ObjDesc->ThermalZone.NotifyList[0]);
+        AcpiDbEnumerateObject (ObjDesc->ThermalZone.NotifyList[1]);
         AcpiDbEnumerateObject (ObjDesc->ThermalZone.Handler);
         break;
 
@@ -594,6 +594,18 @@  AcpiDbDisplayStatistics (
         AcpiOsPrintf ("NamespaceNode    %3d\n", sizeof (ACPI_NAMESPACE_NODE));
         AcpiOsPrintf ("AcpiObject       %3d\n", sizeof (ACPI_OBJECT));
 
+        AcpiOsPrintf ("\n");
+
+        AcpiOsPrintf ("Generic State    %3d\n", sizeof (ACPI_GENERIC_STATE));
+        AcpiOsPrintf ("Common State     %3d\n", sizeof (ACPI_COMMON_STATE));
+        AcpiOsPrintf ("Control State    %3d\n", sizeof (ACPI_CONTROL_STATE));
+        AcpiOsPrintf ("Update State     %3d\n", sizeof (ACPI_UPDATE_STATE));
+        AcpiOsPrintf ("Scope State      %3d\n", sizeof (ACPI_SCOPE_STATE));
+        AcpiOsPrintf ("Parse Scope      %3d\n", sizeof (ACPI_PSCOPE_STATE));
+        AcpiOsPrintf ("Package State    %3d\n", sizeof (ACPI_PKG_STATE));
+        AcpiOsPrintf ("Thread State     %3d\n", sizeof (ACPI_THREAD_STATE));
+        AcpiOsPrintf ("Result Values    %3d\n", sizeof (ACPI_RESULT_VALUES));
+        AcpiOsPrintf ("Notify Info      %3d\n", sizeof (ACPI_NOTIFY_INFO));
         break;
 
 
diff --git a/src/acpica/source/components/debugger/dbutils.c b/src/acpica/source/components/debugger/dbutils.c
index fd318d9..f913c64 100644
--- a/src/acpica/source/components/debugger/dbutils.c
+++ b/src/acpica/source/components/debugger/dbutils.c
@@ -432,7 +432,7 @@  AcpiDbLocalNsLookup (
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiDbUInt32ToHexString
+ * FUNCTION:    AcpiDbUint32ToHexString
  *
  * PARAMETERS:  Value           - The value to be converted to string
  *              Buffer          - Buffer for result (not less than 11 bytes)
@@ -447,7 +447,7 @@  AcpiDbLocalNsLookup (
  ******************************************************************************/
 
 void
-AcpiDbUInt32ToHexString (
+AcpiDbUint32ToHexString (
     UINT32                  Value,
     char                    *Buffer)
 {
diff --git a/src/acpica/source/components/disassembler/dmopcode.c b/src/acpica/source/components/disassembler/dmopcode.c
index ed457ed..252b1b8 100644
--- a/src/acpica/source/components/disassembler/dmopcode.c
+++ b/src/acpica/source/components/disassembler/dmopcode.c
@@ -118,6 +118,7 @@ 
 #include "acparser.h"
 #include "amlcode.h"
 #include "acdisasm.h"
+#include "acnamesp.h"
 
 #ifdef ACPI_DISASSEMBLER
 
@@ -133,6 +134,218 @@  AcpiDmMatchKeyword (
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiDmPredefinedDescription
+ *
+ * PARAMETERS:  Op              - Name() parse object
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Emit a description comment for a predefined ACPI name.
+ *              Used for iASL compiler only.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmPredefinedDescription (
+    ACPI_PARSE_OBJECT       *Op)
+{
+#ifdef ACPI_ASL_COMPILER
+    const AH_PREDEFINED_NAME    *Info;
+    char                        *NameString;
+    int                         LastCharIsDigit;
+    int                         LastCharsAreHex;
+
+
+    if (!Op)
+    {
+        return;
+    }
+
+    /* Ensure that the comment field is emitted only once */
+
+    if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEF_CHECKED)
+    {
+        return;
+    }
+    Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEF_CHECKED;
+
+    /* Predefined name must start with an underscore */
+
+    NameString = ACPI_CAST_PTR (char, &Op->Named.Name);
+    if (NameString[0] != '_')
+    {
+        return;
+    }
+
+    /*
+     * Check for the special ACPI names:
+     * _ACd, _ALd, _EJd, _Exx, _Lxx, _Qxx, _Wxx, _T_a
+     * (where d=decimal_digit, x=hex_digit, a=anything)
+     *
+     * Convert these to the generic name for table lookup.
+     * Note: NameString is guaranteed to be upper case here.
+     */
+    LastCharIsDigit =
+        (ACPI_IS_DIGIT (NameString[3]));    /* d */
+    LastCharsAreHex =
+        (ACPI_IS_XDIGIT (NameString[2]) &&  /* xx */
+         ACPI_IS_XDIGIT (NameString[3]));
+
+    switch (NameString[1])
+    {
+    case 'A':
+        if ((NameString[2] == 'C') && (LastCharIsDigit))
+        {
+            NameString = "_ACx";
+        }
+        else if ((NameString[2] == 'L') && (LastCharIsDigit))
+        {
+            NameString = "_ALx";
+        }
+        break;
+
+    case 'E':
+        if ((NameString[2] == 'J') && (LastCharIsDigit))
+        {
+            NameString = "_EJx";
+        }
+        else if (LastCharsAreHex)
+        {
+            NameString = "_Exx";
+        }
+        break;
+
+    case 'L':
+        if (LastCharsAreHex)
+        {
+            NameString = "_Lxx";
+        }
+        break;
+
+    case 'Q':
+        if (LastCharsAreHex)
+        {
+            NameString = "_Qxx";
+        }
+        break;
+
+    case 'T':
+        if (NameString[2] == '_')
+        {
+            NameString = "_T_x";
+        }
+        break;
+
+    case 'W':
+        if (LastCharsAreHex)
+        {
+            NameString = "_Wxx";
+        }
+        break;
+
+    default:
+        break;
+    }
+
+    /* Match the name in the info table */
+
+    for (Info = AslPredefinedInfo; Info->Name; Info++)
+    {
+        if (ACPI_COMPARE_NAME (NameString, Info->Name))
+        {
+            AcpiOsPrintf ("  // %4.4s: %s",
+                NameString, ACPI_CAST_PTR (char, Info->Description));
+            return;
+        }
+    }
+
+#endif
+    return;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDmFieldPredefinedDescription
+ *
+ * PARAMETERS:  Op              - Parse object
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Emit a description comment for a resource descriptor tag
+ *              (which is a predefined ACPI name.) Used for iASL compiler only.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmFieldPredefinedDescription (
+    ACPI_PARSE_OBJECT       *Op)
+{
+#ifdef ACPI_ASL_COMPILER
+    ACPI_PARSE_OBJECT       *IndexOp;
+    char                    *Tag;
+    const ACPI_OPCODE_INFO  *OpInfo;
+    const AH_PREDEFINED_NAME *Info;
+
+
+    if (!Op)
+    {
+        return;
+    }
+
+    /* Ensure that the comment field is emitted only once */
+
+    if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEF_CHECKED)
+    {
+        return;
+    }
+    Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEF_CHECKED;
+
+    /*
+     * Op must be one of the Create* operators: CreateField, CreateBitField,
+     * CreateByteField, CreateWordField, CreateDwordField, CreateQwordField
+     */
+    OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
+    if (!(OpInfo->Flags & AML_CREATE))
+    {
+        return;
+    }
+
+    /* Second argument is the Index argument */
+
+    IndexOp = Op->Common.Value.Arg;
+    IndexOp = IndexOp->Common.Next;
+
+    /* Index argument must be a namepath */
+
+    if (IndexOp->Common.AmlOpcode != AML_INT_NAMEPATH_OP)
+    {
+        return;
+    }
+
+    /* Major cheat: We previously put the Tag ptr in the Node field */
+
+    Tag = ACPI_CAST_PTR (char, IndexOp->Common.Node);
+
+    /* Match the name in the info table */
+
+    for (Info = AslPredefinedInfo; Info->Name; Info++)
+    {
+        if (ACPI_COMPARE_NAME (Tag, Info->Name))
+        {
+            AcpiOsPrintf ("  // %4.4s: %s", Tag,
+                ACPI_CAST_PTR (char, Info->Description));
+            return;
+        }
+    }
+
+#endif
+    return;
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiDmMethodFlags
  *
  * PARAMETERS:  Op              - Method Object to be examined
diff --git a/src/acpica/source/components/disassembler/dmwalk.c b/src/acpica/source/components/disassembler/dmwalk.c
index 2bec308..dd655d8 100644
--- a/src/acpica/source/components/disassembler/dmwalk.c
+++ b/src/acpica/source/components/disassembler/dmwalk.c
@@ -525,7 +525,7 @@  AcpiDmDescendingOp (
      * keep track of the current column.
      */
     Info->Count++;
-    if (Info->Count /*+Info->LastLevel*/ > 10)
+    if (Info->Count /* +Info->LastLevel */ > 10)
     {
         Info->Count = 0;
         AcpiOsPrintf ("\n");
@@ -605,6 +605,10 @@  AcpiDmDescendingOp (
 
                 AcpiDmMethodFlags (Op);
                 AcpiOsPrintf (")");
+
+                /* Emit description comment for Method() with a predefined ACPI name */
+
+                AcpiDmPredefinedDescription (Op);
                 break;
 
 
@@ -675,7 +679,8 @@  AcpiDmDescendingOp (
 
             default:
 
-                AcpiOsPrintf ("*** Unhandled named opcode %X\n", Op->Common.AmlOpcode);
+                AcpiOsPrintf ("*** Unhandled named opcode %X\n",
+                    Op->Common.AmlOpcode);
                 break;
             }
         }
@@ -716,7 +721,8 @@  AcpiDmDescendingOp (
                 NextOp = NextOp->Common.Next;
 
                 Info->Flags = ACPI_PARSEOP_PARAMLIST;
-                AcpiDmWalkParseTree (NextOp, AcpiDmDescendingOp, AcpiDmAscendingOp, Info);
+                AcpiDmWalkParseTree (NextOp, AcpiDmDescendingOp,
+                    AcpiDmAscendingOp, Info);
                 Info->Flags = 0;
                 Info->Level = Level;
 
@@ -758,12 +764,18 @@  AcpiDmDescendingOp (
             if (Op->Common.DisasmOpcode == ACPI_DASM_RESOURCE)
             {
                 /*
-                 * We have a resource list.  Don't need to output
-                 * the buffer size Op.  Open up a new block
+                 * We have a resource list. Don't need to output
+                 * the buffer size Op. Open up a new block
                  */
                 NextOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
                 NextOp = NextOp->Common.Next;
-                AcpiOsPrintf (")\n");
+                AcpiOsPrintf (")");
+
+                /* Emit description comment for Name() with a predefined ACPI name */
+
+                AcpiDmPredefinedDescription (Op->Asl.Parent);
+
+                AcpiOsPrintf ("\n");
                 AcpiDmIndent (Info->Level);
                 AcpiOsPrintf ("{\n");
                 return (AE_OK);
@@ -791,7 +803,7 @@  AcpiDmDescendingOp (
 
         case AML_PACKAGE_OP:
 
-            /* The next op is the size or predicate parameter */
+            /* The next op is the size parameter */
 
             NextOp = AcpiPsGetDepthNext (NULL, Op);
             if (NextOp)
@@ -844,6 +856,7 @@  AcpiDmAscendingOp (
     void                    *Context)
 {
     ACPI_OP_WALK_INFO       *Info = Context;
+    ACPI_PARSE_OBJECT       *ParentOp;
 
 
     if (Op->Common.DisasmFlags & ACPI_PARSEOP_IGNORE)
@@ -869,6 +882,19 @@  AcpiDmAscendingOp (
 
         AcpiOsPrintf (")");
 
+        if (Op->Common.AmlOpcode == AML_NAME_OP)
+        {
+            /* Emit description comment for Name() with a predefined ACPI name */
+
+            AcpiDmPredefinedDescription (Op);
+        }
+        else
+        {
+            /* For Create* operators, attempt to emit resource tag description */
+
+            AcpiDmFieldPredefinedDescription (Op);
+        }
+
         /* Could be a nested operator, check if comma required */
 
         if (!AcpiDmCommaIfListMember (Op))
@@ -983,7 +1009,20 @@  AcpiDmAscendingOp (
          */
         if (Op->Common.Next)
         {
-            AcpiOsPrintf (")\n");
+            AcpiOsPrintf (")");
+
+            /* Emit description comment for Name() with a predefined ACPI name */
+
+            ParentOp = Op->Common.Parent;
+            if (ParentOp)
+            {
+                ParentOp = ParentOp->Common.Parent;
+                if (ParentOp && ParentOp->Asl.AmlOpcode == AML_NAME_OP)
+                {
+                    AcpiDmPredefinedDescription (ParentOp);
+                }
+            }
+            AcpiOsPrintf ("\n");
             AcpiDmIndent (Level - 1);
             AcpiOsPrintf ("{\n");
         }
diff --git a/src/acpica/source/components/dispatcher/dsfield.c b/src/acpica/source/components/dispatcher/dsfield.c
index 526d478..3047c5f 100644
--- a/src/acpica/source/components/dispatcher/dsfield.c
+++ b/src/acpica/source/components/dispatcher/dsfield.c
@@ -129,6 +129,18 @@ 
 
 /* Local prototypes */
 
+#ifdef ACPI_ASL_COMPILER
+#include "acdisasm.h"
+
+static ACPI_STATUS
+AcpiDsCreateExternalRegion (
+    ACPI_STATUS             LookupStatus,
+    ACPI_PARSE_OBJECT       *Op,
+    char                    *Path,
+    ACPI_WALK_STATE         *WalkState,
+    ACPI_NAMESPACE_NODE     **Node);
+#endif
+
 static ACPI_STATUS
 AcpiDsGetFieldNames (
     ACPI_CREATE_FIELD_INFO  *Info,
@@ -136,6 +148,69 @@  AcpiDsGetFieldNames (
     ACPI_PARSE_OBJECT       *Arg);
 
 
+#ifdef ACPI_ASL_COMPILER
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDsCreateExternalRegion (iASL Disassembler only)
+ *
+ * PARAMETERS:  LookupStatus    - Status from NsLookup operation
+ *              Op              - Op containing the Field definition and args
+ *              Path            - Pathname of the region
+ *  `           WalkState       - Current method state
+ *              Node            - Where the new region node is returned
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Add region to the external list if NOT_FOUND. Create a new
+ *              region node/object.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiDsCreateExternalRegion (
+    ACPI_STATUS             LookupStatus,
+    ACPI_PARSE_OBJECT       *Op,
+    char                    *Path,
+    ACPI_WALK_STATE         *WalkState,
+    ACPI_NAMESPACE_NODE     **Node)
+{
+    ACPI_STATUS             Status;
+    ACPI_OPERAND_OBJECT     *ObjDesc;
+
+
+    if (LookupStatus != AE_NOT_FOUND)
+    {
+        return (LookupStatus);
+    }
+
+    /*
+     * Table disassembly:
+     * OperationRegion not found. Generate an External for it, and
+     * insert the name into the namespace.
+     */
+    AcpiDmAddToExternalList (Op, Path, ACPI_TYPE_REGION, 0);
+    Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_REGION,
+       ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT, WalkState, Node);
+    if (ACPI_FAILURE (Status))
+    {
+        return (Status);
+    }
+
+    /* Must create and install a region object for the new node */
+
+    ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION);
+    if (!ObjDesc)
+    {
+        return (AE_NO_MEMORY);
+    }
+
+    ObjDesc->Region.Node = *Node;
+    Status = AcpiNsAttachObject (*Node, ObjDesc, ACPI_TYPE_REGION);
+    return (Status);
+}
+#endif
+
+
 /*******************************************************************************
  *
  * FUNCTION:    AcpiDsCreateBufferField
@@ -149,8 +224,8 @@  AcpiDsGetFieldNames (
  *              CreateBitFieldOp,
  *              CreateByteFieldOp,
  *              CreateWordFieldOp,
- *              CreateDWordFieldOp,
- *              CreateQWordFieldOp,
+ *              CreateDwordFieldOp,
+ *              CreateQwordFieldOp,
  *              CreateFieldOp       (all of which define a field in a buffer)
  *
  ******************************************************************************/
@@ -510,11 +585,16 @@  AcpiDsCreateField (
     /* First arg is the name of the parent OpRegion (must already exist) */
 
     Arg = Op->Common.Value.Arg;
+
     if (!RegionNode)
     {
         Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.Name,
                         ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE,
                         ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode);
+#ifdef ACPI_ASL_COMPILER
+        Status = AcpiDsCreateExternalRegion (Status, Arg,
+            Arg->Common.Value.Name, WalkState, &RegionNode);
+#endif
         if (ACPI_FAILURE (Status))
         {
             ACPI_ERROR_NAMESPACE (Arg->Common.Value.Name, Status);
@@ -700,6 +780,10 @@  AcpiDsCreateBankField (
         Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.Name,
                         ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE,
                         ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode);
+#ifdef ACPI_ASL_COMPILER
+        Status = AcpiDsCreateExternalRegion (Status, Arg,
+            Arg->Common.Value.Name, WalkState, &RegionNode);
+#endif
         if (ACPI_FAILURE (Status))
         {
             ACPI_ERROR_NAMESPACE (Arg->Common.Value.Name, Status);
diff --git a/src/acpica/source/components/dispatcher/dsopcode.c b/src/acpica/source/components/dispatcher/dsopcode.c
index 5da09bd..d6ddbfa 100644
--- a/src/acpica/source/components/dispatcher/dsopcode.c
+++ b/src/acpica/source/components/dispatcher/dsopcode.c
@@ -595,18 +595,18 @@  AcpiDsEvalTableRegionOperands (
 
 
     /*
-     * This is where we evaluate the SignatureString and OemIDString
-     * and OemTableIDString of the DataTableRegion declaration
+     * This is where we evaluate the Signature string, OemId string,
+     * and OemTableId string of the Data Table Region declaration
      */
     Node =  Op->Common.Node;
 
-    /* NextOp points to SignatureString op */
+    /* NextOp points to Signature string op */
 
     NextOp = Op->Common.Value.Arg;
 
     /*
-     * Evaluate/create the SignatureString and OemIDString
-     * and OemTableIDString operands
+     * Evaluate/create the Signature string, OemId string,
+     * and OemTableId string operands
      */
     Status = AcpiDsCreateOperands (WalkState, NextOp);
     if (ACPI_FAILURE (Status))
@@ -615,8 +615,8 @@  AcpiDsEvalTableRegionOperands (
     }
 
     /*
-     * Resolve the SignatureString and OemIDString
-     * and OemTableIDString operands
+     * Resolve the Signature string, OemId string,
+     * and OemTableId string operands
      */
     Status = AcpiExResolveOperands (Op->Common.AmlOpcode,
                 ACPI_WALK_OPERANDS, WalkState);
diff --git a/src/acpica/source/components/dispatcher/dswload.c b/src/acpica/source/components/dispatcher/dswload.c
index 1f689d6..7a4a84f 100644
--- a/src/acpica/source/components/dispatcher/dswload.c
+++ b/src/acpica/source/components/dispatcher/dswload.c
@@ -313,6 +313,20 @@  AcpiDsLoad1BeginOp (
             WalkState->ScopeInfo->Common.Value = ACPI_TYPE_ANY;
             break;
 
+        case ACPI_TYPE_METHOD:
+
+            /*
+             * Allow scope change to root during execution of module-level
+             * code. Root is typed METHOD during this time.
+             */
+            if ((Node == AcpiGbl_RootNode) &&
+                (WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL))
+            {
+                break;
+            }
+
+            /*lint -fallthrough */
+
         default:
 
             /* All other types are an error */
diff --git a/src/acpica/source/components/dispatcher/dswload2.c b/src/acpica/source/components/dispatcher/dswload2.c
index 85a86ec..139ff95 100644
--- a/src/acpica/source/components/dispatcher/dswload2.c
+++ b/src/acpica/source/components/dispatcher/dswload2.c
@@ -315,6 +315,20 @@  AcpiDsLoad2BeginOp (
             WalkState->ScopeInfo->Common.Value = ACPI_TYPE_ANY;
             break;
 
+        case ACPI_TYPE_METHOD:
+
+            /*
+             * Allow scope change to root during execution of module-level
+             * code. Root is typed METHOD during this time.
+             */
+            if ((Node == AcpiGbl_RootNode) &&
+                (WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL))
+            {
+                break;
+            }
+
+            /*lint -fallthrough */
+
         default:
 
             /* All other types are an error */
diff --git a/src/acpica/source/components/events/evgpe.c b/src/acpica/source/components/events/evgpe.c
index de32275..bb72a6e 100644
--- a/src/acpica/source/components/events/evgpe.c
+++ b/src/acpica/source/components/events/evgpe.c
@@ -590,6 +590,7 @@  AcpiEvAsynchExecuteGpeMethod (
     ACPI_STATUS             Status;
     ACPI_GPE_EVENT_INFO     *LocalGpeEventInfo;
     ACPI_EVALUATE_INFO      *Info;
+    ACPI_GPE_NOTIFY_INFO    *Notify;
 
 
     ACPI_FUNCTION_TRACE (EvAsynchExecuteGpeMethod);
@@ -645,10 +646,18 @@  AcpiEvAsynchExecuteGpeMethod (
          * completes. The notify handlers are NOT invoked synchronously
          * from this thread -- because handlers may in turn run other
          * control methods.
+         *
+         * June 2012: Expand implicit notify mechanism to support
+         * notifies on multiple device objects.
          */
-        Status = AcpiEvQueueNotifyRequest (
-                    LocalGpeEventInfo->Dispatch.DeviceNode,
-                    ACPI_NOTIFY_DEVICE_WAKE);
+        Notify = LocalGpeEventInfo->Dispatch.NotifyList;
+        while (ACPI_SUCCESS (Status) && Notify)
+        {
+            Status = AcpiEvQueueNotifyRequest (Notify->DeviceNode,
+                        ACPI_NOTIFY_DEVICE_WAKE);
+
+            Notify = Notify->Next;
+        }
         break;
 
     case ACPI_GPE_DISPATCH_METHOD:
diff --git a/src/acpica/source/components/events/evgpeutil.c b/src/acpica/source/components/events/evgpeutil.c
index a5ad320..38c7928 100644
--- a/src/acpica/source/components/events/evgpeutil.c
+++ b/src/acpica/source/components/events/evgpeutil.c
@@ -463,6 +463,8 @@  AcpiEvDeleteGpeHandlers (
     void                    *Context)
 {
     ACPI_GPE_EVENT_INFO     *GpeEventInfo;
+    ACPI_GPE_NOTIFY_INFO    *Notify;
+    ACPI_GPE_NOTIFY_INFO    *Next;
     UINT32                  i;
     UINT32                  j;
 
@@ -484,10 +486,27 @@  AcpiEvDeleteGpeHandlers (
             if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
                     ACPI_GPE_DISPATCH_HANDLER)
             {
+                /* Delete an installed handler block */
+
                 ACPI_FREE (GpeEventInfo->Dispatch.Handler);
                 GpeEventInfo->Dispatch.Handler = NULL;
                 GpeEventInfo->Flags &= ~ACPI_GPE_DISPATCH_MASK;
             }
+            else if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
+                    ACPI_GPE_DISPATCH_NOTIFY)
+            {
+                /* Delete the implicit notification device list */
+
+                Notify = GpeEventInfo->Dispatch.NotifyList;
+                while (Notify)
+                {
+                    Next = Notify->Next;
+                    ACPI_FREE (Notify);
+                    Notify = Next;
+                }
+                GpeEventInfo->Dispatch.NotifyList = NULL;
+                GpeEventInfo->Flags &= ~ACPI_GPE_DISPATCH_MASK;
+            }
         }
     }
 
diff --git a/src/acpica/source/components/events/evmisc.c b/src/acpica/source/components/events/evmisc.c
index 7369daa..ae3cecd 100644
--- a/src/acpica/source/components/events/evmisc.c
+++ b/src/acpica/source/components/events/evmisc.c
@@ -183,107 +183,82 @@  AcpiEvQueueNotifyRequest (
     UINT32                  NotifyValue)
 {
     ACPI_OPERAND_OBJECT     *ObjDesc;
-    ACPI_OPERAND_OBJECT     *HandlerObj = NULL;
-    ACPI_GENERIC_STATE      *NotifyInfo;
+    ACPI_OPERAND_OBJECT     *HandlerListHead = NULL;
+    ACPI_GENERIC_STATE      *Info;
+    UINT8                   HandlerListId = 0;
     ACPI_STATUS             Status = AE_OK;
 
 
     ACPI_FUNCTION_NAME (EvQueueNotifyRequest);
 
 
-    /*
-     * For value 0x03 (Ejection Request), may need to run a device method.
-     * For value 0x02 (Device Wake), if _PRW exists, may need to run
-     *   the _PS0 method.
-     * For value 0x80 (Status Change) on the power button or sleep button,
-     *   initiate soft-off or sleep operation.
-     *
-     * For all cases, simply dispatch the notify to the handler.
-     */
-    ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
-        "Dispatching Notify on [%4.4s] (%s) Value 0x%2.2X (%s) Node %p\n",
-        AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type),
-        NotifyValue, AcpiUtGetNotifyName (NotifyValue), Node));
+    /* Are Notifies allowed on this object? */
 
-    /* Get the notify object attached to the NS Node */
-
-    ObjDesc = AcpiNsGetAttachedObject (Node);
-    if (ObjDesc)
+    if (!AcpiEvIsNotifyObject (Node))
     {
-        /* We have the notify object, Get the correct handler */
-
-        switch (Node->Type)
-        {
-        /* Notify is allowed only on these types */
+        return (AE_TYPE);
+    }
 
-        case ACPI_TYPE_DEVICE:
-        case ACPI_TYPE_THERMAL:
-        case ACPI_TYPE_PROCESSOR:
+    /* Get the correct notify list type (System or Device) */
 
-            if (NotifyValue <= ACPI_MAX_SYS_NOTIFY)
-            {
-                HandlerObj = ObjDesc->CommonNotify.SystemNotify;
-            }
-            else
-            {
-                HandlerObj = ObjDesc->CommonNotify.DeviceNotify;
-            }
-            break;
+    if (NotifyValue <= ACPI_MAX_SYS_NOTIFY)
+    {
+        HandlerListId = ACPI_SYSTEM_HANDLER_LIST;
+    }
+    else
+    {
+        HandlerListId = ACPI_DEVICE_HANDLER_LIST;
+    }
 
-        default:
+    /* Get the notify object attached to the namespace Node */
 
-            /* All other types are not supported */
+    ObjDesc = AcpiNsGetAttachedObject (Node);
+    if (ObjDesc)
+    {
+        /* We have an attached object, Get the correct handler list */
 
-            return (AE_TYPE);
-        }
+        HandlerListHead = ObjDesc->CommonNotify.NotifyList[HandlerListId];
     }
 
     /*
-     * If there is a handler to run, schedule the dispatcher.
-     * Check for:
-     * 1) Global system notify handler
-     * 2) Global device notify handler
-     * 3) Per-device notify handler
+     * If there is no notify handler (Global or Local)
+     * for this object, just ignore the notify
      */
-    if ((AcpiGbl_SystemNotify.Handler &&
-            (NotifyValue <= ACPI_MAX_SYS_NOTIFY)) ||
-        (AcpiGbl_DeviceNotify.Handler &&
-            (NotifyValue > ACPI_MAX_SYS_NOTIFY))  ||
-        HandlerObj)
+    if (!AcpiGbl_GlobalNotify[HandlerListId].Handler && !HandlerListHead)
     {
-        NotifyInfo = AcpiUtCreateGenericState ();
-        if (!NotifyInfo)
-        {
-            return (AE_NO_MEMORY);
-        }
+        ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+            "No notify handler for Notify, ignoring (%4.4s, %X) node %p\n",
+            AcpiUtGetNodeName (Node), NotifyValue, Node));
 
-        if (!HandlerObj)
-        {
-            ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
-                "Executing system notify handler for Notify (%4.4s, %X) "
-                "node %p\n",
-                AcpiUtGetNodeName (Node), NotifyValue, Node));
-        }
+        return (AE_OK);
+    }
 
-        NotifyInfo->Common.DescriptorType = ACPI_DESC_TYPE_STATE_NOTIFY;
-        NotifyInfo->Notify.Node = Node;
-        NotifyInfo->Notify.Value = (UINT16) NotifyValue;
-        NotifyInfo->Notify.HandlerObj = HandlerObj;
+    /* Setup notify info and schedule the notify dispatcher */
 
-        Status = AcpiOsExecute (
-                    OSL_NOTIFY_HANDLER, AcpiEvNotifyDispatch, NotifyInfo);
-        if (ACPI_FAILURE (Status))
-        {
-            AcpiUtDeleteGenericState (NotifyInfo);
-        }
-    }
-    else
+    Info = AcpiUtCreateGenericState ();
+    if (!Info)
     {
-        /* There is no notify handler (per-device or system) for this device */
+        return (AE_NO_MEMORY);
+    }
 
-        ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
-            "No notify handler for Notify (%4.4s, %X) node %p\n",
-            AcpiUtGetNodeName (Node), NotifyValue, Node));
+    Info->Common.DescriptorType = ACPI_DESC_TYPE_STATE_NOTIFY;
+
+    Info->Notify.Node = Node;
+    Info->Notify.Value = (UINT16) NotifyValue;
+    Info->Notify.HandlerListId = HandlerListId;
+    Info->Notify.HandlerListHead = HandlerListHead;
+    Info->Notify.Global = &AcpiGbl_GlobalNotify[HandlerListId];
+
+    ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+        "Dispatching Notify on [%4.4s] (%s) Value 0x%2.2X (%s) Node %p\n",
+        AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type),
+        NotifyValue, AcpiUtGetNotifyName (NotifyValue), Node));
+
+    Status = AcpiOsExecute (OSL_NOTIFY_HANDLER, AcpiEvNotifyDispatch,
+        Info);
+    if (ACPI_FAILURE (Status))
+    {
+        AcpiUtDeleteGenericState (Info);
     }
 
     return (Status);
@@ -307,61 +282,37 @@  static void ACPI_SYSTEM_XFACE
 AcpiEvNotifyDispatch (
     void                    *Context)
 {
-    ACPI_GENERIC_STATE      *NotifyInfo = (ACPI_GENERIC_STATE *) Context;
-    ACPI_NOTIFY_HANDLER     GlobalHandler = NULL;
-    void                    *GlobalContext = NULL;
+    ACPI_GENERIC_STATE      *Info = (ACPI_GENERIC_STATE *) Context;
     ACPI_OPERAND_OBJECT     *HandlerObj;
 
 
     ACPI_FUNCTION_ENTRY ();
 
 
-    /*
-     * We will invoke a global notify handler if installed. This is done
-     * _before_ we invoke the per-device handler attached to the device.
-     */
-    if (NotifyInfo->Notify.Value <= ACPI_MAX_SYS_NOTIFY)
-    {
-        /* Global system notification handler */
+    /* Invoke a global notify handler if installed */
 
-        if (AcpiGbl_SystemNotify.Handler)
-        {
-            GlobalHandler = AcpiGbl_SystemNotify.Handler;
-            GlobalContext = AcpiGbl_SystemNotify.Context;
-        }
-    }
-    else
+    if (Info->Notify.Global->Handler)
     {
-        /* Global driver notification handler */
-
-        if (AcpiGbl_DeviceNotify.Handler)
-        {
-            GlobalHandler = AcpiGbl_DeviceNotify.Handler;
-            GlobalContext = AcpiGbl_DeviceNotify.Context;
-        }
+        Info->Notify.Global->Handler (Info->Notify.Node,
+            Info->Notify.Value,
+            Info->Notify.Global->Context);
     }
 
-    /* Invoke the system handler first, if present */
+    /* Now invoke the local notify handler(s) if any are installed */
 
-    if (GlobalHandler)
+    HandlerObj = Info->Notify.HandlerListHead;
+    while (HandlerObj)
     {
-        GlobalHandler (NotifyInfo->Notify.Node, NotifyInfo->Notify.Value,
-            GlobalContext);
-    }
-
-    /* Now invoke the per-device handler, if present */
-
-    HandlerObj = NotifyInfo->Notify.HandlerObj;
-    if (HandlerObj)
-    {
-        HandlerObj->Notify.Handler (NotifyInfo->Notify.Node,
-            NotifyInfo->Notify.Value,
+        HandlerObj->Notify.Handler (Info->Notify.Node,
+            Info->Notify.Value,
             HandlerObj->Notify.Context);
+
+        HandlerObj = HandlerObj->Notify.Next[Info->Notify.HandlerListId];
     }
 
     /* All done with the info object */
 
-    AcpiUtDeleteGenericState (NotifyInfo);
+    AcpiUtDeleteGenericState (Info);
 }
 
 
diff --git a/src/acpica/source/components/events/evxface.c b/src/acpica/source/components/events/evxface.c
index a6aea09..b0c5ce3 100644
--- a/src/acpica/source/components/events/evxface.c
+++ b/src/acpica/source/components/events/evxface.c
@@ -132,15 +132,21 @@ 
  *
  * PARAMETERS:  Device          - The device for which notifies will be handled
  *              HandlerType     - The type of handler:
- *                                  ACPI_SYSTEM_NOTIFY: SystemHandler (00-7f)
- *                                  ACPI_DEVICE_NOTIFY: DriverHandler (80-ff)
- *                                  ACPI_ALL_NOTIFY:  both system and device
+ *                                  ACPI_SYSTEM_NOTIFY: System Handler (00-7F)
+ *                                  ACPI_DEVICE_NOTIFY: Device Handler (80-FF)
+ *                                  ACPI_ALL_NOTIFY:    Both System and Device
  *              Handler         - Address of the handler
  *              Context         - Value passed to the handler on each GPE
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Install a handler for notifies on an ACPI device
+ * DESCRIPTION: Install a handler for notifications on an ACPI Device,
+ *              ThermalZone, or Processor object.
+ *
+ * NOTES:       The Root namespace object may have only one handler for each
+ *              type of notify (System/Device). Device/Thermal/Processor objects
+ *              may have one device notify handler, and multiple system notify
+ *              handlers.
  *
  ******************************************************************************/
 
@@ -151,10 +157,11 @@  AcpiInstallNotifyHandler (
     ACPI_NOTIFY_HANDLER     Handler,
     void                    *Context)
 {
+    ACPI_NAMESPACE_NODE     *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Device);
     ACPI_OPERAND_OBJECT     *ObjDesc;
-    ACPI_OPERAND_OBJECT     *NotifyObj;
-    ACPI_NAMESPACE_NODE     *Node;
+    ACPI_OPERAND_OBJECT     *HandlerObj;
     ACPI_STATUS             Status;
+    UINT32                  i;
 
 
     ACPI_FUNCTION_TRACE (AcpiInstallNotifyHandler);
@@ -162,8 +169,7 @@  AcpiInstallNotifyHandler (
 
     /* Parameter validation */
 
-    if ((!Device)  ||
-        (!Handler) ||
+    if ((!Device) || (!Handler) || (!HandlerType) ||
         (HandlerType > ACPI_MAX_NOTIFY_HANDLER_TYPE))
     {
         return_ACPI_STATUS (AE_BAD_PARAMETER);
@@ -175,135 +181,124 @@  AcpiInstallNotifyHandler (
         return_ACPI_STATUS (Status);
     }
 
-    /* Convert and validate the device handle */
-
-    Node = AcpiNsValidateHandle (Device);
-    if (!Node)
-    {
-        Status = AE_BAD_PARAMETER;
-        goto UnlockAndExit;
-    }
-
     /*
      * Root Object:
      * Registering a notify handler on the root object indicates that the
      * caller wishes to receive notifications for all objects. Note that
-     * only one <external> global handler can be regsitered (per notify type).
+     * only one global handler can be registered per notify type.
+     * Ensure that a handler is not already installed.
      */
     if (Device == ACPI_ROOT_OBJECT)
     {
-        /* Make sure the handler is not already installed */
-
-        if (((HandlerType & ACPI_SYSTEM_NOTIFY) &&
-                AcpiGbl_SystemNotify.Handler)       ||
-            ((HandlerType & ACPI_DEVICE_NOTIFY) &&
-                AcpiGbl_DeviceNotify.Handler))
-        {
-            Status = AE_ALREADY_EXISTS;
-            goto UnlockAndExit;
-        }
-
-        if (HandlerType & ACPI_SYSTEM_NOTIFY)
-        {
-            AcpiGbl_SystemNotify.Node    = Node;
-            AcpiGbl_SystemNotify.Handler = Handler;
-            AcpiGbl_SystemNotify.Context = Context;
-        }
-
-        if (HandlerType & ACPI_DEVICE_NOTIFY)
+        for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
         {
-            AcpiGbl_DeviceNotify.Node    = Node;
-            AcpiGbl_DeviceNotify.Handler = Handler;
-            AcpiGbl_DeviceNotify.Context = Context;
+            if (HandlerType & (i+1))
+            {
+                if (AcpiGbl_GlobalNotify[i].Handler)
+                {
+                    Status = AE_ALREADY_EXISTS;
+                    goto UnlockAndExit;
+                }
+
+                AcpiGbl_GlobalNotify[i].Handler = Handler;
+                AcpiGbl_GlobalNotify[i].Context = Context;
+            }
         }
 
-        /* Global notify handler installed */
+        goto UnlockAndExit; /* Global notify handler installed, all done */
     }
 
     /*
      * All Other Objects:
-     * Caller will only receive notifications specific to the target object.
-     * Note that only certain object types can receive notifications.
+     * Caller will only receive notifications specific to the target
+     * object. Note that only certain object types are allowed to
+     * receive notifications.
      */
-    else
+
+    /* Are Notifies allowed on this object? */
+
+    if (!AcpiEvIsNotifyObject (Node))
+    {
+        Status = AE_TYPE;
+        goto UnlockAndExit;
+    }
+
+    /* Check for an existing internal object, might not exist */
+
+    ObjDesc = AcpiNsGetAttachedObject (Node);
+    if (!ObjDesc)
     {
-        /* Notifies allowed on this object? */
+        /* Create a new object */
 
-        if (!AcpiEvIsNotifyObject (Node))
+        ObjDesc = AcpiUtCreateInternalObject (Node->Type);
+        if (!ObjDesc)
         {
-            Status = AE_TYPE;
+            Status = AE_NO_MEMORY;
             goto UnlockAndExit;
         }
 
-        /* Check for an existing internal object */
+        /* Attach new object to the Node, remove local reference */
 
-        ObjDesc = AcpiNsGetAttachedObject (Node);
-        if (ObjDesc)
+        Status = AcpiNsAttachObject (Device, ObjDesc, Node->Type);
+        AcpiUtRemoveReference (ObjDesc);
+        if (ACPI_FAILURE (Status))
         {
-            /* Object exists - make sure there's no handler */
-
-            if (((HandlerType & ACPI_SYSTEM_NOTIFY) &&
-                    ObjDesc->CommonNotify.SystemNotify)   ||
-                ((HandlerType & ACPI_DEVICE_NOTIFY) &&
-                    ObjDesc->CommonNotify.DeviceNotify))
-            {
-                Status = AE_ALREADY_EXISTS;
-                goto UnlockAndExit;
-            }
+            goto UnlockAndExit;
         }
-        else
-        {
-            /* Create a new object */
-
-            ObjDesc = AcpiUtCreateInternalObject (Node->Type);
-            if (!ObjDesc)
-            {
-                Status = AE_NO_MEMORY;
-                goto UnlockAndExit;
-            }
-
-            /* Attach new object to the Node */
-
-            Status = AcpiNsAttachObject (Device, ObjDesc, Node->Type);
+    }
 
-            /* Remove local reference to the object */
+    /* Ensure that the handler is not already installed in the lists */
 
-            AcpiUtRemoveReference (ObjDesc);
-            if (ACPI_FAILURE (Status))
+    for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
+    {
+        if (HandlerType & (i+1))
+        {
+            HandlerObj = ObjDesc->CommonNotify.NotifyList[i];
+            while (HandlerObj)
             {
-                goto UnlockAndExit;
+                if (HandlerObj->Notify.Handler == Handler)
+                {
+                    Status = AE_ALREADY_EXISTS;
+                    goto UnlockAndExit;
+                }
+
+                HandlerObj = HandlerObj->Notify.Next[i];
             }
         }
+    }
 
-        /* Install the handler */
+    /* Create and populate a new notify handler object */
 
-        NotifyObj = AcpiUtCreateInternalObject (ACPI_TYPE_LOCAL_NOTIFY);
-        if (!NotifyObj)
-        {
-            Status = AE_NO_MEMORY;
-            goto UnlockAndExit;
-        }
+    HandlerObj = AcpiUtCreateInternalObject (ACPI_TYPE_LOCAL_NOTIFY);
+    if (!HandlerObj)
+    {
+        Status = AE_NO_MEMORY;
+        goto UnlockAndExit;
+    }
 
-        NotifyObj->Notify.Node    = Node;
-        NotifyObj->Notify.Handler = Handler;
-        NotifyObj->Notify.Context = Context;
+    HandlerObj->Notify.Node = Node;
+    HandlerObj->Notify.HandlerType = HandlerType;
+    HandlerObj->Notify.Handler = Handler;
+    HandlerObj->Notify.Context = Context;
 
-        if (HandlerType & ACPI_SYSTEM_NOTIFY)
-        {
-            ObjDesc->CommonNotify.SystemNotify = NotifyObj;
-        }
+    /* Install the handler at the list head(s) */
 
-        if (HandlerType & ACPI_DEVICE_NOTIFY)
+    for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
+    {
+        if (HandlerType & (i+1))
         {
-            ObjDesc->CommonNotify.DeviceNotify = NotifyObj;
+            HandlerObj->Notify.Next[i] =
+                ObjDesc->CommonNotify.NotifyList[i];
+
+            ObjDesc->CommonNotify.NotifyList[i] = HandlerObj;
         }
+    }
 
-        if (HandlerType == ACPI_ALL_NOTIFY)
-        {
-            /* Extra ref if installed in both */
+    /* Add an extra reference if handler was installed in both lists */
 
-            AcpiUtAddReference (NotifyObj);
-        }
+    if (HandlerType == ACPI_ALL_NOTIFY)
+    {
+        AcpiUtAddReference (HandlerObj);
     }
 
 
@@ -319,11 +314,11 @@  ACPI_EXPORT_SYMBOL (AcpiInstallNotifyHandler)
  *
  * FUNCTION:    AcpiRemoveNotifyHandler
  *
- * PARAMETERS:  Device          - The device for which notifies will be handled
+ * PARAMETERS:  Device          - The device for which the handler is installed
  *              HandlerType     - The type of handler:
- *                                  ACPI_SYSTEM_NOTIFY: SystemHandler (00-7f)
- *                                  ACPI_DEVICE_NOTIFY: DriverHandler (80-ff)
- *                                  ACPI_ALL_NOTIFY:  both system and device
+ *                                  ACPI_SYSTEM_NOTIFY: System Handler (00-7F)
+ *                                  ACPI_DEVICE_NOTIFY: Device Handler (80-FF)
+ *                                  ACPI_ALL_NOTIFY:    Both System and Device
  *              Handler         - Address of the handler
  *
  * RETURN:      Status
@@ -338,10 +333,12 @@  AcpiRemoveNotifyHandler (
     UINT32                  HandlerType,
     ACPI_NOTIFY_HANDLER     Handler)
 {
-    ACPI_OPERAND_OBJECT     *NotifyObj;
+    ACPI_NAMESPACE_NODE     *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Device);
     ACPI_OPERAND_OBJECT     *ObjDesc;
-    ACPI_NAMESPACE_NODE     *Node;
+    ACPI_OPERAND_OBJECT     *HandlerObj;
+    ACPI_OPERAND_OBJECT     *PreviousHandlerObj;
     ACPI_STATUS             Status;
+    UINT32                  i;
 
 
     ACPI_FUNCTION_TRACE (AcpiRemoveNotifyHandler);
@@ -349,122 +346,103 @@  AcpiRemoveNotifyHandler (
 
     /* Parameter validation */
 
-    if ((!Device)  ||
-        (!Handler) ||
+    if ((!Device) || (!Handler) || (!HandlerType) ||
         (HandlerType > ACPI_MAX_NOTIFY_HANDLER_TYPE))
     {
         return_ACPI_STATUS (AE_BAD_PARAMETER);
     }
 
+    /* Make sure all deferred notify tasks are completed */
+
+    AcpiOsWaitEventsComplete ();
+
     Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
     if (ACPI_FAILURE (Status))
     {
         return_ACPI_STATUS (Status);
     }
 
-    /* Convert and validate the device handle */
-
-    Node = AcpiNsValidateHandle (Device);
-    if (!Node)
-    {
-        Status = AE_BAD_PARAMETER;
-        goto UnlockAndExit;
-    }
-
-    /* Root Object */
+    /* Root Object. Global handlers are removed here */
 
     if (Device == ACPI_ROOT_OBJECT)
     {
-        ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
-            "Removing notify handler for namespace root object\n"));
-
-        if (((HandlerType & ACPI_SYSTEM_NOTIFY) &&
-              !AcpiGbl_SystemNotify.Handler)        ||
-            ((HandlerType & ACPI_DEVICE_NOTIFY) &&
-              !AcpiGbl_DeviceNotify.Handler))
-        {
-            Status = AE_NOT_EXIST;
-            goto UnlockAndExit;
-        }
-
-        if (HandlerType & ACPI_SYSTEM_NOTIFY)
+        for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
         {
-            AcpiGbl_SystemNotify.Node    = NULL;
-            AcpiGbl_SystemNotify.Handler = NULL;
-            AcpiGbl_SystemNotify.Context = NULL;
+            if (HandlerType & (i+1))
+            {
+                if (!AcpiGbl_GlobalNotify[i].Handler ||
+                    (AcpiGbl_GlobalNotify[i].Handler != Handler))
+                {
+                    Status = AE_NOT_EXIST;
+                    goto UnlockAndExit;
+                }
+
+                ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+                    "Removing global notify handler\n"));
+
+                AcpiGbl_GlobalNotify[i].Handler = NULL;
+                AcpiGbl_GlobalNotify[i].Context = NULL;
+            }
         }
 
-        if (HandlerType & ACPI_DEVICE_NOTIFY)
-        {
-            AcpiGbl_DeviceNotify.Node    = NULL;
-            AcpiGbl_DeviceNotify.Handler = NULL;
-            AcpiGbl_DeviceNotify.Context = NULL;
-        }
+        goto UnlockAndExit;
     }
 
-    /* All Other Objects */
+    /* All other objects: Are Notifies allowed on this object? */
 
-    else
+    if (!AcpiEvIsNotifyObject (Node))
     {
-        /* Notifies allowed on this object? */
+        Status = AE_TYPE;
+        goto UnlockAndExit;
+    }
 
-        if (!AcpiEvIsNotifyObject (Node))
-        {
-            Status = AE_TYPE;
-            goto UnlockAndExit;
-        }
+    /* Must have an existing internal object */
+
+    ObjDesc = AcpiNsGetAttachedObject (Node);
+    if (!ObjDesc)
+    {
+        Status = AE_NOT_EXIST;
+        goto UnlockAndExit;
+    }
 
-        /* Check for an existing internal object */
+    /* Internal object exists. Find the handler and remove it */
 
-        ObjDesc = AcpiNsGetAttachedObject (Node);
-        if (!ObjDesc)
+    for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
+    {
+        if (HandlerType & (i+1))
         {
-            Status = AE_NOT_EXIST;
-            goto UnlockAndExit;
-        }
+            HandlerObj = ObjDesc->CommonNotify.NotifyList[i];
+            PreviousHandlerObj = NULL;
 
-        /* Object exists - make sure there's an existing handler */
+            /* Attempt to find the handler in the handler list */
 
-        if (HandlerType & ACPI_SYSTEM_NOTIFY)
-        {
-            NotifyObj = ObjDesc->CommonNotify.SystemNotify;
-            if (!NotifyObj)
+            while (HandlerObj &&
+                  (HandlerObj->Notify.Handler != Handler))
             {
-                Status = AE_NOT_EXIST;
-                goto UnlockAndExit;
+                PreviousHandlerObj = HandlerObj;
+                HandlerObj = HandlerObj->Notify.Next[i];
             }
 
-            if (NotifyObj->Notify.Handler != Handler)
+            if (!HandlerObj)
             {
-                Status = AE_BAD_PARAMETER;
+                Status = AE_NOT_EXIST;
                 goto UnlockAndExit;
             }
 
-            /* Remove the handler */
+            /* Remove the handler object from the list */
 
-            ObjDesc->CommonNotify.SystemNotify = NULL;
-            AcpiUtRemoveReference (NotifyObj);
-        }
-
-        if (HandlerType & ACPI_DEVICE_NOTIFY)
-        {
-            NotifyObj = ObjDesc->CommonNotify.DeviceNotify;
-            if (!NotifyObj)
+            if (PreviousHandlerObj) /* Handler is not at the list head */
             {
-                Status = AE_NOT_EXIST;
-                goto UnlockAndExit;
+                PreviousHandlerObj->Notify.Next[i] =
+                    HandlerObj->Notify.Next[i];
             }
-
-            if (NotifyObj->Notify.Handler != Handler)
+            else /* Handler is at the list head */
             {
-                Status = AE_BAD_PARAMETER;
-                goto UnlockAndExit;
+                ObjDesc->CommonNotify.NotifyList[i] =
+                    HandlerObj->Notify.Next[i];
             }
 
-            /* Remove the handler */
-
-            ObjDesc->CommonNotify.DeviceNotify = NULL;
-            AcpiUtRemoveReference (NotifyObj);
+            AcpiUtRemoveReference (HandlerObj);
         }
     }
 
@@ -894,6 +872,10 @@  AcpiRemoveGpeHandler (
         return_ACPI_STATUS (AE_BAD_PARAMETER);
     }
 
+    /* Make sure all deferred GPE tasks are completed */
+
+    AcpiOsWaitEventsComplete ();
+
     Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
     if (ACPI_FAILURE (Status))
     {
diff --git a/src/acpica/source/components/events/evxfgpe.c b/src/acpica/source/components/events/evxfgpe.c
index 7018513..29e1d68 100644
--- a/src/acpica/source/components/events/evxfgpe.c
+++ b/src/acpica/source/components/events/evxfgpe.c
@@ -155,7 +155,7 @@  AcpiUpdateAllGpes (
     ACPI_STATUS             Status;
 
 
-    ACPI_FUNCTION_TRACE (AcpiUpdateGpes);
+    ACPI_FUNCTION_TRACE (AcpiUpdateAllGpes);
 
 
     Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
@@ -367,9 +367,11 @@  AcpiSetupGpeForWake (
     ACPI_HANDLE             GpeDevice,
     UINT32                  GpeNumber)
 {
-    ACPI_STATUS             Status = AE_BAD_PARAMETER;
+    ACPI_STATUS             Status;
     ACPI_GPE_EVENT_INFO     *GpeEventInfo;
     ACPI_NAMESPACE_NODE     *DeviceNode;
+    ACPI_GPE_NOTIFY_INFO    *Notify;
+    ACPI_GPE_NOTIFY_INFO    *NewNotify;
     ACPI_CPU_FLAGS          Flags;
 
 
@@ -405,32 +407,88 @@  AcpiSetupGpeForWake (
         return_ACPI_STATUS (AE_BAD_PARAMETER);
     }
 
+    /*
+     * Allocate a new notify object up front, in case it is needed.
+     * Memory allocation while holding a spinlock is a big no-no
+     * on some hosts.
+     */
+    NewNotify = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_GPE_NOTIFY_INFO));
+    if (!NewNotify)
+    {
+        return_ACPI_STATUS (AE_NO_MEMORY);
+    }
+
     Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
 
     /* Ensure that we have a valid GPE number */
 
     GpeEventInfo = AcpiEvGetGpeEventInfo (GpeDevice, GpeNumber);
-    if (GpeEventInfo)
+    if (!GpeEventInfo)
+    {
+        Status = AE_BAD_PARAMETER;
+        goto UnlockAndExit;
+    }
+
+    /*
+     * If there is no method or handler for this GPE, then the
+     * WakeDevice will be notified whenever this GPE fires. This is
+     * known as an "implicit notify". Note: The GPE is assumed to be
+     * level-triggered (for windows compatibility).
+     */
+    if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
+            ACPI_GPE_DISPATCH_NONE)
     {
         /*
-         * If there is no method or handler for this GPE, then the
-         * WakeDevice will be notified whenever this GPE fires (aka
-         * "implicit notify") Note: The GPE is assumed to be
-         * level-triggered (for windows compatibility).
+         * This is the first device for implicit notify on this GPE.
+         * Just set the flags here, and enter the NOTIFY block below.
          */
-        if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
-                ACPI_GPE_DISPATCH_NONE)
+        GpeEventInfo->Flags =
+            (ACPI_GPE_DISPATCH_NOTIFY | ACPI_GPE_LEVEL_TRIGGERED);
+    }
+
+    /*
+     * If we already have an implicit notify on this GPE, add
+     * this device to the notify list.
+     */
+    if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
+            ACPI_GPE_DISPATCH_NOTIFY)
+    {
+        /* Ensure that the device is not already in the list */
+
+        Notify = GpeEventInfo->Dispatch.NotifyList;
+        while (Notify)
         {
-            GpeEventInfo->Flags =
-                (ACPI_GPE_DISPATCH_NOTIFY | ACPI_GPE_LEVEL_TRIGGERED);
-            GpeEventInfo->Dispatch.DeviceNode = DeviceNode;
+            if (Notify->DeviceNode == DeviceNode)
+            {
+                Status = AE_ALREADY_EXISTS;
+                goto UnlockAndExit;
+            }
+            Notify = Notify->Next;
         }
 
-        GpeEventInfo->Flags |= ACPI_GPE_CAN_WAKE;
-        Status = AE_OK;
+        /* Add this device to the notify list for this GPE */
+
+        NewNotify->DeviceNode = DeviceNode;
+        NewNotify->Next = GpeEventInfo->Dispatch.NotifyList;
+        GpeEventInfo->Dispatch.NotifyList = NewNotify;
+        NewNotify = NULL;
     }
 
+    /* Mark the GPE as a possible wake event */
+
+    GpeEventInfo->Flags |= ACPI_GPE_CAN_WAKE;
+    Status = AE_OK;
+
+
+UnlockAndExit:
     AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
+
+    /* Delete the notify object if it was not used above */
+
+    if (NewNotify)
+    {
+        ACPI_FREE (NewNotify);
+    }
     return_ACPI_STATUS (Status);
 }
 
diff --git a/src/acpica/source/components/executer/exconfig.c b/src/acpica/source/components/executer/exconfig.c
index 69361d5..55cef28 100644
--- a/src/acpica/source/components/executer/exconfig.c
+++ b/src/acpica/source/components/executer/exconfig.c
@@ -252,7 +252,7 @@  AcpiExLoadTableOp (
     ACPI_FUNCTION_TRACE (ExLoadTableOp);
 
 
-    /* Validate lengths for the SignatureString, OEMIDString, OEMTableID */
+    /* Validate lengths for the Signature, OemId, and OemTableId strings */
 
     if ((Operand[0]->String.Length > ACPI_NAME_SIZE) ||
         (Operand[1]->String.Length > ACPI_OEM_ID_SIZE) ||
diff --git a/src/acpica/source/components/executer/exdump.c b/src/acpica/source/components/executer/exdump.c
index 5aab606..b525333 100644
--- a/src/acpica/source/components/executer/exdump.c
+++ b/src/acpica/source/components/executer/exdump.c
@@ -203,8 +203,8 @@  static ACPI_EXDUMP_INFO     AcpiExDumpDevice[4] =
 {
     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpDevice),         NULL},
     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.Handler),               "Handler"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.SystemNotify),          "System Notify"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.DeviceNotify),          "Device Notify"}
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.NotifyList[0]),         "System Notify"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.NotifyList[1]),         "Device Notify"}
 };
 
 static ACPI_EXDUMP_INFO     AcpiExDumpEvent[2] =
@@ -251,8 +251,8 @@  static ACPI_EXDUMP_INFO     AcpiExDumpPower[5] =
     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpPower),          NULL},
     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (PowerResource.SystemLevel),    "System Level"},
     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (PowerResource.ResourceOrder),  "Resource Order"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.SystemNotify),   "System Notify"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.DeviceNotify),   "Device Notify"}
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.NotifyList[0]),  "System Notify"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.NotifyList[1]),  "Device Notify"}
 };
 
 static ACPI_EXDUMP_INFO     AcpiExDumpProcessor[7] =
@@ -261,16 +261,16 @@  static ACPI_EXDUMP_INFO     AcpiExDumpProcessor[7] =
     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Processor.ProcId),             "Processor ID"},
     {ACPI_EXD_UINT8 ,   ACPI_EXD_OFFSET (Processor.Length),             "Length"},
     {ACPI_EXD_ADDRESS,  ACPI_EXD_OFFSET (Processor.Address),            "Address"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.SystemNotify),       "System Notify"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.DeviceNotify),       "Device Notify"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.NotifyList[0]),      "System Notify"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.NotifyList[1]),      "Device Notify"},
     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.Handler),            "Handler"}
 };
 
 static ACPI_EXDUMP_INFO     AcpiExDumpThermal[4] =
 {
     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpThermal),        NULL},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.SystemNotify),     "System Notify"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.DeviceNotify),     "Device Notify"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.NotifyList[0]),    "System Notify"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.NotifyList[1]),    "Device Notify"},
     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.Handler),          "Handler"}
 };
 
@@ -330,11 +330,15 @@  static ACPI_EXDUMP_INFO     AcpiExDumpAddressHandler[6] =
     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (AddressSpace.Context),         "Context"}
 };
 
-static ACPI_EXDUMP_INFO     AcpiExDumpNotify[3] =
+static ACPI_EXDUMP_INFO     AcpiExDumpNotify[7] =
 {
     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpNotify),         NULL},
     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Node),                  "Node"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Context),               "Context"}
+    {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (Notify.HandlerType),           "Handler Type"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Handler),               "Handler"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Context),               "Context"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Next[0]),               "Next System Notify"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Next[1]),               "Next Device Notify"}
 };
 
 
diff --git a/src/acpica/source/components/executer/exprep.c b/src/acpica/source/components/executer/exprep.c
index 0b65ab9..9b05f9d 100644
--- a/src/acpica/source/components/executer/exprep.c
+++ b/src/acpica/source/components/executer/exprep.c
@@ -490,8 +490,8 @@  AcpiExPrepCommonFieldObject (
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Construct an ACPI_OPERAND_OBJECT of type DefField and
- *              connect it to the parent Node.
+ * DESCRIPTION: Construct an object of type ACPI_OPERAND_OBJECT with a
+ *              subtype of DefField and connect it to the parent Node.
  *
  ******************************************************************************/
 
diff --git a/src/acpica/source/components/executer/exresolv.c b/src/acpica/source/components/executer/exresolv.c
index 8d3893b..4b9e9b3 100644
--- a/src/acpica/source/components/executer/exresolv.c
+++ b/src/acpica/source/components/executer/exresolv.c
@@ -237,7 +237,7 @@  AcpiExResolveObjectToValue (
 
     StackDesc = *StackPtr;
 
-    /* This is an ACPI_OPERAND_OBJECT  */
+    /* This is an object of type ACPI_OPERAND_OBJECT */
 
     switch (StackDesc->Common.Type)
     {
diff --git a/src/acpica/source/components/executer/exstore.c b/src/acpica/source/components/executer/exstore.c
index 8bea79b..36fccf8 100644
--- a/src/acpica/source/components/executer/exstore.c
+++ b/src/acpica/source/components/executer/exstore.c
@@ -140,15 +140,15 @@  AcpiExStoreObjectToIndex (
  * FUNCTION:    AcpiExStore
  *
  * PARAMETERS:  *SourceDesc         - Value to be stored
- *              *DestDesc           - Where to store it.  Must be an NS node
- *                                    or an ACPI_OPERAND_OBJECT of type
+ *              *DestDesc           - Where to store it. Must be an NS node
+ *                                    or ACPI_OPERAND_OBJECT of type
  *                                    Reference;
  *              WalkState           - Current walk state
  *
  * RETURN:      Status
  *
  * DESCRIPTION: Store the value described by SourceDesc into the location
- *              described by DestDesc.  Called by various interpreter
+ *              described by DestDesc. Called by various interpreter
  *              functions to store the result of an operation into
  *              the destination operand -- not just simply the actual "Store"
  *              ASL operator.
diff --git a/src/acpica/source/components/executer/exutils.c b/src/acpica/source/components/executer/exutils.c
index 3ebcbe5..28a18ad 100644
--- a/src/acpica/source/components/executer/exutils.c
+++ b/src/acpica/source/components/executer/exutils.c
@@ -193,7 +193,7 @@  AcpiExEnterInterpreter (
  *
  * DESCRIPTION: Reacquire the interpreter execution region from within the
  *              interpreter code. Failure to enter the interpreter region is a
- *              fatal system error. Used in  conjuction with
+ *              fatal system error. Used in conjunction with
  *              RelinquishInterpreter
  *
  ******************************************************************************/
diff --git a/src/acpica/source/components/hardware/hwsleep.c b/src/acpica/source/components/hardware/hwsleep.c
index 6fd9d66..a2e4c43 100644
--- a/src/acpica/source/components/hardware/hwsleep.c
+++ b/src/acpica/source/components/hardware/hwsleep.c
@@ -171,20 +171,6 @@  AcpiHwLegacySleep (
         return_ACPI_STATUS (Status);
     }
 
-    if (SleepState != ACPI_STATE_S5)
-    {
-        /*
-         * Disable BM arbitration. This feature is contained within an
-         * optional register (PM2 Control), so ignore a BAD_ADDRESS
-         * exception.
-         */
-        Status = AcpiWriteBitRegister (ACPI_BITREG_ARB_DISABLE, 1);
-        if (ACPI_FAILURE (Status) && (Status != AE_BAD_ADDRESS))
-        {
-            return_ACPI_STATUS (Status);
-        }
-    }
-
     /*
      * 1) Disable/Clear all GPEs
      * 2) Enable all wakeup GPEs
@@ -452,17 +438,6 @@  AcpiHwLegacyWake (
             AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].StatusRegisterId,
             ACPI_CLEAR_STATUS);
 
-    /*
-     * Enable BM arbitration. This feature is contained within an
-     * optional register (PM2 Control), so ignore a BAD_ADDRESS
-     * exception.
-     */
-    Status = AcpiWriteBitRegister (ACPI_BITREG_ARB_DISABLE, 0);
-    if (ACPI_FAILURE (Status) && (Status != AE_BAD_ADDRESS))
-    {
-        return_ACPI_STATUS (Status);
-    }
-
     AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING);
     return_ACPI_STATUS (Status);
 }
diff --git a/src/acpica/source/components/hardware/hwxfsleep.c b/src/acpica/source/components/hardware/hwxfsleep.c
index 631b81e..dfb7112 100644
--- a/src/acpica/source/components/hardware/hwxfsleep.c
+++ b/src/acpica/source/components/hardware/hwxfsleep.c
@@ -173,6 +173,14 @@  AcpiSetFirmwareWakingVector (
     ACPI_FUNCTION_TRACE (AcpiSetFirmwareWakingVector);
 
 
+    /*
+     * According to the ACPI specification 2.0c and later, the 64-bit
+     * waking vector should be cleared and the 32-bit waking vector should
+     * be used, unless we want the wake-up code to be called by the BIOS in
+     * Protected Mode. Some systems (for example HP dv5-1004nr) are known
+     * to fail to resume if the 64-bit vector is used.
+     */
+
     /* Set the 32-bit vector */
 
     AcpiGbl_FACS->FirmwareWakingVector = PhysicalAddress;
diff --git a/src/acpica/source/components/namespace/nspredef.c b/src/acpica/source/components/namespace/nspredef.c
index e6c7cf6..8bc2591 100644
--- a/src/acpica/source/components/namespace/nspredef.c
+++ b/src/acpica/source/components/namespace/nspredef.c
@@ -753,7 +753,7 @@  AcpiNsCheckPackage (
         {
             /* Create the new outer package and populate it */
 
-            Status = AcpiNsWrapWithPackage (Data, *Elements, ReturnObjectPtr);
+            Status = AcpiNsWrapWithPackage (Data, ReturnObject, ReturnObjectPtr);
             if (ACPI_FAILURE (Status))
             {
                 return (Status);
diff --git a/src/acpica/source/components/parser/psxface.c b/src/acpica/source/components/parser/psxface.c
index 11c5fc2..5da1b6a 100644
--- a/src/acpica/source/components/parser/psxface.c
+++ b/src/acpica/source/components/parser/psxface.c
@@ -420,8 +420,8 @@  AcpiPsExecuteMethod (
     }
 
     /*
-     * Start method evaluation with an implicit return of zero. This is done
-     * for Windows compatibility.
+     * Start method evaluation with an implicit return of zero.
+     * This is done for Windows compatibility.
      */
     if (AcpiGbl_EnableInterpreterSlack)
     {
diff --git a/src/acpica/source/components/resources/rscreate.c b/src/acpica/source/components/resources/rscreate.c
index d75ceb6..6aaf4bb 100644
--- a/src/acpica/source/components/resources/rscreate.c
+++ b/src/acpica/source/components/resources/rscreate.c
@@ -281,8 +281,8 @@  AcpiRsCreateResourceList (
  *
  * FUNCTION:    AcpiRsCreatePciRoutingTable
  *
- * PARAMETERS:  PackageObject           - Pointer to an ACPI_OPERAND_OBJECT
- *                                        package
+ * PARAMETERS:  PackageObject           - Pointer to a package containing one
+ *                                        of more ACPI_OPERAND_OBJECTs
  *              OutputBuffer            - Pointer to the user's buffer
  *
  * RETURN:      Status  AE_OK if okay, else a valid ACPI_STATUS code.
@@ -290,7 +290,7 @@  AcpiRsCreateResourceList (
  *              AE_BUFFER_OVERFLOW and OutputBuffer->Length will point
  *              to the size buffer needed.
  *
- * DESCRIPTION: Takes the ACPI_OPERAND_OBJECT  package and creates a
+ * DESCRIPTION: Takes the ACPI_OPERAND_OBJECT package and creates a
  *              linked list of PCI interrupt descriptions
  *
  * NOTE: It is the caller's responsibility to ensure that the start of the
diff --git a/src/acpica/source/components/resources/rsutils.c b/src/acpica/source/components/resources/rsutils.c
index ce3143c..a45b3d6 100644
--- a/src/acpica/source/components/resources/rsutils.c
+++ b/src/acpica/source/components/resources/rsutils.c
@@ -253,7 +253,7 @@  AcpiRsMoveData (
 
         /*
          * 16-, 32-, and 64-bit cases must use the move macros that perform
-         * endian conversion and/or accomodate hardware that cannot perform
+         * endian conversion and/or accommodate hardware that cannot perform
          * misaligned memory transfers
          */
         case ACPI_RSC_MOVE16:
diff --git a/src/acpica/source/components/tables/tbfadt.c b/src/acpica/source/components/tables/tbfadt.c
index fa43dbb..2c51511 100644
--- a/src/acpica/source/components/tables/tbfadt.c
+++ b/src/acpica/source/components/tables/tbfadt.c
@@ -124,12 +124,13 @@ 
 
 /* Local prototypes */
 
-static ACPI_INLINE void
+static void
 AcpiTbInitGenericAddress (
     ACPI_GENERIC_ADDRESS    *GenericAddress,
     UINT8                   SpaceId,
     UINT8                   ByteWidth,
-    UINT64                  Address);
+    UINT64                  Address,
+    char                    *RegisterName);
 
 static void
 AcpiTbConvertFadt (
@@ -263,7 +264,7 @@  static ACPI_FADT_PM_INFO    FadtPmInfoTable[] =
  *
  * PARAMETERS:  GenericAddress      - GAS struct to be initialized
  *              SpaceId             - ACPI Space ID for this register
- *              ByteWidth           - Width of this register, in bytes
+ *              ByteWidth           - Width of this register
  *              Address             - Address of the register
  *
  * RETURN:      None
@@ -274,13 +275,30 @@  static ACPI_FADT_PM_INFO    FadtPmInfoTable[] =
  *
  ******************************************************************************/
 
-static ACPI_INLINE void
+static void
 AcpiTbInitGenericAddress (
     ACPI_GENERIC_ADDRESS    *GenericAddress,
     UINT8                   SpaceId,
     UINT8                   ByteWidth,
-    UINT64                  Address)
+    UINT64                  Address,
+    char                    *RegisterName)
 {
+    UINT8                   BitWidth;
+
+
+    /* Bit width field in the GAS is only one byte long, 255 max */
+
+    BitWidth = (UINT8) (ByteWidth * 8);
+
+    if (ByteWidth > 31) /* (31*8)=248 */
+    {
+        ACPI_ERROR ((AE_INFO,
+            "%s - 32-bit FADT register is too long (%u bytes, %u bits) "
+            "to convert to GAS struct - 255 bits max, truncating",
+            RegisterName, ByteWidth, (ByteWidth * 8)));
+
+        BitWidth = 255;
+    }
 
     /*
      * The 64-bit Address field is non-aligned in the byte packed
@@ -291,7 +309,7 @@  AcpiTbInitGenericAddress (
     /* All other fields are byte-wide */
 
     GenericAddress->SpaceId = SpaceId;
-    GenericAddress->BitWidth = (UINT8) ACPI_MUL_8 (ByteWidth);
+    GenericAddress->BitWidth = BitWidth;
     GenericAddress->BitOffset = 0;
     GenericAddress->AccessWidth = 0; /* Access width ANY */
 }
@@ -392,7 +410,7 @@  AcpiTbCreateLocalFadt (
      */
     if (Length > sizeof (ACPI_TABLE_FADT))
     {
-        ACPI_WARNING ((AE_INFO,
+        ACPI_BIOS_WARNING ((AE_INFO,
             "FADT (revision %u) is longer than ACPI 5.0 version, "
             "truncating length %u to %u",
             Table->Revision, Length, (UINT32) sizeof (ACPI_TABLE_FADT)));
@@ -540,8 +558,9 @@  AcpiTbConvertFadt (
         if (Address64->Address && Address32 &&
            (Address64->Address != (UINT64) Address32))
         {
-            ACPI_ERROR ((AE_INFO,
-                "32/64X address mismatch in %s: 0x%8.8X/0x%8.8X%8.8X, using 32",
+            ACPI_BIOS_ERROR ((AE_INFO,
+                "32/64X address mismatch in FADT/%s: "
+                "0x%8.8X/0x%8.8X%8.8X, using 32",
                 FadtInfoTable[i].Name, Address32,
                 ACPI_FORMAT_UINT64 (Address64->Address)));
         }
@@ -556,7 +575,7 @@  AcpiTbConvertFadt (
              */
             AcpiTbInitGenericAddress (Address64, ACPI_ADR_SPACE_SYSTEM_IO,
                 *ACPI_ADD_PTR (UINT8, &AcpiGbl_FADT, FadtInfoTable[i].Length),
-                (UINT64) Address32);
+                (UINT64) Address32, FadtInfoTable[i].Name);
         }
     }
 }
@@ -600,7 +619,7 @@  AcpiTbValidateFadt (
     if (AcpiGbl_FADT.Facs &&
         (AcpiGbl_FADT.XFacs != (UINT64) AcpiGbl_FADT.Facs))
     {
-        ACPI_WARNING ((AE_INFO,
+        ACPI_BIOS_WARNING ((AE_INFO,
             "32/64X FACS address mismatch in FADT - "
             "0x%8.8X/0x%8.8X%8.8X, using 32",
             AcpiGbl_FADT.Facs, ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XFacs)));
@@ -611,7 +630,7 @@  AcpiTbValidateFadt (
     if (AcpiGbl_FADT.Dsdt &&
         (AcpiGbl_FADT.XDsdt != (UINT64) AcpiGbl_FADT.Dsdt))
     {
-        ACPI_WARNING ((AE_INFO,
+        ACPI_BIOS_WARNING ((AE_INFO,
             "32/64X DSDT address mismatch in FADT - "
             "0x%8.8X/0x%8.8X%8.8X, using 32",
             AcpiGbl_FADT.Dsdt, ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XDsdt)));
@@ -647,8 +666,8 @@  AcpiTbValidateFadt (
         if (Address64->Address &&
            (Address64->BitWidth != ACPI_MUL_8 (Length)))
         {
-            ACPI_WARNING ((AE_INFO,
-                "32/64X length mismatch in %s: %u/%u",
+            ACPI_BIOS_WARNING ((AE_INFO,
+                "32/64X length mismatch in FADT/%s: %u/%u",
                 Name, ACPI_MUL_8 (Length), Address64->BitWidth));
         }
 
@@ -660,9 +679,9 @@  AcpiTbValidateFadt (
              */
             if (!Address64->Address || !Length)
             {
-                ACPI_ERROR ((AE_INFO,
-                    "Required field %s has zero address and/or length:"
-                    " 0x%8.8X%8.8X/0x%X",
+                ACPI_BIOS_ERROR ((AE_INFO,
+                    "Required FADT field %s has zero address and/or length: "
+                    "0x%8.8X%8.8X/0x%X",
                     Name, ACPI_FORMAT_UINT64 (Address64->Address), Length));
             }
         }
@@ -676,8 +695,8 @@  AcpiTbValidateFadt (
             if ((Address64->Address && !Length) ||
                 (!Address64->Address && Length))
             {
-                ACPI_WARNING ((AE_INFO,
-                    "Optional field %s has zero address or length: "
+                ACPI_BIOS_WARNING ((AE_INFO,
+                    "Optional FADT field %s has zero address or length: "
                     "0x%8.8X%8.8X/0x%X",
                     Name, ACPI_FORMAT_UINT64 (Address64->Address), Length));
             }
@@ -728,8 +747,8 @@  AcpiTbSetupFadtRegisters (
                 (FadtInfoTable[i].DefaultLength > 0) &&
                 (FadtInfoTable[i].DefaultLength != Target64->BitWidth))
             {
-                ACPI_WARNING ((AE_INFO,
-                    "Invalid length for %s: %u, using default %u",
+                ACPI_BIOS_WARNING ((AE_INFO,
+                    "Invalid length for FADT/%s: %u, using default %u",
                     FadtInfoTable[i].Name, Target64->BitWidth,
                     FadtInfoTable[i].DefaultLength));
 
@@ -772,7 +791,8 @@  AcpiTbSetupFadtRegisters (
             AcpiTbInitGenericAddress (FadtPmInfoTable[i].Target,
                 Source64->SpaceId, Pm1RegisterByteWidth,
                 Source64->Address +
-                    (FadtPmInfoTable[i].RegisterNum * Pm1RegisterByteWidth));
+                    (FadtPmInfoTable[i].RegisterNum * Pm1RegisterByteWidth),
+                "PmRegisters");
         }
     }
 }
diff --git a/src/acpica/source/components/tables/tbinstal.c b/src/acpica/source/components/tables/tbinstal.c
index 00fd2a2..5e112dc 100644
--- a/src/acpica/source/components/tables/tbinstal.c
+++ b/src/acpica/source/components/tables/tbinstal.c
@@ -229,8 +229,9 @@  AcpiTbAddTable (
        (!ACPI_COMPARE_NAME (TableDesc->Pointer->Signature, ACPI_SIG_SSDT)) &&
        (ACPI_STRNCMP (TableDesc->Pointer->Signature, "OEM", 3)))
     {
-        ACPI_ERROR ((AE_INFO,
-            "Table has invalid signature [%4.4s] (0x%8.8X), must be SSDT or OEMx",
+        ACPI_BIOS_ERROR ((AE_INFO,
+            "Table has invalid signature [%4.4s] (0x%8.8X), "
+            "must be SSDT or OEMx",
             AcpiUtValidAcpiName (*(UINT32 *) TableDesc->Pointer->Signature) ?
                 TableDesc->Pointer->Signature : "????",
             *(UINT32 *) TableDesc->Pointer->Signature));
diff --git a/src/acpica/source/components/tables/tbutils.c b/src/acpica/source/components/tables/tbutils.c
index 4ad777c..4f0b75d 100644
--- a/src/acpica/source/components/tables/tbutils.c
+++ b/src/acpica/source/components/tables/tbutils.c
@@ -359,8 +359,9 @@  AcpiTbVerifyChecksum (
 
     if (Checksum)
     {
-        ACPI_WARNING ((AE_INFO,
-            "Incorrect checksum in table [%4.4s] - 0x%2.2X, should be 0x%2.2X",
+        ACPI_BIOS_WARNING ((AE_INFO,
+            "Incorrect checksum in table [%4.4s] - 0x%2.2X, "
+            "should be 0x%2.2X",
             Table->Signature, Table->Checksum,
             (UINT8) (Table->Checksum - Checksum)));
 
@@ -428,8 +429,9 @@  AcpiTbCheckDsdtHeader (
     if (AcpiGbl_OriginalDsdtHeader.Length != AcpiGbl_DSDT->Length ||
         AcpiGbl_OriginalDsdtHeader.Checksum != AcpiGbl_DSDT->Checksum)
     {
-        ACPI_ERROR ((AE_INFO,
-            "The DSDT has been corrupted or replaced - old, new headers below"));
+        ACPI_BIOS_ERROR ((AE_INFO,
+            "The DSDT has been corrupted or replaced - "
+            "old, new headers below"));
         AcpiTbPrintTableHeader (0, &AcpiGbl_OriginalDsdtHeader);
         AcpiTbPrintTableHeader (0, AcpiGbl_DSDT);
 
@@ -537,7 +539,7 @@  AcpiTbInstallTable (
     if (Signature &&
         !ACPI_COMPARE_NAME (Table->Signature, Signature))
     {
-        ACPI_ERROR ((AE_INFO,
+        ACPI_BIOS_ERROR ((AE_INFO,
             "Invalid signature 0x%X for ACPI table, expected [%s]",
             *ACPI_CAST_PTR (UINT32, Table->Signature), Signature));
         goto UnmapAndExit;
@@ -656,7 +658,7 @@  AcpiTbGetRootTableEntry (
         {
             /* Will truncate 64-bit address to 32 bits, issue warning */
 
-            ACPI_WARNING ((AE_INFO,
+            ACPI_BIOS_WARNING ((AE_INFO,
                 "64-bit Physical Address in XSDT is too large (0x%8.8X%8.8X),"
                 " truncating",
                 ACPI_FORMAT_UINT64 (Address64)));
@@ -758,7 +760,8 @@  AcpiTbParseRootTable (
 
     if (Length < sizeof (ACPI_TABLE_HEADER))
     {
-        ACPI_ERROR ((AE_INFO, "Invalid length 0x%X in RSDT/XSDT", Length));
+        ACPI_BIOS_ERROR ((AE_INFO,
+            "Invalid table length 0x%X in RSDT/XSDT", Length));
         return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH);
     }
 
diff --git a/src/acpica/source/components/tables/tbxface.c b/src/acpica/source/components/tables/tbxface.c
index 860dc2e..b91cce1 100644
--- a/src/acpica/source/components/tables/tbxface.c
+++ b/src/acpica/source/components/tables/tbxface.c
@@ -1,7 +1,6 @@ 
 /******************************************************************************
  *
- * Module Name: tbxface - Public interfaces to the ACPI subsystem
- *                         ACPI table oriented interfaces
+ * Module Name: tbxface - ACPI table oriented external interfaces
  *
  *****************************************************************************/
 
@@ -118,18 +117,11 @@ 
 
 #include "acpi.h"
 #include "accommon.h"
-#include "acnamesp.h"
 #include "actables.h"
 
 #define _COMPONENT          ACPI_TABLES
         ACPI_MODULE_NAME    ("tbxface")
 
-/* Local prototypes */
-
-static ACPI_STATUS
-AcpiTbLoadNamespace (
-    void);
-
 
 /*******************************************************************************
  *
@@ -530,155 +522,6 @@  ACPI_EXPORT_SYMBOL (AcpiGetTableByIndex)
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiTbLoadNamespace
- *
- * PARAMETERS:  None
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Load the namespace from the DSDT and all SSDTs/PSDTs found in
- *              the RSDT/XSDT.
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-AcpiTbLoadNamespace (
-    void)
-{
-    ACPI_STATUS             Status;
-    UINT32                  i;
-    ACPI_TABLE_HEADER       *NewDsdt;
-
-
-    ACPI_FUNCTION_TRACE (TbLoadNamespace);
-
-
-    (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
-
-    /*
-     * Load the namespace. The DSDT is required, but any SSDT and
-     * PSDT tables are optional. Verify the DSDT.
-     */
-    if (!AcpiGbl_RootTableList.CurrentTableCount ||
-        !ACPI_COMPARE_NAME (
-            &(AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Signature),
-            ACPI_SIG_DSDT) ||
-         ACPI_FAILURE (AcpiTbVerifyTable (
-            &AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT])))
-    {
-        Status = AE_NO_ACPI_TABLES;
-        goto UnlockAndExit;
-    }
-
-    /*
-     * Save the DSDT pointer for simple access. This is the mapped memory
-     * address. We must take care here because the address of the .Tables
-     * array can change dynamically as tables are loaded at run-time. Note:
-     * .Pointer field is not validated until after call to AcpiTbVerifyTable.
-     */
-    AcpiGbl_DSDT = AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer;
-
-    /*
-     * Optionally copy the entire DSDT to local memory (instead of simply
-     * mapping it.) There are some BIOSs that corrupt or replace the original
-     * DSDT, creating the need for this option. Default is FALSE, do not copy
-     * the DSDT.
-     */
-    if (AcpiGbl_CopyDsdtLocally)
-    {
-        NewDsdt = AcpiTbCopyDsdt (ACPI_TABLE_INDEX_DSDT);
-        if (NewDsdt)
-        {
-            AcpiGbl_DSDT = NewDsdt;
-        }
-    }
-
-    /*
-     * Save the original DSDT header for detection of table corruption
-     * and/or replacement of the DSDT from outside the OS.
-     */
-    ACPI_MEMCPY (&AcpiGbl_OriginalDsdtHeader, AcpiGbl_DSDT,
-        sizeof (ACPI_TABLE_HEADER));
-
-    (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
-
-    /* Load and parse tables */
-
-    Status = AcpiNsLoadTable (ACPI_TABLE_INDEX_DSDT, AcpiGbl_RootNode);
-    if (ACPI_FAILURE (Status))
-    {
-        return_ACPI_STATUS (Status);
-    }
-
-    /* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */
-
-    (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
-    for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)
-    {
-        if ((!ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),
-                    ACPI_SIG_SSDT) &&
-             !ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),
-                    ACPI_SIG_PSDT)) ||
-             ACPI_FAILURE (AcpiTbVerifyTable (
-                &AcpiGbl_RootTableList.Tables[i])))
-        {
-            continue;
-        }
-
-        /* Ignore errors while loading tables, get as many as possible */
-
-        (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
-        (void) AcpiNsLoadTable (i, AcpiGbl_RootNode);
-        (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
-    }
-
-    ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "ACPI Tables successfully acquired\n"));
-
-UnlockAndExit:
-    (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
-    return_ACPI_STATUS (Status);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    AcpiLoadTables
- *
- * PARAMETERS:  None
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Load the ACPI tables from the RSDT/XSDT
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiLoadTables (
-    void)
-{
-    ACPI_STATUS             Status;
-
-
-    ACPI_FUNCTION_TRACE (AcpiLoadTables);
-
-
-    /* Load the namespace from the tables */
-
-    Status = AcpiTbLoadNamespace ();
-    if (ACPI_FAILURE (Status))
-    {
-        ACPI_EXCEPTION ((AE_INFO, Status,
-            "While loading namespace from ACPI tables"));
-    }
-
-    return_ACPI_STATUS (Status);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiLoadTables)
-
-
-/*******************************************************************************
- *
  * FUNCTION:    AcpiInstallTableHandler
  *
  * PARAMETERS:  Handler         - Table event handler
diff --git a/src/acpica/source/components/tables/tbxfroot.c b/src/acpica/source/components/tables/tbxfroot.c
index e85c1fd..d00db5f 100644
--- a/src/acpica/source/components/tables/tbxfroot.c
+++ b/src/acpica/source/components/tables/tbxfroot.c
@@ -306,7 +306,7 @@  AcpiFindRootPointer (
 
     /* A valid RSDP was not found */
 
-    ACPI_ERROR ((AE_INFO, "A valid RSDP was not found"));
+    ACPI_BIOS_ERROR ((AE_INFO, "A valid RSDP was not found"));
     return_ACPI_STATUS (AE_NOT_FOUND);
 }
 
diff --git a/src/acpica/source/components/utilities/utdecode.c b/src/acpica/source/components/utilities/utdecode.c
index b36aa45..a88c581 100644
--- a/src/acpica/source/components/utilities/utdecode.c
+++ b/src/acpica/source/components/utilities/utdecode.c
@@ -123,47 +123,6 @@ 
         ACPI_MODULE_NAME    ("utdecode")
 
 
-/*******************************************************************************
- *
- * FUNCTION:    AcpiFormatException
- *
- * PARAMETERS:  Status       - The ACPI_STATUS code to be formatted
- *
- * RETURN:      A string containing the exception text. A valid pointer is
- *              always returned.
- *
- * DESCRIPTION: This function translates an ACPI exception into an ASCII string
- *              It is here instead of utxface.c so it is always present.
- *
- ******************************************************************************/
-
-const char *
-AcpiFormatException (
-    ACPI_STATUS             Status)
-{
-    const char              *Exception = NULL;
-
-
-    ACPI_FUNCTION_ENTRY ();
-
-
-    Exception = AcpiUtValidateException (Status);
-    if (!Exception)
-    {
-        /* Exception code was not recognized */
-
-        ACPI_ERROR ((AE_INFO,
-            "Unknown exception code: 0x%8.8X", Status));
-
-        Exception = "UNKNOWN_STATUS_CODE";
-    }
-
-    return (ACPI_CAST_PTR (const char, Exception));
-}
-
-ACPI_EXPORT_SYMBOL (AcpiFormatException)
-
-
 /*
  * Properties of the ACPI Object Types, both internal and external.
  * The table is indexed by values of ACPI_OBJECT_TYPE
@@ -252,16 +211,17 @@  AcpiUtHexToAsciiChar (
 
 const char        *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] =
 {
-    "SystemMemory",
-    "SystemIO",
-    "PCI_Config",
-    "EmbeddedControl",
-    "SMBus",
-    "SystemCMOS",
-    "PCIBARTarget",
-    "IPMI",
-    "GeneralPurposeIo",
-    "GenericSerialBus"
+    "SystemMemory",     /* 0x00 */
+    "SystemIO",         /* 0x01 */
+    "PCI_Config",       /* 0x02 */
+    "EmbeddedControl",  /* 0x03 */
+    "SMBus",            /* 0x04 */
+    "SystemCMOS",       /* 0x05 */
+    "PCIBARTarget",     /* 0x06 */
+    "IPMI",             /* 0x07 */
+    "GeneralPurposeIo", /* 0x08 */
+    "GenericSerialBus", /* 0x09 */
+    "PCC"               /* 0x0A */
 };
 
 
diff --git a/src/acpica/source/components/utilities/utdelete.c b/src/acpica/source/components/utilities/utdelete.c
index 3130e6d..b64a585 100644
--- a/src/acpica/source/components/utilities/utdelete.c
+++ b/src/acpica/source/components/utilities/utdelete.c
@@ -239,7 +239,7 @@  AcpiUtDeleteInternalObj (
     case ACPI_TYPE_PROCESSOR:
     case ACPI_TYPE_THERMAL:
 
-        /* Walk the notify handler list for this object */
+        /* Walk the address handler list for this object */
 
         HandlerDesc = Object->CommonNotify.Handler;
         while (HandlerDesc)
@@ -595,6 +595,7 @@  AcpiUtUpdateObjectReference (
     ACPI_STATUS             Status = AE_OK;
     ACPI_GENERIC_STATE      *StateList = NULL;
     ACPI_OPERAND_OBJECT     *NextObject = NULL;
+    ACPI_OPERAND_OBJECT     *PrevObject;
     ACPI_GENERIC_STATE      *State;
     UINT32                  i;
 
@@ -624,10 +625,20 @@  AcpiUtUpdateObjectReference (
         case ACPI_TYPE_POWER:
         case ACPI_TYPE_THERMAL:
 
-            /* Update the notify objects for these types (if present) */
-
-            AcpiUtUpdateRefCount (Object->CommonNotify.SystemNotify, Action);
-            AcpiUtUpdateRefCount (Object->CommonNotify.DeviceNotify, Action);
+            /*
+             * Update the notify objects for these types (if present)
+             * Two lists, system and device notify handlers.
+             */
+            for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
+            {
+                PrevObject = Object->CommonNotify.NotifyList[i];
+                while (PrevObject)
+                {
+                    NextObject = PrevObject->Notify.Next[i];
+                    AcpiUtUpdateRefCount (PrevObject, Action);
+                    PrevObject = NextObject;
+                }
+            }
             break;
 
         case ACPI_TYPE_PACKAGE:
diff --git a/src/acpica/source/components/utilities/utglobal.c b/src/acpica/source/components/utilities/utglobal.c
index 8ebbaec..98b1e48 100644
--- a/src/acpica/source/components/utilities/utglobal.c
+++ b/src/acpica/source/components/utilities/utglobal.c
@@ -283,8 +283,9 @@  ACPI_FIXED_EVENT_INFO       AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS] =
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Init ACPICA globals.  All globals that require specific
- *              initialization should be initialized here!
+ * DESCRIPTION: Initialize ACPICA globals. All globals that require specific
+ *              initialization should be initialized here. This allows for
+ *              a warm restart.
  *
  ******************************************************************************/
 
@@ -359,8 +360,8 @@  AcpiUtInitGlobals (
 
     /* Global handlers */
 
-    AcpiGbl_SystemNotify.Handler        = NULL;
-    AcpiGbl_DeviceNotify.Handler        = NULL;
+    AcpiGbl_GlobalNotify[0].Handler     = NULL;
+    AcpiGbl_GlobalNotify[1].Handler     = NULL;
     AcpiGbl_ExceptionHandler            = NULL;
     AcpiGbl_InitHandler                 = NULL;
     AcpiGbl_TableHandler                = NULL;
diff --git a/src/acpica/source/components/utilities/utmisc.c b/src/acpica/source/components/utilities/utmisc.c
index 44dd533..7318f68 100644
--- a/src/acpica/source/components/utilities/utmisc.c
+++ b/src/acpica/source/components/utilities/utmisc.c
@@ -125,84 +125,41 @@ 
         ACPI_MODULE_NAME    ("utmisc")
 
 
+#if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP
 /*******************************************************************************
  *
- * FUNCTION:    AcpiUtValidateException
+ * FUNCTION:    UtConvertBackslashes
  *
- * PARAMETERS:  Status       - The ACPI_STATUS code to be formatted
+ * PARAMETERS:  Pathname        - File pathname string to be converted
  *
- * RETURN:      A string containing the exception text. NULL if exception is
- *              not valid.
+ * RETURN:      Modifies the input Pathname
  *
- * DESCRIPTION: This function validates and translates an ACPI exception into
- *              an ASCII string.
+ * DESCRIPTION: Convert all backslashes (0x5C) to forward slashes (0x2F) within
+ *              the entire input file pathname string.
  *
  ******************************************************************************/
 
-const char *
-AcpiUtValidateException (
-    ACPI_STATUS             Status)
+void
+UtConvertBackslashes (
+    char                    *Pathname)
 {
-    UINT32                  SubStatus;
-    const char              *Exception = NULL;
-
-
-    ACPI_FUNCTION_ENTRY ();
-
 
-    /*
-     * Status is composed of two parts, a "type" and an actual code
-     */
-    SubStatus = (Status & ~AE_CODE_MASK);
-
-    switch (Status & AE_CODE_MASK)
+    if (!Pathname)
     {
-    case AE_CODE_ENVIRONMENTAL:
-
-        if (SubStatus <= AE_CODE_ENV_MAX)
-        {
-            Exception = AcpiGbl_ExceptionNames_Env [SubStatus];
-        }
-        break;
-
-    case AE_CODE_PROGRAMMER:
-
-        if (SubStatus <= AE_CODE_PGM_MAX)
-        {
-            Exception = AcpiGbl_ExceptionNames_Pgm [SubStatus];
-        }
-        break;
-
-    case AE_CODE_ACPI_TABLES:
-
-        if (SubStatus <= AE_CODE_TBL_MAX)
-        {
-            Exception = AcpiGbl_ExceptionNames_Tbl [SubStatus];
-        }
-        break;
-
-    case AE_CODE_AML:
-
-        if (SubStatus <= AE_CODE_AML_MAX)
-        {
-            Exception = AcpiGbl_ExceptionNames_Aml [SubStatus];
-        }
-        break;
-
-    case AE_CODE_CONTROL:
+        return;
+    }
 
-        if (SubStatus <= AE_CODE_CTRL_MAX)
+    while (*Pathname)
+    {
+        if (*Pathname == '\\')
         {
-            Exception = AcpiGbl_ExceptionNames_Ctrl [SubStatus];
+            *Pathname = '/';
         }
-        break;
 
-    default:
-        break;
+        Pathname++;
     }
-
-    return (ACPI_CAST_PTR (const char, Exception));
 }
+#endif
 
 
 /*******************************************************************************
@@ -1367,5 +1324,3 @@  AcpiUtWalkPackageTree (
 
     return_ACPI_STATUS (AE_AML_INTERNAL);
 }
-
-
diff --git a/src/acpica/source/components/utilities/utobject.c b/src/acpica/source/components/utilities/utobject.c
index ade2980..4914159 100644
--- a/src/acpica/source/components/utilities/utobject.c
+++ b/src/acpica/source/components/utilities/utobject.c
@@ -438,7 +438,7 @@  AcpiUtCreateStringObject (
  *
  * RETURN:      TRUE if object is valid, FALSE otherwise
  *
- * DESCRIPTION: Validate a pointer to be an ACPI_OPERAND_OBJECT
+ * DESCRIPTION: Validate a pointer to be of type ACPI_OPERAND_OBJECT
  *
  ******************************************************************************/
 
@@ -464,7 +464,7 @@  AcpiUtValidInternalObject (
     {
     case ACPI_DESC_TYPE_OPERAND:
 
-        /* The object appears to be a valid ACPI_OPERAND_OBJECT  */
+        /* The object appears to be a valid ACPI_OPERAND_OBJECT */
 
         return (TRUE);
 
@@ -545,7 +545,7 @@  AcpiUtDeleteObjectDesc (
     ACPI_FUNCTION_TRACE_PTR (UtDeleteObjectDesc, Object);
 
 
-    /* Object must be an ACPI_OPERAND_OBJECT  */
+    /* Object must be of type ACPI_OPERAND_OBJECT */
 
     if (ACPI_GET_DESCRIPTOR_TYPE (Object) != ACPI_DESC_TYPE_OPERAND)
     {
diff --git a/src/acpica/source/components/utilities/utresrc.c b/src/acpica/source/components/utilities/utresrc.c
index 69df740..3835b47 100644
--- a/src/acpica/source/components/utilities/utresrc.c
+++ b/src/acpica/source/components/utilities/utresrc.c
@@ -1,6 +1,6 @@ 
 /*******************************************************************************
  *
- * Module Name: utresrc - Resource managment utilities
+ * Module Name: utresrc - Resource management utilities
  *
  ******************************************************************************/
 
@@ -129,7 +129,7 @@ 
 
 /*
  * Strings used to decode resource descriptors.
- * Used by both the disasssembler and the debugger resource dump routines
+ * Used by both the disassembler and the debugger resource dump routines
  */
 const char                      *AcpiGbl_BmDecode[] =
 {
diff --git a/src/acpica/source/components/utilities/uttrack.c b/src/acpica/source/components/utilities/uttrack.c
index 7f2311a..3d73fc5 100644
--- a/src/acpica/source/components/utilities/uttrack.c
+++ b/src/acpica/source/components/utilities/uttrack.c
@@ -705,21 +705,21 @@  AcpiUtDumpAllocations (
                     switch (ACPI_GET_DESCRIPTOR_TYPE (Descriptor))
                     {
                     case ACPI_DESC_TYPE_OPERAND:
-                        if (Element->Size == sizeof (ACPI_DESC_TYPE_OPERAND))
+                        if (Element->Size == sizeof (ACPI_OPERAND_OBJECT))
                         {
                             DescriptorType = ACPI_DESC_TYPE_OPERAND;
                         }
                         break;
 
                     case ACPI_DESC_TYPE_PARSER:
-                        if (Element->Size == sizeof (ACPI_DESC_TYPE_PARSER))
+                        if (Element->Size == sizeof (ACPI_PARSE_OBJECT))
                         {
                             DescriptorType = ACPI_DESC_TYPE_PARSER;
                         }
                         break;
 
                     case ACPI_DESC_TYPE_NAMED:
-                        if (Element->Size == sizeof (ACPI_DESC_TYPE_NAMED))
+                        if (Element->Size == sizeof (ACPI_NAMESPACE_NODE))
                         {
                             DescriptorType = ACPI_DESC_TYPE_NAMED;
                         }
diff --git a/src/acpica/source/components/utilities/utxferror.c b/src/acpica/source/components/utilities/utxferror.c
index 8a98a89..c0961a2 100644
--- a/src/acpica/source/components/utilities/utxferror.c
+++ b/src/acpica/source/components/utilities/utxferror.c
@@ -159,6 +159,9 @@  extern FILE                 *AcpiGbl_OutputFile;
 #define ACPI_MSG_WARNING        "ACPI Warning: "
 #define ACPI_MSG_INFO           "ACPI: "
 
+#define ACPI_MSG_BIOS_ERROR     "ACPI Firmware Error: "
+#define ACPI_MSG_BIOS_WARNING   "ACPI Firmware Warning: "
+
 /*
  * Common message suffix
  */
@@ -324,6 +327,84 @@  AcpiInfo (
 ACPI_EXPORT_SYMBOL (AcpiInfo)
 
 
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiBiosError
+ *
+ * PARAMETERS:  ModuleName          - Caller's module name (for error output)
+ *              LineNumber          - Caller's line number (for error output)
+ *              Format              - Printf format string + additional args
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Print "ACPI Firmware Error" message with module/line/version
+ *              info
+ *
+ ******************************************************************************/
+
+void ACPI_INTERNAL_VAR_XFACE
+AcpiBiosError (
+    const char              *ModuleName,
+    UINT32                  LineNumber,
+    const char              *Format,
+    ...)
+{
+    va_list                 ArgList;
+
+
+    ACPI_MSG_REDIRECT_BEGIN;
+    AcpiOsPrintf (ACPI_MSG_BIOS_ERROR);
+
+    va_start (ArgList, Format);
+    AcpiOsVprintf (Format, ArgList);
+    ACPI_MSG_SUFFIX;
+    va_end (ArgList);
+
+    ACPI_MSG_REDIRECT_END;
+}
+
+ACPI_EXPORT_SYMBOL (AcpiBiosError)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiBiosWarning
+ *
+ * PARAMETERS:  ModuleName          - Caller's module name (for error output)
+ *              LineNumber          - Caller's line number (for error output)
+ *              Format              - Printf format string + additional args
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Print "ACPI Firmware Warning" message with module/line/version
+ *              info
+ *
+ ******************************************************************************/
+
+void ACPI_INTERNAL_VAR_XFACE
+AcpiBiosWarning (
+    const char              *ModuleName,
+    UINT32                  LineNumber,
+    const char              *Format,
+    ...)
+{
+    va_list                 ArgList;
+
+
+    ACPI_MSG_REDIRECT_BEGIN;
+    AcpiOsPrintf (ACPI_MSG_BIOS_WARNING);
+
+    va_start (ArgList, Format);
+    AcpiOsVprintf (Format, ArgList);
+    ACPI_MSG_SUFFIX;
+    va_end (ArgList);
+
+    ACPI_MSG_REDIRECT_END;
+}
+
+ACPI_EXPORT_SYMBOL (AcpiBiosWarning)
+
+
 /*
  * The remainder of this module contains internal error functions that may
  * be configured out.
diff --git a/src/acpica/source/include/acdebug.h b/src/acpica/source/include/acdebug.h
index 4a9ecf0..45cfb26 100644
--- a/src/acpica/source/include/acdebug.h
+++ b/src/acpica/source/include/acdebug.h
@@ -184,8 +184,7 @@  AcpiDbDisplayTemplate (
 
 void
 AcpiDbUnloadAcpiTable (
-    char                    *TableArg,
-    char                    *InstanceArg);
+    char                    *Name);
 
 void
 AcpiDbSendNotify (
@@ -477,7 +476,7 @@  AcpiDbLocalNsLookup (
     char                    *Name);
 
 void
-AcpiDbUInt32ToHexString (
+AcpiDbUint32ToHexString (
     UINT32                  Value,
     char                    *Buffer);
 
diff --git a/src/acpica/source/include/acdisasm.h b/src/acpica/source/include/acdisasm.h
index 9e8f2e3..056e8ea 100644
--- a/src/acpica/source/include/acdisasm.h
+++ b/src/acpica/source/include/acdisasm.h
@@ -591,6 +591,14 @@  AcpiDmMethodFlags (
     ACPI_PARSE_OBJECT       *Op);
 
 void
+AcpiDmPredefinedDescription (
+    ACPI_PARSE_OBJECT       *Op);
+
+void
+AcpiDmFieldPredefinedDescription (
+    ACPI_PARSE_OBJECT       *Op);
+
+void
 AcpiDmFieldFlags (
     ACPI_PARSE_OBJECT       *Op);
 
diff --git a/src/acpica/source/include/acexcep.h b/src/acpica/source/include/acexcep.h
index 7129954..ccc6f71 100644
--- a/src/acpica/source/include/acexcep.h
+++ b/src/acpica/source/include/acexcep.h
@@ -125,6 +125,7 @@ 
 #define AE_CODE_ACPI_TABLES             0x2000
 #define AE_CODE_AML                     0x3000
 #define AE_CODE_CONTROL                 0x4000
+#define AE_CODE_MAX                     0x4000
 #define AE_CODE_MASK                    0xF000
 
 
@@ -260,7 +261,7 @@ 
 
 /* Exception strings for AcpiFormatException */
 
-#ifdef DEFINE_ACPI_GLOBALS
+#ifdef ACPI_DEFINE_EXCEPTION_TABLE
 
 /*
  * String versions of the exception codes above
@@ -379,6 +380,6 @@  char const   *AcpiGbl_ExceptionNames_Ctrl[] =
     "AE_CTRL_PARSE_PENDING"
 };
 
-#endif /* ACPI GLOBALS */
+#endif /* EXCEPTION_TABLE */
 
 #endif /* __ACEXCEP_H__ */
diff --git a/src/acpica/source/include/acglobal.h b/src/acpica/source/include/acglobal.h
index b27ee3a..b96b658 100644
--- a/src/acpica/source/include/acglobal.h
+++ b/src/acpica/source/include/acglobal.h
@@ -326,8 +326,7 @@  ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_OperandCache;
 
 /* Global handlers */
 
-ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER  AcpiGbl_DeviceNotify;
-ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER  AcpiGbl_SystemNotify;
+ACPI_EXTERN ACPI_GLOBAL_NOTIFY_HANDLER  AcpiGbl_GlobalNotify[2];
 ACPI_EXTERN ACPI_EXCEPTION_HANDLER      AcpiGbl_ExceptionHandler;
 ACPI_EXTERN ACPI_INIT_HANDLER           AcpiGbl_InitHandler;
 ACPI_EXTERN ACPI_TABLE_HANDLER          AcpiGbl_TableHandler;
@@ -360,17 +359,8 @@  ACPI_EXTERN UINT8                       AcpiGbl_OsiData;
 ACPI_EXTERN ACPI_INTERFACE_INFO        *AcpiGbl_SupportedInterfaces;
 ACPI_EXTERN ACPI_ADDRESS_RANGE         *AcpiGbl_AddressRangeList[ACPI_ADDRESS_RANGE_MAX];
 
-
 #ifndef DEFINE_ACPI_GLOBALS
 
-/* Exception codes */
-
-extern char const                       *AcpiGbl_ExceptionNames_Env[];
-extern char const                       *AcpiGbl_ExceptionNames_Pgm[];
-extern char const                       *AcpiGbl_ExceptionNames_Tbl[];
-extern char const                       *AcpiGbl_ExceptionNames_Aml[];
-extern char const                       *AcpiGbl_ExceptionNames_Ctrl[];
-
 /* Other miscellaneous */
 
 extern BOOLEAN                          AcpiGbl_Shutdown;
@@ -552,4 +542,14 @@  ACPI_EXTERN UINT32                      AcpiGbl_SizeOfAcpiObjects;
 
 #endif /* ACPI_DEBUGGER */
 
+
+/*****************************************************************************
+ *
+ * Info/help support
+ *
+ ****************************************************************************/
+
+extern const AH_PREDEFINED_NAME     AslPredefinedInfo[];
+
+
 #endif /* __ACGLOBAL_H__ */
diff --git a/src/acpica/source/include/aclocal.h b/src/acpica/source/include/aclocal.h
index f9065af..00d933e 100644
--- a/src/acpica/source/include/aclocal.h
+++ b/src/acpica/source/include/aclocal.h
@@ -534,6 +534,15 @@  typedef struct acpi_gpe_handler_info
 
 } ACPI_GPE_HANDLER_INFO;
 
+/* Notify info for implicit notify, multiple device objects */
+
+typedef struct acpi_gpe_notify_info
+{
+    ACPI_NAMESPACE_NODE             *DeviceNode;    /* Device to be notified */
+    struct acpi_gpe_notify_info     *Next;
+
+} ACPI_GPE_NOTIFY_INFO;
+
 /*
  * GPE dispatch info. At any time, the GPE can have at most one type
  * of dispatch - Method, Handler, or Implicit Notify.
@@ -541,8 +550,8 @@  typedef struct acpi_gpe_handler_info
 typedef union acpi_gpe_dispatch_info
 {
     ACPI_NAMESPACE_NODE             *MethodNode;    /* Method node for this GPE level */
-    struct acpi_gpe_handler_info    *Handler;       /* Installed GPE handler */
-    ACPI_NAMESPACE_NODE             *DeviceNode;    /* Parent _PRW device for implicit notify */
+    ACPI_GPE_HANDLER_INFO           *Handler;       /* Installed GPE handler */
+    ACPI_GPE_NOTIFY_INFO            *NotifyList;    /* List of _PRW devices for implicit notifies */
 
 } ACPI_GPE_DISPATCH_INFO;
 
@@ -552,7 +561,7 @@  typedef union acpi_gpe_dispatch_info
  */
 typedef struct acpi_gpe_event_info
 {
-    union acpi_gpe_dispatch_info    Dispatch;       /* Either Method or Handler */
+    union acpi_gpe_dispatch_info    Dispatch;       /* Either Method, Handler, or NotifyList */
     struct acpi_gpe_register_info   *RegisterInfo;  /* Backpointer to register info */
     UINT8                           Flags;          /* Misc info about this GPE */
     UINT8                           GpeNumber;      /* This GPE */
@@ -788,6 +797,15 @@  ACPI_STATUS (*ACPI_PARSE_UPWARDS) (
     struct acpi_walk_state          *WalkState);
 
 
+/* Global handlers for AML Notifies */
+
+typedef struct acpi_global_notify_handler
+{
+    ACPI_NOTIFY_HANDLER             Handler;
+    void                            *Context;
+
+} ACPI_GLOBAL_NOTIFY_HANDLER;
+
 /*
  * Notify info - used to pass info to the deferred notify
  * handler/dispatcher.
@@ -795,8 +813,10 @@  ACPI_STATUS (*ACPI_PARSE_UPWARDS) (
 typedef struct acpi_notify_info
 {
     ACPI_STATE_COMMON
+    UINT8                           HandlerListId;
     ACPI_NAMESPACE_NODE             *Node;
-    union acpi_operand_object       *HandlerObj;
+    union acpi_operand_object       *HandlerListHead;
+    ACPI_GLOBAL_NOTIFY_HANDLER      *Global;
 
 } ACPI_NOTIFY_INFO;
 
@@ -1021,6 +1041,7 @@  typedef struct acpi_parse_state
 #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_SPECIAL            0x10
 
 
@@ -1372,4 +1393,20 @@  typedef struct acpi_debug_mem_block
 #define ACPI_NUM_MEM_LISTS              2
 
 
+/*****************************************************************************
+ *
+ * Info/help support
+ *
+ ****************************************************************************/
+
+typedef struct ah_predefined_name
+{
+    char            *Name;
+    char            *Description;
+#ifndef ACPI_ASL_COMPILER
+    char            *Action;
+#endif
+
+} AH_PREDEFINED_NAME;
+
 #endif /* __ACLOCAL_H__ */
diff --git a/src/acpica/source/include/acmacros.h b/src/acpica/source/include/acmacros.h
index 5451d84..3cf0ac0 100644
--- a/src/acpica/source/include/acmacros.h
+++ b/src/acpica/source/include/acmacros.h
@@ -346,8 +346,8 @@ 
 #define ACPI_INSERT_BITS(Target, Mask, Source)          Target = ((Target & (~(Mask))) | (Source & Mask))
 
 /*
- * An ACPI_NAMESPACE_NODE can appear in some contexts
- * where a pointer to an ACPI_OPERAND_OBJECT can also
+ * An object of type ACPI_NAMESPACE_NODE can appear in some contexts
+ * where a pointer to an object of type ACPI_OPERAND_OBJECT can also
  * appear. This macro is used to distinguish them.
  *
  * The "Descriptor" field is the first field in both structures.
diff --git a/src/acpica/source/include/acobject.h b/src/acpica/source/include/acobject.h
index 009232a..9014d4f 100644
--- a/src/acpica/source/include/acobject.h
+++ b/src/acpica/source/include/acobject.h
@@ -166,7 +166,7 @@ 
 
 #define AOPOBJ_AML_CONSTANT         0x01    /* Integer is an AML constant */
 #define AOPOBJ_STATIC_POINTER       0x02    /* Data is part of an ACPI table, don't delete */
-#define AOPOBJ_DATA_VALID           0x04    /* Object is intialized and data is valid */
+#define AOPOBJ_DATA_VALID           0x04    /* Object is initialized and data is valid */
 #define AOPOBJ_OBJECT_INITIALIZED   0x08    /* Region is initialized, _REG was run */
 #define AOPOBJ_SETUP_COMPLETE       0x10    /* Region setup is complete */
 #define AOPOBJ_INVALID              0x20    /* Host OS won't allow a Region address */
@@ -195,8 +195,8 @@  typedef struct acpi_object_integer
 
 
 /*
- * Note: The String and Buffer object must be identical through the Pointer
- * and length elements.  There is code that depends on this.
+ * Note: The String and Buffer object must be identical through the
+ * pointer and length elements. There is code that depends on this.
  *
  * Fields common to both Strings and Buffers
  */
@@ -318,8 +318,7 @@  typedef struct acpi_object_method
  * Common fields for objects that support ASL notifications
  */
 #define ACPI_COMMON_NOTIFY_INFO \
-    union acpi_operand_object       *SystemNotify;      /* Handler for system notifies */\
-    union acpi_operand_object       *DeviceNotify;      /* Handler for driver notifies */\
+    union acpi_operand_object       *NotifyList[2];     /* Handlers for system/device notifies */\
     union acpi_operand_object       *Handler;           /* Handler for Address space */
 
 
@@ -461,8 +460,10 @@  typedef struct acpi_object_notify_handler
 {
     ACPI_OBJECT_COMMON_HEADER
     ACPI_NAMESPACE_NODE             *Node;              /* Parent device */
-    ACPI_NOTIFY_HANDLER             Handler;
+    UINT32                          HandlerType;        /* Type: Device/System/Both */
+    ACPI_NOTIFY_HANDLER             Handler;            /* Handler address */
     void                            *Context;
+    union acpi_operand_object       *Next[2];           /* Device and System handler lists */
 
 } ACPI_OBJECT_NOTIFY_HANDLER;
 
@@ -476,7 +477,7 @@  typedef struct acpi_object_addr_handler
     ACPI_NAMESPACE_NODE             *Node;              /* Parent device */
     void                            *Context;
     ACPI_ADR_SPACE_SETUP            Setup;
-    union acpi_operand_object       *RegionList;        /* regions using this handler */
+    union acpi_operand_object       *RegionList;        /* Regions using this handler */
     union acpi_operand_object       *Next;
 
 } ACPI_OBJECT_ADDR_HANDLER;
diff --git a/src/acpica/source/include/acoutput.h b/src/acpica/source/include/acoutput.h
index 12f7851..cbdbd8f 100644
--- a/src/acpica/source/include/acoutput.h
+++ b/src/acpica/source/include/acoutput.h
@@ -289,6 +289,8 @@ 
 #define ACPI_WARNING(plist)             AcpiWarning plist
 #define ACPI_EXCEPTION(plist)           AcpiException plist
 #define ACPI_ERROR(plist)               AcpiError plist
+#define ACPI_BIOS_WARNING(plist)        AcpiBiosWarning plist
+#define ACPI_BIOS_ERROR(plist)          AcpiBiosError plist
 #define ACPI_DEBUG_OBJECT(obj,l,i)      AcpiExDoDebugObject(obj,l,i)
 
 #else
@@ -299,6 +301,8 @@ 
 #define ACPI_WARNING(plist)
 #define ACPI_EXCEPTION(plist)
 #define ACPI_ERROR(plist)
+#define ACPI_BIOS_WARNING(plist)
+#define ACPI_BIOS_ERROR(plist)
 #define ACPI_DEBUG_OBJECT(obj,l,i)
 
 #endif /* ACPI_NO_ERROR_MESSAGES */
diff --git a/src/acpica/source/include/acpiosxf.h b/src/acpica/source/include/acpiosxf.h
index d6d205f..48d8aa4 100644
--- a/src/acpica/source/include/acpiosxf.h
+++ b/src/acpica/source/include/acpiosxf.h
@@ -348,7 +348,7 @@  AcpiOsExecute (
 
 void
 AcpiOsWaitEventsComplete (
-    void                    *Context);
+    void);
 
 void
 AcpiOsSleep (
diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
index 2d4a5f8..036d817 100644
--- a/src/acpica/source/include/acpixf.h
+++ b/src/acpica/source/include/acpixf.h
@@ -120,7 +120,7 @@ 
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20120320
+#define ACPI_CA_VERSION                 0x20120711
 
 #include "acconfig.h"
 #include "actypes.h"
@@ -273,6 +273,22 @@  AcpiFree (
 
 
 /*
+ * ACPI table load/unload interfaces
+ */
+ACPI_STATUS
+AcpiLoadTable (
+    ACPI_TABLE_HEADER       *Table);
+
+ACPI_STATUS
+AcpiUnloadParentTable (
+    ACPI_HANDLE             Object);
+
+ACPI_STATUS
+AcpiLoadTables (
+    void);
+
+
+/*
  * ACPI table manipulation interfaces
  */
 ACPI_STATUS
@@ -284,10 +300,6 @@  AcpiFindRootPointer (
     ACPI_SIZE               *RsdpAddress);
 
 ACPI_STATUS
-AcpiLoadTables (
-    void);
-
-ACPI_STATUS
 AcpiGetTableHeader (
     ACPI_STRING             Signature,
     UINT32                  Instance,
@@ -829,6 +841,20 @@  AcpiInfo (
     const char              *Format,
     ...) ACPI_PRINTF_LIKE(3);
 
+void ACPI_INTERNAL_VAR_XFACE
+AcpiBiosError (
+    const char              *ModuleName,
+    UINT32                  LineNumber,
+    const char              *Format,
+    ...) ACPI_PRINTF_LIKE(3);
+
+void ACPI_INTERNAL_VAR_XFACE
+AcpiBiosWarning (
+    const char              *ModuleName,
+    UINT32                  LineNumber,
+    const char              *Format,
+    ...) ACPI_PRINTF_LIKE(3);
+
 
 /*
  * Debug output
diff --git a/src/acpica/source/include/acpredef.h b/src/acpica/source/include/acpredef.h
index 82a1cb3..8da4836 100644
--- a/src/acpica/source/include/acpredef.h
+++ b/src/acpica/source/include/acpredef.h
@@ -584,14 +584,14 @@  static const ACPI_PREDEFINED_INFO     PredefinedNames[] =
     {{"_TMP", 0, ACPI_RTYPE_INTEGER}},
     {{"_TPC", 0, ACPI_RTYPE_INTEGER}},
     {{"_TPT", 1, 0}},
-    {{"_TRT", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 2Ref/6Int */
+    {{"_TRT", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 2 Ref/6 Int */
                     {{{ACPI_PTYPE2, ACPI_RTYPE_REFERENCE, 2, ACPI_RTYPE_INTEGER}, 6, 0}},
 
-    {{"_TSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5Int with count */
+    {{"_TSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5 Int with count */
                     {{{ACPI_PTYPE2_COUNT,ACPI_RTYPE_INTEGER, 5,0}, 0,0}},
 
     {{"_TSP", 0, ACPI_RTYPE_INTEGER}},
-    {{"_TSS", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5Int */
+    {{"_TSS", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each 5 Int */
                     {{{ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 5,0}, 0,0}},
 
     {{"_TST", 0, ACPI_RTYPE_INTEGER}},
diff --git a/src/acpica/source/include/actbl1.h b/src/acpica/source/include/actbl1.h
index 6e6edcc..c046b05 100644
--- a/src/acpica/source/include/actbl1.h
+++ b/src/acpica/source/include/actbl1.h
@@ -202,7 +202,7 @@  typedef struct acpi_table_bert
 {
     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
     UINT32                  RegionLength;       /* Length of the boot error region */
-    UINT64                  Address;            /* Physical addresss of the error region */
+    UINT64                  Address;            /* Physical address of the error region */
 
 } ACPI_TABLE_BERT;
 
diff --git a/src/acpica/source/include/actypes.h b/src/acpica/source/include/actypes.h
index ff90c38..5d01e32 100644
--- a/src/acpica/source/include/actypes.h
+++ b/src/acpica/source/include/actypes.h
@@ -780,10 +780,14 @@  typedef UINT32                          ACPI_EVENT_STATUS;
 #define ACPI_DEVICE_NOTIFY              0x2
 #define ACPI_ALL_NOTIFY                 (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY)
 #define ACPI_MAX_NOTIFY_HANDLER_TYPE    0x3
+#define ACPI_NUM_NOTIFY_TYPES           2
 
 #define ACPI_MAX_SYS_NOTIFY             0x7F
 #define ACPI_MAX_DEVICE_SPECIFIC_NOTIFY 0xBF
 
+#define ACPI_SYSTEM_HANDLER_LIST        0 /* Used as index, must be SYSTEM_NOTIFY -1 */
+#define ACPI_DEVICE_HANDLER_LIST        1 /* Used as index, must be DEVICE_NOTIFY -1 */
+
 
 /* Address Space (Operation Region) Types */
 
@@ -799,8 +803,9 @@  typedef UINT8                           ACPI_ADR_SPACE_TYPE;
 #define ACPI_ADR_SPACE_IPMI             (ACPI_ADR_SPACE_TYPE) 7
 #define ACPI_ADR_SPACE_GPIO             (ACPI_ADR_SPACE_TYPE) 8
 #define ACPI_ADR_SPACE_GSBUS            (ACPI_ADR_SPACE_TYPE) 9
+#define ACPI_ADR_SPACE_PLATFORM_COMM    (ACPI_ADR_SPACE_TYPE) 10
 
-#define ACPI_NUM_PREDEFINED_REGIONS     10
+#define ACPI_NUM_PREDEFINED_REGIONS     11
 
 /*
  * Special Address Spaces
diff --git a/src/acpica/source/include/acutils.h b/src/acpica/source/include/acutils.h
index 5c21320..50b5b99 100644
--- a/src/acpica/source/include/acutils.h
+++ b/src/acpica/source/include/acutils.h
@@ -501,7 +501,7 @@  AcpiUtDumpBuffer (
     UINT8                   *Buffer,
     UINT32                  Count,
     UINT32                  Display,
-    UINT32                  componentId);
+    UINT32                  ComponentId);
 
 void
 AcpiUtDumpBuffer2 (
@@ -775,6 +775,10 @@  AcpiUtShortDivide (
 /*
  * utmisc
  */
+void
+UtConvertBackslashes (
+    char                    *Pathname);
+
 const char *
 AcpiUtValidateException (
     ACPI_STATUS             Status);
diff --git a/src/acpica/source/include/platform/acenv.h b/src/acpica/source/include/platform/acenv.h
index 342615f..1f3596a 100644
--- a/src/acpica/source/include/platform/acenv.h
+++ b/src/acpica/source/include/platform/acenv.h
@@ -180,9 +180,9 @@ 
 #endif
 
 #ifdef ACPI_HELP_APP
-#define ACPI_DEBUG_OUTPUT
 #define ACPI_APPLICATION
 #define ACPI_SINGLE_THREADED
+#define ACPI_NO_ERROR_MESSAGES
 #endif
 
 /* Linkable ACPICA library */
@@ -252,6 +252,9 @@ 
 #elif defined(_AED_EFI)
 #include "acefi.h"
 
+#elif defined(__HAIKU__)
+#include "achaiku.h"
+
 #else
 
 /* Unknown environment */
diff --git a/src/acpica/source/os_specific/service_layers/osunixxf.c b/src/acpica/source/os_specific/service_layers/osunixxf.c
index d5e3af9..840328b 100644
--- a/src/acpica/source/os_specific/service_layers/osunixxf.c
+++ b/src/acpica/source/os_specific/service_layers/osunixxf.c
@@ -425,7 +425,7 @@  AcpiOsGetLine (
     UINT32                  BufferLength,
     UINT32                  *BytesRead)
 {
-    UINT8                   Temp;
+    int                     Temp;
     UINT32                  i;
 
 
@@ -436,13 +436,17 @@  AcpiOsGetLine (
             return (AE_BUFFER_OVERFLOW);
         }
 
-        scanf ("%1c", &Temp);
+        if ((Temp = getchar ()) == EOF)
+        {
+            return (AE_ERROR);
+        }
+
         if (!Temp || Temp == '\n')
         {
             break;
         }
 
-        Buffer [i] = Temp;
+        Buffer [i] = (char) Temp;
     }
 
     /* Null terminate the buffer */
@@ -1313,3 +1317,24 @@  AcpiOsExecute (
 }
 
 #endif /* ACPI_SINGLE_THREADED */
+
+
+/******************************************************************************
+ *
+ * FUNCTION:    AcpiOsWaitEventsComplete
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Wait for all asynchronous events to complete. This
+ *              implementation does nothing.
+ *
+ *****************************************************************************/
+
+void
+AcpiOsWaitEventsComplete (
+    void)
+{
+    return;
+}
diff --git a/src/acpica/source/tools/acpiexec/aecommon.h b/src/acpica/source/tools/acpiexec/aecommon.h
index 01615b1..0f5f789 100644
--- a/src/acpica/source/tools/acpiexec/aecommon.h
+++ b/src/acpica/source/tools/acpiexec/aecommon.h
@@ -140,6 +140,7 @@  extern BOOLEAN              AcpiGbl_IgnoreErrors;
 extern UINT8                AcpiGbl_RegionFillValue;
 extern UINT8                AcpiGbl_UseHwReducedFadt;
 extern BOOLEAN              AcpiGbl_DisplayRegionAccess;
+extern BOOLEAN              AcpiGbl_DoInterfaceTests;
 
 /* Check for unexpected exceptions */
 
diff --git a/src/acpica/source/tools/acpiexec/aehandlers.c b/src/acpica/source/tools/acpiexec/aehandlers.c
index ccf6966..ba7e5a1 100644
--- a/src/acpica/source/tools/acpiexec/aehandlers.c
+++ b/src/acpica/source/tools/acpiexec/aehandlers.c
@@ -121,12 +121,24 @@ 
 /* Local prototypes */
 
 static void
-AeNotifyHandler (
+AeNotifyHandler1 (
     ACPI_HANDLE             Device,
     UINT32                  Value,
     void                    *Context);
 
 static void
+AeNotifyHandler2 (
+    ACPI_HANDLE             Device,
+    UINT32                  Value,
+    void                    *Context);
+
+static void
+AeCommonNotifyHandler (
+    ACPI_HANDLE             Device,
+    UINT32                  Value,
+    UINT32                  HandlerId);
+
+static void
 AeDeviceNotifyHandler (
     ACPI_HANDLE             Device,
     UINT32                  Value,
@@ -258,24 +270,51 @@  AeCtrlCHandler (
 
 /******************************************************************************
  *
- * FUNCTION:    AeNotifyHandler
+ * FUNCTION:    AeNotifyHandler(s)
  *
  * PARAMETERS:  Standard notify handler parameters
  *
  * RETURN:      Status
  *
- * DESCRIPTION: System notify handler for AcpiExec utility.  Used by the ASL
+ * DESCRIPTION: Notify handlers for AcpiExec utility. Used by the ASL
  *              test suite(s) to communicate errors and other information to
- *              this utility via the Notify() operator.
+ *              this utility via the Notify() operator. Tests notify handling
+ *              and multiple notify handler support.
  *
  *****************************************************************************/
 
 static void
-AeNotifyHandler (
-    ACPI_HANDLE                 Device,
-    UINT32                      Value,
-    void                        *Context)
+AeNotifyHandler1 (
+    ACPI_HANDLE             Device,
+    UINT32                  Value,
+    void                    *Context)
+{
+    AeCommonNotifyHandler (Device, Value, 1);
+}
+
+static void
+AeNotifyHandler2 (
+    ACPI_HANDLE             Device,
+    UINT32                  Value,
+    void                    *Context)
 {
+    AeCommonNotifyHandler (Device, Value, 2);
+}
+
+static void
+AeCommonNotifyHandler (
+    ACPI_HANDLE             Device,
+    UINT32                  Value,
+    UINT32                  HandlerId)
+{
+    char                    *Type;
+
+
+    Type = "Device";
+    if (Value <= ACPI_MAX_SYS_NOTIFY)
+    {
+        Type = "System";
+    }
 
     switch (Value)
     {
@@ -309,12 +348,13 @@  AeNotifyHandler (
 #endif
 
     default:
-        printf ("[AcpiExec] Received a System Notify on [%4.4s] %p Value 0x%2.2X (%s)\n",
-            AcpiUtGetNodeName (Device), Device, Value,
+        printf ("[AcpiExec] Handler %u: Received a %s Notify on [%4.4s] %p Value 0x%2.2X (%s)\n",
+            HandlerId, Type, AcpiUtGetNodeName (Device), Device, Value,
             AcpiUtGetNotifyName (Value));
         if (AcpiGbl_DebugFile)
         {
-            AcpiOsPrintf ("[AcpiExec] Received a system notify, Value 0x%2.2X\n", Value);
+            AcpiOsPrintf ("[AcpiExec] Handler %u: Received a %s notify, Value 0x%2.2X\n",
+                HandlerId, Type, Value);
         }
 
         (void) AcpiEvaluateObject (Device, "_NOT", NULL, NULL);
@@ -325,6 +365,39 @@  AeNotifyHandler (
 
 /******************************************************************************
  *
+ * FUNCTION:    AeSystemNotifyHandler
+ *
+ * PARAMETERS:  Standard notify handler parameters
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: System notify handler for AcpiExec utility.  Used by the ASL
+ *              test suite(s) to communicate errors and other information to
+ *              this utility via the Notify() operator.
+ *
+ *****************************************************************************/
+
+static void
+AeSystemNotifyHandler (
+    ACPI_HANDLE                 Device,
+    UINT32                      Value,
+    void                        *Context)
+{
+
+    printf ("[AcpiExec] Global:    Received a System Notify on [%4.4s] %p Value 0x%2.2X (%s)\n",
+        AcpiUtGetNodeName (Device), Device, Value,
+        AcpiUtGetNotifyName (Value));
+    if (AcpiGbl_DebugFile)
+    {
+        AcpiOsPrintf ("[AcpiExec] Global:    Received a System Notify, Value 0x%2.2X\n", Value);
+    }
+
+    (void) AcpiEvaluateObject (Device, "_NOT", NULL, NULL);
+}
+
+
+/******************************************************************************
+ *
  * FUNCTION:    AeDeviceNotifyHandler
  *
  * PARAMETERS:  Standard notify handler parameters
@@ -344,12 +417,12 @@  AeDeviceNotifyHandler (
     void                        *Context)
 {
 
-    printf ("[AcpiExec] Received a Device Notify on [%4.4s] %p Value 0x%2.2X (%s)\n",
+    printf ("[AcpiExec] Global:    Received a Device Notify on [%4.4s] %p Value 0x%2.2X (%s)\n",
         AcpiUtGetNodeName (Device), Device, Value,
         AcpiUtGetNotifyName (Value));
     if (AcpiGbl_DebugFile)
     {
-        AcpiOsPrintf ("[AcpiExec] Received a device notify, Value 0x%2.2X\n", Value);
+        AcpiOsPrintf ("[AcpiExec] Global:    Received a Device Notify, Value 0x%2.2X\n", Value);
     }
 
     (void) AcpiEvaluateObject (Device, "_NOT", NULL, NULL);
@@ -759,18 +832,18 @@  AeInstallEarlyHandlers (
             AcpiFormatException (Status));
     }
 
-    /* Install global notify handler */
+    /* Install global notify handlers */
 
     Status = AcpiInstallNotifyHandler (ACPI_ROOT_OBJECT, ACPI_SYSTEM_NOTIFY,
-                                        AeNotifyHandler, NULL);
+        AeSystemNotifyHandler, NULL);
     if (ACPI_FAILURE (Status))
     {
-        printf ("Could not install a global notify handler, %s\n",
+        printf ("Could not install a global system notify handler, %s\n",
             AcpiFormatException (Status));
     }
 
     Status = AcpiInstallNotifyHandler (ACPI_ROOT_OBJECT, ACPI_DEVICE_NOTIFY,
-                                        AeDeviceNotifyHandler, NULL);
+        AeDeviceNotifyHandler, NULL);
     if (ACPI_FAILURE (Status))
     {
         printf ("Could not install a global notify handler, %s\n",
@@ -781,7 +854,7 @@  AeInstallEarlyHandlers (
     if (ACPI_SUCCESS (Status))
     {
         Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
-                                            AeNotifyHandler, NULL);
+            AeNotifyHandler1, NULL);
         if (ACPI_FAILURE (Status))
         {
             printf ("Could not install a notify handler, %s\n",
@@ -789,7 +862,7 @@  AeInstallEarlyHandlers (
         }
 
         Status = AcpiRemoveNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
-                                            AeNotifyHandler);
+            AeNotifyHandler1);
         if (ACPI_FAILURE (Status))
         {
             printf ("Could not remove a notify handler, %s\n",
@@ -797,20 +870,35 @@  AeInstallEarlyHandlers (
         }
 
         Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
-                                            AeNotifyHandler, NULL);
+            AeNotifyHandler1, NULL);
         AE_CHECK_OK (AcpiInstallNotifyHandler, Status);
 
         Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
-                                            AeNotifyHandler);
+            AeNotifyHandler1);
         AE_CHECK_OK (AcpiRemoveNotifyHandler, Status);
 
+#if 0
         Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
-                                            AeNotifyHandler, NULL);
+            AeNotifyHandler1, NULL);
         if (ACPI_FAILURE (Status))
         {
             printf ("Could not install a notify handler, %s\n",
                 AcpiFormatException (Status));
         }
+#endif
+
+        /* Install two handlers for _SB_ */
+
+        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
+            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
+
+        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
+            AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
+
+        /* Attempt duplicate handler installation, should fail */
+
+        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
+            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x77777777));
 
         Status = AcpiAttachData (Handle, AeAttachedDataHandler, Handle);
         AE_CHECK_OK (AcpiAttachData, Status);
@@ -827,6 +915,37 @@  AeInstallEarlyHandlers (
     }
 
 
+    Status = AcpiGetHandle (NULL, "\\_TZ.TZ1", &Handle);
+    if (ACPI_SUCCESS (Status))
+    {
+        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
+            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
+
+        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
+            AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
+
+        Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
+            AeNotifyHandler1);
+        Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
+            AeNotifyHandler2);
+
+        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
+            AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
+
+        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
+            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
+    }
+
+    Status = AcpiGetHandle (NULL, "\\_PR.CPU0", &Handle);
+    if (ACPI_SUCCESS (Status))
+    {
+        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
+            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
+
+        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
+            AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
+    }
+
     /*
      * Install handlers that will override the default handlers for some of
      * the space IDs.