ACPICA: Update to version 20191018
diff mbox series

Message ID 20191019143101.27675-1-colin.king@canonical.com
State Accepted
Headers show
Series
  • ACPICA: Update to version 20191018
Related show

Commit Message

Colin King Oct. 19, 2019, 2:31 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Changes in this release of ACPICA are detailed at the following
link on the ACPICA developer mailing list:

https://lists.acpica.org/hyperkitty/list/devel@acpica.org/thread/2ZK7W5OOHYHRJGKDURZ7YHXKDQL7WTLO/

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpica/source/common/acgetline.c          |   2 +-
 src/acpica/source/common/adisasm.c            |   1 -
 src/acpica/source/common/adwalk.c             |   4 +-
 src/acpica/source/common/dmtables.c           |   4 +-
 src/acpica/source/common/dmtbdump1.c          |  22 ++-
 src/acpica/source/common/dmtbdump2.c          |  24 +++-
 src/acpica/source/common/dmtbdump3.c          |   6 +-
 src/acpica/source/compiler/aslanalyze.c       |   2 +-
 src/acpica/source/compiler/aslbtypes.c        |   1 -
 src/acpica/source/compiler/aslkeywords.y      |   2 +-
 src/acpica/source/compiler/aslload.c          |  13 +-
 src/acpica/source/compiler/aslmessages.c      |   5 +-
 src/acpica/source/compiler/aslmessages.h      |   3 +
 src/acpica/source/compiler/aslmethod.c        |  20 ++-
 src/acpica/source/compiler/aslnamesp.c        |   4 +
 src/acpica/source/compiler/aslprepkg.c        |   2 +-
 src/acpica/source/compiler/aslresource.c      |   2 +-
 src/acpica/source/compiler/aslrestype2.c      |   3 -
 src/acpica/source/compiler/aslrestype2s.c     |   1 -
 src/acpica/source/compiler/aslutils.c         |   2 +-
 src/acpica/source/compiler/cvdisasm.c         |   9 +-
 src/acpica/source/compiler/cvparser.c         |   1 -
 src/acpica/source/compiler/dtcompile.c        |  15 ++-
 src/acpica/source/compiler/dtcompiler.h       |  39 ++++--
 src/acpica/source/compiler/dtcompilerparser.l |  20 ++-
 src/acpica/source/compiler/dtcompilerparser.y |  50 ++++---
 src/acpica/source/compiler/dtfield.c          | 127 ++++++++++++++++++
 src/acpica/source/compiler/dtio.c             |  98 --------------
 src/acpica/source/compiler/dttable2.c         |  23 +++-
 .../source/components/debugger/dbconvert.c    |   4 +
 .../source/components/debugger/dbdisply.c     |   2 -
 .../source/components/debugger/dbfileio.c     |   2 +-
 .../source/components/debugger/dbinput.c      |  36 ++++-
 .../source/components/debugger/dbmethod.c     |   5 +
 .../source/components/debugger/dbnames.c      | 122 +++++++++++++++++
 .../source/components/debugger/dbobject.c     |   1 -
 .../components/disassembler/dmdeferred.c      |   4 +
 .../source/components/disassembler/dmresrc.c  |   1 -
 .../source/components/disassembler/dmwalk.c   |   1 -
 .../source/components/dispatcher/dscontrol.c  |   2 +-
 .../source/components/dispatcher/dsfield.c    |   9 +-
 .../source/components/events/evgpeblk.c       |   6 +-
 .../source/components/events/evgpeinit.c      |   3 -
 src/acpica/source/components/events/evmisc.c  |  17 ++-
 .../source/components/events/evregion.c       |   4 +-
 .../source/components/events/evrgnini.c       |   1 -
 .../source/components/hardware/hwxfsleep.c    |   4 +
 .../source/components/namespace/nsconvert.c   |   2 +-
 .../source/components/namespace/nsdump.c      |   6 +-
 .../source/components/namespace/nsxfname.c    |   2 +-
 .../source/components/parser/psobject.c       |   6 +-
 .../source/components/resources/rscreate.c    |   4 +
 src/acpica/source/components/tables/tbdata.c  |   4 +
 .../source/components/tables/tbxfload.c       |  49 ++++++-
 .../source/components/utilities/utbuffer.c    |  62 +++++----
 .../source/components/utilities/utids.c       |   3 +-
 .../source/components/utilities/uttrack.c     |   2 +-
 src/acpica/source/include/acdebug.h           |   4 +
 src/acpica/source/include/acpixf.h            |  10 +-
 src/acpica/source/include/acstruct.h          |  13 ++
 src/acpica/source/include/acutils.h           |   9 +-
 src/acpica/source/tools/acpiexec/aecommon.h   |   5 +-
 src/acpica/source/tools/acpiexec/aehandlers.c |  13 +-
 src/acpica/source/tools/acpiexec/aeinitfile.c |  81 +++++++----
 64 files changed, 717 insertions(+), 287 deletions(-)

Comments

Alex Hung Oct. 20, 2019, 6:33 a.m. UTC | #1
On 2019-10-19 8:31 a.m., Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Changes in this release of ACPICA are detailed at the following
> link on the ACPICA developer mailing list:
> 
> https://lists.acpica.org/hyperkitty/list/devel@acpica.org/thread/2ZK7W5OOHYHRJGKDURZ7YHXKDQL7WTLO/
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpica/source/common/acgetline.c          |   2 +-
>  src/acpica/source/common/adisasm.c            |   1 -
>  src/acpica/source/common/adwalk.c             |   4 +-
>  src/acpica/source/common/dmtables.c           |   4 +-
>  src/acpica/source/common/dmtbdump1.c          |  22 ++-
>  src/acpica/source/common/dmtbdump2.c          |  24 +++-
>  src/acpica/source/common/dmtbdump3.c          |   6 +-
>  src/acpica/source/compiler/aslanalyze.c       |   2 +-
>  src/acpica/source/compiler/aslbtypes.c        |   1 -
>  src/acpica/source/compiler/aslkeywords.y      |   2 +-
>  src/acpica/source/compiler/aslload.c          |  13 +-
>  src/acpica/source/compiler/aslmessages.c      |   5 +-
>  src/acpica/source/compiler/aslmessages.h      |   3 +
>  src/acpica/source/compiler/aslmethod.c        |  20 ++-
>  src/acpica/source/compiler/aslnamesp.c        |   4 +
>  src/acpica/source/compiler/aslprepkg.c        |   2 +-
>  src/acpica/source/compiler/aslresource.c      |   2 +-
>  src/acpica/source/compiler/aslrestype2.c      |   3 -
>  src/acpica/source/compiler/aslrestype2s.c     |   1 -
>  src/acpica/source/compiler/aslutils.c         |   2 +-
>  src/acpica/source/compiler/cvdisasm.c         |   9 +-
>  src/acpica/source/compiler/cvparser.c         |   1 -
>  src/acpica/source/compiler/dtcompile.c        |  15 ++-
>  src/acpica/source/compiler/dtcompiler.h       |  39 ++++--
>  src/acpica/source/compiler/dtcompilerparser.l |  20 ++-
>  src/acpica/source/compiler/dtcompilerparser.y |  50 ++++---
>  src/acpica/source/compiler/dtfield.c          | 127 ++++++++++++++++++
>  src/acpica/source/compiler/dtio.c             |  98 --------------
>  src/acpica/source/compiler/dttable2.c         |  23 +++-
>  .../source/components/debugger/dbconvert.c    |   4 +
>  .../source/components/debugger/dbdisply.c     |   2 -
>  .../source/components/debugger/dbfileio.c     |   2 +-
>  .../source/components/debugger/dbinput.c      |  36 ++++-
>  .../source/components/debugger/dbmethod.c     |   5 +
>  .../source/components/debugger/dbnames.c      | 122 +++++++++++++++++
>  .../source/components/debugger/dbobject.c     |   1 -
>  .../components/disassembler/dmdeferred.c      |   4 +
>  .../source/components/disassembler/dmresrc.c  |   1 -
>  .../source/components/disassembler/dmwalk.c   |   1 -
>  .../source/components/dispatcher/dscontrol.c  |   2 +-
>  .../source/components/dispatcher/dsfield.c    |   9 +-
>  .../source/components/events/evgpeblk.c       |   6 +-
>  .../source/components/events/evgpeinit.c      |   3 -
>  src/acpica/source/components/events/evmisc.c  |  17 ++-
>  .../source/components/events/evregion.c       |   4 +-
>  .../source/components/events/evrgnini.c       |   1 -
>  .../source/components/hardware/hwxfsleep.c    |   4 +
>  .../source/components/namespace/nsconvert.c   |   2 +-
>  .../source/components/namespace/nsdump.c      |   6 +-
>  .../source/components/namespace/nsxfname.c    |   2 +-
>  .../source/components/parser/psobject.c       |   6 +-
>  .../source/components/resources/rscreate.c    |   4 +
>  src/acpica/source/components/tables/tbdata.c  |   4 +
>  .../source/components/tables/tbxfload.c       |  49 ++++++-
>  .../source/components/utilities/utbuffer.c    |  62 +++++----
>  .../source/components/utilities/utids.c       |   3 +-
>  .../source/components/utilities/uttrack.c     |   2 +-
>  src/acpica/source/include/acdebug.h           |   4 +
>  src/acpica/source/include/acpixf.h            |  10 +-
>  src/acpica/source/include/acstruct.h          |  13 ++
>  src/acpica/source/include/acutils.h           |   9 +-
>  src/acpica/source/tools/acpiexec/aecommon.h   |   5 +-
>  src/acpica/source/tools/acpiexec/aehandlers.c |  13 +-
>  src/acpica/source/tools/acpiexec/aeinitfile.c |  81 +++++++----
>  64 files changed, 717 insertions(+), 287 deletions(-)
> 
> diff --git a/src/acpica/source/common/acgetline.c b/src/acpica/source/common/acgetline.c
> index 702d046b..3865914b 100644
> --- a/src/acpica/source/common/acgetline.c
> +++ b/src/acpica/source/common/acgetline.c
> @@ -532,7 +532,7 @@ AcpiOsGetLine (
>                   * Ignore the various keys like insert/delete/home/end, etc.
>                   * But we must eat the final character of the ESC sequence.
>                   */
> -                InputChar = getchar ();
> +                (void) getchar ();
>                  continue;
>  
>              default:
> diff --git a/src/acpica/source/common/adisasm.c b/src/acpica/source/common/adisasm.c
> index c73208f6..22a85009 100644
> --- a/src/acpica/source/common/adisasm.c
> +++ b/src/acpica/source/common/adisasm.c
> @@ -746,7 +746,6 @@ AdDoExternalFileList (
>              {
>                  ExternalFileList = ExternalFileList->Next;
>                  GlobalStatus = AE_TYPE;
> -                Status = AE_OK;
>                  continue;
>              }
>  
> diff --git a/src/acpica/source/common/adwalk.c b/src/acpica/source/common/adwalk.c
> index 6da2e8ec..1996c965 100644
> --- a/src/acpica/source/common/adwalk.c
> +++ b/src/acpica/source/common/adwalk.c
> @@ -601,7 +601,9 @@ AcpiDmFindOrphanDescending (
>          return (AE_OK);
>      }
>  
> +#ifdef ACPI_UNDER_DEVELOPMENT
>      OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
> +#endif
>  
>      switch (Op->Common.AmlOpcode)
>      {
> @@ -1100,7 +1102,7 @@ AcpiDmCommonDescendingOp (
>      /* Switch/Case conversion */
>  
>      Status = AcpiDmProcessSwitch (Op);
> -    return (AE_OK);
> +    return (Status);
>  }
>  
>  
> diff --git a/src/acpica/source/common/dmtables.c b/src/acpica/source/common/dmtables.c
> index a2dbea62..e5536ecf 100644
> --- a/src/acpica/source/common/dmtables.c
> +++ b/src/acpica/source/common/dmtables.c
> @@ -327,7 +327,7 @@ AdCreateTableHeader (
>       * makes it easier to rename the disassembled ASL file if needed.
>       */
>      AcpiOsPrintf (
> -        "DefinitionBlock (\"\", \"%4.4s\", %hu, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
> +        "DefinitionBlock (\"\", \"%4.4s\", %u, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
>          Table->Signature, Table->Revision,
>          Table->OemId, Table->OemTableId, Table->OemRevision);
>  }
> @@ -601,7 +601,7 @@ AdParseTable (
>      fprintf (stderr,
>          "Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)\n");
>  
> -    Status = AcpiDmParseDeferredOps (AcpiGbl_ParseOpRoot);
> +    (void) AcpiDmParseDeferredOps (AcpiGbl_ParseOpRoot);
>      fprintf (stderr, "\n");
>  
>      /* Process Resource Templates */
> diff --git a/src/acpica/source/common/dmtbdump1.c b/src/acpica/source/common/dmtbdump1.c
> index c363ac8d..9061ea11 100644
> --- a/src/acpica/source/common/dmtbdump1.c
> +++ b/src/acpica/source/common/dmtbdump1.c
> @@ -474,7 +474,6 @@ AcpiDmDumpCsrt (
>                  {
>                      return;
>                  }
> -                SubSubOffset += InfoLength;
>              }
>  
>              /* Point to next sub-subtable */
> @@ -1401,7 +1400,6 @@ AcpiDmDumpHmat (
>      while (Offset < Table->Length)
>      {
>          AcpiOsPrintf ("\n");
> -        SubtableOffset = 0;
>  
>          /* Dump HMAT structure header */
>  
> @@ -1484,6 +1482,11 @@ AcpiDmDumpHmat (
>                  Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
>                      ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
>                      4, AcpiDmTableInfoHmat1a);
> +                if (ACPI_FAILURE (Status))
> +                {
> +                    return;
> +                }
> +
>                  SubtableOffset += 4;
>              }
>  
> @@ -1500,6 +1503,11 @@ AcpiDmDumpHmat (
>                  Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
>                      ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
>                      4, AcpiDmTableInfoHmat1b);
> +                if (ACPI_FAILURE (Status))
> +                {
> +                    return;
> +                }
> +
>                  SubtableOffset += 4;
>              }
>  
> @@ -1519,6 +1527,11 @@ AcpiDmDumpHmat (
>                      Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
>                          ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
>                          2, AcpiDmTableInfoHmat1c);
> +                    if (ACPI_FAILURE(Status))
> +                    {
> +                        return;
> +                    }
> +
>                      SubtableOffset += 2;
>                  }
>              }
> @@ -1542,6 +1555,11 @@ AcpiDmDumpHmat (
>                  Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
>                      ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
>                      2, AcpiDmTableInfoHmat2a);
> +                if (ACPI_FAILURE (Status))
> +                {
> +                    return;
> +                }
> +
>                  SubtableOffset += 2;
>              }
>              break;
> diff --git a/src/acpica/source/common/dmtbdump2.c b/src/acpica/source/common/dmtbdump2.c
> index 418b6ec0..e350d23c 100644
> --- a/src/acpica/source/common/dmtbdump2.c
> +++ b/src/acpica/source/common/dmtbdump2.c
> @@ -187,6 +187,7 @@ AcpiDmDumpIort (
>      ACPI_DMTABLE_INFO       *InfoTable;
>      char                    *String;
>      UINT32                  i;
> +    UINT32                  MappingByteLength;
>  
>  
>      /* Main table */
> @@ -314,6 +315,11 @@ AcpiDmDumpIort (
>                      Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset,
>                          ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset),
>                          4, AcpiDmTableInfoIort0a);
> +                    if (ACPI_FAILURE (Status))
> +                    {
> +                        return;
> +                    }
> +
>                      NodeOffset += 4;
>                  }
>              }
> @@ -325,8 +331,10 @@ AcpiDmDumpIort (
>  
>              if (IortNode->Length > NodeOffset)
>              {
> +                MappingByteLength =
> +                    IortNode->MappingCount * sizeof (ACPI_IORT_ID_MAPPING);
>                  Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset,
> -                    Table, IortNode->Length - NodeOffset,
> +                    Table, IortNode->Length - NodeOffset - MappingByteLength,
>                      AcpiDmTableInfoIort1a);
>                  if (ACPI_FAILURE (Status))
>                  {
> @@ -410,7 +418,6 @@ NextSubtable:
>          /* Point to next node subtable */
>  
>          Offset += IortNode->Length;
> -        IortNode = ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, IortNode->Length);
>      }
>  }
>  
> @@ -1211,7 +1218,6 @@ AcpiDmDumpNfit (
>              /* Has a variable number of 32-bit values at the end */
>  
>              InfoTable = AcpiDmTableInfoNfit2;
> -            Interleave = ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE, Subtable);
>              FieldOffset = sizeof (ACPI_NFIT_INTERLEAVE);
>              break;
>  
> @@ -1236,7 +1242,6 @@ AcpiDmDumpNfit (
>              /* Has a variable number of 64-bit addresses at the end */
>  
>              InfoTable = AcpiDmTableInfoNfit6;
> -            Hint = ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS, Subtable);
>              FieldOffset = sizeof (ACPI_NFIT_FLUSH_ADDRESS) - sizeof (UINT64);
>              break;
>  
> @@ -1273,6 +1278,7 @@ AcpiDmDumpNfit (
>          {
>          case ACPI_NFIT_TYPE_INTERLEAVE:
>  
> +            Interleave = ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE, Subtable);
>              for (i = 0; i < Interleave->LineCount; i++)
>              {
>                  Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset,
> @@ -1308,6 +1314,7 @@ AcpiDmDumpNfit (
>  
>          case ACPI_NFIT_TYPE_FLUSH_ADDRESS:
>  
> +            Hint = ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS, Subtable);
>              for (i = 0; i < Hint->HintCount; i++)
>              {
>                  Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset,
> @@ -1806,6 +1813,11 @@ AcpiDmDumpPptt (
>                  Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
>                      ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable, SubtableOffset),
>                      4, AcpiDmTableInfoPptt0a);
> +                if (ACPI_FAILURE (Status))
> +                {
> +                    return;
> +                }
> +
>                  SubtableOffset += 4;
>              }
>              break;
> @@ -2063,6 +2075,10 @@ AcpiDmDumpSdev (
>                  Status = AcpiDmDumpTable (Table->Length, 0,
>                      ACPI_ADD_PTR (UINT8, Pcie, VendorDataOffset),
>                      VendorDataLength, AcpiDmTableInfoSdev1b);
> +                if (ACPI_FAILURE (Status))
> +                {
> +                    return;
> +                }
>              }
>              break;
>  
> diff --git a/src/acpica/source/common/dmtbdump3.c b/src/acpica/source/common/dmtbdump3.c
> index 0b9863cc..561a0032 100644
> --- a/src/acpica/source/common/dmtbdump3.c
> +++ b/src/acpica/source/common/dmtbdump3.c
> @@ -410,7 +410,7 @@ AcpiDmDumpStao (
>          Namepath = ACPI_ADD_PTR (char, Table, Offset);
>          StringLength = strlen (Namepath) + 1;
>  
> -        AcpiDmLineHeader (Offset, StringLength, "Namestring");
> +        AcpiDmLineHeader (Offset, StringLength, "Namepath");
>          AcpiOsPrintf ("\"%s\"\n", Namepath);
>  
>          /* Point to next namepath */
> @@ -526,7 +526,7 @@ AcpiDmDumpTpm2Rev3 (
>      {
>      case ACPI_TPM23_ACPI_START_METHOD:
>  
> -        Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
> +        (void) AcpiDmDumpTable (Table->Length, Offset, Subtable,
>              Table->Length - Offset, AcpiDmTableInfoTpm23a);
>          break;
>  
> @@ -591,7 +591,7 @@ AcpiDmDumpTpm2 (
>          Offset += sizeof (ACPI_TPM2_TRAILER);
>  
>          AcpiOsPrintf ("\n");
> -        Status = AcpiDmDumpTable (Table->Length, Offset, ArmSubtable,
> +        (void) AcpiDmDumpTable (Table->Length, Offset, ArmSubtable,
>              Table->Length - Offset, AcpiDmTableInfoTpm211);
>          break;
>  
> diff --git a/src/acpica/source/compiler/aslanalyze.c b/src/acpica/source/compiler/aslanalyze.c
> index 58da5e2e..0482775f 100644
> --- a/src/acpica/source/compiler/aslanalyze.c
> +++ b/src/acpica/source/compiler/aslanalyze.c
> @@ -569,7 +569,7 @@ ApCheckForGpeNameConflict (
>  
>      /* Need a null-terminated string version of NameSeg */
>  
> -    ACPI_MOVE_32_TO_32 (Name, &Op->Asl.NameSeg);
> +    ACPI_MOVE_32_TO_32 (Name, Op->Asl.NameSeg);
>      Name[ACPI_NAMESEG_SIZE] = 0;
>  
>      /*
> diff --git a/src/acpica/source/compiler/aslbtypes.c b/src/acpica/source/compiler/aslbtypes.c
> index ed607f3b..d7caea53 100644
> --- a/src/acpica/source/compiler/aslbtypes.c
> +++ b/src/acpica/source/compiler/aslbtypes.c
> @@ -474,7 +474,6 @@ AnFormatBtype (
>              strcat (Buffer, "|");
>          }
>  
> -        First = FALSE;
>          strcat (Buffer, "Resource");
>      }
>  }
> diff --git a/src/acpica/source/compiler/aslkeywords.y b/src/acpica/source/compiler/aslkeywords.y
> index a19b6425..a505dc02 100644
> --- a/src/acpica/source/compiler/aslkeywords.y
> +++ b/src/acpica/source/compiler/aslkeywords.y
> @@ -202,7 +202,7 @@ AddressKeyword
>      ;
>  
>  AddressSpaceKeyword
> -    : ByteConst                             {$$ = UtCheckIntegerRange ($1, 0x0A, 0xFF);}
> +    : ByteConst                             {$$ = UtCheckIntegerRange ($1, ACPI_NUM_PREDEFINED_REGIONS, 0xFF);}
>      | RegionSpaceKeyword                    {}
>      ;
>  
> diff --git a/src/acpica/source/compiler/aslload.c b/src/acpica/source/compiler/aslload.c
> index d918c0cc..db6c2d41 100644
> --- a/src/acpica/source/compiler/aslload.c
> +++ b/src/acpica/source/compiler/aslload.c
> @@ -526,13 +526,12 @@ LdNamespace1Begin (
>  
>      case AML_INT_CONNECTION_OP:
>  
> -
>          if (Op->Asl.Child->Asl.AmlOpcode != AML_INT_NAMEPATH_OP)
>          {
>              break;
>          }
> -        Arg = Op->Asl.Child;
>  
> +        Arg = Op->Asl.Child;
>          Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Asl.ExternalName,
>              ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
>              WalkState, &Node);
> @@ -541,15 +540,6 @@ LdNamespace1Begin (
>              break;
>          }
>  
> -        if (Node->Type == ACPI_TYPE_BUFFER)
> -        {
> -            Arg->Asl.Node = Node;
> -
> -            Arg = Node->Op->Asl.Child;  /* Get namepath */
> -            Arg = Arg->Asl.Next;        /* Get actual buffer */
> -            Arg = Arg->Asl.Child;       /* Buffer length */
> -            Arg = Arg->Asl.Next;        /* RAW_DATA buffer */
> -        }
>          break;
>  
>      default:
> @@ -576,7 +566,6 @@ LdNamespace1Begin (
>           * These opcodes are guaranteed to have a parent.
>           * Examine the parent opcode.
>           */
> -        Status = AE_OK;
>          ParentOp = Op->Asl.Parent;
>          OpInfo = AcpiPsGetOpcodeInfo (ParentOp->Asl.AmlOpcode);
>  
> diff --git a/src/acpica/source/compiler/aslmessages.c b/src/acpica/source/compiler/aslmessages.c
> index 8dd989ca..d1329352 100644
> --- a/src/acpica/source/compiler/aslmessages.c
> +++ b/src/acpica/source/compiler/aslmessages.c
> @@ -387,7 +387,10 @@ const char                      *AslTableCompilerMsgs [] =
>  /*    ASL_MSG_UNKNOWN_LABEL */              "Label is undefined",
>  /*    ASL_MSG_UNKNOWN_SUBTABLE */           "Unknown subtable type",
>  /*    ASL_MSG_UNKNOWN_TABLE */              "Unknown ACPI table signature",
> -/*    ASL_MSG_ZERO_VALUE */                 "Value must be non-zero"
> +/*    ASL_MSG_ZERO_VALUE */                 "Value must be non-zero",
> +/*    ASL_MSG_INVALID_LABEL */              "Invalid field label detected",
> +/*    ASL_MSG_BUFFER_LIST */                "Invalid buffer initializer list",
> +/*    ASL_MSG_ENTRY_LIST */                 "Invalid entry initializer list"
>  };
>  
>  /* Preprocessor */
> diff --git a/src/acpica/source/compiler/aslmessages.h b/src/acpica/source/compiler/aslmessages.h
> index 55473fb5..47e5bf43 100644
> --- a/src/acpica/source/compiler/aslmessages.h
> +++ b/src/acpica/source/compiler/aslmessages.h
> @@ -387,6 +387,9 @@ typedef enum
>      ASL_MSG_UNKNOWN_SUBTABLE,
>      ASL_MSG_UNKNOWN_TABLE,
>      ASL_MSG_ZERO_VALUE,
> +    ASL_MSG_INVALID_LABEL,
> +    ASL_MSG_BUFFER_LIST,
> +    ASL_MSG_ENTRY_LIST,
>  
>      /* These messages are used by the Preprocessor only */
>  
> diff --git a/src/acpica/source/compiler/aslmethod.c b/src/acpica/source/compiler/aslmethod.c
> index 98884bc3..667eaaaf 100644
> --- a/src/acpica/source/compiler/aslmethod.c
> +++ b/src/acpica/source/compiler/aslmethod.c
> @@ -199,6 +199,8 @@ MtMethodAnalysisWalkBegin (
>      ACPI_PARSE_OBJECT       *NextType;
>      ACPI_PARSE_OBJECT       *NextParamType;
>      UINT8                   ActualArgs = 0;
> +    BOOLEAN                 HidExists;
> +    BOOLEAN                 AdrExists;
>  
>  
>      /* Build cross-reference output file if requested */
> @@ -535,12 +537,26 @@ MtMethodAnalysisWalkBegin (
>  
>      case PARSEOP_DEVICE:
>  
> -        if (!ApFindNameInDeviceTree (METHOD_NAME__HID, Op) &&
> -            !ApFindNameInDeviceTree (METHOD_NAME__ADR, Op))
> +        /* Check usage of _HID and _ADR objects */
> +
> +        HidExists = ApFindNameInDeviceTree (METHOD_NAME__HID, Op);
> +        AdrExists = ApFindNameInDeviceTree (METHOD_NAME__ADR, Op);
> +
> +        if (!HidExists && !AdrExists)
>          {
>              AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
>                  "Device object requires a _HID or _ADR in same scope");
>          }
> +        else if (HidExists && AdrExists)
> +        {
> +            /*
> +             * According to the ACPI spec, "A device object must contain
> +             * either an _HID object or an _ADR object, but should not contain
> +             * both".
> +             */
> +            AslError (ASL_WARNING, ASL_MSG_MULTIPLE_TYPES, Op,
> +                "Device object requires either a _HID or _ADR, but not both");
> +        }
>          break;
>  
>      case PARSEOP_EVENT:
> diff --git a/src/acpica/source/compiler/aslnamesp.c b/src/acpica/source/compiler/aslnamesp.c
> index b5af0cb3..e38e397f 100644
> --- a/src/acpica/source/compiler/aslnamesp.c
> +++ b/src/acpica/source/compiler/aslnamesp.c
> @@ -234,6 +234,10 @@ NsDisplayNamespace (
>      Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
>          ACPI_UINT32_MAX, FALSE, NsDoOneNamespaceObject, NULL,
>          NULL, NULL);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        return (Status);
> +    }
>  
>      /* Print the full pathname for each namespace node */
>  
> diff --git a/src/acpica/source/compiler/aslprepkg.c b/src/acpica/source/compiler/aslprepkg.c
> index f55bb5e8..77969430 100644
> --- a/src/acpica/source/compiler/aslprepkg.c
> +++ b/src/acpica/source/compiler/aslprepkg.c
> @@ -458,7 +458,7 @@ ApCheckPackage (
>  
>          for (i = 0; i < Package->RetInfo4.Count1; ++i)
>          {
> -            Status = ApCheckObjectType (Predefined->Info.Name, Op,
> +            ApCheckObjectType (Predefined->Info.Name, Op,
>                  Package->RetInfo4.ObjectType1, i);
>              Op = Op->Asl.Next;
>          }
> diff --git a/src/acpica/source/compiler/aslresource.c b/src/acpica/source/compiler/aslresource.c
> index 82de5109..57b6440f 100644
> --- a/src/acpica/source/compiler/aslresource.c
> +++ b/src/acpica/source/compiler/aslresource.c
> @@ -1226,7 +1226,7 @@ RsDoResourceTemplate (
>      BufferOp->Asl.AmlOpcode           = AML_RAW_DATA_CHAIN;
>      BufferOp->Asl.AmlOpcodeLength     = 0;
>      BufferOp->Asl.AmlLength           = CurrentByteOffset;
> -    BufferOp->Asl.Value.Buffer        = (UINT8 *) HeadRnode.Next;
> +    BufferOp->Asl.Value.Buffer        = ACPI_CAST_PTR (UINT8,  HeadRnode.Next);
>      BufferOp->Asl.CompileFlags       |= OP_IS_RESOURCE_DATA;
>      UtSetParseOpName (BufferOp);
>  
> diff --git a/src/acpica/source/compiler/aslrestype2.c b/src/acpica/source/compiler/aslrestype2.c
> index 5b8f026e..0652272f 100644
> --- a/src/acpica/source/compiler/aslrestype2.c
> +++ b/src/acpica/source/compiler/aslrestype2.c
> @@ -487,10 +487,7 @@ RsDoInterruptDescriptor (
>  
>      if (StringLength && ResSourceString)
>      {
> -
>          strcpy ((char *) Rover, (char *) ResSourceString);
> -        Rover = ACPI_ADD_PTR (
> -                    AML_RESOURCE, &(Rover->ByteItem), StringLength);
>  
>          Descriptor->ExtendedIrq.ResourceLength = (UINT16)
>              (Descriptor->ExtendedIrq.ResourceLength + StringLength);
> diff --git a/src/acpica/source/compiler/aslrestype2s.c b/src/acpica/source/compiler/aslrestype2s.c
> index 23085054..410ff2b2 100644
> --- a/src/acpica/source/compiler/aslrestype2s.c
> +++ b/src/acpica/source/compiler/aslrestype2s.c
> @@ -674,7 +674,6 @@ RsDoGpioIoDescriptor (
>      ResSourceLength = RsGetStringDataLength (InitializerOp);
>      VendorLength = RsGetBufferDataLength (InitializerOp);
>      InterruptLength = RsGetInterruptDataLength (InitializerOp, 10);
> -    PinList = InterruptList;
>  
>      DescriptorSize = ACPI_AML_SIZE_LARGE (AML_RESOURCE_GPIO) +
>          ResSourceLength + VendorLength + InterruptLength;
> diff --git a/src/acpica/source/compiler/aslutils.c b/src/acpica/source/compiler/aslutils.c
> index ed2948d0..0faaec03 100644
> --- a/src/acpica/source/compiler/aslutils.c
> +++ b/src/acpica/source/compiler/aslutils.c
> @@ -223,7 +223,7 @@ UtQueryForOverwrite (
>      char                    *Pathname)
>  {
>      struct stat             StatInfo;
> -    int                     InChar = 0x34;
> +    int                     InChar;
>  
>  
>      if (!stat (Pathname, &StatInfo))
> diff --git a/src/acpica/source/compiler/cvdisasm.c b/src/acpica/source/compiler/cvdisasm.c
> index 3ff636f8..5396b3c3 100644
> --- a/src/acpica/source/compiler/cvdisasm.c
> +++ b/src/acpica/source/compiler/cvdisasm.c
> @@ -544,8 +544,11 @@ CvSwitchFiles(
>          Current = Current->Parent;
>      }
>  
> -    /* Redirect output to Op->Common.CvFilename */
> +    if (FNode)
> +    {
> +        /* Redirect output to Op->Common.CvFilename */
>  
> -    AcpiOsRedirectOutput (FNode->File);
> -    AcpiGbl_CurrentFilename = FNode->Filename;
> +        AcpiOsRedirectOutput (FNode->File);
> +        AcpiGbl_CurrentFilename = FNode->Filename;
> +    }
>  }
> diff --git a/src/acpica/source/compiler/cvparser.c b/src/acpica/source/compiler/cvparser.c
> index ca970b50..9a2f0f9c 100644
> --- a/src/acpica/source/compiler/cvparser.c
> +++ b/src/acpica/source/compiler/cvparser.c
> @@ -912,7 +912,6 @@ CvCaptureCommentsOnly (
>  
>                      /* Not a valid comment option. Revert the AML */
>  
> -                    Aml -= 2;
>                      goto DefBlock;
>  
>              } /* End switch statement */
> diff --git a/src/acpica/source/compiler/dtcompile.c b/src/acpica/source/compiler/dtcompile.c
> index b6a144fe..bdd8c1b7 100644
> --- a/src/acpica/source/compiler/dtcompile.c
> +++ b/src/acpica/source/compiler/dtcompile.c
> @@ -276,7 +276,10 @@ DtDoCompile (
>  
>      if (ACPI_FAILURE (Status))
>      {
> -        FileNode->ParserErrorDetected = TRUE;
> +        if (FileNode)
> +        {
> +            FileNode->ParserErrorDetected = TRUE;
> +        }
>  
>          /* TBD: temporary error message. Msgs should come from function above */
>  
> @@ -572,7 +575,7 @@ DtCompileTable (
>      ACPI_STATUS             Status = AE_OK;
>  
>  
> -    if (!Field)
> +    if (!Field || !Info)
>      {
>          return (AE_BAD_PARAMETER);
>      }
> @@ -643,6 +646,14 @@ DtCompileTable (
>          FieldType = DtGetFieldType (Info);
>          AslGbl_InputFieldCount++;
>  
> +        if (FieldType != DT_FIELD_TYPE_INLINE_SUBTABLE &&
> +            strcmp (Info->Name, LocalField->Name))
> +        {
> +            sprintf (AslGbl_MsgBuffer, "found \"%s\" expected \"%s\"",
> +                LocalField->Name, Info->Name);
> +            DtError (ASL_ERROR, ASL_MSG_INVALID_LABEL, LocalField, AslGbl_MsgBuffer);
> +        }
> +
>          switch (FieldType)
>          {
>          case DT_FIELD_TYPE_FLAGS_INTEGER:
> diff --git a/src/acpica/source/compiler/dtcompiler.h b/src/acpica/source/compiler/dtcompiler.h
> index 639c22cb..7c78b55b 100644
> --- a/src/acpica/source/compiler/dtcompiler.h
> +++ b/src/acpica/source/compiler/dtcompiler.h
> @@ -210,6 +210,17 @@ typedef struct dt_field
>  
>  #define DT_FIELD_NOT_ALLOCATED      1
>  
> +/*
> + * Structure used for each individual key or value
> + */
> +typedef struct dt_table_unit
> +{
> +    char                    *Value;      /* Field value (from name : value) */
> +    UINT32                  Line;        /* Line number for this field */
> +    UINT32                  Column;      /* Start column for field value */
> +
> +} DT_TABLE_UNIT;
> +
>  
>  /*
>   * Structure used for individual subtables within an ACPI table
> @@ -292,14 +303,6 @@ DtCompilePadding (
>      UINT32                  Length,
>      DT_SUBTABLE             **RetSubtable);
>  
> -void
> -DtCreateField (
> -    char                    *Name,
> -    char                    *Value,
> -    UINT32                  Line,
> -    UINT32                  Offset,
> -    UINT32                  Column,
> -    UINT32                  NameColumn);
>  
>  /* dtio - binary and text input/output */
>  
> @@ -437,6 +440,26 @@ DtCompileFlag (
>      ACPI_DMTABLE_INFO       *Info);
>  
>  
> +/* dtfield - DT_FIELD operations */
> +
> +void
> +DtLinkField (
> +    DT_FIELD                *Field);
> +
> +void
> +DtCreateField (
> +    DT_TABLE_UNIT           *FieldKey,
> +    DT_TABLE_UNIT           *FieldValue,
> +    UINT32                  Offset);
> +
> +DT_TABLE_UNIT *
> +DtCreateTableUnit (
> +    char                    *Data,
> +    UINT32                  Line,
> +    UINT32                  Column);
> +
> +
> +
>  /* dtparser - lex/yacc files */
>  
>  UINT64                      DtCompilerParserResult; /* Expression return value */
> diff --git a/src/acpica/source/compiler/dtcompilerparser.l b/src/acpica/source/compiler/dtcompilerparser.l
> index 0d68f41e..28dcf6af 100644
> --- a/src/acpica/source/compiler/dtcompilerparser.l
> +++ b/src/acpica/source/compiler/dtcompilerparser.l
> @@ -161,18 +161,20 @@ YYSTYPE DtCompilerlval;
>  /* handle locations */
>  
>  int DtCompilerParsercolumn = 1;
> +int DtLabelByteOffset = 0;
>  int DtCompilerParserByteOffset = 0;
>  
> +UINT32 DtTokenFirstLine = 0;
> +UINT32 DtTokenFirstColumn = 0;
> +
>  #define YY_USER_ACTION \
> -            DtCompilerParserlloc.first_line = DtCompilerParserlloc.last_line = DtCompilerParserlineno; \
> -            DtCompilerParserlloc.first_column = DtCompilerParsercolumn; \
> -            DtCompilerParserlloc.first_byte_offset = DtCompilerParserByteOffset; \
> -            DtCompilerParserlloc.last_column = DtCompilerParsercolumn + DtCompilerParserleng-1; \
> +            DtTokenFirstLine = DtCompilerParserlineno; \
> +            DtTokenFirstColumn = DtCompilerParsercolumn; \
>              DtCompilerParsercolumn += DtCompilerParserleng; \
>              DtCompilerParserByteOffset += DtCompilerParserleng; \
>              DbgPrint (ASL_PARSE_OUTPUT,\
> -                "user action occurred. DtCompilerParserlloc.first_line: %u offset: %u\n",\
> -                DtCompilerParserlloc.first_line, DtCompilerParserlloc.first_byte_offset);
> +                "user action occurred. DtCompilerParserlloc.first_line: %u\n",\
> +                DtTokenFirstLine);
>  %}
>  
>  %option nounput noinput yylineno
> @@ -236,7 +238,11 @@ CommentField    {LabelName}{WhiteSpace}*:{WhiteSpace}{Comment}?$
>      int size = strlen (DtCompilerParsertext);
>      s=UtLocalCacheCalloc (size + 1);
>      AcpiUtSafeStrncpy (s, DtCompilerParsertext, size + 1);
> -    DtCompilerParserlval.s = s;
> +    DtCompilerParserlval.u = (DT_TABLE_UNIT *) UtLocalCacheCalloc (sizeof (DT_TABLE_UNIT));
> +    DtCompilerParserlval.u->Value = s;
> +    DtCompilerParserlval.u->Line = DtCompilerParserlineno;
> +    DtCompilerParserlval.u->Column = DtCompilerParsercolumn;
> +    DtLabelByteOffset = DtCompilerParserByteOffset;
>      DbgPrint (ASL_PARSE_OUTPUT, "Label: %s\n", s);
>      return (DT_PARSEOP_LABEL);
>  }
> diff --git a/src/acpica/source/compiler/dtcompilerparser.y b/src/acpica/source/compiler/dtcompilerparser.y
> index ba9d2827..43eba4e9 100644
> --- a/src/acpica/source/compiler/dtcompilerparser.y
> +++ b/src/acpica/source/compiler/dtcompilerparser.y
> @@ -169,9 +169,13 @@ void                        DtCompilerParsererror (char const *msg);
>  extern char                 *DtCompilerParsertext;
>  extern DT_FIELD             *AslGbl_CurrentField;
>  
> +extern int                  DtLabelByteOffset;
>  extern UINT64               DtCompilerParserResult; /* Expression return value */
>  extern UINT64               DtCompilerParserlineno; /* Current line number */
>  
> +extern UINT32               DtTokenFirstLine;
> +extern UINT32               DtTokenFirstColumn;
> +
>  /* Bison/yacc configuration */
>  
>  #define yytname             DtCompilerParsername
> @@ -186,42 +190,30 @@ extern UINT64               DtCompilerParserlineno; /* Current line number */
>  
>  %}
>  
> -%code requires {
> -
> -    typedef struct YYLTYPE {
> -        int first_line;
> -        int last_line;
> -        int first_column;
> -        int last_column;
> -        int first_byte_offset;
> -    } YYLTYPE;
> -
> -    #define YYLTYPE_IS_DECLARED 1
> -}
> -
>  
>  %union {
>      char                *s;
>      DT_FIELD            *f;
> +    DT_TABLE_UNIT       *u;
>  }
>  
>  
>  %type  <f> Table
> -%token <s> DT_PARSEOP_DATA
> -%token <s> DT_PARSEOP_LABEL
> -%token <s> DT_PARSEOP_STRING_DATA
> -%token <s> DT_PARSEOP_LINE_CONTINUATION
> -%type  <s> Data
> -%type  <s> Datum
> -%type  <s> MultiLineData
> -%type  <s> MultiLineDataList
> +%token <u> DT_PARSEOP_DATA
> +%token <u> DT_PARSEOP_LABEL
> +%token <u> DT_PARSEOP_STRING_DATA
> +%token <u> DT_PARSEOP_LINE_CONTINUATION
> +%type  <u> Data
> +%type  <u> Datum
> +%type  <u> MultiLineData
> +%type  <u> MultiLineDataList
>  
>  
>  %%
>  
>  Table
>      :
> -    FieldList { DtCompilerParserResult = 5;}
> +    FieldList { }
>      ;
>  
>  FieldList
> @@ -230,7 +222,7 @@ FieldList
>      ;
>  
>  Field
> -    : DT_PARSEOP_LABEL ':' Data { DtCreateField ($1, $3, (@3).first_line, (@1).first_byte_offset, (@1).first_column, (@3).first_column); }
> +    : DT_PARSEOP_LABEL ':' Data { DtCreateField ($1, $3, DtLabelByteOffset); }
>      ;
>  
>  Data
> @@ -240,7 +232,7 @@ Data
>      ;
>  
>  MultiLineDataList
> -    : MultiLineDataList MultiLineData { $$ = AcpiUtStrcat(AcpiUtStrcat($1, " "), $2); } /* combine the strings with strcat */
> +    : MultiLineDataList MultiLineData { $$ = DtCreateTableUnit (AcpiUtStrcat(AcpiUtStrcat($1->Value, " "), $2->Value), $1->Line, $1->Column); } /* combine the strings with strcat */
>      | MultiLineData                   { $$ = $1; }
>      ;
>  
> @@ -249,8 +241,14 @@ MultiLineData
>      ;
>  
>  Datum
> -    : DT_PARSEOP_DATA        { DbgPrint (ASL_PARSE_OUTPUT, "parser        data: [%s]\n", DtCompilerParserlval.s); $$ = AcpiUtStrdup(DtCompilerParserlval.s); }
> -    | DT_PARSEOP_STRING_DATA { DbgPrint (ASL_PARSE_OUTPUT, "parser string data: [%s]\n", DtCompilerParserlval.s); $$ = AcpiUtStrdup(DtCompilerParserlval.s); }
> +    : DT_PARSEOP_DATA        {
> +                                 DbgPrint (ASL_PARSE_OUTPUT, "parser        data: [%s]\n", DtCompilerParserlval.s);
> +                                 $$ = DtCreateTableUnit (AcpiUtStrdup(DtCompilerParserlval.s), DtTokenFirstLine, DtTokenFirstColumn);
> +                             }
> +    | DT_PARSEOP_STRING_DATA {
> +                                 DbgPrint (ASL_PARSE_OUTPUT, "parser string data: [%s]\n", DtCompilerParserlval.s);
> +                                 $$ = DtCreateTableUnit (AcpiUtStrdup(DtCompilerParserlval.s), DtTokenFirstLine, DtTokenFirstColumn);
> +                             }
>      ;
>  
>  
> diff --git a/src/acpica/source/compiler/dtfield.c b/src/acpica/source/compiler/dtfield.c
> index 1f716761..18d44110 100644
> --- a/src/acpica/source/compiler/dtfield.c
> +++ b/src/acpica/source/compiler/dtfield.c
> @@ -576,6 +576,14 @@ DtCompileBuffer (
>  
>      StringValue = DtNormalizeBuffer (StringValue, &Count);
>      Substring = StringValue;
> +    if (Count != ByteLength)
> +    {
> +        sprintf(AslGbl_MsgBuffer,
> +            "Found %u values, must match expected count: %u",
> +            Count, ByteLength);
> +        DtError (ASL_ERROR, ASL_MSG_BUFFER_LIST, Field, AslGbl_MsgBuffer);
> +        goto Exit;
> +    }
>  
>      /* Each element of StringValue is now three chars (2 hex + 1 space) */
>  
> @@ -721,3 +729,122 @@ DtCompileFlag (
>  
>      *Buffer |= (UINT8) (Value << BitPosition);
>  }
> +
> +
> +/******************************************************************************
> + *
> + * FUNCTION:    DtCreateField
> + *
> + * PARAMETERS: Name
> + *             Value
> + *             Line
> + *             Offset
> + *             Column
> + *             NameColumn
> + *
> + * RETURN:     None
> + *
> + * DESCRIPTION: Create a field
> + *
> + *****************************************************************************/
> +
> +void
> +DtCreateField (
> +    DT_TABLE_UNIT           *FieldKey,
> +    DT_TABLE_UNIT           *FieldValue,
> +    UINT32                  Offset)
> +{
> +    DT_FIELD                *Field = UtFieldCacheCalloc ();
> +
> +
> +    Field->StringLength = 0;
> +    if (FieldKey->Value)
> +    {
> +        Field->Name =
> +            strcpy (UtLocalCacheCalloc (strlen (FieldKey->Value) + 1), FieldKey->Value);
> +    }
> +
> +    if (FieldValue->Value)
> +    {
> +        Field->StringLength = strlen (FieldValue->Value);
> +        Field->Value =
> +            strcpy (UtLocalCacheCalloc (Field->StringLength + 1), FieldValue->Value);
> +    }
> +
> +    Field->Line = FieldValue->Line;
> +    Field->ByteOffset = Offset;
> +    Field->NameColumn = FieldKey->Column;
> +    Field->Column = FieldValue->Column;
> +    DtLinkField (Field);
> +
> +    DtDumpFieldList (AslGbl_FieldList);
> +}
> +
> +
> +/******************************************************************************
> + *
> + * FUNCTION:    DtCreateTableUnit
> + *
> + * PARAMETERS: Data
> + *             Line
> + *             Column
> + *
> + * RETURN:     a table unit
> + *
> + * DESCRIPTION: Create a table unit
> + *
> + *****************************************************************************/
> +
> +DT_TABLE_UNIT *
> +DtCreateTableUnit (
> +    char                    *Data,
> +    UINT32                  Line,
> +    UINT32                  Column)
> +{
> +    DT_TABLE_UNIT           *Unit = (DT_TABLE_UNIT *) UtFieldCacheCalloc ();
> +
> +
> +    Unit->Value = Data;
> +    Unit->Line = Line;
> +    Unit->Column = Column;
> +    return (Unit);
> +}
> +
> +
> +/******************************************************************************
> + *
> + * FUNCTION:    DtLinkField
> + *
> + * PARAMETERS:  Field               - New field object to link
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Link one field name and value to the list
> + *
> + *****************************************************************************/
> +
> +void
> +DtLinkField (
> +    DT_FIELD                *Field)
> +{
> +    DT_FIELD                *Prev;
> +    DT_FIELD                *Next;
> +
> +
> +    Prev = Next = AslGbl_FieldList;
> +
> +    while (Next)
> +    {
> +        Prev = Next;
> +        Next = Next->Next;
> +    }
> +
> +    if (Prev)
> +    {
> +        Prev->Next = Field;
> +    }
> +    else
> +    {
> +        AslGbl_FieldList = Field;
> +    }
> +}
> diff --git a/src/acpica/source/compiler/dtio.c b/src/acpica/source/compiler/dtio.c
> index d027353c..b596fda8 100644
> --- a/src/acpica/source/compiler/dtio.c
> +++ b/src/acpica/source/compiler/dtio.c
> @@ -162,10 +162,6 @@ static char *
>  DtTrim (
>      char                    *String);
>  
> -static void
> -DtLinkField (
> -    DT_FIELD                *Field);
> -
>  static ACPI_STATUS
>  DtParseLine (
>      char                    *LineBuffer,
> @@ -297,45 +293,6 @@ DtTrim (
>  }
>  
>  
> -/******************************************************************************
> - *
> - * FUNCTION:    DtLinkField
> - *
> - * PARAMETERS:  Field               - New field object to link
> - *
> - * RETURN:      None
> - *
> - * DESCRIPTION: Link one field name and value to the list
> - *
> - *****************************************************************************/
> -
> -static void
> -DtLinkField (
> -    DT_FIELD                *Field)
> -{
> -    DT_FIELD                *Prev;
> -    DT_FIELD                *Next;
> -
> -
> -    Prev = Next = AslGbl_FieldList;
> -
> -    while (Next)
> -    {
> -        Prev = Next;
> -        Next = Next->Next;
> -    }
> -
> -    if (Prev)
> -    {
> -        Prev->Next = Field;
> -    }
> -    else
> -    {
> -        AslGbl_FieldList = Field;
> -    }
> -}
> -
> -
>  /******************************************************************************
>   *
>   * FUNCTION:    DtParseLine
> @@ -493,59 +450,6 @@ DtParseLine (
>  }
>  
>  
> -/******************************************************************************
> - *
> - * FUNCTION:    DtCreateField
> - *
> - * PARAMETERS: Name
> - *             Value
> - *             Line
> - *             Offset
> - *             Column
> - *             NameColumn
> - *
> - * RETURN:     None
> - *
> - * DESCRIPTION: Create a field
> - *
> - *****************************************************************************/
> -
> -void
> -DtCreateField (
> -    char                    *Name,
> -    char                    *Value,
> -    UINT32                  Line,
> -    UINT32                  Offset,
> -    UINT32                  Column,
> -    UINT32                  NameColumn)
> -{
> -    DT_FIELD                *Field = UtFieldCacheCalloc ();
> -
> -
> -    Field->StringLength = 0;
> -    if (Name)
> -    {
> -        Field->Name =
> -            strcpy (UtLocalCacheCalloc (strlen (Name) + 1), Name);
> -    }
> -
> -    if (Value)
> -    {
> -        Field->StringLength = strlen (Value);
> -        Field->Value =
> -            strcpy (UtLocalCacheCalloc (Field->StringLength + 1), Value);
> -    }
> -
> -    Field->Line = Line;
> -    Field->ByteOffset = Offset;
> -    Field->NameColumn = NameColumn;
> -    Field->Column = Column;
> -    DtLinkField (Field);
> -
> -    DtDumpFieldList (AslGbl_FieldList);
> -}
> -
> -
>  /******************************************************************************
>   *
>   * FUNCTION:    DtGetNextLine
> @@ -840,7 +744,6 @@ DtGetNextLine (
>  
>              case '\n':
>  
> -                CurrentLineOffset = AslGbl_NextLineOffset;
>                  AslGbl_NextLineOffset = (UINT32) ftell (Handle);
>                  AslGbl_CurrentLineNumber++;
>                  break;
> @@ -882,7 +785,6 @@ DtGetNextLine (
>  
>                  /* Ignore newline, this will merge the lines */
>  
> -                CurrentLineOffset = AslGbl_NextLineOffset;
>                  AslGbl_NextLineOffset = (UINT32) ftell (Handle);
>                  AslGbl_CurrentLineNumber++;
>                  State = DT_NORMAL_TEXT;
> diff --git a/src/acpica/source/compiler/dttable2.c b/src/acpica/source/compiler/dttable2.c
> index 04f48cc0..bbaaafaa 100644
> --- a/src/acpica/source/compiler/dttable2.c
> +++ b/src/acpica/source/compiler/dttable2.c
> @@ -1474,13 +1474,14 @@ DtCompileSdev (
>                          Namesp->DeviceIdOffset + Namesp->DeviceIdLength;
>                      Namesp->VendorDataLength =
>                          (UINT16) Subtable->Length;
> +
> +                    /* Final size of entire namespace structure */
> +
> +                    SdevHeader->Length = (UINT16)(sizeof(ACPI_SDEV_NAMESPACE) +
> +                        Subtable->Length + Namesp->DeviceIdLength);
>                  }
>              }
>  
> -            /* Final size of entire namespace structure */
> -
> -            SdevHeader->Length = (UINT16) (sizeof (ACPI_SDEV_NAMESPACE) +
> -                Subtable->Length + Namesp->DeviceIdLength);
>              break;
>  
>          case ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE:
> @@ -1620,7 +1621,9 @@ DtCompileSlit (
>      DT_SUBTABLE             *ParentTable;
>      DT_FIELD                **PFieldList = (DT_FIELD **) List;
>      DT_FIELD                *FieldList;
> +    DT_FIELD                *EndOfFieldList = NULL;
>      UINT32                  Localities;
> +    UINT32                  LocalityListLength;
>      UINT8                   *LocalityBuffer;
>  
>  
> @@ -1636,6 +1639,7 @@ DtCompileSlit (
>  
>      Localities = *ACPI_CAST_PTR (UINT32, Subtable->Buffer);
>      LocalityBuffer = UtLocalCalloc (Localities);
> +    LocalityListLength = 0;
>  
>      /* Compile each locality buffer */
>  
> @@ -1645,11 +1649,22 @@ DtCompileSlit (
>          DtCompileBuffer (LocalityBuffer,
>              FieldList->Value, FieldList, Localities);
>  
> +        LocalityListLength++;
>          DtCreateSubtable (LocalityBuffer, Localities, &Subtable);
>          DtInsertSubtable (ParentTable, Subtable);
> +        EndOfFieldList = FieldList;
>          FieldList = FieldList->Next;
>      }
>  
> +    if (LocalityListLength != Localities)
> +    {
> +        sprintf(AslGbl_MsgBuffer,
> +            "Found %u entries, must match LocalityCount: %u",
> +            LocalityListLength, Localities);
> +        DtError (ASL_ERROR, ASL_MSG_ENTRY_LIST, EndOfFieldList, AslGbl_MsgBuffer);
> +        return (AE_LIMIT);
> +    }
> +
>      ACPI_FREE (LocalityBuffer);
>      return (AE_OK);
>  }
> diff --git a/src/acpica/source/components/debugger/dbconvert.c b/src/acpica/source/components/debugger/dbconvert.c
> index 631e7e8f..6b58bf5f 100644
> --- a/src/acpica/source/components/debugger/dbconvert.c
> +++ b/src/acpica/source/components/debugger/dbconvert.c
> @@ -274,6 +274,10 @@ AcpiDbConvertToBuffer (
>      ACPI_STATUS             Status;
>  
>  
> +    /* Skip all preceding white space*/
> +
> +    AcpiUtRemoveWhitespace (&String);
> +
>      /* Generate the final buffer length */
>  
>      for (i = 0, Length = 0; String[i];)
> diff --git a/src/acpica/source/components/debugger/dbdisply.c b/src/acpica/source/components/debugger/dbdisply.c
> index 539ff5af..72bf1c6b 100644
> --- a/src/acpica/source/components/debugger/dbdisply.c
> +++ b/src/acpica/source/components/debugger/dbdisply.c
> @@ -713,7 +713,6 @@ AcpiDbDisplayResults (
>          return;
>      }
>  
> -    ObjDesc = WalkState->MethodDesc;
>      Node  = WalkState->MethodNode;
>  
>      if (WalkState->Results)
> @@ -773,7 +772,6 @@ AcpiDbDisplayCallingTree (
>          return;
>      }
>  
> -    Node = WalkState->MethodNode;
>      AcpiOsPrintf ("Current Control Method Call Tree\n");
>  
>      while (WalkState)
> diff --git a/src/acpica/source/components/debugger/dbfileio.c b/src/acpica/source/components/debugger/dbfileio.c
> index e937c3e4..7567fa75 100644
> --- a/src/acpica/source/components/debugger/dbfileio.c
> +++ b/src/acpica/source/components/debugger/dbfileio.c
> @@ -253,7 +253,7 @@ AcpiDbLoadTables (
>      {
>          Table = TableListHead->Table;
>  
> -        Status = AcpiLoadTable (Table);
> +        Status = AcpiLoadTable (Table, NULL);
>          if (ACPI_FAILURE (Status))
>          {
>              if (Status == AE_ALREADY_EXISTS)
> diff --git a/src/acpica/source/components/debugger/dbinput.c b/src/acpica/source/components/debugger/dbinput.c
> index d091d351..c854cb37 100644
> --- a/src/acpica/source/components/debugger/dbinput.c
> +++ b/src/acpica/source/components/debugger/dbinput.c
> @@ -208,6 +208,7 @@ enum AcpiExDebuggerCommands
>      CMD_EVALUATE,
>      CMD_EXECUTE,
>      CMD_EXIT,
> +    CMD_FIELDS,
>      CMD_FIND,
>      CMD_GO,
>      CMD_HANDLERS,
> @@ -287,6 +288,7 @@ static const ACPI_DB_COMMAND_INFO   AcpiGbl_DbCommands[] =
>      {"EVALUATE",     1},
>      {"EXECUTE",      1},
>      {"EXIT",         0},
> +    {"FIELDS",       1},
>      {"FIND",         1},
>      {"GO",           0},
>      {"HANDLERS",     0},
> @@ -360,6 +362,7 @@ static const ACPI_DB_COMMAND_HELP   AcpiGbl_DbCommandHelp[] =
>      {1, "  Find <AcpiName> (? is wildcard)",    "Find ACPI name(s) with wildcards\n"},
>      {1, "  Integrity",                          "Validate namespace integrity\n"},
>      {1, "  Methods",                            "Display list of loaded control methods\n"},
> +    {1, "  Fields <AddressSpaceId>",            "Display list of loaded field units by space ID\n"},
>      {1, "  Namespace [Object] [Depth]",         "Display loaded namespace tree/subtree\n"},
>      {1, "  Notify <Object> <Value>",            "Send a notification on Object\n"},
>      {1, "  Objects [ObjectType]",               "Display summary of all objects or just given type\n"},
> @@ -683,6 +686,22 @@ AcpiDbGetNextToken (
>          }
>          break;
>  
> +    case '{':
> +
> +        /* This is the start of a field unit, scan until closing brace */
> +
> +        String++;
> +        Start = String;
> +        Type = ACPI_TYPE_FIELD_UNIT;
> +
> +        /* Find end of buffer */
> +
> +        while (*String && (*String != '}'))
> +        {
> +            String++;
> +        }
> +        break;
> +
>      case '[':
>  
>          /* This is the start of a package, scan until closing bracket */
> @@ -877,6 +896,7 @@ AcpiDbCommandDispatch (
>      ACPI_PARSE_OBJECT       *Op)
>  {
>      UINT32                  Temp;
> +    UINT64                  Temp64;
>      UINT32                  CommandIndex;
>      UINT32                  ParamCount;
>      char                    *CommandLine;
> @@ -894,7 +914,6 @@ AcpiDbCommandDispatch (
>  
>      ParamCount = AcpiDbGetLine (InputBuffer);
>      CommandIndex = AcpiDbMatchCommand (AcpiGbl_DbArgs[0]);
> -    Temp = 0;
>  
>      /*
>       * We don't want to add the !! command to the history buffer. It
> @@ -993,6 +1012,21 @@ AcpiDbCommandDispatch (
>          Status = AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);
>          break;
>  
> +    case CMD_FIELDS:
> +
> +        Status = AcpiUtStrtoul64 (AcpiGbl_DbArgs[1], &Temp64);
> +
> +        if (ACPI_FAILURE (Status) || Temp64 >= ACPI_NUM_PREDEFINED_REGIONS)
> +        {
> +            AcpiOsPrintf (
> +                "Invalid adress space ID: must be between 0 and %u inclusive\n",
> +                ACPI_NUM_PREDEFINED_REGIONS - 1);
> +            return (AE_OK);
> +        }
> +
> +        Status = AcpiDbDisplayFields ((UINT32) Temp64);
> +        break;
> +
>      case CMD_GO:
>  
>          AcpiGbl_CmSingleStep = FALSE;
> diff --git a/src/acpica/source/components/debugger/dbmethod.c b/src/acpica/source/components/debugger/dbmethod.c
> index 6893c550..24c014f9 100644
> --- a/src/acpica/source/components/debugger/dbmethod.c
> +++ b/src/acpica/source/components/debugger/dbmethod.c
> @@ -515,6 +515,11 @@ AcpiDbDisassembleMethod (
>      WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
>  
>      Status = AcpiPsParseAml (WalkState);
> +    if (ACPI_FAILURE(Status))
> +    {
> +        return (Status);
> +    }
> +
>      (void) AcpiDmParseDeferredOps (Op);
>  
>      /* Now we can disassemble the method */
> diff --git a/src/acpica/source/components/debugger/dbnames.c b/src/acpica/source/components/debugger/dbnames.c
> index 2c9af4be..ac366ab0 100644
> --- a/src/acpica/source/components/debugger/dbnames.c
> +++ b/src/acpica/source/components/debugger/dbnames.c
> @@ -154,6 +154,7 @@
>  #include "acnamesp.h"
>  #include "acdebug.h"
>  #include "acpredef.h"
> +#include "acinterp.h"
>  
>  
>  #define _COMPONENT          ACPI_CA_DEBUGGER
> @@ -722,6 +723,91 @@ AcpiDbWalkForObjectCounts (
>  }
>  
>  
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiDbWalkForFields
> + *
> + * PARAMETERS:  Callback from WalkNamespace
> + *
> + * RETURN:      Status
> + *
> + * DESCRIPTION: Display short info about objects in the namespace
> + *
> + ******************************************************************************/
> +
> +static ACPI_STATUS
> +AcpiDbWalkForFields (
> +    ACPI_HANDLE             ObjHandle,
> +    UINT32                  NestingLevel,
> +    void                    *Context,
> +    void                    **ReturnValue)
> +{
> +    ACPI_OBJECT             *RetValue;
> +    ACPI_REGION_WALK_INFO   *Info = (ACPI_REGION_WALK_INFO *) Context;
> +    ACPI_BUFFER             Buffer;
> +    ACPI_STATUS             Status;
> +    ACPI_NAMESPACE_NODE     *Node = AcpiNsValidateHandle (ObjHandle);
> +
> +
> +    if (!Node)
> +    {
> +       return (AE_OK);
> +    }
> +    if (Node->Object->Field.RegionObj->Region.SpaceId != Info->AddressSpaceId)
> +    {
> +       return (AE_OK);
> +    }
> +
> +    Info->Count++;
> +
> +    /* Get and display the full pathname to this object */
> +
> +    Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
> +    Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, TRUE);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        AcpiOsPrintf ("Could Not get pathname for object %p\n", ObjHandle);
> +        return (AE_OK);
> +    }
> +
> +    AcpiOsPrintf ("%s ", (char *) Buffer.Pointer);
> +    ACPI_FREE (Buffer.Pointer);
> +
> +    Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
> +    AcpiEvaluateObject (ObjHandle, NULL, NULL, &Buffer);
> +
> +    /*
> +     * Since this is a field unit, surround the output in braces
> +     */
> +    AcpiOsPrintf ("{");
> +
> +    RetValue = (ACPI_OBJECT *) Buffer.Pointer;
> +    switch (RetValue->Type)
> +    {
> +        case ACPI_TYPE_INTEGER:
> +
> +            AcpiOsPrintf ("%8.8X%8.8X", ACPI_FORMAT_UINT64 (RetValue->Integer.Value));
> +            break;
> +
> +        case ACPI_TYPE_BUFFER:
> +
> +            AcpiUtDumpBuffer (RetValue->Buffer.Pointer,
> +                RetValue->Buffer.Length, DB_DISPLAY_DATA_ONLY | DB_BYTE_DISPLAY, 0);
> +            break;
> +
> +        default:
> +
> +            break;
> +    }
> +
> +    AcpiOsPrintf ("}\n");
> +
> +    ACPI_FREE (Buffer.Pointer);
> +    return (AE_OK);
> +}
> +
> +
> +
>  /*******************************************************************************
>   *
>   * FUNCTION:    AcpiDbWalkForSpecificObjects
> @@ -857,6 +943,42 @@ AcpiDbDisplayObjects (
>  }
>  
>  
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiDbDisplayFields
> + *
> + * PARAMETERS:  ObjTypeArg          - Type of object to display
> + *              DisplayCountArg     - Max depth to display
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Display objects in the namespace of the requested type
> + *
> + ******************************************************************************/
> +
> +ACPI_STATUS
> +AcpiDbDisplayFields (
> +    UINT32                  AddressSpaceId)
> +{
> +    ACPI_REGION_WALK_INFO  Info;
> +
> +
> +    Info.Count = 0;
> +    Info.OwnerId = ACPI_OWNER_ID_MAX;
> +    Info.DebugLevel = ACPI_UINT32_MAX;
> +    Info.DisplayType = ACPI_DISPLAY_SUMMARY | ACPI_DISPLAY_SHORT;
> +    Info.AddressSpaceId = AddressSpaceId;
> +
> +    /* Walk the namespace from the root */
> +
> +    (void) AcpiWalkNamespace (ACPI_TYPE_LOCAL_REGION_FIELD, ACPI_ROOT_OBJECT,
> +          ACPI_UINT32_MAX, AcpiDbWalkForFields, NULL,
> +          (void *) &Info, NULL);
> +
> +    return (AE_OK);
> +}
> +
> +
>  /*******************************************************************************
>   *
>   * FUNCTION:    AcpiDbIntegrityWalk
> diff --git a/src/acpica/source/components/debugger/dbobject.c b/src/acpica/source/components/debugger/dbobject.c
> index cebf4420..cffa0a53 100644
> --- a/src/acpica/source/components/debugger/dbobject.c
> +++ b/src/acpica/source/components/debugger/dbobject.c
> @@ -649,7 +649,6 @@ AcpiDbDecodeArguments (
>  
>  
>      Node = WalkState->MethodNode;
> -    ObjDesc = WalkState->MethodDesc;
>  
>      /* There are no arguments for the module-level code case */
>  
> diff --git a/src/acpica/source/components/disassembler/dmdeferred.c b/src/acpica/source/components/disassembler/dmdeferred.c
> index d0753bb0..d0a589c9 100644
> --- a/src/acpica/source/components/disassembler/dmdeferred.c
> +++ b/src/acpica/source/components/disassembler/dmdeferred.c
> @@ -309,6 +309,10 @@ AcpiDmDeferredParse (
>      WalkState->ParseFlags &= ~ACPI_PARSE_DELETE_TREE;
>      WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
>      Status = AcpiPsParseAml (WalkState);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        return_ACPI_STATUS(Status);
> +    }
>  
>      StartOp = (Op->Common.Value.Arg)->Common.Next;
>      SearchOp = StartOp;
> diff --git a/src/acpica/source/components/disassembler/dmresrc.c b/src/acpica/source/components/disassembler/dmresrc.c
> index bb36b734..c2e85b8a 100644
> --- a/src/acpica/source/components/disassembler/dmresrc.c
> +++ b/src/acpica/source/components/disassembler/dmresrc.c
> @@ -441,7 +441,6 @@ AcpiDmResourceTemplate (
>                   * missing EndDependentDescriptor.
>                   */
>                  Level--;
> -                DependentFns = FALSE;
>  
>                  /* Go ahead and insert EndDependentFn() */
>  
> diff --git a/src/acpica/source/components/disassembler/dmwalk.c b/src/acpica/source/components/disassembler/dmwalk.c
> index 8ec8728e..97b33039 100644
> --- a/src/acpica/source/components/disassembler/dmwalk.c
> +++ b/src/acpica/source/components/disassembler/dmwalk.c
> @@ -957,7 +957,6 @@ AcpiDmDescendingOp (
>                   * the buffer size Op. Open up a new block
>                   */
>                  NextOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
> -                NextOp = NextOp->Common.Next;
>                  ASL_CV_CLOSE_PAREN (Op, Level);
>  
>                  /* Emit description comment for Name() with a predefined ACPI name */
> diff --git a/src/acpica/source/components/dispatcher/dscontrol.c b/src/acpica/source/components/dispatcher/dscontrol.c
> index 238c77bb..85b4679e 100644
> --- a/src/acpica/source/components/dispatcher/dscontrol.c
> +++ b/src/acpica/source/components/dispatcher/dscontrol.c
> @@ -235,7 +235,7 @@ AcpiDsExecBeginControlOp (
>          ControlState->Control.Opcode =
>              Op->Common.AmlOpcode;
>          ControlState->Control.LoopTimeout = AcpiOsGetTimer () +
> -           (UINT64) (AcpiGbl_MaxLoopIterations * ACPI_100NSEC_PER_SEC);
> +           ((UINT64) AcpiGbl_MaxLoopIterations * ACPI_100NSEC_PER_SEC);
>  
>          /* Push the control state on this walk's control stack */
>  
> diff --git a/src/acpica/source/components/dispatcher/dsfield.c b/src/acpica/source/components/dispatcher/dsfield.c
> index 3aff4db1..5477686f 100644
> --- a/src/acpica/source/components/dispatcher/dsfield.c
> +++ b/src/acpica/source/components/dispatcher/dsfield.c
> @@ -309,7 +309,6 @@ AcpiDsCreateBufferField (
>      if (WalkState->DeferredNode)
>      {
>          Node = WalkState->DeferredNode;
> -        Status = AE_OK;
>      }
>      else
>      {
> @@ -435,7 +434,6 @@ AcpiDsGetFieldNames (
>      ACPI_PARSE_OBJECT       *Child;
>  
>  #ifdef ACPI_EXEC_APP
> -    UINT64                  Value = 0;
>      ACPI_OPERAND_OBJECT     *ResultDesc;
>      ACPI_OPERAND_OBJECT     *ObjDesc;
>      char                    *NamePath;
> @@ -577,14 +575,13 @@ AcpiDsGetFieldNames (
>                      }
>  #ifdef ACPI_EXEC_APP
>                      NamePath = AcpiNsGetExternalPathname (Info->FieldNode);
> -                    ObjDesc = AcpiUtCreateIntegerObject (Value);
> -                    if (ACPI_SUCCESS (AeLookupInitFileEntry (NamePath, &Value)))
> +                    if (ACPI_SUCCESS (AeLookupInitFileEntry (NamePath, &ObjDesc)))
>                      {
>                          AcpiExWriteDataToField (ObjDesc,
>                              AcpiNsGetAttachedObject (Info->FieldNode),
>                              &ResultDesc);
> +                        AcpiUtRemoveReference (ObjDesc);
>                      }
> -                    AcpiUtRemoveReference (ObjDesc);
>                      ACPI_FREE (NamePath);
>  #endif
>                  }
> @@ -813,8 +810,6 @@ AcpiDsInitFieldObjects (
>                  }
>  
>                  /* Name already exists, just ignore this error */
> -
> -                Status = AE_OK;
>              }
>  
>              Arg->Common.Node = Node;
> diff --git a/src/acpica/source/components/events/evgpeblk.c b/src/acpica/source/components/events/evgpeblk.c
> index 80157dcd..e0e2780f 100644
> --- a/src/acpica/source/components/events/evgpeblk.c
> +++ b/src/acpica/source/components/events/evgpeblk.c
> @@ -272,6 +272,10 @@ AcpiEvDeleteGpeBlock (
>      /* Disable all GPEs in this block */
>  
>      Status = AcpiHwDisableGpeBlock (GpeBlock->XruptBlock, GpeBlock, NULL);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        return_ACPI_STATUS (Status);
> +    }
>  
>      if (!GpeBlock->Previous && !GpeBlock->Next)
>      {
> @@ -542,7 +546,7 @@ AcpiEvCreateGpeBlock (
>      WalkInfo.GpeDevice = GpeDevice;
>      WalkInfo.ExecuteByOwnerId = FALSE;
>  
> -    Status = AcpiNsWalkNamespace (ACPI_TYPE_METHOD, GpeDevice,
> +    (void) AcpiNsWalkNamespace (ACPI_TYPE_METHOD, GpeDevice,
>          ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK,
>          AcpiEvMatchGpeMethod, NULL, &WalkInfo, NULL);
>  
> diff --git a/src/acpica/source/components/events/evgpeinit.c b/src/acpica/source/components/events/evgpeinit.c
> index b7e02a06..7e3c766c 100644
> --- a/src/acpica/source/components/events/evgpeinit.c
> +++ b/src/acpica/source/components/events/evgpeinit.c
> @@ -302,8 +302,6 @@ AcpiEvGpeInitialize (
>               * GPE0 and GPE1 do not have to be contiguous in the GPE number
>               * space. However, GPE0 always starts at GPE number zero.
>               */
> -            GpeNumberMax = AcpiGbl_FADT.Gpe1Base +
> -                ((RegisterCount1 * ACPI_GPE_REGISTER_WIDTH) - 1);
>          }
>      }
>  
> @@ -315,7 +313,6 @@ AcpiEvGpeInitialize (
>  
>          ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
>              "There are no GPE blocks defined in the FADT\n"));
> -        Status = AE_OK;
>          goto Cleanup;
>      }
>  
> diff --git a/src/acpica/source/components/events/evmisc.c b/src/acpica/source/components/events/evmisc.c
> index f73cc2f3..68f1dc8a 100644
> --- a/src/acpica/source/components/events/evmisc.c
> +++ b/src/acpica/source/components/events/evmisc.c
> @@ -400,11 +400,16 @@ AcpiEvTerminate (
>          /* Disable all GPEs in all GPE blocks */
>  
>          Status = AcpiEvWalkGpeList (AcpiHwDisableGpeBlock, NULL);
> +        if (ACPI_FAILURE (Status))
> +        {
> +            ACPI_EXCEPTION ((AE_INFO, Status,
> +                "Could not disable GPEs in GPE block"));
> +        }
>  
>          Status = AcpiEvRemoveGlobalLockHandler ();
> -        if (ACPI_FAILURE(Status))
> +        if (ACPI_FAILURE (Status))
>          {
> -            ACPI_ERROR ((AE_INFO,
> +            ACPI_EXCEPTION ((AE_INFO, Status,
>                  "Could not remove Global Lock handler"));
>          }
>  
> @@ -414,7 +419,7 @@ AcpiEvTerminate (
>      /* Remove SCI handlers */
>  
>      Status = AcpiEvRemoveAllSciHandlers ();
> -    if (ACPI_FAILURE(Status))
> +    if (ACPI_FAILURE (Status))
>      {
>          ACPI_ERROR ((AE_INFO,
>              "Could not remove SCI handler"));
> @@ -423,6 +428,12 @@ AcpiEvTerminate (
>      /* Deallocate all handler objects installed within GPE info structs */
>  
>      Status = AcpiEvWalkGpeList (AcpiEvDeleteGpeHandlers, NULL);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        ACPI_EXCEPTION ((AE_INFO, Status,
> +            "Could not delete GPE handlers"));
> +    }
> +
>  
>      /* Return to original mode if necessary */
>  
> diff --git a/src/acpica/source/components/events/evregion.c b/src/acpica/source/components/events/evregion.c
> index 6f6d7ccc..13a20918 100644
> --- a/src/acpica/source/components/events/evregion.c
> +++ b/src/acpica/source/components/events/evregion.c
> @@ -1037,11 +1037,11 @@ AcpiEvOrphanEcRegMethod (
>      Objects[1].Type = ACPI_TYPE_INTEGER;
>      Objects[1].Integer.Value = ACPI_REG_CONNECT;
>  
> -    Status = AcpiEvaluateObject (RegMethod, NULL, &Args, NULL);
> +    (void) AcpiEvaluateObject (RegMethod, NULL, &Args, NULL);
>  
>  Exit:
>      /* We ignore all errors from above, don't care */
>  
> -    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
> +    (void) AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
>      return_VOID;
>  }
> diff --git a/src/acpica/source/components/events/evrgnini.c b/src/acpica/source/components/events/evrgnini.c
> index 718e2e87..3c865c59 100644
> --- a/src/acpica/source/components/events/evrgnini.c
> +++ b/src/acpica/source/components/events/evrgnini.c
> @@ -363,7 +363,6 @@ AcpiEvPciConfigRegionSetup (
>                           * root bridge. Still need to return a context object
>                           * for the new PCI_Config operation region, however.
>                           */
> -                        Status = AE_OK;
>                      }
>                      else
>                      {
> diff --git a/src/acpica/source/components/hardware/hwxfsleep.c b/src/acpica/source/components/hardware/hwxfsleep.c
> index 3df8f5a5..78dc1902 100644
> --- a/src/acpica/source/components/hardware/hwxfsleep.c
> +++ b/src/acpica/source/components/hardware/hwxfsleep.c
> @@ -357,6 +357,10 @@ AcpiEnterSleepStateS4bios (
>  
>      Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
>          (UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        return_ACPI_STATUS (Status);
> +    }
>  
>      do {
>          AcpiOsStall (ACPI_USEC_PER_MSEC);
> diff --git a/src/acpica/source/components/namespace/nsconvert.c b/src/acpica/source/components/namespace/nsconvert.c
> index d2b32d25..ae590490 100644
> --- a/src/acpica/source/components/namespace/nsconvert.c
> +++ b/src/acpica/source/components/namespace/nsconvert.c
> @@ -670,5 +670,5 @@ AcpiNsConvertToReference (
>  ErrorExit:
>      ACPI_FREE (Name);
>      *ReturnObject = NewObject;
> -    return (AE_OK);
> +    return (Status);
>  }
> diff --git a/src/acpica/source/components/namespace/nsdump.c b/src/acpica/source/components/namespace/nsdump.c
> index 8a2a7e92..0ed4d72c 100644
> --- a/src/acpica/source/components/namespace/nsdump.c
> +++ b/src/acpica/source/components/namespace/nsdump.c
> @@ -478,7 +478,7 @@ AcpiNsDumpOneObject (
>                      AcpiOsPrintf (" =");
>                      for (i = 0; (i < ObjDesc->Buffer.Length && i < 12); i++)
>                      {
> -                        AcpiOsPrintf (" %.2hX", ObjDesc->Buffer.Pointer[i]);
> +                        AcpiOsPrintf (" %2.2X", ObjDesc->Buffer.Pointer[i]);
>                      }
>                  }
>                  AcpiOsPrintf ("\n");
> @@ -575,7 +575,7 @@ AcpiNsDumpOneObject (
>          case ACPI_TYPE_LOCAL_BANK_FIELD:
>          case ACPI_TYPE_LOCAL_INDEX_FIELD:
>  
> -            AcpiOsPrintf (" Off %.3X Len %.2X Acc %.2hd\n",
> +            AcpiOsPrintf (" Off %.3X Len %.2X Acc %.2X\n",
>                  (ObjDesc->CommonField.BaseByteOffset * 8)
>                      + ObjDesc->CommonField.StartFieldBitOffset,
>                  ObjDesc->CommonField.BitLength,
> @@ -760,8 +760,6 @@ AcpiNsDumpOneObject (
>  
>              goto Cleanup;
>          }
> -
> -        ObjType = ACPI_TYPE_INVALID;   /* Terminate loop after next pass */
>      }
>  
>  Cleanup:
> diff --git a/src/acpica/source/components/namespace/nsxfname.c b/src/acpica/source/components/namespace/nsxfname.c
> index 7332a92f..85be591f 100644
> --- a/src/acpica/source/components/namespace/nsxfname.c
> +++ b/src/acpica/source/components/namespace/nsxfname.c
> @@ -611,7 +611,7 @@ AcpiGetObjectInfo (
>  
>      if (Cls)
>      {
> -        NextIdString = AcpiNsCopyDeviceId (&Info->ClassCode,
> +       (void) AcpiNsCopyDeviceId (&Info->ClassCode,
>              Cls, NextIdString);
>      }
>  
> diff --git a/src/acpica/source/components/parser/psobject.c b/src/acpica/source/components/parser/psobject.c
> index 61c3a868..6ceb7d91 100644
> --- a/src/acpica/source/components/parser/psobject.c
> +++ b/src/acpica/source/components/parser/psobject.c
> @@ -652,7 +652,7 @@ AcpiPsCompleteOp (
>              WalkState->Opcode = (*Op)->Common.AmlOpcode;
>  
>              Status = WalkState->AscendingCallback (WalkState);
> -            Status = AcpiPsNextParseState (WalkState, *Op, Status);
> +            (void) AcpiPsNextParseState (WalkState, *Op, Status);
>  
>              Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
>              if (ACPI_FAILURE (Status2))
> @@ -661,7 +661,6 @@ AcpiPsCompleteOp (
>              }
>          }
>  
> -        Status = AE_OK;
>          break;
>  
>      case AE_CTRL_BREAK:
> @@ -682,7 +681,7 @@ AcpiPsCompleteOp (
>          WalkState->Opcode = (*Op)->Common.AmlOpcode;
>  
>          Status = WalkState->AscendingCallback (WalkState);
> -        Status = AcpiPsNextParseState (WalkState, *Op, Status);
> +        (void) AcpiPsNextParseState (WalkState, *Op, Status);
>  
>          Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
>          if (ACPI_FAILURE (Status2))
> @@ -690,7 +689,6 @@ AcpiPsCompleteOp (
>              return_ACPI_STATUS (Status2);
>          }
>  
> -        Status = AE_OK;
>          break;
>  
>      case AE_CTRL_TERMINATE:
> diff --git a/src/acpica/source/components/resources/rscreate.c b/src/acpica/source/components/resources/rscreate.c
> index 26640c20..172bc55f 100644
> --- a/src/acpica/source/components/resources/rscreate.c
> +++ b/src/acpica/source/components/resources/rscreate.c
> @@ -481,6 +481,10 @@ AcpiRsCreatePciRoutingTable (
>  
>                  Status = AcpiNsHandleToPathname (
>                      (ACPI_HANDLE) Node, &PathBuffer, FALSE);
> +                if (ACPI_FAILURE (Status))
> +                {
> +                    return_ACPI_STATUS (Status);
> +                }
>  
>                  /* +1 to include null terminator */
>  
> diff --git a/src/acpica/source/components/tables/tbdata.c b/src/acpica/source/components/tables/tbdata.c
> index 84dd25bd..6eb1f24a 100644
> --- a/src/acpica/source/components/tables/tbdata.c
> +++ b/src/acpica/source/components/tables/tbdata.c
> @@ -1190,6 +1190,10 @@ AcpiTbLoadTable (
>      }
>  
>      Status = AcpiNsLoadTable (TableIndex, ParentNode);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        return_ACPI_STATUS (Status);
> +    }
>  
>      /*
>       * Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is
> diff --git a/src/acpica/source/components/tables/tbxfload.c b/src/acpica/source/components/tables/tbxfload.c
> index 1e17db6c..24daafcf 100644
> --- a/src/acpica/source/components/tables/tbxfload.c
> +++ b/src/acpica/source/components/tables/tbxfload.c
> @@ -445,6 +445,8 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInstallTable)
>   *
>   * PARAMETERS:  Table               - Pointer to a buffer containing the ACPI
>   *                                    table to be loaded.
> + *              TableIdx            - Pointer to a UINT32 for storing the table
> + *                                    index, might be NULL
>   *
>   * RETURN:      Status
>   *
> @@ -458,7 +460,8 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInstallTable)
>  
>  ACPI_STATUS
>  AcpiLoadTable (
> -    ACPI_TABLE_HEADER       *Table)
> +    ACPI_TABLE_HEADER       *Table,
> +    UINT32                  *TableIdx)
>  {
>      ACPI_STATUS             Status;
>      UINT32                  TableIndex;
> @@ -479,6 +482,11 @@ AcpiLoadTable (
>      ACPI_INFO (("Host-directed Dynamic ACPI Table Load:"));
>      Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table),
>          ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, FALSE, &TableIndex);
> +    if (TableIdx)
> +    {
> +        *TableIdx = TableIndex;
> +    }
> +
>      if (ACPI_SUCCESS (Status))
>      {
>          /* Complete the initialization/resolution of new objects */
> @@ -582,3 +590,42 @@ AcpiUnloadParentTable (
>  }
>  
>  ACPI_EXPORT_SYMBOL (AcpiUnloadParentTable)
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiUnloadTable
> + *
> + * PARAMETERS:  TableIndex          - Index as returned by AcpiLoadTable
> + *
> + * RETURN:      Status
> + *
> + * DESCRIPTION: Via the TableIndex representing an SSDT or OEMx table, unloads
> + *              the table and deletes all namespace objects associated with
> + *              that table. Unloading of the DSDT is not allowed.
> + *              Note: Mainly intended to support hotplug removal of SSDTs.
> + *
> + ******************************************************************************/
> +
> +ACPI_STATUS
> +AcpiUnloadTable (
> +    UINT32                  TableIndex)
> +{
> +    ACPI_STATUS             Status;
> +
> +
> +    ACPI_FUNCTION_TRACE (AcpiUnloadTable);
> +
> +
> +    if (TableIndex == 1)
> +    {
> +        /* TableIndex==1 means DSDT is the owner. DSDT cannot be unloaded */
> +
> +        return_ACPI_STATUS (AE_TYPE);
> +    }
> +
> +    Status = AcpiTbUnloadTable (TableIndex);
> +    return_ACPI_STATUS (Status);
> +}
> +
> +ACPI_EXPORT_SYMBOL (AcpiUnloadTable)
> diff --git a/src/acpica/source/components/utilities/utbuffer.c b/src/acpica/source/components/utilities/utbuffer.c
> index 44fd30a6..015c16f9 100644
> --- a/src/acpica/source/components/utilities/utbuffer.c
> +++ b/src/acpica/source/components/utilities/utbuffer.c
> @@ -186,8 +186,10 @@ AcpiUtDumpBuffer (
>      UINT32                  j;
>      UINT32                  Temp32;
>      UINT8                   BufChar;
> +    UINT32                  DisplayDataOnly = Display & DB_DISPLAY_DATA_ONLY;
>  
>  
> +    Display &= ~DB_DISPLAY_DATA_ONLY;
>      if (!Buffer)
>      {
>          AcpiOsPrintf ("Null Buffer Pointer in DumpBuffer!\n");
> @@ -205,7 +207,10 @@ AcpiUtDumpBuffer (
>      {
>          /* Print current offset */
>  
> -        AcpiOsPrintf ("%8.4X: ", (BaseOffset + i));
> +        if (!DisplayDataOnly)
> +        {
> +            AcpiOsPrintf ("%8.4X: ", (BaseOffset + i));
> +        }
>  
>          /* Print 16 hex chars */
>  
> @@ -257,38 +262,41 @@ AcpiUtDumpBuffer (
>           * Print the ASCII equivalent characters but watch out for the bad
>           * unprintable ones (printable chars are 0x20 through 0x7E)
>           */
> -        AcpiOsPrintf (" ");
> -        for (j = 0; j < 16; j++)
> +        if (!DisplayDataOnly)
>          {
> -            if (i + j >= Count)
> +            AcpiOsPrintf (" ");
> +            for (j = 0; j < 16; j++)
>              {
> -                AcpiOsPrintf ("\n");
> -                return;
> +                if (i + j >= Count)
> +                {
> +                    AcpiOsPrintf ("\n");
> +                    return;
> +                }
> +
> +                /*
> +                 * Add comment characters so rest of line is ignored when
> +                 * compiled
> +                 */
> +                if (j == 0)
> +                {
> +                    AcpiOsPrintf ("// ");
> +                }
> +
> +                BufChar = Buffer[(ACPI_SIZE) i + j];
> +                if (isprint (BufChar))
> +                {
> +                    AcpiOsPrintf ("%c", BufChar);
> +                }
> +                else
> +                {
> +                    AcpiOsPrintf (".");
> +                }
>              }
>  
> -            /*
> -             * Add comment characters so rest of line is ignored when
> -             * compiled
> -             */
> -            if (j == 0)
> -            {
> -                AcpiOsPrintf ("// ");
> -            }
> +            /* Done with that line. */
>  
> -            BufChar = Buffer[(ACPI_SIZE) i + j];
> -            if (isprint (BufChar))
> -            {
> -                AcpiOsPrintf ("%c", BufChar);
> -            }
> -            else
> -            {
> -                AcpiOsPrintf (".");
> -            }
> +            AcpiOsPrintf ("\n");
>          }
> -
> -        /* Done with that line. */
> -
> -        AcpiOsPrintf ("\n");
>          i += 16;
>      }
>  
> diff --git a/src/acpica/source/components/utilities/utids.c b/src/acpica/source/components/utilities/utids.c
> index 5fcfbf66..513548c2 100644
> --- a/src/acpica/source/components/utilities/utids.c
> +++ b/src/acpica/source/components/utilities/utids.c
> @@ -466,7 +466,8 @@ AcpiUtExecute_CID (
>          {
>              /* Copy the String CID from the returned object */
>  
> -            strcpy (NextIdString, CidObjects[i]->String.Pointer);
> +            AcpiUtSafeStrcpy (NextIdString, CidObjects[i]->String.Length + 1,
> +                CidObjects[i]->String.Pointer);
>              Length = CidObjects[i]->String.Length + 1;
>          }
>  
> diff --git a/src/acpica/source/components/utilities/uttrack.c b/src/acpica/source/components/utilities/uttrack.c
> index c6e6b45b..76e439fe 100644
> --- a/src/acpica/source/components/utilities/uttrack.c
> +++ b/src/acpica/source/components/utilities/uttrack.c
> @@ -864,7 +864,7 @@ AcpiUtDumpAllocations (
>  
>                      case ACPI_DESC_TYPE_PARSER:
>  
> -                        AcpiOsPrintf ("AmlOpcode 0x%04hX\n",
> +                        AcpiOsPrintf ("AmlOpcode 0x%04X\n",
>                              Descriptor->Op.Asl.AmlOpcode);
>                          break;
>  
> diff --git a/src/acpica/source/include/acdebug.h b/src/acpica/source/include/acdebug.h
> index 4e43bbee..f296cb94 100644
> --- a/src/acpica/source/include/acdebug.h
> +++ b/src/acpica/source/include/acdebug.h
> @@ -392,6 +392,10 @@ void
>  AcpiDbGetBusInfo (
>      void);
>  
> +ACPI_STATUS
> +AcpiDbDisplayFields (
> +    UINT32                  AddressSpaceId);
> +
>  
>  /*
>   * dbdisply - debug display commands
> diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
> index a123eed7..62e37909 100644
> --- a/src/acpica/source/include/acpixf.h
> +++ b/src/acpica/source/include/acpixf.h
> @@ -154,7 +154,7 @@
>  
>  /* Current ACPICA subsystem version in YYYYMMDD format */
>  
> -#define ACPI_CA_VERSION                 0x20190816
> +#define ACPI_CA_VERSION                 0x20191018
>  
>  #include "acconfig.h"
>  #include "actypes.h"
> @@ -664,7 +664,13 @@ AcpiInstallTable (
>  ACPI_EXTERNAL_RETURN_STATUS (
>  ACPI_STATUS
>  AcpiLoadTable (
> -    ACPI_TABLE_HEADER       *Table))
> +    ACPI_TABLE_HEADER       *Table,
> +    UINT32                  *TableIdx))
> +
> +ACPI_EXTERNAL_RETURN_STATUS (
> +ACPI_STATUS
> +AcpiUnloadTable (
> +    UINT32                  TableIndex))
>  
>  ACPI_EXTERNAL_RETURN_STATUS (
>  ACPI_STATUS
> diff --git a/src/acpica/source/include/acstruct.h b/src/acpica/source/include/acstruct.h
> index f81c8a7d..e6ab1d90 100644
> --- a/src/acpica/source/include/acstruct.h
> +++ b/src/acpica/source/include/acstruct.h
> @@ -357,6 +357,19 @@ typedef struct acpi_device_walk_info
>  } ACPI_DEVICE_WALK_INFO;
>  
>  
> +/* Info used by Acpi  AcpiDbDisplayFields */
> +
> +typedef struct acpi_region_walk_info
> +{
> +    UINT32                          DebugLevel;
> +    UINT32                          Count;
> +    ACPI_OWNER_ID                   OwnerId;
> +    UINT8                           DisplayType;
> +    UINT32                          AddressSpaceId;
> +
> +} ACPI_REGION_WALK_INFO;
> +
> +
>  /* TBD: [Restructure] Merge with struct above */
>  
>  typedef struct acpi_walk_info
> diff --git a/src/acpica/source/include/acutils.h b/src/acpica/source/include/acutils.h
> index 0c2327d2..6352b5ff 100644
> --- a/src/acpica/source/include/acutils.h
> +++ b/src/acpica/source/include/acutils.h
> @@ -290,10 +290,11 @@ typedef struct acpi_pkg_info
>  
>  /* AcpiUtDumpBuffer */
>  
> -#define DB_BYTE_DISPLAY     1
> -#define DB_WORD_DISPLAY     2
> -#define DB_DWORD_DISPLAY    4
> -#define DB_QWORD_DISPLAY    8
> +#define DB_BYTE_DISPLAY      0x01
> +#define DB_WORD_DISPLAY      0x02
> +#define DB_DWORD_DISPLAY     0x04
> +#define DB_QWORD_DISPLAY     0x08
> +#define DB_DISPLAY_DATA_ONLY 0x10
>  
>  
>  /*
> diff --git a/src/acpica/source/tools/acpiexec/aecommon.h b/src/acpica/source/tools/acpiexec/aecommon.h
> index 602356de..257632f7 100644
> --- a/src/acpica/source/tools/acpiexec/aecommon.h
> +++ b/src/acpica/source/tools/acpiexec/aecommon.h
> @@ -195,7 +195,8 @@ typedef struct ae_debug_regions
>  typedef struct init_file_entry
>  {
>      char                    *Name;
> -    UINT64                  Value;
> +    ACPI_OPERAND_OBJECT     *ObjDesc;
> +
>  } INIT_FILE_ENTRY;
>  
>  extern BOOLEAN              AcpiGbl_UseLocalFaultHandler;
> @@ -356,7 +357,7 @@ AeSetupConfiguration (
>  ACPI_STATUS
>  AeLookupInitFileEntry (
>      char                    *Pathname,
> -    UINT64                  *Value);
> +    ACPI_OPERAND_OBJECT     **ObjDesc);
>  
>  /* aeexec */
>  
> diff --git a/src/acpica/source/tools/acpiexec/aehandlers.c b/src/acpica/source/tools/acpiexec/aehandlers.c
> index 75e8eb0a..f7dd012e 100644
> --- a/src/acpica/source/tools/acpiexec/aehandlers.c
> +++ b/src/acpica/source/tools/acpiexec/aehandlers.c
> @@ -683,20 +683,27 @@ AeInstallLateHandlers (
>      {
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
>              AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
>  
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
>              AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
>  
>          Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
>              AeNotifyHandler1);
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
> +
>          Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
>              AeNotifyHandler2);
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
>  
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
>              AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
>  
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
>              AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
>      }
>  
>      Status = AcpiGetHandle (NULL, "\\_PR.CPU0", &Handle);
> @@ -704,9 +711,11 @@ AeInstallLateHandlers (
>      {
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
>              AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
>  
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
>              AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
>      }
>  
>  #if (!ACPI_REDUCED_HARDWARE)
> @@ -855,13 +864,15 @@ AeInstallEarlyHandlers (
>  
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
>              AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +        ACPI_CHECK_OK(AcpiInstallNotifyHandler, Status);
>  
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
>              AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +        ACPI_CHECK_OK(AcpiInstallNotifyHandler, Status);
>  
>          /* Attempt duplicate handler installation, should fail */
>  
> -        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
> +        (void) AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
>              AeNotifyHandler1, ACPI_CAST_PTR (void, 0x77777777));
>  
>          Status = AcpiAttachData (Handle, AeAttachedDataHandler, Handle);
> diff --git a/src/acpica/source/tools/acpiexec/aeinitfile.c b/src/acpica/source/tools/acpiexec/aeinitfile.c
> index f895e2cc..35e2b8b8 100644
> --- a/src/acpica/source/tools/acpiexec/aeinitfile.c
> +++ b/src/acpica/source/tools/acpiexec/aeinitfile.c
> @@ -224,9 +224,13 @@ AeProcessInitFile(
>      void)
>  {
>      ACPI_WALK_STATE         *WalkState;
> -    int                     i;
>      UINT64                  idx;
>      ACPI_STATUS             Status;
> +    char                    *Token;
> +    char                    *ObjectBuffer;
> +    char                    *TempNameBuffer;
> +    ACPI_OBJECT_TYPE        Type;
> +    ACPI_OBJECT             TempObject;
>  
>  
>      if (!InitFile)
> @@ -249,26 +253,44 @@ AeProcessInitFile(
>          AcpiOsAllocate (sizeof (INIT_FILE_ENTRY) * AcpiGbl_InitFileLineCount);
>      for (idx = 0; fgets (LineBuffer, AE_FILE_BUFFER_SIZE, InitFile); ++idx)
>      {
> -        if (sscanf (LineBuffer, "%s %s\n",
> -                &NameBuffer[1], ValueBuffer) != 2)
> +
> +        TempNameBuffer = AcpiDbGetNextToken (LineBuffer, &Token, &Type);
> +        if (LineBuffer[0] == '\\')
>          {
> -            goto CleanupAndExit;
> +            strcpy (NameBuffer, TempNameBuffer);
> +        }
> +        else
> +        {
> +            /* Add a root prefix if not present in the string */
> +
> +            strcpy (NameBuffer + 1, TempNameBuffer);
>          }
>  
> -        /* Add a root prefix if not present in the string */
> +        AcpiGbl_InitEntries[idx].Name =
> +            AcpiOsAllocateZeroed (strnlen (NameBuffer, AE_FILE_BUFFER_SIZE) + 1);
> +
> +        strcpy (AcpiGbl_InitEntries[idx].Name, NameBuffer);
> +
> +        ObjectBuffer = AcpiDbGetNextToken (Token, &Token, &Type);
>  
> -        i = 0;
> -        if (NameBuffer[1] == '\\')
> +        if (Type == ACPI_TYPE_FIELD_UNIT)
> +        {
> +            Status = AcpiDbConvertToObject (ACPI_TYPE_BUFFER, ObjectBuffer,
> +                &TempObject);
> +        }
> +        else
>          {
> -            i = 1;
> +            Status = AcpiDbConvertToObject (Type, ObjectBuffer, &TempObject);
>          }
>  
> -        AcpiGbl_InitEntries[idx].Name =
> -            AcpiOsAllocateZeroed (strnlen (NameBuffer + i, AE_FILE_BUFFER_SIZE) + 1);
> +        Status = AcpiUtCopyEobjectToIobject (&TempObject,
> +            &AcpiGbl_InitEntries[idx].ObjDesc);
>  
> -        strcpy (AcpiGbl_InitEntries[idx].Name, NameBuffer + i);
> +        if (Type == ACPI_TYPE_BUFFER || Type == ACPI_TYPE_FIELD_UNIT)
> +        {
> +            ACPI_FREE (TempObject.Buffer.Pointer);
> +        }
>  
> -        Status = AcpiUtStrtoul64 (ValueBuffer, &AcpiGbl_InitEntries[idx].Value);
>          if (ACPI_FAILURE (Status))
>          {
>              AcpiOsPrintf ("%s %s\n", ValueBuffer,
> @@ -276,7 +298,16 @@ AeProcessInitFile(
>              goto CleanupAndExit;
>          }
>  
> -        AeEnterInitFileEntry (AcpiGbl_InitEntries[idx], WalkState);
> +        /*
> +         * Special case for field units. Field units are dependent on the
> +         * parent region. This parent region has yet to be created so defer the
> +         * initialization until the dispatcher. For all other types, initialize
> +         * the namespace node with the value found in the init file.
> +         */
> +        if (Type != ACPI_TYPE_FIELD_UNIT)
> +        {
> +            AeEnterInitFileEntry (AcpiGbl_InitEntries[idx], WalkState);
> +        }
>      }
>  
>      /* Cleanup */
> @@ -309,14 +340,12 @@ AeEnterInitFileEntry (
>      ACPI_WALK_STATE         *WalkState)
>  {
>      char                    *Pathname = InitEntry.Name;
> -    UINT64                  Value = InitEntry.Value;
> -    ACPI_OPERAND_OBJECT     *ObjDesc;
> +    ACPI_OPERAND_OBJECT     *ObjDesc = InitEntry.ObjDesc;
>      ACPI_NAMESPACE_NODE     *NewNode;
>      ACPI_STATUS             Status;
>  
>  
> -    AcpiOsPrintf ("Initializing namespace element: %s\n", Pathname);
> -    Status = AcpiNsLookup (NULL, Pathname, ACPI_TYPE_INTEGER,
> +    Status = AcpiNsLookup (NULL, Pathname, ObjDesc->Common.Type,
>          ACPI_IMODE_LOAD_PASS2, ACPI_NS_ERROR_IF_FOUND | ACPI_NS_NO_UPSEARCH |
>          ACPI_NS_EARLY_INIT, NULL, &NewNode);
>      if (ACPI_FAILURE (Status))
> @@ -327,15 +356,17 @@ AeEnterInitFileEntry (
>          return;
>      }
>  
> -    ObjDesc = AcpiUtCreateIntegerObject (Value);
> -
> -    AcpiOsPrintf ("New value: 0x%8.8X%8.8X\n",
> -        ACPI_FORMAT_UINT64 (Value));
> -
>      /* Store pointer to value descriptor in the Node */
>  
>      Status = AcpiNsAttachObject (NewNode, ObjDesc,
> -         ACPI_TYPE_INTEGER);
> +         ObjDesc->Common.Type);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        ACPI_EXCEPTION ((AE_INFO, Status,
> +            "While attaching object to node from namespace initialization file: %s",
> +            Pathname));
> +        return;
> +    }
>  
>      /* Remove local reference to the object */
>  
> @@ -359,7 +390,7 @@ AeEnterInitFileEntry (
>  ACPI_STATUS
>  AeLookupInitFileEntry (
>      char                    *Pathname,
> -    UINT64                  *Value)
> +    ACPI_OPERAND_OBJECT     **ObjDesc)
>  {
>      UINT32                  i;
>  
> @@ -372,7 +403,7 @@ AeLookupInitFileEntry (
>      {
>          if (!strcmp(AcpiGbl_InitEntries[i].Name, Pathname))
>          {
> -            *Value = AcpiGbl_InitEntries[i].Value;
> +            *ObjDesc = AcpiGbl_InitEntries[i].ObjDesc;
>              return AE_OK;
>          }
>      }
> 

Acked-by: Alex Hung <alex.hung@canonical.com>
ivanhu Oct. 29, 2019, 7:49 a.m. UTC | #2
On 10/19/19 10:31 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Changes in this release of ACPICA are detailed at the following
> link on the ACPICA developer mailing list:
>
> https://lists.acpica.org/hyperkitty/list/devel@acpica.org/thread/2ZK7W5OOHYHRJGKDURZ7YHXKDQL7WTLO/
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpica/source/common/acgetline.c          |   2 +-
>  src/acpica/source/common/adisasm.c            |   1 -
>  src/acpica/source/common/adwalk.c             |   4 +-
>  src/acpica/source/common/dmtables.c           |   4 +-
>  src/acpica/source/common/dmtbdump1.c          |  22 ++-
>  src/acpica/source/common/dmtbdump2.c          |  24 +++-
>  src/acpica/source/common/dmtbdump3.c          |   6 +-
>  src/acpica/source/compiler/aslanalyze.c       |   2 +-
>  src/acpica/source/compiler/aslbtypes.c        |   1 -
>  src/acpica/source/compiler/aslkeywords.y      |   2 +-
>  src/acpica/source/compiler/aslload.c          |  13 +-
>  src/acpica/source/compiler/aslmessages.c      |   5 +-
>  src/acpica/source/compiler/aslmessages.h      |   3 +
>  src/acpica/source/compiler/aslmethod.c        |  20 ++-
>  src/acpica/source/compiler/aslnamesp.c        |   4 +
>  src/acpica/source/compiler/aslprepkg.c        |   2 +-
>  src/acpica/source/compiler/aslresource.c      |   2 +-
>  src/acpica/source/compiler/aslrestype2.c      |   3 -
>  src/acpica/source/compiler/aslrestype2s.c     |   1 -
>  src/acpica/source/compiler/aslutils.c         |   2 +-
>  src/acpica/source/compiler/cvdisasm.c         |   9 +-
>  src/acpica/source/compiler/cvparser.c         |   1 -
>  src/acpica/source/compiler/dtcompile.c        |  15 ++-
>  src/acpica/source/compiler/dtcompiler.h       |  39 ++++--
>  src/acpica/source/compiler/dtcompilerparser.l |  20 ++-
>  src/acpica/source/compiler/dtcompilerparser.y |  50 ++++---
>  src/acpica/source/compiler/dtfield.c          | 127 ++++++++++++++++++
>  src/acpica/source/compiler/dtio.c             |  98 --------------
>  src/acpica/source/compiler/dttable2.c         |  23 +++-
>  .../source/components/debugger/dbconvert.c    |   4 +
>  .../source/components/debugger/dbdisply.c     |   2 -
>  .../source/components/debugger/dbfileio.c     |   2 +-
>  .../source/components/debugger/dbinput.c      |  36 ++++-
>  .../source/components/debugger/dbmethod.c     |   5 +
>  .../source/components/debugger/dbnames.c      | 122 +++++++++++++++++
>  .../source/components/debugger/dbobject.c     |   1 -
>  .../components/disassembler/dmdeferred.c      |   4 +
>  .../source/components/disassembler/dmresrc.c  |   1 -
>  .../source/components/disassembler/dmwalk.c   |   1 -
>  .../source/components/dispatcher/dscontrol.c  |   2 +-
>  .../source/components/dispatcher/dsfield.c    |   9 +-
>  .../source/components/events/evgpeblk.c       |   6 +-
>  .../source/components/events/evgpeinit.c      |   3 -
>  src/acpica/source/components/events/evmisc.c  |  17 ++-
>  .../source/components/events/evregion.c       |   4 +-
>  .../source/components/events/evrgnini.c       |   1 -
>  .../source/components/hardware/hwxfsleep.c    |   4 +
>  .../source/components/namespace/nsconvert.c   |   2 +-
>  .../source/components/namespace/nsdump.c      |   6 +-
>  .../source/components/namespace/nsxfname.c    |   2 +-
>  .../source/components/parser/psobject.c       |   6 +-
>  .../source/components/resources/rscreate.c    |   4 +
>  src/acpica/source/components/tables/tbdata.c  |   4 +
>  .../source/components/tables/tbxfload.c       |  49 ++++++-
>  .../source/components/utilities/utbuffer.c    |  62 +++++----
>  .../source/components/utilities/utids.c       |   3 +-
>  .../source/components/utilities/uttrack.c     |   2 +-
>  src/acpica/source/include/acdebug.h           |   4 +
>  src/acpica/source/include/acpixf.h            |  10 +-
>  src/acpica/source/include/acstruct.h          |  13 ++
>  src/acpica/source/include/acutils.h           |   9 +-
>  src/acpica/source/tools/acpiexec/aecommon.h   |   5 +-
>  src/acpica/source/tools/acpiexec/aehandlers.c |  13 +-
>  src/acpica/source/tools/acpiexec/aeinitfile.c |  81 +++++++----
>  64 files changed, 717 insertions(+), 287 deletions(-)
>
> diff --git a/src/acpica/source/common/acgetline.c b/src/acpica/source/common/acgetline.c
> index 702d046b..3865914b 100644
> --- a/src/acpica/source/common/acgetline.c
> +++ b/src/acpica/source/common/acgetline.c
> @@ -532,7 +532,7 @@ AcpiOsGetLine (
>                   * Ignore the various keys like insert/delete/home/end, etc.
>                   * But we must eat the final character of the ESC sequence.
>                   */
> -                InputChar = getchar ();
> +                (void) getchar ();
>                  continue;
>  
>              default:
> diff --git a/src/acpica/source/common/adisasm.c b/src/acpica/source/common/adisasm.c
> index c73208f6..22a85009 100644
> --- a/src/acpica/source/common/adisasm.c
> +++ b/src/acpica/source/common/adisasm.c
> @@ -746,7 +746,6 @@ AdDoExternalFileList (
>              {
>                  ExternalFileList = ExternalFileList->Next;
>                  GlobalStatus = AE_TYPE;
> -                Status = AE_OK;
>                  continue;
>              }
>  
> diff --git a/src/acpica/source/common/adwalk.c b/src/acpica/source/common/adwalk.c
> index 6da2e8ec..1996c965 100644
> --- a/src/acpica/source/common/adwalk.c
> +++ b/src/acpica/source/common/adwalk.c
> @@ -601,7 +601,9 @@ AcpiDmFindOrphanDescending (
>          return (AE_OK);
>      }
>  
> +#ifdef ACPI_UNDER_DEVELOPMENT
>      OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
> +#endif
>  
>      switch (Op->Common.AmlOpcode)
>      {
> @@ -1100,7 +1102,7 @@ AcpiDmCommonDescendingOp (
>      /* Switch/Case conversion */
>  
>      Status = AcpiDmProcessSwitch (Op);
> -    return (AE_OK);
> +    return (Status);
>  }
>  
>  
> diff --git a/src/acpica/source/common/dmtables.c b/src/acpica/source/common/dmtables.c
> index a2dbea62..e5536ecf 100644
> --- a/src/acpica/source/common/dmtables.c
> +++ b/src/acpica/source/common/dmtables.c
> @@ -327,7 +327,7 @@ AdCreateTableHeader (
>       * makes it easier to rename the disassembled ASL file if needed.
>       */
>      AcpiOsPrintf (
> -        "DefinitionBlock (\"\", \"%4.4s\", %hu, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
> +        "DefinitionBlock (\"\", \"%4.4s\", %u, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
>          Table->Signature, Table->Revision,
>          Table->OemId, Table->OemTableId, Table->OemRevision);
>  }
> @@ -601,7 +601,7 @@ AdParseTable (
>      fprintf (stderr,
>          "Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)\n");
>  
> -    Status = AcpiDmParseDeferredOps (AcpiGbl_ParseOpRoot);
> +    (void) AcpiDmParseDeferredOps (AcpiGbl_ParseOpRoot);
>      fprintf (stderr, "\n");
>  
>      /* Process Resource Templates */
> diff --git a/src/acpica/source/common/dmtbdump1.c b/src/acpica/source/common/dmtbdump1.c
> index c363ac8d..9061ea11 100644
> --- a/src/acpica/source/common/dmtbdump1.c
> +++ b/src/acpica/source/common/dmtbdump1.c
> @@ -474,7 +474,6 @@ AcpiDmDumpCsrt (
>                  {
>                      return;
>                  }
> -                SubSubOffset += InfoLength;
>              }
>  
>              /* Point to next sub-subtable */
> @@ -1401,7 +1400,6 @@ AcpiDmDumpHmat (
>      while (Offset < Table->Length)
>      {
>          AcpiOsPrintf ("\n");
> -        SubtableOffset = 0;
>  
>          /* Dump HMAT structure header */
>  
> @@ -1484,6 +1482,11 @@ AcpiDmDumpHmat (
>                  Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
>                      ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
>                      4, AcpiDmTableInfoHmat1a);
> +                if (ACPI_FAILURE (Status))
> +                {
> +                    return;
> +                }
> +
>                  SubtableOffset += 4;
>              }
>  
> @@ -1500,6 +1503,11 @@ AcpiDmDumpHmat (
>                  Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
>                      ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
>                      4, AcpiDmTableInfoHmat1b);
> +                if (ACPI_FAILURE (Status))
> +                {
> +                    return;
> +                }
> +
>                  SubtableOffset += 4;
>              }
>  
> @@ -1519,6 +1527,11 @@ AcpiDmDumpHmat (
>                      Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
>                          ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
>                          2, AcpiDmTableInfoHmat1c);
> +                    if (ACPI_FAILURE(Status))
> +                    {
> +                        return;
> +                    }
> +
>                      SubtableOffset += 2;
>                  }
>              }
> @@ -1542,6 +1555,11 @@ AcpiDmDumpHmat (
>                  Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
>                      ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
>                      2, AcpiDmTableInfoHmat2a);
> +                if (ACPI_FAILURE (Status))
> +                {
> +                    return;
> +                }
> +
>                  SubtableOffset += 2;
>              }
>              break;
> diff --git a/src/acpica/source/common/dmtbdump2.c b/src/acpica/source/common/dmtbdump2.c
> index 418b6ec0..e350d23c 100644
> --- a/src/acpica/source/common/dmtbdump2.c
> +++ b/src/acpica/source/common/dmtbdump2.c
> @@ -187,6 +187,7 @@ AcpiDmDumpIort (
>      ACPI_DMTABLE_INFO       *InfoTable;
>      char                    *String;
>      UINT32                  i;
> +    UINT32                  MappingByteLength;
>  
>  
>      /* Main table */
> @@ -314,6 +315,11 @@ AcpiDmDumpIort (
>                      Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset,
>                          ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset),
>                          4, AcpiDmTableInfoIort0a);
> +                    if (ACPI_FAILURE (Status))
> +                    {
> +                        return;
> +                    }
> +
>                      NodeOffset += 4;
>                  }
>              }
> @@ -325,8 +331,10 @@ AcpiDmDumpIort (
>  
>              if (IortNode->Length > NodeOffset)
>              {
> +                MappingByteLength =
> +                    IortNode->MappingCount * sizeof (ACPI_IORT_ID_MAPPING);
>                  Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset,
> -                    Table, IortNode->Length - NodeOffset,
> +                    Table, IortNode->Length - NodeOffset - MappingByteLength,
>                      AcpiDmTableInfoIort1a);
>                  if (ACPI_FAILURE (Status))
>                  {
> @@ -410,7 +418,6 @@ NextSubtable:
>          /* Point to next node subtable */
>  
>          Offset += IortNode->Length;
> -        IortNode = ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, IortNode->Length);
>      }
>  }
>  
> @@ -1211,7 +1218,6 @@ AcpiDmDumpNfit (
>              /* Has a variable number of 32-bit values at the end */
>  
>              InfoTable = AcpiDmTableInfoNfit2;
> -            Interleave = ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE, Subtable);
>              FieldOffset = sizeof (ACPI_NFIT_INTERLEAVE);
>              break;
>  
> @@ -1236,7 +1242,6 @@ AcpiDmDumpNfit (
>              /* Has a variable number of 64-bit addresses at the end */
>  
>              InfoTable = AcpiDmTableInfoNfit6;
> -            Hint = ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS, Subtable);
>              FieldOffset = sizeof (ACPI_NFIT_FLUSH_ADDRESS) - sizeof (UINT64);
>              break;
>  
> @@ -1273,6 +1278,7 @@ AcpiDmDumpNfit (
>          {
>          case ACPI_NFIT_TYPE_INTERLEAVE:
>  
> +            Interleave = ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE, Subtable);
>              for (i = 0; i < Interleave->LineCount; i++)
>              {
>                  Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset,
> @@ -1308,6 +1314,7 @@ AcpiDmDumpNfit (
>  
>          case ACPI_NFIT_TYPE_FLUSH_ADDRESS:
>  
> +            Hint = ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS, Subtable);
>              for (i = 0; i < Hint->HintCount; i++)
>              {
>                  Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset,
> @@ -1806,6 +1813,11 @@ AcpiDmDumpPptt (
>                  Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
>                      ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable, SubtableOffset),
>                      4, AcpiDmTableInfoPptt0a);
> +                if (ACPI_FAILURE (Status))
> +                {
> +                    return;
> +                }
> +
>                  SubtableOffset += 4;
>              }
>              break;
> @@ -2063,6 +2075,10 @@ AcpiDmDumpSdev (
>                  Status = AcpiDmDumpTable (Table->Length, 0,
>                      ACPI_ADD_PTR (UINT8, Pcie, VendorDataOffset),
>                      VendorDataLength, AcpiDmTableInfoSdev1b);
> +                if (ACPI_FAILURE (Status))
> +                {
> +                    return;
> +                }
>              }
>              break;
>  
> diff --git a/src/acpica/source/common/dmtbdump3.c b/src/acpica/source/common/dmtbdump3.c
> index 0b9863cc..561a0032 100644
> --- a/src/acpica/source/common/dmtbdump3.c
> +++ b/src/acpica/source/common/dmtbdump3.c
> @@ -410,7 +410,7 @@ AcpiDmDumpStao (
>          Namepath = ACPI_ADD_PTR (char, Table, Offset);
>          StringLength = strlen (Namepath) + 1;
>  
> -        AcpiDmLineHeader (Offset, StringLength, "Namestring");
> +        AcpiDmLineHeader (Offset, StringLength, "Namepath");
>          AcpiOsPrintf ("\"%s\"\n", Namepath);
>  
>          /* Point to next namepath */
> @@ -526,7 +526,7 @@ AcpiDmDumpTpm2Rev3 (
>      {
>      case ACPI_TPM23_ACPI_START_METHOD:
>  
> -        Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
> +        (void) AcpiDmDumpTable (Table->Length, Offset, Subtable,
>              Table->Length - Offset, AcpiDmTableInfoTpm23a);
>          break;
>  
> @@ -591,7 +591,7 @@ AcpiDmDumpTpm2 (
>          Offset += sizeof (ACPI_TPM2_TRAILER);
>  
>          AcpiOsPrintf ("\n");
> -        Status = AcpiDmDumpTable (Table->Length, Offset, ArmSubtable,
> +        (void) AcpiDmDumpTable (Table->Length, Offset, ArmSubtable,
>              Table->Length - Offset, AcpiDmTableInfoTpm211);
>          break;
>  
> diff --git a/src/acpica/source/compiler/aslanalyze.c b/src/acpica/source/compiler/aslanalyze.c
> index 58da5e2e..0482775f 100644
> --- a/src/acpica/source/compiler/aslanalyze.c
> +++ b/src/acpica/source/compiler/aslanalyze.c
> @@ -569,7 +569,7 @@ ApCheckForGpeNameConflict (
>  
>      /* Need a null-terminated string version of NameSeg */
>  
> -    ACPI_MOVE_32_TO_32 (Name, &Op->Asl.NameSeg);
> +    ACPI_MOVE_32_TO_32 (Name, Op->Asl.NameSeg);
>      Name[ACPI_NAMESEG_SIZE] = 0;
>  
>      /*
> diff --git a/src/acpica/source/compiler/aslbtypes.c b/src/acpica/source/compiler/aslbtypes.c
> index ed607f3b..d7caea53 100644
> --- a/src/acpica/source/compiler/aslbtypes.c
> +++ b/src/acpica/source/compiler/aslbtypes.c
> @@ -474,7 +474,6 @@ AnFormatBtype (
>              strcat (Buffer, "|");
>          }
>  
> -        First = FALSE;
>          strcat (Buffer, "Resource");
>      }
>  }
> diff --git a/src/acpica/source/compiler/aslkeywords.y b/src/acpica/source/compiler/aslkeywords.y
> index a19b6425..a505dc02 100644
> --- a/src/acpica/source/compiler/aslkeywords.y
> +++ b/src/acpica/source/compiler/aslkeywords.y
> @@ -202,7 +202,7 @@ AddressKeyword
>      ;
>  
>  AddressSpaceKeyword
> -    : ByteConst                             {$$ = UtCheckIntegerRange ($1, 0x0A, 0xFF);}
> +    : ByteConst                             {$$ = UtCheckIntegerRange ($1, ACPI_NUM_PREDEFINED_REGIONS, 0xFF);}
>      | RegionSpaceKeyword                    {}
>      ;
>  
> diff --git a/src/acpica/source/compiler/aslload.c b/src/acpica/source/compiler/aslload.c
> index d918c0cc..db6c2d41 100644
> --- a/src/acpica/source/compiler/aslload.c
> +++ b/src/acpica/source/compiler/aslload.c
> @@ -526,13 +526,12 @@ LdNamespace1Begin (
>  
>      case AML_INT_CONNECTION_OP:
>  
> -
>          if (Op->Asl.Child->Asl.AmlOpcode != AML_INT_NAMEPATH_OP)
>          {
>              break;
>          }
> -        Arg = Op->Asl.Child;
>  
> +        Arg = Op->Asl.Child;
>          Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Asl.ExternalName,
>              ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
>              WalkState, &Node);
> @@ -541,15 +540,6 @@ LdNamespace1Begin (
>              break;
>          }
>  
> -        if (Node->Type == ACPI_TYPE_BUFFER)
> -        {
> -            Arg->Asl.Node = Node;
> -
> -            Arg = Node->Op->Asl.Child;  /* Get namepath */
> -            Arg = Arg->Asl.Next;        /* Get actual buffer */
> -            Arg = Arg->Asl.Child;       /* Buffer length */
> -            Arg = Arg->Asl.Next;        /* RAW_DATA buffer */
> -        }
>          break;
>  
>      default:
> @@ -576,7 +566,6 @@ LdNamespace1Begin (
>           * These opcodes are guaranteed to have a parent.
>           * Examine the parent opcode.
>           */
> -        Status = AE_OK;
>          ParentOp = Op->Asl.Parent;
>          OpInfo = AcpiPsGetOpcodeInfo (ParentOp->Asl.AmlOpcode);
>  
> diff --git a/src/acpica/source/compiler/aslmessages.c b/src/acpica/source/compiler/aslmessages.c
> index 8dd989ca..d1329352 100644
> --- a/src/acpica/source/compiler/aslmessages.c
> +++ b/src/acpica/source/compiler/aslmessages.c
> @@ -387,7 +387,10 @@ const char                      *AslTableCompilerMsgs [] =
>  /*    ASL_MSG_UNKNOWN_LABEL */              "Label is undefined",
>  /*    ASL_MSG_UNKNOWN_SUBTABLE */           "Unknown subtable type",
>  /*    ASL_MSG_UNKNOWN_TABLE */              "Unknown ACPI table signature",
> -/*    ASL_MSG_ZERO_VALUE */                 "Value must be non-zero"
> +/*    ASL_MSG_ZERO_VALUE */                 "Value must be non-zero",
> +/*    ASL_MSG_INVALID_LABEL */              "Invalid field label detected",
> +/*    ASL_MSG_BUFFER_LIST */                "Invalid buffer initializer list",
> +/*    ASL_MSG_ENTRY_LIST */                 "Invalid entry initializer list"
>  };
>  
>  /* Preprocessor */
> diff --git a/src/acpica/source/compiler/aslmessages.h b/src/acpica/source/compiler/aslmessages.h
> index 55473fb5..47e5bf43 100644
> --- a/src/acpica/source/compiler/aslmessages.h
> +++ b/src/acpica/source/compiler/aslmessages.h
> @@ -387,6 +387,9 @@ typedef enum
>      ASL_MSG_UNKNOWN_SUBTABLE,
>      ASL_MSG_UNKNOWN_TABLE,
>      ASL_MSG_ZERO_VALUE,
> +    ASL_MSG_INVALID_LABEL,
> +    ASL_MSG_BUFFER_LIST,
> +    ASL_MSG_ENTRY_LIST,
>  
>      /* These messages are used by the Preprocessor only */
>  
> diff --git a/src/acpica/source/compiler/aslmethod.c b/src/acpica/source/compiler/aslmethod.c
> index 98884bc3..667eaaaf 100644
> --- a/src/acpica/source/compiler/aslmethod.c
> +++ b/src/acpica/source/compiler/aslmethod.c
> @@ -199,6 +199,8 @@ MtMethodAnalysisWalkBegin (
>      ACPI_PARSE_OBJECT       *NextType;
>      ACPI_PARSE_OBJECT       *NextParamType;
>      UINT8                   ActualArgs = 0;
> +    BOOLEAN                 HidExists;
> +    BOOLEAN                 AdrExists;
>  
>  
>      /* Build cross-reference output file if requested */
> @@ -535,12 +537,26 @@ MtMethodAnalysisWalkBegin (
>  
>      case PARSEOP_DEVICE:
>  
> -        if (!ApFindNameInDeviceTree (METHOD_NAME__HID, Op) &&
> -            !ApFindNameInDeviceTree (METHOD_NAME__ADR, Op))
> +        /* Check usage of _HID and _ADR objects */
> +
> +        HidExists = ApFindNameInDeviceTree (METHOD_NAME__HID, Op);
> +        AdrExists = ApFindNameInDeviceTree (METHOD_NAME__ADR, Op);
> +
> +        if (!HidExists && !AdrExists)
>          {
>              AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
>                  "Device object requires a _HID or _ADR in same scope");
>          }
> +        else if (HidExists && AdrExists)
> +        {
> +            /*
> +             * According to the ACPI spec, "A device object must contain
> +             * either an _HID object or an _ADR object, but should not contain
> +             * both".
> +             */
> +            AslError (ASL_WARNING, ASL_MSG_MULTIPLE_TYPES, Op,
> +                "Device object requires either a _HID or _ADR, but not both");
> +        }
>          break;
>  
>      case PARSEOP_EVENT:
> diff --git a/src/acpica/source/compiler/aslnamesp.c b/src/acpica/source/compiler/aslnamesp.c
> index b5af0cb3..e38e397f 100644
> --- a/src/acpica/source/compiler/aslnamesp.c
> +++ b/src/acpica/source/compiler/aslnamesp.c
> @@ -234,6 +234,10 @@ NsDisplayNamespace (
>      Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
>          ACPI_UINT32_MAX, FALSE, NsDoOneNamespaceObject, NULL,
>          NULL, NULL);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        return (Status);
> +    }
>  
>      /* Print the full pathname for each namespace node */
>  
> diff --git a/src/acpica/source/compiler/aslprepkg.c b/src/acpica/source/compiler/aslprepkg.c
> index f55bb5e8..77969430 100644
> --- a/src/acpica/source/compiler/aslprepkg.c
> +++ b/src/acpica/source/compiler/aslprepkg.c
> @@ -458,7 +458,7 @@ ApCheckPackage (
>  
>          for (i = 0; i < Package->RetInfo4.Count1; ++i)
>          {
> -            Status = ApCheckObjectType (Predefined->Info.Name, Op,
> +            ApCheckObjectType (Predefined->Info.Name, Op,
>                  Package->RetInfo4.ObjectType1, i);
>              Op = Op->Asl.Next;
>          }
> diff --git a/src/acpica/source/compiler/aslresource.c b/src/acpica/source/compiler/aslresource.c
> index 82de5109..57b6440f 100644
> --- a/src/acpica/source/compiler/aslresource.c
> +++ b/src/acpica/source/compiler/aslresource.c
> @@ -1226,7 +1226,7 @@ RsDoResourceTemplate (
>      BufferOp->Asl.AmlOpcode           = AML_RAW_DATA_CHAIN;
>      BufferOp->Asl.AmlOpcodeLength     = 0;
>      BufferOp->Asl.AmlLength           = CurrentByteOffset;
> -    BufferOp->Asl.Value.Buffer        = (UINT8 *) HeadRnode.Next;
> +    BufferOp->Asl.Value.Buffer        = ACPI_CAST_PTR (UINT8,  HeadRnode.Next);
>      BufferOp->Asl.CompileFlags       |= OP_IS_RESOURCE_DATA;
>      UtSetParseOpName (BufferOp);
>  
> diff --git a/src/acpica/source/compiler/aslrestype2.c b/src/acpica/source/compiler/aslrestype2.c
> index 5b8f026e..0652272f 100644
> --- a/src/acpica/source/compiler/aslrestype2.c
> +++ b/src/acpica/source/compiler/aslrestype2.c
> @@ -487,10 +487,7 @@ RsDoInterruptDescriptor (
>  
>      if (StringLength && ResSourceString)
>      {
> -
>          strcpy ((char *) Rover, (char *) ResSourceString);
> -        Rover = ACPI_ADD_PTR (
> -                    AML_RESOURCE, &(Rover->ByteItem), StringLength);
>  
>          Descriptor->ExtendedIrq.ResourceLength = (UINT16)
>              (Descriptor->ExtendedIrq.ResourceLength + StringLength);
> diff --git a/src/acpica/source/compiler/aslrestype2s.c b/src/acpica/source/compiler/aslrestype2s.c
> index 23085054..410ff2b2 100644
> --- a/src/acpica/source/compiler/aslrestype2s.c
> +++ b/src/acpica/source/compiler/aslrestype2s.c
> @@ -674,7 +674,6 @@ RsDoGpioIoDescriptor (
>      ResSourceLength = RsGetStringDataLength (InitializerOp);
>      VendorLength = RsGetBufferDataLength (InitializerOp);
>      InterruptLength = RsGetInterruptDataLength (InitializerOp, 10);
> -    PinList = InterruptList;
>  
>      DescriptorSize = ACPI_AML_SIZE_LARGE (AML_RESOURCE_GPIO) +
>          ResSourceLength + VendorLength + InterruptLength;
> diff --git a/src/acpica/source/compiler/aslutils.c b/src/acpica/source/compiler/aslutils.c
> index ed2948d0..0faaec03 100644
> --- a/src/acpica/source/compiler/aslutils.c
> +++ b/src/acpica/source/compiler/aslutils.c
> @@ -223,7 +223,7 @@ UtQueryForOverwrite (
>      char                    *Pathname)
>  {
>      struct stat             StatInfo;
> -    int                     InChar = 0x34;
> +    int                     InChar;
>  
>  
>      if (!stat (Pathname, &StatInfo))
> diff --git a/src/acpica/source/compiler/cvdisasm.c b/src/acpica/source/compiler/cvdisasm.c
> index 3ff636f8..5396b3c3 100644
> --- a/src/acpica/source/compiler/cvdisasm.c
> +++ b/src/acpica/source/compiler/cvdisasm.c
> @@ -544,8 +544,11 @@ CvSwitchFiles(
>          Current = Current->Parent;
>      }
>  
> -    /* Redirect output to Op->Common.CvFilename */
> +    if (FNode)
> +    {
> +        /* Redirect output to Op->Common.CvFilename */
>  
> -    AcpiOsRedirectOutput (FNode->File);
> -    AcpiGbl_CurrentFilename = FNode->Filename;
> +        AcpiOsRedirectOutput (FNode->File);
> +        AcpiGbl_CurrentFilename = FNode->Filename;
> +    }
>  }
> diff --git a/src/acpica/source/compiler/cvparser.c b/src/acpica/source/compiler/cvparser.c
> index ca970b50..9a2f0f9c 100644
> --- a/src/acpica/source/compiler/cvparser.c
> +++ b/src/acpica/source/compiler/cvparser.c
> @@ -912,7 +912,6 @@ CvCaptureCommentsOnly (
>  
>                      /* Not a valid comment option. Revert the AML */
>  
> -                    Aml -= 2;
>                      goto DefBlock;
>  
>              } /* End switch statement */
> diff --git a/src/acpica/source/compiler/dtcompile.c b/src/acpica/source/compiler/dtcompile.c
> index b6a144fe..bdd8c1b7 100644
> --- a/src/acpica/source/compiler/dtcompile.c
> +++ b/src/acpica/source/compiler/dtcompile.c
> @@ -276,7 +276,10 @@ DtDoCompile (
>  
>      if (ACPI_FAILURE (Status))
>      {
> -        FileNode->ParserErrorDetected = TRUE;
> +        if (FileNode)
> +        {
> +            FileNode->ParserErrorDetected = TRUE;
> +        }
>  
>          /* TBD: temporary error message. Msgs should come from function above */
>  
> @@ -572,7 +575,7 @@ DtCompileTable (
>      ACPI_STATUS             Status = AE_OK;
>  
>  
> -    if (!Field)
> +    if (!Field || !Info)
>      {
>          return (AE_BAD_PARAMETER);
>      }
> @@ -643,6 +646,14 @@ DtCompileTable (
>          FieldType = DtGetFieldType (Info);
>          AslGbl_InputFieldCount++;
>  
> +        if (FieldType != DT_FIELD_TYPE_INLINE_SUBTABLE &&
> +            strcmp (Info->Name, LocalField->Name))
> +        {
> +            sprintf (AslGbl_MsgBuffer, "found \"%s\" expected \"%s\"",
> +                LocalField->Name, Info->Name);
> +            DtError (ASL_ERROR, ASL_MSG_INVALID_LABEL, LocalField, AslGbl_MsgBuffer);
> +        }
> +
>          switch (FieldType)
>          {
>          case DT_FIELD_TYPE_FLAGS_INTEGER:
> diff --git a/src/acpica/source/compiler/dtcompiler.h b/src/acpica/source/compiler/dtcompiler.h
> index 639c22cb..7c78b55b 100644
> --- a/src/acpica/source/compiler/dtcompiler.h
> +++ b/src/acpica/source/compiler/dtcompiler.h
> @@ -210,6 +210,17 @@ typedef struct dt_field
>  
>  #define DT_FIELD_NOT_ALLOCATED      1
>  
> +/*
> + * Structure used for each individual key or value
> + */
> +typedef struct dt_table_unit
> +{
> +    char                    *Value;      /* Field value (from name : value) */
> +    UINT32                  Line;        /* Line number for this field */
> +    UINT32                  Column;      /* Start column for field value */
> +
> +} DT_TABLE_UNIT;
> +
>  
>  /*
>   * Structure used for individual subtables within an ACPI table
> @@ -292,14 +303,6 @@ DtCompilePadding (
>      UINT32                  Length,
>      DT_SUBTABLE             **RetSubtable);
>  
> -void
> -DtCreateField (
> -    char                    *Name,
> -    char                    *Value,
> -    UINT32                  Line,
> -    UINT32                  Offset,
> -    UINT32                  Column,
> -    UINT32                  NameColumn);
>  
>  /* dtio - binary and text input/output */
>  
> @@ -437,6 +440,26 @@ DtCompileFlag (
>      ACPI_DMTABLE_INFO       *Info);
>  
>  
> +/* dtfield - DT_FIELD operations */
> +
> +void
> +DtLinkField (
> +    DT_FIELD                *Field);
> +
> +void
> +DtCreateField (
> +    DT_TABLE_UNIT           *FieldKey,
> +    DT_TABLE_UNIT           *FieldValue,
> +    UINT32                  Offset);
> +
> +DT_TABLE_UNIT *
> +DtCreateTableUnit (
> +    char                    *Data,
> +    UINT32                  Line,
> +    UINT32                  Column);
> +
> +
> +
>  /* dtparser - lex/yacc files */
>  
>  UINT64                      DtCompilerParserResult; /* Expression return value */
> diff --git a/src/acpica/source/compiler/dtcompilerparser.l b/src/acpica/source/compiler/dtcompilerparser.l
> index 0d68f41e..28dcf6af 100644
> --- a/src/acpica/source/compiler/dtcompilerparser.l
> +++ b/src/acpica/source/compiler/dtcompilerparser.l
> @@ -161,18 +161,20 @@ YYSTYPE DtCompilerlval;
>  /* handle locations */
>  
>  int DtCompilerParsercolumn = 1;
> +int DtLabelByteOffset = 0;
>  int DtCompilerParserByteOffset = 0;
>  
> +UINT32 DtTokenFirstLine = 0;
> +UINT32 DtTokenFirstColumn = 0;
> +
>  #define YY_USER_ACTION \
> -            DtCompilerParserlloc.first_line = DtCompilerParserlloc.last_line = DtCompilerParserlineno; \
> -            DtCompilerParserlloc.first_column = DtCompilerParsercolumn; \
> -            DtCompilerParserlloc.first_byte_offset = DtCompilerParserByteOffset; \
> -            DtCompilerParserlloc.last_column = DtCompilerParsercolumn + DtCompilerParserleng-1; \
> +            DtTokenFirstLine = DtCompilerParserlineno; \
> +            DtTokenFirstColumn = DtCompilerParsercolumn; \
>              DtCompilerParsercolumn += DtCompilerParserleng; \
>              DtCompilerParserByteOffset += DtCompilerParserleng; \
>              DbgPrint (ASL_PARSE_OUTPUT,\
> -                "user action occurred. DtCompilerParserlloc.first_line: %u offset: %u\n",\
> -                DtCompilerParserlloc.first_line, DtCompilerParserlloc.first_byte_offset);
> +                "user action occurred. DtCompilerParserlloc.first_line: %u\n",\
> +                DtTokenFirstLine);
>  %}
>  
>  %option nounput noinput yylineno
> @@ -236,7 +238,11 @@ CommentField    {LabelName}{WhiteSpace}*:{WhiteSpace}{Comment}?$
>      int size = strlen (DtCompilerParsertext);
>      s=UtLocalCacheCalloc (size + 1);
>      AcpiUtSafeStrncpy (s, DtCompilerParsertext, size + 1);
> -    DtCompilerParserlval.s = s;
> +    DtCompilerParserlval.u = (DT_TABLE_UNIT *) UtLocalCacheCalloc (sizeof (DT_TABLE_UNIT));
> +    DtCompilerParserlval.u->Value = s;
> +    DtCompilerParserlval.u->Line = DtCompilerParserlineno;
> +    DtCompilerParserlval.u->Column = DtCompilerParsercolumn;
> +    DtLabelByteOffset = DtCompilerParserByteOffset;
>      DbgPrint (ASL_PARSE_OUTPUT, "Label: %s\n", s);
>      return (DT_PARSEOP_LABEL);
>  }
> diff --git a/src/acpica/source/compiler/dtcompilerparser.y b/src/acpica/source/compiler/dtcompilerparser.y
> index ba9d2827..43eba4e9 100644
> --- a/src/acpica/source/compiler/dtcompilerparser.y
> +++ b/src/acpica/source/compiler/dtcompilerparser.y
> @@ -169,9 +169,13 @@ void                        DtCompilerParsererror (char const *msg);
>  extern char                 *DtCompilerParsertext;
>  extern DT_FIELD             *AslGbl_CurrentField;
>  
> +extern int                  DtLabelByteOffset;
>  extern UINT64               DtCompilerParserResult; /* Expression return value */
>  extern UINT64               DtCompilerParserlineno; /* Current line number */
>  
> +extern UINT32               DtTokenFirstLine;
> +extern UINT32               DtTokenFirstColumn;
> +
>  /* Bison/yacc configuration */
>  
>  #define yytname             DtCompilerParsername
> @@ -186,42 +190,30 @@ extern UINT64               DtCompilerParserlineno; /* Current line number */
>  
>  %}
>  
> -%code requires {
> -
> -    typedef struct YYLTYPE {
> -        int first_line;
> -        int last_line;
> -        int first_column;
> -        int last_column;
> -        int first_byte_offset;
> -    } YYLTYPE;
> -
> -    #define YYLTYPE_IS_DECLARED 1
> -}
> -
>  
>  %union {
>      char                *s;
>      DT_FIELD            *f;
> +    DT_TABLE_UNIT       *u;
>  }
>  
>  
>  %type  <f> Table
> -%token <s> DT_PARSEOP_DATA
> -%token <s> DT_PARSEOP_LABEL
> -%token <s> DT_PARSEOP_STRING_DATA
> -%token <s> DT_PARSEOP_LINE_CONTINUATION
> -%type  <s> Data
> -%type  <s> Datum
> -%type  <s> MultiLineData
> -%type  <s> MultiLineDataList
> +%token <u> DT_PARSEOP_DATA
> +%token <u> DT_PARSEOP_LABEL
> +%token <u> DT_PARSEOP_STRING_DATA
> +%token <u> DT_PARSEOP_LINE_CONTINUATION
> +%type  <u> Data
> +%type  <u> Datum
> +%type  <u> MultiLineData
> +%type  <u> MultiLineDataList
>  
>  
>  %%
>  
>  Table
>      :
> -    FieldList { DtCompilerParserResult = 5;}
> +    FieldList { }
>      ;
>  
>  FieldList
> @@ -230,7 +222,7 @@ FieldList
>      ;
>  
>  Field
> -    : DT_PARSEOP_LABEL ':' Data { DtCreateField ($1, $3, (@3).first_line, (@1).first_byte_offset, (@1).first_column, (@3).first_column); }
> +    : DT_PARSEOP_LABEL ':' Data { DtCreateField ($1, $3, DtLabelByteOffset); }
>      ;
>  
>  Data
> @@ -240,7 +232,7 @@ Data
>      ;
>  
>  MultiLineDataList
> -    : MultiLineDataList MultiLineData { $$ = AcpiUtStrcat(AcpiUtStrcat($1, " "), $2); } /* combine the strings with strcat */
> +    : MultiLineDataList MultiLineData { $$ = DtCreateTableUnit (AcpiUtStrcat(AcpiUtStrcat($1->Value, " "), $2->Value), $1->Line, $1->Column); } /* combine the strings with strcat */
>      | MultiLineData                   { $$ = $1; }
>      ;
>  
> @@ -249,8 +241,14 @@ MultiLineData
>      ;
>  
>  Datum
> -    : DT_PARSEOP_DATA        { DbgPrint (ASL_PARSE_OUTPUT, "parser        data: [%s]\n", DtCompilerParserlval.s); $$ = AcpiUtStrdup(DtCompilerParserlval.s); }
> -    | DT_PARSEOP_STRING_DATA { DbgPrint (ASL_PARSE_OUTPUT, "parser string data: [%s]\n", DtCompilerParserlval.s); $$ = AcpiUtStrdup(DtCompilerParserlval.s); }
> +    : DT_PARSEOP_DATA        {
> +                                 DbgPrint (ASL_PARSE_OUTPUT, "parser        data: [%s]\n", DtCompilerParserlval.s);
> +                                 $$ = DtCreateTableUnit (AcpiUtStrdup(DtCompilerParserlval.s), DtTokenFirstLine, DtTokenFirstColumn);
> +                             }
> +    | DT_PARSEOP_STRING_DATA {
> +                                 DbgPrint (ASL_PARSE_OUTPUT, "parser string data: [%s]\n", DtCompilerParserlval.s);
> +                                 $$ = DtCreateTableUnit (AcpiUtStrdup(DtCompilerParserlval.s), DtTokenFirstLine, DtTokenFirstColumn);
> +                             }
>      ;
>  
>  
> diff --git a/src/acpica/source/compiler/dtfield.c b/src/acpica/source/compiler/dtfield.c
> index 1f716761..18d44110 100644
> --- a/src/acpica/source/compiler/dtfield.c
> +++ b/src/acpica/source/compiler/dtfield.c
> @@ -576,6 +576,14 @@ DtCompileBuffer (
>  
>      StringValue = DtNormalizeBuffer (StringValue, &Count);
>      Substring = StringValue;
> +    if (Count != ByteLength)
> +    {
> +        sprintf(AslGbl_MsgBuffer,
> +            "Found %u values, must match expected count: %u",
> +            Count, ByteLength);
> +        DtError (ASL_ERROR, ASL_MSG_BUFFER_LIST, Field, AslGbl_MsgBuffer);
> +        goto Exit;
> +    }
>  
>      /* Each element of StringValue is now three chars (2 hex + 1 space) */
>  
> @@ -721,3 +729,122 @@ DtCompileFlag (
>  
>      *Buffer |= (UINT8) (Value << BitPosition);
>  }
> +
> +
> +/******************************************************************************
> + *
> + * FUNCTION:    DtCreateField
> + *
> + * PARAMETERS: Name
> + *             Value
> + *             Line
> + *             Offset
> + *             Column
> + *             NameColumn
> + *
> + * RETURN:     None
> + *
> + * DESCRIPTION: Create a field
> + *
> + *****************************************************************************/
> +
> +void
> +DtCreateField (
> +    DT_TABLE_UNIT           *FieldKey,
> +    DT_TABLE_UNIT           *FieldValue,
> +    UINT32                  Offset)
> +{
> +    DT_FIELD                *Field = UtFieldCacheCalloc ();
> +
> +
> +    Field->StringLength = 0;
> +    if (FieldKey->Value)
> +    {
> +        Field->Name =
> +            strcpy (UtLocalCacheCalloc (strlen (FieldKey->Value) + 1), FieldKey->Value);
> +    }
> +
> +    if (FieldValue->Value)
> +    {
> +        Field->StringLength = strlen (FieldValue->Value);
> +        Field->Value =
> +            strcpy (UtLocalCacheCalloc (Field->StringLength + 1), FieldValue->Value);
> +    }
> +
> +    Field->Line = FieldValue->Line;
> +    Field->ByteOffset = Offset;
> +    Field->NameColumn = FieldKey->Column;
> +    Field->Column = FieldValue->Column;
> +    DtLinkField (Field);
> +
> +    DtDumpFieldList (AslGbl_FieldList);
> +}
> +
> +
> +/******************************************************************************
> + *
> + * FUNCTION:    DtCreateTableUnit
> + *
> + * PARAMETERS: Data
> + *             Line
> + *             Column
> + *
> + * RETURN:     a table unit
> + *
> + * DESCRIPTION: Create a table unit
> + *
> + *****************************************************************************/
> +
> +DT_TABLE_UNIT *
> +DtCreateTableUnit (
> +    char                    *Data,
> +    UINT32                  Line,
> +    UINT32                  Column)
> +{
> +    DT_TABLE_UNIT           *Unit = (DT_TABLE_UNIT *) UtFieldCacheCalloc ();
> +
> +
> +    Unit->Value = Data;
> +    Unit->Line = Line;
> +    Unit->Column = Column;
> +    return (Unit);
> +}
> +
> +
> +/******************************************************************************
> + *
> + * FUNCTION:    DtLinkField
> + *
> + * PARAMETERS:  Field               - New field object to link
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Link one field name and value to the list
> + *
> + *****************************************************************************/
> +
> +void
> +DtLinkField (
> +    DT_FIELD                *Field)
> +{
> +    DT_FIELD                *Prev;
> +    DT_FIELD                *Next;
> +
> +
> +    Prev = Next = AslGbl_FieldList;
> +
> +    while (Next)
> +    {
> +        Prev = Next;
> +        Next = Next->Next;
> +    }
> +
> +    if (Prev)
> +    {
> +        Prev->Next = Field;
> +    }
> +    else
> +    {
> +        AslGbl_FieldList = Field;
> +    }
> +}
> diff --git a/src/acpica/source/compiler/dtio.c b/src/acpica/source/compiler/dtio.c
> index d027353c..b596fda8 100644
> --- a/src/acpica/source/compiler/dtio.c
> +++ b/src/acpica/source/compiler/dtio.c
> @@ -162,10 +162,6 @@ static char *
>  DtTrim (
>      char                    *String);
>  
> -static void
> -DtLinkField (
> -    DT_FIELD                *Field);
> -
>  static ACPI_STATUS
>  DtParseLine (
>      char                    *LineBuffer,
> @@ -297,45 +293,6 @@ DtTrim (
>  }
>  
>  
> -/******************************************************************************
> - *
> - * FUNCTION:    DtLinkField
> - *
> - * PARAMETERS:  Field               - New field object to link
> - *
> - * RETURN:      None
> - *
> - * DESCRIPTION: Link one field name and value to the list
> - *
> - *****************************************************************************/
> -
> -static void
> -DtLinkField (
> -    DT_FIELD                *Field)
> -{
> -    DT_FIELD                *Prev;
> -    DT_FIELD                *Next;
> -
> -
> -    Prev = Next = AslGbl_FieldList;
> -
> -    while (Next)
> -    {
> -        Prev = Next;
> -        Next = Next->Next;
> -    }
> -
> -    if (Prev)
> -    {
> -        Prev->Next = Field;
> -    }
> -    else
> -    {
> -        AslGbl_FieldList = Field;
> -    }
> -}
> -
> -
>  /******************************************************************************
>   *
>   * FUNCTION:    DtParseLine
> @@ -493,59 +450,6 @@ DtParseLine (
>  }
>  
>  
> -/******************************************************************************
> - *
> - * FUNCTION:    DtCreateField
> - *
> - * PARAMETERS: Name
> - *             Value
> - *             Line
> - *             Offset
> - *             Column
> - *             NameColumn
> - *
> - * RETURN:     None
> - *
> - * DESCRIPTION: Create a field
> - *
> - *****************************************************************************/
> -
> -void
> -DtCreateField (
> -    char                    *Name,
> -    char                    *Value,
> -    UINT32                  Line,
> -    UINT32                  Offset,
> -    UINT32                  Column,
> -    UINT32                  NameColumn)
> -{
> -    DT_FIELD                *Field = UtFieldCacheCalloc ();
> -
> -
> -    Field->StringLength = 0;
> -    if (Name)
> -    {
> -        Field->Name =
> -            strcpy (UtLocalCacheCalloc (strlen (Name) + 1), Name);
> -    }
> -
> -    if (Value)
> -    {
> -        Field->StringLength = strlen (Value);
> -        Field->Value =
> -            strcpy (UtLocalCacheCalloc (Field->StringLength + 1), Value);
> -    }
> -
> -    Field->Line = Line;
> -    Field->ByteOffset = Offset;
> -    Field->NameColumn = NameColumn;
> -    Field->Column = Column;
> -    DtLinkField (Field);
> -
> -    DtDumpFieldList (AslGbl_FieldList);
> -}
> -
> -
>  /******************************************************************************
>   *
>   * FUNCTION:    DtGetNextLine
> @@ -840,7 +744,6 @@ DtGetNextLine (
>  
>              case '\n':
>  
> -                CurrentLineOffset = AslGbl_NextLineOffset;
>                  AslGbl_NextLineOffset = (UINT32) ftell (Handle);
>                  AslGbl_CurrentLineNumber++;
>                  break;
> @@ -882,7 +785,6 @@ DtGetNextLine (
>  
>                  /* Ignore newline, this will merge the lines */
>  
> -                CurrentLineOffset = AslGbl_NextLineOffset;
>                  AslGbl_NextLineOffset = (UINT32) ftell (Handle);
>                  AslGbl_CurrentLineNumber++;
>                  State = DT_NORMAL_TEXT;
> diff --git a/src/acpica/source/compiler/dttable2.c b/src/acpica/source/compiler/dttable2.c
> index 04f48cc0..bbaaafaa 100644
> --- a/src/acpica/source/compiler/dttable2.c
> +++ b/src/acpica/source/compiler/dttable2.c
> @@ -1474,13 +1474,14 @@ DtCompileSdev (
>                          Namesp->DeviceIdOffset + Namesp->DeviceIdLength;
>                      Namesp->VendorDataLength =
>                          (UINT16) Subtable->Length;
> +
> +                    /* Final size of entire namespace structure */
> +
> +                    SdevHeader->Length = (UINT16)(sizeof(ACPI_SDEV_NAMESPACE) +
> +                        Subtable->Length + Namesp->DeviceIdLength);
>                  }
>              }
>  
> -            /* Final size of entire namespace structure */
> -
> -            SdevHeader->Length = (UINT16) (sizeof (ACPI_SDEV_NAMESPACE) +
> -                Subtable->Length + Namesp->DeviceIdLength);
>              break;
>  
>          case ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE:
> @@ -1620,7 +1621,9 @@ DtCompileSlit (
>      DT_SUBTABLE             *ParentTable;
>      DT_FIELD                **PFieldList = (DT_FIELD **) List;
>      DT_FIELD                *FieldList;
> +    DT_FIELD                *EndOfFieldList = NULL;
>      UINT32                  Localities;
> +    UINT32                  LocalityListLength;
>      UINT8                   *LocalityBuffer;
>  
>  
> @@ -1636,6 +1639,7 @@ DtCompileSlit (
>  
>      Localities = *ACPI_CAST_PTR (UINT32, Subtable->Buffer);
>      LocalityBuffer = UtLocalCalloc (Localities);
> +    LocalityListLength = 0;
>  
>      /* Compile each locality buffer */
>  
> @@ -1645,11 +1649,22 @@ DtCompileSlit (
>          DtCompileBuffer (LocalityBuffer,
>              FieldList->Value, FieldList, Localities);
>  
> +        LocalityListLength++;
>          DtCreateSubtable (LocalityBuffer, Localities, &Subtable);
>          DtInsertSubtable (ParentTable, Subtable);
> +        EndOfFieldList = FieldList;
>          FieldList = FieldList->Next;
>      }
>  
> +    if (LocalityListLength != Localities)
> +    {
> +        sprintf(AslGbl_MsgBuffer,
> +            "Found %u entries, must match LocalityCount: %u",
> +            LocalityListLength, Localities);
> +        DtError (ASL_ERROR, ASL_MSG_ENTRY_LIST, EndOfFieldList, AslGbl_MsgBuffer);
> +        return (AE_LIMIT);
> +    }
> +
>      ACPI_FREE (LocalityBuffer);
>      return (AE_OK);
>  }
> diff --git a/src/acpica/source/components/debugger/dbconvert.c b/src/acpica/source/components/debugger/dbconvert.c
> index 631e7e8f..6b58bf5f 100644
> --- a/src/acpica/source/components/debugger/dbconvert.c
> +++ b/src/acpica/source/components/debugger/dbconvert.c
> @@ -274,6 +274,10 @@ AcpiDbConvertToBuffer (
>      ACPI_STATUS             Status;
>  
>  
> +    /* Skip all preceding white space*/
> +
> +    AcpiUtRemoveWhitespace (&String);
> +
>      /* Generate the final buffer length */
>  
>      for (i = 0, Length = 0; String[i];)
> diff --git a/src/acpica/source/components/debugger/dbdisply.c b/src/acpica/source/components/debugger/dbdisply.c
> index 539ff5af..72bf1c6b 100644
> --- a/src/acpica/source/components/debugger/dbdisply.c
> +++ b/src/acpica/source/components/debugger/dbdisply.c
> @@ -713,7 +713,6 @@ AcpiDbDisplayResults (
>          return;
>      }
>  
> -    ObjDesc = WalkState->MethodDesc;
>      Node  = WalkState->MethodNode;
>  
>      if (WalkState->Results)
> @@ -773,7 +772,6 @@ AcpiDbDisplayCallingTree (
>          return;
>      }
>  
> -    Node = WalkState->MethodNode;
>      AcpiOsPrintf ("Current Control Method Call Tree\n");
>  
>      while (WalkState)
> diff --git a/src/acpica/source/components/debugger/dbfileio.c b/src/acpica/source/components/debugger/dbfileio.c
> index e937c3e4..7567fa75 100644
> --- a/src/acpica/source/components/debugger/dbfileio.c
> +++ b/src/acpica/source/components/debugger/dbfileio.c
> @@ -253,7 +253,7 @@ AcpiDbLoadTables (
>      {
>          Table = TableListHead->Table;
>  
> -        Status = AcpiLoadTable (Table);
> +        Status = AcpiLoadTable (Table, NULL);
>          if (ACPI_FAILURE (Status))
>          {
>              if (Status == AE_ALREADY_EXISTS)
> diff --git a/src/acpica/source/components/debugger/dbinput.c b/src/acpica/source/components/debugger/dbinput.c
> index d091d351..c854cb37 100644
> --- a/src/acpica/source/components/debugger/dbinput.c
> +++ b/src/acpica/source/components/debugger/dbinput.c
> @@ -208,6 +208,7 @@ enum AcpiExDebuggerCommands
>      CMD_EVALUATE,
>      CMD_EXECUTE,
>      CMD_EXIT,
> +    CMD_FIELDS,
>      CMD_FIND,
>      CMD_GO,
>      CMD_HANDLERS,
> @@ -287,6 +288,7 @@ static const ACPI_DB_COMMAND_INFO   AcpiGbl_DbCommands[] =
>      {"EVALUATE",     1},
>      {"EXECUTE",      1},
>      {"EXIT",         0},
> +    {"FIELDS",       1},
>      {"FIND",         1},
>      {"GO",           0},
>      {"HANDLERS",     0},
> @@ -360,6 +362,7 @@ static const ACPI_DB_COMMAND_HELP   AcpiGbl_DbCommandHelp[] =
>      {1, "  Find <AcpiName> (? is wildcard)",    "Find ACPI name(s) with wildcards\n"},
>      {1, "  Integrity",                          "Validate namespace integrity\n"},
>      {1, "  Methods",                            "Display list of loaded control methods\n"},
> +    {1, "  Fields <AddressSpaceId>",            "Display list of loaded field units by space ID\n"},
>      {1, "  Namespace [Object] [Depth]",         "Display loaded namespace tree/subtree\n"},
>      {1, "  Notify <Object> <Value>",            "Send a notification on Object\n"},
>      {1, "  Objects [ObjectType]",               "Display summary of all objects or just given type\n"},
> @@ -683,6 +686,22 @@ AcpiDbGetNextToken (
>          }
>          break;
>  
> +    case '{':
> +
> +        /* This is the start of a field unit, scan until closing brace */
> +
> +        String++;
> +        Start = String;
> +        Type = ACPI_TYPE_FIELD_UNIT;
> +
> +        /* Find end of buffer */
> +
> +        while (*String && (*String != '}'))
> +        {
> +            String++;
> +        }
> +        break;
> +
>      case '[':
>  
>          /* This is the start of a package, scan until closing bracket */
> @@ -877,6 +896,7 @@ AcpiDbCommandDispatch (
>      ACPI_PARSE_OBJECT       *Op)
>  {
>      UINT32                  Temp;
> +    UINT64                  Temp64;
>      UINT32                  CommandIndex;
>      UINT32                  ParamCount;
>      char                    *CommandLine;
> @@ -894,7 +914,6 @@ AcpiDbCommandDispatch (
>  
>      ParamCount = AcpiDbGetLine (InputBuffer);
>      CommandIndex = AcpiDbMatchCommand (AcpiGbl_DbArgs[0]);
> -    Temp = 0;
>  
>      /*
>       * We don't want to add the !! command to the history buffer. It
> @@ -993,6 +1012,21 @@ AcpiDbCommandDispatch (
>          Status = AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);
>          break;
>  
> +    case CMD_FIELDS:
> +
> +        Status = AcpiUtStrtoul64 (AcpiGbl_DbArgs[1], &Temp64);
> +
> +        if (ACPI_FAILURE (Status) || Temp64 >= ACPI_NUM_PREDEFINED_REGIONS)
> +        {
> +            AcpiOsPrintf (
> +                "Invalid adress space ID: must be between 0 and %u inclusive\n",
> +                ACPI_NUM_PREDEFINED_REGIONS - 1);
> +            return (AE_OK);
> +        }
> +
> +        Status = AcpiDbDisplayFields ((UINT32) Temp64);
> +        break;
> +
>      case CMD_GO:
>  
>          AcpiGbl_CmSingleStep = FALSE;
> diff --git a/src/acpica/source/components/debugger/dbmethod.c b/src/acpica/source/components/debugger/dbmethod.c
> index 6893c550..24c014f9 100644
> --- a/src/acpica/source/components/debugger/dbmethod.c
> +++ b/src/acpica/source/components/debugger/dbmethod.c
> @@ -515,6 +515,11 @@ AcpiDbDisassembleMethod (
>      WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
>  
>      Status = AcpiPsParseAml (WalkState);
> +    if (ACPI_FAILURE(Status))
> +    {
> +        return (Status);
> +    }
> +
>      (void) AcpiDmParseDeferredOps (Op);
>  
>      /* Now we can disassemble the method */
> diff --git a/src/acpica/source/components/debugger/dbnames.c b/src/acpica/source/components/debugger/dbnames.c
> index 2c9af4be..ac366ab0 100644
> --- a/src/acpica/source/components/debugger/dbnames.c
> +++ b/src/acpica/source/components/debugger/dbnames.c
> @@ -154,6 +154,7 @@
>  #include "acnamesp.h"
>  #include "acdebug.h"
>  #include "acpredef.h"
> +#include "acinterp.h"
>  
>  
>  #define _COMPONENT          ACPI_CA_DEBUGGER
> @@ -722,6 +723,91 @@ AcpiDbWalkForObjectCounts (
>  }
>  
>  
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiDbWalkForFields
> + *
> + * PARAMETERS:  Callback from WalkNamespace
> + *
> + * RETURN:      Status
> + *
> + * DESCRIPTION: Display short info about objects in the namespace
> + *
> + ******************************************************************************/
> +
> +static ACPI_STATUS
> +AcpiDbWalkForFields (
> +    ACPI_HANDLE             ObjHandle,
> +    UINT32                  NestingLevel,
> +    void                    *Context,
> +    void                    **ReturnValue)
> +{
> +    ACPI_OBJECT             *RetValue;
> +    ACPI_REGION_WALK_INFO   *Info = (ACPI_REGION_WALK_INFO *) Context;
> +    ACPI_BUFFER             Buffer;
> +    ACPI_STATUS             Status;
> +    ACPI_NAMESPACE_NODE     *Node = AcpiNsValidateHandle (ObjHandle);
> +
> +
> +    if (!Node)
> +    {
> +       return (AE_OK);
> +    }
> +    if (Node->Object->Field.RegionObj->Region.SpaceId != Info->AddressSpaceId)
> +    {
> +       return (AE_OK);
> +    }
> +
> +    Info->Count++;
> +
> +    /* Get and display the full pathname to this object */
> +
> +    Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
> +    Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, TRUE);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        AcpiOsPrintf ("Could Not get pathname for object %p\n", ObjHandle);
> +        return (AE_OK);
> +    }
> +
> +    AcpiOsPrintf ("%s ", (char *) Buffer.Pointer);
> +    ACPI_FREE (Buffer.Pointer);
> +
> +    Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
> +    AcpiEvaluateObject (ObjHandle, NULL, NULL, &Buffer);
> +
> +    /*
> +     * Since this is a field unit, surround the output in braces
> +     */
> +    AcpiOsPrintf ("{");
> +
> +    RetValue = (ACPI_OBJECT *) Buffer.Pointer;
> +    switch (RetValue->Type)
> +    {
> +        case ACPI_TYPE_INTEGER:
> +
> +            AcpiOsPrintf ("%8.8X%8.8X", ACPI_FORMAT_UINT64 (RetValue->Integer.Value));
> +            break;
> +
> +        case ACPI_TYPE_BUFFER:
> +
> +            AcpiUtDumpBuffer (RetValue->Buffer.Pointer,
> +                RetValue->Buffer.Length, DB_DISPLAY_DATA_ONLY | DB_BYTE_DISPLAY, 0);
> +            break;
> +
> +        default:
> +
> +            break;
> +    }
> +
> +    AcpiOsPrintf ("}\n");
> +
> +    ACPI_FREE (Buffer.Pointer);
> +    return (AE_OK);
> +}
> +
> +
> +
>  /*******************************************************************************
>   *
>   * FUNCTION:    AcpiDbWalkForSpecificObjects
> @@ -857,6 +943,42 @@ AcpiDbDisplayObjects (
>  }
>  
>  
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiDbDisplayFields
> + *
> + * PARAMETERS:  ObjTypeArg          - Type of object to display
> + *              DisplayCountArg     - Max depth to display
> + *
> + * RETURN:      None
> + *
> + * DESCRIPTION: Display objects in the namespace of the requested type
> + *
> + ******************************************************************************/
> +
> +ACPI_STATUS
> +AcpiDbDisplayFields (
> +    UINT32                  AddressSpaceId)
> +{
> +    ACPI_REGION_WALK_INFO  Info;
> +
> +
> +    Info.Count = 0;
> +    Info.OwnerId = ACPI_OWNER_ID_MAX;
> +    Info.DebugLevel = ACPI_UINT32_MAX;
> +    Info.DisplayType = ACPI_DISPLAY_SUMMARY | ACPI_DISPLAY_SHORT;
> +    Info.AddressSpaceId = AddressSpaceId;
> +
> +    /* Walk the namespace from the root */
> +
> +    (void) AcpiWalkNamespace (ACPI_TYPE_LOCAL_REGION_FIELD, ACPI_ROOT_OBJECT,
> +          ACPI_UINT32_MAX, AcpiDbWalkForFields, NULL,
> +          (void *) &Info, NULL);
> +
> +    return (AE_OK);
> +}
> +
> +
>  /*******************************************************************************
>   *
>   * FUNCTION:    AcpiDbIntegrityWalk
> diff --git a/src/acpica/source/components/debugger/dbobject.c b/src/acpica/source/components/debugger/dbobject.c
> index cebf4420..cffa0a53 100644
> --- a/src/acpica/source/components/debugger/dbobject.c
> +++ b/src/acpica/source/components/debugger/dbobject.c
> @@ -649,7 +649,6 @@ AcpiDbDecodeArguments (
>  
>  
>      Node = WalkState->MethodNode;
> -    ObjDesc = WalkState->MethodDesc;
>  
>      /* There are no arguments for the module-level code case */
>  
> diff --git a/src/acpica/source/components/disassembler/dmdeferred.c b/src/acpica/source/components/disassembler/dmdeferred.c
> index d0753bb0..d0a589c9 100644
> --- a/src/acpica/source/components/disassembler/dmdeferred.c
> +++ b/src/acpica/source/components/disassembler/dmdeferred.c
> @@ -309,6 +309,10 @@ AcpiDmDeferredParse (
>      WalkState->ParseFlags &= ~ACPI_PARSE_DELETE_TREE;
>      WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
>      Status = AcpiPsParseAml (WalkState);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        return_ACPI_STATUS(Status);
> +    }
>  
>      StartOp = (Op->Common.Value.Arg)->Common.Next;
>      SearchOp = StartOp;
> diff --git a/src/acpica/source/components/disassembler/dmresrc.c b/src/acpica/source/components/disassembler/dmresrc.c
> index bb36b734..c2e85b8a 100644
> --- a/src/acpica/source/components/disassembler/dmresrc.c
> +++ b/src/acpica/source/components/disassembler/dmresrc.c
> @@ -441,7 +441,6 @@ AcpiDmResourceTemplate (
>                   * missing EndDependentDescriptor.
>                   */
>                  Level--;
> -                DependentFns = FALSE;
>  
>                  /* Go ahead and insert EndDependentFn() */
>  
> diff --git a/src/acpica/source/components/disassembler/dmwalk.c b/src/acpica/source/components/disassembler/dmwalk.c
> index 8ec8728e..97b33039 100644
> --- a/src/acpica/source/components/disassembler/dmwalk.c
> +++ b/src/acpica/source/components/disassembler/dmwalk.c
> @@ -957,7 +957,6 @@ AcpiDmDescendingOp (
>                   * the buffer size Op. Open up a new block
>                   */
>                  NextOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
> -                NextOp = NextOp->Common.Next;
>                  ASL_CV_CLOSE_PAREN (Op, Level);
>  
>                  /* Emit description comment for Name() with a predefined ACPI name */
> diff --git a/src/acpica/source/components/dispatcher/dscontrol.c b/src/acpica/source/components/dispatcher/dscontrol.c
> index 238c77bb..85b4679e 100644
> --- a/src/acpica/source/components/dispatcher/dscontrol.c
> +++ b/src/acpica/source/components/dispatcher/dscontrol.c
> @@ -235,7 +235,7 @@ AcpiDsExecBeginControlOp (
>          ControlState->Control.Opcode =
>              Op->Common.AmlOpcode;
>          ControlState->Control.LoopTimeout = AcpiOsGetTimer () +
> -           (UINT64) (AcpiGbl_MaxLoopIterations * ACPI_100NSEC_PER_SEC);
> +           ((UINT64) AcpiGbl_MaxLoopIterations * ACPI_100NSEC_PER_SEC);
>  
>          /* Push the control state on this walk's control stack */
>  
> diff --git a/src/acpica/source/components/dispatcher/dsfield.c b/src/acpica/source/components/dispatcher/dsfield.c
> index 3aff4db1..5477686f 100644
> --- a/src/acpica/source/components/dispatcher/dsfield.c
> +++ b/src/acpica/source/components/dispatcher/dsfield.c
> @@ -309,7 +309,6 @@ AcpiDsCreateBufferField (
>      if (WalkState->DeferredNode)
>      {
>          Node = WalkState->DeferredNode;
> -        Status = AE_OK;
>      }
>      else
>      {
> @@ -435,7 +434,6 @@ AcpiDsGetFieldNames (
>      ACPI_PARSE_OBJECT       *Child;
>  
>  #ifdef ACPI_EXEC_APP
> -    UINT64                  Value = 0;
>      ACPI_OPERAND_OBJECT     *ResultDesc;
>      ACPI_OPERAND_OBJECT     *ObjDesc;
>      char                    *NamePath;
> @@ -577,14 +575,13 @@ AcpiDsGetFieldNames (
>                      }
>  #ifdef ACPI_EXEC_APP
>                      NamePath = AcpiNsGetExternalPathname (Info->FieldNode);
> -                    ObjDesc = AcpiUtCreateIntegerObject (Value);
> -                    if (ACPI_SUCCESS (AeLookupInitFileEntry (NamePath, &Value)))
> +                    if (ACPI_SUCCESS (AeLookupInitFileEntry (NamePath, &ObjDesc)))
>                      {
>                          AcpiExWriteDataToField (ObjDesc,
>                              AcpiNsGetAttachedObject (Info->FieldNode),
>                              &ResultDesc);
> +                        AcpiUtRemoveReference (ObjDesc);
>                      }
> -                    AcpiUtRemoveReference (ObjDesc);
>                      ACPI_FREE (NamePath);
>  #endif
>                  }
> @@ -813,8 +810,6 @@ AcpiDsInitFieldObjects (
>                  }
>  
>                  /* Name already exists, just ignore this error */
> -
> -                Status = AE_OK;
>              }
>  
>              Arg->Common.Node = Node;
> diff --git a/src/acpica/source/components/events/evgpeblk.c b/src/acpica/source/components/events/evgpeblk.c
> index 80157dcd..e0e2780f 100644
> --- a/src/acpica/source/components/events/evgpeblk.c
> +++ b/src/acpica/source/components/events/evgpeblk.c
> @@ -272,6 +272,10 @@ AcpiEvDeleteGpeBlock (
>      /* Disable all GPEs in this block */
>  
>      Status = AcpiHwDisableGpeBlock (GpeBlock->XruptBlock, GpeBlock, NULL);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        return_ACPI_STATUS (Status);
> +    }
>  
>      if (!GpeBlock->Previous && !GpeBlock->Next)
>      {
> @@ -542,7 +546,7 @@ AcpiEvCreateGpeBlock (
>      WalkInfo.GpeDevice = GpeDevice;
>      WalkInfo.ExecuteByOwnerId = FALSE;
>  
> -    Status = AcpiNsWalkNamespace (ACPI_TYPE_METHOD, GpeDevice,
> +    (void) AcpiNsWalkNamespace (ACPI_TYPE_METHOD, GpeDevice,
>          ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK,
>          AcpiEvMatchGpeMethod, NULL, &WalkInfo, NULL);
>  
> diff --git a/src/acpica/source/components/events/evgpeinit.c b/src/acpica/source/components/events/evgpeinit.c
> index b7e02a06..7e3c766c 100644
> --- a/src/acpica/source/components/events/evgpeinit.c
> +++ b/src/acpica/source/components/events/evgpeinit.c
> @@ -302,8 +302,6 @@ AcpiEvGpeInitialize (
>               * GPE0 and GPE1 do not have to be contiguous in the GPE number
>               * space. However, GPE0 always starts at GPE number zero.
>               */
> -            GpeNumberMax = AcpiGbl_FADT.Gpe1Base +
> -                ((RegisterCount1 * ACPI_GPE_REGISTER_WIDTH) - 1);
>          }
>      }
>  
> @@ -315,7 +313,6 @@ AcpiEvGpeInitialize (
>  
>          ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
>              "There are no GPE blocks defined in the FADT\n"));
> -        Status = AE_OK;
>          goto Cleanup;
>      }
>  
> diff --git a/src/acpica/source/components/events/evmisc.c b/src/acpica/source/components/events/evmisc.c
> index f73cc2f3..68f1dc8a 100644
> --- a/src/acpica/source/components/events/evmisc.c
> +++ b/src/acpica/source/components/events/evmisc.c
> @@ -400,11 +400,16 @@ AcpiEvTerminate (
>          /* Disable all GPEs in all GPE blocks */
>  
>          Status = AcpiEvWalkGpeList (AcpiHwDisableGpeBlock, NULL);
> +        if (ACPI_FAILURE (Status))
> +        {
> +            ACPI_EXCEPTION ((AE_INFO, Status,
> +                "Could not disable GPEs in GPE block"));
> +        }
>  
>          Status = AcpiEvRemoveGlobalLockHandler ();
> -        if (ACPI_FAILURE(Status))
> +        if (ACPI_FAILURE (Status))
>          {
> -            ACPI_ERROR ((AE_INFO,
> +            ACPI_EXCEPTION ((AE_INFO, Status,
>                  "Could not remove Global Lock handler"));
>          }
>  
> @@ -414,7 +419,7 @@ AcpiEvTerminate (
>      /* Remove SCI handlers */
>  
>      Status = AcpiEvRemoveAllSciHandlers ();
> -    if (ACPI_FAILURE(Status))
> +    if (ACPI_FAILURE (Status))
>      {
>          ACPI_ERROR ((AE_INFO,
>              "Could not remove SCI handler"));
> @@ -423,6 +428,12 @@ AcpiEvTerminate (
>      /* Deallocate all handler objects installed within GPE info structs */
>  
>      Status = AcpiEvWalkGpeList (AcpiEvDeleteGpeHandlers, NULL);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        ACPI_EXCEPTION ((AE_INFO, Status,
> +            "Could not delete GPE handlers"));
> +    }
> +
>  
>      /* Return to original mode if necessary */
>  
> diff --git a/src/acpica/source/components/events/evregion.c b/src/acpica/source/components/events/evregion.c
> index 6f6d7ccc..13a20918 100644
> --- a/src/acpica/source/components/events/evregion.c
> +++ b/src/acpica/source/components/events/evregion.c
> @@ -1037,11 +1037,11 @@ AcpiEvOrphanEcRegMethod (
>      Objects[1].Type = ACPI_TYPE_INTEGER;
>      Objects[1].Integer.Value = ACPI_REG_CONNECT;
>  
> -    Status = AcpiEvaluateObject (RegMethod, NULL, &Args, NULL);
> +    (void) AcpiEvaluateObject (RegMethod, NULL, &Args, NULL);
>  
>  Exit:
>      /* We ignore all errors from above, don't care */
>  
> -    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
> +    (void) AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
>      return_VOID;
>  }
> diff --git a/src/acpica/source/components/events/evrgnini.c b/src/acpica/source/components/events/evrgnini.c
> index 718e2e87..3c865c59 100644
> --- a/src/acpica/source/components/events/evrgnini.c
> +++ b/src/acpica/source/components/events/evrgnini.c
> @@ -363,7 +363,6 @@ AcpiEvPciConfigRegionSetup (
>                           * root bridge. Still need to return a context object
>                           * for the new PCI_Config operation region, however.
>                           */
> -                        Status = AE_OK;
>                      }
>                      else
>                      {
> diff --git a/src/acpica/source/components/hardware/hwxfsleep.c b/src/acpica/source/components/hardware/hwxfsleep.c
> index 3df8f5a5..78dc1902 100644
> --- a/src/acpica/source/components/hardware/hwxfsleep.c
> +++ b/src/acpica/source/components/hardware/hwxfsleep.c
> @@ -357,6 +357,10 @@ AcpiEnterSleepStateS4bios (
>  
>      Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
>          (UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        return_ACPI_STATUS (Status);
> +    }
>  
>      do {
>          AcpiOsStall (ACPI_USEC_PER_MSEC);
> diff --git a/src/acpica/source/components/namespace/nsconvert.c b/src/acpica/source/components/namespace/nsconvert.c
> index d2b32d25..ae590490 100644
> --- a/src/acpica/source/components/namespace/nsconvert.c
> +++ b/src/acpica/source/components/namespace/nsconvert.c
> @@ -670,5 +670,5 @@ AcpiNsConvertToReference (
>  ErrorExit:
>      ACPI_FREE (Name);
>      *ReturnObject = NewObject;
> -    return (AE_OK);
> +    return (Status);
>  }
> diff --git a/src/acpica/source/components/namespace/nsdump.c b/src/acpica/source/components/namespace/nsdump.c
> index 8a2a7e92..0ed4d72c 100644
> --- a/src/acpica/source/components/namespace/nsdump.c
> +++ b/src/acpica/source/components/namespace/nsdump.c
> @@ -478,7 +478,7 @@ AcpiNsDumpOneObject (
>                      AcpiOsPrintf (" =");
>                      for (i = 0; (i < ObjDesc->Buffer.Length && i < 12); i++)
>                      {
> -                        AcpiOsPrintf (" %.2hX", ObjDesc->Buffer.Pointer[i]);
> +                        AcpiOsPrintf (" %2.2X", ObjDesc->Buffer.Pointer[i]);
>                      }
>                  }
>                  AcpiOsPrintf ("\n");
> @@ -575,7 +575,7 @@ AcpiNsDumpOneObject (
>          case ACPI_TYPE_LOCAL_BANK_FIELD:
>          case ACPI_TYPE_LOCAL_INDEX_FIELD:
>  
> -            AcpiOsPrintf (" Off %.3X Len %.2X Acc %.2hd\n",
> +            AcpiOsPrintf (" Off %.3X Len %.2X Acc %.2X\n",
>                  (ObjDesc->CommonField.BaseByteOffset * 8)
>                      + ObjDesc->CommonField.StartFieldBitOffset,
>                  ObjDesc->CommonField.BitLength,
> @@ -760,8 +760,6 @@ AcpiNsDumpOneObject (
>  
>              goto Cleanup;
>          }
> -
> -        ObjType = ACPI_TYPE_INVALID;   /* Terminate loop after next pass */
>      }
>  
>  Cleanup:
> diff --git a/src/acpica/source/components/namespace/nsxfname.c b/src/acpica/source/components/namespace/nsxfname.c
> index 7332a92f..85be591f 100644
> --- a/src/acpica/source/components/namespace/nsxfname.c
> +++ b/src/acpica/source/components/namespace/nsxfname.c
> @@ -611,7 +611,7 @@ AcpiGetObjectInfo (
>  
>      if (Cls)
>      {
> -        NextIdString = AcpiNsCopyDeviceId (&Info->ClassCode,
> +       (void) AcpiNsCopyDeviceId (&Info->ClassCode,
>              Cls, NextIdString);
>      }
>  
> diff --git a/src/acpica/source/components/parser/psobject.c b/src/acpica/source/components/parser/psobject.c
> index 61c3a868..6ceb7d91 100644
> --- a/src/acpica/source/components/parser/psobject.c
> +++ b/src/acpica/source/components/parser/psobject.c
> @@ -652,7 +652,7 @@ AcpiPsCompleteOp (
>              WalkState->Opcode = (*Op)->Common.AmlOpcode;
>  
>              Status = WalkState->AscendingCallback (WalkState);
> -            Status = AcpiPsNextParseState (WalkState, *Op, Status);
> +            (void) AcpiPsNextParseState (WalkState, *Op, Status);
>  
>              Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
>              if (ACPI_FAILURE (Status2))
> @@ -661,7 +661,6 @@ AcpiPsCompleteOp (
>              }
>          }
>  
> -        Status = AE_OK;
>          break;
>  
>      case AE_CTRL_BREAK:
> @@ -682,7 +681,7 @@ AcpiPsCompleteOp (
>          WalkState->Opcode = (*Op)->Common.AmlOpcode;
>  
>          Status = WalkState->AscendingCallback (WalkState);
> -        Status = AcpiPsNextParseState (WalkState, *Op, Status);
> +        (void) AcpiPsNextParseState (WalkState, *Op, Status);
>  
>          Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
>          if (ACPI_FAILURE (Status2))
> @@ -690,7 +689,6 @@ AcpiPsCompleteOp (
>              return_ACPI_STATUS (Status2);
>          }
>  
> -        Status = AE_OK;
>          break;
>  
>      case AE_CTRL_TERMINATE:
> diff --git a/src/acpica/source/components/resources/rscreate.c b/src/acpica/source/components/resources/rscreate.c
> index 26640c20..172bc55f 100644
> --- a/src/acpica/source/components/resources/rscreate.c
> +++ b/src/acpica/source/components/resources/rscreate.c
> @@ -481,6 +481,10 @@ AcpiRsCreatePciRoutingTable (
>  
>                  Status = AcpiNsHandleToPathname (
>                      (ACPI_HANDLE) Node, &PathBuffer, FALSE);
> +                if (ACPI_FAILURE (Status))
> +                {
> +                    return_ACPI_STATUS (Status);
> +                }
>  
>                  /* +1 to include null terminator */
>  
> diff --git a/src/acpica/source/components/tables/tbdata.c b/src/acpica/source/components/tables/tbdata.c
> index 84dd25bd..6eb1f24a 100644
> --- a/src/acpica/source/components/tables/tbdata.c
> +++ b/src/acpica/source/components/tables/tbdata.c
> @@ -1190,6 +1190,10 @@ AcpiTbLoadTable (
>      }
>  
>      Status = AcpiNsLoadTable (TableIndex, ParentNode);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        return_ACPI_STATUS (Status);
> +    }
>  
>      /*
>       * Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is
> diff --git a/src/acpica/source/components/tables/tbxfload.c b/src/acpica/source/components/tables/tbxfload.c
> index 1e17db6c..24daafcf 100644
> --- a/src/acpica/source/components/tables/tbxfload.c
> +++ b/src/acpica/source/components/tables/tbxfload.c
> @@ -445,6 +445,8 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInstallTable)
>   *
>   * PARAMETERS:  Table               - Pointer to a buffer containing the ACPI
>   *                                    table to be loaded.
> + *              TableIdx            - Pointer to a UINT32 for storing the table
> + *                                    index, might be NULL
>   *
>   * RETURN:      Status
>   *
> @@ -458,7 +460,8 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInstallTable)
>  
>  ACPI_STATUS
>  AcpiLoadTable (
> -    ACPI_TABLE_HEADER       *Table)
> +    ACPI_TABLE_HEADER       *Table,
> +    UINT32                  *TableIdx)
>  {
>      ACPI_STATUS             Status;
>      UINT32                  TableIndex;
> @@ -479,6 +482,11 @@ AcpiLoadTable (
>      ACPI_INFO (("Host-directed Dynamic ACPI Table Load:"));
>      Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table),
>          ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, FALSE, &TableIndex);
> +    if (TableIdx)
> +    {
> +        *TableIdx = TableIndex;
> +    }
> +
>      if (ACPI_SUCCESS (Status))
>      {
>          /* Complete the initialization/resolution of new objects */
> @@ -582,3 +590,42 @@ AcpiUnloadParentTable (
>  }
>  
>  ACPI_EXPORT_SYMBOL (AcpiUnloadParentTable)
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION:    AcpiUnloadTable
> + *
> + * PARAMETERS:  TableIndex          - Index as returned by AcpiLoadTable
> + *
> + * RETURN:      Status
> + *
> + * DESCRIPTION: Via the TableIndex representing an SSDT or OEMx table, unloads
> + *              the table and deletes all namespace objects associated with
> + *              that table. Unloading of the DSDT is not allowed.
> + *              Note: Mainly intended to support hotplug removal of SSDTs.
> + *
> + ******************************************************************************/
> +
> +ACPI_STATUS
> +AcpiUnloadTable (
> +    UINT32                  TableIndex)
> +{
> +    ACPI_STATUS             Status;
> +
> +
> +    ACPI_FUNCTION_TRACE (AcpiUnloadTable);
> +
> +
> +    if (TableIndex == 1)
> +    {
> +        /* TableIndex==1 means DSDT is the owner. DSDT cannot be unloaded */
> +
> +        return_ACPI_STATUS (AE_TYPE);
> +    }
> +
> +    Status = AcpiTbUnloadTable (TableIndex);
> +    return_ACPI_STATUS (Status);
> +}
> +
> +ACPI_EXPORT_SYMBOL (AcpiUnloadTable)
> diff --git a/src/acpica/source/components/utilities/utbuffer.c b/src/acpica/source/components/utilities/utbuffer.c
> index 44fd30a6..015c16f9 100644
> --- a/src/acpica/source/components/utilities/utbuffer.c
> +++ b/src/acpica/source/components/utilities/utbuffer.c
> @@ -186,8 +186,10 @@ AcpiUtDumpBuffer (
>      UINT32                  j;
>      UINT32                  Temp32;
>      UINT8                   BufChar;
> +    UINT32                  DisplayDataOnly = Display & DB_DISPLAY_DATA_ONLY;
>  
>  
> +    Display &= ~DB_DISPLAY_DATA_ONLY;
>      if (!Buffer)
>      {
>          AcpiOsPrintf ("Null Buffer Pointer in DumpBuffer!\n");
> @@ -205,7 +207,10 @@ AcpiUtDumpBuffer (
>      {
>          /* Print current offset */
>  
> -        AcpiOsPrintf ("%8.4X: ", (BaseOffset + i));
> +        if (!DisplayDataOnly)
> +        {
> +            AcpiOsPrintf ("%8.4X: ", (BaseOffset + i));
> +        }
>  
>          /* Print 16 hex chars */
>  
> @@ -257,38 +262,41 @@ AcpiUtDumpBuffer (
>           * Print the ASCII equivalent characters but watch out for the bad
>           * unprintable ones (printable chars are 0x20 through 0x7E)
>           */
> -        AcpiOsPrintf (" ");
> -        for (j = 0; j < 16; j++)
> +        if (!DisplayDataOnly)
>          {
> -            if (i + j >= Count)
> +            AcpiOsPrintf (" ");
> +            for (j = 0; j < 16; j++)
>              {
> -                AcpiOsPrintf ("\n");
> -                return;
> +                if (i + j >= Count)
> +                {
> +                    AcpiOsPrintf ("\n");
> +                    return;
> +                }
> +
> +                /*
> +                 * Add comment characters so rest of line is ignored when
> +                 * compiled
> +                 */
> +                if (j == 0)
> +                {
> +                    AcpiOsPrintf ("// ");
> +                }
> +
> +                BufChar = Buffer[(ACPI_SIZE) i + j];
> +                if (isprint (BufChar))
> +                {
> +                    AcpiOsPrintf ("%c", BufChar);
> +                }
> +                else
> +                {
> +                    AcpiOsPrintf (".");
> +                }
>              }
>  
> -            /*
> -             * Add comment characters so rest of line is ignored when
> -             * compiled
> -             */
> -            if (j == 0)
> -            {
> -                AcpiOsPrintf ("// ");
> -            }
> +            /* Done with that line. */
>  
> -            BufChar = Buffer[(ACPI_SIZE) i + j];
> -            if (isprint (BufChar))
> -            {
> -                AcpiOsPrintf ("%c", BufChar);
> -            }
> -            else
> -            {
> -                AcpiOsPrintf (".");
> -            }
> +            AcpiOsPrintf ("\n");
>          }
> -
> -        /* Done with that line. */
> -
> -        AcpiOsPrintf ("\n");
>          i += 16;
>      }
>  
> diff --git a/src/acpica/source/components/utilities/utids.c b/src/acpica/source/components/utilities/utids.c
> index 5fcfbf66..513548c2 100644
> --- a/src/acpica/source/components/utilities/utids.c
> +++ b/src/acpica/source/components/utilities/utids.c
> @@ -466,7 +466,8 @@ AcpiUtExecute_CID (
>          {
>              /* Copy the String CID from the returned object */
>  
> -            strcpy (NextIdString, CidObjects[i]->String.Pointer);
> +            AcpiUtSafeStrcpy (NextIdString, CidObjects[i]->String.Length + 1,
> +                CidObjects[i]->String.Pointer);
>              Length = CidObjects[i]->String.Length + 1;
>          }
>  
> diff --git a/src/acpica/source/components/utilities/uttrack.c b/src/acpica/source/components/utilities/uttrack.c
> index c6e6b45b..76e439fe 100644
> --- a/src/acpica/source/components/utilities/uttrack.c
> +++ b/src/acpica/source/components/utilities/uttrack.c
> @@ -864,7 +864,7 @@ AcpiUtDumpAllocations (
>  
>                      case ACPI_DESC_TYPE_PARSER:
>  
> -                        AcpiOsPrintf ("AmlOpcode 0x%04hX\n",
> +                        AcpiOsPrintf ("AmlOpcode 0x%04X\n",
>                              Descriptor->Op.Asl.AmlOpcode);
>                          break;
>  
> diff --git a/src/acpica/source/include/acdebug.h b/src/acpica/source/include/acdebug.h
> index 4e43bbee..f296cb94 100644
> --- a/src/acpica/source/include/acdebug.h
> +++ b/src/acpica/source/include/acdebug.h
> @@ -392,6 +392,10 @@ void
>  AcpiDbGetBusInfo (
>      void);
>  
> +ACPI_STATUS
> +AcpiDbDisplayFields (
> +    UINT32                  AddressSpaceId);
> +
>  
>  /*
>   * dbdisply - debug display commands
> diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
> index a123eed7..62e37909 100644
> --- a/src/acpica/source/include/acpixf.h
> +++ b/src/acpica/source/include/acpixf.h
> @@ -154,7 +154,7 @@
>  
>  /* Current ACPICA subsystem version in YYYYMMDD format */
>  
> -#define ACPI_CA_VERSION                 0x20190816
> +#define ACPI_CA_VERSION                 0x20191018
>  
>  #include "acconfig.h"
>  #include "actypes.h"
> @@ -664,7 +664,13 @@ AcpiInstallTable (
>  ACPI_EXTERNAL_RETURN_STATUS (
>  ACPI_STATUS
>  AcpiLoadTable (
> -    ACPI_TABLE_HEADER       *Table))
> +    ACPI_TABLE_HEADER       *Table,
> +    UINT32                  *TableIdx))
> +
> +ACPI_EXTERNAL_RETURN_STATUS (
> +ACPI_STATUS
> +AcpiUnloadTable (
> +    UINT32                  TableIndex))
>  
>  ACPI_EXTERNAL_RETURN_STATUS (
>  ACPI_STATUS
> diff --git a/src/acpica/source/include/acstruct.h b/src/acpica/source/include/acstruct.h
> index f81c8a7d..e6ab1d90 100644
> --- a/src/acpica/source/include/acstruct.h
> +++ b/src/acpica/source/include/acstruct.h
> @@ -357,6 +357,19 @@ typedef struct acpi_device_walk_info
>  } ACPI_DEVICE_WALK_INFO;
>  
>  
> +/* Info used by Acpi  AcpiDbDisplayFields */
> +
> +typedef struct acpi_region_walk_info
> +{
> +    UINT32                          DebugLevel;
> +    UINT32                          Count;
> +    ACPI_OWNER_ID                   OwnerId;
> +    UINT8                           DisplayType;
> +    UINT32                          AddressSpaceId;
> +
> +} ACPI_REGION_WALK_INFO;
> +
> +
>  /* TBD: [Restructure] Merge with struct above */
>  
>  typedef struct acpi_walk_info
> diff --git a/src/acpica/source/include/acutils.h b/src/acpica/source/include/acutils.h
> index 0c2327d2..6352b5ff 100644
> --- a/src/acpica/source/include/acutils.h
> +++ b/src/acpica/source/include/acutils.h
> @@ -290,10 +290,11 @@ typedef struct acpi_pkg_info
>  
>  /* AcpiUtDumpBuffer */
>  
> -#define DB_BYTE_DISPLAY     1
> -#define DB_WORD_DISPLAY     2
> -#define DB_DWORD_DISPLAY    4
> -#define DB_QWORD_DISPLAY    8
> +#define DB_BYTE_DISPLAY      0x01
> +#define DB_WORD_DISPLAY      0x02
> +#define DB_DWORD_DISPLAY     0x04
> +#define DB_QWORD_DISPLAY     0x08
> +#define DB_DISPLAY_DATA_ONLY 0x10
>  
>  
>  /*
> diff --git a/src/acpica/source/tools/acpiexec/aecommon.h b/src/acpica/source/tools/acpiexec/aecommon.h
> index 602356de..257632f7 100644
> --- a/src/acpica/source/tools/acpiexec/aecommon.h
> +++ b/src/acpica/source/tools/acpiexec/aecommon.h
> @@ -195,7 +195,8 @@ typedef struct ae_debug_regions
>  typedef struct init_file_entry
>  {
>      char                    *Name;
> -    UINT64                  Value;
> +    ACPI_OPERAND_OBJECT     *ObjDesc;
> +
>  } INIT_FILE_ENTRY;
>  
>  extern BOOLEAN              AcpiGbl_UseLocalFaultHandler;
> @@ -356,7 +357,7 @@ AeSetupConfiguration (
>  ACPI_STATUS
>  AeLookupInitFileEntry (
>      char                    *Pathname,
> -    UINT64                  *Value);
> +    ACPI_OPERAND_OBJECT     **ObjDesc);
>  
>  /* aeexec */
>  
> diff --git a/src/acpica/source/tools/acpiexec/aehandlers.c b/src/acpica/source/tools/acpiexec/aehandlers.c
> index 75e8eb0a..f7dd012e 100644
> --- a/src/acpica/source/tools/acpiexec/aehandlers.c
> +++ b/src/acpica/source/tools/acpiexec/aehandlers.c
> @@ -683,20 +683,27 @@ AeInstallLateHandlers (
>      {
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
>              AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
>  
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
>              AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
>  
>          Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
>              AeNotifyHandler1);
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
> +
>          Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
>              AeNotifyHandler2);
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
>  
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
>              AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
>  
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
>              AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
>      }
>  
>      Status = AcpiGetHandle (NULL, "\\_PR.CPU0", &Handle);
> @@ -704,9 +711,11 @@ AeInstallLateHandlers (
>      {
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
>              AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
>  
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
>              AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
>      }
>  
>  #if (!ACPI_REDUCED_HARDWARE)
> @@ -855,13 +864,15 @@ AeInstallEarlyHandlers (
>  
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
>              AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
> +        ACPI_CHECK_OK(AcpiInstallNotifyHandler, Status);
>  
>          Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
>              AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
> +        ACPI_CHECK_OK(AcpiInstallNotifyHandler, Status);
>  
>          /* Attempt duplicate handler installation, should fail */
>  
> -        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
> +        (void) AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
>              AeNotifyHandler1, ACPI_CAST_PTR (void, 0x77777777));
>  
>          Status = AcpiAttachData (Handle, AeAttachedDataHandler, Handle);
> diff --git a/src/acpica/source/tools/acpiexec/aeinitfile.c b/src/acpica/source/tools/acpiexec/aeinitfile.c
> index f895e2cc..35e2b8b8 100644
> --- a/src/acpica/source/tools/acpiexec/aeinitfile.c
> +++ b/src/acpica/source/tools/acpiexec/aeinitfile.c
> @@ -224,9 +224,13 @@ AeProcessInitFile(
>      void)
>  {
>      ACPI_WALK_STATE         *WalkState;
> -    int                     i;
>      UINT64                  idx;
>      ACPI_STATUS             Status;
> +    char                    *Token;
> +    char                    *ObjectBuffer;
> +    char                    *TempNameBuffer;
> +    ACPI_OBJECT_TYPE        Type;
> +    ACPI_OBJECT             TempObject;
>  
>  
>      if (!InitFile)
> @@ -249,26 +253,44 @@ AeProcessInitFile(
>          AcpiOsAllocate (sizeof (INIT_FILE_ENTRY) * AcpiGbl_InitFileLineCount);
>      for (idx = 0; fgets (LineBuffer, AE_FILE_BUFFER_SIZE, InitFile); ++idx)
>      {
> -        if (sscanf (LineBuffer, "%s %s\n",
> -                &NameBuffer[1], ValueBuffer) != 2)
> +
> +        TempNameBuffer = AcpiDbGetNextToken (LineBuffer, &Token, &Type);
> +        if (LineBuffer[0] == '\\')
>          {
> -            goto CleanupAndExit;
> +            strcpy (NameBuffer, TempNameBuffer);
> +        }
> +        else
> +        {
> +            /* Add a root prefix if not present in the string */
> +
> +            strcpy (NameBuffer + 1, TempNameBuffer);
>          }
>  
> -        /* Add a root prefix if not present in the string */
> +        AcpiGbl_InitEntries[idx].Name =
> +            AcpiOsAllocateZeroed (strnlen (NameBuffer, AE_FILE_BUFFER_SIZE) + 1);
> +
> +        strcpy (AcpiGbl_InitEntries[idx].Name, NameBuffer);
> +
> +        ObjectBuffer = AcpiDbGetNextToken (Token, &Token, &Type);
>  
> -        i = 0;
> -        if (NameBuffer[1] == '\\')
> +        if (Type == ACPI_TYPE_FIELD_UNIT)
> +        {
> +            Status = AcpiDbConvertToObject (ACPI_TYPE_BUFFER, ObjectBuffer,
> +                &TempObject);
> +        }
> +        else
>          {
> -            i = 1;
> +            Status = AcpiDbConvertToObject (Type, ObjectBuffer, &TempObject);
>          }
>  
> -        AcpiGbl_InitEntries[idx].Name =
> -            AcpiOsAllocateZeroed (strnlen (NameBuffer + i, AE_FILE_BUFFER_SIZE) + 1);
> +        Status = AcpiUtCopyEobjectToIobject (&TempObject,
> +            &AcpiGbl_InitEntries[idx].ObjDesc);
>  
> -        strcpy (AcpiGbl_InitEntries[idx].Name, NameBuffer + i);
> +        if (Type == ACPI_TYPE_BUFFER || Type == ACPI_TYPE_FIELD_UNIT)
> +        {
> +            ACPI_FREE (TempObject.Buffer.Pointer);
> +        }
>  
> -        Status = AcpiUtStrtoul64 (ValueBuffer, &AcpiGbl_InitEntries[idx].Value);
>          if (ACPI_FAILURE (Status))
>          {
>              AcpiOsPrintf ("%s %s\n", ValueBuffer,
> @@ -276,7 +298,16 @@ AeProcessInitFile(
>              goto CleanupAndExit;
>          }
>  
> -        AeEnterInitFileEntry (AcpiGbl_InitEntries[idx], WalkState);
> +        /*
> +         * Special case for field units. Field units are dependent on the
> +         * parent region. This parent region has yet to be created so defer the
> +         * initialization until the dispatcher. For all other types, initialize
> +         * the namespace node with the value found in the init file.
> +         */
> +        if (Type != ACPI_TYPE_FIELD_UNIT)
> +        {
> +            AeEnterInitFileEntry (AcpiGbl_InitEntries[idx], WalkState);
> +        }
>      }
>  
>      /* Cleanup */
> @@ -309,14 +340,12 @@ AeEnterInitFileEntry (
>      ACPI_WALK_STATE         *WalkState)
>  {
>      char                    *Pathname = InitEntry.Name;
> -    UINT64                  Value = InitEntry.Value;
> -    ACPI_OPERAND_OBJECT     *ObjDesc;
> +    ACPI_OPERAND_OBJECT     *ObjDesc = InitEntry.ObjDesc;
>      ACPI_NAMESPACE_NODE     *NewNode;
>      ACPI_STATUS             Status;
>  
>  
> -    AcpiOsPrintf ("Initializing namespace element: %s\n", Pathname);
> -    Status = AcpiNsLookup (NULL, Pathname, ACPI_TYPE_INTEGER,
> +    Status = AcpiNsLookup (NULL, Pathname, ObjDesc->Common.Type,
>          ACPI_IMODE_LOAD_PASS2, ACPI_NS_ERROR_IF_FOUND | ACPI_NS_NO_UPSEARCH |
>          ACPI_NS_EARLY_INIT, NULL, &NewNode);
>      if (ACPI_FAILURE (Status))
> @@ -327,15 +356,17 @@ AeEnterInitFileEntry (
>          return;
>      }
>  
> -    ObjDesc = AcpiUtCreateIntegerObject (Value);
> -
> -    AcpiOsPrintf ("New value: 0x%8.8X%8.8X\n",
> -        ACPI_FORMAT_UINT64 (Value));
> -
>      /* Store pointer to value descriptor in the Node */
>  
>      Status = AcpiNsAttachObject (NewNode, ObjDesc,
> -         ACPI_TYPE_INTEGER);
> +         ObjDesc->Common.Type);
> +    if (ACPI_FAILURE (Status))
> +    {
> +        ACPI_EXCEPTION ((AE_INFO, Status,
> +            "While attaching object to node from namespace initialization file: %s",
> +            Pathname));
> +        return;
> +    }
>  
>      /* Remove local reference to the object */
>  
> @@ -359,7 +390,7 @@ AeEnterInitFileEntry (
>  ACPI_STATUS
>  AeLookupInitFileEntry (
>      char                    *Pathname,
> -    UINT64                  *Value)
> +    ACPI_OPERAND_OBJECT     **ObjDesc)
>  {
>      UINT32                  i;
>  
> @@ -372,7 +403,7 @@ AeLookupInitFileEntry (
>      {
>          if (!strcmp(AcpiGbl_InitEntries[i].Name, Pathname))
>          {
> -            *Value = AcpiGbl_InitEntries[i].Value;
> +            *ObjDesc = AcpiGbl_InitEntries[i].ObjDesc;
>              return AE_OK;
>          }
>      }


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

Patch
diff mbox series

diff --git a/src/acpica/source/common/acgetline.c b/src/acpica/source/common/acgetline.c
index 702d046b..3865914b 100644
--- a/src/acpica/source/common/acgetline.c
+++ b/src/acpica/source/common/acgetline.c
@@ -532,7 +532,7 @@  AcpiOsGetLine (
                  * Ignore the various keys like insert/delete/home/end, etc.
                  * But we must eat the final character of the ESC sequence.
                  */
-                InputChar = getchar ();
+                (void) getchar ();
                 continue;
 
             default:
diff --git a/src/acpica/source/common/adisasm.c b/src/acpica/source/common/adisasm.c
index c73208f6..22a85009 100644
--- a/src/acpica/source/common/adisasm.c
+++ b/src/acpica/source/common/adisasm.c
@@ -746,7 +746,6 @@  AdDoExternalFileList (
             {
                 ExternalFileList = ExternalFileList->Next;
                 GlobalStatus = AE_TYPE;
-                Status = AE_OK;
                 continue;
             }
 
diff --git a/src/acpica/source/common/adwalk.c b/src/acpica/source/common/adwalk.c
index 6da2e8ec..1996c965 100644
--- a/src/acpica/source/common/adwalk.c
+++ b/src/acpica/source/common/adwalk.c
@@ -601,7 +601,9 @@  AcpiDmFindOrphanDescending (
         return (AE_OK);
     }
 
+#ifdef ACPI_UNDER_DEVELOPMENT
     OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
+#endif
 
     switch (Op->Common.AmlOpcode)
     {
@@ -1100,7 +1102,7 @@  AcpiDmCommonDescendingOp (
     /* Switch/Case conversion */
 
     Status = AcpiDmProcessSwitch (Op);
-    return (AE_OK);
+    return (Status);
 }
 
 
diff --git a/src/acpica/source/common/dmtables.c b/src/acpica/source/common/dmtables.c
index a2dbea62..e5536ecf 100644
--- a/src/acpica/source/common/dmtables.c
+++ b/src/acpica/source/common/dmtables.c
@@ -327,7 +327,7 @@  AdCreateTableHeader (
      * makes it easier to rename the disassembled ASL file if needed.
      */
     AcpiOsPrintf (
-        "DefinitionBlock (\"\", \"%4.4s\", %hu, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
+        "DefinitionBlock (\"\", \"%4.4s\", %u, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
         Table->Signature, Table->Revision,
         Table->OemId, Table->OemTableId, Table->OemRevision);
 }
@@ -601,7 +601,7 @@  AdParseTable (
     fprintf (stderr,
         "Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)\n");
 
-    Status = AcpiDmParseDeferredOps (AcpiGbl_ParseOpRoot);
+    (void) AcpiDmParseDeferredOps (AcpiGbl_ParseOpRoot);
     fprintf (stderr, "\n");
 
     /* Process Resource Templates */
diff --git a/src/acpica/source/common/dmtbdump1.c b/src/acpica/source/common/dmtbdump1.c
index c363ac8d..9061ea11 100644
--- a/src/acpica/source/common/dmtbdump1.c
+++ b/src/acpica/source/common/dmtbdump1.c
@@ -474,7 +474,6 @@  AcpiDmDumpCsrt (
                 {
                     return;
                 }
-                SubSubOffset += InfoLength;
             }
 
             /* Point to next sub-subtable */
@@ -1401,7 +1400,6 @@  AcpiDmDumpHmat (
     while (Offset < Table->Length)
     {
         AcpiOsPrintf ("\n");
-        SubtableOffset = 0;
 
         /* Dump HMAT structure header */
 
@@ -1484,6 +1482,11 @@  AcpiDmDumpHmat (
                 Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
                     ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
                     4, AcpiDmTableInfoHmat1a);
+                if (ACPI_FAILURE (Status))
+                {
+                    return;
+                }
+
                 SubtableOffset += 4;
             }
 
@@ -1500,6 +1503,11 @@  AcpiDmDumpHmat (
                 Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
                     ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
                     4, AcpiDmTableInfoHmat1b);
+                if (ACPI_FAILURE (Status))
+                {
+                    return;
+                }
+
                 SubtableOffset += 4;
             }
 
@@ -1519,6 +1527,11 @@  AcpiDmDumpHmat (
                     Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
                         ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
                         2, AcpiDmTableInfoHmat1c);
+                    if (ACPI_FAILURE(Status))
+                    {
+                        return;
+                    }
+
                     SubtableOffset += 2;
                 }
             }
@@ -1542,6 +1555,11 @@  AcpiDmDumpHmat (
                 Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
                     ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
                     2, AcpiDmTableInfoHmat2a);
+                if (ACPI_FAILURE (Status))
+                {
+                    return;
+                }
+
                 SubtableOffset += 2;
             }
             break;
diff --git a/src/acpica/source/common/dmtbdump2.c b/src/acpica/source/common/dmtbdump2.c
index 418b6ec0..e350d23c 100644
--- a/src/acpica/source/common/dmtbdump2.c
+++ b/src/acpica/source/common/dmtbdump2.c
@@ -187,6 +187,7 @@  AcpiDmDumpIort (
     ACPI_DMTABLE_INFO       *InfoTable;
     char                    *String;
     UINT32                  i;
+    UINT32                  MappingByteLength;
 
 
     /* Main table */
@@ -314,6 +315,11 @@  AcpiDmDumpIort (
                     Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset,
                         ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset),
                         4, AcpiDmTableInfoIort0a);
+                    if (ACPI_FAILURE (Status))
+                    {
+                        return;
+                    }
+
                     NodeOffset += 4;
                 }
             }
@@ -325,8 +331,10 @@  AcpiDmDumpIort (
 
             if (IortNode->Length > NodeOffset)
             {
+                MappingByteLength =
+                    IortNode->MappingCount * sizeof (ACPI_IORT_ID_MAPPING);
                 Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset,
-                    Table, IortNode->Length - NodeOffset,
+                    Table, IortNode->Length - NodeOffset - MappingByteLength,
                     AcpiDmTableInfoIort1a);
                 if (ACPI_FAILURE (Status))
                 {
@@ -410,7 +418,6 @@  NextSubtable:
         /* Point to next node subtable */
 
         Offset += IortNode->Length;
-        IortNode = ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, IortNode->Length);
     }
 }
 
@@ -1211,7 +1218,6 @@  AcpiDmDumpNfit (
             /* Has a variable number of 32-bit values at the end */
 
             InfoTable = AcpiDmTableInfoNfit2;
-            Interleave = ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE, Subtable);
             FieldOffset = sizeof (ACPI_NFIT_INTERLEAVE);
             break;
 
@@ -1236,7 +1242,6 @@  AcpiDmDumpNfit (
             /* Has a variable number of 64-bit addresses at the end */
 
             InfoTable = AcpiDmTableInfoNfit6;
-            Hint = ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS, Subtable);
             FieldOffset = sizeof (ACPI_NFIT_FLUSH_ADDRESS) - sizeof (UINT64);
             break;
 
@@ -1273,6 +1278,7 @@  AcpiDmDumpNfit (
         {
         case ACPI_NFIT_TYPE_INTERLEAVE:
 
+            Interleave = ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE, Subtable);
             for (i = 0; i < Interleave->LineCount; i++)
             {
                 Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset,
@@ -1308,6 +1314,7 @@  AcpiDmDumpNfit (
 
         case ACPI_NFIT_TYPE_FLUSH_ADDRESS:
 
+            Hint = ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS, Subtable);
             for (i = 0; i < Hint->HintCount; i++)
             {
                 Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset,
@@ -1806,6 +1813,11 @@  AcpiDmDumpPptt (
                 Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
                     ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable, SubtableOffset),
                     4, AcpiDmTableInfoPptt0a);
+                if (ACPI_FAILURE (Status))
+                {
+                    return;
+                }
+
                 SubtableOffset += 4;
             }
             break;
@@ -2063,6 +2075,10 @@  AcpiDmDumpSdev (
                 Status = AcpiDmDumpTable (Table->Length, 0,
                     ACPI_ADD_PTR (UINT8, Pcie, VendorDataOffset),
                     VendorDataLength, AcpiDmTableInfoSdev1b);
+                if (ACPI_FAILURE (Status))
+                {
+                    return;
+                }
             }
             break;
 
diff --git a/src/acpica/source/common/dmtbdump3.c b/src/acpica/source/common/dmtbdump3.c
index 0b9863cc..561a0032 100644
--- a/src/acpica/source/common/dmtbdump3.c
+++ b/src/acpica/source/common/dmtbdump3.c
@@ -410,7 +410,7 @@  AcpiDmDumpStao (
         Namepath = ACPI_ADD_PTR (char, Table, Offset);
         StringLength = strlen (Namepath) + 1;
 
-        AcpiDmLineHeader (Offset, StringLength, "Namestring");
+        AcpiDmLineHeader (Offset, StringLength, "Namepath");
         AcpiOsPrintf ("\"%s\"\n", Namepath);
 
         /* Point to next namepath */
@@ -526,7 +526,7 @@  AcpiDmDumpTpm2Rev3 (
     {
     case ACPI_TPM23_ACPI_START_METHOD:
 
-        Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
+        (void) AcpiDmDumpTable (Table->Length, Offset, Subtable,
             Table->Length - Offset, AcpiDmTableInfoTpm23a);
         break;
 
@@ -591,7 +591,7 @@  AcpiDmDumpTpm2 (
         Offset += sizeof (ACPI_TPM2_TRAILER);
 
         AcpiOsPrintf ("\n");
-        Status = AcpiDmDumpTable (Table->Length, Offset, ArmSubtable,
+        (void) AcpiDmDumpTable (Table->Length, Offset, ArmSubtable,
             Table->Length - Offset, AcpiDmTableInfoTpm211);
         break;
 
diff --git a/src/acpica/source/compiler/aslanalyze.c b/src/acpica/source/compiler/aslanalyze.c
index 58da5e2e..0482775f 100644
--- a/src/acpica/source/compiler/aslanalyze.c
+++ b/src/acpica/source/compiler/aslanalyze.c
@@ -569,7 +569,7 @@  ApCheckForGpeNameConflict (
 
     /* Need a null-terminated string version of NameSeg */
 
-    ACPI_MOVE_32_TO_32 (Name, &Op->Asl.NameSeg);
+    ACPI_MOVE_32_TO_32 (Name, Op->Asl.NameSeg);
     Name[ACPI_NAMESEG_SIZE] = 0;
 
     /*
diff --git a/src/acpica/source/compiler/aslbtypes.c b/src/acpica/source/compiler/aslbtypes.c
index ed607f3b..d7caea53 100644
--- a/src/acpica/source/compiler/aslbtypes.c
+++ b/src/acpica/source/compiler/aslbtypes.c
@@ -474,7 +474,6 @@  AnFormatBtype (
             strcat (Buffer, "|");
         }
 
-        First = FALSE;
         strcat (Buffer, "Resource");
     }
 }
diff --git a/src/acpica/source/compiler/aslkeywords.y b/src/acpica/source/compiler/aslkeywords.y
index a19b6425..a505dc02 100644
--- a/src/acpica/source/compiler/aslkeywords.y
+++ b/src/acpica/source/compiler/aslkeywords.y
@@ -202,7 +202,7 @@  AddressKeyword
     ;
 
 AddressSpaceKeyword
-    : ByteConst                             {$$ = UtCheckIntegerRange ($1, 0x0A, 0xFF);}
+    : ByteConst                             {$$ = UtCheckIntegerRange ($1, ACPI_NUM_PREDEFINED_REGIONS, 0xFF);}
     | RegionSpaceKeyword                    {}
     ;
 
diff --git a/src/acpica/source/compiler/aslload.c b/src/acpica/source/compiler/aslload.c
index d918c0cc..db6c2d41 100644
--- a/src/acpica/source/compiler/aslload.c
+++ b/src/acpica/source/compiler/aslload.c
@@ -526,13 +526,12 @@  LdNamespace1Begin (
 
     case AML_INT_CONNECTION_OP:
 
-
         if (Op->Asl.Child->Asl.AmlOpcode != AML_INT_NAMEPATH_OP)
         {
             break;
         }
-        Arg = Op->Asl.Child;
 
+        Arg = Op->Asl.Child;
         Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Asl.ExternalName,
             ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
             WalkState, &Node);
@@ -541,15 +540,6 @@  LdNamespace1Begin (
             break;
         }
 
-        if (Node->Type == ACPI_TYPE_BUFFER)
-        {
-            Arg->Asl.Node = Node;
-
-            Arg = Node->Op->Asl.Child;  /* Get namepath */
-            Arg = Arg->Asl.Next;        /* Get actual buffer */
-            Arg = Arg->Asl.Child;       /* Buffer length */
-            Arg = Arg->Asl.Next;        /* RAW_DATA buffer */
-        }
         break;
 
     default:
@@ -576,7 +566,6 @@  LdNamespace1Begin (
          * These opcodes are guaranteed to have a parent.
          * Examine the parent opcode.
          */
-        Status = AE_OK;
         ParentOp = Op->Asl.Parent;
         OpInfo = AcpiPsGetOpcodeInfo (ParentOp->Asl.AmlOpcode);
 
diff --git a/src/acpica/source/compiler/aslmessages.c b/src/acpica/source/compiler/aslmessages.c
index 8dd989ca..d1329352 100644
--- a/src/acpica/source/compiler/aslmessages.c
+++ b/src/acpica/source/compiler/aslmessages.c
@@ -387,7 +387,10 @@  const char                      *AslTableCompilerMsgs [] =
 /*    ASL_MSG_UNKNOWN_LABEL */              "Label is undefined",
 /*    ASL_MSG_UNKNOWN_SUBTABLE */           "Unknown subtable type",
 /*    ASL_MSG_UNKNOWN_TABLE */              "Unknown ACPI table signature",
-/*    ASL_MSG_ZERO_VALUE */                 "Value must be non-zero"
+/*    ASL_MSG_ZERO_VALUE */                 "Value must be non-zero",
+/*    ASL_MSG_INVALID_LABEL */              "Invalid field label detected",
+/*    ASL_MSG_BUFFER_LIST */                "Invalid buffer initializer list",
+/*    ASL_MSG_ENTRY_LIST */                 "Invalid entry initializer list"
 };
 
 /* Preprocessor */
diff --git a/src/acpica/source/compiler/aslmessages.h b/src/acpica/source/compiler/aslmessages.h
index 55473fb5..47e5bf43 100644
--- a/src/acpica/source/compiler/aslmessages.h
+++ b/src/acpica/source/compiler/aslmessages.h
@@ -387,6 +387,9 @@  typedef enum
     ASL_MSG_UNKNOWN_SUBTABLE,
     ASL_MSG_UNKNOWN_TABLE,
     ASL_MSG_ZERO_VALUE,
+    ASL_MSG_INVALID_LABEL,
+    ASL_MSG_BUFFER_LIST,
+    ASL_MSG_ENTRY_LIST,
 
     /* These messages are used by the Preprocessor only */
 
diff --git a/src/acpica/source/compiler/aslmethod.c b/src/acpica/source/compiler/aslmethod.c
index 98884bc3..667eaaaf 100644
--- a/src/acpica/source/compiler/aslmethod.c
+++ b/src/acpica/source/compiler/aslmethod.c
@@ -199,6 +199,8 @@  MtMethodAnalysisWalkBegin (
     ACPI_PARSE_OBJECT       *NextType;
     ACPI_PARSE_OBJECT       *NextParamType;
     UINT8                   ActualArgs = 0;
+    BOOLEAN                 HidExists;
+    BOOLEAN                 AdrExists;
 
 
     /* Build cross-reference output file if requested */
@@ -535,12 +537,26 @@  MtMethodAnalysisWalkBegin (
 
     case PARSEOP_DEVICE:
 
-        if (!ApFindNameInDeviceTree (METHOD_NAME__HID, Op) &&
-            !ApFindNameInDeviceTree (METHOD_NAME__ADR, Op))
+        /* Check usage of _HID and _ADR objects */
+
+        HidExists = ApFindNameInDeviceTree (METHOD_NAME__HID, Op);
+        AdrExists = ApFindNameInDeviceTree (METHOD_NAME__ADR, Op);
+
+        if (!HidExists && !AdrExists)
         {
             AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
                 "Device object requires a _HID or _ADR in same scope");
         }
+        else if (HidExists && AdrExists)
+        {
+            /*
+             * According to the ACPI spec, "A device object must contain
+             * either an _HID object or an _ADR object, but should not contain
+             * both".
+             */
+            AslError (ASL_WARNING, ASL_MSG_MULTIPLE_TYPES, Op,
+                "Device object requires either a _HID or _ADR, but not both");
+        }
         break;
 
     case PARSEOP_EVENT:
diff --git a/src/acpica/source/compiler/aslnamesp.c b/src/acpica/source/compiler/aslnamesp.c
index b5af0cb3..e38e397f 100644
--- a/src/acpica/source/compiler/aslnamesp.c
+++ b/src/acpica/source/compiler/aslnamesp.c
@@ -234,6 +234,10 @@  NsDisplayNamespace (
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
         ACPI_UINT32_MAX, FALSE, NsDoOneNamespaceObject, NULL,
         NULL, NULL);
+    if (ACPI_FAILURE (Status))
+    {
+        return (Status);
+    }
 
     /* Print the full pathname for each namespace node */
 
diff --git a/src/acpica/source/compiler/aslprepkg.c b/src/acpica/source/compiler/aslprepkg.c
index f55bb5e8..77969430 100644
--- a/src/acpica/source/compiler/aslprepkg.c
+++ b/src/acpica/source/compiler/aslprepkg.c
@@ -458,7 +458,7 @@  ApCheckPackage (
 
         for (i = 0; i < Package->RetInfo4.Count1; ++i)
         {
-            Status = ApCheckObjectType (Predefined->Info.Name, Op,
+            ApCheckObjectType (Predefined->Info.Name, Op,
                 Package->RetInfo4.ObjectType1, i);
             Op = Op->Asl.Next;
         }
diff --git a/src/acpica/source/compiler/aslresource.c b/src/acpica/source/compiler/aslresource.c
index 82de5109..57b6440f 100644
--- a/src/acpica/source/compiler/aslresource.c
+++ b/src/acpica/source/compiler/aslresource.c
@@ -1226,7 +1226,7 @@  RsDoResourceTemplate (
     BufferOp->Asl.AmlOpcode           = AML_RAW_DATA_CHAIN;
     BufferOp->Asl.AmlOpcodeLength     = 0;
     BufferOp->Asl.AmlLength           = CurrentByteOffset;
-    BufferOp->Asl.Value.Buffer        = (UINT8 *) HeadRnode.Next;
+    BufferOp->Asl.Value.Buffer        = ACPI_CAST_PTR (UINT8,  HeadRnode.Next);
     BufferOp->Asl.CompileFlags       |= OP_IS_RESOURCE_DATA;
     UtSetParseOpName (BufferOp);
 
diff --git a/src/acpica/source/compiler/aslrestype2.c b/src/acpica/source/compiler/aslrestype2.c
index 5b8f026e..0652272f 100644
--- a/src/acpica/source/compiler/aslrestype2.c
+++ b/src/acpica/source/compiler/aslrestype2.c
@@ -487,10 +487,7 @@  RsDoInterruptDescriptor (
 
     if (StringLength && ResSourceString)
     {
-
         strcpy ((char *) Rover, (char *) ResSourceString);
-        Rover = ACPI_ADD_PTR (
-                    AML_RESOURCE, &(Rover->ByteItem), StringLength);
 
         Descriptor->ExtendedIrq.ResourceLength = (UINT16)
             (Descriptor->ExtendedIrq.ResourceLength + StringLength);
diff --git a/src/acpica/source/compiler/aslrestype2s.c b/src/acpica/source/compiler/aslrestype2s.c
index 23085054..410ff2b2 100644
--- a/src/acpica/source/compiler/aslrestype2s.c
+++ b/src/acpica/source/compiler/aslrestype2s.c
@@ -674,7 +674,6 @@  RsDoGpioIoDescriptor (
     ResSourceLength = RsGetStringDataLength (InitializerOp);
     VendorLength = RsGetBufferDataLength (InitializerOp);
     InterruptLength = RsGetInterruptDataLength (InitializerOp, 10);
-    PinList = InterruptList;
 
     DescriptorSize = ACPI_AML_SIZE_LARGE (AML_RESOURCE_GPIO) +
         ResSourceLength + VendorLength + InterruptLength;
diff --git a/src/acpica/source/compiler/aslutils.c b/src/acpica/source/compiler/aslutils.c
index ed2948d0..0faaec03 100644
--- a/src/acpica/source/compiler/aslutils.c
+++ b/src/acpica/source/compiler/aslutils.c
@@ -223,7 +223,7 @@  UtQueryForOverwrite (
     char                    *Pathname)
 {
     struct stat             StatInfo;
-    int                     InChar = 0x34;
+    int                     InChar;
 
 
     if (!stat (Pathname, &StatInfo))
diff --git a/src/acpica/source/compiler/cvdisasm.c b/src/acpica/source/compiler/cvdisasm.c
index 3ff636f8..5396b3c3 100644
--- a/src/acpica/source/compiler/cvdisasm.c
+++ b/src/acpica/source/compiler/cvdisasm.c
@@ -544,8 +544,11 @@  CvSwitchFiles(
         Current = Current->Parent;
     }
 
-    /* Redirect output to Op->Common.CvFilename */
+    if (FNode)
+    {
+        /* Redirect output to Op->Common.CvFilename */
 
-    AcpiOsRedirectOutput (FNode->File);
-    AcpiGbl_CurrentFilename = FNode->Filename;
+        AcpiOsRedirectOutput (FNode->File);
+        AcpiGbl_CurrentFilename = FNode->Filename;
+    }
 }
diff --git a/src/acpica/source/compiler/cvparser.c b/src/acpica/source/compiler/cvparser.c
index ca970b50..9a2f0f9c 100644
--- a/src/acpica/source/compiler/cvparser.c
+++ b/src/acpica/source/compiler/cvparser.c
@@ -912,7 +912,6 @@  CvCaptureCommentsOnly (
 
                     /* Not a valid comment option. Revert the AML */
 
-                    Aml -= 2;
                     goto DefBlock;
 
             } /* End switch statement */
diff --git a/src/acpica/source/compiler/dtcompile.c b/src/acpica/source/compiler/dtcompile.c
index b6a144fe..bdd8c1b7 100644
--- a/src/acpica/source/compiler/dtcompile.c
+++ b/src/acpica/source/compiler/dtcompile.c
@@ -276,7 +276,10 @@  DtDoCompile (
 
     if (ACPI_FAILURE (Status))
     {
-        FileNode->ParserErrorDetected = TRUE;
+        if (FileNode)
+        {
+            FileNode->ParserErrorDetected = TRUE;
+        }
 
         /* TBD: temporary error message. Msgs should come from function above */
 
@@ -572,7 +575,7 @@  DtCompileTable (
     ACPI_STATUS             Status = AE_OK;
 
 
-    if (!Field)
+    if (!Field || !Info)
     {
         return (AE_BAD_PARAMETER);
     }
@@ -643,6 +646,14 @@  DtCompileTable (
         FieldType = DtGetFieldType (Info);
         AslGbl_InputFieldCount++;
 
+        if (FieldType != DT_FIELD_TYPE_INLINE_SUBTABLE &&
+            strcmp (Info->Name, LocalField->Name))
+        {
+            sprintf (AslGbl_MsgBuffer, "found \"%s\" expected \"%s\"",
+                LocalField->Name, Info->Name);
+            DtError (ASL_ERROR, ASL_MSG_INVALID_LABEL, LocalField, AslGbl_MsgBuffer);
+        }
+
         switch (FieldType)
         {
         case DT_FIELD_TYPE_FLAGS_INTEGER:
diff --git a/src/acpica/source/compiler/dtcompiler.h b/src/acpica/source/compiler/dtcompiler.h
index 639c22cb..7c78b55b 100644
--- a/src/acpica/source/compiler/dtcompiler.h
+++ b/src/acpica/source/compiler/dtcompiler.h
@@ -210,6 +210,17 @@  typedef struct dt_field
 
 #define DT_FIELD_NOT_ALLOCATED      1
 
+/*
+ * Structure used for each individual key or value
+ */
+typedef struct dt_table_unit
+{
+    char                    *Value;      /* Field value (from name : value) */
+    UINT32                  Line;        /* Line number for this field */
+    UINT32                  Column;      /* Start column for field value */
+
+} DT_TABLE_UNIT;
+
 
 /*
  * Structure used for individual subtables within an ACPI table
@@ -292,14 +303,6 @@  DtCompilePadding (
     UINT32                  Length,
     DT_SUBTABLE             **RetSubtable);
 
-void
-DtCreateField (
-    char                    *Name,
-    char                    *Value,
-    UINT32                  Line,
-    UINT32                  Offset,
-    UINT32                  Column,
-    UINT32                  NameColumn);
 
 /* dtio - binary and text input/output */
 
@@ -437,6 +440,26 @@  DtCompileFlag (
     ACPI_DMTABLE_INFO       *Info);
 
 
+/* dtfield - DT_FIELD operations */
+
+void
+DtLinkField (
+    DT_FIELD                *Field);
+
+void
+DtCreateField (
+    DT_TABLE_UNIT           *FieldKey,
+    DT_TABLE_UNIT           *FieldValue,
+    UINT32                  Offset);
+
+DT_TABLE_UNIT *
+DtCreateTableUnit (
+    char                    *Data,
+    UINT32                  Line,
+    UINT32                  Column);
+
+
+
 /* dtparser - lex/yacc files */
 
 UINT64                      DtCompilerParserResult; /* Expression return value */
diff --git a/src/acpica/source/compiler/dtcompilerparser.l b/src/acpica/source/compiler/dtcompilerparser.l
index 0d68f41e..28dcf6af 100644
--- a/src/acpica/source/compiler/dtcompilerparser.l
+++ b/src/acpica/source/compiler/dtcompilerparser.l
@@ -161,18 +161,20 @@  YYSTYPE DtCompilerlval;
 /* handle locations */
 
 int DtCompilerParsercolumn = 1;
+int DtLabelByteOffset = 0;
 int DtCompilerParserByteOffset = 0;
 
+UINT32 DtTokenFirstLine = 0;
+UINT32 DtTokenFirstColumn = 0;
+
 #define YY_USER_ACTION \
-            DtCompilerParserlloc.first_line = DtCompilerParserlloc.last_line = DtCompilerParserlineno; \
-            DtCompilerParserlloc.first_column = DtCompilerParsercolumn; \
-            DtCompilerParserlloc.first_byte_offset = DtCompilerParserByteOffset; \
-            DtCompilerParserlloc.last_column = DtCompilerParsercolumn + DtCompilerParserleng-1; \
+            DtTokenFirstLine = DtCompilerParserlineno; \
+            DtTokenFirstColumn = DtCompilerParsercolumn; \
             DtCompilerParsercolumn += DtCompilerParserleng; \
             DtCompilerParserByteOffset += DtCompilerParserleng; \
             DbgPrint (ASL_PARSE_OUTPUT,\
-                "user action occurred. DtCompilerParserlloc.first_line: %u offset: %u\n",\
-                DtCompilerParserlloc.first_line, DtCompilerParserlloc.first_byte_offset);
+                "user action occurred. DtCompilerParserlloc.first_line: %u\n",\
+                DtTokenFirstLine);
 %}
 
 %option nounput noinput yylineno
@@ -236,7 +238,11 @@  CommentField    {LabelName}{WhiteSpace}*:{WhiteSpace}{Comment}?$
     int size = strlen (DtCompilerParsertext);
     s=UtLocalCacheCalloc (size + 1);
     AcpiUtSafeStrncpy (s, DtCompilerParsertext, size + 1);
-    DtCompilerParserlval.s = s;
+    DtCompilerParserlval.u = (DT_TABLE_UNIT *) UtLocalCacheCalloc (sizeof (DT_TABLE_UNIT));
+    DtCompilerParserlval.u->Value = s;
+    DtCompilerParserlval.u->Line = DtCompilerParserlineno;
+    DtCompilerParserlval.u->Column = DtCompilerParsercolumn;
+    DtLabelByteOffset = DtCompilerParserByteOffset;
     DbgPrint (ASL_PARSE_OUTPUT, "Label: %s\n", s);
     return (DT_PARSEOP_LABEL);
 }
diff --git a/src/acpica/source/compiler/dtcompilerparser.y b/src/acpica/source/compiler/dtcompilerparser.y
index ba9d2827..43eba4e9 100644
--- a/src/acpica/source/compiler/dtcompilerparser.y
+++ b/src/acpica/source/compiler/dtcompilerparser.y
@@ -169,9 +169,13 @@  void                        DtCompilerParsererror (char const *msg);
 extern char                 *DtCompilerParsertext;
 extern DT_FIELD             *AslGbl_CurrentField;
 
+extern int                  DtLabelByteOffset;
 extern UINT64               DtCompilerParserResult; /* Expression return value */
 extern UINT64               DtCompilerParserlineno; /* Current line number */
 
+extern UINT32               DtTokenFirstLine;
+extern UINT32               DtTokenFirstColumn;
+
 /* Bison/yacc configuration */
 
 #define yytname             DtCompilerParsername
@@ -186,42 +190,30 @@  extern UINT64               DtCompilerParserlineno; /* Current line number */
 
 %}
 
-%code requires {
-
-    typedef struct YYLTYPE {
-        int first_line;
-        int last_line;
-        int first_column;
-        int last_column;
-        int first_byte_offset;
-    } YYLTYPE;
-
-    #define YYLTYPE_IS_DECLARED 1
-}
-
 
 %union {
     char                *s;
     DT_FIELD            *f;
+    DT_TABLE_UNIT       *u;
 }
 
 
 %type  <f> Table
-%token <s> DT_PARSEOP_DATA
-%token <s> DT_PARSEOP_LABEL
-%token <s> DT_PARSEOP_STRING_DATA
-%token <s> DT_PARSEOP_LINE_CONTINUATION
-%type  <s> Data
-%type  <s> Datum
-%type  <s> MultiLineData
-%type  <s> MultiLineDataList
+%token <u> DT_PARSEOP_DATA
+%token <u> DT_PARSEOP_LABEL
+%token <u> DT_PARSEOP_STRING_DATA
+%token <u> DT_PARSEOP_LINE_CONTINUATION
+%type  <u> Data
+%type  <u> Datum
+%type  <u> MultiLineData
+%type  <u> MultiLineDataList
 
 
 %%
 
 Table
     :
-    FieldList { DtCompilerParserResult = 5;}
+    FieldList { }
     ;
 
 FieldList
@@ -230,7 +222,7 @@  FieldList
     ;
 
 Field
-    : DT_PARSEOP_LABEL ':' Data { DtCreateField ($1, $3, (@3).first_line, (@1).first_byte_offset, (@1).first_column, (@3).first_column); }
+    : DT_PARSEOP_LABEL ':' Data { DtCreateField ($1, $3, DtLabelByteOffset); }
     ;
 
 Data
@@ -240,7 +232,7 @@  Data
     ;
 
 MultiLineDataList
-    : MultiLineDataList MultiLineData { $$ = AcpiUtStrcat(AcpiUtStrcat($1, " "), $2); } /* combine the strings with strcat */
+    : MultiLineDataList MultiLineData { $$ = DtCreateTableUnit (AcpiUtStrcat(AcpiUtStrcat($1->Value, " "), $2->Value), $1->Line, $1->Column); } /* combine the strings with strcat */
     | MultiLineData                   { $$ = $1; }
     ;
 
@@ -249,8 +241,14 @@  MultiLineData
     ;
 
 Datum
-    : DT_PARSEOP_DATA        { DbgPrint (ASL_PARSE_OUTPUT, "parser        data: [%s]\n", DtCompilerParserlval.s); $$ = AcpiUtStrdup(DtCompilerParserlval.s); }
-    | DT_PARSEOP_STRING_DATA { DbgPrint (ASL_PARSE_OUTPUT, "parser string data: [%s]\n", DtCompilerParserlval.s); $$ = AcpiUtStrdup(DtCompilerParserlval.s); }
+    : DT_PARSEOP_DATA        {
+                                 DbgPrint (ASL_PARSE_OUTPUT, "parser        data: [%s]\n", DtCompilerParserlval.s);
+                                 $$ = DtCreateTableUnit (AcpiUtStrdup(DtCompilerParserlval.s), DtTokenFirstLine, DtTokenFirstColumn);
+                             }
+    | DT_PARSEOP_STRING_DATA {
+                                 DbgPrint (ASL_PARSE_OUTPUT, "parser string data: [%s]\n", DtCompilerParserlval.s);
+                                 $$ = DtCreateTableUnit (AcpiUtStrdup(DtCompilerParserlval.s), DtTokenFirstLine, DtTokenFirstColumn);
+                             }
     ;
 
 
diff --git a/src/acpica/source/compiler/dtfield.c b/src/acpica/source/compiler/dtfield.c
index 1f716761..18d44110 100644
--- a/src/acpica/source/compiler/dtfield.c
+++ b/src/acpica/source/compiler/dtfield.c
@@ -576,6 +576,14 @@  DtCompileBuffer (
 
     StringValue = DtNormalizeBuffer (StringValue, &Count);
     Substring = StringValue;
+    if (Count != ByteLength)
+    {
+        sprintf(AslGbl_MsgBuffer,
+            "Found %u values, must match expected count: %u",
+            Count, ByteLength);
+        DtError (ASL_ERROR, ASL_MSG_BUFFER_LIST, Field, AslGbl_MsgBuffer);
+        goto Exit;
+    }
 
     /* Each element of StringValue is now three chars (2 hex + 1 space) */
 
@@ -721,3 +729,122 @@  DtCompileFlag (
 
     *Buffer |= (UINT8) (Value << BitPosition);
 }
+
+
+/******************************************************************************
+ *
+ * FUNCTION:    DtCreateField
+ *
+ * PARAMETERS: Name
+ *             Value
+ *             Line
+ *             Offset
+ *             Column
+ *             NameColumn
+ *
+ * RETURN:     None
+ *
+ * DESCRIPTION: Create a field
+ *
+ *****************************************************************************/
+
+void
+DtCreateField (
+    DT_TABLE_UNIT           *FieldKey,
+    DT_TABLE_UNIT           *FieldValue,
+    UINT32                  Offset)
+{
+    DT_FIELD                *Field = UtFieldCacheCalloc ();
+
+
+    Field->StringLength = 0;
+    if (FieldKey->Value)
+    {
+        Field->Name =
+            strcpy (UtLocalCacheCalloc (strlen (FieldKey->Value) + 1), FieldKey->Value);
+    }
+
+    if (FieldValue->Value)
+    {
+        Field->StringLength = strlen (FieldValue->Value);
+        Field->Value =
+            strcpy (UtLocalCacheCalloc (Field->StringLength + 1), FieldValue->Value);
+    }
+
+    Field->Line = FieldValue->Line;
+    Field->ByteOffset = Offset;
+    Field->NameColumn = FieldKey->Column;
+    Field->Column = FieldValue->Column;
+    DtLinkField (Field);
+
+    DtDumpFieldList (AslGbl_FieldList);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION:    DtCreateTableUnit
+ *
+ * PARAMETERS: Data
+ *             Line
+ *             Column
+ *
+ * RETURN:     a table unit
+ *
+ * DESCRIPTION: Create a table unit
+ *
+ *****************************************************************************/
+
+DT_TABLE_UNIT *
+DtCreateTableUnit (
+    char                    *Data,
+    UINT32                  Line,
+    UINT32                  Column)
+{
+    DT_TABLE_UNIT           *Unit = (DT_TABLE_UNIT *) UtFieldCacheCalloc ();
+
+
+    Unit->Value = Data;
+    Unit->Line = Line;
+    Unit->Column = Column;
+    return (Unit);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION:    DtLinkField
+ *
+ * PARAMETERS:  Field               - New field object to link
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Link one field name and value to the list
+ *
+ *****************************************************************************/
+
+void
+DtLinkField (
+    DT_FIELD                *Field)
+{
+    DT_FIELD                *Prev;
+    DT_FIELD                *Next;
+
+
+    Prev = Next = AslGbl_FieldList;
+
+    while (Next)
+    {
+        Prev = Next;
+        Next = Next->Next;
+    }
+
+    if (Prev)
+    {
+        Prev->Next = Field;
+    }
+    else
+    {
+        AslGbl_FieldList = Field;
+    }
+}
diff --git a/src/acpica/source/compiler/dtio.c b/src/acpica/source/compiler/dtio.c
index d027353c..b596fda8 100644
--- a/src/acpica/source/compiler/dtio.c
+++ b/src/acpica/source/compiler/dtio.c
@@ -162,10 +162,6 @@  static char *
 DtTrim (
     char                    *String);
 
-static void
-DtLinkField (
-    DT_FIELD                *Field);
-
 static ACPI_STATUS
 DtParseLine (
     char                    *LineBuffer,
@@ -297,45 +293,6 @@  DtTrim (
 }
 
 
-/******************************************************************************
- *
- * FUNCTION:    DtLinkField
- *
- * PARAMETERS:  Field               - New field object to link
- *
- * RETURN:      None
- *
- * DESCRIPTION: Link one field name and value to the list
- *
- *****************************************************************************/
-
-static void
-DtLinkField (
-    DT_FIELD                *Field)
-{
-    DT_FIELD                *Prev;
-    DT_FIELD                *Next;
-
-
-    Prev = Next = AslGbl_FieldList;
-
-    while (Next)
-    {
-        Prev = Next;
-        Next = Next->Next;
-    }
-
-    if (Prev)
-    {
-        Prev->Next = Field;
-    }
-    else
-    {
-        AslGbl_FieldList = Field;
-    }
-}
-
-
 /******************************************************************************
  *
  * FUNCTION:    DtParseLine
@@ -493,59 +450,6 @@  DtParseLine (
 }
 
 
-/******************************************************************************
- *
- * FUNCTION:    DtCreateField
- *
- * PARAMETERS: Name
- *             Value
- *             Line
- *             Offset
- *             Column
- *             NameColumn
- *
- * RETURN:     None
- *
- * DESCRIPTION: Create a field
- *
- *****************************************************************************/
-
-void
-DtCreateField (
-    char                    *Name,
-    char                    *Value,
-    UINT32                  Line,
-    UINT32                  Offset,
-    UINT32                  Column,
-    UINT32                  NameColumn)
-{
-    DT_FIELD                *Field = UtFieldCacheCalloc ();
-
-
-    Field->StringLength = 0;
-    if (Name)
-    {
-        Field->Name =
-            strcpy (UtLocalCacheCalloc (strlen (Name) + 1), Name);
-    }
-
-    if (Value)
-    {
-        Field->StringLength = strlen (Value);
-        Field->Value =
-            strcpy (UtLocalCacheCalloc (Field->StringLength + 1), Value);
-    }
-
-    Field->Line = Line;
-    Field->ByteOffset = Offset;
-    Field->NameColumn = NameColumn;
-    Field->Column = Column;
-    DtLinkField (Field);
-
-    DtDumpFieldList (AslGbl_FieldList);
-}
-
-
 /******************************************************************************
  *
  * FUNCTION:    DtGetNextLine
@@ -840,7 +744,6 @@  DtGetNextLine (
 
             case '\n':
 
-                CurrentLineOffset = AslGbl_NextLineOffset;
                 AslGbl_NextLineOffset = (UINT32) ftell (Handle);
                 AslGbl_CurrentLineNumber++;
                 break;
@@ -882,7 +785,6 @@  DtGetNextLine (
 
                 /* Ignore newline, this will merge the lines */
 
-                CurrentLineOffset = AslGbl_NextLineOffset;
                 AslGbl_NextLineOffset = (UINT32) ftell (Handle);
                 AslGbl_CurrentLineNumber++;
                 State = DT_NORMAL_TEXT;
diff --git a/src/acpica/source/compiler/dttable2.c b/src/acpica/source/compiler/dttable2.c
index 04f48cc0..bbaaafaa 100644
--- a/src/acpica/source/compiler/dttable2.c
+++ b/src/acpica/source/compiler/dttable2.c
@@ -1474,13 +1474,14 @@  DtCompileSdev (
                         Namesp->DeviceIdOffset + Namesp->DeviceIdLength;
                     Namesp->VendorDataLength =
                         (UINT16) Subtable->Length;
+
+                    /* Final size of entire namespace structure */
+
+                    SdevHeader->Length = (UINT16)(sizeof(ACPI_SDEV_NAMESPACE) +
+                        Subtable->Length + Namesp->DeviceIdLength);
                 }
             }
 
-            /* Final size of entire namespace structure */
-
-            SdevHeader->Length = (UINT16) (sizeof (ACPI_SDEV_NAMESPACE) +
-                Subtable->Length + Namesp->DeviceIdLength);
             break;
 
         case ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE:
@@ -1620,7 +1621,9 @@  DtCompileSlit (
     DT_SUBTABLE             *ParentTable;
     DT_FIELD                **PFieldList = (DT_FIELD **) List;
     DT_FIELD                *FieldList;
+    DT_FIELD                *EndOfFieldList = NULL;
     UINT32                  Localities;
+    UINT32                  LocalityListLength;
     UINT8                   *LocalityBuffer;
 
 
@@ -1636,6 +1639,7 @@  DtCompileSlit (
 
     Localities = *ACPI_CAST_PTR (UINT32, Subtable->Buffer);
     LocalityBuffer = UtLocalCalloc (Localities);
+    LocalityListLength = 0;
 
     /* Compile each locality buffer */
 
@@ -1645,11 +1649,22 @@  DtCompileSlit (
         DtCompileBuffer (LocalityBuffer,
             FieldList->Value, FieldList, Localities);
 
+        LocalityListLength++;
         DtCreateSubtable (LocalityBuffer, Localities, &Subtable);
         DtInsertSubtable (ParentTable, Subtable);
+        EndOfFieldList = FieldList;
         FieldList = FieldList->Next;
     }
 
+    if (LocalityListLength != Localities)
+    {
+        sprintf(AslGbl_MsgBuffer,
+            "Found %u entries, must match LocalityCount: %u",
+            LocalityListLength, Localities);
+        DtError (ASL_ERROR, ASL_MSG_ENTRY_LIST, EndOfFieldList, AslGbl_MsgBuffer);
+        return (AE_LIMIT);
+    }
+
     ACPI_FREE (LocalityBuffer);
     return (AE_OK);
 }
diff --git a/src/acpica/source/components/debugger/dbconvert.c b/src/acpica/source/components/debugger/dbconvert.c
index 631e7e8f..6b58bf5f 100644
--- a/src/acpica/source/components/debugger/dbconvert.c
+++ b/src/acpica/source/components/debugger/dbconvert.c
@@ -274,6 +274,10 @@  AcpiDbConvertToBuffer (
     ACPI_STATUS             Status;
 
 
+    /* Skip all preceding white space*/
+
+    AcpiUtRemoveWhitespace (&String);
+
     /* Generate the final buffer length */
 
     for (i = 0, Length = 0; String[i];)
diff --git a/src/acpica/source/components/debugger/dbdisply.c b/src/acpica/source/components/debugger/dbdisply.c
index 539ff5af..72bf1c6b 100644
--- a/src/acpica/source/components/debugger/dbdisply.c
+++ b/src/acpica/source/components/debugger/dbdisply.c
@@ -713,7 +713,6 @@  AcpiDbDisplayResults (
         return;
     }
 
-    ObjDesc = WalkState->MethodDesc;
     Node  = WalkState->MethodNode;
 
     if (WalkState->Results)
@@ -773,7 +772,6 @@  AcpiDbDisplayCallingTree (
         return;
     }
 
-    Node = WalkState->MethodNode;
     AcpiOsPrintf ("Current Control Method Call Tree\n");
 
     while (WalkState)
diff --git a/src/acpica/source/components/debugger/dbfileio.c b/src/acpica/source/components/debugger/dbfileio.c
index e937c3e4..7567fa75 100644
--- a/src/acpica/source/components/debugger/dbfileio.c
+++ b/src/acpica/source/components/debugger/dbfileio.c
@@ -253,7 +253,7 @@  AcpiDbLoadTables (
     {
         Table = TableListHead->Table;
 
-        Status = AcpiLoadTable (Table);
+        Status = AcpiLoadTable (Table, NULL);
         if (ACPI_FAILURE (Status))
         {
             if (Status == AE_ALREADY_EXISTS)
diff --git a/src/acpica/source/components/debugger/dbinput.c b/src/acpica/source/components/debugger/dbinput.c
index d091d351..c854cb37 100644
--- a/src/acpica/source/components/debugger/dbinput.c
+++ b/src/acpica/source/components/debugger/dbinput.c
@@ -208,6 +208,7 @@  enum AcpiExDebuggerCommands
     CMD_EVALUATE,
     CMD_EXECUTE,
     CMD_EXIT,
+    CMD_FIELDS,
     CMD_FIND,
     CMD_GO,
     CMD_HANDLERS,
@@ -287,6 +288,7 @@  static const ACPI_DB_COMMAND_INFO   AcpiGbl_DbCommands[] =
     {"EVALUATE",     1},
     {"EXECUTE",      1},
     {"EXIT",         0},
+    {"FIELDS",       1},
     {"FIND",         1},
     {"GO",           0},
     {"HANDLERS",     0},
@@ -360,6 +362,7 @@  static const ACPI_DB_COMMAND_HELP   AcpiGbl_DbCommandHelp[] =
     {1, "  Find <AcpiName> (? is wildcard)",    "Find ACPI name(s) with wildcards\n"},
     {1, "  Integrity",                          "Validate namespace integrity\n"},
     {1, "  Methods",                            "Display list of loaded control methods\n"},
+    {1, "  Fields <AddressSpaceId>",            "Display list of loaded field units by space ID\n"},
     {1, "  Namespace [Object] [Depth]",         "Display loaded namespace tree/subtree\n"},
     {1, "  Notify <Object> <Value>",            "Send a notification on Object\n"},
     {1, "  Objects [ObjectType]",               "Display summary of all objects or just given type\n"},
@@ -683,6 +686,22 @@  AcpiDbGetNextToken (
         }
         break;
 
+    case '{':
+
+        /* This is the start of a field unit, scan until closing brace */
+
+        String++;
+        Start = String;
+        Type = ACPI_TYPE_FIELD_UNIT;
+
+        /* Find end of buffer */
+
+        while (*String && (*String != '}'))
+        {
+            String++;
+        }
+        break;
+
     case '[':
 
         /* This is the start of a package, scan until closing bracket */
@@ -877,6 +896,7 @@  AcpiDbCommandDispatch (
     ACPI_PARSE_OBJECT       *Op)
 {
     UINT32                  Temp;
+    UINT64                  Temp64;
     UINT32                  CommandIndex;
     UINT32                  ParamCount;
     char                    *CommandLine;
@@ -894,7 +914,6 @@  AcpiDbCommandDispatch (
 
     ParamCount = AcpiDbGetLine (InputBuffer);
     CommandIndex = AcpiDbMatchCommand (AcpiGbl_DbArgs[0]);
-    Temp = 0;
 
     /*
      * We don't want to add the !! command to the history buffer. It
@@ -993,6 +1012,21 @@  AcpiDbCommandDispatch (
         Status = AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);
         break;
 
+    case CMD_FIELDS:
+
+        Status = AcpiUtStrtoul64 (AcpiGbl_DbArgs[1], &Temp64);
+
+        if (ACPI_FAILURE (Status) || Temp64 >= ACPI_NUM_PREDEFINED_REGIONS)
+        {
+            AcpiOsPrintf (
+                "Invalid adress space ID: must be between 0 and %u inclusive\n",
+                ACPI_NUM_PREDEFINED_REGIONS - 1);
+            return (AE_OK);
+        }
+
+        Status = AcpiDbDisplayFields ((UINT32) Temp64);
+        break;
+
     case CMD_GO:
 
         AcpiGbl_CmSingleStep = FALSE;
diff --git a/src/acpica/source/components/debugger/dbmethod.c b/src/acpica/source/components/debugger/dbmethod.c
index 6893c550..24c014f9 100644
--- a/src/acpica/source/components/debugger/dbmethod.c
+++ b/src/acpica/source/components/debugger/dbmethod.c
@@ -515,6 +515,11 @@  AcpiDbDisassembleMethod (
     WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
 
     Status = AcpiPsParseAml (WalkState);
+    if (ACPI_FAILURE(Status))
+    {
+        return (Status);
+    }
+
     (void) AcpiDmParseDeferredOps (Op);
 
     /* Now we can disassemble the method */
diff --git a/src/acpica/source/components/debugger/dbnames.c b/src/acpica/source/components/debugger/dbnames.c
index 2c9af4be..ac366ab0 100644
--- a/src/acpica/source/components/debugger/dbnames.c
+++ b/src/acpica/source/components/debugger/dbnames.c
@@ -154,6 +154,7 @@ 
 #include "acnamesp.h"
 #include "acdebug.h"
 #include "acpredef.h"
+#include "acinterp.h"
 
 
 #define _COMPONENT          ACPI_CA_DEBUGGER
@@ -722,6 +723,91 @@  AcpiDbWalkForObjectCounts (
 }
 
 
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDbWalkForFields
+ *
+ * PARAMETERS:  Callback from WalkNamespace
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Display short info about objects in the namespace
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiDbWalkForFields (
+    ACPI_HANDLE             ObjHandle,
+    UINT32                  NestingLevel,
+    void                    *Context,
+    void                    **ReturnValue)
+{
+    ACPI_OBJECT             *RetValue;
+    ACPI_REGION_WALK_INFO   *Info = (ACPI_REGION_WALK_INFO *) Context;
+    ACPI_BUFFER             Buffer;
+    ACPI_STATUS             Status;
+    ACPI_NAMESPACE_NODE     *Node = AcpiNsValidateHandle (ObjHandle);
+
+
+    if (!Node)
+    {
+       return (AE_OK);
+    }
+    if (Node->Object->Field.RegionObj->Region.SpaceId != Info->AddressSpaceId)
+    {
+       return (AE_OK);
+    }
+
+    Info->Count++;
+
+    /* Get and display the full pathname to this object */
+
+    Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
+    Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, TRUE);
+    if (ACPI_FAILURE (Status))
+    {
+        AcpiOsPrintf ("Could Not get pathname for object %p\n", ObjHandle);
+        return (AE_OK);
+    }
+
+    AcpiOsPrintf ("%s ", (char *) Buffer.Pointer);
+    ACPI_FREE (Buffer.Pointer);
+
+    Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
+    AcpiEvaluateObject (ObjHandle, NULL, NULL, &Buffer);
+
+    /*
+     * Since this is a field unit, surround the output in braces
+     */
+    AcpiOsPrintf ("{");
+
+    RetValue = (ACPI_OBJECT *) Buffer.Pointer;
+    switch (RetValue->Type)
+    {
+        case ACPI_TYPE_INTEGER:
+
+            AcpiOsPrintf ("%8.8X%8.8X", ACPI_FORMAT_UINT64 (RetValue->Integer.Value));
+            break;
+
+        case ACPI_TYPE_BUFFER:
+
+            AcpiUtDumpBuffer (RetValue->Buffer.Pointer,
+                RetValue->Buffer.Length, DB_DISPLAY_DATA_ONLY | DB_BYTE_DISPLAY, 0);
+            break;
+
+        default:
+
+            break;
+    }
+
+    AcpiOsPrintf ("}\n");
+
+    ACPI_FREE (Buffer.Pointer);
+    return (AE_OK);
+}
+
+
+
 /*******************************************************************************
  *
  * FUNCTION:    AcpiDbWalkForSpecificObjects
@@ -857,6 +943,42 @@  AcpiDbDisplayObjects (
 }
 
 
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDbDisplayFields
+ *
+ * PARAMETERS:  ObjTypeArg          - Type of object to display
+ *              DisplayCountArg     - Max depth to display
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Display objects in the namespace of the requested type
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDbDisplayFields (
+    UINT32                  AddressSpaceId)
+{
+    ACPI_REGION_WALK_INFO  Info;
+
+
+    Info.Count = 0;
+    Info.OwnerId = ACPI_OWNER_ID_MAX;
+    Info.DebugLevel = ACPI_UINT32_MAX;
+    Info.DisplayType = ACPI_DISPLAY_SUMMARY | ACPI_DISPLAY_SHORT;
+    Info.AddressSpaceId = AddressSpaceId;
+
+    /* Walk the namespace from the root */
+
+    (void) AcpiWalkNamespace (ACPI_TYPE_LOCAL_REGION_FIELD, ACPI_ROOT_OBJECT,
+          ACPI_UINT32_MAX, AcpiDbWalkForFields, NULL,
+          (void *) &Info, NULL);
+
+    return (AE_OK);
+}
+
+
 /*******************************************************************************
  *
  * FUNCTION:    AcpiDbIntegrityWalk
diff --git a/src/acpica/source/components/debugger/dbobject.c b/src/acpica/source/components/debugger/dbobject.c
index cebf4420..cffa0a53 100644
--- a/src/acpica/source/components/debugger/dbobject.c
+++ b/src/acpica/source/components/debugger/dbobject.c
@@ -649,7 +649,6 @@  AcpiDbDecodeArguments (
 
 
     Node = WalkState->MethodNode;
-    ObjDesc = WalkState->MethodDesc;
 
     /* There are no arguments for the module-level code case */
 
diff --git a/src/acpica/source/components/disassembler/dmdeferred.c b/src/acpica/source/components/disassembler/dmdeferred.c
index d0753bb0..d0a589c9 100644
--- a/src/acpica/source/components/disassembler/dmdeferred.c
+++ b/src/acpica/source/components/disassembler/dmdeferred.c
@@ -309,6 +309,10 @@  AcpiDmDeferredParse (
     WalkState->ParseFlags &= ~ACPI_PARSE_DELETE_TREE;
     WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
     Status = AcpiPsParseAml (WalkState);
+    if (ACPI_FAILURE (Status))
+    {
+        return_ACPI_STATUS(Status);
+    }
 
     StartOp = (Op->Common.Value.Arg)->Common.Next;
     SearchOp = StartOp;
diff --git a/src/acpica/source/components/disassembler/dmresrc.c b/src/acpica/source/components/disassembler/dmresrc.c
index bb36b734..c2e85b8a 100644
--- a/src/acpica/source/components/disassembler/dmresrc.c
+++ b/src/acpica/source/components/disassembler/dmresrc.c
@@ -441,7 +441,6 @@  AcpiDmResourceTemplate (
                  * missing EndDependentDescriptor.
                  */
                 Level--;
-                DependentFns = FALSE;
 
                 /* Go ahead and insert EndDependentFn() */
 
diff --git a/src/acpica/source/components/disassembler/dmwalk.c b/src/acpica/source/components/disassembler/dmwalk.c
index 8ec8728e..97b33039 100644
--- a/src/acpica/source/components/disassembler/dmwalk.c
+++ b/src/acpica/source/components/disassembler/dmwalk.c
@@ -957,7 +957,6 @@  AcpiDmDescendingOp (
                  * the buffer size Op. Open up a new block
                  */
                 NextOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
-                NextOp = NextOp->Common.Next;
                 ASL_CV_CLOSE_PAREN (Op, Level);
 
                 /* Emit description comment for Name() with a predefined ACPI name */
diff --git a/src/acpica/source/components/dispatcher/dscontrol.c b/src/acpica/source/components/dispatcher/dscontrol.c
index 238c77bb..85b4679e 100644
--- a/src/acpica/source/components/dispatcher/dscontrol.c
+++ b/src/acpica/source/components/dispatcher/dscontrol.c
@@ -235,7 +235,7 @@  AcpiDsExecBeginControlOp (
         ControlState->Control.Opcode =
             Op->Common.AmlOpcode;
         ControlState->Control.LoopTimeout = AcpiOsGetTimer () +
-           (UINT64) (AcpiGbl_MaxLoopIterations * ACPI_100NSEC_PER_SEC);
+           ((UINT64) AcpiGbl_MaxLoopIterations * ACPI_100NSEC_PER_SEC);
 
         /* Push the control state on this walk's control stack */
 
diff --git a/src/acpica/source/components/dispatcher/dsfield.c b/src/acpica/source/components/dispatcher/dsfield.c
index 3aff4db1..5477686f 100644
--- a/src/acpica/source/components/dispatcher/dsfield.c
+++ b/src/acpica/source/components/dispatcher/dsfield.c
@@ -309,7 +309,6 @@  AcpiDsCreateBufferField (
     if (WalkState->DeferredNode)
     {
         Node = WalkState->DeferredNode;
-        Status = AE_OK;
     }
     else
     {
@@ -435,7 +434,6 @@  AcpiDsGetFieldNames (
     ACPI_PARSE_OBJECT       *Child;
 
 #ifdef ACPI_EXEC_APP
-    UINT64                  Value = 0;
     ACPI_OPERAND_OBJECT     *ResultDesc;
     ACPI_OPERAND_OBJECT     *ObjDesc;
     char                    *NamePath;
@@ -577,14 +575,13 @@  AcpiDsGetFieldNames (
                     }
 #ifdef ACPI_EXEC_APP
                     NamePath = AcpiNsGetExternalPathname (Info->FieldNode);
-                    ObjDesc = AcpiUtCreateIntegerObject (Value);
-                    if (ACPI_SUCCESS (AeLookupInitFileEntry (NamePath, &Value)))
+                    if (ACPI_SUCCESS (AeLookupInitFileEntry (NamePath, &ObjDesc)))
                     {
                         AcpiExWriteDataToField (ObjDesc,
                             AcpiNsGetAttachedObject (Info->FieldNode),
                             &ResultDesc);
+                        AcpiUtRemoveReference (ObjDesc);
                     }
-                    AcpiUtRemoveReference (ObjDesc);
                     ACPI_FREE (NamePath);
 #endif
                 }
@@ -813,8 +810,6 @@  AcpiDsInitFieldObjects (
                 }
 
                 /* Name already exists, just ignore this error */
-
-                Status = AE_OK;
             }
 
             Arg->Common.Node = Node;
diff --git a/src/acpica/source/components/events/evgpeblk.c b/src/acpica/source/components/events/evgpeblk.c
index 80157dcd..e0e2780f 100644
--- a/src/acpica/source/components/events/evgpeblk.c
+++ b/src/acpica/source/components/events/evgpeblk.c
@@ -272,6 +272,10 @@  AcpiEvDeleteGpeBlock (
     /* Disable all GPEs in this block */
 
     Status = AcpiHwDisableGpeBlock (GpeBlock->XruptBlock, GpeBlock, NULL);
+    if (ACPI_FAILURE (Status))
+    {
+        return_ACPI_STATUS (Status);
+    }
 
     if (!GpeBlock->Previous && !GpeBlock->Next)
     {
@@ -542,7 +546,7 @@  AcpiEvCreateGpeBlock (
     WalkInfo.GpeDevice = GpeDevice;
     WalkInfo.ExecuteByOwnerId = FALSE;
 
-    Status = AcpiNsWalkNamespace (ACPI_TYPE_METHOD, GpeDevice,
+    (void) AcpiNsWalkNamespace (ACPI_TYPE_METHOD, GpeDevice,
         ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK,
         AcpiEvMatchGpeMethod, NULL, &WalkInfo, NULL);
 
diff --git a/src/acpica/source/components/events/evgpeinit.c b/src/acpica/source/components/events/evgpeinit.c
index b7e02a06..7e3c766c 100644
--- a/src/acpica/source/components/events/evgpeinit.c
+++ b/src/acpica/source/components/events/evgpeinit.c
@@ -302,8 +302,6 @@  AcpiEvGpeInitialize (
              * GPE0 and GPE1 do not have to be contiguous in the GPE number
              * space. However, GPE0 always starts at GPE number zero.
              */
-            GpeNumberMax = AcpiGbl_FADT.Gpe1Base +
-                ((RegisterCount1 * ACPI_GPE_REGISTER_WIDTH) - 1);
         }
     }
 
@@ -315,7 +313,6 @@  AcpiEvGpeInitialize (
 
         ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
             "There are no GPE blocks defined in the FADT\n"));
-        Status = AE_OK;
         goto Cleanup;
     }
 
diff --git a/src/acpica/source/components/events/evmisc.c b/src/acpica/source/components/events/evmisc.c
index f73cc2f3..68f1dc8a 100644
--- a/src/acpica/source/components/events/evmisc.c
+++ b/src/acpica/source/components/events/evmisc.c
@@ -400,11 +400,16 @@  AcpiEvTerminate (
         /* Disable all GPEs in all GPE blocks */
 
         Status = AcpiEvWalkGpeList (AcpiHwDisableGpeBlock, NULL);
+        if (ACPI_FAILURE (Status))
+        {
+            ACPI_EXCEPTION ((AE_INFO, Status,
+                "Could not disable GPEs in GPE block"));
+        }
 
         Status = AcpiEvRemoveGlobalLockHandler ();
-        if (ACPI_FAILURE(Status))
+        if (ACPI_FAILURE (Status))
         {
-            ACPI_ERROR ((AE_INFO,
+            ACPI_EXCEPTION ((AE_INFO, Status,
                 "Could not remove Global Lock handler"));
         }
 
@@ -414,7 +419,7 @@  AcpiEvTerminate (
     /* Remove SCI handlers */
 
     Status = AcpiEvRemoveAllSciHandlers ();
-    if (ACPI_FAILURE(Status))
+    if (ACPI_FAILURE (Status))
     {
         ACPI_ERROR ((AE_INFO,
             "Could not remove SCI handler"));
@@ -423,6 +428,12 @@  AcpiEvTerminate (
     /* Deallocate all handler objects installed within GPE info structs */
 
     Status = AcpiEvWalkGpeList (AcpiEvDeleteGpeHandlers, NULL);
+    if (ACPI_FAILURE (Status))
+    {
+        ACPI_EXCEPTION ((AE_INFO, Status,
+            "Could not delete GPE handlers"));
+    }
+
 
     /* Return to original mode if necessary */
 
diff --git a/src/acpica/source/components/events/evregion.c b/src/acpica/source/components/events/evregion.c
index 6f6d7ccc..13a20918 100644
--- a/src/acpica/source/components/events/evregion.c
+++ b/src/acpica/source/components/events/evregion.c
@@ -1037,11 +1037,11 @@  AcpiEvOrphanEcRegMethod (
     Objects[1].Type = ACPI_TYPE_INTEGER;
     Objects[1].Integer.Value = ACPI_REG_CONNECT;
 
-    Status = AcpiEvaluateObject (RegMethod, NULL, &Args, NULL);
+    (void) AcpiEvaluateObject (RegMethod, NULL, &Args, NULL);
 
 Exit:
     /* We ignore all errors from above, don't care */
 
-    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
+    (void) AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
     return_VOID;
 }
diff --git a/src/acpica/source/components/events/evrgnini.c b/src/acpica/source/components/events/evrgnini.c
index 718e2e87..3c865c59 100644
--- a/src/acpica/source/components/events/evrgnini.c
+++ b/src/acpica/source/components/events/evrgnini.c
@@ -363,7 +363,6 @@  AcpiEvPciConfigRegionSetup (
                          * root bridge. Still need to return a context object
                          * for the new PCI_Config operation region, however.
                          */
-                        Status = AE_OK;
                     }
                     else
                     {
diff --git a/src/acpica/source/components/hardware/hwxfsleep.c b/src/acpica/source/components/hardware/hwxfsleep.c
index 3df8f5a5..78dc1902 100644
--- a/src/acpica/source/components/hardware/hwxfsleep.c
+++ b/src/acpica/source/components/hardware/hwxfsleep.c
@@ -357,6 +357,10 @@  AcpiEnterSleepStateS4bios (
 
     Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
         (UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
+    if (ACPI_FAILURE (Status))
+    {
+        return_ACPI_STATUS (Status);
+    }
 
     do {
         AcpiOsStall (ACPI_USEC_PER_MSEC);
diff --git a/src/acpica/source/components/namespace/nsconvert.c b/src/acpica/source/components/namespace/nsconvert.c
index d2b32d25..ae590490 100644
--- a/src/acpica/source/components/namespace/nsconvert.c
+++ b/src/acpica/source/components/namespace/nsconvert.c
@@ -670,5 +670,5 @@  AcpiNsConvertToReference (
 ErrorExit:
     ACPI_FREE (Name);
     *ReturnObject = NewObject;
-    return (AE_OK);
+    return (Status);
 }
diff --git a/src/acpica/source/components/namespace/nsdump.c b/src/acpica/source/components/namespace/nsdump.c
index 8a2a7e92..0ed4d72c 100644
--- a/src/acpica/source/components/namespace/nsdump.c
+++ b/src/acpica/source/components/namespace/nsdump.c
@@ -478,7 +478,7 @@  AcpiNsDumpOneObject (
                     AcpiOsPrintf (" =");
                     for (i = 0; (i < ObjDesc->Buffer.Length && i < 12); i++)
                     {
-                        AcpiOsPrintf (" %.2hX", ObjDesc->Buffer.Pointer[i]);
+                        AcpiOsPrintf (" %2.2X", ObjDesc->Buffer.Pointer[i]);
                     }
                 }
                 AcpiOsPrintf ("\n");
@@ -575,7 +575,7 @@  AcpiNsDumpOneObject (
         case ACPI_TYPE_LOCAL_BANK_FIELD:
         case ACPI_TYPE_LOCAL_INDEX_FIELD:
 
-            AcpiOsPrintf (" Off %.3X Len %.2X Acc %.2hd\n",
+            AcpiOsPrintf (" Off %.3X Len %.2X Acc %.2X\n",
                 (ObjDesc->CommonField.BaseByteOffset * 8)
                     + ObjDesc->CommonField.StartFieldBitOffset,
                 ObjDesc->CommonField.BitLength,
@@ -760,8 +760,6 @@  AcpiNsDumpOneObject (
 
             goto Cleanup;
         }
-
-        ObjType = ACPI_TYPE_INVALID;   /* Terminate loop after next pass */
     }
 
 Cleanup:
diff --git a/src/acpica/source/components/namespace/nsxfname.c b/src/acpica/source/components/namespace/nsxfname.c
index 7332a92f..85be591f 100644
--- a/src/acpica/source/components/namespace/nsxfname.c
+++ b/src/acpica/source/components/namespace/nsxfname.c
@@ -611,7 +611,7 @@  AcpiGetObjectInfo (
 
     if (Cls)
     {
-        NextIdString = AcpiNsCopyDeviceId (&Info->ClassCode,
+       (void) AcpiNsCopyDeviceId (&Info->ClassCode,
             Cls, NextIdString);
     }
 
diff --git a/src/acpica/source/components/parser/psobject.c b/src/acpica/source/components/parser/psobject.c
index 61c3a868..6ceb7d91 100644
--- a/src/acpica/source/components/parser/psobject.c
+++ b/src/acpica/source/components/parser/psobject.c
@@ -652,7 +652,7 @@  AcpiPsCompleteOp (
             WalkState->Opcode = (*Op)->Common.AmlOpcode;
 
             Status = WalkState->AscendingCallback (WalkState);
-            Status = AcpiPsNextParseState (WalkState, *Op, Status);
+            (void) AcpiPsNextParseState (WalkState, *Op, Status);
 
             Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
             if (ACPI_FAILURE (Status2))
@@ -661,7 +661,6 @@  AcpiPsCompleteOp (
             }
         }
 
-        Status = AE_OK;
         break;
 
     case AE_CTRL_BREAK:
@@ -682,7 +681,7 @@  AcpiPsCompleteOp (
         WalkState->Opcode = (*Op)->Common.AmlOpcode;
 
         Status = WalkState->AscendingCallback (WalkState);
-        Status = AcpiPsNextParseState (WalkState, *Op, Status);
+        (void) AcpiPsNextParseState (WalkState, *Op, Status);
 
         Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
         if (ACPI_FAILURE (Status2))
@@ -690,7 +689,6 @@  AcpiPsCompleteOp (
             return_ACPI_STATUS (Status2);
         }
 
-        Status = AE_OK;
         break;
 
     case AE_CTRL_TERMINATE:
diff --git a/src/acpica/source/components/resources/rscreate.c b/src/acpica/source/components/resources/rscreate.c
index 26640c20..172bc55f 100644
--- a/src/acpica/source/components/resources/rscreate.c
+++ b/src/acpica/source/components/resources/rscreate.c
@@ -481,6 +481,10 @@  AcpiRsCreatePciRoutingTable (
 
                 Status = AcpiNsHandleToPathname (
                     (ACPI_HANDLE) Node, &PathBuffer, FALSE);
+                if (ACPI_FAILURE (Status))
+                {
+                    return_ACPI_STATUS (Status);
+                }
 
                 /* +1 to include null terminator */
 
diff --git a/src/acpica/source/components/tables/tbdata.c b/src/acpica/source/components/tables/tbdata.c
index 84dd25bd..6eb1f24a 100644
--- a/src/acpica/source/components/tables/tbdata.c
+++ b/src/acpica/source/components/tables/tbdata.c
@@ -1190,6 +1190,10 @@  AcpiTbLoadTable (
     }
 
     Status = AcpiNsLoadTable (TableIndex, ParentNode);
+    if (ACPI_FAILURE (Status))
+    {
+        return_ACPI_STATUS (Status);
+    }
 
     /*
      * Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is
diff --git a/src/acpica/source/components/tables/tbxfload.c b/src/acpica/source/components/tables/tbxfload.c
index 1e17db6c..24daafcf 100644
--- a/src/acpica/source/components/tables/tbxfload.c
+++ b/src/acpica/source/components/tables/tbxfload.c
@@ -445,6 +445,8 @@  ACPI_EXPORT_SYMBOL_INIT (AcpiInstallTable)
  *
  * PARAMETERS:  Table               - Pointer to a buffer containing the ACPI
  *                                    table to be loaded.
+ *              TableIdx            - Pointer to a UINT32 for storing the table
+ *                                    index, might be NULL
  *
  * RETURN:      Status
  *
@@ -458,7 +460,8 @@  ACPI_EXPORT_SYMBOL_INIT (AcpiInstallTable)
 
 ACPI_STATUS
 AcpiLoadTable (
-    ACPI_TABLE_HEADER       *Table)
+    ACPI_TABLE_HEADER       *Table,
+    UINT32                  *TableIdx)
 {
     ACPI_STATUS             Status;
     UINT32                  TableIndex;
@@ -479,6 +482,11 @@  AcpiLoadTable (
     ACPI_INFO (("Host-directed Dynamic ACPI Table Load:"));
     Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table),
         ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, FALSE, &TableIndex);
+    if (TableIdx)
+    {
+        *TableIdx = TableIndex;
+    }
+
     if (ACPI_SUCCESS (Status))
     {
         /* Complete the initialization/resolution of new objects */
@@ -582,3 +590,42 @@  AcpiUnloadParentTable (
 }
 
 ACPI_EXPORT_SYMBOL (AcpiUnloadParentTable)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiUnloadTable
+ *
+ * PARAMETERS:  TableIndex          - Index as returned by AcpiLoadTable
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Via the TableIndex representing an SSDT or OEMx table, unloads
+ *              the table and deletes all namespace objects associated with
+ *              that table. Unloading of the DSDT is not allowed.
+ *              Note: Mainly intended to support hotplug removal of SSDTs.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiUnloadTable (
+    UINT32                  TableIndex)
+{
+    ACPI_STATUS             Status;
+
+
+    ACPI_FUNCTION_TRACE (AcpiUnloadTable);
+
+
+    if (TableIndex == 1)
+    {
+        /* TableIndex==1 means DSDT is the owner. DSDT cannot be unloaded */
+
+        return_ACPI_STATUS (AE_TYPE);
+    }
+
+    Status = AcpiTbUnloadTable (TableIndex);
+    return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiUnloadTable)
diff --git a/src/acpica/source/components/utilities/utbuffer.c b/src/acpica/source/components/utilities/utbuffer.c
index 44fd30a6..015c16f9 100644
--- a/src/acpica/source/components/utilities/utbuffer.c
+++ b/src/acpica/source/components/utilities/utbuffer.c
@@ -186,8 +186,10 @@  AcpiUtDumpBuffer (
     UINT32                  j;
     UINT32                  Temp32;
     UINT8                   BufChar;
+    UINT32                  DisplayDataOnly = Display & DB_DISPLAY_DATA_ONLY;
 
 
+    Display &= ~DB_DISPLAY_DATA_ONLY;
     if (!Buffer)
     {
         AcpiOsPrintf ("Null Buffer Pointer in DumpBuffer!\n");
@@ -205,7 +207,10 @@  AcpiUtDumpBuffer (
     {
         /* Print current offset */
 
-        AcpiOsPrintf ("%8.4X: ", (BaseOffset + i));
+        if (!DisplayDataOnly)
+        {
+            AcpiOsPrintf ("%8.4X: ", (BaseOffset + i));
+        }
 
         /* Print 16 hex chars */
 
@@ -257,38 +262,41 @@  AcpiUtDumpBuffer (
          * Print the ASCII equivalent characters but watch out for the bad
          * unprintable ones (printable chars are 0x20 through 0x7E)
          */
-        AcpiOsPrintf (" ");
-        for (j = 0; j < 16; j++)
+        if (!DisplayDataOnly)
         {
-            if (i + j >= Count)
+            AcpiOsPrintf (" ");
+            for (j = 0; j < 16; j++)
             {
-                AcpiOsPrintf ("\n");
-                return;
+                if (i + j >= Count)
+                {
+                    AcpiOsPrintf ("\n");
+                    return;
+                }
+
+                /*
+                 * Add comment characters so rest of line is ignored when
+                 * compiled
+                 */
+                if (j == 0)
+                {
+                    AcpiOsPrintf ("// ");
+                }
+
+                BufChar = Buffer[(ACPI_SIZE) i + j];
+                if (isprint (BufChar))
+                {
+                    AcpiOsPrintf ("%c", BufChar);
+                }
+                else
+                {
+                    AcpiOsPrintf (".");
+                }
             }
 
-            /*
-             * Add comment characters so rest of line is ignored when
-             * compiled
-             */
-            if (j == 0)
-            {
-                AcpiOsPrintf ("// ");
-            }
+            /* Done with that line. */
 
-            BufChar = Buffer[(ACPI_SIZE) i + j];
-            if (isprint (BufChar))
-            {
-                AcpiOsPrintf ("%c", BufChar);
-            }
-            else
-            {
-                AcpiOsPrintf (".");
-            }
+            AcpiOsPrintf ("\n");
         }
-
-        /* Done with that line. */
-
-        AcpiOsPrintf ("\n");
         i += 16;
     }
 
diff --git a/src/acpica/source/components/utilities/utids.c b/src/acpica/source/components/utilities/utids.c
index 5fcfbf66..513548c2 100644
--- a/src/acpica/source/components/utilities/utids.c
+++ b/src/acpica/source/components/utilities/utids.c
@@ -466,7 +466,8 @@  AcpiUtExecute_CID (
         {
             /* Copy the String CID from the returned object */
 
-            strcpy (NextIdString, CidObjects[i]->String.Pointer);
+            AcpiUtSafeStrcpy (NextIdString, CidObjects[i]->String.Length + 1,
+                CidObjects[i]->String.Pointer);
             Length = CidObjects[i]->String.Length + 1;
         }
 
diff --git a/src/acpica/source/components/utilities/uttrack.c b/src/acpica/source/components/utilities/uttrack.c
index c6e6b45b..76e439fe 100644
--- a/src/acpica/source/components/utilities/uttrack.c
+++ b/src/acpica/source/components/utilities/uttrack.c
@@ -864,7 +864,7 @@  AcpiUtDumpAllocations (
 
                     case ACPI_DESC_TYPE_PARSER:
 
-                        AcpiOsPrintf ("AmlOpcode 0x%04hX\n",
+                        AcpiOsPrintf ("AmlOpcode 0x%04X\n",
                             Descriptor->Op.Asl.AmlOpcode);
                         break;
 
diff --git a/src/acpica/source/include/acdebug.h b/src/acpica/source/include/acdebug.h
index 4e43bbee..f296cb94 100644
--- a/src/acpica/source/include/acdebug.h
+++ b/src/acpica/source/include/acdebug.h
@@ -392,6 +392,10 @@  void
 AcpiDbGetBusInfo (
     void);
 
+ACPI_STATUS
+AcpiDbDisplayFields (
+    UINT32                  AddressSpaceId);
+
 
 /*
  * dbdisply - debug display commands
diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
index a123eed7..62e37909 100644
--- a/src/acpica/source/include/acpixf.h
+++ b/src/acpica/source/include/acpixf.h
@@ -154,7 +154,7 @@ 
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20190816
+#define ACPI_CA_VERSION                 0x20191018
 
 #include "acconfig.h"
 #include "actypes.h"
@@ -664,7 +664,13 @@  AcpiInstallTable (
 ACPI_EXTERNAL_RETURN_STATUS (
 ACPI_STATUS
 AcpiLoadTable (
-    ACPI_TABLE_HEADER       *Table))
+    ACPI_TABLE_HEADER       *Table,
+    UINT32                  *TableIdx))
+
+ACPI_EXTERNAL_RETURN_STATUS (
+ACPI_STATUS
+AcpiUnloadTable (
+    UINT32                  TableIndex))
 
 ACPI_EXTERNAL_RETURN_STATUS (
 ACPI_STATUS
diff --git a/src/acpica/source/include/acstruct.h b/src/acpica/source/include/acstruct.h
index f81c8a7d..e6ab1d90 100644
--- a/src/acpica/source/include/acstruct.h
+++ b/src/acpica/source/include/acstruct.h
@@ -357,6 +357,19 @@  typedef struct acpi_device_walk_info
 } ACPI_DEVICE_WALK_INFO;
 
 
+/* Info used by Acpi  AcpiDbDisplayFields */
+
+typedef struct acpi_region_walk_info
+{
+    UINT32                          DebugLevel;
+    UINT32                          Count;
+    ACPI_OWNER_ID                   OwnerId;
+    UINT8                           DisplayType;
+    UINT32                          AddressSpaceId;
+
+} ACPI_REGION_WALK_INFO;
+
+
 /* TBD: [Restructure] Merge with struct above */
 
 typedef struct acpi_walk_info
diff --git a/src/acpica/source/include/acutils.h b/src/acpica/source/include/acutils.h
index 0c2327d2..6352b5ff 100644
--- a/src/acpica/source/include/acutils.h
+++ b/src/acpica/source/include/acutils.h
@@ -290,10 +290,11 @@  typedef struct acpi_pkg_info
 
 /* AcpiUtDumpBuffer */
 
-#define DB_BYTE_DISPLAY     1
-#define DB_WORD_DISPLAY     2
-#define DB_DWORD_DISPLAY    4
-#define DB_QWORD_DISPLAY    8
+#define DB_BYTE_DISPLAY      0x01
+#define DB_WORD_DISPLAY      0x02
+#define DB_DWORD_DISPLAY     0x04
+#define DB_QWORD_DISPLAY     0x08
+#define DB_DISPLAY_DATA_ONLY 0x10
 
 
 /*
diff --git a/src/acpica/source/tools/acpiexec/aecommon.h b/src/acpica/source/tools/acpiexec/aecommon.h
index 602356de..257632f7 100644
--- a/src/acpica/source/tools/acpiexec/aecommon.h
+++ b/src/acpica/source/tools/acpiexec/aecommon.h
@@ -195,7 +195,8 @@  typedef struct ae_debug_regions
 typedef struct init_file_entry
 {
     char                    *Name;
-    UINT64                  Value;
+    ACPI_OPERAND_OBJECT     *ObjDesc;
+
 } INIT_FILE_ENTRY;
 
 extern BOOLEAN              AcpiGbl_UseLocalFaultHandler;
@@ -356,7 +357,7 @@  AeSetupConfiguration (
 ACPI_STATUS
 AeLookupInitFileEntry (
     char                    *Pathname,
-    UINT64                  *Value);
+    ACPI_OPERAND_OBJECT     **ObjDesc);
 
 /* aeexec */
 
diff --git a/src/acpica/source/tools/acpiexec/aehandlers.c b/src/acpica/source/tools/acpiexec/aehandlers.c
index 75e8eb0a..f7dd012e 100644
--- a/src/acpica/source/tools/acpiexec/aehandlers.c
+++ b/src/acpica/source/tools/acpiexec/aehandlers.c
@@ -683,20 +683,27 @@  AeInstallLateHandlers (
     {
         Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
             AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
+        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
 
         Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
             AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
+        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
 
         Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
             AeNotifyHandler1);
+        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
+
         Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
             AeNotifyHandler2);
+        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
 
         Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
             AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
+        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
 
         Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
             AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
+        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
     }
 
     Status = AcpiGetHandle (NULL, "\\_PR.CPU0", &Handle);
@@ -704,9 +711,11 @@  AeInstallLateHandlers (
     {
         Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
             AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
+        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
 
         Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
             AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
+        ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
     }
 
 #if (!ACPI_REDUCED_HARDWARE)
@@ -855,13 +864,15 @@  AeInstallEarlyHandlers (
 
         Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
             AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
+        ACPI_CHECK_OK(AcpiInstallNotifyHandler, Status);
 
         Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
             AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
+        ACPI_CHECK_OK(AcpiInstallNotifyHandler, Status);
 
         /* Attempt duplicate handler installation, should fail */
 
-        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
+        (void) AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
             AeNotifyHandler1, ACPI_CAST_PTR (void, 0x77777777));
 
         Status = AcpiAttachData (Handle, AeAttachedDataHandler, Handle);
diff --git a/src/acpica/source/tools/acpiexec/aeinitfile.c b/src/acpica/source/tools/acpiexec/aeinitfile.c
index f895e2cc..35e2b8b8 100644
--- a/src/acpica/source/tools/acpiexec/aeinitfile.c
+++ b/src/acpica/source/tools/acpiexec/aeinitfile.c
@@ -224,9 +224,13 @@  AeProcessInitFile(
     void)
 {
     ACPI_WALK_STATE         *WalkState;
-    int                     i;
     UINT64                  idx;
     ACPI_STATUS             Status;
+    char                    *Token;
+    char                    *ObjectBuffer;
+    char                    *TempNameBuffer;
+    ACPI_OBJECT_TYPE        Type;
+    ACPI_OBJECT             TempObject;
 
 
     if (!InitFile)
@@ -249,26 +253,44 @@  AeProcessInitFile(
         AcpiOsAllocate (sizeof (INIT_FILE_ENTRY) * AcpiGbl_InitFileLineCount);
     for (idx = 0; fgets (LineBuffer, AE_FILE_BUFFER_SIZE, InitFile); ++idx)
     {
-        if (sscanf (LineBuffer, "%s %s\n",
-                &NameBuffer[1], ValueBuffer) != 2)
+
+        TempNameBuffer = AcpiDbGetNextToken (LineBuffer, &Token, &Type);
+        if (LineBuffer[0] == '\\')
         {
-            goto CleanupAndExit;
+            strcpy (NameBuffer, TempNameBuffer);
+        }
+        else
+        {
+            /* Add a root prefix if not present in the string */
+
+            strcpy (NameBuffer + 1, TempNameBuffer);
         }
 
-        /* Add a root prefix if not present in the string */
+        AcpiGbl_InitEntries[idx].Name =
+            AcpiOsAllocateZeroed (strnlen (NameBuffer, AE_FILE_BUFFER_SIZE) + 1);
+
+        strcpy (AcpiGbl_InitEntries[idx].Name, NameBuffer);
+
+        ObjectBuffer = AcpiDbGetNextToken (Token, &Token, &Type);
 
-        i = 0;
-        if (NameBuffer[1] == '\\')
+        if (Type == ACPI_TYPE_FIELD_UNIT)
+        {
+            Status = AcpiDbConvertToObject (ACPI_TYPE_BUFFER, ObjectBuffer,
+                &TempObject);
+        }
+        else
         {
-            i = 1;
+            Status = AcpiDbConvertToObject (Type, ObjectBuffer, &TempObject);
         }
 
-        AcpiGbl_InitEntries[idx].Name =
-            AcpiOsAllocateZeroed (strnlen (NameBuffer + i, AE_FILE_BUFFER_SIZE) + 1);
+        Status = AcpiUtCopyEobjectToIobject (&TempObject,
+            &AcpiGbl_InitEntries[idx].ObjDesc);
 
-        strcpy (AcpiGbl_InitEntries[idx].Name, NameBuffer + i);
+        if (Type == ACPI_TYPE_BUFFER || Type == ACPI_TYPE_FIELD_UNIT)
+        {
+            ACPI_FREE (TempObject.Buffer.Pointer);
+        }
 
-        Status = AcpiUtStrtoul64 (ValueBuffer, &AcpiGbl_InitEntries[idx].Value);
         if (ACPI_FAILURE (Status))
         {
             AcpiOsPrintf ("%s %s\n", ValueBuffer,
@@ -276,7 +298,16 @@  AeProcessInitFile(
             goto CleanupAndExit;
         }
 
-        AeEnterInitFileEntry (AcpiGbl_InitEntries[idx], WalkState);
+        /*
+         * Special case for field units. Field units are dependent on the
+         * parent region. This parent region has yet to be created so defer the
+         * initialization until the dispatcher. For all other types, initialize
+         * the namespace node with the value found in the init file.
+         */
+        if (Type != ACPI_TYPE_FIELD_UNIT)
+        {
+            AeEnterInitFileEntry (AcpiGbl_InitEntries[idx], WalkState);
+        }
     }
 
     /* Cleanup */
@@ -309,14 +340,12 @@  AeEnterInitFileEntry (
     ACPI_WALK_STATE         *WalkState)
 {
     char                    *Pathname = InitEntry.Name;
-    UINT64                  Value = InitEntry.Value;
-    ACPI_OPERAND_OBJECT     *ObjDesc;
+    ACPI_OPERAND_OBJECT     *ObjDesc = InitEntry.ObjDesc;
     ACPI_NAMESPACE_NODE     *NewNode;
     ACPI_STATUS             Status;
 
 
-    AcpiOsPrintf ("Initializing namespace element: %s\n", Pathname);
-    Status = AcpiNsLookup (NULL, Pathname, ACPI_TYPE_INTEGER,
+    Status = AcpiNsLookup (NULL, Pathname, ObjDesc->Common.Type,
         ACPI_IMODE_LOAD_PASS2, ACPI_NS_ERROR_IF_FOUND | ACPI_NS_NO_UPSEARCH |
         ACPI_NS_EARLY_INIT, NULL, &NewNode);
     if (ACPI_FAILURE (Status))
@@ -327,15 +356,17 @@  AeEnterInitFileEntry (
         return;
     }
 
-    ObjDesc = AcpiUtCreateIntegerObject (Value);
-
-    AcpiOsPrintf ("New value: 0x%8.8X%8.8X\n",
-        ACPI_FORMAT_UINT64 (Value));
-
     /* Store pointer to value descriptor in the Node */
 
     Status = AcpiNsAttachObject (NewNode, ObjDesc,
-         ACPI_TYPE_INTEGER);
+         ObjDesc->Common.Type);
+    if (ACPI_FAILURE (Status))
+    {
+        ACPI_EXCEPTION ((AE_INFO, Status,
+            "While attaching object to node from namespace initialization file: %s",
+            Pathname));
+        return;
+    }
 
     /* Remove local reference to the object */
 
@@ -359,7 +390,7 @@  AeEnterInitFileEntry (
 ACPI_STATUS
 AeLookupInitFileEntry (
     char                    *Pathname,
-    UINT64                  *Value)
+    ACPI_OPERAND_OBJECT     **ObjDesc)
 {
     UINT32                  i;
 
@@ -372,7 +403,7 @@  AeLookupInitFileEntry (
     {
         if (!strcmp(AcpiGbl_InitEntries[i].Name, Pathname))
         {
-            *Value = AcpiGbl_InitEntries[i].Value;
+            *ObjDesc = AcpiGbl_InitEntries[i].ObjDesc;
             return AE_OK;
         }
     }