resolve conflicts trunk
authorchristos <christos@NetBSD.org>
Fri, 27 Dec 2013 18:50:56 +0000
branchtrunk
changeset 223348 a74f943a033d
parent 223347 a46447e887c5
child 223349 16ac64f1e8d0
resolve conflicts
sys/external/bsd/acpica/dist/README
sys/external/bsd/acpica/dist/common/dmtbinfo.c
sys/external/bsd/acpica/dist/compiler/Makefile
sys/external/bsd/acpica/dist/compiler/aslcompile.c
sys/external/bsd/acpica/dist/compiler/asltree.c
sys/external/bsd/acpica/dist/compiler/aslutils.c
sys/external/bsd/acpica/dist/debugger/dbcmds.c
sys/external/bsd/acpica/dist/debugger/dbdisply.c
sys/external/bsd/acpica/dist/debugger/dbexec.c
sys/external/bsd/acpica/dist/debugger/dbinput.c
sys/external/bsd/acpica/dist/debugger/dbutils.c
sys/external/bsd/acpica/dist/disassembler/dmresrc.c
sys/external/bsd/acpica/dist/disassembler/dmresrcl.c
sys/external/bsd/acpica/dist/dispatcher/dscontrol.c
sys/external/bsd/acpica/dist/dispatcher/dsopcode.c
sys/external/bsd/acpica/dist/events/evrgnini.c
sys/external/bsd/acpica/dist/events/evxface.c
sys/external/bsd/acpica/dist/executer/exconfig.c
sys/external/bsd/acpica/dist/executer/exdebug.c
sys/external/bsd/acpica/dist/executer/exdump.c
sys/external/bsd/acpica/dist/hardware/hwesleep.c
sys/external/bsd/acpica/dist/hardware/hwsleep.c
sys/external/bsd/acpica/dist/hardware/hwxfsleep.c
sys/external/bsd/acpica/dist/include/acapps.h
sys/external/bsd/acpica/dist/include/acdebug.h
sys/external/bsd/acpica/dist/include/acdisasm.h
sys/external/bsd/acpica/dist/include/acexcep.h
sys/external/bsd/acpica/dist/include/acglobal.h
sys/external/bsd/acpica/dist/include/acinterp.h
sys/external/bsd/acpica/dist/include/aclocal.h
sys/external/bsd/acpica/dist/include/acmacros.h
sys/external/bsd/acpica/dist/include/acnamesp.h
sys/external/bsd/acpica/dist/include/acpiosxf.h
sys/external/bsd/acpica/dist/include/acpixf.h
sys/external/bsd/acpica/dist/include/acresrc.h
sys/external/bsd/acpica/dist/include/actables.h
sys/external/bsd/acpica/dist/include/actbl1.h
sys/external/bsd/acpica/dist/include/actypes.h
sys/external/bsd/acpica/dist/include/acutils.h
sys/external/bsd/acpica/dist/include/platform/acnetbsd.h
sys/external/bsd/acpica/dist/namespace/nsaccess.c
sys/external/bsd/acpica/dist/namespace/nsdump.c
sys/external/bsd/acpica/dist/namespace/nseval.c
sys/external/bsd/acpica/dist/namespace/nsinit.c
sys/external/bsd/acpica/dist/namespace/nsrepair2.c
sys/external/bsd/acpica/dist/namespace/nsxfeval.c
sys/external/bsd/acpica/dist/namespace/nsxfname.c
sys/external/bsd/acpica/dist/parser/psopcode.c
sys/external/bsd/acpica/dist/parser/psopinfo.c
sys/external/bsd/acpica/dist/resources/rsdump.c
sys/external/bsd/acpica/dist/resources/rsutils.c
sys/external/bsd/acpica/dist/resources/rsxface.c
sys/external/bsd/acpica/dist/tables/tbfadt.c
sys/external/bsd/acpica/dist/tables/tbinstal.c
sys/external/bsd/acpica/dist/tables/tbutils.c
sys/external/bsd/acpica/dist/tables/tbxface.c
sys/external/bsd/acpica/dist/tables/tbxfroot.c
sys/external/bsd/acpica/dist/tools/acpibin/Makefile
sys/external/bsd/acpica/dist/tools/acpiexec/Makefile
sys/external/bsd/acpica/dist/tools/acpihelp/Makefile
sys/external/bsd/acpica/dist/tools/acpihelp/ahpredef.c
sys/external/bsd/acpica/dist/tools/acpinames/Makefile
sys/external/bsd/acpica/dist/tools/acpisrc/Makefile
sys/external/bsd/acpica/dist/tools/acpixtract/Makefile
sys/external/bsd/acpica/dist/utilities/utcache.c
sys/external/bsd/acpica/dist/utilities/utdebug.c
sys/external/bsd/acpica/dist/utilities/utdecode.c
sys/external/bsd/acpica/dist/utilities/uteval.c
sys/external/bsd/acpica/dist/utilities/utglobal.c
sys/external/bsd/acpica/dist/utilities/utmisc.c
sys/external/bsd/acpica/dist/utilities/utmutex.c
sys/external/bsd/acpica/dist/utilities/utosi.c
sys/external/bsd/acpica/dist/utilities/uttrack.c
--- a/sys/external/bsd/acpica/dist/README	Fri Dec 27 18:45:57 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-Makefiles for tool generation from the unix tarball
----------------------------------------------------
-
-These makefiles are intended to generate the ACPICA utilities in
-a Linux or Unix-like environment, from the ACPICA source code
-as released in the unix tarball.
-
-Windows binary versions of these tools are available at:
-
-http://www.acpica.org/downloads/binary_tools.php
-
-Documentation is available at acpica.org:
-
-http://www.acpica.org/documentation/
-
-The acpica/source/tools directory contains the following utilities.
-Note: These utilities are tested and supported as 32-bit versions
-only.
-
-acpibin
-acpiexec
-acpihelp
-acpinames
-acpisrc
-acpixtract
-iasl
-
-
-Requirements
-------------
-
-make
-gcc compiler (4+)
-bison or yacc
-flex or lex
-
-
-Configuration
--------------
-
-The Makefiles contain this configuration information:
-
-HOST =       _LINUX             /* Host system, must appear in acenv.h */
-CC =         gcc                /* C compiler */
-
-
-1) acpibin, an AML file tool
-
-acpibin compares AML files, dumps AML binary files to text files,
-extracts binary AML from text files, and other AML file
-manipulation.
-
-To compile:
-
-cd acpica/source/tools/acpibin
-make
-make install   /* install the binary to /usr/bin */
-
-
-2) acpiexec, a user-space AML interpreter
-
-acpiexec allows the loading of ACPI tables and execution of control
-methods from user space. Useful for debugging AML code and testing
-the AML interpreter. Hardware access is simulated.
-
-To compile:
-
-cd acpica/source/tools/acpiexec
-make
-make install   /* install the binary to /usr/bin */
-
-
-3) acpihelp, syntax help for ASL operators and reserved names
-
-acpihelp displays the syntax for all of the ASL operators, as well
-as information about the ASL/ACPI reserved names (4-char names that
-start with underscore.)
-
-To compile:
-
-cd acpica/source/tools/acpihelp
-make
-make install   /* install the binary to /usr/bin */
-
-
-4) acpinames, load and dump acpi namespace
-
-acpinames loads an ACPI namespace from a binary ACPI table file.
-This is a smaller version of acpiexec that loads an acpi table and
-dumps the resulting namespace. It is primarily intended to demonstrate
-the configurability of ACPICA.
-
-To compile:
-
-cd acpica/source/tools/acpinames
-make
-make install   /* install the binary to /usr/bin */
-
-
-5) acpisrc, a source code conversion tool
-
-acpisrc converts the standard form of the acpica source release (included
-here) into a version that meets Linux coding guidelines. This consists
-mainly of performing a series of string replacements and transformations
-to the code. It can also be used to clean the acpica source and generate
-statistics.
-
-To compile:
-
-cd acpica/source/tools/acpisrc
-make
-make install   /* install the binary to /usr/bin */
-
-
-6) acpixtract, extract binary ACPI tables from an acpidump
-
-acpixtract is used to extract binary ACPI tables from the ASCII text
-output of an acpidump utility (available on several different hosts.)
-
-To compile:
-
-cd acpica/source/tools/acpixtract
-make
-make install   /* install the binary to /usr/bin */
-
-
-7) iasl, an optimizing ASL compiler/disassembler
-
-iasl compiles ASL (ACPI Source Language) into AML (ACPI Machine
-Language). This AML is suitable for inclusion as a DSDT in system
-firmware. It also can disassemble AML, for debugging purposes.
-
-To compile:
-
-cd acpica/source/compiler
-make
-make install   /* install the binary to /usr/bin */
--- a/sys/external/bsd/acpica/dist/common/dmtbinfo.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbinfo.c	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -78,97 +78,131 @@
 /*
  * Macros used to generate offsets to specific table fields
  */
-#define ACPI_FACS_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_FACS,f)
-#define ACPI_GAS_OFFSET(f)              (UINT8) ACPI_OFFSET (ACPI_GENERIC_ADDRESS,f)
-#define ACPI_HDR_OFFSET(f)              (UINT8) ACPI_OFFSET (ACPI_TABLE_HEADER,f)
-#define ACPI_RSDP_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_RSDP,f)
-#define ACPI_BOOT_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_BOOT,f)
-#define ACPI_BERT_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_BERT,f)
-#define ACPI_CPEP_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_CPEP,f)
-#define ACPI_DBGP_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_DBGP,f)
-#define ACPI_DMAR_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_DMAR,f)
-#define ACPI_ECDT_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_ECDT,f)
-#define ACPI_EINJ_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_EINJ,f)
-#define ACPI_ERST_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_ERST,f)
-#define ACPI_HEST_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_HEST,f)
-#define ACPI_HPET_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_HPET,f)
-#define ACPI_IVRS_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_IVRS,f)
-#define ACPI_MADT_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_MADT,f)
-#define ACPI_MCFG_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_MCFG,f)
-#define ACPI_MCHI_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_MCHI,f)
-#define ACPI_MSCT_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_MSCT,f)
-#define ACPI_SBST_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_SBST,f)
-#define ACPI_SLIT_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_SLIT,f)
-#define ACPI_SPCR_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_SPCR,f)
-#define ACPI_SPMI_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_SPMI,f)
-#define ACPI_SRAT_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_SRAT,f)
-#define ACPI_TCPA_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_TCPA,f)
-#define ACPI_UEFI_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_UEFI,f)
-#define ACPI_WAET_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_WAET,f)
-#define ACPI_WDAT_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_WDAT,f)
-#define ACPI_WDDT_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_WDDT,f)
-#define ACPI_WDRT_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_WDRT,f)
+#define ACPI_FACS_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_FACS,f)
+#define ACPI_GAS_OFFSET(f)              (UINT16) ACPI_OFFSET (ACPI_GENERIC_ADDRESS,f)
+#define ACPI_HDR_OFFSET(f)              (UINT16) ACPI_OFFSET (ACPI_TABLE_HEADER,f)
+#define ACPI_RSDP_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_RSDP,f)
+#define ACPI_BERT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_BERT,f)
+#define ACPI_BGRT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_BGRT,f)
+#define ACPI_BOOT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_BOOT,f)
+#define ACPI_CPEP_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_CPEP,f)
+#define ACPI_DBG2_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_DBG2,f)
+#define ACPI_DBGP_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_DBGP,f)
+#define ACPI_DMAR_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_DMAR,f)
+#define ACPI_DRTM_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_DRTM,f)
+#define ACPI_ECDT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_ECDT,f)
+#define ACPI_EINJ_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_EINJ,f)
+#define ACPI_ERST_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_ERST,f)
+#define ACPI_GTDT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_GTDT,f)
+#define ACPI_HEST_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_HEST,f)
+#define ACPI_HPET_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_HPET,f)
+#define ACPI_IVRS_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_IVRS,f)
+#define ACPI_MADT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_MADT,f)
+#define ACPI_MCFG_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_MCFG,f)
+#define ACPI_MCHI_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_MCHI,f)
+#define ACPI_MPST_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_MPST,f)
+#define ACPI_MSCT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_MSCT,f)
+#define ACPI_PCCT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_PCCT,f)
+#define ACPI_PMTT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_PMTT,f)
+#define ACPI_S3PT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_S3PT,f)
+#define ACPI_SBST_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_SBST,f)
+#define ACPI_SLIT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIT,f)
+#define ACPI_SPCR_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_SPCR,f)
+#define ACPI_SPMI_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_SPMI,f)
+#define ACPI_SRAT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_SRAT,f)
+#define ACPI_TCPA_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA,f)
+#define ACPI_TPM2_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM2,f)
+#define ACPI_UEFI_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_UEFI,f)
+#define ACPI_WAET_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_WAET,f)
+#define ACPI_WDAT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_WDAT,f)
+#define ACPI_WDDT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_WDDT,f)
+#define ACPI_WDRT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_WDRT,f)
 
 /* Subtables */
 
-#define ACPI_ASF0_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_ASF_INFO,f)
-#define ACPI_ASF1_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_ASF_ALERT,f)
-#define ACPI_ASF1a_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_ASF_ALERT_DATA,f)
-#define ACPI_ASF2_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_ASF_REMOTE,f)
-#define ACPI_ASF2a_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_ASF_CONTROL_DATA,f)
-#define ACPI_ASF3_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_ASF_RMCP,f)
-#define ACPI_ASF4_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_ASF_ADDRESS,f)
-#define ACPI_CPEP0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_CPEP_POLLING,f)
-#define ACPI_DMARS_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_DMAR_DEVICE_SCOPE,f)
-#define ACPI_DMAR0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_DMAR_HARDWARE_UNIT,f)
-#define ACPI_DMAR1_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_DMAR_RESERVED_MEMORY,f)
-#define ACPI_DMAR2_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_DMAR_ATSR,f)
-#define ACPI_DMAR3_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_DMAR_RHSA,f)
-#define ACPI_EINJ0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
-#define ACPI_ERST0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
-#define ACPI_HEST0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_HEST_IA_MACHINE_CHECK,f)
-#define ACPI_HEST1_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_HEST_IA_CORRECTED,f)
-#define ACPI_HEST2_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_HEST_IA_NMI,f)
-#define ACPI_HEST6_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_HEST_AER_ROOT,f)
-#define ACPI_HEST7_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_HEST_AER,f)
-#define ACPI_HEST8_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_HEST_AER_BRIDGE,f)
-#define ACPI_HEST9_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_HEST_GENERIC,f)
-#define ACPI_HESTN_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_HEST_NOTIFY,f)
-#define ACPI_HESTB_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_HEST_IA_ERROR_BANK,f)
-#define ACPI_IVRSH_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_IVRS_HEADER,f)
-#define ACPI_IVRS0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_IVRS_HARDWARE,f)
-#define ACPI_IVRS1_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_IVRS_MEMORY,f)
-#define ACPI_IVRSD_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_IVRS_DE_HEADER,f)
-#define ACPI_IVRS8A_OFFSET(f)           (UINT8) ACPI_OFFSET (ACPI_IVRS_DEVICE8A,f)
-#define ACPI_IVRS8B_OFFSET(f)           (UINT8) ACPI_OFFSET (ACPI_IVRS_DEVICE8B,f)
-#define ACPI_IVRS8C_OFFSET(f)           (UINT8) ACPI_OFFSET (ACPI_IVRS_DEVICE8C,f)
-#define ACPI_MADT0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC,f)
-#define ACPI_MADT1_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_MADT_IO_APIC,f)
-#define ACPI_MADT2_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_MADT_INTERRUPT_OVERRIDE,f)
-#define ACPI_MADT3_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_MADT_NMI_SOURCE,f)
-#define ACPI_MADT4_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC_NMI,f)
-#define ACPI_MADT5_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC_OVERRIDE,f)
-#define ACPI_MADT6_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_MADT_IO_SAPIC,f)
-#define ACPI_MADT7_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_MADT_LOCAL_SAPIC,f)
-#define ACPI_MADT8_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_MADT_INTERRUPT_SOURCE,f)
-#define ACPI_MADT9_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_MADT_LOCAL_X2APIC,f)
-#define ACPI_MADT10_OFFSET(f)           (UINT8) ACPI_OFFSET (ACPI_MADT_LOCAL_X2APIC_NMI,f)
-#define ACPI_MADTH_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
-#define ACPI_MCFG0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_MCFG_ALLOCATION,f)
-#define ACPI_MSCT0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_MSCT_PROXIMITY,f)
-#define ACPI_SLICH_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_SLIC_HEADER,f)
-#define ACPI_SLIC0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_SLIC_KEY,f)
-#define ACPI_SLIC1_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_SLIC_MARKER,f)
-#define ACPI_SRATH_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
-#define ACPI_SRAT0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_SRAT_CPU_AFFINITY,f)
-#define ACPI_SRAT1_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_SRAT_MEM_AFFINITY,f)
-#define ACPI_SRAT2_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f)
-#define ACPI_WDAT0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_WDAT_ENTRY,f)
+#define ACPI_ASF0_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_ASF_INFO,f)
+#define ACPI_ASF1_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_ASF_ALERT,f)
+#define ACPI_ASF1a_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_ASF_ALERT_DATA,f)
+#define ACPI_ASF2_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_ASF_REMOTE,f)
+#define ACPI_ASF2a_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_ASF_CONTROL_DATA,f)
+#define ACPI_ASF3_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_ASF_RMCP,f)
+#define ACPI_ASF4_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_ASF_ADDRESS,f)
+#define ACPI_CPEP0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_CPEP_POLLING,f)
+#define ACPI_CSRT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_CSRT_GROUP,f)
+#define ACPI_CSRT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_CSRT_SHARED_INFO,f)
+#define ACPI_CSRT2_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_CSRT_DESCRIPTOR,f)
+#define ACPI_DBG20_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_DBG2_DEVICE,f)
+#define ACPI_DMARS_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_DMAR_DEVICE_SCOPE,f)
+#define ACPI_DMAR0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_DMAR_HARDWARE_UNIT,f)
+#define ACPI_DMAR1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_DMAR_RESERVED_MEMORY,f)
+#define ACPI_DMAR2_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_DMAR_ATSR,f)
+#define ACPI_DMAR3_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_DMAR_RHSA,f)
+#define ACPI_EINJ0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
+#define ACPI_ERST0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
+#define ACPI_FPDTH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_FPDT_HEADER,f)
+#define ACPI_FPDT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_FPDT_BOOT,f)
+#define ACPI_FPDT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_FPDT_S3PT_PTR,f)
+#define ACPI_HEST0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_HEST_IA_MACHINE_CHECK,f)
+#define ACPI_HEST1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_HEST_IA_CORRECTED,f)
+#define ACPI_HEST2_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_HEST_IA_NMI,f)
+#define ACPI_HEST6_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_HEST_AER_ROOT,f)
+#define ACPI_HEST7_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_HEST_AER,f)
+#define ACPI_HEST8_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_HEST_AER_BRIDGE,f)
+#define ACPI_HEST9_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_HEST_GENERIC,f)
+#define ACPI_HESTN_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_HEST_NOTIFY,f)
+#define ACPI_HESTB_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_HEST_IA_ERROR_BANK,f)
+#define ACPI_IVRSH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IVRS_HEADER,f)
+#define ACPI_IVRS0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IVRS_HARDWARE,f)
+#define ACPI_IVRS1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IVRS_MEMORY,f)
+#define ACPI_IVRSD_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IVRS_DE_HEADER,f)
+#define ACPI_IVRS8A_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8A,f)
+#define ACPI_IVRS8B_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8B,f)
+#define ACPI_IVRS8C_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8C,f)
+#define ACPI_MADT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC,f)
+#define ACPI_MADT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MADT_IO_APIC,f)
+#define ACPI_MADT2_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MADT_INTERRUPT_OVERRIDE,f)
+#define ACPI_MADT3_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MADT_NMI_SOURCE,f)
+#define ACPI_MADT4_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC_NMI,f)
+#define ACPI_MADT5_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC_OVERRIDE,f)
+#define ACPI_MADT6_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MADT_IO_SAPIC,f)
+#define ACPI_MADT7_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_SAPIC,f)
+#define ACPI_MADT8_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MADT_INTERRUPT_SOURCE,f)
+#define ACPI_MADT9_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_X2APIC,f)
+#define ACPI_MADT10_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_X2APIC_NMI,f)
+#define ACPI_MADT11_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_MADT_GENERIC_INTERRUPT,f)
+#define ACPI_MADT12_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_MADT_GENERIC_DISTRIBUTOR,f)
+#define ACPI_MADTH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
+#define ACPI_MCFG0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MCFG_ALLOCATION,f)
+#define ACPI_MPST0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_NODE,f)
+#define ACPI_MPST0A_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_STATE,f)
+#define ACPI_MPST0B_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_MPST_COMPONENT,f)
+#define ACPI_MPST1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MPST_DATA_HDR,f)
+#define ACPI_MPST2_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_DATA,f)
+#define ACPI_MSCT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MSCT_PROXIMITY,f)
+#define ACPI_MTMR0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_MTMR_ENTRY,f)
+#define ACPI_PCCT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f)
+#define ACPI_PMTT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PMTT_SOCKET,f)
+#define ACPI_PMTT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PMTT_CONTROLLER,f)
+#define ACPI_PMTT1A_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_PMTT_DOMAIN,f)
+#define ACPI_PMTT2_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PMTT_PHYSICAL_COMPONENT,f)
+#define ACPI_PMTTH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PMTT_HEADER,f)
+#define ACPI_S3PTH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_S3PT_HEADER,f)
+#define ACPI_S3PT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_S3PT_RESUME,f)
+#define ACPI_S3PT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_S3PT_SUSPEND,f)
+#define ACPI_SLICH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_SLIC_HEADER,f)
+#define ACPI_SLIC0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_SLIC_KEY,f)
+#define ACPI_SLIC1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_SLIC_MARKER,f)
+#define ACPI_SRATH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
+#define ACPI_SRAT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_SRAT_CPU_AFFINITY,f)
+#define ACPI_SRAT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_SRAT_MEM_AFFINITY,f)
+#define ACPI_SRAT2_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f)
+#define ACPI_VRTC0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_VRTC_ENTRY,f)
+#define ACPI_WDAT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_WDAT_ENTRY,f)
 
 /*
  * Simplify access to flag fields by breaking them up into bytes
  */
-#define ACPI_FLAG_OFFSET(d,f,o)         (UINT8) (ACPI_OFFSET (d,f) + o)
+#define ACPI_FLAG_OFFSET(d,f,o)         (UINT16) (ACPI_OFFSET (d,f) + o)
 
 /* Flags */
 
@@ -178,6 +212,7 @@
 #define ACPI_SRAT0_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_SRAT_CPU_AFFINITY,f,o)
 #define ACPI_SRAT1_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_SRAT_MEM_AFFINITY,f,o)
 #define ACPI_SRAT2_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f,o)
+#define ACPI_GTDT_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (ACPI_TABLE_GTDT,f,o)
 #define ACPI_MADT_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (ACPI_TABLE_MADT,f,o)
 #define ACPI_MADT0_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_APIC,f,o)
 #define ACPI_MADT2_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_MADT_INTERRUPT_OVERRIDE,f,o)
@@ -187,6 +222,11 @@
 #define ACPI_MADT8_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_MADT_INTERRUPT_SOURCE,f,o)
 #define ACPI_MADT9_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_X2APIC,f,o)
 #define ACPI_MADT10_FLAG_OFFSET(f,o)    ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_X2APIC_NMI,f,o)
+#define ACPI_MADT11_FLAG_OFFSET(f,o)    ACPI_FLAG_OFFSET (ACPI_MADT_GENERIC_INTERRUPT,f,o)
+#define ACPI_MPST0_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_MPST_POWER_NODE,f,o)
+#define ACPI_MPST2_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_MPST_POWER_DATA,f,o)
+#define ACPI_PCCT_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (ACPI_TABLE_PCCT,f,o)
+#define ACPI_PMTTH_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_PMTT_HEADER,f,o)
 #define ACPI_WDDT_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (ACPI_TABLE_WDDT,f,o)
 #define ACPI_EINJ0_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_WHEA_HEADER,f,o)
 #define ACPI_ERST0_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_WHEA_HEADER,f,o)
@@ -198,6 +238,7 @@
  * Required terminator for all tables below
  */
 #define ACPI_DMT_TERMINATOR             {ACPI_DMT_EXIT, 0, NULL, 0}
+#define ACPI_DMT_NEW_LINE               {ACPI_DMT_EXTRA_TEXT, 0, "\n", 0}
 
 
 /*
@@ -351,6 +392,7 @@
     {ACPI_DMT_FLAG2,    ACPI_FADT_FLAG_OFFSET (BootFlags,0),        "VGA Not Present (V4)", 0},
     {ACPI_DMT_FLAG3,    ACPI_FADT_FLAG_OFFSET (BootFlags,0),        "MSI Not Supported (V4)", 0},
     {ACPI_DMT_FLAG4,    ACPI_FADT_FLAG_OFFSET (BootFlags,0),        "PCIe ASPM Not Supported (V4)", 0},
+    {ACPI_DMT_FLAG5,    ACPI_FADT_FLAG_OFFSET (BootFlags,0),        "CMOS RTC Not Present (V5)", 0},
 
     {ACPI_DMT_UINT8,    ACPI_FADT_OFFSET (Reserved),                "Reserved", 0},
     {ACPI_DMT_UINT32,   ACPI_FADT_OFFSET (Flags),                   "Flags (decoded below)", DT_FLAG},
@@ -383,6 +425,8 @@
     {ACPI_DMT_FLAG1,    ACPI_FADT_FLAG_OFFSET (Flags,2),            "Remote Power-on capable (V4)", 0},
     {ACPI_DMT_FLAG2,    ACPI_FADT_FLAG_OFFSET (Flags,2),            "Use APIC Cluster Model (V4)", 0},
     {ACPI_DMT_FLAG3,    ACPI_FADT_FLAG_OFFSET (Flags,2),            "Use APIC Physical Destination Mode (V4)", 0},
+    {ACPI_DMT_FLAG4,    ACPI_FADT_FLAG_OFFSET (Flags,2),            "Hardware Reduced (V5)", 0},
+    {ACPI_DMT_FLAG5,    ACPI_FADT_FLAG_OFFSET (Flags,2),            "Low Power S0 Idle (V5)", 0},
     ACPI_DMT_TERMINATOR
 };
 
@@ -396,7 +440,7 @@
     ACPI_DMT_TERMINATOR
 };
 
-/* ACPI 2.0+ Extensions (FADT version 3+) */
+/* ACPI 2.0+ Extensions (FADT version 3 and 4) */
 
 ACPI_DMTABLE_INFO           AcpiDmTableInfoFadt3[] =
 {
@@ -416,6 +460,15 @@
     ACPI_DMT_TERMINATOR
 };
 
+/* ACPI 5.0 Extensions (FADT version 5) */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoFadt5[] =
+{
+    {ACPI_DMT_GAS,      ACPI_FADT_OFFSET (SleepControl),            "Sleep Control Register", 0},
+    {ACPI_DMT_GAS,      ACPI_FADT_OFFSET (SleepStatus),             "Sleep Status Register", 0},
+    ACPI_DMT_TERMINATOR
+};
+
 
 /*
  * Remaining tables are not consumed directly by the ACPICA subsystem
@@ -541,6 +594,24 @@
 
 /*******************************************************************************
  *
+ * BGRT -  Boot Graphics Resource Table (ACPI 5.0)
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoBgrt[] =
+{
+    {ACPI_DMT_UINT16,   ACPI_BGRT_OFFSET (Version),                 "Version", 0},
+    {ACPI_DMT_UINT8,    ACPI_BGRT_OFFSET (Status),                  "Status", 0},
+    {ACPI_DMT_UINT8,    ACPI_BGRT_OFFSET (ImageType),               "Image Type", 0},
+    {ACPI_DMT_UINT64,   ACPI_BGRT_OFFSET (ImageAddress),            "Image Address", 0},
+    {ACPI_DMT_UINT32,   ACPI_BGRT_OFFSET (ImageOffsetX),            "Image OffsetX", 0},
+    {ACPI_DMT_UINT32,   ACPI_BGRT_OFFSET (ImageOffsetY),            "Image OffsetY", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
  * BOOT - Simple Boot Flag Table
  *
  ******************************************************************************/
@@ -578,6 +649,120 @@
 
 /*******************************************************************************
  *
+ * CSRT - Core System Resource Table
+ *
+ ******************************************************************************/
+
+/* Main table consists only of the standard ACPI table header */
+
+/* Resource Group subtable */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoCsrt0[] =
+{
+    {ACPI_DMT_UINT32,   ACPI_CSRT0_OFFSET (Length),                 "Length", 0},
+    {ACPI_DMT_UINT32,   ACPI_CSRT0_OFFSET (VendorId),               "Vendor ID", 0},
+    {ACPI_DMT_UINT32,   ACPI_CSRT0_OFFSET (SubvendorId),            "Subvendor ID", 0},
+    {ACPI_DMT_UINT16,   ACPI_CSRT0_OFFSET (DeviceId),               "Device ID", 0},
+    {ACPI_DMT_UINT16,   ACPI_CSRT0_OFFSET (SubdeviceId),            "Subdevice ID", 0},
+    {ACPI_DMT_UINT16,   ACPI_CSRT0_OFFSET (Revision),               "Revision", 0},
+    {ACPI_DMT_UINT16,   ACPI_CSRT0_OFFSET (Reserved),               "Reserved", 0},
+    {ACPI_DMT_UINT32,   ACPI_CSRT0_OFFSET (SharedInfoLength),       "Shared Info Length", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* Shared Info subtable */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoCsrt1[] =
+{
+    {ACPI_DMT_UINT16,   ACPI_CSRT1_OFFSET (MajorVersion),           "Major Version", 0},
+    {ACPI_DMT_UINT16,   ACPI_CSRT1_OFFSET (MinorVersion),           "Minor Version", 0},
+    {ACPI_DMT_UINT32,   ACPI_CSRT1_OFFSET (MmioBaseLow),            "MMIO Base Address Low", 0},
+    {ACPI_DMT_UINT32,   ACPI_CSRT1_OFFSET (MmioBaseHigh),           "MMIO Base Address High", 0},
+    {ACPI_DMT_UINT32,   ACPI_CSRT1_OFFSET (GsiInterrupt),           "GSI Interrupt", 0},
+    {ACPI_DMT_UINT8,    ACPI_CSRT1_OFFSET (InterruptPolarity),      "Interrupt Polarity", 0},
+    {ACPI_DMT_UINT8,    ACPI_CSRT1_OFFSET (InterruptMode),          "Interrupt Mode", 0},
+    {ACPI_DMT_UINT8,    ACPI_CSRT1_OFFSET (NumChannels),            "Num Channels", 0},
+    {ACPI_DMT_UINT8,    ACPI_CSRT1_OFFSET (DmaAddressWidth),        "DMA Address Width", 0},
+    {ACPI_DMT_UINT16,   ACPI_CSRT1_OFFSET (BaseRequestLine),        "Base Request Line", 0},
+    {ACPI_DMT_UINT16,   ACPI_CSRT1_OFFSET (NumHandshakeSignals),    "Num Handshake Signals", 0},
+    {ACPI_DMT_UINT32,   ACPI_CSRT1_OFFSET (MaxBlockSize),           "Max Block Size", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+
+/* Resource Descriptor subtable */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoCsrt2[] =
+{
+    {ACPI_DMT_UINT32,   ACPI_CSRT2_OFFSET (Length),                 "Length", 0},
+    {ACPI_DMT_UINT16,   ACPI_CSRT2_OFFSET (Type),                   "Type", 0},
+    {ACPI_DMT_UINT16,   ACPI_CSRT2_OFFSET (Subtype),                "Subtype", 0},
+    {ACPI_DMT_UINT32,   ACPI_CSRT2_OFFSET (Uid),                    "UID", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
+ * DBG2 - Debug Port Table 2
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoDbg2[] =
+{
+    {ACPI_DMT_UINT32,   ACPI_DBG2_OFFSET (InfoOffset),              "Info Offset", 0},
+    {ACPI_DMT_UINT32,   ACPI_DBG2_OFFSET (InfoCount),               "Info Count", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* Debug Device Information Subtable */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoDbg2Device[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_DBG20_OFFSET (Revision),               "Revision", 0},
+    {ACPI_DMT_UINT16,   ACPI_DBG20_OFFSET (Length),                 "Length", DT_LENGTH},
+    {ACPI_DMT_UINT8,    ACPI_DBG20_OFFSET (RegisterCount),          "Register Count", 0},
+    {ACPI_DMT_UINT16,   ACPI_DBG20_OFFSET (NamepathLength),         "Namepath Length", 0},
+    {ACPI_DMT_UINT16,   ACPI_DBG20_OFFSET (NamepathOffset),         "Namepath Offset", 0},
+    {ACPI_DMT_UINT16,   ACPI_DBG20_OFFSET (OemDataLength),          "OEM Data Length", DT_DESCRIBES_OPTIONAL},
+    {ACPI_DMT_UINT16,   ACPI_DBG20_OFFSET (OemDataOffset),          "OEM Data Offset", DT_DESCRIBES_OPTIONAL},
+    {ACPI_DMT_UINT16,   ACPI_DBG20_OFFSET (PortType),               "Port Type", 0},
+    {ACPI_DMT_UINT16,   ACPI_DBG20_OFFSET (PortSubtype),            "Port Subtype", 0},
+    {ACPI_DMT_UINT16,   ACPI_DBG20_OFFSET (Reserved),               "Reserved", 0},
+    {ACPI_DMT_UINT16,   ACPI_DBG20_OFFSET (BaseAddressOffset),      "Base Address Offset", 0},
+    {ACPI_DMT_UINT16,   ACPI_DBG20_OFFSET (AddressSizeOffset),      "Address Size Offset", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* Variable-length data for the subtable */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoDbg2Addr[] =
+{
+    {ACPI_DMT_GAS,      0,                                          "Base Address Register", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoDbg2Size[] =
+{
+    {ACPI_DMT_UINT32,   0,                                          "Address Size", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoDbg2Name[] =
+{
+    {ACPI_DMT_STRING,   0,                                          "Namepath", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoDbg2OemData[] =
+{
+    {ACPI_DMT_BUFFER,   0,                                          "OEM Data", DT_OPTIONAL},
+    ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
  * DBGP - Debug Port
  *
  ******************************************************************************/
@@ -601,6 +786,7 @@
 {
     {ACPI_DMT_UINT8,    ACPI_DMAR_OFFSET (Width),                   "Host Address Width", 0},
     {ACPI_DMT_UINT8,    ACPI_DMAR_OFFSET (Flags),                   "Flags", 0},
+    {ACPI_DMT_BUF10,    ACPI_DMAR_OFFSET (Reserved[0]),             "Reserved", 0},
     ACPI_DMT_TERMINATOR
 };
 
@@ -672,6 +858,19 @@
 
 /*******************************************************************************
  *
+ * DRTM - Dynamic Root of Trust for Measurement table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoDrtm[] =
+{
+
+    ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
  * ECDT - Embedded Controller Boot Resources Table
  *
  ******************************************************************************/
@@ -748,6 +947,82 @@
 
 /*******************************************************************************
  *
+ * FPDT - Firmware Performance Data Table (ACPI 5.0)
+ *
+ ******************************************************************************/
+
+/* Main table consists of only the standard ACPI header - subtables follow */
+
+/* FPDT subtable header */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoFpdtHdr[] =
+{
+    {ACPI_DMT_UINT16,   ACPI_FPDTH_OFFSET (Type),                   "Subtable Type", 0},
+    {ACPI_DMT_UINT8,    ACPI_FPDTH_OFFSET (Length),                 "Length", DT_LENGTH},
+    {ACPI_DMT_UINT8,    ACPI_FPDTH_OFFSET (Revision),               "Revision", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* 0: Firmware Basic Boot Performance Record */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoFpdt0[] =
+{
+    {ACPI_DMT_UINT32,   ACPI_FPDT0_OFFSET (Reserved),               "Reserved", 0},
+    {ACPI_DMT_UINT64,   ACPI_FPDT0_OFFSET (ResetEnd),               "Reset End", 0},
+    {ACPI_DMT_UINT64,   ACPI_FPDT0_OFFSET (LoadStart),              "Load Image Start", 0},
+    {ACPI_DMT_UINT64,   ACPI_FPDT0_OFFSET (StartupStart),           "Start Image Start", 0},
+    {ACPI_DMT_UINT64,   ACPI_FPDT0_OFFSET (ExitServicesEntry),      "Exit Services Entry", 0},
+    {ACPI_DMT_UINT64,   ACPI_FPDT0_OFFSET (ExitServicesExit),       "Exit Services Exit", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* 1: S3 Performance Table Pointer Record */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoFpdt1[] =
+{
+    {ACPI_DMT_UINT32,   ACPI_FPDT1_OFFSET (Reserved),               "Reserved", 0},
+    {ACPI_DMT_UINT64,   ACPI_FPDT1_OFFSET (Address),                "S3PT Address", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
+ * GTDT - Generic Timer Description Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoGtdt[] =
+{
+    {ACPI_DMT_UINT64,   ACPI_GTDT_OFFSET (Address),                 "Timer Address", 0},
+    {ACPI_DMT_UINT32,   ACPI_GTDT_OFFSET (Flags),                   "Flags (decoded below)", DT_FLAG},
+    {ACPI_DMT_FLAG0,    ACPI_GTDT_FLAG_OFFSET (Flags,0),            "Memory Present", 0},
+    ACPI_DMT_NEW_LINE,
+    {ACPI_DMT_UINT32,   ACPI_GTDT_OFFSET (SecurePl1Interrupt),      "Secure PL1 Interrupt", 0},
+    {ACPI_DMT_UINT32,   ACPI_GTDT_OFFSET (SecurePl1Flags),          "SPL1 Flags (decoded below)", DT_FLAG},
+    {ACPI_DMT_FLAG0,    ACPI_GTDT_FLAG_OFFSET (SecurePl1Flags,0),   "Trigger Mode", 0},
+    {ACPI_DMT_FLAG1,    ACPI_GTDT_FLAG_OFFSET (SecurePl1Flags,0),   "Polarity", 0},
+    ACPI_DMT_NEW_LINE,
+    {ACPI_DMT_UINT32,   ACPI_GTDT_OFFSET (NonSecurePl1Interrupt),   "Non-Secure PL1 Interrupt", 0},
+    {ACPI_DMT_UINT32,   ACPI_GTDT_OFFSET (NonSecurePl1Flags),       "NSPL1 Flags (decoded below)", DT_FLAG},
+    {ACPI_DMT_FLAG0,    ACPI_GTDT_FLAG_OFFSET (NonSecurePl1Flags,0),"Trigger Mode", 0},
+    {ACPI_DMT_FLAG1,    ACPI_GTDT_FLAG_OFFSET (NonSecurePl1Flags,0),"Polarity", 0},
+    ACPI_DMT_NEW_LINE,
+    {ACPI_DMT_UINT32,   ACPI_GTDT_OFFSET (VirtualTimerInterrupt),   "Virtual Timer Interrupt", 0},
+    {ACPI_DMT_UINT32,   ACPI_GTDT_OFFSET (VirtualTimerFlags),       "VT Flags (decoded below)", DT_FLAG},
+    {ACPI_DMT_FLAG0,    ACPI_GTDT_FLAG_OFFSET (VirtualTimerFlags,0),"Trigger Mode", 0},
+    {ACPI_DMT_FLAG1,    ACPI_GTDT_FLAG_OFFSET (VirtualTimerFlags,0),"Polarity", 0},
+    ACPI_DMT_NEW_LINE,
+    {ACPI_DMT_UINT32,   ACPI_GTDT_OFFSET (NonSecurePl2Interrupt),   "Non-Secure PL2 Interrupt", 0},
+    {ACPI_DMT_UINT32,   ACPI_GTDT_OFFSET (NonSecurePl2Flags),       "NSPL2 Flags (decoded below)", DT_FLAG},
+    {ACPI_DMT_FLAG0,    ACPI_GTDT_FLAG_OFFSET (NonSecurePl2Flags,0),"Trigger Mode", 0},
+    {ACPI_DMT_FLAG1,    ACPI_GTDT_FLAG_OFFSET (NonSecurePl2Flags,0),"Polarity", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
  * HEST - Hardware Error Source table
  *
  ******************************************************************************/
@@ -1190,6 +1465,34 @@
     ACPI_DMT_TERMINATOR
 };
 
+/* 11: Generic Interrupt Controller (ACPI 5.0) */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMadt11[] =
+{
+    {ACPI_DMT_UINT16,   ACPI_MADT11_OFFSET (Reserved),              "Reserved", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT11_OFFSET (GicId),                 "Local GIC Hardware ID", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT11_OFFSET (Uid),                   "Processor UID", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT11_OFFSET (Flags),                 "Flags (decoded below)", DT_FLAG},
+    {ACPI_DMT_FLAG0,    ACPI_MADT11_FLAG_OFFSET (Flags,0),          "Processor Enabled", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT11_OFFSET (ParkingVersion),        "Parking Protocol Version", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT11_OFFSET (PerformanceInterrupt),  "Performance Interrupt", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT11_OFFSET (ParkedAddress),         "Parked Address", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT11_OFFSET (BaseAddress),           "Base Address", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* 12: Generic Interrupt Distributor (ACPI 5.0) */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMadt12[] =
+{
+    {ACPI_DMT_UINT16,   ACPI_MADT12_OFFSET (Reserved),              "Reserved", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT12_OFFSET (GicId),                 "Local GIC Hardware ID", 0},
+    {ACPI_DMT_UINT64,   ACPI_MADT12_OFFSET (BaseAddress),           "Base Address", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT12_OFFSET (GlobalIrqBase),         "Interrupt Base", 0},
+    {ACPI_DMT_UINT32,   ACPI_MADT12_OFFSET (Reserved2),             "Reserved", 0},
+   ACPI_DMT_TERMINATOR
+};
+
 
 /*******************************************************************************
  *
@@ -1240,6 +1543,87 @@
 
 /*******************************************************************************
  *
+ * MPST - Memory Power State Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMpst[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_MPST_OFFSET (ChannelId),               "Channel ID", 0},
+    {ACPI_DMT_UINT24,   ACPI_MPST_OFFSET (Reserved1[0]),            "Reserved", 0},
+    {ACPI_DMT_UINT16,   ACPI_MPST_OFFSET (PowerNodeCount),          "Power Node Count", 0},
+    {ACPI_DMT_UINT16,   ACPI_MPST_OFFSET (Reserved2),               "Reserved", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* MPST subtables */
+
+/* 0: Memory Power Node Structure */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMpst0[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_MPST0_OFFSET (Flags),                  "Flags (decoded below)", DT_FLAG},
+    {ACPI_DMT_FLAG0,    ACPI_MPST0_FLAG_OFFSET (Flags,0),           "Node Enabled", 0},
+    {ACPI_DMT_FLAG1,    ACPI_MPST0_FLAG_OFFSET (Flags,0),           "Power Managed", 0},
+    {ACPI_DMT_FLAG2,    ACPI_MPST0_FLAG_OFFSET (Flags,0),           "Hot Plug Capable", 0},
+
+    {ACPI_DMT_UINT8,    ACPI_MPST0_OFFSET (Reserved1),              "Reserved", 0},
+    {ACPI_DMT_UINT16,   ACPI_MPST0_OFFSET (NodeId),                 "Node ID", 0},
+    {ACPI_DMT_UINT32,   ACPI_MPST0_OFFSET (Length),                 "Length", 0},
+    {ACPI_DMT_UINT64,   ACPI_MPST0_OFFSET (RangeAddress),           "Range Address", 0},
+    {ACPI_DMT_UINT64,   ACPI_MPST0_OFFSET (RangeLength),            "Range Length", 0},
+    {ACPI_DMT_UINT32,   ACPI_MPST0_OFFSET (NumPowerStates),         "Num Power States", 0},
+    {ACPI_DMT_UINT32,   ACPI_MPST0_OFFSET (NumPhysicalComponents),  "Num Physical Components", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* 0A: Sub-subtable - Memory Power State Structure (follows Memory Power Node above) */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMpst0A[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_MPST0A_OFFSET (PowerState),            "Power State", 0},
+    {ACPI_DMT_UINT8,    ACPI_MPST0A_OFFSET (InfoIndex),             "InfoIndex", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* 0B: Sub-subtable - Physical Component ID Structure (follows Memory Power State(s) above) */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMpst0B[] =
+{
+    {ACPI_DMT_UINT16,   ACPI_MPST0B_OFFSET (ComponentId),           "Component Id", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* 01: Power Characteristics Count (follows all Power Node(s) above) */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMpst1[] =
+{
+    {ACPI_DMT_UINT16,   ACPI_MPST1_OFFSET (CharacteristicsCount),   "Characteristics Count", 0},
+    {ACPI_DMT_UINT16,   ACPI_MPST1_OFFSET (Reserved),               "Reserved", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* 02: Memory Power State Characteristics Structure */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMpst2[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_MPST2_OFFSET (StructureId),            "Structure ID", 0},
+    {ACPI_DMT_UINT8,    ACPI_MPST2_OFFSET (Flags),                  "Flags (decoded below)", DT_FLAG},
+    {ACPI_DMT_FLAG0,    ACPI_MPST2_FLAG_OFFSET (Flags,0),           "Memory Preserved", 0},
+    {ACPI_DMT_FLAG1,    ACPI_MPST2_FLAG_OFFSET (Flags,0),           "Auto Entry", 0},
+    {ACPI_DMT_FLAG2,    ACPI_MPST2_FLAG_OFFSET (Flags,0),           "Auto Exit", 0},
+
+    {ACPI_DMT_UINT16,   ACPI_MPST2_OFFSET (Reserved1),              "Reserved", 0},
+    {ACPI_DMT_UINT32,   ACPI_MPST2_OFFSET (AveragePower),           "Average Power", 0},
+    {ACPI_DMT_UINT32,   ACPI_MPST2_OFFSET (PowerSaving),            "Power Saving", 0},
+    {ACPI_DMT_UINT64,   ACPI_MPST2_OFFSET (ExitLatency),            "Exit Latency", 0},
+    {ACPI_DMT_UINT64,   ACPI_MPST2_OFFSET (Reserved2),              "Reserved", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
  * MSCT - Maximum System Characteristics Table (ACPI 4.0)
  *
  ******************************************************************************/
@@ -1269,6 +1653,184 @@
 
 /*******************************************************************************
  *
+ * MTMR - MID Timer Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMtmr[] =
+{
+    ACPI_DMT_TERMINATOR
+};
+
+/* MTMR Subtables - MTMR Entry */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoMtmr0[] =
+{
+    {ACPI_DMT_GAS,      ACPI_MTMR0_OFFSET (PhysicalAddress),        "PhysicalAddress", 0},
+    {ACPI_DMT_UINT32,   ACPI_MTMR0_OFFSET (Frequency),              "Frequency", 0},
+    {ACPI_DMT_UINT32,   ACPI_MTMR0_OFFSET (Irq),                    "IRQ", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
+ * PCCT - Platform Communications Channel Table (ACPI 5.0)
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoPcct[] =
+{
+    {ACPI_DMT_UINT32,   ACPI_PCCT_OFFSET (Flags),                   "Flags (decoded below)", DT_FLAG},
+    {ACPI_DMT_FLAG0,    ACPI_PCCT_FLAG_OFFSET (Flags,0),            "Doorbell", 0},
+    {ACPI_DMT_UINT64,   ACPI_PCCT_OFFSET (Reserved),                "Reserved", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* PCCT subtables */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoPcctHdr[] =
+{
+    {ACPI_DMT_PCCT,     ACPI_PCCT0_OFFSET (Header.Type),            "Subtable Type", 0},
+    {ACPI_DMT_UINT8,    ACPI_PCCT0_OFFSET (Header.Length),          "Length", DT_LENGTH},
+    ACPI_DMT_TERMINATOR
+};
+
+/* 0: Generic Communications Subspace */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoPcct0[] =
+{
+    {ACPI_DMT_UINT48,   ACPI_PCCT0_OFFSET (Reserved[0]),            "Reserved", 0},
+    {ACPI_DMT_UINT64,   ACPI_PCCT0_OFFSET (BaseAddress),            "Base Address", 0},
+    {ACPI_DMT_UINT64,   ACPI_PCCT0_OFFSET (Length),                 "Address Length", 0},
+    {ACPI_DMT_GAS,      ACPI_PCCT0_OFFSET (DoorbellRegister),       "Doorbell Register", 0},
+    {ACPI_DMT_UINT64,   ACPI_PCCT0_OFFSET (PreserveMask),           "Preserve Mask", 0},
+    {ACPI_DMT_UINT64,   ACPI_PCCT0_OFFSET (WriteMask),              "Write Mask", 0},
+    {ACPI_DMT_UINT32,   ACPI_PCCT0_OFFSET (Latency),                "Command Latency", 0},
+    {ACPI_DMT_UINT32,   ACPI_PCCT0_OFFSET (MaxAccessRate),          "Maximum Access Rate", 0},
+    {ACPI_DMT_UINT16,   ACPI_PCCT0_OFFSET (MinTurnaroundTime),      "Minimum Turnaround Time", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
+ * PMTT - Platform Memory Topology Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoPmtt[] =
+{
+    {ACPI_DMT_UINT32,   ACPI_PMTT_OFFSET (Reserved),                "Reserved", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* Common Subtable header (one per Subtable) */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoPmttHdr[] =
+{
+    {ACPI_DMT_PMTT,     ACPI_PMTTH_OFFSET (Type),                   "Subtable Type", 0},
+    {ACPI_DMT_UINT8,    ACPI_PMTTH_OFFSET (Reserved1),              "Reserved", 0},
+    {ACPI_DMT_UINT16,   ACPI_PMTTH_OFFSET (Length),                 "Length", DT_LENGTH},
+    {ACPI_DMT_UINT16,   ACPI_PMTTH_OFFSET (Flags),                  "Flags (decoded below)", DT_FLAG},
+    {ACPI_DMT_FLAG0,    ACPI_PMTTH_FLAG_OFFSET (Flags,0),           "Top-level Device", 0},
+    {ACPI_DMT_FLAG1,    ACPI_PMTTH_FLAG_OFFSET (Flags,0),           "Physical Element", 0},
+    {ACPI_DMT_FLAGS2,   ACPI_PMTTH_FLAG_OFFSET (Flags,0),           "Memory Type", 0},
+    {ACPI_DMT_UINT16,   ACPI_PMTTH_OFFSET (Reserved2),              "Reserved", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* PMTT Subtables */
+
+/* 0: Socket */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoPmtt0[] =
+{
+    {ACPI_DMT_UINT16,   ACPI_PMTT0_OFFSET (SocketId),               "Socket ID", 0},
+    {ACPI_DMT_UINT16,   ACPI_PMTT0_OFFSET (Reserved),               "Reserved", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* 1: Memory Controller */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoPmtt1[] =
+{
+    {ACPI_DMT_UINT32,   ACPI_PMTT1_OFFSET (ReadLatency),            "Read Latency", 0},
+    {ACPI_DMT_UINT32,   ACPI_PMTT1_OFFSET (WriteLatency),           "Write Latency", 0},
+    {ACPI_DMT_UINT32,   ACPI_PMTT1_OFFSET (ReadBandwidth),          "Read Bandwidth", 0},
+    {ACPI_DMT_UINT32,   ACPI_PMTT1_OFFSET (WriteBandwidth),         "Write Bandwidth", 0},
+    {ACPI_DMT_UINT16,   ACPI_PMTT1_OFFSET (AccessWidth),            "Access Width", 0},
+    {ACPI_DMT_UINT16,   ACPI_PMTT1_OFFSET (Alignment),              "Alignment", 0},
+    {ACPI_DMT_UINT16,   ACPI_PMTT1_OFFSET (Reserved),               "Reserved", 0},
+    {ACPI_DMT_UINT16,   ACPI_PMTT1_OFFSET (DomainCount),            "Domain Count", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* 1a: Proximity Domain */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoPmtt1a[] =
+{
+    {ACPI_DMT_UINT32,   ACPI_PMTT1A_OFFSET (ProximityDomain),       "Proximity Domain", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* 2: Physical Component */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoPmtt2[] =
+{
+    {ACPI_DMT_UINT16,   ACPI_PMTT2_OFFSET (ComponentId),            "Component ID", 0},
+    {ACPI_DMT_UINT16,   ACPI_PMTT2_OFFSET (Reserved),               "Reserved", 0},
+    {ACPI_DMT_UINT32,   ACPI_PMTT2_OFFSET (MemorySize),             "Memory Size", 0},
+    {ACPI_DMT_UINT32,   ACPI_PMTT2_OFFSET (BiosHandle),             "Bios Handle", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
+ * S3PT - S3 Performance Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoS3pt[] =
+{
+    {ACPI_DMT_SIG,     ACPI_S3PT_OFFSET (Signature[0]),             "Signature", 0},
+    {ACPI_DMT_UINT32,  ACPI_S3PT_OFFSET (Length),                   "Length", DT_LENGTH},
+    ACPI_DMT_TERMINATOR
+};
+
+/* S3PT subtable header */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoS3ptHdr[] =
+{
+    {ACPI_DMT_UINT16,  ACPI_S3PTH_OFFSET (Type),                    "Type", 0},
+    {ACPI_DMT_UINT8,   ACPI_S3PTH_OFFSET (Length),                  "Length", DT_LENGTH},
+    {ACPI_DMT_UINT8,   ACPI_S3PTH_OFFSET (Revision),                "Revision", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* 0: Basic S3 Resume Performance Record */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoS3pt0[] =
+{
+    {ACPI_DMT_UINT32,  ACPI_S3PT0_OFFSET (ResumeCount),             "Resume Count", 0},
+    {ACPI_DMT_UINT64,  ACPI_S3PT0_OFFSET (FullResume),              "Full Resume", 0},
+    {ACPI_DMT_UINT64,  ACPI_S3PT0_OFFSET (AverageResume),           "Average Resume", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* 1: Basic S3 Suspend Performance Record */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoS3pt1[] =
+{
+    {ACPI_DMT_UINT64,  ACPI_S3PT1_OFFSET (SuspendStart),            "Suspend Start", 0},
+    {ACPI_DMT_UINT64,  ACPI_S3PT1_OFFSET (SuspendEnd),              "Suspend End", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
  * SBST - Smart Battery Specification Table
  *
  ******************************************************************************/
@@ -1482,6 +2044,21 @@
 
 /*******************************************************************************
  *
+ * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoTpm2[] =
+{
+    {ACPI_DMT_UINT32,   ACPI_TPM2_OFFSET (Flags),                   "Flags", 0},
+    {ACPI_DMT_UINT64,   ACPI_TPM2_OFFSET (ControlAddress),          "Control Address", 0},
+    {ACPI_DMT_UINT32,   ACPI_TPM2_OFFSET (StartMethod),             "Start Method", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
  * UEFI - UEFI Boot optimization Table
  *
  ******************************************************************************/
@@ -1496,6 +2073,27 @@
 
 /*******************************************************************************
  *
+ * VRTC - Virtual Real Time Clock Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoVrtc[] =
+{
+    ACPI_DMT_TERMINATOR
+};
+
+/* VRTC Subtables - VRTC Entry */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoVrtc0[] =
+{
+    {ACPI_DMT_GAS,      ACPI_VRTC0_OFFSET (PhysicalAddress),        "PhysicalAddress", 0},
+    {ACPI_DMT_UINT32,   ACPI_VRTC0_OFFSET (Irq),                    "IRQ", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
  * WAET - Windows ACPI Emulated devices Table
  *
  ******************************************************************************/
@@ -1609,8 +2207,10 @@
     ACPI_DMT_TERMINATOR
 };
 
+/*! [Begin] no source code translation */
+
 /*
- * Generic types (used in UEFI)
+ * Generic types (used in UEFI and custom tables)
  *
  * Examples:
  *
@@ -1629,7 +2229,7 @@
  * DevicePath : "\PciRoot(0)\Pci(0x1f,1)\Usb(0,0)"
  */
 
-#define ACPI_DM_GENERIC_ENTRY(FieldType, FieldName)\
+#define ACPI_DM_GENERIC_ENTRY(FieldType, FieldName) \
     {{FieldType, 0, FieldName, 0}, ACPI_DMT_TERMINATOR}
 
 ACPI_DMTABLE_INFO           AcpiDmTableInfoGeneric[][2] =
@@ -1638,6 +2238,8 @@
     ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UINT16,     "UINT16"),
     ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UINT24,     "UINT24"),
     ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UINT32,     "UINT32"),
+    ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UINT40,     "UINT40"),
+    ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UINT48,     "UINT48"),
     ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UINT56,     "UINT56"),
     ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UINT64,     "UINT64"),
     ACPI_DM_GENERIC_ENTRY (ACPI_DMT_STRING,     "String"),
@@ -1648,3 +2250,4 @@
     ACPI_DM_GENERIC_ENTRY (ACPI_DMT_LABEL,      "Label"),
     {ACPI_DMT_TERMINATOR}
 };
+/*! [End] no source code translation !*/
--- a/sys/external/bsd/acpica/dist/compiler/Makefile	Fri Dec 27 18:45:57 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,672 +0,0 @@
-#
-# iASL compiler/disassembler
-#
-# NOTE: This makefile is intended to be used in the Linux environment,
-# with the Linux directory structure. It will not work directly
-# on the native ACPICA source tree.
-#
-
-#
-# Configuration
-# Notes:
-#   gcc should be version 4 or greater, otherwise some of the options
-#       used will not be recognized.
-#   Global optimization flags (such as -O2, -Os) are not used, since
-#       they cause issues on some compilers.
-#   The _GNU_SOURCE symbol is required for many hosts.
-#
-PROG = iasl
-
-HOST =          _LINUX
-NOMAN =         YES
-COMPILE =       $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
-
-ACPICA_COMPONENTS =
-ACPICA_SRC =    ..
-ACPICA_COMMON = $(ACPICA_SRC)/common
-ACPICA_CORE =   $(ACPICA_SRC)$(ACPICA_COMPONENTS)
-ACPICA_TOOLS =  $(ACPICA_SRC)/tools
-ACPICA_OSL =    $(ACPICA_SRC)/os_specific/service_layers
-ASL_COMPILER =  $(ACPICA_SRC)/compiler
-INSTALLDIR =    /usr/bin
-INSTALLPROG =   cp --remove-destination $(PROG) $(INSTALLDIR)
-
-CFLAGS+= \
-    -D$(HOST) \
-    -D_GNU_SOURCE \
-    -DACPI_ASL_COMPILER \
-    -I$(ACPICA_SRC)/include \
-    -I$(ASL_COMPILER)
-
-CWARNINGFLAGS = \
-    -ansi \
-    -Wall \
-    -Wbad-function-cast \
-    -Wdeclaration-after-statement \
-    -Werror \
-    -Wformat=2 \
-    -Wmissing-declarations \
-    -Wmissing-prototypes \
-    -Wstrict-aliasing=0 \
-    -Wstrict-prototypes \
-    -Wswitch-default \
-    -Wpointer-arith \
-    -Wundef
-
-#
-# Bison/Flex configuration
-#
-YACC=    bison
-YFLAGS+= -v -d -y
-
-LEX=     flex
-LFLAGS+= -i -s
-
-OBJS = \
-	adfile.o \
-	adisasm.o \
-	adwalk.o \
-	aslanalyze.o \
-	aslbtypes.o \
-	aslcodegen.o \
-	aslcompile.o \
-	aslcompilerlex.o \
-	aslcompilerparse.o \
-	aslerror.o \
-	aslfiles.o \
-	aslfold.o \
-	asllength.o \
-	asllisting.o \
-	aslload.o \
-	asllookup.o \
-	aslmain.o \
-	aslmap.o \
-	aslopcodes.o \
-	asloperands.o \
-	aslopt.o \
-	aslpredef.o \
-	aslresource.o \
-	aslrestype1.o \
-	aslrestype1i.o \
-	aslrestype2.o \
-	aslrestype2d.o \
-	aslrestype2e.o \
-	aslrestype2q.o \
-	aslrestype2w.o \
-	aslstartup.o \
-	aslstubs.o \
-	asltransform.o \
-	asltree.o \
-	aslutils.o \
-	asluuid.o \
-	aslwalks.o \
-	dtcompile.o \
-	dtexpress.o \
-	dtfield.o \
-	dtio.o \
-	dtparserlex.o \
-	dtparserparse.o \
-	dtsubtable.o \
-	dttable.o \
-	dttemplate.o \
-	dtutils.o \
-	dbfileio.o \
-	dmbuffer.o \
-	dmextern.o \
-	dmnames.o \
-	dmobject.o \
-	dmopcode.o \
-	dmresrc.o \
-	dmresrcl.o \
-	dmresrcs.o \
-	dmrestag.o \
-	dmtable.o \
-	dmtbdump.o \
-	dmtbinfo.o \
-	dmutils.o \
-	dmwalk.o \
-	dsargs.o \
-	dscontrol.o \
-	dsfield.o \
-	dsobject.o \
-	dsopcode.o \
-	dsutils.o \
-	dswexec.o \
-	dswload.o \
-	dswload2.o \
-	dswscope.o \
-	dswstate.o \
-	exconvrt.o \
-	excreate.o \
-	exdump.o \
-	exmisc.o \
-	exmutex.o \
-	exnames.o \
-	exoparg1.o \
-	exoparg2.o \
-	exoparg3.o \
-	exoparg6.o \
-	exprep.o \
-	exregion.o \
-	exresnte.o \
-	exresolv.o \
-	exresop.o \
-	exstore.o \
-	exstoren.o \
-	exstorob.o \
-	exsystem.o \
-	exutils.o \
-	getopt.o \
-	nsaccess.o \
-	nsalloc.o \
-	nsdump.o \
-	nsnames.o \
-	nsobject.o \
-	nsparse.o \
-	nssearch.o \
-	nsutils.o \
-	nswalk.o \
-	nsxfobj.o \
-	osunixxf.o \
-	psargs.o \
-	psloop.o \
-	psopcode.o \
-	psparse.o \
-	psscope.o \
-	pstree.o \
-	psutils.o \
-	pswalk.o \
-	tbfadt.o \
-	tbinstal.o \
-	tbutils.o \
-	tbxface.o \
-	utalloc.o \
-	utcache.o \
-	utcopy.o \
-	utdebug.o \
-	utdecode.o \
-	utdelete.o \
-	utglobal.o \
-	utinit.o \
-	utlock.o \
-	utmath.o \
-	utmisc.o \
-	utmutex.o \
-	utobject.o \
-	utresrc.o \
-	utstate.o \
-	utxferror.o \
-	utxface.o
-
-INTERMEDIATES = \
-	aslcompilerlex.c \
-	aslcompilerparse.c \
-	dtparserlex.c \
-	dtparserparse.c
-
-MISC = \
-	aslcompiler.y.h \
-	aslcompilerparse.output \
-	dtparser.y.h \
-	dtparserparse.output
-
-
-#
-# Root rule
-#
-$(PROG) : $(INTERMEDIATES) $(OBJS)
-	$(CC) $(OBJS) $(LDFLAGS) -o $(PROG)
-
-
-#
-# Parser and Lexer - intermediate C files
-#
-aslcompilerlex.c :   $(ASL_COMPILER)/aslcompiler.l
-	${LEX} ${LFLAGS} -PAslCompiler -o$@ $?
-
-aslcompilerparse.c : $(ASL_COMPILER)/aslcompiler.y
-	${YACC} ${YFLAGS} -pAslCompiler -o$@ $?
-	@mv -f aslcompilerparse.h aslcompiler.y.h
-
-dtparserlex.c :      $(ASL_COMPILER)/dtparser.l
-	${LEX} ${LFLAGS} -PDtParser -o$@ $?
-
-dtparserparse.c :    $(ASL_COMPILER)/dtparser.y
-	${YACC} ${YFLAGS} -pDtParser -o$@ $?
-	@mv -f dtparserparse.h dtparser.y.h
-
-
-#
-# Parsers and Lexers - final object files
-#
-# Cannot use the common compile warning flags since the C files are created
-# by the utilities above and they are not necessarily ANSI C, etc.
-#
-aslcompilerlex.o :   aslcompilerlex.c
-	$(CC) -c $(CFLAGS) -Wall -Werror -Wstrict-aliasing=0 -o$@ $?
-
-aslcompilerparse.o : aslcompilerparse.c
-	$(CC) -c $(CFLAGS) -Wall -Werror -Wstrict-aliasing=0 -o$@ $?
-
-dtparserlex.o :      dtparserlex.c
-	$(CC) -c $(CFLAGS) -Wall -Werror -Wstrict-aliasing=0 -o$@ $?
-
-dtparserparse.o :    dtparserparse.c
-	$(CC) -c $(CFLAGS) -Wall -Werror -Wstrict-aliasing=0 -o$@ $?
-
-
-#
-# Compiler source
-#
-aslanalyze.o :      $(ASL_COMPILER)/aslanalyze.c
-	$(COMPILE)
-
-aslbtypes.o :       $(ASL_COMPILER)/aslbtypes.c
-	$(COMPILE)
-
-aslcodegen.o :      $(ASL_COMPILER)/aslcodegen.c
-	$(COMPILE)
-
-aslcompile.o :      $(ASL_COMPILER)/aslcompile.c
-	$(COMPILE)
-
-aslerror.o :        $(ASL_COMPILER)/aslerror.c
-	$(COMPILE)
-
-aslfiles.o :        $(ASL_COMPILER)/aslfiles.c
-	$(COMPILE)
-
-aslfold.o :         $(ASL_COMPILER)/aslfold.c
-	$(COMPILE)
-
-asllength.o :       $(ASL_COMPILER)/asllength.c
-	$(COMPILE)
-
-asllisting.o :      $(ASL_COMPILER)/asllisting.c
-	$(COMPILE)
-
-aslload.o :         $(ASL_COMPILER)/aslload.c
-	$(COMPILE)
-
-asllookup.o :       $(ASL_COMPILER)/asllookup.c
-	$(COMPILE)
-
-aslmain.o :         $(ASL_COMPILER)/aslmain.c
-	$(COMPILE)
-
-aslmap.o :          $(ASL_COMPILER)/aslmap.c
-	$(COMPILE)
-
-aslopcodes.o :      $(ASL_COMPILER)/aslopcodes.c
-	$(COMPILE)
-
-asloperands.o :     $(ASL_COMPILER)/asloperands.c
-	$(COMPILE)
-
-aslopt.o :          $(ASL_COMPILER)/aslopt.c
-	$(COMPILE)
-
-aslpredef.o :       $(ASL_COMPILER)/aslpredef.c
-	$(COMPILE)
-
-aslresource.o :     $(ASL_COMPILER)/aslresource.c
-	$(COMPILE)
-
-aslrestype1.o :     $(ASL_COMPILER)/aslrestype1.c
-	$(COMPILE)
-
-aslrestype1i.o :    $(ASL_COMPILER)/aslrestype1i.c
-	$(COMPILE)
-
-aslrestype2.o :     $(ASL_COMPILER)/aslrestype2.c
-	$(COMPILE)
-
-aslrestype2d.o :    $(ASL_COMPILER)/aslrestype2d.c
-	$(COMPILE)
-
-aslrestype2e.o :    $(ASL_COMPILER)/aslrestype2e.c
-	$(COMPILE)
-
-aslrestype2q.o :    $(ASL_COMPILER)/aslrestype2q.c
-	$(COMPILE)
-
-aslrestype2w.o :    $(ASL_COMPILER)/aslrestype2w.c
-	$(COMPILE)
-
-aslstartup.o :      $(ASL_COMPILER)/aslstartup.c
-	$(COMPILE)
-
-aslstubs.o :        $(ASL_COMPILER)/aslstubs.c
-	$(COMPILE)
-
-asltransform.o :    $(ASL_COMPILER)/asltransform.c
-	$(COMPILE)
-
-asltree.o :         $(ASL_COMPILER)/asltree.c
-	$(COMPILE)
-
-aslutils.o :        $(ASL_COMPILER)/aslutils.c
-	$(COMPILE)
-
-asluuid.o :         $(ASL_COMPILER)/asluuid.c
-	$(COMPILE)
-
-aslwalks.o :        $(ASL_COMPILER)/aslwalks.c
-	$(COMPILE)
-
-
-#
-# Data Table Compiler
-#
-dtcompile.o :       $(ASL_COMPILER)/dtcompile.c
-	$(COMPILE)
-
-dtexpress.o :       $(ASL_COMPILER)/dtexpress.c
-	$(COMPILE)
-
-dtfield.o :         $(ASL_COMPILER)/dtfield.c
-	$(COMPILE)
-
-dtio.o :            $(ASL_COMPILER)/dtio.c
-	$(COMPILE)
-
-dtsubtable.o :      $(ASL_COMPILER)/dtsubtable.c
-	$(COMPILE)
-
-dttable.o :         $(ASL_COMPILER)/dttable.c
-	$(COMPILE)
-
-dttemplate.o :      $(ASL_COMPILER)/dttemplate.c
-	$(COMPILE)
-
-dtutils.o :         $(ASL_COMPILER)/dtutils.c
-	$(COMPILE)
-
-
-#
-# ACPICA core source - common
-#
-adfile.o :          $(ACPICA_COMMON)/adfile.c
-	$(COMPILE)
-
-adisasm.o :         $(ACPICA_COMMON)/adisasm.c
-	$(COMPILE)
-
-adwalk.o :          $(ACPICA_COMMON)/adwalk.c
-	$(COMPILE)
-
-dmextern.o :        $(ACPICA_COMMON)/dmextern.c
-	$(COMPILE)
-
-dmrestag.o :        $(ACPICA_COMMON)/dmrestag.c
-	$(COMPILE)
-
-dmtable.o :         $(ACPICA_COMMON)/dmtable.c
-	$(COMPILE)
-
-dmtbdump.o :        $(ACPICA_COMMON)/dmtbdump.c
-	$(COMPILE)
-
-dmtbinfo.o :        $(ACPICA_COMMON)/dmtbinfo.c
-	$(COMPILE)
-
-getopt.o :          $(ACPICA_COMMON)/getopt.c
-	$(COMPILE)
-
-
-#
-# ACPICA core source
-#
-dbfileio.o :        $(ACPICA_CORE)/debugger/dbfileio.c
-	$(COMPILE)
-
-dmbuffer.o :        $(ACPICA_CORE)/disassembler/dmbuffer.c
-	$(COMPILE)
-
-dmnames.o :         $(ACPICA_CORE)/disassembler/dmnames.c
-	$(COMPILE)
-
-dmobject.o :        $(ACPICA_CORE)/disassembler/dmobject.c
-	$(COMPILE)
-
-dmopcode.o :        $(ACPICA_CORE)/disassembler/dmopcode.c
-	$(COMPILE)
-
-dmresrc.o :         $(ACPICA_CORE)/disassembler/dmresrc.c
-	$(COMPILE)
-
-dmresrcl.o :        $(ACPICA_CORE)/disassembler/dmresrcl.c
-	$(COMPILE)
-
-dmresrcs.o :        $(ACPICA_CORE)/disassembler/dmresrcs.c
-	$(COMPILE)
-
-dmutils.o :         $(ACPICA_CORE)/disassembler/dmutils.c
-	$(COMPILE)
-
-dmwalk.o :          $(ACPICA_CORE)/disassembler/dmwalk.c
-	$(COMPILE)
-
-dsargs.o :          $(ACPICA_CORE)/dispatcher/dsargs.c
-	$(COMPILE)
-
-dscontrol.o :       $(ACPICA_CORE)/dispatcher/dscontrol.c
-	$(COMPILE)
-
-dsfield.o :         $(ACPICA_CORE)/dispatcher/dsfield.c
-	$(COMPILE)
-
-dsobject.o :        $(ACPICA_CORE)/dispatcher/dsobject.c
-	$(COMPILE)
-
-dsopcode.o :        $(ACPICA_CORE)/dispatcher/dsopcode.c
-	$(COMPILE)
-
-dsutils.o :         $(ACPICA_CORE)/dispatcher/dsutils.c
-	$(COMPILE)
-
-dswexec.o :         $(ACPICA_CORE)/dispatcher/dswexec.c
-	$(COMPILE)
-
-dswload.o :         $(ACPICA_CORE)/dispatcher/dswload.c
-	$(COMPILE)
-
-dswload2.o :        $(ACPICA_CORE)/dispatcher/dswload2.c
-	$(COMPILE)
-
-dswscope.o :        $(ACPICA_CORE)/dispatcher/dswscope.c
-	$(COMPILE)
-
-dswstate.o :        $(ACPICA_CORE)/dispatcher/dswstate.c
-	$(COMPILE)
-
-exconvrt.o :        $(ACPICA_CORE)/executer/exconvrt.c
-	$(COMPILE)
-
-excreate.o :        $(ACPICA_CORE)/executer/excreate.c
-	$(COMPILE)
-
-exdump.o :          $(ACPICA_CORE)/executer/exdump.c
-	$(COMPILE)
-
-exmisc.o :          $(ACPICA_CORE)/executer/exmisc.c
-	$(COMPILE)
-
-exmutex.o :         $(ACPICA_CORE)/executer/exmutex.c
-	$(COMPILE)
-
-exnames.o :         $(ACPICA_CORE)/executer/exnames.c
-	$(COMPILE)
-
-exoparg1.o :        $(ACPICA_CORE)/executer/exoparg1.c
-	$(COMPILE)
-
-exoparg2.o :        $(ACPICA_CORE)/executer/exoparg2.c
-	$(COMPILE)
-
-exoparg3.o :        $(ACPICA_CORE)/executer/exoparg3.c
-	$(COMPILE)
-
-exoparg6.o :        $(ACPICA_CORE)/executer/exoparg6.c
-	$(COMPILE)
-
-exprep.o :          $(ACPICA_CORE)/executer/exprep.c
-	$(COMPILE)
-
-exregion.o :        $(ACPICA_CORE)/executer/exregion.c
-	$(COMPILE)
-
-exresnte.o :        $(ACPICA_CORE)/executer/exresnte.c
-	$(COMPILE)
-
-exresolv.o :        $(ACPICA_CORE)/executer/exresolv.c
-	$(COMPILE)
-
-exresop.o :         $(ACPICA_CORE)/executer/exresop.c
-	$(COMPILE)
-
-exstore.o :         $(ACPICA_CORE)/executer/exstore.c
-	$(COMPILE)
-
-exstoren.o :        $(ACPICA_CORE)/executer/exstoren.c
-	$(COMPILE)
-
-exstorob.o :        $(ACPICA_CORE)/executer/exstorob.c
-	$(COMPILE)
-
-exsystem.o :        $(ACPICA_CORE)/executer/exsystem.c
-	$(COMPILE)
-
-exutils.o :         $(ACPICA_CORE)/executer/exutils.c
-	$(COMPILE)
-
-nsaccess.o :        $(ACPICA_CORE)/namespace/nsaccess.c
-	$(COMPILE)
-
-nsalloc.o :         $(ACPICA_CORE)/namespace/nsalloc.c
-	$(COMPILE)
-
-nsdump.o :          $(ACPICA_CORE)/namespace/nsdump.c
-	$(COMPILE)
-
-nsnames.o :         $(ACPICA_CORE)/namespace/nsnames.c
-	$(COMPILE)
-
-nsobject.o :        $(ACPICA_CORE)/namespace/nsobject.c
-	$(COMPILE)
-
-nsparse.o :         $(ACPICA_CORE)/namespace/nsparse.c
-	$(COMPILE)
-
-nssearch.o :        $(ACPICA_CORE)/namespace/nssearch.c
-	$(COMPILE)
-
-nsutils.o :         $(ACPICA_CORE)/namespace/nsutils.c
-	$(COMPILE)
-
-nswalk.o :          $(ACPICA_CORE)/namespace/nswalk.c
-	$(COMPILE)
-
-nsxfobj.o :         $(ACPICA_CORE)/namespace/nsxfobj.c
-	$(COMPILE)
-
-psargs.o :          $(ACPICA_CORE)/parser/psargs.c
-	$(COMPILE)
-
-psloop.o :          $(ACPICA_CORE)/parser/psloop.c
-	$(COMPILE)
-
-psopcode.o :        $(ACPICA_CORE)/parser/psopcode.c
-	$(COMPILE)
-
-psparse.o :         $(ACPICA_CORE)/parser/psparse.c
-	$(COMPILE)
-
-psscope.o :         $(ACPICA_CORE)/parser/psscope.c
-	$(COMPILE)
-
-pstree.o :          $(ACPICA_CORE)/parser/pstree.c
-	$(COMPILE)
-
-psutils.o :         $(ACPICA_CORE)/parser/psutils.c
-	$(COMPILE)
-
-pswalk.o :          $(ACPICA_CORE)/parser/pswalk.c
-	$(COMPILE)
-
-tbfadt.o :          $(ACPICA_CORE)/tables/tbfadt.c
-	$(COMPILE)
-
-tbinstal.o :        $(ACPICA_CORE)/tables/tbinstal.c
-	$(COMPILE)
-
-tbutils.o :         $(ACPICA_CORE)/tables/tbutils.c
-	$(COMPILE)
-
-tbxface.o :         $(ACPICA_CORE)/tables/tbxface.c
-	$(COMPILE)
-
-utalloc.o :         $(ACPICA_CORE)/utilities/utalloc.c
-	$(COMPILE)
-
-utcache.o :         $(ACPICA_CORE)/utilities/utcache.c
-	$(COMPILE)
-
-utcopy.o :          $(ACPICA_CORE)/utilities/utcopy.c
-	$(COMPILE)
-
-utdebug.o :         $(ACPICA_CORE)/utilities/utdebug.c
-	$(COMPILE)
-
-utdecode.o :        $(ACPICA_CORE)/utilities/utdecode.c
-	$(COMPILE)
-
-utdelete.o :        $(ACPICA_CORE)/utilities/utdelete.c
-	$(COMPILE)
-
-utglobal.o :        $(ACPICA_CORE)/utilities/utglobal.c
-	$(COMPILE)
-
-utinit.o :          $(ACPICA_CORE)/utilities/utinit.c
-	$(COMPILE)
-
-utlock.o :          $(ACPICA_CORE)/utilities/utlock.c
-	$(COMPILE)
-
-utmath.o :          $(ACPICA_CORE)/utilities/utmath.c
-	$(COMPILE)
-
-utmisc.o :          $(ACPICA_CORE)/utilities/utmisc.c
-	$(COMPILE)
-
-utmutex.o :         $(ACPICA_CORE)/utilities/utmutex.c
-	$(COMPILE)
-
-utobject.o :        $(ACPICA_CORE)/utilities/utobject.c
-	$(COMPILE)
-
-utresrc.o :         $(ACPICA_CORE)/utilities/utresrc.c
-	$(COMPILE)
-
-utstate.o :         $(ACPICA_CORE)/utilities/utstate.c
-	$(COMPILE)
-
-utxferror.o :       $(ACPICA_CORE)/utilities/utxferror.c
-	$(COMPILE)
-
-utxface.o :         $(ACPICA_CORE)/utilities/utxface.c
-	$(COMPILE)
-
-
-#
-# Unix OS services layer (OSL)
-#
-osunixxf.o :        $(ACPICA_OSL)/osunixxf.c
-	$(COMPILE)
-
-
-clean :
-	rm -f $(PROG) $(PROG).exe $(OBJS) $(INTERMEDIATES) $(MISC)
-
-install :
-	$(INSTALLPROG)
--- a/sys/external/bsd/acpica/dist/compiler/aslcompile.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompile.c	Fri Dec 27 18:50:56 2013 +0000
@@ -1,4 +1,3 @@
-
 /******************************************************************************
  *
  * Module Name: aslcompile - top level compile module
@@ -6,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -43,6 +42,7 @@
  */
 
 #include "aslcompiler.h"
+#include "dtcompiler.h"
 
 #include <stdio.h>
 #include <time.h>
@@ -51,6 +51,15 @@
 #define _COMPONENT          ACPI_COMPILER
         ACPI_MODULE_NAME    ("aslcompile")
 
+/*
+ * Main parser entry
+ * External is here in case the parser emits the same external in the
+ * generated header. (Newer versions of Bison)
+ */
+int
+AslCompilerparse(
+    void);
+
 /* Local prototypes */
 
 static void
@@ -59,14 +68,18 @@
 
 static void
 FlConsumeAnsiComment (
-    ASL_FILE_INFO           *FileInfo,
+    FILE                    *Handle,
     ASL_FILE_STATUS         *Status);
 
 static void
 FlConsumeNewComment (
-    ASL_FILE_INFO           *FileInfo,
+    FILE                    *Handle,
     ASL_FILE_STATUS         *Status);
 
+static void
+CmDumpAllEvents (
+    void);
+
 
 /*******************************************************************************
  *
@@ -113,13 +126,16 @@
         break;
 
     case ASL_FILE_C_SOURCE_OUTPUT:
+    case ASL_FILE_C_OFFSET_OUTPUT:
     case ASL_FILE_C_INCLUDE_OUTPUT:
 
         Prefix = " * ";
         break;
 
     default:
+
         /* No other output types supported */
+
         break;
     }
 
@@ -186,13 +202,16 @@
         break;
 
     case ASL_FILE_C_SOURCE_OUTPUT:
+    case ASL_FILE_C_OFFSET_OUTPUT:
     case ASL_FILE_C_INCLUDE_OUTPUT:
 
         Prefix = " * ";
         break;
 
     default:
+
         /* No other output types supported */
+
         break;
     }
 
@@ -209,12 +228,16 @@
     switch (FileId)
     {
     case ASL_FILE_C_SOURCE_OUTPUT:
+    case ASL_FILE_C_OFFSET_OUTPUT:
     case ASL_FILE_C_INCLUDE_OUTPUT:
+
         FlPrintFile (FileId, " */\n");
         break;
 
     default:
+
         /* Nothing to do for other output types */
+
         break;
     }
 }
@@ -242,10 +265,10 @@
 
     while (FlReadFile (ASL_FILE_INPUT, &Buffer, 1) != AE_ERROR)
     {
-        InsertLineBuffer ((int) Buffer);
+        AslInsertLineBuffer ((int) Buffer);
     }
 
-    ResetCurrentLineBuffer ();
+    AslResetCurrentLineBuffer ();
 }
 
 
@@ -253,7 +276,8 @@
  *
  * FUNCTION:    FlConsume*
  *
- * PARAMETERS:  FileInfo        - Points to an open input file
+ * PARAMETERS:  Handle              - Open input file
+ *              Status              - File current status struct
  *
  * RETURN:      Number of lines consumed
  *
@@ -263,14 +287,14 @@
 
 static void
 FlConsumeAnsiComment (
-    ASL_FILE_INFO           *FileInfo,
+    FILE                    *Handle,
     ASL_FILE_STATUS         *Status)
 {
     UINT8                   Byte;
     BOOLEAN                 ClosingComment = FALSE;
 
 
-    while (fread (&Byte, 1, 1, FileInfo->Handle))
+    while (fread (&Byte, 1, 1, Handle) == 1)
     {
         /* Scan until comment close is found */
 
@@ -307,13 +331,13 @@
 
 static void
 FlConsumeNewComment (
-    ASL_FILE_INFO           *FileInfo,
+    FILE                    *Handle,
     ASL_FILE_STATUS         *Status)
 {
     UINT8                   Byte;
 
 
-    while (fread (&Byte, 1, 1, FileInfo->Handle))
+    while (fread (&Byte, 1, 1, Handle) == 1)
     {
         Status->Offset++;
 
@@ -330,9 +354,94 @@
 
 /*******************************************************************************
  *
+ * FUNCTION:    FlCheckForAcpiTable
+ *
+ * PARAMETERS:  Handle              - Open input file
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Determine if a file seems to be a binary ACPI table, via the
+ *              following checks on what would be the table header:
+ *              0) File must be at least as long as an ACPI_TABLE_HEADER
+ *              1) The header length field must match the file size
+ *              2) Signature, OemId, OemTableId, AslCompilerId must be ASCII
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+FlCheckForAcpiTable (
+    FILE                    *Handle)
+{
+    ACPI_TABLE_HEADER       Table;
+    UINT32                  FileSize;
+    size_t                  Actual;
+    UINT32                  i;
+
+
+    /* Read a potential table header */
+
+    Actual = fread (&Table, 1, sizeof (ACPI_TABLE_HEADER), Handle);
+    fseek (Handle, 0, SEEK_SET);
+
+    if (Actual < sizeof (ACPI_TABLE_HEADER))
+    {
+        return (AE_ERROR);
+    }
+
+    /* Header length field must match the file size */
+
+    FileSize = DtGetFileSize (Handle);
+    if (Table.Length != FileSize)
+    {
+        return (AE_ERROR);
+    }
+
+    /*
+     * These fields must be ASCII:
+     * Signature, OemId, OemTableId, AslCompilerId.
+     * We allow a NULL terminator in OemId and OemTableId.
+     */
+    for (i = 0; i < ACPI_NAME_SIZE; i++)
+    {
+        if (!ACPI_IS_ASCII ((UINT8) Table.Signature[i]))
+        {
+            return (AE_ERROR);
+        }
+
+        if (!ACPI_IS_ASCII ((UINT8) Table.AslCompilerId[i]))
+        {
+            return (AE_ERROR);
+        }
+    }
+
+    for (i = 0; (i < ACPI_OEM_ID_SIZE) && (Table.OemId[i]); i++)
+    {
+        if (!ACPI_IS_ASCII ((UINT8) Table.OemId[i]))
+        {
+            return (AE_ERROR);
+        }
+    }
+
+    for (i = 0; (i < ACPI_OEM_TABLE_ID_SIZE) && (Table.OemTableId[i]); i++)
+    {
+        if (!ACPI_IS_ASCII ((UINT8) Table.OemTableId[i]))
+        {
+            return (AE_ERROR);
+        }
+    }
+
+    printf ("Binary file appears to be a valid ACPI table, disassembling\n");
+    return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    FlCheckForAscii
  *
- * PARAMETERS:  FileInfo        - Points to an open input file
+ * PARAMETERS:  Handle              - Open input file
+ *              Filename            - Input filename
+ *              DisplayErrors       - TRUE if error messages desired
  *
  * RETURN:      Status
  *
@@ -347,7 +456,9 @@
 
 ACPI_STATUS
 FlCheckForAscii (
-    ASL_FILE_INFO           *FileInfo)
+    FILE                    *Handle,
+    char                    *Filename,
+    BOOLEAN                 DisplayErrors)
 {
     UINT8                   Byte;
     ACPI_SIZE               BadBytes = 0;
@@ -360,7 +471,7 @@
 
     /* Read the entire file */
 
-    while (fread (&Byte, 1, 1, FileInfo->Handle))
+    while (fread (&Byte, 1, 1, Handle) == 1)
     {
         /* Ignore comment fields (allow non-ascii within) */
 
@@ -370,12 +481,12 @@
 
             if (Byte == '*')
             {
-                FlConsumeAnsiComment (FileInfo, &Status);
+                FlConsumeAnsiComment (Handle, &Status);
             }
 
             if (Byte == '/')
             {
-                FlConsumeNewComment (FileInfo, &Status);
+                FlConsumeNewComment (Handle, &Status);
             }
 
             /* Reset */
@@ -391,7 +502,7 @@
 
         if (!ACPI_IS_ASCII (Byte))
         {
-            if (BadBytes < 10)
+            if ((BadBytes < 10) && (DisplayErrors))
             {
                 AcpiOsPrintf (
                     "Non-ASCII character [0x%2.2X] found in line %u, file offset 0x%.2X\n",
@@ -413,20 +524,24 @@
 
     /* Seek back to the beginning of the source file */
 
-    fseek (FileInfo->Handle, 0, SEEK_SET);
+    fseek (Handle, 0, SEEK_SET);
 
     /* Were there any non-ASCII characters in the file? */
 
     if (BadBytes)
     {
-        AcpiOsPrintf (
-            "%u non-ASCII characters found in input source text, could be a binary file\n",
-            BadBytes);
-        AslError (ASL_ERROR, ASL_MSG_NON_ASCII, NULL, FileInfo->Filename);
+        if (DisplayErrors)
+        {
+            AcpiOsPrintf (
+                "%u non-ASCII characters found in input source text, could be a binary file\n",
+                BadBytes);
+            AslError (ASL_ERROR, ASL_MSG_NON_ASCII, NULL, Filename);
+        }
+
         return (AE_BAD_CHARACTER);
     }
 
-    /* File is OK */
+    /* File is OK (100% ASCII) */
 
     return (AE_OK);
 }
@@ -457,25 +572,57 @@
     Event = UtBeginEvent ("Open input and output files");
     UtEndEvent (Event);
 
+    Event = UtBeginEvent ("Preprocess input file");
+    if (Gbl_PreprocessFlag)
+    {
+        /* Preprocessor */
+
+        PrDoPreprocess ();
+        if (Gbl_PreprocessOnly)
+        {
+            UtEndEvent (Event);
+            CmCleanupAndExit ();
+            return (0);
+        }
+    }
+    UtEndEvent (Event);
+
     /* Build the parse tree */
 
     Event = UtBeginEvent ("Parse source code and build parse tree");
     AslCompilerparse();
     UtEndEvent (Event);
 
-    /* Flush out any remaining source after parse tree is complete */
+    /* Check for parse errors */
 
-    Event = UtBeginEvent ("Flush source input");
-    CmFlushSourceCode ();
+    Status = AslCheckForErrorExit ();
+    if (ACPI_FAILURE (Status))
+    {
+        fprintf (stderr, "Compiler aborting due to parser-detected syntax error(s)\n");
+        LsDumpParseTree ();
+        goto ErrorExit;
+    }
 
     /* Did the parse tree get successfully constructed? */
 
     if (!RootNode)
     {
-        CmCleanupAndExit ();
-        return -1;
+        /*
+         * If there are no errors, then we have some sort of
+         * internal problem.
+         */
+        AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL,
+            NULL, "- Could not resolve parse tree root node");
+
+        goto ErrorExit;
     }
 
+
+    /* Flush out any remaining source after parse tree is complete */
+
+    Event = UtBeginEvent ("Flush source input");
+    CmFlushSourceCode ();
+
     /* Optional parse tree dump, compiler debug output only */
 
     LsDumpParseTree ();
@@ -506,12 +653,12 @@
      */
     Event = UtBeginEvent ("Open AML output file");
     Status = FlOpenAmlOutputFile (Gbl_OutputFilenamePrefix);
+    UtEndEvent (Event);
     if (ACPI_FAILURE (Status))
     {
         AePrintErrorLog (ASL_FILE_STDERR);
-        return -1;
+        return (-1);
     }
-    UtEndEvent (Event);
 
     /* Interpret and generate all compile-time constants */
 
@@ -541,16 +688,17 @@
 
     if (Gbl_ParseOnlyFlag)
     {
-        AePrintErrorLog (ASL_FILE_STDOUT);
-        UtDisplaySummary (ASL_FILE_STDOUT);
+        AePrintErrorLog (ASL_FILE_STDERR);
+        UtDisplaySummary (ASL_FILE_STDERR);
         if (Gbl_DebugFlag)
         {
-            /* Print error summary to the debug file */
+            /* Print error summary to the stdout also */
 
-            AePrintErrorLog (ASL_FILE_STDERR);
-            UtDisplaySummary (ASL_FILE_STDERR);
+            AePrintErrorLog (ASL_FILE_STDOUT);
+            UtDisplaySummary (ASL_FILE_STDOUT);
         }
-        return 0;
+        UtEndEvent (FullCompile);
+        return (0);
     }
 
     /*
@@ -564,16 +712,16 @@
     UtEndEvent (Event);
     if (ACPI_FAILURE (Status))
     {
-        return -1;
+        goto ErrorExit;
     }
 
     /* Namespace cross-reference */
 
     AslGbl_NamespaceEvent = UtBeginEvent ("Cross reference parse tree and Namespace");
-    Status = LkCrossReferenceNamespace ();
+    Status = XfCrossReferenceNamespace ();
     if (ACPI_FAILURE (Status))
     {
-        return -1;
+        goto ErrorExit;
     }
 
     /* Namespace - Check for non-referenced objects */
@@ -582,7 +730,7 @@
     UtEndEvent (AslGbl_NamespaceEvent);
 
     /*
-     * Semantic analysis.  This can happen only after the
+     * Semantic analysis. This can happen only after the
      * namespace has been loaded and cross-referenced.
      *
      * part one - check control methods
@@ -592,8 +740,8 @@
 
     DbgPrint (ASL_DEBUG_OUTPUT, "\nSemantic analysis - Method analysis\n\n");
     TrWalkParseTree (RootNode, ASL_WALK_VISIT_TWICE,
-        AnMethodAnalysisWalkBegin,
-        AnMethodAnalysisWalkEnd, &AnalysisWalkInfo);
+        MtMethodAnalysisWalkBegin,
+        MtMethodAnalysisWalkEnd, &AnalysisWalkInfo);
     UtEndEvent (Event);
 
     /* Semantic error checking part two - typing of method returns */
@@ -643,7 +791,12 @@
 
     UtEndEvent (FullCompile);
     CmCleanupAndExit ();
-    return 0;
+    return (0);
+
+ErrorExit:
+    UtEndEvent (FullCompile);
+    CmCleanupAndExit ();
+    return (-1);
 }
 
 
@@ -667,55 +820,75 @@
     /* Create listings and hex files */
 
     LsDoListings ();
-    LsDoHexOutput ();
+    HxDoHexOutput ();
 
     /* Dump the namespace to the .nsp file if requested */
 
-    (void) LsDisplayNamespace ();
+    (void) NsDisplayNamespace ();
 }
 
 
 /*******************************************************************************
  *
- * FUNCTION:    CmDumpEvent
+ * FUNCTION:    CmDumpAllEvents
  *
- * PARAMETERS:  Event           - A compiler event struct
+ * PARAMETERS:  None
  *
  * RETURN:      None.
  *
- * DESCRIPTION: Dump a compiler event struct
+ * DESCRIPTION: Dump all compiler events
  *
  ******************************************************************************/
 
 static void
-CmDumpEvent (
-    ASL_EVENT_INFO          *Event)
+CmDumpAllEvents (
+    void)
 {
+    ASL_EVENT_INFO          *Event;
     UINT32                  Delta;
     UINT32                  USec;
     UINT32                  MSec;
+    UINT32                  i;
 
-    if (!Event->Valid)
+
+    Event = AslGbl_Events;
+
+    DbgPrint (ASL_DEBUG_OUTPUT, "\n\nElapsed time for major events\n\n");
+    if (Gbl_CompileTimesFlag)
     {
-        return;
+        printf ("\nElapsed time for major events\n\n");
     }
 
-    /* Delta will be in 100-nanosecond units */
+    for (i = 0; i < AslGbl_NextEvent; i++)
+    {
+        if (Event->Valid)
+        {
+            /* Delta will be in 100-nanosecond units */
 
-    Delta = (UINT32) (Event->EndTime - Event->StartTime);
+            Delta = (UINT32) (Event->EndTime - Event->StartTime);
 
-    USec = Delta / 10;
-    MSec = Delta / 10000;
+            USec = Delta / ACPI_100NSEC_PER_USEC;
+            MSec = Delta / ACPI_100NSEC_PER_MSEC;
+
+            /* Round milliseconds up */
 
-    /* Round milliseconds up */
+            if ((USec - (MSec * ACPI_USEC_PER_MSEC)) >= 500)
+            {
+                MSec++;
+            }
+
+            DbgPrint (ASL_DEBUG_OUTPUT, "%8u usec %8u msec - %s\n",
+                USec, MSec, Event->EventName);
 
-    if ((USec - (MSec * 1000)) >= 500)
-    {
-        MSec++;
+            if (Gbl_CompileTimesFlag)
+            {
+                printf ("%8u usec %8u msec - %s\n",
+                    USec, MSec, Event->EventName);
+            }
+        }
+
+        Event++;
     }
-
-    DbgPrint (ASL_DEBUG_OUTPUT, "%8u usec %8u msec - %s\n",
-        USec, MSec, Event->EventName);
 }
 
 
@@ -736,30 +909,23 @@
     void)
 {
     UINT32                  i;
+    BOOLEAN                 DeleteAmlFile = FALSE;
 
 
-    AePrintErrorLog (ASL_FILE_STDOUT);
+    AePrintErrorLog (ASL_FILE_STDERR);
     if (Gbl_DebugFlag)
     {
-        /* Print error summary to the debug file */
+        /* Print error summary to stdout also */
 
-        AePrintErrorLog (ASL_FILE_STDERR);
+        AePrintErrorLog (ASL_FILE_STDOUT);
     }
 
-    DbgPrint (ASL_DEBUG_OUTPUT, "\n\nElapsed time for major events\n\n");
-    for (i = 0; i < AslGbl_NextEvent; i++)
-    {
-        CmDumpEvent (&AslGbl_Events[i]);
-    }
+    /* Emit compile times if enabled */
+
+    CmDumpAllEvents ();
 
     if (Gbl_CompileTimesFlag)
     {
-        printf ("\nElapsed time for major events\n\n");
-        for (i = 0; i < AslGbl_NextEvent; i++)
-        {
-            CmDumpEvent (&AslGbl_Events[i]);
-        }
-
         printf ("\nMiscellaneous compile statistics\n\n");
         printf ("%11u : %s\n", TotalParseNodes, "Parse nodes");
         printf ("%11u : %s\n", Gbl_NsLookupCount, "Namespace searches");
@@ -795,24 +961,50 @@
 
     UtDisplaySummary (ASL_FILE_STDOUT);
 
+    /*
+     * We will delete the AML file if there are errors and the
+     * force AML output option has not been used.
+     */
+    if ((Gbl_ExceptionCount[ASL_ERROR] > 0) && (!Gbl_IgnoreErrors) &&
+        Gbl_Files[ASL_FILE_AML_OUTPUT].Handle)
+    {
+        DeleteAmlFile = TRUE;
+    }
+
     /* Close all open files */
 
-    for (i = 2; i < ASL_MAX_FILE_TYPE; i++)
+    /*
+     * Take care with the preprocessor file (.i), it might be the same
+     * as the "input" file, depending on where the compiler has terminated
+     * or aborted. Prevent attempt to close the same file twice in
+     * loop below.
+     */
+    if (Gbl_Files[ASL_FILE_PREPROCESSOR].Handle ==
+        Gbl_Files[ASL_FILE_INPUT].Handle)
+    {
+        Gbl_Files[ASL_FILE_PREPROCESSOR].Handle = NULL;
+    }
+
+    /* Close the standard I/O files */
+
+    for (i = ASL_FILE_INPUT; i < ASL_MAX_FILE_TYPE; i++)
     {
         FlCloseFile (i);
     }
 
     /* Delete AML file if there are errors */
 
-    if ((Gbl_ExceptionCount[ASL_ERROR] > 0) && (!Gbl_IgnoreErrors) &&
-        Gbl_Files[ASL_FILE_AML_OUTPUT].Handle)
+    if (DeleteAmlFile)
     {
-        if (remove (Gbl_Files[ASL_FILE_AML_OUTPUT].Filename))
-        {
-            printf ("%s: ",
-                Gbl_Files[ASL_FILE_AML_OUTPUT].Filename);
-            perror ("Could not delete AML file");
-        }
+        FlDeleteFile (ASL_FILE_AML_OUTPUT);
+    }
+
+    /* Delete the preprocessor output file (.i) unless -li flag is set */
+
+    if (!Gbl_PreprocessorOutputFlag &&
+        Gbl_PreprocessFlag)
+    {
+        FlDeleteFile (ASL_FILE_PREPROCESSOR);
     }
 
     /*
@@ -829,15 +1021,8 @@
      *
      * TBD: SourceOutput should be .TMP, then rename if we want to keep it?
      */
-    if (!Gbl_SourceOutputFlag && Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename)
+    if (!Gbl_SourceOutputFlag)
     {
-        if (remove (Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename))
-        {
-            printf ("%s: ",
-                Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename);
-            perror ("Could not delete SRC file");
-        }
+        FlDeleteFile (ASL_FILE_SOURCE_OUTPUT);
     }
 }
-
-
--- a/sys/external/bsd/acpica/dist/compiler/asltree.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asltree.c	Fri Dec 27 18:50:56 2013 +0000
@@ -1,4 +1,3 @@
-
 /******************************************************************************
  *
  * Module Name: asltree - parse tree management
@@ -6,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -45,6 +44,7 @@
 
 #include "aslcompiler.h"
 #include "aslcompiler.y.h"
+#include "acapps.h"
 #include <time.h>
 
 #define _COMPONENT          ACPI_COMPILER
@@ -67,9 +67,9 @@
  *
  * PARAMETERS:  None
  *
- * RETURN:      New parse node.  Aborts on allocation failure
+ * RETURN:      New parse node. Aborts on allocation failure
  *
- * DESCRIPTION: Allocate a new parse node for the parse tree.  Bypass the local
+ * DESCRIPTION: Allocate a new parse node for the parse tree. Bypass the local
  *              dynamic memory manager for performance reasons (This has a
  *              major impact on the speed of the compiler.)
  *
@@ -97,7 +97,7 @@
  *
  * PARAMETERS:  ParseOpcode         - Opcode to be assigned to the node
  *
- * RETURN:      New parse node.  Aborts on allocation failure
+ * RETURN:      New parse node. Aborts on allocation failure
  *
  * DESCRIPTION: Allocate and initialize a new parse node for the parse tree
  *
@@ -120,7 +120,7 @@
     Op->Asl.Column            = Gbl_CurrentColumn;
 
     UtSetParseOpName (Op);
-    return Op;
+    return (Op);
 }
 
 
@@ -132,7 +132,7 @@
  *
  * RETURN:      None
  *
- * DESCRIPTION: "release" a node.  In truth, nothing is done since the node
+ * DESCRIPTION: "release" a node. In truth, nothing is done since the node
  *              is part of a larger buffer
  *
  ******************************************************************************/
@@ -155,9 +155,9 @@
  *
  * RETURN:      The updated node
  *
- * DESCRIPTION: Change the parse opcode assigned to a node.  Usually used to
+ * DESCRIPTION: Change the parse opcode assigned to a node. Usually used to
  *              change an opcode to DEFAULT_ARG so that the node is ignored
- *              during the code generation.  Also used to set generic integers
+ *              during the code generation. Also used to set generic integers
  *              to a specific size (8, 16, 32, or 64 bits)
  *
  ******************************************************************************/
@@ -170,7 +170,7 @@
 
     if (!Op)
     {
-        return NULL;
+        return (NULL);
     }
 
     DbgPrint (ASL_PARSE_OUTPUT,
@@ -185,19 +185,25 @@
         switch (ParseOpcode)
         {
         case PARSEOP_BYTECONST:
-            Op->Asl.Value.Integer = 0xFF;
+
+            Op->Asl.Value.Integer = ACPI_UINT8_MAX;
             break;
 
         case PARSEOP_WORDCONST:
-            Op->Asl.Value.Integer = 0xFFFF;
+
+            Op->Asl.Value.Integer = ACPI_UINT16_MAX;
             break;
 
         case PARSEOP_DWORDCONST:
-            Op->Asl.Value.Integer = 0xFFFFFFFF;
+
+            Op->Asl.Value.Integer = ACPI_UINT32_MAX;
             break;
 
+        /* Don't need to do the QWORD case */
+
         default:
-            /* Don't care about others, don't need to check QWORD */
+
+            /* Don't care about others */
             break;
         }
     }
@@ -212,23 +218,31 @@
     switch (ParseOpcode)
     {
     case PARSEOP_BYTECONST:
-        Op = UtCheckIntegerRange (Op, 0x00, ACPI_UINT8_MAX);
+
+        UtCheckIntegerRange (Op, 0x00, ACPI_UINT8_MAX);
+        Op->Asl.Value.Integer &= ACPI_UINT8_MAX;
         break;
 
     case PARSEOP_WORDCONST:
-        Op = UtCheckIntegerRange (Op, 0x00, ACPI_UINT16_MAX);
+
+        UtCheckIntegerRange (Op, 0x00, ACPI_UINT16_MAX);
+        Op->Asl.Value.Integer &= ACPI_UINT16_MAX;
         break;
 
     case PARSEOP_DWORDCONST:
-        Op = UtCheckIntegerRange (Op, 0x00, ACPI_UINT32_MAX);
+
+        UtCheckIntegerRange (Op, 0x00, ACPI_UINT32_MAX);
+        Op->Asl.Value.Integer &= ACPI_UINT32_MAX;
         break;
 
     default:
+
         /* Don't care about others, don't need to check QWORD */
+
         break;
     }
 
-    return Op;
+    return (Op);
 }
 
 
@@ -252,57 +266,71 @@
     switch (Flags)
     {
     case NODE_VISITED:
+
         return ("NODE_VISITED");
 
     case NODE_AML_PACKAGE:
+
         return ("NODE_AML_PACKAGE");
 
     case NODE_IS_TARGET:
+
         return ("NODE_IS_TARGET");
 
     case NODE_IS_RESOURCE_DESC:
+
         return ("NODE_IS_RESOURCE_DESC");
 
     case NODE_IS_RESOURCE_FIELD:
+
         return ("NODE_IS_RESOURCE_FIELD");
 
     case NODE_HAS_NO_EXIT:
+
         return ("NODE_HAS_NO_EXIT");
 
     case NODE_IF_HAS_NO_EXIT:
+
         return ("NODE_IF_HAS_NO_EXIT");
 
     case NODE_NAME_INTERNALIZED:
+
         return ("NODE_NAME_INTERNALIZED");
 
     case NODE_METHOD_NO_RETVAL:
+
         return ("NODE_METHOD_NO_RETVAL");
 
     case NODE_METHOD_SOME_NO_RETVAL:
+
         return ("NODE_METHOD_SOME_NO_RETVAL");
 
     case NODE_RESULT_NOT_USED:
+
         return ("NODE_RESULT_NOT_USED");
 
     case NODE_METHOD_TYPED:
+
         return ("NODE_METHOD_TYPED");
 
-    case NODE_IS_BIT_OFFSET:
-        return ("NODE_IS_BIT_OFFSET");
+    case NODE_COMPILE_TIME_CONST:
 
-    case NODE_COMPILE_TIME_CONST:
         return ("NODE_COMPILE_TIME_CONST");
 
     case NODE_IS_TERM_ARG:
+
         return ("NODE_IS_TERM_ARG");
 
     case NODE_WAS_ONES_OP:
+
         return ("NODE_WAS_ONES_OP");
 
     case NODE_IS_NAME_DECLARATION:
+
         return ("NODE_IS_NAME_DECLARATION");
 
     default:
+
         return ("Multiple Flags (or unknown flag) set");
     }
 }
@@ -317,7 +345,7 @@
  *
  * RETURN:      The updated parser op
  *
- * DESCRIPTION: Set bits in the node flags word.  Will not clear bits, only set
+ * DESCRIPTION: Set bits in the node flags word. Will not clear bits, only set
  *
  ******************************************************************************/
 
@@ -333,12 +361,45 @@
 
     if (!Op)
     {
-        return NULL;
+        return (NULL);
     }
 
     Op->Asl.CompileFlags |= Flags;
+    return (Op);
+}
 
-    return Op;
+
+/*******************************************************************************
+ *
+ * FUNCTION:    TrSetNodeAmlLength
+ *
+ * PARAMETERS:  Op                  - An existing parse node
+ *              Length              - AML Length
+ *
+ * RETURN:      The updated parser op
+ *
+ * DESCRIPTION: Set the AML Length in a node. Used by the parser to indicate
+ *              the presence of a node that must be reduced to a fixed length
+ *              constant.
+ *
+ ******************************************************************************/
+
+ACPI_PARSE_OBJECT *
+TrSetNodeAmlLength (
+    ACPI_PARSE_OBJECT       *Op,
+    UINT32                  Length)
+{
+
+    DbgPrint (ASL_PARSE_OUTPUT,
+        "\nSetNodeAmlLength: Op %p, %8.8X\n", Op, Length);
+
+    if (!Op)
+    {
+        return (NULL);
+    }
+
+    Op->Asl.AmlLength = Length;
+    return (Op);
 }
 
 
@@ -378,7 +439,7 @@
  *
  * PARAMETERS:  ParseOpcode         - New opcode to be assigned to the node
  *
- * RETURN:      Pointer to the new node.  Aborts on allocation failure
+ * RETURN:      Pointer to the new node. Aborts on allocation failure
  *
  * DESCRIPTION: Create a simple leaf node (no children or peers, and no value
  *              assigned to the node)
@@ -398,7 +459,7 @@
         "\nCreateLeafNode  Ln/Col %u/%u NewNode %p  Op %s\n\n",
         Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName(ParseOpcode));
 
-    return Op;
+    return (Op);
 }
 
 
@@ -408,7 +469,7 @@
  *
  * PARAMETERS:  ParseOpcode         - The constant opcode
  *
- * RETURN:      Pointer to the new node.  Aborts on allocation failure
+ * RETURN:      Pointer to the new node. Aborts on allocation failure
  *
  * DESCRIPTION: Create a leaf node (no children or peers) for one of the
  *              special constants - __LINE__, __FILE__, and __DATE__.
@@ -428,16 +489,20 @@
     time_t                  CurrentTime;
     char                    *StaticTimeString;
     char                    *TimeString;
+    char                    *Path;
+    char                    *Filename;
 
 
     switch (ParseOpcode)
     {
     case PARSEOP___LINE__:
+
         Op = TrAllocateNode (PARSEOP_INTEGER);
         Op->Asl.Value.Integer = Op->Asl.LineNumber;
         break;
 
-    case PARSEOP___FILE__:
+    case PARSEOP___PATH__:
+
         Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
 
         /* Op.Asl.Filename contains the full pathname to the file */
@@ -445,7 +510,19 @@
         Op->Asl.Value.String = Op->Asl.Filename;
         break;
 
-   case PARSEOP___DATE__:
+    case PARSEOP___FILE__:
+
+        Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
+
+        /* Get the simple filename from the full path */
+
+        FlSplitInputPathname (Op->Asl.Filename, &Path, &Filename);
+        ACPI_FREE (Path);
+        Op->Asl.Value.String = Filename;
+        break;
+
+    case PARSEOP___DATE__:
+
         Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
 
         /* Get a copy of the current time */
@@ -460,6 +537,7 @@
         break;
 
     default: /* This would be an internal error */
+
         return (NULL);
     }
 
@@ -478,7 +556,7 @@
  * PARAMETERS:  ParseOpcode         - New opcode to be assigned to the node
  *              Value               - Value to be assigned to the node
  *
- * RETURN:      Pointer to the new node.  Aborts on allocation failure
+ * RETURN:      Pointer to the new node. Aborts on allocation failure
  *
  * DESCRIPTION: Create a leaf node (no children or peers) with a value
  *              assigned to it
@@ -504,35 +582,42 @@
     switch (ParseOpcode)
     {
     case PARSEOP_STRING_LITERAL:
+
         DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", Value);
         break;
 
     case PARSEOP_NAMESEG:
+
         DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Value);
         break;
 
     case PARSEOP_NAMESTRING:
+
         DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Value);
         break;
 
     case PARSEOP_EISAID:
+
         DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", Value);
         break;
 
     case PARSEOP_METHOD:
+
         DbgPrint (ASL_PARSE_OUTPUT, "METHOD");
         break;
 
     case PARSEOP_INTEGER:
+
         DbgPrint (ASL_PARSE_OUTPUT, "INTEGER");
         break;
 
     default:
+
         break;
     }
 
     DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
-    return Op;
+    return (Op);
 }
 
 
@@ -543,9 +628,9 @@
  * PARAMETERS:  ParseOpcode         - Opcode to be assigned to the node
  *              NumChildren         - Number of children to follow
  *              ...                 - A list of child nodes to link to the new
- *                                    node.  NumChildren long.
+ *                                    node. NumChildren long.
  *
- * RETURN:      Pointer to the new node.  Aborts on allocation failure
+ * RETURN:      Pointer to the new node. Aborts on allocation failure
  *
  * DESCRIPTION: Create a new parse node and link together a list of child
  *              nodes underneath the new node.
@@ -581,20 +666,25 @@
     switch (ParseOpcode)
     {
     case PARSEOP_DEFINITIONBLOCK:
+
         RootNode = Op;
         DbgPrint (ASL_PARSE_OUTPUT, "DEFINITION_BLOCK (Tree Completed)->");
         break;
 
     case PARSEOP_OPERATIONREGION:
+
         DbgPrint (ASL_PARSE_OUTPUT, "OPREGION->");
         break;
 
     case PARSEOP_OR:
+
         DbgPrint (ASL_PARSE_OUTPUT, "OR->");
         break;
 
     default:
+
         /* Nothing to do for other opcodes */
+
         break;
     }
 
@@ -611,7 +701,7 @@
 
         /*
          * If child is NULL, this means that an optional argument
-         * was omitted.  We must create a placeholder with a special
+         * was omitted. We must create a placeholder with a special
          * opcode (DEFAULT_ARG) so that the code generator will know
          * that it must emit the correct default for this argument
          */
@@ -654,7 +744,7 @@
     va_end(ap);
 
     DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
-    return Op;
+    return (Op);
 }
 
 
@@ -665,7 +755,7 @@
  * PARAMETERS:  Op                - An existing parse node
  *              NumChildren         - Number of children to follow
  *              ...                 - A list of child nodes to link to the new
- *                                    node.  NumChildren long.
+ *                                    node. NumChildren long.
  *
  * RETURN:      The updated (linked) node
  *
@@ -699,20 +789,25 @@
     switch (Op->Asl.ParseOpcode)
     {
     case PARSEOP_DEFINITIONBLOCK:
+
         RootNode = Op;
         DbgPrint (ASL_PARSE_OUTPUT, "DEFINITION_BLOCK (Tree Completed)->");
         break;
 
     case PARSEOP_OPERATIONREGION:
+
         DbgPrint (ASL_PARSE_OUTPUT, "OPREGION->");
         break;
 
     case PARSEOP_OR:
+
         DbgPrint (ASL_PARSE_OUTPUT, "OR->");
         break;
 
     default:
+
         /* Nothing to do for other opcodes */
+
         break;
     }
 
@@ -728,15 +823,15 @@
         {
             AslError (ASL_WARNING, ASL_MSG_COMPILER_INTERNAL, Child,
                 "Child node list invalid");
-	    va_end(ap);
-            return Op;
+            va_end(ap);
+            return (Op);
         }
 
         DbgPrint (ASL_PARSE_OUTPUT, "%p, ", Child);
 
         /*
          * If child is NULL, this means that an optional argument
-         * was omitted.  We must create a placeholder with a special
+         * was omitted. We must create a placeholder with a special
          * opcode (DEFAULT_ARG) so that the code generator will know
          * that it must emit the correct default for this argument
          */
@@ -775,10 +870,10 @@
         }
         PrevChild = Child;
     }
+
     va_end(ap);
-
     DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
-    return Op;
+    return (Op);
 }
 
 
@@ -791,7 +886,7 @@
  *
  * RETURN:      Op1 or the non-null node.
  *
- * DESCRIPTION: Link two nodes as peers.  Handles cases where one peer is null.
+ * DESCRIPTION: Link two nodes as peers. Handles cases where one peer is null.
  *
  ******************************************************************************/
 
@@ -812,19 +907,19 @@
     if ((!Op1) && (!Op2))
     {
         DbgPrint (ASL_PARSE_OUTPUT, "\nTwo Null nodes!\n");
-        return Op1;
+        return (Op1);
     }
 
     /* If one of the nodes is null, just return the non-null node */
 
     if (!Op2)
     {
-        return Op1;
+        return (Op1);
     }
 
     if (!Op1)
     {
-        return Op2;
+        return (Op2);
     }
 
     if (Op1 == Op2)
@@ -834,7 +929,7 @@
             Op1);
         AslError (ASL_WARNING, ASL_MSG_COMPILER_INTERNAL, Op1,
             "Linking node to itself");
-        return Op1;
+        return (Op1);
     }
 
     Op1->Asl.Parent = Op2->Asl.Parent;
@@ -851,7 +946,7 @@
     }
 
     Next->Asl.Next = Op2;
-    return Op1;
+    return (Op1);
 }
 
 
@@ -947,7 +1042,7 @@
 
     if (!Op1 || !Op2)
     {
-        return Op1;
+        return (Op1);
     }
 
     Op1->Asl.Child = Op2;
@@ -961,7 +1056,7 @@
         Next = Next->Asl.Next;
     }
 
-    return Op1;
+    return (Op1);
 }
 
 
@@ -1060,7 +1155,6 @@
         }
         break;
 
-
     case ASL_WALK_VISIT_UPWARD:
 
         while (Op)
@@ -1115,7 +1209,6 @@
         }
         break;
 
-
      case ASL_WALK_VISIT_TWICE:
 
         while (Op)
@@ -1189,5 +1282,3 @@
 
     return (AE_OK);
 }
-
-
--- a/sys/external/bsd/acpica/dist/compiler/aslutils.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslutils.c	Fri Dec 27 18:50:56 2013 +0000
@@ -1,4 +1,3 @@
-
 /******************************************************************************
  *
  * Module Name: aslutils -- compiler utilities
@@ -6,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -53,11 +52,6 @@
 #define _COMPONENT          ACPI_COMPILER
         ACPI_MODULE_NAME    ("aslutils")
 
-char                        AslHexLookup[] =
-{
-    '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
-};
-
 
 /* Local prototypes */
 
@@ -84,41 +78,41 @@
  *
  ******************************************************************************/
 
+#define ACPI_TABLE_HELP_FORMAT  "%8u) %s    %s\n"
+
 void
 UtDisplaySupportedTables (
     void)
 {
     ACPI_DMTABLE_DATA       *TableData;
-    UINT32                  i = 6;
+    UINT32                  i;
 
 
-    printf ("\nACPI tables supported by iASL subsystems in "
-        "version %8.8X:\n"
-        "  ASL and Data Table compilers\n"
-        "  AML and Data Table disassemblers\n"
-        "  ACPI table template generator\n\n", ACPI_CA_VERSION);
+    printf ("\nACPI tables supported by iASL version %8.8X:\n"
+        "  (Compiler, Disassembler, Template Generator)\n\n",
+        ACPI_CA_VERSION);
 
     /* Special tables */
 
-    printf ("%8u) %s    %s\n", 1, ACPI_SIG_DSDT, "Differentiated System Description Table");
-    printf ("%8u) %s    %s\n", 2, ACPI_SIG_SSDT, "Secondary System Description Table");
-    printf ("%8u) %s    %s\n", 3, ACPI_SIG_FADT, "Fixed ACPI Description Table (FADT)");
-    printf ("%8u) %s    %s\n", 4, ACPI_SIG_FACS, "Firmware ACPI Control Structure");
-    printf ("%8u) %s    %s\n", 5, ACPI_RSDP_NAME, "Root System Description Pointer");
+    printf ("  Special tables and AML tables:\n");
+    printf (ACPI_TABLE_HELP_FORMAT, 1, ACPI_RSDP_NAME, "Root System Description Pointer");
+    printf (ACPI_TABLE_HELP_FORMAT, 2, ACPI_SIG_FACS, "Firmware ACPI Control Structure");
+    printf (ACPI_TABLE_HELP_FORMAT, 3, ACPI_SIG_DSDT, "Differentiated System Description Table");
+    printf (ACPI_TABLE_HELP_FORMAT, 4, ACPI_SIG_SSDT, "Secondary System Description Table");
 
     /* All data tables with common table header */
 
-    for (TableData = AcpiDmTableData; TableData->Signature; TableData++)
+    printf ("\n  Standard ACPI data tables:\n");
+    for (TableData = AcpiDmTableData, i = 5; TableData->Signature; TableData++, i++)
     {
-        printf ("%8u) %s    %s\n", i, TableData->Signature, TableData->Name);
-        i++;
+        printf (ACPI_TABLE_HELP_FORMAT, i, TableData->Signature, TableData->Name);
     }
 }
 
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiPsDisplayConstantOpcodes
+ * FUNCTION:    UtDisplayConstantOpcodes
  *
  * PARAMETERS:  None
  *
@@ -151,11 +145,11 @@
  *
  * FUNCTION:    UtLocalCalloc
  *
- * PARAMETERS:  Size        - Bytes to be allocated
+ * PARAMETERS:  Size                - Bytes to be allocated
  *
- * RETURN:      Pointer to the allocated memory.  Guaranteed to be valid.
+ * RETURN:      Pointer to the allocated memory. Guaranteed to be valid.
  *
- * DESCRIPTION: Allocate zero-initialized memory.  Aborts the compile on an
+ * DESCRIPTION: Allocate zero-initialized memory. Aborts the compile on an
  *              allocation failure, on the assumption that nothing more can be
  *              accomplished.
  *
@@ -190,9 +184,9 @@
  *
  * FUNCTION:    UtBeginEvent
  *
- * PARAMETERS:  Name        - Ascii name of this event
+ * PARAMETERS:  Name                - Ascii name of this event
  *
- * RETURN:      Event       - Event number (integer index)
+ * RETURN:      Event number (integer index)
  *
  * DESCRIPTION: Saves the current time with this event
  *
@@ -223,7 +217,7 @@
  *
  * FUNCTION:    UtEndEvent
  *
- * PARAMETERS:  Event       - Event number (integer index)
+ * PARAMETERS:  Event               - Event number (integer index)
  *
  * RETURN:      None
  *
@@ -233,7 +227,7 @@
 
 void
 UtEndEvent (
-    UINT8                  Event)
+    UINT8                   Event)
 {
 
     if (Event >= ASL_NUM_EVENTS)
@@ -251,7 +245,7 @@
  *
  * FUNCTION:    UtHexCharToValue
  *
- * PARAMETERS:  HexChar         - Hex character in Ascii
+ * PARAMETERS:  HexChar             - Hex character in Ascii
  *
  * RETURN:      The binary value of the hex character
  *
@@ -282,12 +276,13 @@
  *
  * FUNCTION:    UtConvertByteToHex
  *
- * PARAMETERS:  RawByte         - Binary data
- *              Buffer          - Pointer to where the hex bytes will be stored
+ * PARAMETERS:  RawByte             - Binary data
+ *              Buffer              - Pointer to where the hex bytes will be
+ *                                    stored
  *
  * RETURN:      Ascii hex byte is stored in Buffer.
  *
- * DESCRIPTION: Perform hex-to-ascii translation.  The return data is prefixed
+ * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed
  *              with "0x"
  *
  ******************************************************************************/
@@ -310,12 +305,13 @@
  *
  * FUNCTION:    UtConvertByteToAsmHex
  *
- * PARAMETERS:  RawByte         - Binary data
- *              Buffer          - Pointer to where the hex bytes will be stored
+ * PARAMETERS:  RawByte             - Binary data
+ *              Buffer              - Pointer to where the hex bytes will be
+ *                                    stored
  *
  * RETURN:      Ascii hex byte is stored in Buffer.
  *
- * DESCRIPTION: Perform hex-to-ascii translation.  The return data is prefixed
+ * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed
  *              with "0x"
  *
  ******************************************************************************/
@@ -337,13 +333,13 @@
  *
  * FUNCTION:    DbgPrint
  *
- * PARAMETERS:  Type            - Type of output
- *              Fmt             - Printf format string
- *              ...             - variable printf list
+ * PARAMETERS:  Type                - Type of output
+ *              Fmt                 - Printf format string
+ *              ...                 - variable printf list
  *
  * RETURN:      None
  *
- * DESCRIPTION: Conditional print statement.  Prints to stderr only if the
+ * DESCRIPTION: Conditional print statement. Prints to stderr only if the
  *              debug flag is set.
  *
  ******************************************************************************/
@@ -357,7 +353,6 @@
     va_list                 Args;
 
 
-
     if (!Gbl_DebugFlag)
     {
         return;
@@ -417,7 +412,7 @@
  *
  * FUNCTION:    UtSetParseOpName
  *
- * PARAMETERS:  Op
+ * PARAMETERS:  Op                  - Parse op to be named.
  *
  * RETURN:      None
  *
@@ -439,7 +434,7 @@
  *
  * FUNCTION:    UtDisplaySummary
  *
- * PARAMETERS:  FileID          - ID of outpout file
+ * PARAMETERS:  FileID              - ID of outpout file
  *
  * RETURN:      None
  *
@@ -451,35 +446,40 @@
 UtDisplaySummary (
     UINT32                  FileId)
 {
+    UINT32                  i;
+
 
     if (FileId != ASL_FILE_STDOUT)
     {
         /* Compiler name and version number */
 
-        FlPrintFile (FileId, "%s version %X%s\n",
-            ASL_COMPILER_NAME, (UINT32) ACPI_CA_VERSION, ACPI_WIDTH);
+        FlPrintFile (FileId, "%s version %X%s [%s]\n\n",
+            ASL_COMPILER_NAME, (UINT32) ACPI_CA_VERSION, ACPI_WIDTH, __DATE__);
     }
 
+    /* Summary of main input and output files */
+
     if (Gbl_FileType == ASL_INPUT_TYPE_ASCII_DATA)
     {
         FlPrintFile (FileId,
-            "Table Input:   %s - %u lines, %u bytes, %u fields\n",
+            "%-14s %s - %u lines, %u bytes, %u fields\n",
+            "Table Input:",
             Gbl_Files[ASL_FILE_INPUT].Filename, Gbl_CurrentLineNumber,
             Gbl_InputByteCount, Gbl_InputFieldCount);
 
         if ((Gbl_ExceptionCount[ASL_ERROR] == 0) || (Gbl_IgnoreErrors))
         {
             FlPrintFile (FileId,
-                "Binary Output: %s - %u bytes\n\n",
+                "%-14s %s - %u bytes\n",
+                "Binary Output:",
                 Gbl_Files[ASL_FILE_AML_OUTPUT].Filename, Gbl_TableLength);
         }
     }
     else
     {
-        /* Input/Output summary */
-
         FlPrintFile (FileId,
-            "ASL Input:  %s - %u lines, %u bytes, %u keywords\n",
+            "%-14s %s - %u lines, %u bytes, %u keywords\n",
+            "ASL Input:",
             Gbl_Files[ASL_FILE_INPUT].Filename, Gbl_CurrentLineNumber,
             Gbl_InputByteCount, TotalKeywords);
 
@@ -488,16 +488,45 @@
         if ((Gbl_ExceptionCount[ASL_ERROR] == 0) || (Gbl_IgnoreErrors))
         {
             FlPrintFile (FileId,
-                "AML Output: %s - %u bytes, %u named objects, %u executable opcodes\n\n",
+                "%-14s %s - %u bytes, %u named objects, %u executable opcodes\n",
+                "AML Output:",
                 Gbl_Files[ASL_FILE_AML_OUTPUT].Filename, Gbl_TableLength,
                 TotalNamedObjects, TotalExecutableOpcodes);
         }
     }
 
+    /* Display summary of any optional files */
+
+    for (i = ASL_FILE_SOURCE_OUTPUT; i <= ASL_MAX_FILE_TYPE; i++)
+    {
+        if (!Gbl_Files[i].Filename || !Gbl_Files[i].Handle)
+        {
+            continue;
+        }
+
+        /* .SRC is a temp file unless specifically requested */
+
+        if ((i == ASL_FILE_SOURCE_OUTPUT) && (!Gbl_SourceOutputFlag))
+        {
+            continue;
+        }
+
+        /* .I is a temp file unless specifically requested */
+
+        if ((i == ASL_FILE_PREPROCESSOR) && (!Gbl_PreprocessorOutputFlag))
+        {
+            continue;
+        }
+
+        FlPrintFile (FileId, "%14s %s - %u bytes\n",
+            Gbl_Files[i].ShortDescription,
+            Gbl_Files[i].Filename, FlGetFileSize (i));
+    }
+
     /* Error summary */
 
     FlPrintFile (FileId,
-        "Compilation complete. %u Errors, %u Warnings, %u Remarks",
+        "\nCompilation complete. %u Errors, %u Warnings, %u Remarks",
         Gbl_ExceptionCount[ASL_ERROR],
         Gbl_ExceptionCount[ASL_WARNING] +
             Gbl_ExceptionCount[ASL_WARNING2] +
@@ -516,11 +545,11 @@
 
 /*******************************************************************************
  *
- * FUNCTION:    UtDisplaySummary
+ * FUNCTION:    UtCheckIntegerRange
  *
- * PARAMETERS:  Op              - Integer parse node
- *              LowValue        - Smallest allowed value
- *              HighValue       - Largest allowed value
+ * PARAMETERS:  Op                  - Integer parse node
+ *              LowValue            - Smallest allowed value
+ *              HighValue           - Largest allowed value
  *
  * RETURN:      Op if OK, otherwise NULL
  *
@@ -534,36 +563,23 @@
     UINT32                  LowValue,
     UINT32                  HighValue)
 {
-    char                    *ParseError = NULL;
-    char                    Buffer[64];
-
 
     if (!Op)
     {
-        return NULL;
-    }
-
-    if (Op->Asl.Value.Integer < LowValue)
-    {
-        ParseError = "Value below valid range";
-        Op->Asl.Value.Integer = LowValue;
+        return (NULL);
     }
 
-    if (Op->Asl.Value.Integer > HighValue)
+    if ((Op->Asl.Value.Integer < LowValue) ||
+        (Op->Asl.Value.Integer > HighValue))
     {
-        ParseError = "Value above valid range";
-        Op->Asl.Value.Integer = HighValue;
+        sprintf (MsgBuffer, "0x%X, allowable: 0x%X-0x%X",
+            (UINT32) Op->Asl.Value.Integer, LowValue, HighValue);
+
+        AslError (ASL_ERROR, ASL_MSG_RANGE, Op, MsgBuffer);
+        return (NULL);
     }
 
-    if (ParseError)
-    {
-        sprintf (Buffer, "%s 0x%X-0x%X", ParseError, LowValue, HighValue);
-        AslCompilererror (Buffer);
-
-        return NULL;
-    }
-
-    return Op;
+    return (Op);
 }
 
 
@@ -571,11 +587,11 @@
  *
  * FUNCTION:    UtGetStringBuffer
  *
- * PARAMETERS:  Length          - Size of buffer requested
+ * PARAMETERS:  Length              - Size of buffer requested
  *
- * RETURN:      Pointer to the buffer.  Aborts on allocation failure
+ * RETURN:      Pointer to the buffer. Aborts on allocation failure
  *
- * DESCRIPTION: Allocate a string buffer.  Bypass the local
+ * DESCRIPTION: Allocate a string buffer. Bypass the local
  *              dynamic memory manager for performance reasons (This has a
  *              major impact on the speed of the compiler.)
  *
@@ -602,12 +618,85 @@
 }
 
 
+/******************************************************************************
+ *
+ * FUNCTION:    UtExpandLineBuffers
+ *
+ * PARAMETERS:  None. Updates global line buffer pointers.
+ *
+ * RETURN:      None. Reallocates the global line buffers
+ *
+ * DESCRIPTION: Called if the current line buffer becomes filled. Reallocates
+ *              all global line buffers and updates Gbl_LineBufferSize. NOTE:
+ *              Also used for the initial allocation of the buffers, when
+ *              all of the buffer pointers are NULL. Initial allocations are
+ *              of size ASL_DEFAULT_LINE_BUFFER_SIZE
+ *
+ *****************************************************************************/
+
+void
+UtExpandLineBuffers (
+    void)
+{
+    UINT32                  NewSize;
+
+
+    /* Attempt to double the size of all line buffers */
+
+    NewSize = Gbl_LineBufferSize * 2;
+    if (Gbl_CurrentLineBuffer)
+    {
+        DbgPrint (ASL_DEBUG_OUTPUT,"Increasing line buffer size from %u to %u\n",
+            Gbl_LineBufferSize, NewSize);
+    }
+
+    Gbl_CurrentLineBuffer = realloc (Gbl_CurrentLineBuffer, NewSize);
+    Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
+    if (!Gbl_CurrentLineBuffer)
+    {
+        goto ErrorExit;
+    }
+
+    Gbl_MainTokenBuffer = realloc (Gbl_MainTokenBuffer, NewSize);
+    if (!Gbl_MainTokenBuffer)
+    {
+        goto ErrorExit;
+    }
+
+    Gbl_MacroTokenBuffer = realloc (Gbl_MacroTokenBuffer, NewSize);
+    if (!Gbl_MacroTokenBuffer)
+    {
+        goto ErrorExit;
+    }
+
+    Gbl_ExpressionTokenBuffer = realloc (Gbl_ExpressionTokenBuffer, NewSize);
+    if (!Gbl_ExpressionTokenBuffer)
+    {
+        goto ErrorExit;
+    }
+
+    Gbl_LineBufferSize = NewSize;
+    return;
+
+
+    /* On error above, simply issue error messages and abort, cannot continue */
+
+ErrorExit:
+    printf ("Could not increase line buffer size from %u to %u\n",
+        Gbl_LineBufferSize, Gbl_LineBufferSize * 2);
+
+    AslError (ASL_ERROR, ASL_MSG_BUFFER_ALLOCATION,
+        NULL, NULL);
+    AslAbort ();
+}
+
+
 /*******************************************************************************
  *
  * FUNCTION:    UtInternalizeName
  *
- * PARAMETERS:  ExternalName            - Name to convert
- *              ConvertedName           - Where the converted name is returned
+ * PARAMETERS:  ExternalName        - Name to convert
+ *              ConvertedName       - Where the converted name is returned
  *
  * RETURN:      Status
  *
@@ -659,8 +748,8 @@
  *
  * FUNCTION:    UtPadNameWithUnderscores
  *
- * PARAMETERS:  NameSeg         - Input nameseg
- *              PaddedNameSeg   - Output padded nameseg
+ * PARAMETERS:  NameSeg             - Input nameseg
+ *              PaddedNameSeg       - Output padded nameseg
  *
  * RETURN:      Padded nameseg.
  *
@@ -697,8 +786,8 @@
  *
  * FUNCTION:    UtAttachNameseg
  *
- * PARAMETERS:  Op              - Parent parse node
- *              Name            - Full ExternalName
+ * PARAMETERS:  Op                  - Parent parse node
+ *              Name                - Full ExternalName
  *
  * RETURN:      None; Sets the NameSeg field in parent node
  *
@@ -736,17 +825,18 @@
         /* No dots in the namepath, there is only a single nameseg. */
         /* Handle prefixes */
 
-        while ((*Name == '\\') || (*Name == '^'))
+        while (ACPI_IS_ROOT_PREFIX (*Name) ||
+               ACPI_IS_PARENT_PREFIX (*Name))
         {
             Name++;
         }
 
-        /* Remaing string should be one single nameseg */
+        /* Remaining string should be one single nameseg */
 
         UtPadNameWithUnderscores (Name, PaddedNameSeg);
     }
 
-    strncpy (Op->Asl.NameSeg, PaddedNameSeg, 4);
+    ACPI_MOVE_NAME (Op->Asl.NameSeg, PaddedNameSeg);
 }
 
 
@@ -754,12 +844,12 @@
  *
  * FUNCTION:    UtAttachNamepathToOwner
  *
- * PARAMETERS:  Op            - Parent parse node
- *              NameOp        - Node that contains the name
+ * PARAMETERS:  Op                  - Parent parse node
+ *              NameOp              - Node that contains the name
  *
  * RETURN:      Sets the ExternalName and Namepath in the parent node
  *
- * DESCRIPTION: Store the name in two forms in the parent node:  The original
+ * DESCRIPTION: Store the name in two forms in the parent node: The original
  *              (external) name, and the internalized name that is used within
  *              the ACPI namespace manager.
  *
@@ -799,11 +889,11 @@
  *
  * FUNCTION:    UtDoConstant
  *
- * PARAMETERS:  String      - Hex, Octal, or Decimal string
+ * PARAMETERS:  String              - Hex, Octal, or Decimal string
  *
  * RETURN:      Converted Integer
  *
- * DESCRIPTION: Convert a string to an integer.  With error checking.
+ * DESCRIPTION: Convert a string to an integer, with error checking.
  *
  ******************************************************************************/
 
@@ -834,10 +924,10 @@
  *
  * FUNCTION:    UtStrtoul64
  *
- * PARAMETERS:  String          - Null terminated string
- *              Terminater      - Where a pointer to the terminating byte is
- *                                returned
- *              Base            - Radix of the string
+ * PARAMETERS:  String              - Null terminated string
+ *              Terminater          - Where a pointer to the terminating byte
+ *                                    is returned
+ *              Base                - Radix of the string
  *
  * RETURN:      Converted value
  *
@@ -865,6 +955,7 @@
     case 8:
     case 10:
     case 16:
+
         break;
 
     default:
@@ -999,23 +1090,26 @@
     switch (Base)
     {
     case 8:
+
         Status = AE_BAD_OCTAL_CONSTANT;
         break;
 
     case 10:
+
         Status = AE_BAD_DECIMAL_CONSTANT;
         break;
 
     case 16:
+
         Status = AE_BAD_HEX_CONSTANT;
         break;
 
     default:
+
         /* Base validated above */
+
         break;
     }
 
     return (Status);
 }
-
-
--- a/sys/external/bsd/acpica/dist/debugger/dbcmds.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbcmds.c	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -46,6 +46,7 @@
 #include "accommon.h"
 #include "acevents.h"
 #include "acdebug.h"
+#include "acnamesp.h"
 #include "acresrc.h"
 #include "actables.h"
 
@@ -69,17 +70,33 @@
     ACPI_NAMESPACE_NODE     *Node,
     char                    *Name);
 
+static ACPI_STATUS
+AcpiDbResourceCallback (
+    ACPI_RESOURCE           *Resource,
+    void                    *Context);
+
+static ACPI_STATUS
+AcpiDbDeviceResources (
+    ACPI_HANDLE             ObjHandle,
+    UINT32                  NestingLevel,
+    void                    *Context,
+    void                    **ReturnValue);
+
+static void
+AcpiDbDoOneSleepState (
+    UINT8                   SleepState);
+
 
 /*******************************************************************************
  *
  * FUNCTION:    AcpiDbConvertToNode
  *
- * PARAMETERS:  InString        - String to convert
+ * PARAMETERS:  InString            - String to convert
  *
  * RETURN:      Pointer to a NS node
  *
- * DESCRIPTION: Convert a string to a valid NS pointer.  Handles numeric or
- *              alpha strings.
+ * DESCRIPTION: Convert a string to a valid NS pointer. Handles numeric or
+ *              alphanumeric strings.
  *
  ******************************************************************************/
 
@@ -88,13 +105,15 @@
     char                    *InString)
 {
     ACPI_NAMESPACE_NODE     *Node;
+    ACPI_SIZE               Address;
 
 
     if ((*InString >= 0x30) && (*InString <= 0x39))
     {
         /* Numeric argument, convert */
 
-        Node = ACPI_TO_POINTER (ACPI_STRTOUL (InString, NULL, 16));
+        Address = ACPI_STRTOUL (InString, NULL, 16);
+        Node = ACPI_TO_POINTER (Address);
         if (!AcpiOsReadable (Node, sizeof (ACPI_NAMESPACE_NODE)))
         {
             AcpiOsPrintf ("Address %p is invalid in this address space\n",
@@ -113,9 +132,9 @@
     }
     else
     {
-        /* Alpha argument */
-        /* The parameter is a name string that must be resolved to a
-         * Named obj
+        /*
+         * Alpha argument: The parameter is a name string that must be
+         * resolved to a Namespace object.
          */
         Node = AcpiDbLocalNsLookup (InString);
         if (!Node)
@@ -132,11 +151,12 @@
  *
  * FUNCTION:    AcpiDbSleep
  *
- * PARAMETERS:  ObjectArg       - Desired sleep state (0-5)
+ * PARAMETERS:  ObjectArg           - Desired sleep state (0-5). NULL means
+ *                                    invoke all possible sleep states.
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Simulate a sleep/wake sequence
+ * DESCRIPTION: Simulate sleep/wake sequences
  *
  ******************************************************************************/
 
@@ -144,32 +164,127 @@
 AcpiDbSleep (
     char                    *ObjectArg)
 {
-    ACPI_STATUS             Status;
     UINT8                   SleepState;
+    UINT32                  i;
+
+
+    ACPI_FUNCTION_TRACE (AcpiDbSleep);
+
+
+    /* Null input (no arguments) means to invoke all sleep states */
+
+    if (!ObjectArg)
+    {
+        AcpiOsPrintf ("Invoking all possible sleep states, 0-%d\n",
+            ACPI_S_STATES_MAX);
+
+        for (i = 0; i <= ACPI_S_STATES_MAX; i++)
+        {
+            AcpiDbDoOneSleepState ((UINT8) i);
+        }
+
+        return_ACPI_STATUS (AE_OK);
+    }
+
+    /* Convert argument to binary and invoke the sleep state */
+
+    SleepState = (UINT8) ACPI_STRTOUL (ObjectArg, NULL, 0);
+    AcpiDbDoOneSleepState (SleepState);
+    return_ACPI_STATUS (AE_OK);
+}
 
 
-    SleepState = (UINT8) ACPI_STRTOUL (ObjectArg, NULL, 0);
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDbDoOneSleepState
+ *
+ * PARAMETERS:  SleepState          - Desired sleep state (0-5)
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Simulate a sleep/wake sequence
+ *
+ ******************************************************************************/
+
+static void
+AcpiDbDoOneSleepState (
+    UINT8                   SleepState)
+{
+    ACPI_STATUS             Status;
+    UINT8                   SleepTypeA;
+    UINT8                   SleepTypeB;
+
+
+    /* Validate parameter */
 
-    AcpiOsPrintf ("**** Prepare to sleep ****\n");
+    if (SleepState > ACPI_S_STATES_MAX)
+    {
+        AcpiOsPrintf ("Sleep state %d out of range (%d max)\n",
+            SleepState, ACPI_S_STATES_MAX);
+        return;
+    }
+
+    AcpiOsPrintf ("\n---- Invoking sleep state S%d (%s):\n",
+        SleepState, AcpiGbl_SleepStateNames[SleepState]);
+
+    /* Get the values for the sleep type registers (for display only) */
+
+    Status = AcpiGetSleepTypeData (SleepState, &SleepTypeA, &SleepTypeB);
+    if (ACPI_FAILURE (Status))
+    {
+        AcpiOsPrintf ("Could not evaluate [%s] method, %s\n",
+            AcpiGbl_SleepStateNames[SleepState],
+            AcpiFormatException (Status));
+        return;
+    }
+
+    AcpiOsPrintf (
+        "Register values for sleep state S%d: Sleep-A: %.2X, Sleep-B: %.2X\n",
+        SleepState, SleepTypeA, SleepTypeB);
+
+    /* Invoke the various sleep/wake interfaces */
+
+    AcpiOsPrintf ("**** Sleep: Prepare to sleep (S%d) ****\n",
+        SleepState);
     Status = AcpiEnterSleepStatePrep (SleepState);
     if (ACPI_FAILURE (Status))
     {
-        return (Status);
+        goto ErrorExit;
     }
 
-    AcpiOsPrintf ("**** Going to sleep ****\n");
+    AcpiOsPrintf ("**** Sleep: Going to sleep (S%d) ****\n",
+        SleepState);
     Status = AcpiEnterSleepState (SleepState);
     if (ACPI_FAILURE (Status))
     {
-        return (Status);
+        goto ErrorExit;
+    }
+
+    AcpiOsPrintf ("**** Wake: Prepare to return from sleep (S%d) ****\n",
+        SleepState);
+    Status = AcpiLeaveSleepStatePrep (SleepState);
+    if (ACPI_FAILURE (Status))
+    {
+        goto ErrorExit;
     }
 
-    AcpiOsPrintf ("**** returning from sleep ****\n");
+    AcpiOsPrintf ("**** Wake: Return from sleep (S%d) ****\n",
+        SleepState);
     Status = AcpiLeaveSleepState (SleepState);
+    if (ACPI_FAILURE (Status))
+    {
+        goto ErrorExit;
+    }
 
-    return (Status);
+    return;
+
+
+ErrorExit:
+    ACPI_EXCEPTION ((AE_INFO, Status, "During invocation of sleep state S%d",
+        SleepState));
 }
 
+
 /*******************************************************************************
  *
  * FUNCTION:    AcpiDbDisplayLocks
@@ -202,11 +317,11 @@
  *
  * FUNCTION:    AcpiDbDisplayTableInfo
  *
- * PARAMETERS:  TableArg        - String with name of table to be displayed
+ * PARAMETERS:  TableArg            - Name of table to be displayed
  *
  * RETURN:      None
  *
- * DESCRIPTION: Display information about loaded tables.  Current
+ * DESCRIPTION: Display information about loaded tables. Current
  *              implementation displays all loaded tables.
  *
  ******************************************************************************/
@@ -220,12 +335,58 @@
     ACPI_STATUS             Status;
 
 
+    /* Header */
+
+    AcpiOsPrintf ("Idx ID Status    Type            Sig  Address  Len   Header\n");
+
     /* Walk the entire root table list */
 
     for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++)
     {
         TableDesc = &AcpiGbl_RootTableList.Tables[i];
-        AcpiOsPrintf ("%u ", i);
+
+        /* Index and Table ID */
+
+        AcpiOsPrintf ("%3u %.2u ", i, TableDesc->OwnerId);
+
+        /* Decode the table flags */
+
+        if (!(TableDesc->Flags & ACPI_TABLE_IS_LOADED))
+        {
+            AcpiOsPrintf ("NotLoaded ");
+        }
+        else
+        {
+            AcpiOsPrintf ("   Loaded ");
+        }
+
+        switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK)
+        {
+        case ACPI_TABLE_ORIGIN_UNKNOWN:
+
+            AcpiOsPrintf ("Unknown   ");
+            break;
+
+        case ACPI_TABLE_ORIGIN_MAPPED:
+
+            AcpiOsPrintf ("Mapped    ");
+            break;
+
+        case ACPI_TABLE_ORIGIN_ALLOCATED:
+
+            AcpiOsPrintf ("Allocated ");
+            break;
+
+        case ACPI_TABLE_ORIGIN_OVERRIDE:
+
+            AcpiOsPrintf ("Override  ");
+            break;
+
+        default:
+
+            AcpiOsPrintf ("INVALID   ");
+            break;
+        }
 
         /* Make sure that the table is mapped */
 
@@ -256,55 +417,45 @@
  *
  * FUNCTION:    AcpiDbUnloadAcpiTable
  *
- * PARAMETERS:  TableArg        - Name of the table to be unloaded
- *              InstanceArg     - Which instance of the table to unload (if
- *                                there are multiple tables of the same type)
+ * PARAMETERS:  ObjectName          - Namespace pathname for an object that
+ *                                    is owned by the table to be unloaded
  *
- * RETURN:      Nonde
+ * RETURN:      None
  *
- * DESCRIPTION: Unload an ACPI table.
- *              Instance is not implemented
+ * DESCRIPTION: Unload an ACPI table, via any namespace node that is owned
+ *              by the table.
  *
  ******************************************************************************/
 
 void
 AcpiDbUnloadAcpiTable (
-    char                    *TableArg,
-    char                    *InstanceArg)
+    char                    *ObjectName)
 {
-/* TBD: Need to reimplement for new data structures */
-
-#if 0
-    UINT32                  i;
+    ACPI_NAMESPACE_NODE     *Node;
     ACPI_STATUS             Status;
 
 
-    /* Search all tables for the target type */
-
-    for (i = 0; i < (ACPI_TABLE_ID_MAX+1); i++)
-    {
-        if (!ACPI_STRNCMP (TableArg, AcpiGbl_TableData[i].Signature,
-                AcpiGbl_TableData[i].SigLength))
-        {
-            /* Found the table, unload it */
+    /* Translate name to an Named object */
 
-            Status = AcpiUnloadTable (i);
-            if (ACPI_SUCCESS (Status))
-            {
-                AcpiOsPrintf ("[%s] unloaded and uninstalled\n", TableArg);
-            }
-            else
-            {
-                AcpiOsPrintf ("%s, while unloading [%s]\n",
-                    AcpiFormatException (Status), TableArg);
-            }
-
-            return;
-        }
+    Node = AcpiDbConvertToNode (ObjectName);
+    if (!Node)
+    {
+        AcpiOsPrintf ("Could not find [%s] in namespace\n",
+            ObjectName);
+        return;
     }
 
-    AcpiOsPrintf ("Unknown table type [%s]\n", TableArg);
-#endif
+    Status = AcpiUnloadParentTable (ACPI_CAST_PTR (ACPI_HANDLE, Node));
+    if (ACPI_SUCCESS (Status))
+    {
+        AcpiOsPrintf ("Parent of [%s] (%p) unloaded and uninstalled\n",
+            ObjectName, Node);
+    }
+    else
+    {
+        AcpiOsPrintf ("%s, while unloading parent table of [%s]\n",
+            AcpiFormatException (Status), ObjectName);
+    }
 }
 
 
@@ -312,12 +463,12 @@
  *
  * FUNCTION:    AcpiDbSendNotify
  *
- * PARAMETERS:  Name            - Name of ACPI object to send the notify to
- *              Value           - Value of the notify to send.
+ * PARAMETERS:  Name                - Name of ACPI object where to send notify
+ *              Value               - Value of the notify to send.
  *
  * RETURN:      None
  *
- * DESCRIPTION: Send an ACPI notification.  The value specified is sent to the
+ * DESCRIPTION: Send an ACPI notification. The value specified is sent to the
  *              named object as an ACPI notify.
  *
  ******************************************************************************/
@@ -339,25 +490,21 @@
         return;
     }
 
-    /* Decode Named object type */
+    /* Dispatch the notify if legal */
 
-    switch (Node->Type)
+    if (AcpiEvIsNotifyObject (Node))
     {
-    case ACPI_TYPE_DEVICE:
-    case ACPI_TYPE_THERMAL:
-
-         /* Send the notify */
-
         Status = AcpiEvQueueNotifyRequest (Node, Value);
         if (ACPI_FAILURE (Status))
         {
             AcpiOsPrintf ("Could not queue notify\n");
         }
-        break;
-
-    default:
-        AcpiOsPrintf ("Named object is not a device or a thermal object\n");
-        break;
+    }
+    else
+    {
+        AcpiOsPrintf (
+            "Named object [%4.4s] Type %s, must be Device/Thermal/Processor type\n",
+            AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type));
     }
 }
 
@@ -393,7 +540,6 @@
                     ACPI_WAIT_FOREVER);
 
         NextInterface = AcpiGbl_SupportedInterfaces;
-
         while (NextInterface)
         {
             if (!(NextInterface->Flags & ACPI_OSI_INVALID))
@@ -456,6 +602,78 @@
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiDbDisplayTemplate
+ *
+ * PARAMETERS:  BufferArg           - Buffer name or address
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Dump a buffer that contains a resource template
+ *
+ ******************************************************************************/
+
+void
+AcpiDbDisplayTemplate (
+    char                    *BufferArg)
+{
+    ACPI_NAMESPACE_NODE     *Node;
+    ACPI_STATUS             Status;
+    ACPI_BUFFER             ReturnBuffer;
+
+
+    /* Translate BufferArg to an Named object */
+
+    Node = AcpiDbConvertToNode (BufferArg);
+    if (!Node || (Node == AcpiGbl_RootNode))
+    {
+        AcpiOsPrintf ("Invalid argument: %s\n", BufferArg);
+        return;
+    }
+
+    /* We must have a buffer object */
+
+    if (Node->Type != ACPI_TYPE_BUFFER)
+    {
+        AcpiOsPrintf ("Not a Buffer object, cannot be a template: %s\n",
+            BufferArg);
+        return;
+    }
+
+    ReturnBuffer.Length = ACPI_DEBUG_BUFFER_SIZE;
+    ReturnBuffer.Pointer = AcpiGbl_DbBuffer;
+
+    /* Attempt to convert the raw buffer to a resource list */
+
+    Status = AcpiRsCreateResourceList (Node->Object, &ReturnBuffer);
+
+    AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT);
+    AcpiDbgLevel |= ACPI_LV_RESOURCES;
+
+    if (ACPI_FAILURE (Status))
+    {
+        AcpiOsPrintf ("Could not convert Buffer to a resource list: %s, %s\n",
+            BufferArg, AcpiFormatException (Status));
+        goto DumpBuffer;
+    }
+
+    /* Now we can dump the resource list */
+
+    AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE,
+        ReturnBuffer.Pointer));
+
+DumpBuffer:
+    AcpiOsPrintf ("\nRaw data buffer:\n");
+    AcpiUtDebugDumpBuffer ((UINT8 *) Node->Object->Buffer.Pointer,
+        Node->Object->Buffer.Length,
+        DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
+
+    AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
+    return;
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiDmCompareAmlResources
  *
  * PARAMETERS:  Aml1Buffer          - Contains first resource list
@@ -479,11 +697,14 @@
 {
     UINT8                   *Aml1;
     UINT8                   *Aml2;
+    UINT8                   *Aml1End;
+    UINT8                   *Aml2End;
     ACPI_RSDESC_SIZE        Aml1Length;
     ACPI_RSDESC_SIZE        Aml2Length;
     ACPI_RSDESC_SIZE        Offset = 0;
     UINT8                   ResourceType;
     UINT32                  Count = 0;
+    UINT32                  i;
 
 
     /* Compare overall buffer sizes (may be different due to size rounding) */
@@ -491,16 +712,18 @@
     if (Aml1BufferLength != Aml2BufferLength)
     {
         AcpiOsPrintf (
-            "**** Buffer length mismatch in converted AML: original %X new %X ****\n",
+            "**** Buffer length mismatch in converted AML: Original %X, New %X ****\n",
             Aml1BufferLength, Aml2BufferLength);
     }
 
     Aml1 = Aml1Buffer;
     Aml2 = Aml2Buffer;
+    Aml1End = Aml1Buffer + Aml1BufferLength;
+    Aml2End = Aml2Buffer + Aml2BufferLength;
 
     /* Walk the descriptor lists, comparing each descriptor */
 
-    while (Aml1 < (Aml1Buffer + Aml1BufferLength))
+    while ((Aml1 < Aml1End) && (Aml2 < Aml2End))
     {
         /* Get the lengths of each descriptor */
 
@@ -513,7 +736,7 @@
         if (Aml1Length != Aml2Length)
         {
             AcpiOsPrintf (
-                "**** Length mismatch in descriptor [%.2X] type %2.2X, Offset %8.8X L1 %X L2 %X ****\n",
+                "**** Length mismatch in descriptor [%.2X] type %2.2X, Offset %8.8X Len1 %X, Len2 %X ****\n",
                 Count, ResourceType, Offset, Aml1Length, Aml2Length);
         }
 
@@ -524,6 +747,16 @@
             AcpiOsPrintf (
                 "**** Data mismatch in descriptor [%.2X] type %2.2X, Offset %8.8X ****\n",
                 Count, ResourceType, Offset);
+
+            for (i = 0; i < Aml1Length; i++)
+            {
+                if (Aml1[i] != Aml2[i])
+                {
+                    AcpiOsPrintf (
+                        "Mismatch at byte offset %.2X: is %2.2X, should be %2.2X\n",
+                        i, Aml2[i], Aml1[i]);
+                }
+            }
         }
 
         /* Exit on EndTag descriptor */
@@ -547,8 +780,8 @@
  *
  * FUNCTION:    AcpiDmTestResourceConversion
  *
- * PARAMETERS:  Node            - Parent device node
- *              Name            - resource method name (_CRS)
+ * PARAMETERS:  Node                - Parent device node
+ *              Name                - resource method name (_CRS)
  *
  * RETURN:      Status
  *
@@ -563,8 +796,8 @@
     char                    *Name)
 {
     ACPI_STATUS             Status;
-    ACPI_BUFFER             ReturnObj;
-    ACPI_BUFFER             ResourceObj;
+    ACPI_BUFFER             ReturnBuffer;
+    ACPI_BUFFER             ResourceBuffer;
     ACPI_BUFFER             NewAml;
     ACPI_OBJECT             *OriginalAml;
 
@@ -572,12 +805,12 @@
     AcpiOsPrintf ("Resource Conversion Comparison:\n");
 
     NewAml.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
-    ReturnObj.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
-    ResourceObj.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
+    ReturnBuffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
+    ResourceBuffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
 
     /* Get the original _CRS AML resource template */
 
-    Status = AcpiEvaluateObject (Node, Name, NULL, &ReturnObj);
+    Status = AcpiEvaluateObject (Node, Name, NULL, &ReturnBuffer);
     if (ACPI_FAILURE (Status))
     {
         AcpiOsPrintf ("Could not obtain %s: %s\n",
@@ -587,7 +820,7 @@
 
     /* Get the AML resource template, converted to internal resource structs */
 
-    Status = AcpiGetCurrentResources (Node, &ResourceObj);
+    Status = AcpiGetCurrentResources (Node, &ResourceBuffer);
     if (ACPI_FAILURE (Status))
     {
         AcpiOsPrintf ("AcpiGetCurrentResources failed: %s\n",
@@ -597,7 +830,7 @@
 
     /* Convert internal resource list to external AML resource template */
 
-    Status = AcpiRsCreateAmlResources (ResourceObj.Pointer, &NewAml);
+    Status = AcpiRsCreateAmlResources (&ResourceBuffer, &NewAml);
     if (ACPI_FAILURE (Status))
     {
         AcpiOsPrintf ("AcpiRsCreateAmlResources failed: %s\n",
@@ -607,28 +840,291 @@
 
     /* Compare original AML to the newly created AML resource list */
 
-    OriginalAml = ReturnObj.Pointer;
+    OriginalAml = ReturnBuffer.Pointer;
 
-    AcpiDmCompareAmlResources (
-        OriginalAml->Buffer.Pointer, (ACPI_RSDESC_SIZE) OriginalAml->Buffer.Length,
+    AcpiDmCompareAmlResources (OriginalAml->Buffer.Pointer,
+        (ACPI_RSDESC_SIZE) OriginalAml->Buffer.Length,
         NewAml.Pointer, (ACPI_RSDESC_SIZE) NewAml.Length);
 
     /* Cleanup and exit */
 
     ACPI_FREE (NewAml.Pointer);
 Exit2:
-    ACPI_FREE (ResourceObj.Pointer);
+    ACPI_FREE (ResourceBuffer.Pointer);
 Exit1:
-    ACPI_FREE (ReturnObj.Pointer);
+    ACPI_FREE (ReturnBuffer.Pointer);
     return (Status);
 }
 
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiDbResourceCallback
+ *
+ * PARAMETERS:  ACPI_WALK_RESOURCE_CALLBACK
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Simple callback to exercise AcpiWalkResources and
+ *              AcpiWalkResourceBuffer.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiDbResourceCallback (
+    ACPI_RESOURCE           *Resource,
+    void                    *Context)
+{
+
+    return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDbDeviceResources
+ *
+ * PARAMETERS:  ACPI_WALK_CALLBACK
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Display the _PRT/_CRS/_PRS resources for a device object.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiDbDeviceResources (
+    ACPI_HANDLE             ObjHandle,
+    UINT32                  NestingLevel,
+    void                    *Context,
+    void                    **ReturnValue)
+{
+    ACPI_NAMESPACE_NODE     *Node;
+    ACPI_NAMESPACE_NODE     *PrtNode = NULL;
+    ACPI_NAMESPACE_NODE     *CrsNode = NULL;
+    ACPI_NAMESPACE_NODE     *PrsNode = NULL;
+    ACPI_NAMESPACE_NODE     *AeiNode = NULL;
+    char                    *ParentPath;
+    ACPI_BUFFER             ReturnBuffer;
+    ACPI_STATUS             Status;
+
+
+    Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle);
+    ParentPath = AcpiNsGetExternalPathname (Node);
+    if (!ParentPath)
+    {
+        return (AE_NO_MEMORY);
+    }
+
+    /* Get handles to the resource methods for this device */
+
+    (void) AcpiGetHandle (Node, METHOD_NAME__PRT, ACPI_CAST_PTR (ACPI_HANDLE, &PrtNode));
+    (void) AcpiGetHandle (Node, METHOD_NAME__CRS, ACPI_CAST_PTR (ACPI_HANDLE, &CrsNode));
+    (void) AcpiGetHandle (Node, METHOD_NAME__PRS, ACPI_CAST_PTR (ACPI_HANDLE, &PrsNode));
+    (void) AcpiGetHandle (Node, METHOD_NAME__AEI, ACPI_CAST_PTR (ACPI_HANDLE, &AeiNode));
+    if (!PrtNode && !CrsNode && !PrsNode && !AeiNode)
+    {
+        goto Cleanup;   /* Nothing to do */
+    }
+
+    AcpiOsPrintf ("\nDevice: %s\n", ParentPath);
+
+    /* Prepare for a return object of arbitrary size */
+
+    ReturnBuffer.Pointer = AcpiGbl_DbBuffer;
+    ReturnBuffer.Length  = ACPI_DEBUG_BUFFER_SIZE;
+
+
+    /* _PRT */
+
+    if (PrtNode)
+    {
+        AcpiOsPrintf ("Evaluating _PRT\n");
+
+        Status = AcpiEvaluateObject (PrtNode, NULL, NULL, &ReturnBuffer);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("Could not evaluate _PRT: %s\n",
+                AcpiFormatException (Status));
+            goto GetCrs;
+        }
+
+        ReturnBuffer.Pointer = AcpiGbl_DbBuffer;
+        ReturnBuffer.Length  = ACPI_DEBUG_BUFFER_SIZE;
+
+        Status = AcpiGetIrqRoutingTable (Node, &ReturnBuffer);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("GetIrqRoutingTable failed: %s\n",
+                AcpiFormatException (Status));
+            goto GetCrs;
+        }
+
+        AcpiRsDumpIrqList (ACPI_CAST_PTR (UINT8, AcpiGbl_DbBuffer));
+    }
+
+
+    /* _CRS */
+
+GetCrs:
+    if (CrsNode)
+    {
+        AcpiOsPrintf ("Evaluating _CRS\n");
+
+        ReturnBuffer.Pointer = AcpiGbl_DbBuffer;
+        ReturnBuffer.Length  = ACPI_DEBUG_BUFFER_SIZE;
+
+        Status = AcpiEvaluateObject (CrsNode, NULL, NULL, &ReturnBuffer);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("Could not evaluate _CRS: %s\n",
+                AcpiFormatException (Status));
+            goto GetPrs;
+        }
+
+        /* This code exercises the AcpiWalkResources interface */
+
+        Status = AcpiWalkResources (Node, METHOD_NAME__CRS,
+            AcpiDbResourceCallback, NULL);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("AcpiWalkResources failed: %s\n",
+                AcpiFormatException (Status));
+            goto GetPrs;
+        }
+
+        /* Get the _CRS resource list (test ALLOCATE buffer) */
+
+        ReturnBuffer.Pointer = NULL;
+        ReturnBuffer.Length  = ACPI_ALLOCATE_LOCAL_BUFFER;
+
+        Status = AcpiGetCurrentResources (Node, &ReturnBuffer);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("AcpiGetCurrentResources failed: %s\n",
+                AcpiFormatException (Status));
+            goto GetPrs;
+        }
+
+        /* This code exercises the AcpiWalkResourceBuffer interface */
+
+        Status = AcpiWalkResourceBuffer (&ReturnBuffer,
+            AcpiDbResourceCallback, NULL);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("AcpiWalkResourceBuffer failed: %s\n",
+                AcpiFormatException (Status));
+            goto EndCrs;
+        }
+
+        /* Dump the _CRS resource list */
+
+        AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE,
+            ReturnBuffer.Pointer));
+
+        /*
+         * Perform comparison of original AML to newly created AML. This
+         * tests both the AML->Resource conversion and the Resource->AML
+         * conversion.
+         */
+        (void) AcpiDmTestResourceConversion (Node, METHOD_NAME__CRS);
+
+        /* Execute _SRS with the resource list */
+
+        AcpiOsPrintf ("Evaluating _SRS\n");
+
+        Status = AcpiSetCurrentResources (Node, &ReturnBuffer);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("AcpiSetCurrentResources failed: %s\n",
+                AcpiFormatException (Status));
+            goto EndCrs;
+        }
+
+EndCrs:
+        ACPI_FREE (ReturnBuffer.Pointer);
+    }
+
+
+    /* _PRS */
+
+GetPrs:
+    if (PrsNode)
+    {
+        AcpiOsPrintf ("Evaluating _PRS\n");
+
+        ReturnBuffer.Pointer = AcpiGbl_DbBuffer;
+        ReturnBuffer.Length  = ACPI_DEBUG_BUFFER_SIZE;
+
+        Status = AcpiEvaluateObject (PrsNode, NULL, NULL, &ReturnBuffer);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("Could not evaluate _PRS: %s\n",
+                AcpiFormatException (Status));
+            goto GetAei;
+        }
+
+        ReturnBuffer.Pointer = AcpiGbl_DbBuffer;
+        ReturnBuffer.Length  = ACPI_DEBUG_BUFFER_SIZE;
+
+        Status = AcpiGetPossibleResources (Node, &ReturnBuffer);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("AcpiGetPossibleResources failed: %s\n",
+                AcpiFormatException (Status));
+            goto GetAei;
+        }
+
+        AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE, AcpiGbl_DbBuffer));
+    }
+
+
+    /* _AEI */
+
+GetAei:
+    if (AeiNode)
+    {
+        AcpiOsPrintf ("Evaluating _AEI\n");
+
+        ReturnBuffer.Pointer = AcpiGbl_DbBuffer;
+        ReturnBuffer.Length  = ACPI_DEBUG_BUFFER_SIZE;
+
+        Status = AcpiEvaluateObject (AeiNode, NULL, NULL, &ReturnBuffer);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("Could not evaluate _AEI: %s\n",
+                AcpiFormatException (Status));
+            goto Cleanup;
+        }
+
+        ReturnBuffer.Pointer = AcpiGbl_DbBuffer;
+        ReturnBuffer.Length  = ACPI_DEBUG_BUFFER_SIZE;
+
+        Status = AcpiGetEventResources (Node, &ReturnBuffer);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("AcpiGetEventResources failed: %s\n",
+                AcpiFormatException (Status));
+            goto Cleanup;
+        }
+
+        AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE, AcpiGbl_DbBuffer));
+    }
+
+
+Cleanup:
+    ACPI_FREE (ParentPath);
+    return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiDbDisplayResources
  *
- * PARAMETERS:  ObjectArg       - String with hex value of the object
+ * PARAMETERS:  ObjectArg           - String object name or object pointer.
+ *                                    NULL or "*" means "display resources for
+ *                                    all devices"
  *
  * RETURN:      None
  *
@@ -641,156 +1137,53 @@
     char                    *ObjectArg)
 {
     ACPI_NAMESPACE_NODE     *Node;
-    ACPI_STATUS             Status;
-    ACPI_BUFFER             ReturnObj;
 
 
     AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT);
     AcpiDbgLevel |= ACPI_LV_RESOURCES;
 
-    /* Convert string to object pointer */
-
-    Node = AcpiDbConvertToNode (ObjectArg);
-    if (!Node)
-    {
-        return;
-    }
-
-    /* Prepare for a return object of arbitrary size */
-
-    ReturnObj.Pointer = AcpiGbl_DbBuffer;
-    ReturnObj.Length  = ACPI_DEBUG_BUFFER_SIZE;
+    /* Asterisk means "display resources for all devices" */
 
-    /* _PRT */
-
-    AcpiOsPrintf ("Evaluating _PRT\n");
-
-    /* Check if _PRT exists */
-
-    Status = AcpiEvaluateObject (Node, METHOD_NAME__PRT, NULL, &ReturnObj);
-    if (ACPI_FAILURE (Status))
+    if (!ObjectArg || (!ACPI_STRCMP (ObjectArg, "*")))
     {
-        AcpiOsPrintf ("Could not obtain _PRT: %s\n",
-            AcpiFormatException (Status));
-        goto GetCrs;
+        (void) AcpiWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
+                    ACPI_UINT32_MAX, AcpiDbDeviceResources, NULL, NULL, NULL);
     }
+    else
+    {
+        /* Convert string to object pointer */
 
-    ReturnObj.Pointer = AcpiGbl_DbBuffer;
-    ReturnObj.Length  = ACPI_DEBUG_BUFFER_SIZE;
-
-    Status = AcpiGetIrqRoutingTable (Node, &ReturnObj);
-    if (ACPI_FAILURE (Status))
-    {
-        AcpiOsPrintf ("GetIrqRoutingTable failed: %s\n",
-            AcpiFormatException (Status));
-        goto GetCrs;
-    }
-
-    AcpiRsDumpIrqList (ACPI_CAST_PTR (UINT8, AcpiGbl_DbBuffer));
-
-
-    /* _CRS */
-
-GetCrs:
-    AcpiOsPrintf ("Evaluating _CRS\n");
-
-    ReturnObj.Pointer = AcpiGbl_DbBuffer;
-    ReturnObj.Length  = ACPI_DEBUG_BUFFER_SIZE;
-
-    /* Check if _CRS exists */
-
-    Status = AcpiEvaluateObject (Node, METHOD_NAME__CRS, NULL, &ReturnObj);
-    if (ACPI_FAILURE (Status))
-    {
-        AcpiOsPrintf ("Could not obtain _CRS: %s\n",
-            AcpiFormatException (Status));
-        goto GetPrs;
+        Node = AcpiDbConvertToNode (ObjectArg);
+        if (Node)
+        {
+            if (Node->Type != ACPI_TYPE_DEVICE)
+            {
+                AcpiOsPrintf ("%4.4s: Name is not a device object (%s)\n",
+                    Node->Name.Ascii, AcpiUtGetTypeName (Node->Type));
+            }
+            else
+            {
+                (void) AcpiDbDeviceResources (Node, 0, NULL, NULL);
+            }
+        }
     }
 
-    /* Get the _CRS resource list */
-
-    ReturnObj.Pointer = AcpiGbl_DbBuffer;
-    ReturnObj.Length  = ACPI_DEBUG_BUFFER_SIZE;
-
-    Status = AcpiGetCurrentResources (Node, &ReturnObj);
-    if (ACPI_FAILURE (Status))
-    {
-        AcpiOsPrintf ("AcpiGetCurrentResources failed: %s\n",
-            AcpiFormatException (Status));
-        goto GetPrs;
-    }
-
-    /* Dump the _CRS resource list */
-
-    AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE,
-        ReturnObj.Pointer));
-
-    /*
-     * Perform comparison of original AML to newly created AML. This tests both
-     * the AML->Resource conversion and the Resource->Aml conversion.
-     */
-    Status = AcpiDmTestResourceConversion (Node, __UNCONST(METHOD_NAME__CRS));
-
-    /* Execute _SRS with the resource list */
-
-    Status = AcpiSetCurrentResources (Node, &ReturnObj);
-    if (ACPI_FAILURE (Status))
-    {
-        AcpiOsPrintf ("AcpiSetCurrentResources failed: %s\n",
-            AcpiFormatException (Status));
-        goto GetPrs;
-    }
-
-
-    /* _PRS */
-
-GetPrs:
-    AcpiOsPrintf ("Evaluating _PRS\n");
-
-    ReturnObj.Pointer = AcpiGbl_DbBuffer;
-    ReturnObj.Length  = ACPI_DEBUG_BUFFER_SIZE;
-
-    /* Check if _PRS exists */
-
-    Status = AcpiEvaluateObject (Node, METHOD_NAME__PRS, NULL, &ReturnObj);
-    if (ACPI_FAILURE (Status))
-    {
-        AcpiOsPrintf ("Could not obtain _PRS: %s\n",
-            AcpiFormatException (Status));
-        goto Cleanup;
-    }
-
-    ReturnObj.Pointer = AcpiGbl_DbBuffer;
-    ReturnObj.Length  = ACPI_DEBUG_BUFFER_SIZE;
-
-    Status = AcpiGetPossibleResources (Node, &ReturnObj);
-    if (ACPI_FAILURE (Status))
-    {
-        AcpiOsPrintf ("AcpiGetPossibleResources failed: %s\n",
-            AcpiFormatException (Status));
-        goto Cleanup;
-    }
-
-    AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE, AcpiGbl_DbBuffer));
-
-Cleanup:
-
     AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
-    return;
 }
 
 
+#if (!ACPI_REDUCED_HARDWARE)
 /*******************************************************************************
  *
  * FUNCTION:    AcpiDbGenerateGpe
  *
- * PARAMETERS:  GpeArg          - Raw GPE number, ascii string
- *              BlockArg        - GPE block number, ascii string
- *                                0 or 1 for FADT GPE blocks
+ * PARAMETERS:  GpeArg              - Raw GPE number, ascii string
+ *              BlockArg            - GPE block number, ascii string
+ *                                    0 or 1 for FADT GPE blocks
  *
  * RETURN:      None
  *
- * DESCRIPTION: Generate a GPE
+ * DESCRIPTION: Simulate firing of a GPE
  *
  ******************************************************************************/
 
@@ -819,4 +1212,13 @@
     (void) AcpiEvGpeDispatch (NULL, GpeEventInfo, GpeNumber);
 }
 
+void
+AcpiDbGenerateSci (
+    void)
+{
+    AcpiEvSciDispatch ();
+}
+
+#endif /* !ACPI_REDUCED_HARDWARE */
+
 #endif /* ACPI_DEBUGGER */
--- a/sys/external/bsd/acpica/dist/debugger/dbdisply.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbdisply.c	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -68,6 +68,12 @@
 AcpiDbGetPointer (
     void                    *Target);
 
+static ACPI_STATUS
+AcpiDbDisplayNonRootHandlers (
+    ACPI_HANDLE             ObjHandle,
+    UINT32                  NestingLevel,
+    void                    *Context,
+    void                    **ReturnValue);
 
 /*
  * System handler information.
@@ -76,6 +82,7 @@
 #define ACPI_PREDEFINED_PREFIX          "%25s (%.2X) : "
 #define ACPI_HANDLER_NAME_STRING               "%30s : "
 #define ACPI_HANDLER_PRESENT_STRING                    "%-9s (%p)\n"
+#define ACPI_HANDLER_PRESENT_STRING2                   "%-9s (%p)"
 #define ACPI_HANDLER_NOT_PRESENT_STRING                "%-9s\n"
 
 /* All predefined Address Space IDs */
@@ -90,6 +97,8 @@
     ACPI_ADR_SPACE_CMOS,
     ACPI_ADR_SPACE_PCI_BAR_TARGET,
     ACPI_ADR_SPACE_IPMI,
+    ACPI_ADR_SPACE_GPIO,
+    ACPI_ADR_SPACE_GSBUS,
     ACPI_ADR_SPACE_DATA_TABLE,
     ACPI_ADR_SPACE_FIXED_HARDWARE
 };
@@ -105,11 +114,11 @@
 
 static ACPI_HANDLER_INFO    AcpiGbl_HandlerList[] =
 {
-    {&AcpiGbl_SystemNotify.Handler,    __UNCONST("System Notifications")},
-    {&AcpiGbl_DeviceNotify.Handler,    __UNCONST("Device Notifications")},
-    {&AcpiGbl_TableHandler,            __UNCONST("ACPI Table Events")},
-    {&AcpiGbl_ExceptionHandler,        __UNCONST("Control Method Exceptions")},
-    {&AcpiGbl_InterfaceHandler,        __UNCONST("OSI Invocations")}
+    {&AcpiGbl_GlobalNotify[0].Handler,  __UNCONST("System Notifications")},
+    {&AcpiGbl_GlobalNotify[1].Handler,  __UNCONST("Device Notifications")},
+    {&AcpiGbl_TableHandler,             __UNCONST("ACPI Table Events")},
+    {&AcpiGbl_ExceptionHandler,         __UNCONST("Control Method Exceptions")},
+    {&AcpiGbl_InterfaceHandler,         __UNCONST("OSI Invocations")}
 };
 
 
@@ -130,9 +139,11 @@
     void                    *Target)
 {
     void                    *ObjPtr;
+    ACPI_SIZE               Address;
 
 
-    ObjPtr = ACPI_TO_POINTER (ACPI_STRTOUL (Target, NULL, 16));
+    Address = ACPI_STRTOUL (Target, NULL, 16);
+    ObjPtr = ACPI_TO_POINTER (Address);
     return (ObjPtr);
 }
 
@@ -174,7 +185,7 @@
  *
  * FUNCTION:    AcpiDbDecodeAndDisplayObject
  *
- * PARAMETERS:  Target          - String with object to be displayed.  Names
+ * PARAMETERS:  Target          - String with object to be displayed. Names
  *                                and hex pointers are supported.
  *              OutputType      - Byte, Word, Dword, or Qword (B|W|D|Q)
  *
@@ -256,7 +267,6 @@
             Node = ObjPtr;
             goto DumpNode;
 
-
         case ACPI_DESC_TYPE_OPERAND:
 
             /* This is a ACPI OPERAND OBJECT */
@@ -268,12 +278,11 @@
                 return;
             }
 
-            AcpiUtDumpBuffer (ObjPtr, sizeof (ACPI_OPERAND_OBJECT), Display,
+            AcpiUtDebugDumpBuffer (ObjPtr, sizeof (ACPI_OPERAND_OBJECT), Display,
                 ACPI_UINT32_MAX);
             AcpiExDumpObjectDescriptor (ObjPtr, 1);
             break;
 
-
         case ACPI_DESC_TYPE_PARSER:
 
             /* This is a Parser Op object */
@@ -285,12 +294,11 @@
                 return;
             }
 
-            AcpiUtDumpBuffer (ObjPtr, sizeof (ACPI_PARSE_OBJECT), Display,
+            AcpiUtDebugDumpBuffer (ObjPtr, sizeof (ACPI_PARSE_OBJECT), Display,
                 ACPI_UINT32_MAX);
             AcpiDbDumpParserDescriptor ((ACPI_PARSE_OBJECT *) ObjPtr);
             break;
 
-
         default:
 
             /* Is not a recognizeable object */
@@ -303,7 +311,7 @@
 
             /* Just dump some memory */
 
-            AcpiUtDumpBuffer (ObjPtr, Size, Display, ACPI_UINT32_MAX);
+            AcpiUtDebugDumpBuffer (ObjPtr, Size, Display, ACPI_UINT32_MAX);
             break;
         }
 
@@ -340,7 +348,7 @@
         return;
     }
 
-    AcpiUtDumpBuffer ((void *) Node, sizeof (ACPI_NAMESPACE_NODE),
+    AcpiUtDebugDumpBuffer ((void *) Node, sizeof (ACPI_NAMESPACE_NODE),
         Display, ACPI_UINT32_MAX);
     AcpiExDumpNamespaceNode (Node, 1);
 
@@ -355,7 +363,7 @@
             return;
         }
 
-        AcpiUtDumpBuffer ((void *) ObjDesc, sizeof (ACPI_OPERAND_OBJECT),
+        AcpiUtDebugDumpBuffer ((void *) ObjDesc, sizeof (ACPI_OPERAND_OBJECT),
             Display, ACPI_UINT32_MAX);
         AcpiExDumpObjectDescriptor (ObjDesc, 1);
     }
@@ -437,6 +445,7 @@
         switch (OpInfo->Class)
         {
         case AML_CLASS_ARGUMENT:
+
             if (CountRemaining)
             {
                 NumRemainingOperands++;
@@ -446,11 +455,13 @@
             break;
 
         case AML_CLASS_UNKNOWN:
+
             /* Bad opcode or ASCII character */
 
             continue;
 
         default:
+
             if (CountRemaining)
             {
                 NumRemainingOperators++;
@@ -641,7 +652,7 @@
  *
  * FUNCTION:    AcpiDbDisplayObjectType
  *
- * PARAMETERS:  ObjectArg       - User entered NS node handle
+ * PARAMETERS:  Name            - User entered NS node handle or name
  *
  * RETURN:      None
  *
@@ -651,17 +662,21 @@
 
 void
 AcpiDbDisplayObjectType (
-    char                    *ObjectArg)
+    char                    *Name)
 {
-    ACPI_HANDLE             Handle;
+    ACPI_NAMESPACE_NODE     *Node;
     ACPI_DEVICE_INFO        *Info;
     ACPI_STATUS             Status;
     UINT32                  i;
 
 
-    Handle = ACPI_TO_POINTER (ACPI_STRTOUL (ObjectArg, NULL, 16));
+    Node = AcpiDbConvertToNode (Name);
+    if (!Node)
+    {
+        return;
+    }
 
-    Status = AcpiGetObjectInfo (Handle, &Info);
+    Status = AcpiGetObjectInfo (ACPI_CAST_PTR (ACPI_HANDLE, Node), &Info);
     if (ACPI_FAILURE (Status))
     {
         AcpiOsPrintf ("Could not get object info, %s\n",
@@ -669,18 +684,25 @@
         return;
     }
 
-    AcpiOsPrintf ("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n",
-        ACPI_FORMAT_UINT64 (Info->Address),
-        Info->CurrentStatus, Info->Flags);
-
-    AcpiOsPrintf ("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n",
-        Info->HighestDstates[0], Info->HighestDstates[1],
-        Info->HighestDstates[2], Info->HighestDstates[3]);
-
-    AcpiOsPrintf ("S0W-%2.2X S1W-%2.2X S2W-%2.2X S3W-%2.2X S4W-%2.2X\n",
-        Info->LowestDstates[0], Info->LowestDstates[1],
-        Info->LowestDstates[2], Info->LowestDstates[3],
-        Info->LowestDstates[4]);
+    if (Info->Valid & ACPI_VALID_ADR)
+    {
+        AcpiOsPrintf ("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n",
+            ACPI_FORMAT_UINT64 (Info->Address),
+            Info->CurrentStatus, Info->Flags);
+    }
+    if (Info->Valid & ACPI_VALID_SXDS)
+    {
+        AcpiOsPrintf ("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n",
+            Info->HighestDstates[0], Info->HighestDstates[1],
+            Info->HighestDstates[2], Info->HighestDstates[3]);
+    }
+    if (Info->Valid & ACPI_VALID_SXWS)
+    {
+        AcpiOsPrintf ("S0W-%2.2X S1W-%2.2X S2W-%2.2X S3W-%2.2X S4W-%2.2X\n",
+            Info->LowestDstates[0], Info->LowestDstates[1],
+            Info->LowestDstates[2], Info->LowestDstates[3],
+            Info->LowestDstates[4]);
+    }
 
     if (Info->Valid & ACPI_VALID_HID)
     {
@@ -690,6 +712,10 @@
     {
         AcpiOsPrintf ("UID: %s\n", Info->UniqueId.String);
     }
+    if (Info->Valid & ACPI_VALID_SUB)
+    {
+        AcpiOsPrintf ("SUB: %s\n", Info->SubsystemId.String);
+    }
     if (Info->Valid & ACPI_VALID_CID)
     {
         for (i = 0; i < Info->CompatibleIdList.Count; i++)
@@ -768,6 +794,7 @@
 }
 
 
+#if (!ACPI_REDUCED_HARDWARE)
 /*******************************************************************************
  *
  * FUNCTION:    AcpiDbDisplayGpes
@@ -789,10 +816,12 @@
     ACPI_GPE_EVENT_INFO     *GpeEventInfo;
     ACPI_GPE_REGISTER_INFO  *GpeRegisterInfo;
     const char              *GpeType;
+    ACPI_GPE_NOTIFY_INFO    *Notify;
     UINT32                  GpeIndex;
     UINT32                  Block = 0;
     UINT32                  i;
     UINT32                  j;
+    UINT32                  Count;
     char                    Buffer[80];
     ACPI_BUFFER             RetBuf;
     ACPI_STATUS             Status;
@@ -904,18 +933,33 @@
                     switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
                     {
                     case ACPI_GPE_DISPATCH_NONE:
+
                         AcpiOsPrintf ("NotUsed");
                         break;
+
                     case ACPI_GPE_DISPATCH_METHOD:
+
                         AcpiOsPrintf ("Method");
                         break;
                     case ACPI_GPE_DISPATCH_HANDLER:
+
                         AcpiOsPrintf ("Handler");
                         break;
+
                     case ACPI_GPE_DISPATCH_NOTIFY:
-                        AcpiOsPrintf ("Notify");
+
+                        Count = 0;
+                        Notify = GpeEventInfo->Dispatch.NotifyList;
+                        while (Notify)
+                        {
+                            Count++;
+                            Notify = Notify->Next;
+                        }
+                        AcpiOsPrintf ("Implicit Notify on %u devices", Count);
                         break;
+
                     default:
+
                         AcpiOsPrintf ("UNKNOWN: %X",
                             GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK);
                         break;
@@ -930,6 +974,7 @@
         GpeXruptInfo = GpeXruptInfo->Next;
     }
 }
+#endif /* !ACPI_REDUCED_HARDWARE */
 
 
 /*******************************************************************************
@@ -956,7 +1001,7 @@
 
     /* Operation region handlers */
 
-    AcpiOsPrintf ("\nOperation Region Handlers:\n");
+    AcpiOsPrintf ("\nOperation Region Handlers at the namespace root:\n");
 
     ObjDesc = AcpiNsGetAttachedObject (AcpiGbl_RootNode);
     if (ObjDesc)
@@ -971,7 +1016,7 @@
 
             while (HandlerObj)
             {
-                if (i == HandlerObj->AddressSpace.SpaceId)
+                if (AcpiGbl_SpaceIdList[i] == HandlerObj->AddressSpace.SpaceId)
                 {
                     AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING,
                         (HandlerObj->AddressSpace.HandlerFlags &
@@ -989,8 +1034,28 @@
 
         FoundHandler:;
         }
+
+        /* Find all handlers for user-defined SpaceIDs */
+
+        HandlerObj = ObjDesc->Device.Handler;
+        while (HandlerObj)
+        {
+            if (HandlerObj->AddressSpace.SpaceId >= ACPI_USER_REGION_BEGIN)
+            {
+                AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
+                    "User-defined ID", HandlerObj->AddressSpace.SpaceId);
+                AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING,
+                    (HandlerObj->AddressSpace.HandlerFlags &
+                        ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "User",
+                    HandlerObj->AddressSpace.Handler);
+            }
+
+            HandlerObj = HandlerObj->AddressSpace.Next;
+        }
     }
 
+#if (!ACPI_REDUCED_HARDWARE)
+
     /* Fixed event handlers */
 
     AcpiOsPrintf ("\nFixed Event Handlers:\n");
@@ -1009,6 +1074,8 @@
         }
     }
 
+#endif /* !ACPI_REDUCED_HARDWARE */
+
     /* Miscellaneous global handlers */
 
     AcpiOsPrintf ("\nMiscellaneous Global Handlers:\n");
@@ -1026,6 +1093,77 @@
             AcpiOsPrintf (ACPI_HANDLER_NOT_PRESENT_STRING, "None");
         }
     }
+
+
+    /* Other handlers that are installed throughout the namespace */
+
+    AcpiOsPrintf ("\nOperation Region Handlers for specific devices:\n");
+
+    (void) AcpiWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
+                ACPI_UINT32_MAX, AcpiDbDisplayNonRootHandlers,
+                NULL, NULL, NULL);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDbDisplayNonRootHandlers
+ *
+ * PARAMETERS:  ACPI_WALK_CALLBACK
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Display information about all handlers installed for a
+ *              device object.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiDbDisplayNonRootHandlers (
+    ACPI_HANDLE             ObjHandle,
+    UINT32                  NestingLevel,
+    void                    *Context,
+    void                    **ReturnValue)
+{
+    ACPI_NAMESPACE_NODE     *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle);
+    ACPI_OPERAND_OBJECT     *ObjDesc;
+    ACPI_OPERAND_OBJECT     *HandlerObj;
+    char                    *Pathname;
+
+
+    ObjDesc = AcpiNsGetAttachedObject (Node);
+    if (!ObjDesc)
+    {
+        return (AE_OK);
+    }
+
+    Pathname = AcpiNsGetExternalPathname (Node);
+    if (!Pathname)
+    {
+        return (AE_OK);
+    }
+
+    /* Display all handlers associated with this device */
+
+    HandlerObj = ObjDesc->Device.Handler;
+    while (HandlerObj)
+    {
+        AcpiOsPrintf (ACPI_PREDEFINED_PREFIX,
+            AcpiUtGetRegionName ((UINT8) HandlerObj->AddressSpace.SpaceId),
+            HandlerObj->AddressSpace.SpaceId);
+
+        AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING2,
+            (HandlerObj->AddressSpace.HandlerFlags &
+                ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "User",
+            HandlerObj->AddressSpace.Handler);
+
+        AcpiOsPrintf (" Device Name: %s (%p)\n", Pathname, Node);
+
+        HandlerObj = HandlerObj->AddressSpace.Next;
+    }
+
+    ACPI_FREE (Pathname);
+    return (AE_OK);
 }
 
 #endif /* ACPI_DEBUGGER */
--- a/sys/external/bsd/acpica/dist/debugger/dbexec.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbexec.c	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -54,7 +54,6 @@
 
 
 static ACPI_DB_METHOD_INFO          AcpiGbl_DbMethodInfo;
-#define DB_DEFAULT_PKG_ELEMENTS     33
 
 /* Local prototypes */
 
@@ -63,7 +62,7 @@
     ACPI_DB_METHOD_INFO     *Info,
     ACPI_BUFFER             *ReturnObj);
 
-static void
+static ACPI_STATUS
 AcpiDbExecuteSetup (
     ACPI_DB_METHOD_INFO     *Info);
 
@@ -82,299 +81,6 @@
     void                    *Context,
     void                    **ReturnValue);
 
-static ACPI_STATUS
-AcpiDbHexCharToValue (
-    int                     HexChar,
-    UINT8                   *ReturnValue);
-
-static ACPI_STATUS
-AcpiDbConvertToPackage (
-    char                    *String,
-    ACPI_OBJECT             *Object);
-
-static ACPI_STATUS
-AcpiDbConvertToObject (
-    ACPI_OBJECT_TYPE        Type,
-    char                    *String,
-    ACPI_OBJECT             *Object);
-
-static void
-AcpiDbDeleteObjects (
-    UINT32                  Count,
-    ACPI_OBJECT             *Objects);
-
-
-/*******************************************************************************
- *
- * FUNCTION:    AcpiDbHexCharToValue
- *
- * PARAMETERS:  HexChar             - Ascii Hex digit, 0-9|a-f|A-F
- *              ReturnValue         - Where the converted value is returned
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Convert a single hex character to a 4-bit number (0-16).
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-AcpiDbHexCharToValue (
-    int                     HexChar,
-    UINT8                   *ReturnValue)
-{
-    UINT8                   Value;
-
-
-    /* Digit must be ascii [0-9a-fA-F] */
-
-    if (!ACPI_IS_XDIGIT (HexChar))
-    {
-        return (AE_BAD_HEX_CONSTANT);
-    }
-
-    if (HexChar <= 0x39)
-    {
-        Value = (UINT8) (HexChar - 0x30);
-    }
-    else
-    {
-        Value = (UINT8) (ACPI_TOUPPER (HexChar) - 0x37);
-    }
-
-    *ReturnValue = Value;
-    return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    AcpiDbHexByteToBinary
- *
- * PARAMETERS:  HexByte             - Double hex digit (0x00 - 0xFF) in format:
- *                                    HiByte then LoByte.
- *              ReturnValue         - Where the converted value is returned
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Convert two hex characters to an 8 bit number (0 - 255).
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-AcpiDbHexByteToBinary (
-    char                    *HexByte,
-    UINT8                   *ReturnValue)
-{
-    UINT8                   Local0;
-    UINT8                   Local1;
-    ACPI_STATUS             Status;
-
-
-    /* High byte */
-
-    Status = AcpiDbHexCharToValue (HexByte[0], &Local0);
-    if (ACPI_FAILURE (Status))
-    {
-        return (Status);
-    }
-
-    /* Low byte */
-
-    Status = AcpiDbHexCharToValue (HexByte[1], &Local1);
-    if (ACPI_FAILURE (Status))
-    {
-        return (Status);
-    }
-
-    *ReturnValue = (UINT8) ((Local0 << 4) | Local1);
-    return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    AcpiDbConvertToBuffer
- *
- * PARAMETERS:  String              - Input string to be converted
- *              Object              - Where the buffer object is returned
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Convert a string to a buffer object. String is treated a list
- *              of buffer elements, each separated by a space or comma.
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-AcpiDbConvertToBuffer (
-    char                    *String,
-    ACPI_OBJECT             *Object)
-{
-    UINT32                  i;
-    UINT32                  j;
-    UINT32                  Length;
-    UINT8                   *Buffer;
-    ACPI_STATUS             Status;
-
-
-    /* Generate the final buffer length */
-
-    for (i = 0, Length = 0; String[i];)
-    {
-        i+=2;
-        Length++;
-
-        while (String[i] &&
-              ((String[i] == ',') || (String[i] == ' ')))
-        {
-            i++;
-        }
-    }
-
-    Buffer = ACPI_ALLOCATE (Length);
-    if (!Buffer)
-    {
-        return (AE_NO_MEMORY);
-    }
-
-    /* Convert the command line bytes to the buffer */
-
-    for (i = 0, j = 0; String[i];)
-    {
-        Status = AcpiDbHexByteToBinary (&String[i], &Buffer[j]);
-        if (ACPI_FAILURE (Status))
-        {
-            ACPI_FREE (Buffer);
-            return (Status);
-        }
-
-        j++;
-        i+=2;
-        while (String[i] &&
-              ((String[i] == ',') || (String[i] == ' ')))
-        {
-            i++;
-        }
-    }
-
-    Object->Type = ACPI_TYPE_BUFFER;
-    Object->Buffer.Pointer = Buffer;
-    Object->Buffer.Length = Length;
-    return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    AcpiDbConvertToPackage
- *
- * PARAMETERS:  String              - Input string to be converted
- *              Object              - Where the package object is returned
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Convert a string to a package object. Handles nested packages
- *              via recursion with AcpiDbConvertToObject.
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-AcpiDbConvertToPackage (
-    char                    *String,
-    ACPI_OBJECT             *Object)
-{
-    char                    *This;
-    char                    *Next;
-    UINT32                  i;
-    ACPI_OBJECT_TYPE        Type;
-    ACPI_OBJECT             *Elements;
-    ACPI_STATUS             Status;
-
-
-    Elements = ACPI_ALLOCATE_ZEROED (
-        DB_DEFAULT_PKG_ELEMENTS * sizeof (ACPI_OBJECT));
-
-    This = String;
-    for (i = 0; i < (DB_DEFAULT_PKG_ELEMENTS - 1); i++)
-    {
-        This = AcpiDbGetNextToken (This, &Next, &Type);
-        if (!This)
-        {
-            break;
-        }
-
-        /* Recursive call to convert each package element */
-
-        Status = AcpiDbConvertToObject (Type, This, &Elements[i]);
-        if (ACPI_FAILURE (Status))
-        {
-            AcpiDbDeleteObjects (i + 1, Elements);
-            ACPI_FREE (Elements);
-            return (Status);
-        }
-
-        This = Next;
-    }
-
-    Object->Type = ACPI_TYPE_PACKAGE;
-    Object->Package.Count = i;
-    Object->Package.Elements = Elements;
-    return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    AcpiDbConvertToObject
- *
- * PARAMETERS:  Type                - Object type as determined by parser
- *              String              - Input string to be converted
- *              Object              - Where the new object is returned
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Convert a typed and tokenized string to an ACPI_OBJECT. Typing:
- *              1) String objects were surrounded by quotes.
- *              2) Buffer objects were surrounded by parentheses.
- *              3) Package objects were surrounded by brackets "[]".
- *              4) All standalone tokens are treated as integers.
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-AcpiDbConvertToObject (
-    ACPI_OBJECT_TYPE        Type,
-    char                    *String,
-    ACPI_OBJECT             *Object)
-{
-    ACPI_STATUS             Status = AE_OK;
-
-
-    switch (Type)
-    {
-    case ACPI_TYPE_STRING:
-        Object->Type = ACPI_TYPE_STRING;
-        Object->String.Pointer = String;
-        Object->String.Length = (UINT32) ACPI_STRLEN (String);
-        break;
-
-    case ACPI_TYPE_BUFFER:
-        Status = AcpiDbConvertToBuffer (String, Object);
-        break;
-
-    case ACPI_TYPE_PACKAGE:
-        Status = AcpiDbConvertToPackage (String, Object);
-        break;
-
-    default:
-        Object->Type = ACPI_TYPE_INTEGER;
-        Status = AcpiUtStrtoul64 (String, 16, &Object->Integer.Value);
-        break;
-    }
-
-    return (Status);
-}
-
 
 /*******************************************************************************
  *
@@ -390,7 +96,7 @@
  *
  ******************************************************************************/
 
-static void
+void
 AcpiDbDeleteObjects (
     UINT32                  Count,
     ACPI_OBJECT             *Objects)
@@ -403,6 +109,7 @@
         switch (Objects[i].Type)
         {
         case ACPI_TYPE_BUFFER:
+
             ACPI_FREE (Objects[i].Buffer.Pointer);
             break;
 
@@ -419,6 +126,7 @@
             break;
 
         default:
+
             break;
         }
     }
@@ -445,9 +153,7 @@
 {
     ACPI_STATUS             Status;
     ACPI_OBJECT_LIST        ParamObjects;
-    ACPI_OBJECT             Params[ACPI_METHOD_NUM_ARGS];
-    ACPI_HANDLE             Handle;
-    ACPI_DEVICE_INFO        *ObjInfo;
+    ACPI_OBJECT             Params[ACPI_DEBUGGER_MAX_ARGS + 1];
     UINT32                  i;
 
 
@@ -459,86 +165,30 @@
         AcpiOsPrintf ("Warning: debug output is not enabled!\n");
     }
 
-    /* Get the NS node, determines existence also */
-
-    Status = AcpiGetHandle (NULL, Info->Pathname, &Handle);
-    if (ACPI_FAILURE (Status))
-    {
-        return_ACPI_STATUS (Status);
-    }
-
-    /* Get the object info for number of method parameters */
+    ParamObjects.Count = 0;
+    ParamObjects.Pointer = NULL;
 
-    Status = AcpiGetObjectInfo (Handle, &ObjInfo);
-    if (ACPI_FAILURE (Status))
-    {
-        return_ACPI_STATUS (Status);
-    }
+    /* Pass through any command-line arguments */
 
-    ParamObjects.Pointer = NULL;
-    ParamObjects.Count   = 0;
-
-    if (ObjInfo->Type == ACPI_TYPE_METHOD)
+    if (Info->Args && Info->Args[0])
     {
-        /* Are there arguments to the method? */
+        /* Get arguments passed on the command line */
 
-        i = 0;
-        if (Info->Args && Info->Args[0])
+        for (i = 0; (Info->Args[i] && *(Info->Args[i])); i++)
         {
-            /* Get arguments passed on the command line */
+            /* Convert input string (token) to an actual ACPI_OBJECT */
 
-            for (; Info->Args[i] &&
-                (i < ACPI_METHOD_NUM_ARGS) &&
-                (i < ObjInfo->ParamCount);
-                i++)
+            Status = AcpiDbConvertToObject (Info->Types[i],
+                Info->Args[i], &Params[i]);
+            if (ACPI_FAILURE (Status))
             {
-                /* Convert input string (token) to an actual ACPI_OBJECT */
-
-                Status = AcpiDbConvertToObject (Info->Types[i],
-                    Info->Args[i], &Params[i]);
-                if (ACPI_FAILURE (Status))
-                {
-                    ACPI_EXCEPTION ((AE_INFO, Status,
-                        "While parsing method arguments"));
-                    goto Cleanup;
-                }
+                ACPI_EXCEPTION ((AE_INFO, Status,
+                    "While parsing method arguments"));
+                goto Cleanup;
             }
         }
 
-        /* Create additional "default" parameters as needed */
-
-        if (i < ObjInfo->ParamCount)
-        {
-            AcpiOsPrintf ("Adding %u arguments containing default values\n",
-                ObjInfo->ParamCount - i);
-
-            for (; i < ObjInfo->ParamCount; i++)
-            {
-                switch (i)
-                {
-                case 0:
-
-                    Params[0].Type           = ACPI_TYPE_INTEGER;
-                    Params[0].Integer.Value  = 0x01020304;
-                    break;
-
-                case 1:
-
-                    Params[1].Type           = ACPI_TYPE_STRING;
-                    Params[1].String.Length  = 12;
-                    Params[1].String.Pointer = __UNCONST("AML Debugger");
-                    break;
-
-                default:
-
-                    Params[i].Type           = ACPI_TYPE_INTEGER;
-                    Params[i].Integer.Value  = i * (UINT64) 0x1000;
-                    break;
-                }
-            }
-        }
-
-        ParamObjects.Count = ObjInfo->ParamCount;
+        ParamObjects.Count = i;
         ParamObjects.Pointer = Params;
     }
 
@@ -550,8 +200,8 @@
     /* Do the actual method execution */
 
     AcpiGbl_MethodExecuting = TRUE;
-    Status = AcpiEvaluateObject (NULL,
-        Info->Pathname, &ParamObjects, ReturnObj);
+    Status = AcpiEvaluateObject (NULL, Info->Pathname,
+        &ParamObjects, ReturnObj);
 
     AcpiGbl_CmSingleStep = FALSE;
     AcpiGbl_MethodExecuting = FALSE;
@@ -570,9 +220,7 @@
     }
 
 Cleanup:
-    AcpiDbDeleteObjects (ObjInfo->ParamCount, Params);
-    ACPI_FREE (ObjInfo);
-
+    AcpiDbDeleteObjects (ParamObjects.Count, Params);
     return_ACPI_STATUS (Status);
 }
 
@@ -589,10 +237,15 @@
  *
  ******************************************************************************/
 
-static void
+static ACPI_STATUS
 AcpiDbExecuteSetup (
     ACPI_DB_METHOD_INFO     *Info)
 {
+    ACPI_STATUS             Status;
+
+
+    ACPI_FUNCTION_NAME (DbExecuteSetup);
+
 
     /* Catenate the current scope to the supplied name */
 
@@ -600,14 +253,25 @@
     if ((Info->Name[0] != '\\') &&
         (Info->Name[0] != '/'))
     {
-        ACPI_STRCAT (Info->Pathname, AcpiGbl_DbScopeBuf);
+        if (AcpiUtSafeStrcat (Info->Pathname, sizeof (Info->Pathname),
+            AcpiGbl_DbScopeBuf))
+        {
+            Status = AE_BUFFER_OVERFLOW;
+            goto ErrorExit;
+        }
     }
 
-    ACPI_STRCAT (Info->Pathname, Info->Name);
+    if (AcpiUtSafeStrcat (Info->Pathname, sizeof (Info->Pathname),
+        Info->Name))
+    {
+        Status = AE_BUFFER_OVERFLOW;
+        goto ErrorExit;
+    }
+
     AcpiDbPrepNamestring (Info->Pathname);
 
     AcpiDbSetOutputDestination (ACPI_DB_DUPLICATE_OUTPUT);
-    AcpiOsPrintf ("Executing %s\n", Info->Pathname);
+    AcpiOsPrintf ("Evaluating %s\n", Info->Pathname);
 
     if (Info->Flags & EX_SINGLE_STEP)
     {
@@ -621,6 +285,13 @@
 
         AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT);
     }
+
+    return (AE_OK);
+
+ErrorExit:
+
+    ACPI_EXCEPTION ((AE_INFO, Status, "During setup for method execution"));
+    return (Status);
 }
 
 
@@ -674,7 +345,7 @@
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Execute a control method.  Name is relative to the current
+ * DESCRIPTION: Execute a control method. Name is relative to the current
  *              scope.
  *
  ******************************************************************************/
@@ -701,7 +372,7 @@
     ReturnObj.Pointer = NULL;
     ReturnObj.Length = ACPI_ALLOCATE_BUFFER;
 
-    AcpiNsPrintNodePathname (Node, "Execute");
+    AcpiNsPrintNodePathname (Node, "Evaluating");
 
     /* Do the actual method execution */
 
@@ -710,7 +381,7 @@
 
     Status = AcpiEvaluateObject (Node, NULL, NULL, &ReturnObj);
 
-    AcpiOsPrintf ("[%4.4s] returned %s\n", AcpiUtGetNodeName (Node),
+    AcpiOsPrintf ("Evaluation of [%4.4s] returned %s\n", AcpiUtGetNodeName (Node),
             AcpiFormatException (Status));
     AcpiGbl_MethodExecuting = FALSE;
 
@@ -728,7 +399,7 @@
  *
  * RETURN:      None
  *
- * DESCRIPTION: Execute a control method.  Name is relative to the current
+ * DESCRIPTION: Execute a control method. Name is relative to the current
  *              scope.
  *
  ******************************************************************************/
@@ -781,8 +452,21 @@
         ReturnObj.Pointer = NULL;
         ReturnObj.Length = ACPI_ALLOCATE_BUFFER;
 
-        AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
-        Status = AcpiDbExecuteMethod (&AcpiGbl_DbMethodInfo, &ReturnObj);
+        Status = AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
+        if (ACPI_FAILURE (Status))
+        {
+            ACPI_FREE (NameString);
+            return;
+        }
+
+        /* Get the NS node, determines existence also */
+
+        Status = AcpiGetHandle (NULL, AcpiGbl_DbMethodInfo.Pathname,
+            &AcpiGbl_DbMethodInfo.Method);
+        if (ACPI_SUCCESS (Status))
+        {
+            Status = AcpiDbExecuteMethod (&AcpiGbl_DbMethodInfo, &ReturnObj);
+        }
         ACPI_FREE (NameString);
     }
 
@@ -792,7 +476,6 @@
      */
     AcpiOsSleep ((UINT64) 10);
 
-
 #ifdef ACPI_DEBUG_OUTPUT
 
     /* Memory allocation tracking */
@@ -803,14 +486,14 @@
 
     if (Allocations > 0)
     {
-        AcpiOsPrintf ("Outstanding: 0x%X allocations after execution\n",
-                        Allocations);
+        AcpiOsPrintf ("0x%X Outstanding allocations after evaluation of %s\n",
+                        Allocations, AcpiGbl_DbMethodInfo.Pathname);
     }
 #endif
 
     if (ACPI_FAILURE (Status))
     {
-        AcpiOsPrintf ("Execution of %s failed with status %s\n",
+        AcpiOsPrintf ("Evaluation of %s failed with status %s\n",
             AcpiGbl_DbMethodInfo.Pathname, AcpiFormatException (Status));
     }
     else
@@ -819,14 +502,23 @@
 
         if (ReturnObj.Length)
         {
-            AcpiOsPrintf ("Execution of %s returned object %p Buflen %X\n",
+            AcpiOsPrintf (
+                "Evaluation of %s returned object %p, external buffer length %X\n",
                 AcpiGbl_DbMethodInfo.Pathname, ReturnObj.Pointer,
                 (UINT32) ReturnObj.Length);
             AcpiDbDumpExternalObject (ReturnObj.Pointer, 1);
+
+            /* Dump a _PLD buffer if present */
+
+            if (ACPI_COMPARE_NAME ((ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
+                    AcpiGbl_DbMethodInfo.Method)->Name.Ascii), METHOD_NAME__PLD))
+            {
+                AcpiDbDumpPldBuffer (ReturnObj.Pointer);
+            }
         }
         else
         {
-            AcpiOsPrintf ("No return object from execution of %s\n",
+            AcpiOsPrintf ("No object was returned from evaluation of %s\n",
                 AcpiGbl_DbMethodInfo.Pathname);
         }
     }
@@ -843,7 +535,7 @@
  *
  * RETURN:      None
  *
- * DESCRIPTION: Debugger execute thread.  Waits for a command line, then
+ * DESCRIPTION: Debugger execute thread. Waits for a command line, then
  *              simply dispatches it.
  *
  ******************************************************************************/
@@ -872,8 +564,8 @@
 
     if (Info->InitArgs)
     {
-        AcpiDbUInt32ToHexString (Info->NumCreated, Info->IndexOfThreadStr);
-        AcpiDbUInt32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr);
+        AcpiDbUint32ToHexString (Info->NumCreated, Info->IndexOfThreadStr);
+        AcpiDbUint32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr);
     }
 
     if (Info->Threads && (Info->NumCreated < Info->NumThreads))
@@ -897,7 +589,7 @@
         Status = AcpiDbExecuteMethod (&LocalInfo, &ReturnObj);
         if (ACPI_FAILURE (Status))
         {
-            AcpiOsPrintf ("%s During execution of %s at iteration %X\n",
+            AcpiOsPrintf ("%s During evaluation of %s at iteration %X\n",
                 AcpiFormatException (Status), Info->Pathname, i);
             if (Status == AE_ABORT_METHOD)
             {
@@ -908,12 +600,12 @@
 #if 0
         if ((i % 100) == 0)
         {
-            AcpiOsPrintf ("%u executions, Thread 0x%x\n", i, AcpiOsGetThreadId ());
+            AcpiOsPrintf ("%u loops, Thread 0x%x\n", i, AcpiOsGetThreadId ());
         }
 
         if (ReturnObj.Length)
         {
-            AcpiOsPrintf ("Execution of %s returned object %p Buflen %X\n",
+            AcpiOsPrintf ("Evaluation of %s returned object %p Buflen %X\n",
                 Info->Pathname, ReturnObj.Pointer, (UINT32) ReturnObj.Length);
             AcpiDbDumpExternalObject (ReturnObj.Pointer, 1);
         }
@@ -1063,9 +755,24 @@
     AcpiGbl_DbMethodInfo.ArgTypes[1] = ACPI_TYPE_INTEGER;
     AcpiGbl_DbMethodInfo.ArgTypes[2] = ACPI_TYPE_INTEGER;
 
-    AcpiDbUInt32ToHexString (NumThreads, AcpiGbl_DbMethodInfo.NumThreadsStr);
+    AcpiDbUint32ToHexString (NumThreads, AcpiGbl_DbMethodInfo.NumThreadsStr);
+
+    Status = AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
+    if (ACPI_FAILURE (Status))
+    {
+        goto CleanupAndExit;
+    }
 
-    AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
+    /* Get the NS node, determines existence also */
+
+    Status = AcpiGetHandle (NULL, AcpiGbl_DbMethodInfo.Pathname,
+        &AcpiGbl_DbMethodInfo.Method);
+    if (ACPI_FAILURE (Status))
+    {
+        AcpiOsPrintf ("%s Could not get handle for %s\n",
+            AcpiFormatException (Status), AcpiGbl_DbMethodInfo.Pathname);
+        goto CleanupAndExit;
+    }
 
     /* Create the threads */
 
@@ -1090,6 +797,8 @@
     AcpiOsPrintf ("All threads (%X) have completed\n", NumThreads);
     AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
 
+CleanupAndExit:
+
     /* Cleanup and exit */
 
     (void) AcpiOsDeleteSemaphore (MainThreadGate);
@@ -1101,5 +810,3 @@
 }
 
 #endif /* ACPI_DEBUGGER */
-
-
--- a/sys/external/bsd/acpica/dist/debugger/dbinput.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbinput.c	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -67,8 +67,18 @@
     void);
 
 static void
+AcpiDbDisplayCommandInfo (
+    char                    *Command,
+    BOOLEAN                 DisplayAll);
+
+static void
 AcpiDbDisplayHelp (
-    void);
+    char                    *Command);
+
+static BOOLEAN
+AcpiDbMatchCommandHelp (
+    char                        *Command,
+    const ACPI_DB_COMMAND_HELP  *Help);
 
 
 /*
@@ -90,8 +100,10 @@
     CMD_CLOSE,
     CMD_DEBUG,
     CMD_DISASSEMBLE,
+    CMD_DISASM,
     CMD_DUMP,
     CMD_ENABLEACPI,
+    CMD_EVALUATE,
     CMD_EVENT,
     CMD_EXECUTE,
     CMD_EXIT,
@@ -116,21 +128,24 @@
     CMD_METHODS,
     CMD_NAMESPACE,
     CMD_NOTIFY,
-    CMD_OBJECT,
+    CMD_OBJECTS,
     CMD_OPEN,
     CMD_OSI,
     CMD_OWNER,
+    CMD_PATHS,
     CMD_PREDEFINED,
     CMD_PREFIX,
     CMD_QUIT,
     CMD_REFERENCES,
     CMD_RESOURCES,
     CMD_RESULTS,
+    CMD_SCI,
     CMD_SET,
     CMD_SLEEP,
     CMD_STATS,
     CMD_STOP,
     CMD_TABLES,
+    CMD_TEMPLATE,
     CMD_TERMINATE,
     CMD_THREADS,
     CMD_TRACE,
@@ -144,7 +159,7 @@
 
 /* Second parameter is the required argument count */
 
-static const COMMAND_INFO       AcpiGbl_DbCommands[] =
+static const ACPI_DB_COMMAND_INFO   AcpiGbl_DbCommands[] =
 {
     {"<NOT FOUND>",  0},
     {"<NULL>",       0},
@@ -158,8 +173,10 @@
     {"CLOSE",        0},
     {"DEBUG",        1},
     {"DISASSEMBLE",  1},
+    {"DISASM",       1},
     {"DUMP",         1},
     {"ENABLEACPI",   0},
+    {"EVALUATE",     1},
     {"EVENT",        1},
     {"EXECUTE",      1},
     {"EXIT",         0},
@@ -184,21 +201,24 @@
     {"METHODS",      0},
     {"NAMESPACE",    0},
     {"NOTIFY",       2},
-    {"OBJECT",       1},
+    {"OBJECTS",      1},
     {"OPEN",         1},
     {"OSI",          0},
     {"OWNER",        1},
+    {"PATHS",        0},
     {"PREDEFINED",   0},
     {"PREFIX",       0},
     {"QUIT",         0},
     {"REFERENCES",   1},
-    {"RESOURCES",    1},
+    {"RESOURCES",    0},
     {"RESULTS",      0},
+    {"SCI",          0},
     {"SET",          3},
-    {"SLEEP",        1},
-    {"STATS",        0},
+    {"SLEEP",        0},
+    {"STATS",        1},
     {"STOP",         0},
     {"TABLES",       0},
+    {"TEMPLATE",     1},
     {"TERMINATE",    0},
     {"THREADS",      3},
     {"TRACE",        1},
@@ -208,99 +228,233 @@
     {NULL,           0}
 };
 
+/*
+ * Help for all debugger commands. First argument is the number of lines
+ * of help to output for the command.
+ */
+static const ACPI_DB_COMMAND_HELP   AcpiGbl_DbCommandHelp[] =
+{
+    {0, "\nGeneral-Purpose Commands:",         "\n"},
+    {1, "  Allocations",                       "Display list of current memory allocations\n"},
+    {2, "  Dump <Address>|<Namepath>",         "\n"},
+    {0, "       [Byte|Word|Dword|Qword]",      "Display ACPI objects or memory\n"},
+    {1, "  EnableAcpi",                        "Enable ACPI (hardware) mode\n"},
+    {1, "  Handlers",                          "Info about global handlers\n"},
+    {1, "  Help [Command]",                    "This help screen or individual command\n"},
+    {1, "  History",                           "Display command history buffer\n"},
+    {1, "  Level <DebugLevel>] [console]",     "Get/Set debug level for file or console\n"},
+    {1, "  Locks",                             "Current status of internal mutexes\n"},
+    {1, "  Osi [Install|Remove <name>]",       "Display or modify global _OSI list\n"},
+    {1, "  Quit or Exit",                      "Exit this command\n"},
+    {9, "  Stats [Allocations|Memory|Misc|",   "\n"},
+    {1, "      Objects|Sizes|Stack|Tables]",   "Display namespace and memory statistics\n"},
+    {1, "     Allocations",                    "Display list of current memory allocations\n"},
+    {1, "     Memory",                         "Dump internal memory lists\n"},
+    {1, "     Misc",                           "Namespace search and mutex stats\n"},
+    {1, "     Objects",                        "Summary of namespace objects\n"},
+    {1, "     Sizes",                          "Sizes for each of the internal objects\n"},
+    {1, "     Stack",                          "Display CPU stack usage\n"},
+    {1, "     Tables",                         "Info about current ACPI table(s)\n"},
+    {1, "  Tables",                            "Display info about loaded ACPI tables\n"},
+    {1, "  Unload <Namepath>",                 "Unload an ACPI table via namespace object\n"},
+    {1, "  ! <CommandNumber>",                 "Execute command from history buffer\n"},
+    {1, "  !!",                                "Execute last command again\n"},
+
+    {0, "\nNamespace Access Commands:",        "\n"},
+    {1, "  Businfo",                           "Display system bus info\n"},
+    {1, "  Disassemble <Method>",              "Disassemble a control method\n"},
+    {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, "  Namespace [Object] [Depth]",        "Display loaded namespace tree/subtree\n"},
+    {1, "  Notify <Object> <Value>",           "Send a notification on Object\n"},
+    {1, "  Objects <ObjectType>",              "Display all objects of the given type\n"},
+    {1, "  Owner <OwnerId> [Depth]",           "Display loaded namespace by object owner\n"},
+    {1, "  Paths",                             "Display full pathnames of namespace objects\n"},
+    {1, "  Predefined",                        "Check all predefined names\n"},
+    {1, "  Prefix [<NamePath>]",               "Set or Get current execution prefix\n"},
+    {1, "  References <Addr>",                 "Find all references to object at addr\n"},
+    {1, "  Resources [DeviceName]",            "Display Device resources (no arg = all devices)\n"},
+    {1, "  Set N <NamedObject> <Value>",       "Set value for named integer\n"},
+    {1, "  Template <Object>",                 "Format/dump a Buffer/ResourceTemplate\n"},
+    {1, "  Terminate",                         "Delete namespace and all internal objects\n"},
+    {1, "  Type <Object>",                     "Display object type\n"},
+
+    {0, "\nControl Method Execution Commands:","\n"},
+    {1, "  Arguments (or Args)",               "Display method arguments\n"},
+    {1, "  Breakpoint <AmlOffset>",            "Set an AML execution breakpoint\n"},
+    {1, "  Call",                              "Run to next control method invocation\n"},
+    {1, "  Debug <Namepath> [Arguments]",      "Single Step a control method\n"},
+    {6, "  Evaluate",                          "Synonym for Execute\n"},
+    {5, "  Execute <Namepath> [Arguments]",    "Execute control method\n"},
+    {1, "     Hex Integer",                    "Integer method argument\n"},
+    {1, "     \"Ascii String\"",               "String method argument\n"},
+    {1, "     (Hex Byte List)",                "Buffer method argument\n"},
+    {1, "     [Package Element List]",         "Package method argument\n"},
+    {1, "  Go",                                "Allow method to run to completion\n"},
+    {1, "  Information",                       "Display info about the current method\n"},
+    {1, "  Into",                              "Step into (not over) a method call\n"},
+    {1, "  List [# of Aml Opcodes]",           "Display method ASL statements\n"},
+    {1, "  Locals",                            "Display method local variables\n"},
+    {1, "  Results",                           "Display method result stack\n"},
+    {1, "  Set <A|L> <#> <Value>",             "Set method data (Arguments/Locals)\n"},
+    {1, "  Stop",                              "Terminate control method\n"},
+    {1, "  Thread <Threads><Loops><NamePath>", "Spawn threads to execute method(s)\n"},
+    {1, "  Trace <method name>",               "Trace method execution\n"},
+    {1, "  Tree",                              "Display control method calling tree\n"},
+    {1, "  <Enter>",                           "Single step next AML opcode (over calls)\n"},
+
+    {0, "\nHardware Related Commands:",         "\n"},
+    {1, "  Event <F|G> <Value>",               "Generate AcpiEvent (Fixed/GPE)\n"},
+    {1, "  Gpe <GpeNum> <GpeBlock>",           "Simulate a GPE\n"},
+    {1, "  Gpes",                              "Display info on all GPEs\n"},
+    {1, "  Sci",                               "Generate an SCI\n"},
+    {1, "  Sleep [SleepState]",                "Simulate sleep/wake sequence(s) (0-5)\n"},
+
+    {0, "\nFile I/O Commands:",                "\n"},
+    {1, "  Close",                             "Close debug output file\n"},
+    {1, "  Load <Input Filename>",             "Load ACPI table from a file\n"},
+    {1, "  Open <Output Filename>",            "Open a file for debug output\n"},
+    {0, NULL, NULL}
+};
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDbMatchCommandHelp
+ *
+ * PARAMETERS:  Command             - Command string to match
+ *              Help                - Help table entry to attempt match
+ *
+ * RETURN:      TRUE if command matched, FALSE otherwise
+ *
+ * DESCRIPTION: Attempt to match a command in the help table in order to
+ *              print help information for a single command.
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+AcpiDbMatchCommandHelp (
+    char                        *Command,
+    const ACPI_DB_COMMAND_HELP  *Help)
+{
+    char                    *Invocation = Help->Invocation;
+    UINT32                  LineCount;
+
+
+    /* Valid commands in the help table begin with a couple of spaces */
+
+    if (*Invocation != ' ')
+    {
+        return (FALSE);
+    }
+
+    while (*Invocation == ' ')
+    {
+        Invocation++;
+    }
+
+    /* Match command name (full command or substring) */
+
+    while ((*Command) && (*Invocation) && (*Invocation != ' '))
+    {
+        if (ACPI_TOLOWER (*Command) != ACPI_TOLOWER (*Invocation))
+        {
+            return (FALSE);
+        }
+
+        Invocation++;
+        Command++;
+    }
+
+    /* Print the appropriate number of help lines */
+
+    LineCount = Help->LineCount;
+    while (LineCount)
+    {
+        AcpiOsPrintf ("%-38s : %s", Help->Invocation, Help->Description);
+        Help++;
+        LineCount--;
+    }
+
+    return (TRUE);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDbDisplayCommandInfo
+ *
+ * PARAMETERS:  Command             - Command string to match
+ *              DisplayAll          - Display all matching commands, or just
+ *                                    the first one (substring match)
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Display help information for a Debugger command.
+ *
+ ******************************************************************************/
+
+static void
+AcpiDbDisplayCommandInfo (
+    char                    *Command,
+    BOOLEAN                 DisplayAll)
+{
+    const ACPI_DB_COMMAND_HELP  *Next;
+    BOOLEAN                     Matched;
+
+
+    Next = AcpiGbl_DbCommandHelp;
+    while (Next->Invocation)
+    {
+        Matched = AcpiDbMatchCommandHelp (Command, Next);
+        if (!DisplayAll && Matched)
+        {
+            return;
+        }
+
+        Next++;
+    }
+}
+
 
 /*******************************************************************************
  *
  * FUNCTION:    AcpiDbDisplayHelp
  *
- * PARAMETERS:  None
+ * PARAMETERS:  Command             - Optional command string to display help.
+ *                                    if not specified, all debugger command
+ *                                    help strings are displayed
  *
  * RETURN:      None
  *
- * DESCRIPTION: Print a usage message.
+ * DESCRIPTION: Display help for a single debugger command, or all of them.
  *
  ******************************************************************************/
 
 static void
 AcpiDbDisplayHelp (
-    void)
+    char                    *Command)
 {
+    const ACPI_DB_COMMAND_HELP  *Next = AcpiGbl_DbCommandHelp;
 
-    AcpiOsPrintf ("\nGeneral-Purpose Commands:\n");
-    AcpiOsPrintf ("  Allocations                         Display list of current memory allocations\n");
-    AcpiOsPrintf ("  Dump <Address>|<Namepath>\n");
-    AcpiOsPrintf ("       [Byte|Word|Dword|Qword]        Display ACPI objects or memory\n");
-    AcpiOsPrintf ("  EnableAcpi                          Enable ACPI (hardware) mode\n");
-    AcpiOsPrintf ("  Handlers                            Info about global handlers\n");
-    AcpiOsPrintf ("  Help                                This help screen\n");
-    AcpiOsPrintf ("  History                             Display command history buffer\n");
-    AcpiOsPrintf ("  Level [<DebugLevel>] [console]      Get/Set debug level for file or console\n");
-    AcpiOsPrintf ("  Locks                               Current status of internal mutexes\n");
-    AcpiOsPrintf ("  Osi [Install|Remove <name>]         Display or modify global _OSI list\n");
-    AcpiOsPrintf ("  Quit or Exit                        Exit this command\n");
-    AcpiOsPrintf ("  Stats [Allocations|Memory|Misc|\n");
-    AcpiOsPrintf ("        Objects|Sizes|Stack|Tables]   Display namespace and memory statistics\n");
-    AcpiOsPrintf ("     Allocations                      Display list of current memory allocations\n");
-    AcpiOsPrintf ("     Memory                           Dump internal memory lists\n");
-    AcpiOsPrintf ("     Misc                             Namespace search and mutex stats\n");
-    AcpiOsPrintf ("     Objects                          Summary of namespace objects\n");
-    AcpiOsPrintf ("     Sizes                            Sizes for each of the internal objects\n");
-    AcpiOsPrintf ("     Stack                            Display CPU stack usage\n");
-    AcpiOsPrintf ("     Tables                           Info about current ACPI table(s)\n");
-    AcpiOsPrintf ("  Tables                              Display info about loaded ACPI tables\n");
-    AcpiOsPrintf ("  Unload <TableSig> [Instance]        Unload an ACPI table\n");
-    AcpiOsPrintf ("  ! <CommandNumber>                   Execute command from history buffer\n");
-    AcpiOsPrintf ("  !!                                  Execute last command again\n");
+
+    if (!Command)
+    {
+        /* No argument to help, display help for all commands */
 
-    AcpiOsPrintf ("\nNamespace Access Commands:\n");
-    AcpiOsPrintf ("  Businfo                             Display system bus info\n");
-    AcpiOsPrintf ("  Disassemble <Method>                Disassemble a control method\n");
-    AcpiOsPrintf ("  Event <F|G> <Value>                 Generate AcpiEvent (Fixed/GPE)\n");
-    AcpiOsPrintf ("  Find <AcpiName>  (? is wildcard)    Find ACPI name(s) with wildcards\n");
-    AcpiOsPrintf ("  Gpe <GpeNum> <GpeBlock>             Simulate a GPE\n");
-    AcpiOsPrintf ("  Gpes                                Display info on all GPEs\n");
-    AcpiOsPrintf ("  Integrity                           Validate namespace integrity\n");
-    AcpiOsPrintf ("  Methods                             Display list of loaded control methods\n");
-    AcpiOsPrintf ("  Namespace [Object] [Depth]          Display loaded namespace tree/subtree\n");
-    AcpiOsPrintf ("  Notify <Object> <Value>             Send a notification on Object\n");
-    AcpiOsPrintf ("  Objects <ObjectType>                Display all objects of the given type\n");
-    AcpiOsPrintf ("  Owner <OwnerId> [Depth]             Display loaded namespace by object owner\n");
-    AcpiOsPrintf ("  Predefined                          Check all predefined names\n");
-    AcpiOsPrintf ("  Prefix [<NamePath>]                 Set or Get current execution prefix\n");
-    AcpiOsPrintf ("  References <Addr>                   Find all references to object at addr\n");
-    AcpiOsPrintf ("  Resources <Device>                  Get and display Device resources\n");
-    AcpiOsPrintf ("  Set N <NamedObject> <Value>         Set value for named integer\n");
-    AcpiOsPrintf ("  Sleep <SleepState>                  Simulate sleep/wake sequence\n");
-    AcpiOsPrintf ("  Terminate                           Delete namespace and all internal objects\n");
-    AcpiOsPrintf ("  Type <Object>                       Display object type\n");
+        while (Next->Invocation)
+        {
+            AcpiOsPrintf ("%-38s%s", Next->Invocation, Next->Description);
+            Next++;
+        }
+    }
+    else
+    {
+        /* Display help for all commands that match the subtring */
 
-    AcpiOsPrintf ("\nControl Method Execution Commands:\n");
-    AcpiOsPrintf ("  Arguments (or Args)                 Display method arguments\n");
-    AcpiOsPrintf ("  Breakpoint <AmlOffset>              Set an AML execution breakpoint\n");
-    AcpiOsPrintf ("  Call                                Run to next control method invocation\n");
-    AcpiOsPrintf ("  Debug <Namepath> [Arguments]        Single Step a control method\n");
-    AcpiOsPrintf ("  Execute <Namepath> [Arguments]      Execute control method\n");
-    AcpiOsPrintf ("     Hex Integer                      Integer method argument\n");
-    AcpiOsPrintf ("     \"Ascii String\"                   String method argument\n");
-    AcpiOsPrintf ("     (Byte List)                      Buffer method argument\n");
-    AcpiOsPrintf ("     [Package Element List]           Package method argument\n");
-    AcpiOsPrintf ("  Go                                  Allow method to run to completion\n");
-    AcpiOsPrintf ("  Information                         Display info about the current method\n");
-    AcpiOsPrintf ("  Into                                Step into (not over) a method call\n");
-    AcpiOsPrintf ("  List [# of Aml Opcodes]             Display method ASL statements\n");
-    AcpiOsPrintf ("  Locals                              Display method local variables\n");
-    AcpiOsPrintf ("  Results                             Display method result stack\n");
-    AcpiOsPrintf ("  Set <A|L> <#> <Value>               Set method data (Arguments/Locals)\n");
-    AcpiOsPrintf ("  Stop                                Terminate control method\n");
-    AcpiOsPrintf ("  Thread <Threads><Loops><NamePath>   Spawn threads to execute method(s)\n");
-    AcpiOsPrintf ("  Trace <method name>                 Trace method execution\n");
-    AcpiOsPrintf ("  Tree                                Display control method calling tree\n");
-    AcpiOsPrintf ("  <Enter>                             Single step next AML opcode (over calls)\n");
-
-    AcpiOsPrintf ("\nFile I/O Commands:\n");
-    AcpiOsPrintf ("  Close                               Close debug output file\n");
-    AcpiOsPrintf ("  Load <Input Filename>               Load ACPI table from a file\n");
-    AcpiOsPrintf ("  Open <Output Filename>              Open a file for debug output\n");
+        AcpiDbDisplayCommandInfo (Command, TRUE);
+    }
 }
 
 
@@ -313,7 +467,7 @@
  *
  * RETURN:      Pointer to the start of the next token.
  *
- * DESCRIPTION: Command line parsing.  Get the next token on the command line
+ * DESCRIPTION: Command line parsing. Get the next token on the command line
  *
  ******************************************************************************/
 
@@ -466,7 +620,7 @@
  *
  * RETURN:      Count of arguments to the command
  *
- * DESCRIPTION: Get the next command line from the user.  Gets entire line
+ * DESCRIPTION: Get the next command line from the user. Gets entire line
  *              up to the next newline
  *
  ******************************************************************************/
@@ -481,7 +635,13 @@
     char                    *This;
 
 
-    ACPI_STRCPY (AcpiGbl_DbParsedBuf, InputBuffer);
+    if (AcpiUtSafeStrcpy (AcpiGbl_DbParsedBuf, sizeof (AcpiGbl_DbParsedBuf),
+        InputBuffer))
+    {
+        AcpiOsPrintf ("Buffer overflow while parsing input line (max %u characters)\n",
+            sizeof (AcpiGbl_DbParsedBuf));
+        return (0);
+    }
 
     This = AcpiGbl_DbParsedBuf;
     for (i = 0; i < ACPI_DEBUGGER_MAX_ARGS; i++)
@@ -586,6 +746,11 @@
         return (AE_CTRL_TERMINATE);
     }
 
+
+    /* Add all commands that come here to the history buffer */
+
+    AcpiDbAddToHistory (InputBuffer);
+
     ParamCount = AcpiDbGetLine (InputBuffer);
     CommandIndex = AcpiDbMatchCommand (AcpiGbl_DbArgs[0]);
     Temp = 0;
@@ -598,6 +763,7 @@
             ParamCount, AcpiGbl_DbCommands[CommandIndex].Name,
             AcpiGbl_DbCommands[CommandIndex].MinArgs);
 
+        AcpiDbDisplayCommandInfo (AcpiGbl_DbCommands[CommandIndex].Name, FALSE);
         return (AE_CTRL_TRUE);
     }
 
@@ -606,6 +772,7 @@
     switch (CommandIndex)
     {
     case CMD_NULL:
+
         if (Op)
         {
             return (AE_OK);
@@ -621,91 +788,115 @@
 
     case CMD_ARGS:
     case CMD_ARGUMENTS:
+
         AcpiDbDisplayArguments ();
         break;
 
     case CMD_BATCH:
+
         AcpiDbBatchExecute (AcpiGbl_DbArgs[1]);
         break;
 
     case CMD_BREAKPOINT:
+
         AcpiDbSetMethodBreakpoint (AcpiGbl_DbArgs[1], WalkState, Op);
         break;
 
     case CMD_BUSINFO:
+
         AcpiDbGetBusInfo ();
         break;
 
     case CMD_CALL:
+
         AcpiDbSetMethodCallBreakpoint (Op);
         Status = AE_OK;
         break;
 
     case CMD_CLOSE:
+
         AcpiDbCloseDebugFile ();
         break;
 
     case CMD_DEBUG:
+
         AcpiDbExecute (AcpiGbl_DbArgs[1],
             &AcpiGbl_DbArgs[2], &AcpiGbl_DbArgTypes[2], EX_SINGLE_STEP);
         break;
 
     case CMD_DISASSEMBLE:
+    case CMD_DISASM:
+
         (void) AcpiDbDisassembleMethod (AcpiGbl_DbArgs[1]);
         break;
 
     case CMD_DUMP:
+
         AcpiDbDecodeAndDisplayObject (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
         break;
 
     case CMD_ENABLEACPI:
+#if (!ACPI_REDUCED_HARDWARE)
+
         Status = AcpiEnable();
         if (ACPI_FAILURE(Status))
         {
             AcpiOsPrintf("AcpiEnable failed (Status=%X)\n", Status);
             return (Status);
         }
+#endif /* !ACPI_REDUCED_HARDWARE */
         break;
 
     case CMD_EVENT:
+
         AcpiOsPrintf ("Event command not implemented\n");
         break;
 
+    case CMD_EVALUATE:
     case CMD_EXECUTE:
+
         AcpiDbExecute (AcpiGbl_DbArgs[1],
             &AcpiGbl_DbArgs[2], &AcpiGbl_DbArgTypes[2], EX_NO_SINGLE_STEP);
         break;
 
     case CMD_FIND:
+
         Status = AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);
         break;
 
     case CMD_GO:
+
         AcpiGbl_CmSingleStep = FALSE;
         return (AE_OK);
 
     case CMD_GPE:
+
         AcpiDbGenerateGpe (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
         break;
 
     case CMD_GPES:
+
         AcpiDbDisplayGpes ();
         break;
 
     case CMD_HANDLERS:
+
         AcpiDbDisplayHandlers ();
         break;
 
     case CMD_HELP:
     case CMD_HELP2:
-        AcpiDbDisplayHelp ();
+
+        AcpiDbDisplayHelp (AcpiGbl_DbArgs[1]);
         break;
 
     case CMD_HISTORY:
+
         AcpiDbDisplayHistory ();
         break;
 
-    case CMD_HISTORY_EXE:
+    case CMD_HISTORY_EXE: /* ! command */
+
         CommandLine = AcpiDbGetFromHistory (AcpiGbl_DbArgs[1]);
         if (!CommandLine)
         {
@@ -715,7 +906,8 @@
         Status = AcpiDbCommandDispatch (CommandLine, WalkState, Op);
         return (Status);
 
-    case CMD_HISTORY_LAST:
+    case CMD_HISTORY_LAST: /* !! command */
+
         CommandLine = AcpiDbGetFromHistory (NULL);
         if (!CommandLine)
         {
@@ -726,14 +918,17 @@
         return (Status);
 
     case CMD_INFORMATION:
+
         AcpiDbDisplayMethodInfo (Op);
         break;
 
     case CMD_INTEGRITY:
+
         AcpiDbCheckIntegrity ();
         break;
 
     case CMD_INTO:
+
         if (Op)
         {
             AcpiGbl_CmSingleStep = TRUE;
@@ -742,6 +937,7 @@
         break;
 
     case CMD_LEVEL:
+
         if (ParamCount == 0)
         {
             AcpiOsPrintf ("Current debug level for file output is:    %8.8lX\n",
@@ -769,18 +965,22 @@
         break;
 
     case CMD_LIST:
+
         AcpiDbDisassembleAml (AcpiGbl_DbArgs[1], Op);
         break;
 
     case CMD_LOAD:
+
         Status = AcpiDbGetTableFromFile (AcpiGbl_DbArgs[1], NULL);
         break;
 
     case CMD_LOCKS:
+
         AcpiDbDisplayLocks ();
         break;
 
     case CMD_LOCALS:
+
         AcpiDbDisplayLocals ();
         break;
 
@@ -789,72 +989,104 @@
         break;
 
     case CMD_NAMESPACE:
+
         AcpiDbDumpNamespace (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
         break;
 
     case CMD_NOTIFY:
+
         Temp = ACPI_STRTOUL (AcpiGbl_DbArgs[2], NULL, 0);
         AcpiDbSendNotify (AcpiGbl_DbArgs[1], Temp);
         break;
 
-    case CMD_OBJECT:
+    case CMD_OBJECTS:
+
         AcpiUtStrupr (AcpiGbl_DbArgs[1]);
         Status = AcpiDbDisplayObjects (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
         break;
 
     case CMD_OPEN:
+
         AcpiDbOpenDebugFile (AcpiGbl_DbArgs[1]);
         break;
 
     case CMD_OSI:
+
         AcpiDbDisplayInterfaces (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
         break;
 
     case CMD_OWNER:
+
         AcpiDbDumpNamespaceByOwner (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
         break;
 
+    case CMD_PATHS:
+
+        AcpiDbDumpNamespacePaths ();
+        break;
+
     case CMD_PREDEFINED:
+
         AcpiDbCheckPredefinedNames ();
         break;
 
     case CMD_PREFIX:
+
         AcpiDbSetScope (AcpiGbl_DbArgs[1]);
         break;
 
     case CMD_REFERENCES:
+
         AcpiDbFindReferences (AcpiGbl_DbArgs[1]);
         break;
 
     case CMD_RESOURCES:
+
         AcpiDbDisplayResources (AcpiGbl_DbArgs[1]);
         break;
 
     case CMD_RESULTS:
+
         AcpiDbDisplayResults ();
         break;
 
+    case CMD_SCI:
+
+        AcpiDbGenerateSci ();
+        break;
+
     case CMD_SET:
+
         AcpiDbSetMethodData (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2],
             AcpiGbl_DbArgs[3]);
         break;
 
     case CMD_SLEEP:
+
         Status = AcpiDbSleep (AcpiGbl_DbArgs[1]);
         break;
 
     case CMD_STATS:
+
         Status = AcpiDbDisplayStatistics (AcpiGbl_DbArgs[1]);
         break;
 
     case CMD_STOP:
+
         return (AE_NOT_IMPLEMENTED);
 
     case CMD_TABLES:
+
         AcpiDbDisplayTableInfo (AcpiGbl_DbArgs[1]);
         break;
 
+    case CMD_TEMPLATE:
+
+        AcpiDbDisplayTemplate (AcpiGbl_DbArgs[1]);
+        break;
+
     case CMD_TERMINATE:
+
         AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT);
         AcpiUtSubsystemShutdown ();
 
@@ -867,28 +1099,34 @@
         break;
 
     case CMD_THREADS:
+
         AcpiDbCreateExecutionThreads (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2],
             AcpiGbl_DbArgs[3]);
         break;
 
     case CMD_TRACE:
+
         (void) AcpiDebugTrace (AcpiGbl_DbArgs[1],0,0,1);
         break;
 
     case CMD_TREE:
+
         AcpiDbDisplayCallingTree ();
         break;
 
     case CMD_TYPE:
+
         AcpiDbDisplayObjectType (AcpiGbl_DbArgs[1]);
         break;
 
     case CMD_UNLOAD:
-        AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
+
+        AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1]);
         break;
 
     case CMD_EXIT:
     case CMD_QUIT:
+
         if (Op)
         {
             AcpiOsPrintf ("Method execution terminated\n");
@@ -906,7 +1144,8 @@
 
     case CMD_NOT_FOUND:
     default:
-        AcpiOsPrintf ("Unknown Command\n");
+
+        AcpiOsPrintf ("%s: unknown command\n", AcpiGbl_DbArgs[0]);
         return (AE_CTRL_TRUE);
     }
 
@@ -915,9 +1154,6 @@
         Status = AE_CTRL_TRUE;
     }
 
-    /* Add all commands that come here to the history buffer */
-
-    AcpiDbAddToHistory (InputBuffer);
     return (Status);
 }
 
@@ -930,7 +1166,7 @@
  *
  * RETURN:      None
  *
- * DESCRIPTION: Debugger execute thread.  Waits for a command line, then
+ * DESCRIPTION: Debugger execute thread. Waits for a command line, then
  *              simply dispatches it.
  *
  ******************************************************************************/
@@ -973,7 +1209,7 @@
  *
  * RETURN:      None
  *
- * DESCRIPTION: Debugger execute thread.  Waits for a command line, then
+ * DESCRIPTION: Debugger execute thread. Waits for a command line, then
  *              simply dispatches it.
  *
  ******************************************************************************/
@@ -999,7 +1235,7 @@
  *
  * RETURN:      None
  *
- * DESCRIPTION: Command line execution for the AML debugger.  Commands are
+ * DESCRIPTION: Command line execution for the AML debugger. Commands are
  *              matched and dispatched here.
  *
  ******************************************************************************/
@@ -1012,6 +1248,8 @@
     ACPI_STATUS             Status = AE_OK;
 
 
+    AcpiOsPrintf ("\n");
+
     /* TBD: [Restructure] Need a separate command line buffer for step mode */
 
     while (!AcpiGbl_DbTerminateThreads)
@@ -1078,4 +1316,3 @@
 }
 
 #endif  /* ACPI_DEBUGGER */
-
--- a/sys/external/bsd/acpica/dist/debugger/dbutils.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbutils.c	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -85,7 +85,7 @@
 ACPI_OBJECT_TYPE
 AcpiDbMatchArgument (
     char                    *UserArgument,
-    ARGUMENT_INFO           *Arguments)
+    ACPI_DB_ARGUMENT_INFO   *Arguments)
 {
     UINT32                  i;
 
@@ -117,7 +117,7 @@
  *
  * RETURN:      None
  *
- * DESCRIPTION: Set the current destination for debugger output.  Also sets
+ * DESCRIPTION: Set the current destination for debugger output. Also sets
  *              the debug output level accordingly.
  *
  ******************************************************************************/
@@ -179,25 +179,19 @@
         AcpiOsPrintf ("[Null Object] (Type=0)\n");
         break;
 
-
     case ACPI_TYPE_INTEGER:
 
         AcpiOsPrintf ("[Integer] = %8.8X%8.8X\n",
                     ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
         break;
 
-
     case ACPI_TYPE_STRING:
 
         AcpiOsPrintf ("[String] Length %.2X = ", ObjDesc->String.Length);
-        for (i = 0; i < ObjDesc->String.Length; i++)
-        {
-            AcpiOsPrintf ("%c", ObjDesc->String.Pointer[i]);
-        }
+        AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX);
         AcpiOsPrintf ("\n");
         break;
 
-
     case ACPI_TYPE_BUFFER:
 
         AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
@@ -207,8 +201,8 @@
             {
                 AcpiOsPrintf ("\n");
             }
-            AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
-                    ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
+            AcpiUtDebugDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
+                    ObjDesc->Buffer.Length, DB_BYTE_DISPLAY, _COMPONENT);
         }
         else
         {
@@ -216,7 +210,6 @@
         }
         break;
 
-
     case ACPI_TYPE_PACKAGE:
 
         AcpiOsPrintf ("[Package] Contains %u Elements:\n",
@@ -228,26 +221,22 @@
         }
         break;
 
-
     case ACPI_TYPE_LOCAL_REFERENCE:
 
         AcpiOsPrintf ("[Object Reference] = ");
         AcpiDmDisplayInternalObject (ObjDesc->Reference.Handle, NULL);
         break;
 
-
     case ACPI_TYPE_PROCESSOR:
 
         AcpiOsPrintf ("[Processor]\n");
         break;
 
-
     case ACPI_TYPE_POWER:
 
         AcpiOsPrintf ("[Power Resource]\n");
         break;
 
-
     default:
 
         AcpiOsPrintf ("[Unknown Type] %X\n", ObjDesc->Type);
@@ -289,7 +278,7 @@
 
     /* Ignore a leading backslash, this is the root prefix */
 
-    if (*Name == '\\')
+    if (ACPI_IS_ROOT_PREFIX (*Name))
     {
         Name++;
     }
@@ -319,7 +308,7 @@
  *
  * DESCRIPTION: Lookup a name in the ACPI namespace
  *
- * Note: Currently begins search from the root.  Could be enhanced to use
+ * Note: Currently begins search from the root. Could be enhanced to use
  * the current prefix (scope) node as the search beginning point.
  *
  ******************************************************************************/
@@ -363,7 +352,7 @@
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiDbUInt32ToHexString
+ * FUNCTION:    AcpiDbUint32ToHexString
  *
  * PARAMETERS:  Value           - The value to be converted to string
  *              Buffer          - Buffer for result (not less than 11 bytes)
@@ -378,7 +367,7 @@
  ******************************************************************************/
 
 void
-AcpiDbUInt32ToHexString (
+AcpiDbUint32ToHexString (
     UINT32                  Value,
     char                    *Buffer)
 {
@@ -410,7 +399,7 @@
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Second pass parse of the ACPI tables.  We need to wait until
+ * DESCRIPTION: Second pass parse of the ACPI tables. We need to wait until
  *              second pass to parse the control methods
  *
  ******************************************************************************/
@@ -516,11 +505,9 @@
     AcpiOsPrintf ("\nLocation %X:\n", Address);
 
     AcpiDbgLevel |= ACPI_LV_TABLES;
-    AcpiUtDumpBuffer (ACPI_TO_POINTER (Address), 64, DB_BYTE_DISPLAY,
+    AcpiUtDebugDumpBuffer (ACPI_TO_POINTER (Address), 64, DB_BYTE_DISPLAY,
             ACPI_UINT32_MAX);
 }
 #endif
 
 #endif /* ACPI_DEBUGGER */
-
-
--- a/sys/external/bsd/acpica/dist/disassembler/dmresrc.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmresrc.c	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -55,12 +55,6 @@
 
 /* Dispatch tables for Resource disassembly functions */
 
-typedef
-void (*ACPI_RESOURCE_HANDLER) (
-    AML_RESOURCE            *Resource,
-    UINT32                  Length,
-    UINT32                  Level);
-
 static ACPI_RESOURCE_HANDLER    AcpiGbl_DmResourceDispatch [] =
 {
     /* Small descriptors */
@@ -75,7 +69,7 @@
     AcpiDmEndDependentDescriptor,   /* 0x07, ACPI_RESOURCE_NAME_END_DEPENDENT */
     AcpiDmIoDescriptor,             /* 0x08, ACPI_RESOURCE_NAME_IO_PORT */
     AcpiDmFixedIoDescriptor,        /* 0x09, ACPI_RESOURCE_NAME_FIXED_IO_PORT */
-    NULL,                           /* 0x0A, Reserved */
+    AcpiDmFixedDmaDescriptor,       /* 0x0A, ACPI_RESOURCE_NAME_FIXED_DMA */
     NULL,                           /* 0x0B, Reserved */
     NULL,                           /* 0x0C, Reserved */
     NULL,                           /* 0x0D, Reserved */
@@ -95,7 +89,10 @@
     AcpiDmWordDescriptor,           /* 0x08, ACPI_RESOURCE_NAME_WORD_ADDRESS_SPACE */
     AcpiDmInterruptDescriptor,      /* 0x09, ACPI_RESOURCE_NAME_EXTENDED_XRUPT */
     AcpiDmQwordDescriptor,          /* 0x0A, ACPI_RESOURCE_NAME_QWORD_ADDRESS_SPACE */
-    AcpiDmExtendedDescriptor        /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS_SPACE */
+    AcpiDmExtendedDescriptor,       /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS_SPACE */
+    AcpiDmGpioDescriptor,           /* 0x0C, ACPI_RESOURCE_NAME_GPIO */
+    NULL,                           /* 0x0D, Reserved */
+    AcpiDmSerialBusDescriptor       /* 0x0E, ACPI_RESOURCE_NAME_SERIAL_BUS */
 };
 
 
@@ -282,7 +279,7 @@
 
         /* Validate the Resource Type and Resource Length */
 
-        Status = AcpiUtValidateResource (Aml, &ResourceIndex);
+        Status = AcpiUtValidateResource (NULL, Aml, &ResourceIndex);
         if (ACPI_FAILURE (Status))
         {
             AcpiOsPrintf ("/*** Could not validate Resource, type (%X) %s***/\n",
@@ -340,6 +337,7 @@
             return;
 
         default:
+
             break;
         }
 
@@ -369,17 +367,19 @@
  *
  * FUNCTION:    AcpiDmIsResourceTemplate
  *
- * PARAMETERS:  Op          - Buffer Op to be examined
+ * PARAMETERS:  WalkState           - Current walk info
+ *              Op                  - Buffer Op to be examined
  *
  * RETURN:      Status. AE_OK if valid template
  *
  * DESCRIPTION: Walk a byte list to determine if it consists of a valid set
- *              of resource descriptors.  Nothing is output.
+ *              of resource descriptors. Nothing is output.
  *
  ******************************************************************************/
 
 ACPI_STATUS
 AcpiDmIsResourceTemplate (
+    ACPI_WALK_STATE         *WalkState,
     ACPI_PARSE_OBJECT       *Op)
 {
     ACPI_STATUS             Status;
@@ -399,6 +399,12 @@
     /* Get the ByteData list and length */
 
     NextOp = Op->Common.Value.Arg;
+    if (!NextOp)
+    {
+        AcpiOsPrintf ("NULL byte list in buffer\n");
+        return (AE_TYPE);
+    }
+
     NextOp = NextOp->Common.Next;
     if (!NextOp)
     {
@@ -410,7 +416,8 @@
 
     /* Walk the byte list, abort on any invalid descriptor type or length */
 
-    Status = AcpiUtWalkAmlResources (Aml, Length, NULL, &EndAml);
+    Status = AcpiUtWalkAmlResources (WalkState, Aml, Length,
+        NULL, ACPI_CAST_INDIRECT_PTR (void, &EndAml));
     if (ACPI_FAILURE (Status))
     {
         return (AE_TYPE);
--- a/sys/external/bsd/acpica/dist/disassembler/dmresrcl.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmresrcl.c	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -153,16 +153,19 @@
         switch (Type)
         {
         case 16:
+
             AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i],
                 AcpiDmMemoryNames[i]);
             break;
 
         case 32:
+
             AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i],
                 AcpiDmMemoryNames[i]);
             break;
 
         default:
+
             return;
         }
     }
@@ -201,21 +204,25 @@
         switch (Type)
         {
         case 16:
+
             AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i],
                 AcpiDmAddressNames[i]);
             break;
 
         case 32:
+
             AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i],
                 AcpiDmAddressNames[i]);
             break;
 
         case 64:
+
             AcpiDmDumpInteger64 (ACPI_CAST_PTR (UINT64, Source)[i],
                 AcpiDmAddressNames[i]);
             break;
 
         default:
+
             return;
         }
     }
@@ -242,22 +249,27 @@
     switch (Type)
     {
     case ACPI_RESOURCE_TYPE_ADDRESS16:
+
         AcpiOsPrintf ("Word");
         break;
 
     case ACPI_RESOURCE_TYPE_ADDRESS32:
+
         AcpiOsPrintf ("DWord");
         break;
 
     case ACPI_RESOURCE_TYPE_ADDRESS64:
+
         AcpiOsPrintf ("QWord");
         break;
 
     case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64:
+
         AcpiOsPrintf ("Extended");
         break;
 
     default:
+
         return;
     }
 }
@@ -318,7 +330,7 @@
 
     /* This is either a Memory, IO, or BusNumber descriptor (0,1,2) */
 
-    AcpiOsPrintf ("%s (", AcpiGbl_WordDecode [ResourceType & 0x3]);
+    AcpiOsPrintf ("%s (", AcpiGbl_WordDecode [ACPI_GET_2BIT_FLAG (ResourceType)]);
 
     /* Decode the general and type-specific flags */
 
@@ -331,7 +343,7 @@
         AcpiDmIoFlags (Flags);
         if (ResourceType == ACPI_IO_RANGE)
         {
-            AcpiOsPrintf (" %s,", AcpiGbl_RngDecode [SpecificFlags & 0x3]);
+            AcpiOsPrintf (" %s,", AcpiGbl_RngDecode [ACPI_GET_2BIT_FLAG (SpecificFlags)]);
         }
     }
 }
@@ -383,10 +395,10 @@
 {
 
     AcpiOsPrintf ("%s, %s, %s, %s,",
-        AcpiGbl_ConsumeDecode [(Flags & 1)],
-        AcpiGbl_DecDecode [(Flags & 0x2) >> 1],
-        AcpiGbl_MinDecode [(Flags & 0x4) >> 2],
-        AcpiGbl_MaxDecode [(Flags & 0x8) >> 3]);
+        AcpiGbl_ConsumeDecode [ACPI_GET_1BIT_FLAG (Flags)],
+        AcpiGbl_DecDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 1)],
+        AcpiGbl_MinDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 2)],
+        AcpiGbl_MaxDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 3)]);
 }
 
 
@@ -407,10 +419,10 @@
         UINT8               Flags)
 {
     AcpiOsPrintf ("%s, %s, %s, %s,",
-        AcpiGbl_ConsumeDecode [(Flags & 1)],
-        AcpiGbl_MinDecode [(Flags & 0x4) >> 2],
-        AcpiGbl_MaxDecode [(Flags & 0x8) >> 3],
-        AcpiGbl_DecDecode [(Flags & 0x2) >> 1]);
+        AcpiGbl_ConsumeDecode [ACPI_GET_1BIT_FLAG (Flags)],
+        AcpiGbl_MinDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 2)],
+        AcpiGbl_MaxDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 3)],
+        AcpiGbl_DecDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 1)]);
 }
 
 
@@ -432,14 +444,14 @@
 {
 
     AcpiOsPrintf (", %s",
-        AcpiGbl_TtpDecode [(SpecificFlags & 0x10) >> 4]);
+        AcpiGbl_TtpDecode [ACPI_EXTRACT_1BIT_FLAG (SpecificFlags, 4)]);
 
     /* TRS is only used if TTP is TypeTranslation */
 
     if (SpecificFlags & 0x10)
     {
         AcpiOsPrintf (", %s",
-            AcpiGbl_TrsDecode [(SpecificFlags & 0x20) >> 5]);
+            AcpiGbl_TrsDecode [ACPI_EXTRACT_1BIT_FLAG (SpecificFlags, 5)]);
     }
 }
 
@@ -464,12 +476,12 @@
 {
 
     AcpiOsPrintf ("%s, %s, %s, %s, %s, %s,",
-        AcpiGbl_ConsumeDecode [(Flags & 1)],
-        AcpiGbl_DecDecode [(Flags & 0x2) >> 1],
-        AcpiGbl_MinDecode [(Flags & 0x4) >> 2],
-        AcpiGbl_MaxDecode [(Flags & 0x8) >> 3],
-        AcpiGbl_MemDecode [(SpecificFlags & 0x6) >> 1],
-        AcpiGbl_RwDecode [(SpecificFlags & 0x1)]);
+        AcpiGbl_ConsumeDecode [ACPI_GET_1BIT_FLAG (Flags)],
+        AcpiGbl_DecDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 1)],
+        AcpiGbl_MinDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 2)],
+        AcpiGbl_MaxDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 3)],
+        AcpiGbl_MemDecode [ACPI_EXTRACT_2BIT_FLAG (SpecificFlags, 1)],
+        AcpiGbl_RwDecode [ACPI_GET_1BIT_FLAG (SpecificFlags)]);
 }
 
 
@@ -491,8 +503,8 @@
 {
 
     AcpiOsPrintf (", %s, %s",
-        AcpiGbl_MtpDecode [(SpecificFlags & 0x18) >> 3],
-        AcpiGbl_TtpDecode [(SpecificFlags & 0x20) >> 5]);
+        AcpiGbl_MtpDecode [ACPI_EXTRACT_2BIT_FLAG (SpecificFlags, 3)],
+        AcpiGbl_TtpDecode [ACPI_EXTRACT_1BIT_FLAG (SpecificFlags, 5)]);
 }
 
 
@@ -553,7 +565,7 @@
     if (TotalLength > (MinimumTotalLength + 1))
     {
         AcpiOsPrintf (" ");
-        AcpiUtPrintString ((char *) &AmlResourceSource[1], ACPI_UINT8_MAX);
+        AcpiUtPrintString ((char *) &AmlResourceSource[1], ACPI_UINT16_MAX);
     }
 
     AcpiOsPrintf (", ");
@@ -767,7 +779,7 @@
 
     AcpiDmIndent (Level);
     AcpiOsPrintf ("Memory24 (%s,\n",
-        AcpiGbl_RwDecode [Resource->Memory24.Flags & 1]);
+        AcpiGbl_RwDecode [ACPI_GET_1BIT_FLAG (Resource->Memory24.Flags)]);
 
     /* Dump the 4 contiguous WORD values */
 
@@ -806,7 +818,7 @@
 
     AcpiDmIndent (Level);
     AcpiOsPrintf ("Memory32 (%s,\n",
-        AcpiGbl_RwDecode [Resource->Memory32.Flags & 1]);
+        AcpiGbl_RwDecode [ACPI_GET_1BIT_FLAG (Resource->Memory32.Flags)]);
 
     /* Dump the 4 contiguous DWORD values */
 
@@ -845,7 +857,7 @@
 
     AcpiDmIndent (Level);
     AcpiOsPrintf ("Memory32Fixed (%s,\n",
-        AcpiGbl_RwDecode [Resource->FixedMemory32.Flags & 1]);
+        AcpiGbl_RwDecode [ACPI_GET_1BIT_FLAG (Resource->FixedMemory32.Flags)]);
 
     AcpiDmIndent (Level + 1);
     AcpiDmDumpInteger32 (Resource->FixedMemory32.Address, "Address Base");
@@ -942,10 +954,10 @@
 
     AcpiDmIndent (Level);
     AcpiOsPrintf ("Interrupt (%s, %s, %s, %s, ",
-        AcpiGbl_ConsumeDecode [(Resource->ExtendedIrq.Flags & 1)],
-        AcpiGbl_HeDecode [(Resource->ExtendedIrq.Flags >> 1) & 1],
-        AcpiGbl_LlDecode [(Resource->ExtendedIrq.Flags >> 2) & 1],
-        AcpiGbl_ShrDecode [(Resource->ExtendedIrq.Flags >> 3) & 1]);
+        AcpiGbl_ConsumeDecode [ACPI_GET_1BIT_FLAG (Resource->ExtendedIrq.Flags)],
+        AcpiGbl_HeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->ExtendedIrq.Flags, 1)],
+        AcpiGbl_LlDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->ExtendedIrq.Flags, 2)],
+        AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->ExtendedIrq.Flags, 3)]);
 
     /*
      * The ResourceSource fields are optional and appear after the interrupt
@@ -1050,4 +1062,3 @@
 }
 
 #endif
-
--- a/sys/external/bsd/acpica/dist/dispatcher/dscontrol.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dscontrol.c	Fri Dec 27 18:50:56 2013 +0000
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -86,7 +86,6 @@
     switch (Op->Common.AmlOpcode)
     {
     case AML_WHILE_OP:
-
         /*
          * If this is an additional iteration of a while loop, continue.
          * There is no need to allocate a new control state.
@@ -107,7 +106,6 @@
         /*lint -fallthrough */
 
     case AML_IF_OP:
-
         /*
          * IF/WHILE: Create a new control state to manage these
          * constructs. We need to manage these as a stack, in order
@@ -150,6 +148,7 @@
         break;
 
     default:
+
         break;
     }
 
@@ -204,12 +203,10 @@
         AcpiUtDeleteGenericState (ControlState);
         break;
 
-
     case AML_ELSE_OP:
 
         break;
 
-
     case AML_WHILE_OP:
 
         ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "[WHILE_OP] Op=%p\n", Op));
@@ -252,7 +249,6 @@
         AcpiUtDeleteGenericState (ControlState);
         break;
 
-
     case AML_RETURN_OP:
 
         ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
@@ -290,7 +286,7 @@
 
             /*
              * Get the return value and save as the last result
-             * value.  This is the only place where WalkState->ReturnDesc
+             * value. This is the only place where WalkState->ReturnDesc
              * is set to anything other than zero!
              */
             WalkState->ReturnDesc = WalkState->Operands[0];
@@ -348,13 +344,12 @@
         Status = AE_CTRL_TERMINATE;
         break;
 
-
     case AML_NOOP_OP:
 
         /* Just do nothing! */
+
         break;
 
-
     case AML_BREAK_POINT_OP:
 
         /*
@@ -373,11 +368,9 @@
 	    __UNCONST("Executed AML Breakpoint opcode"));
         break;
 
-
     case AML_BREAK_OP:
     case AML_CONTINUE_OP: /* ACPI 2.0 */
 
-
         /* Pop and delete control states until we find a while */
 
         while (WalkState->ControlState &&
@@ -410,7 +403,6 @@
         }
         break;
 
-
     default:
 
         ACPI_ERROR ((AE_INFO, "Unknown control opcode=0x%X Op=%p",
--- a/sys/external/bsd/acpica/dist/dispatcher/dsopcode.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dsopcode.c	Fri Dec 27 18:50:56 2013 +0000
@@ -1,11 +1,11 @@
 /******************************************************************************
  *
- * Module Name: dsopcode - Dispatcher suport for regions and fields
+ * Module Name: dsopcode - Dispatcher support for regions and fields
  *
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -523,18 +523,18 @@
 
 
     /*
-     * This is where we evaluate the SignatureString and OemIDString
-     * and OemTableIDString of the DataTableRegion declaration
+     * This is where we evaluate the Signature string, OemId string,
+     * and OemTableId string of the Data Table Region declaration
      */
     Node =  Op->Common.Node;
 
-    /* NextOp points to SignatureString op */
+    /* NextOp points to Signature string op */
 
     NextOp = Op->Common.Value.Arg;
 
     /*
-     * Evaluate/create the SignatureString and OemIDString
-     * and OemTableIDString operands
+     * Evaluate/create the Signature string, OemId string,
+     * and OemTableId string operands
      */
     Status = AcpiDsCreateOperands (WalkState, NextOp);
     if (ACPI_FAILURE (Status))
@@ -543,8 +543,8 @@
     }
 
     /*
-     * Resolve the SignatureString and OemIDString
-     * and OemTableIDString operands
+     * Resolve the Signature string, OemId string,
+     * and OemTableId string operands
      */
     Status = AcpiExResolveOperands (Op->Common.AmlOpcode,
                 ACPI_WALK_OPERANDS, WalkState);
@@ -680,6 +680,7 @@
         break;
 
     default:
+
         return_ACPI_STATUS (AE_AML_BAD_OPCODE);
     }
 
@@ -806,4 +807,3 @@
     AcpiUtRemoveReference (OperandDesc);
     return_ACPI_STATUS (Status);
 }
-
--- a/sys/external/bsd/acpica/dist/events/evrgnini.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/events/evrgnini.c	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -389,8 +389,8 @@
     ACPI_NAMESPACE_NODE     *Node)
 {
     ACPI_STATUS             Status;
-    ACPI_DEVICE_ID          *Hid;
-    ACPI_DEVICE_ID_LIST     *Cid;
+    ACPI_PNP_DEVICE_ID      *Hid;
+    ACPI_PNP_DEVICE_ID_LIST *Cid;
     UINT32                  i;
     BOOLEAN                 Match;
 
@@ -664,7 +664,9 @@
                 break;
 
             default:
+
                 /* Ignore other objects */
+
                 break;
             }
 
@@ -729,4 +731,3 @@
 
     return_ACPI_STATUS (AE_NOT_EXIST);
 }
-
--- a/sys/external/bsd/acpica/dist/events/evxface.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/events/evxface.c	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -43,6 +43,7 @@
 
 
 #define __EVXFACE_C__
+#define EXPORT_ACPI_INTERFACES
 
 #include "acpi.h"
 #include "accommon.h"
@@ -56,6 +57,335 @@
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiInstallNotifyHandler
+ *
+ * PARAMETERS:  Device          - The device for which notifies will be handled
+ *              HandlerType     - The type of handler:
+ *                                  ACPI_SYSTEM_NOTIFY: System Handler (00-7F)
+ *                                  ACPI_DEVICE_NOTIFY: Device Handler (80-FF)
+ *                                  ACPI_ALL_NOTIFY:    Both System and Device
+ *              Handler         - Address of the handler
+ *              Context         - Value passed to the handler on each GPE
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Install a handler for notifications on an ACPI Device,
+ *              ThermalZone, or Processor object.
+ *
+ * NOTES:       The Root namespace object may have only one handler for each
+ *              type of notify (System/Device). Device/Thermal/Processor objects
+ *              may have one device notify handler, and multiple system notify
+ *              handlers.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiInstallNotifyHandler (
+    ACPI_HANDLE             Device,
+    UINT32                  HandlerType,
+    ACPI_NOTIFY_HANDLER     Handler,
+    void                    *Context)
+{
+    ACPI_NAMESPACE_NODE     *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Device);
+    ACPI_OPERAND_OBJECT     *ObjDesc;
+    ACPI_OPERAND_OBJECT     *HandlerObj;
+    ACPI_STATUS             Status;
+    UINT32                  i;
+
+
+    ACPI_FUNCTION_TRACE (AcpiInstallNotifyHandler);
+
+
+    /* Parameter validation */
+
+    if ((!Device) || (!Handler) || (!HandlerType) ||
+        (HandlerType > ACPI_MAX_NOTIFY_HANDLER_TYPE))
+    {
+        return_ACPI_STATUS (AE_BAD_PARAMETER);
+    }
+
+    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
+    if (ACPI_FAILURE (Status))
+    {
+        return_ACPI_STATUS (Status);
+    }
+
+    /*
+     * Root Object:
+     * Registering a notify handler on the root object indicates that the
+     * caller wishes to receive notifications for all objects. Note that
+     * only one global handler can be registered per notify type.
+     * Ensure that a handler is not already installed.
+     */
+    if (Device == ACPI_ROOT_OBJECT)
+    {
+        for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
+        {
+            if (HandlerType & (i+1))
+            {
+                if (AcpiGbl_GlobalNotify[i].Handler)
+                {
+                    Status = AE_ALREADY_EXISTS;
+                    goto UnlockAndExit;
+                }
+
+                AcpiGbl_GlobalNotify[i].Handler = Handler;
+                AcpiGbl_GlobalNotify[i].Context = Context;
+            }
+        }
+
+        goto UnlockAndExit; /* Global notify handler installed, all done */
+    }
+
+    /*
+     * All Other Objects:
+     * Caller will only receive notifications specific to the target
+     * object. Note that only certain object types are allowed to
+     * receive notifications.
+     */
+
+    /* Are Notifies allowed on this object? */
+
+    if (!AcpiEvIsNotifyObject (Node))
+    {
+        Status = AE_TYPE;
+        goto UnlockAndExit;
+    }
+
+    /* Check for an existing internal object, might not exist */
+
+    ObjDesc = AcpiNsGetAttachedObject (Node);
+    if (!ObjDesc)
+    {
+        /* Create a new object */
+
+        ObjDesc = AcpiUtCreateInternalObject (Node->Type);
+        if (!ObjDesc)
+        {
+            Status = AE_NO_MEMORY;
+            goto UnlockAndExit;
+        }
+
+        /* Attach new object to the Node, remove local reference */
+
+        Status = AcpiNsAttachObject (Device, ObjDesc, Node->Type);
+        AcpiUtRemoveReference (ObjDesc);
+        if (ACPI_FAILURE (Status))
+        {
+            goto UnlockAndExit;
+        }
+    }
+
+    /* Ensure that the handler is not already installed in the lists */
+
+    for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
+    {
+        if (HandlerType & (i+1))
+        {
+            HandlerObj = ObjDesc->CommonNotify.NotifyList[i];
+            while (HandlerObj)
+            {
+                if (HandlerObj->Notify.Handler == Handler)
+                {
+                    Status = AE_ALREADY_EXISTS;
+                    goto UnlockAndExit;
+                }
+
+                HandlerObj = HandlerObj->Notify.Next[i];
+            }
+        }
+    }
+
+    /* Create and populate a new notify handler object */
+
+    HandlerObj = AcpiUtCreateInternalObject (ACPI_TYPE_LOCAL_NOTIFY);
+    if (!HandlerObj)
+    {
+        Status = AE_NO_MEMORY;
+        goto UnlockAndExit;
+    }
+
+    HandlerObj->Notify.Node = Node;
+    HandlerObj->Notify.HandlerType = HandlerType;
+    HandlerObj->Notify.Handler = Handler;
+    HandlerObj->Notify.Context = Context;
+
+    /* Install the handler at the list head(s) */
+
+    for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
+    {
+        if (HandlerType & (i+1))
+        {
+            HandlerObj->Notify.Next[i] =
+                ObjDesc->CommonNotify.NotifyList[i];
+
+            ObjDesc->CommonNotify.NotifyList[i] = HandlerObj;
+        }
+    }
+
+    /* Add an extra reference if handler was installed in both lists */
+
+    if (HandlerType == ACPI_ALL_NOTIFY)
+    {
+        AcpiUtAddReference (HandlerObj);
+    }
+
+
+UnlockAndExit:
+    (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
+    return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiInstallNotifyHandler)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiRemoveNotifyHandler
+ *
+ * PARAMETERS:  Device          - The device for which the handler is installed
+ *              HandlerType     - The type of handler:
+ *                                  ACPI_SYSTEM_NOTIFY: System Handler (00-7F)
+ *                                  ACPI_DEVICE_NOTIFY: Device Handler (80-FF)
+ *                                  ACPI_ALL_NOTIFY:    Both System and Device
+ *              Handler         - Address of the handler
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Remove a handler for notifies on an ACPI device
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiRemoveNotifyHandler (
+    ACPI_HANDLE             Device,
+    UINT32                  HandlerType,
+    ACPI_NOTIFY_HANDLER     Handler)
+{
+    ACPI_NAMESPACE_NODE     *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Device);
+    ACPI_OPERAND_OBJECT     *ObjDesc;
+    ACPI_OPERAND_OBJECT     *HandlerObj;
+    ACPI_OPERAND_OBJECT     *PreviousHandlerObj;
+    ACPI_STATUS             Status;
+    UINT32                  i;
+
+
+    ACPI_FUNCTION_TRACE (AcpiRemoveNotifyHandler);
+
+
+    /* Parameter validation */
+
+    if ((!Device) || (!Handler) || (!HandlerType) ||
+        (HandlerType > ACPI_MAX_NOTIFY_HANDLER_TYPE))
+    {
+        return_ACPI_STATUS (AE_BAD_PARAMETER);
+    }
+
+    /* Make sure all deferred notify tasks are completed */
+
+    AcpiOsWaitEventsComplete ();
+
+    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
+    if (ACPI_FAILURE (Status))
+    {
+        return_ACPI_STATUS (Status);
+    }
+
+    /* Root Object. Global handlers are removed here */
+
+    if (Device == ACPI_ROOT_OBJECT)
+    {
+        for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
+        {
+            if (HandlerType & (i+1))
+            {
+                if (!AcpiGbl_GlobalNotify[i].Handler ||
+                    (AcpiGbl_GlobalNotify[i].Handler != Handler))
+                {
+                    Status = AE_NOT_EXIST;
+                    goto UnlockAndExit;
+                }
+
+                ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+                    "Removing global notify handler\n"));
+
+                AcpiGbl_GlobalNotify[i].Handler = NULL;
+                AcpiGbl_GlobalNotify[i].Context = NULL;
+            }
+        }
+
+        goto UnlockAndExit;
+    }
+
+    /* All other objects: Are Notifies allowed on this object? */
+
+    if (!AcpiEvIsNotifyObject (Node))
+    {
+        Status = AE_TYPE;
+        goto UnlockAndExit;
+    }
+
+    /* Must have an existing internal object */
+
+    ObjDesc = AcpiNsGetAttachedObject (Node);
+    if (!ObjDesc)
+    {
+        Status = AE_NOT_EXIST;
+        goto UnlockAndExit;
+    }
+
+    /* Internal object exists. Find the handler and remove it */
+
+    for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)
+    {
+        if (HandlerType & (i+1))
+        {
+            HandlerObj = ObjDesc->CommonNotify.NotifyList[i];
+            PreviousHandlerObj = NULL;
+
+            /* Attempt to find the handler in the handler list */
+
+            while (HandlerObj &&
+                  (HandlerObj->Notify.Handler != Handler))
+            {
+                PreviousHandlerObj = HandlerObj;
+                HandlerObj = HandlerObj->Notify.Next[i];
+            }
+
+            if (!HandlerObj)
+            {
+                Status = AE_NOT_EXIST;
+                goto UnlockAndExit;
+            }
+
+            /* Remove the handler object from the list */
+
+            if (PreviousHandlerObj) /* Handler is not at the list head */
+            {
+                PreviousHandlerObj->Notify.Next[i] =
+                    HandlerObj->Notify.Next[i];
+            }
+            else /* Handler is at the list head */
+            {
+                ObjDesc->CommonNotify.NotifyList[i] =
+                    HandlerObj->Notify.Next[i];
+            }
+
+            AcpiUtRemoveReference (HandlerObj);
+        }
+    }
+
+
+UnlockAndExit:
+    (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
+    return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiRemoveNotifyHandler)
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiInstallExceptionHandler
  *
  * PARAMETERS:  Handler         - Pointer to the handler function for the
@@ -103,6 +433,170 @@
 ACPI_EXPORT_SYMBOL (AcpiInstallExceptionHandler)
 
 
+#if (!ACPI_REDUCED_HARDWARE)
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiInstallSciHandler
+ *
+ * PARAMETERS:  Address             - Address of the handler
+ *              Context             - Value passed to the handler on each SCI
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Install a handler for a System Control Interrupt.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiInstallSciHandler (
+    ACPI_SCI_HANDLER        Address,
+    void                    *Context)
+{
+    ACPI_SCI_HANDLER_INFO   *NewSciHandler;
+    ACPI_SCI_HANDLER_INFO   *SciHandler;
+    ACPI_CPU_FLAGS          Flags;
+    ACPI_STATUS             Status;
+
+
+    ACPI_FUNCTION_TRACE (AcpiInstallSciHandler);
+
+
+    if (!Address)
+    {
+        return_ACPI_STATUS (AE_BAD_PARAMETER);
+    }
+
+    /* Allocate and init a handler object */
+
+    NewSciHandler = ACPI_ALLOCATE (sizeof (ACPI_SCI_HANDLER_INFO));
+    if (!NewSciHandler)
+    {
+        return_ACPI_STATUS (AE_NO_MEMORY);
+    }
+
+    NewSciHandler->Address = Address;
+    NewSciHandler->Context = Context;
+
+    Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
+    if (ACPI_FAILURE (Status))
+    {
+        goto Exit;
+    }
+
+    /* Lock list during installation */
+
+    Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
+    SciHandler = AcpiGbl_SciHandlerList;
+
+    /* Ensure handler does not already exist */
+
+    while (SciHandler)
+    {
+        if (Address == SciHandler->Address)
+        {
+            Status = AE_ALREADY_EXISTS;
+            goto UnlockAndExit;
+        }
+
+        SciHandler = SciHandler->Next;
+    }
+
+    /* Install the new handler into the global list (at head) */
+
+    NewSciHandler->Next = AcpiGbl_SciHandlerList;
+    AcpiGbl_SciHandlerList = NewSciHandler;
+
+
+UnlockAndExit:
+
+    AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
+    (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
+
+Exit:
+    if (ACPI_FAILURE (Status))
+    {
+        ACPI_FREE (NewSciHandler);
+    }
+    return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiRemoveSciHandler
+ *
+ * PARAMETERS:  Address             - Address of the handler
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Remove a handler for a System Control Interrupt.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiRemoveSciHandler (
+    ACPI_SCI_HANDLER        Address)
+{
+    ACPI_SCI_HANDLER_INFO   *PrevSciHandler;
+    ACPI_SCI_HANDLER_INFO   *NextSciHandler;
+    ACPI_CPU_FLAGS          Flags;
+    ACPI_STATUS             Status;
+
+
+    ACPI_FUNCTION_TRACE (AcpiRemoveSciHandler);
+
+
+    if (!Address)
+    {
+        return_ACPI_STATUS (AE_BAD_PARAMETER);
+    }
+
+    Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
+    if (ACPI_FAILURE (Status))
+    {
+        return_ACPI_STATUS (Status);
+    }
+
+    /* Remove the SCI handler with lock */
+
+    Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
+
+    PrevSciHandler = NULL;
+    NextSciHandler = AcpiGbl_SciHandlerList;
+    while (NextSciHandler)
+    {
+        if (NextSciHandler->Address == Address)
+        {
+            /* Unlink and free the SCI handler info block */
+
+            if (PrevSciHandler)
+            {
+                PrevSciHandler->Next = NextSciHandler->Next;
+            }
+            else
+            {
+                AcpiGbl_SciHandlerList = NextSciHandler->Next;
+            }
+
+            AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
+            ACPI_FREE (NextSciHandler);
+            goto UnlockAndExit;
+        }
+
+        PrevSciHandler = NextSciHandler;
+        NextSciHandler = NextSciHandler->Next;
+    }
+
+    AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
+    Status = AE_NOT_EXIST;
+
+
+UnlockAndExit:
+    (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
+    return_ACPI_STATUS (Status);
+}
+
+
 /*******************************************************************************
  *
  * FUNCTION:    AcpiInstallGlobalEventHandler
@@ -204,9 +698,9 @@
         return_ACPI_STATUS (Status);
     }
 
-    /* Don't allow two handlers. */
+    /* Do not allow multiple handlers */
 
-    if (NULL != AcpiGbl_FixedEventHandlers[Event].Handler)
+    if (AcpiGbl_FixedEventHandlers[Event].Handler)
     {
         Status = AE_ALREADY_EXISTS;
         goto Cleanup;
@@ -220,7 +714,9 @@
     Status = AcpiEnableEvent (Event, 0);
     if (ACPI_FAILURE (Status))
     {
-        ACPI_WARNING ((AE_INFO, "Could not enable fixed event 0x%X", Event));
+        ACPI_WARNING ((AE_INFO,
+            "Could not enable fixed event - %s (%u)",
+            AcpiUtGetEventName (Event), Event));
 
         /* Remove the handler */
 
@@ -230,7 +726,8 @@
     else
     {
         ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
-            "Enabled fixed event %X, Handler=%p\n", Event, Handler));
+            "Enabled fixed event %s (%X), Handler=%p\n",
+            AcpiUtGetEventName (Event), Event, Handler));
     }
 
 
@@ -291,11 +788,14 @@
     if (ACPI_FAILURE (Status))
     {
         ACPI_WARNING ((AE_INFO,
-            "Could not write to fixed event enable register 0x%X", Event));
+            "Could not disable fixed event - %s (%u)",
+            AcpiUtGetEventName (Event), Event));
     }
     else
     {
-        ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Disabled fixed event %X\n", Event));
+        ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+            "Disabled fixed event - %s (%X)\n",
+            AcpiUtGetEventName (Event), Event));
     }
 
     (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
@@ -307,357 +807,6 @@
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiInstallNotifyHandler
- *
- * PARAMETERS:  Device          - The device for which notifies will be handled
- *              HandlerType     - The type of handler:
- *                                  ACPI_SYSTEM_NOTIFY: SystemHandler (00-7f)
- *                                  ACPI_DEVICE_NOTIFY: DriverHandler (80-ff)
- *                                  ACPI_ALL_NOTIFY:  both system and device
- *              Handler         - Address of the handler
- *              Context         - Value passed to the handler on each GPE
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Install a handler for notifies on an ACPI device
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiInstallNotifyHandler (
-    ACPI_HANDLE             Device,
-    UINT32                  HandlerType,
-    ACPI_NOTIFY_HANDLER     Handler,
-    void                    *Context)
-{
-    ACPI_OPERAND_OBJECT     *ObjDesc;
-    ACPI_OPERAND_OBJECT     *NotifyObj;
-    ACPI_NAMESPACE_NODE     *Node;
-    ACPI_STATUS             Status;
-
-
-    ACPI_FUNCTION_TRACE (AcpiInstallNotifyHandler);
-
-
-    /* Parameter validation */
-
-    if ((!Device)  ||
-        (!Handler) ||
-        (HandlerType > ACPI_MAX_NOTIFY_HANDLER_TYPE))
-    {
-        return_ACPI_STATUS (AE_BAD_PARAMETER);
-    }
-
-    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
-    if (ACPI_FAILURE (Status))
-    {
-        return_ACPI_STATUS (Status);
-    }
-
-    /* Convert and validate the device handle */
-
-    Node = AcpiNsValidateHandle (Device);
-    if (!Node)
-    {
-        Status = AE_BAD_PARAMETER;
-        goto UnlockAndExit;
-    }
-
-    /*
-     * Root Object:
-     * Registering a notify handler on the root object indicates that the
-     * caller wishes to receive notifications for all objects. Note that
-     * only one <external> global handler can be regsitered (per notify type).
-     */
-    if (Device == ACPI_ROOT_OBJECT)
-    {
-        /* Make sure the handler is not already installed */
-
-        if (((HandlerType & ACPI_SYSTEM_NOTIFY) &&
-                AcpiGbl_SystemNotify.Handler)       ||
-            ((HandlerType & ACPI_DEVICE_NOTIFY) &&
-                AcpiGbl_DeviceNotify.Handler))
-        {
-            Status = AE_ALREADY_EXISTS;
-            goto UnlockAndExit;
-        }
-
-        if (HandlerType & ACPI_SYSTEM_NOTIFY)
-        {
-            AcpiGbl_SystemNotify.Node    = Node;
-            AcpiGbl_SystemNotify.Handler = Handler;
-            AcpiGbl_SystemNotify.Context = Context;
-        }
-
-        if (HandlerType & ACPI_DEVICE_NOTIFY)
-        {
-            AcpiGbl_DeviceNotify.Node    = Node;
-            AcpiGbl_DeviceNotify.Handler = Handler;
-            AcpiGbl_DeviceNotify.Context = Context;
-        }
-
-        /* Global notify handler installed */
-    }
-
-    /*
-     * All Other Objects:
-     * Caller will only receive notifications specific to the target object.
-     * Note that only certain object types can receive notifications.
-     */
-    else
-    {
-        /* Notifies allowed on this object? */
-
-        if (!AcpiEvIsNotifyObject (Node))
-        {
-            Status = AE_TYPE;
-            goto UnlockAndExit;
-        }
-
-        /* Check for an existing internal object */
-
-        ObjDesc = AcpiNsGetAttachedObject (Node);
-        if (ObjDesc)
-        {
-            /* Object exists - make sure there's no handler */
-
-            if (((HandlerType & ACPI_SYSTEM_NOTIFY) &&
-                    ObjDesc->CommonNotify.SystemNotify)   ||
-                ((HandlerType & ACPI_DEVICE_NOTIFY) &&
-                    ObjDesc->CommonNotify.DeviceNotify))
-            {
-                Status = AE_ALREADY_EXISTS;
-                goto UnlockAndExit;
-            }
-        }
-        else
-        {
-            /* Create a new object */
-
-            ObjDesc = AcpiUtCreateInternalObject (Node->Type);
-            if (!ObjDesc)
-            {
-                Status = AE_NO_MEMORY;
-                goto UnlockAndExit;
-            }
-
-            /* Attach new object to the Node */
-
-            Status = AcpiNsAttachObject (Device, ObjDesc, Node->Type);
-
-            /* Remove local reference to the object */
-
-            AcpiUtRemoveReference (ObjDesc);
-            if (ACPI_FAILURE (Status))
-            {
-                goto UnlockAndExit;
-            }
-        }
-
-        /* Install the handler */
-
-        NotifyObj = AcpiUtCreateInternalObject (ACPI_TYPE_LOCAL_NOTIFY);
-        if (!NotifyObj)
-        {
-            Status = AE_NO_MEMORY;
-            goto UnlockAndExit;
-        }
-
-        NotifyObj->Notify.Node    = Node;
-        NotifyObj->Notify.Handler = Handler;
-        NotifyObj->Notify.Context = Context;
-
-        if (HandlerType & ACPI_SYSTEM_NOTIFY)
-        {
-            ObjDesc->CommonNotify.SystemNotify = NotifyObj;
-        }
-
-        if (HandlerType & ACPI_DEVICE_NOTIFY)
-        {
-            ObjDesc->CommonNotify.DeviceNotify = NotifyObj;
-        }
-
-        if (HandlerType == ACPI_ALL_NOTIFY)
-        {
-            /* Extra ref if installed in both */
-
-            AcpiUtAddReference (NotifyObj);
-        }
-    }
-
-
-UnlockAndExit:
-    (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
-    return_ACPI_STATUS (Status);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiInstallNotifyHandler)
-
-
-/*******************************************************************************
- *
- * FUNCTION:    AcpiRemoveNotifyHandler
- *
- * PARAMETERS:  Device          - The device for which notifies will be handled
- *              HandlerType     - The type of handler:
- *                                  ACPI_SYSTEM_NOTIFY: SystemHandler (00-7f)
- *                                  ACPI_DEVICE_NOTIFY: DriverHandler (80-ff)
- *                                  ACPI_ALL_NOTIFY:  both system and device
- *              Handler         - Address of the handler
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Remove a handler for notifies on an ACPI device
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiRemoveNotifyHandler (
-    ACPI_HANDLE             Device,
-    UINT32                  HandlerType,
-    ACPI_NOTIFY_HANDLER     Handler)
-{
-    ACPI_OPERAND_OBJECT     *NotifyObj;
-    ACPI_OPERAND_OBJECT     *ObjDesc;
-    ACPI_NAMESPACE_NODE     *Node;
-    ACPI_STATUS             Status;
-
-
-    ACPI_FUNCTION_TRACE (AcpiRemoveNotifyHandler);
-
-
-    /* Parameter validation */
-
-    if ((!Device)  ||
-        (!Handler) ||
-        (HandlerType > ACPI_MAX_NOTIFY_HANDLER_TYPE))
-    {
-        return_ACPI_STATUS (AE_BAD_PARAMETER);
-    }
-
-    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
-    if (ACPI_FAILURE (Status))
-    {
-        return_ACPI_STATUS (Status);
-    }
-
-    /* Convert and validate the device handle */
-
-    Node = AcpiNsValidateHandle (Device);
-    if (!Node)
-    {
-        Status = AE_BAD_PARAMETER;
-        goto UnlockAndExit;
-    }
-
-    /* Root Object */
-
-    if (Device == ACPI_ROOT_OBJECT)
-    {
-        ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
-            "Removing notify handler for namespace root object\n"));
-
-        if (((HandlerType & ACPI_SYSTEM_NOTIFY) &&
-              !AcpiGbl_SystemNotify.Handler)        ||
-            ((HandlerType & ACPI_DEVICE_NOTIFY) &&
-              !AcpiGbl_DeviceNotify.Handler))
-        {
-            Status = AE_NOT_EXIST;
-            goto UnlockAndExit;
-        }
-
-        if (HandlerType & ACPI_SYSTEM_NOTIFY)
-        {
-            AcpiGbl_SystemNotify.Node    = NULL;
-            AcpiGbl_SystemNotify.Handler = NULL;
-            AcpiGbl_SystemNotify.Context = NULL;
-        }
-
-        if (HandlerType & ACPI_DEVICE_NOTIFY)
-        {
-            AcpiGbl_DeviceNotify.Node    = NULL;
-            AcpiGbl_DeviceNotify.Handler = NULL;
-            AcpiGbl_DeviceNotify.Context = NULL;
-        }
-    }
-
-    /* All Other Objects */
-
-    else
-    {
-        /* Notifies allowed on this object? */
-
-        if (!AcpiEvIsNotifyObject (Node))
-        {
-            Status = AE_TYPE;
-            goto UnlockAndExit;
-        }
-
-        /* Check for an existing internal object */
-
-        ObjDesc = AcpiNsGetAttachedObject (Node);
-        if (!ObjDesc)
-        {
-            Status = AE_NOT_EXIST;
-            goto UnlockAndExit;
-        }
-
-        /* Object exists - make sure there's an existing handler */
-
-        if (HandlerType & ACPI_SYSTEM_NOTIFY)
-        {
-            NotifyObj = ObjDesc->CommonNotify.SystemNotify;
-            if (!NotifyObj)
-            {
-                Status = AE_NOT_EXIST;
-                goto UnlockAndExit;
-            }
-
-            if (NotifyObj->Notify.Handler != Handler)
-            {
-                Status = AE_BAD_PARAMETER;
-                goto UnlockAndExit;
-            }
-
-            /* Remove the handler */
-
-            ObjDesc->CommonNotify.SystemNotify = NULL;
-            AcpiUtRemoveReference (NotifyObj);
-        }
-
-        if (HandlerType & ACPI_DEVICE_NOTIFY)
-        {
-            NotifyObj = ObjDesc->CommonNotify.DeviceNotify;
-            if (!NotifyObj)
-            {
-                Status = AE_NOT_EXIST;
-                goto UnlockAndExit;
-            }
-
-            if (NotifyObj->Notify.Handler != Handler)
-            {
-                Status = AE_BAD_PARAMETER;
-                goto UnlockAndExit;
-            }
-
-            /* Remove the handler */
-
-            ObjDesc->CommonNotify.DeviceNotify = NULL;
-            AcpiUtRemoveReference (NotifyObj);
-        }
-    }
-
-
-UnlockAndExit:
-    (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
-    return_ACPI_STATUS (Status);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiRemoveNotifyHandler)
-
-
-/*******************************************************************************
- *
  * FUNCTION:    AcpiInstallGpeHandler
  *
  * PARAMETERS:  GpeDevice       - Namespace node for the GPE (NULL for FADT
@@ -821,6 +970,10 @@
         return_ACPI_STATUS (AE_BAD_PARAMETER);
     }
 
+    /* Make sure all deferred GPE tasks are completed */
+
+    AcpiOsWaitEventsComplete ();
+
     Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
     if (ACPI_FAILURE (Status))
     {
@@ -975,3 +1128,4 @@
 
 ACPI_EXPORT_SYMBOL (AcpiReleaseGlobalLock)
 
+#endif /* !ACPI_REDUCED_HARDWARE */
--- a/sys/external/bsd/acpica/dist/executer/exconfig.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exconfig.c	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -50,6 +50,7 @@
 #include "actables.h"
 #include "acdispat.h"
 #include "acevents.h"
+#include "amlcode.h"
 
 
 #define _COMPONENT          ACPI_EXECUTER
@@ -179,20 +180,21 @@
     ACPI_FUNCTION_TRACE (ExLoadTableOp);
 
 
-    /* Validate lengths for the SignatureString, OEMIDString, OEMTableID */
+    /* Validate lengths for the Signature, OemId, and OemTableId strings */
 
     if ((Operand[0]->String.Length > ACPI_NAME_SIZE) ||
         (Operand[1]->String.Length > ACPI_OEM_ID_SIZE) ||
         (Operand[2]->String.Length > ACPI_OEM_TABLE_ID_SIZE))
     {
-        return_ACPI_STATUS (AE_BAD_PARAMETER);
+        return_ACPI_STATUS (AE_AML_STRING_LIMIT);
     }
 
     /* Find the ACPI table in the RSDT/XSDT */
 
-    Status = AcpiTbFindTable (Operand[0]->String.Pointer,
-                              Operand[1]->String.Pointer,
-                              Operand[2]->String.Pointer, &TableIndex);
+    Status = AcpiTbFindTable (
+                Operand[0]->String.Pointer,
+                Operand[1]->String.Pointer,
+                Operand[2]->String.Pointer, &TableIndex);
     if (ACPI_FAILURE (Status))
     {
         if (Status != AE_NOT_FOUND)
@@ -222,7 +224,7 @@
     if (Operand[3]->String.Length > 0)
     {
         /*
-         * Find the node referenced by the RootPathString.  This is the
+         * Find the node referenced by the RootPathString. This is the
          * location within the namespace where the table will be loaded.
          */
         Status = AcpiNsGetNode (StartNode, Operand[3]->String.Pointer,
@@ -237,8 +239,8 @@
 
     if (Operand[4]->String.Length > 0)
     {
-        if ((Operand[4]->String.Pointer[0] != '\\') &&
-            (Operand[4]->String.Pointer[0] != '^'))
+        if ((Operand[4]->String.Pointer[0] != AML_ROOT_PREFIX) &&
+            (Operand[4]->String.Pointer[0] != AML_PARENT_PREFIX))
         {
             /*
              * Path is not absolute, so it will be relative to the node
@@ -299,7 +301,7 @@
     }
 
     *ReturnDesc = DdbHandle;
-    return_ACPI_STATUS  (Status);
+    return_ACPI_STATUS (Status);
 }
 
 
@@ -334,7 +336,7 @@
 
     for (i = 0; i < Length; i++)
     {
-        Status = AcpiEvAddressSpaceDispatch (ObjDesc, ACPI_READ,
+        Status = AcpiEvAddressSpaceDispatch (ObjDesc, NULL, ACPI_READ,
                     RegionOffset, 8, &Value);
         if (ACPI_FAILURE (Status))
         {
@@ -481,7 +483,6 @@
         TableDesc.Address = ObjDesc->Region.Address;
         break;
 
-
     case ACPI_TYPE_BUFFER: /* Buffer or resolved RegionField */
 
         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
@@ -524,8 +525,8 @@
         TableDesc.Address = ACPI_TO_INTEGER (TableDesc.Pointer);
         break;
 
+    default:
 
-    default:
         return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
     }
 
@@ -641,7 +642,7 @@
         (DdbHandle->Common.Type != ACPI_TYPE_LOCAL_REFERENCE) ||
         (!(DdbHandle->Common.Flags & AOPOBJ_DATA_VALID)))
     {
-        return_ACPI_STATUS (AE_BAD_PARAMETER);
+        return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
     }
 
     /* Get the table index from the DdbHandle */
@@ -685,4 +686,3 @@
     DdbHandle->Common.Flags &= ~AOPOBJ_DATA_VALID;
     return_ACPI_STATUS (AE_OK);
 }
-
--- a/sys/external/bsd/acpica/dist/executer/exdebug.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exdebug.c	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -160,9 +160,9 @@
     case ACPI_TYPE_BUFFER:
 
         AcpiOsPrintf ("[0x%.2X]\n", (UINT32) SourceDesc->Buffer.Length);
-        AcpiUtDumpBuffer2 (SourceDesc->Buffer.Pointer,
+        AcpiUtDumpBuffer (SourceDesc->Buffer.Pointer,
             (SourceDesc->Buffer.Length < 256) ?
-                SourceDesc->Buffer.Length : 256, DB_BYTE_DISPLAY);
+                SourceDesc->Buffer.Length : 256, DB_BYTE_DISPLAY, 0);
         break;
 
     case ACPI_TYPE_STRING:
@@ -203,9 +203,10 @@
             /* Case for DdbHandle */
 
             AcpiOsPrintf ("Table Index 0x%X\n", SourceDesc->Reference.Value);
-            return;
+            return_VOID;
 
         default:
+
             break;
         }
 
@@ -239,6 +240,7 @@
                     break;
 
                 default:
+
                     AcpiExDoDebugObject ((SourceDesc->Reference.Node)->Object,
                         Level+4, 0);
                     break;
@@ -272,5 +274,3 @@
     return_VOID;
 }
 #endif
-
-
--- a/sys/external/bsd/acpica/dist/executer/exdump.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exdump.c	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -131,8 +131,8 @@
 {
     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpDevice),         NULL},
     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.Handler),               "Handler"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.SystemNotify),          "System Notify"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.DeviceNotify),          "Device Notify"}
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.NotifyList[0]),         "System Notify"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.NotifyList[1]),         "Device Notify"}
 };
 
 static ACPI_EXDUMP_INFO     AcpiExDumpEvent[2] =
@@ -179,8 +179,8 @@
     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpPower),          NULL},
     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (PowerResource.SystemLevel),    "System Level"},
     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (PowerResource.ResourceOrder),  "Resource Order"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.SystemNotify),   "System Notify"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.DeviceNotify),   "Device Notify"}
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.NotifyList[0]),  "System Notify"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.NotifyList[1]),  "Device Notify"}
 };
 
 static ACPI_EXDUMP_INFO     AcpiExDumpProcessor[7] =
@@ -189,16 +189,16 @@
     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Processor.ProcId),             "Processor ID"},
     {ACPI_EXD_UINT8 ,   ACPI_EXD_OFFSET (Processor.Length),             "Length"},
     {ACPI_EXD_ADDRESS,  ACPI_EXD_OFFSET (Processor.Address),            "Address"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.SystemNotify),       "System Notify"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.DeviceNotify),       "Device Notify"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.NotifyList[0]),      "System Notify"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.NotifyList[1]),      "Device Notify"},
     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.Handler),            "Handler"}
 };
 
 static ACPI_EXDUMP_INFO     AcpiExDumpThermal[4] =
 {
     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpThermal),        NULL},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.SystemNotify),     "System Notify"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.DeviceNotify),     "Device Notify"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.NotifyList[0]),    "System Notify"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.NotifyList[1]),    "Device Notify"},
     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.Handler),          "Handler"}
 };
 
@@ -209,11 +209,13 @@
     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (BufferField.BufferObj),        "Buffer Object"}
 };
 
-static ACPI_EXDUMP_INFO     AcpiExDumpRegionField[3] =
+static ACPI_EXDUMP_INFO     AcpiExDumpRegionField[5] =
 {
     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpRegionField),    NULL},
     {ACPI_EXD_FIELD,    0,                                              NULL},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Field.RegionObj),              "Region Object"}
+    {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Field.AccessLength),           "AccessLength"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Field.RegionObj),              "Region Object"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Field.ResourceBuffer),         "ResourceBuffer"}
 };
 
 static ACPI_EXDUMP_INFO     AcpiExDumpBankField[5] =
@@ -256,11 +258,15 @@
     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (AddressSpace.Context),         "Context"}
 };
 
-static ACPI_EXDUMP_INFO     AcpiExDumpNotify[3] =
+static ACPI_EXDUMP_INFO     AcpiExDumpNotify[7] =
 {
     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpNotify),         NULL},
     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Node),                  "Node"},
-    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Context),               "Context"}
+    {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (Notify.HandlerType),           "Handler Type"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Handler),               "Handler"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Context),               "Context"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Next[0]),               "Next System Notify"},
+    {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Next[1]),               "Next Device Notify"}
 };
 
 
@@ -351,6 +357,7 @@
 {
     UINT8                   *Target;
     char                    *Name;
+    const char              *ReferenceName;
     UINT8                   Count;
 
 
@@ -374,6 +381,7 @@
         switch (Info->Opcode)
         {
         case ACPI_EXD_INIT:
+
             break;
 
         case ACPI_EXD_TYPE:
@@ -434,8 +442,8 @@
 
         case ACPI_EXD_REFERENCE:
 
-            AcpiExOutString ("Class Name",
-                ACPI_CAST_PTR (char, AcpiUtGetReferenceName (ObjDesc)));
+            ReferenceName = AcpiUtGetReferenceName (ObjDesc);
+            AcpiExOutString ("Class Name", ACPI_CAST_PTR (char, ReferenceName));
             AcpiExDumpReferenceObj (ObjDesc);
             break;
 
@@ -477,7 +485,9 @@
     ACPI_FUNCTION_NAME (ExDumpOperand)
 
 
-    if (!((ACPI_LV_EXEC & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
+    /* Check if debug output enabled */
+
+    if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_EXEC, _COMPONENT))
     {
         return;
     }
@@ -533,19 +543,16 @@
             AcpiOsPrintf ("\n");
             break;
 
-
         case ACPI_REFCLASS_INDEX:
 
             AcpiOsPrintf ("%p\n", ObjDesc->Reference.Object);
             break;
 
-
         case ACPI_REFCLASS_TABLE:
 
             AcpiOsPrintf ("Table Index %X\n", ObjDesc->Reference.Value);
             break;
 
-
         case ACPI_REFCLASS_REFOF:
 
             AcpiOsPrintf ("%p [%s]\n", ObjDesc->Reference.Object,
@@ -553,20 +560,17 @@
                     ObjDesc->Reference.Object)->Common.Type));
             break;
 
-
         case ACPI_REFCLASS_NAME:
 
             AcpiOsPrintf ("- [%4.4s]\n", ObjDesc->Reference.Node->Name.Ascii);
             break;
 
-
         case ACPI_REFCLASS_ARG:
         case ACPI_REFCLASS_LOCAL:
 
             AcpiOsPrintf ("%X\n", ObjDesc->Reference.Value);
             break;
 
-
         default:    /* Unknown reference class */
 
             AcpiOsPrintf ("%2.2X\n", ObjDesc->Reference.Class);
@@ -574,7 +578,6 @@
         }
         break;
 
-
     case ACPI_TYPE_BUFFER:
 
         AcpiOsPrintf ("Buffer length %.2X @ %p\n",
@@ -596,14 +599,12 @@
         }
         break;
 
-
     case ACPI_TYPE_INTEGER:
 
         AcpiOsPrintf ("Integer %8.8X%8.8X\n",
             ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
         break;
 
-
     case ACPI_TYPE_PACKAGE:
 
         AcpiOsPrintf ("Package [Len %X] ElementArray %p\n",
@@ -624,7 +625,6 @@
         }
         break;
 
-
     case ACPI_TYPE_REGION:
 
         AcpiOsPrintf ("Region %s (%X)",
@@ -647,7 +647,6 @@
         }
         break;
 
-
     case ACPI_TYPE_STRING:
 
         AcpiOsPrintf ("String length %X @ %p ",
@@ -658,13 +657,11 @@
         AcpiOsPrintf ("\n");
         break;
 
-
     case ACPI_TYPE_LOCAL_BANK_FIELD:
 
         AcpiOsPrintf ("BankField\n");
         break;
 
-
     case ACPI_TYPE_LOCAL_REGION_FIELD:
 
         AcpiOsPrintf ("RegionField: Bits=%X AccWidth=%X Lock=%X Update=%X at "
@@ -679,13 +676,11 @@
         AcpiExDumpOperand (ObjDesc->Field.RegionObj, Depth+1);
         break;
 
-
     case ACPI_TYPE_LOCAL_INDEX_FIELD:
 
         AcpiOsPrintf ("IndexField\n");
         break;
 
-
     case ACPI_TYPE_BUFFER_FIELD:
 
         AcpiOsPrintf ("BufferField: %X bits at byte %X bit %X of\n",
@@ -708,13 +703,11 @@
         }
         break;
 
-
     case ACPI_TYPE_EVENT:
 
         AcpiOsPrintf ("Event\n");
         break;
 
-
     case ACPI_TYPE_METHOD:
 
         AcpiOsPrintf ("Method(%X) @ %p:%X\n",
@@ -723,38 +716,33 @@
             ObjDesc->Method.AmlLength);
         break;
 
-
     case ACPI_TYPE_MUTEX:
 
         AcpiOsPrintf ("Mutex\n");
         break;
 
-
     case ACPI_TYPE_DEVICE:
 
         AcpiOsPrintf ("Device\n");
         break;
 
-
     case ACPI_TYPE_POWER:
 
         AcpiOsPrintf ("Power\n");
         break;
 
-
     case ACPI_TYPE_PROCESSOR:
 
         AcpiOsPrintf ("Processor\n");
         break;
 
-
     case ACPI_TYPE_THERMAL:
 
         AcpiOsPrintf ("Thermal\n");
         break;
 
+    default:
 
-    default:
         /* Unknown Type */
 
         AcpiOsPrintf ("Unknown Type %X\n", ObjDesc->Common.Type);
@@ -822,7 +810,7 @@
  * PARAMETERS:  Title               - Descriptive text
  *              Value               - Value to be displayed
  *
- * DESCRIPTION: Object dump output formatting functions.  These functions
+ * DESCRIPTION: Object dump output formatting functions. These functions
  *              reduce the number of format strings required and keeps them
  *              all in one place for easy modification.
  *
@@ -867,7 +855,9 @@
 
     if (!Flags)
     {
-        if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
+        /* Check if debug output enabled */
+
+        if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_OBJECTS, _COMPONENT))
         {
             return;
         }
@@ -995,24 +985,19 @@
             ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
         break;
 
-
     case ACPI_TYPE_STRING:
 
         AcpiOsPrintf ("[String]  Value: ");
-        for (i = 0; i < ObjDesc->String.Length; i++)
-        {
-            AcpiOsPrintf ("%c", ObjDesc->String.Pointer[i]);
-        }
+        AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX);
         AcpiOsPrintf ("\n");
         break;
 
-
     case ACPI_TYPE_BUFFER:
 
         AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
         if (ObjDesc->Buffer.Length)
         {
-            AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
+            AcpiUtDebugDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
                 ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
         }
         else
@@ -1021,7 +1006,6 @@
         }
         break;
 
-
     case ACPI_TYPE_PACKAGE:
 
         AcpiOsPrintf ("[Package] Contains %u Elements:\n",
@@ -1033,7 +1017,6 @@
         }
         break;
 
-
     case ACPI_TYPE_LOCAL_REFERENCE:
 
         AcpiOsPrintf ("[Object Reference] Type [%s] %2.2X",
@@ -1042,7 +1025,6 @@
         AcpiExDumpReferenceObj (ObjDesc);
         break;
 
-
     default:
 
         AcpiOsPrintf ("[Unknown Type] %X\n", ObjDesc->Common.Type);
@@ -1077,7 +1059,9 @@
 
     if (!Flags)
     {
-        if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
+        /* Check if debug output enabled */
+
+        if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_OBJECTS, _COMPONENT))
         {
             return_VOID;
         }
@@ -1119,4 +1103,3 @@
 }
 
 #endif
-
--- a/sys/external/bsd/acpica/dist/hardware/hwesleep.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/hardware/hwesleep.c	Fri Dec 27 18:50:56 2013 +0000
@@ -242,8 +242,8 @@
 
     /* Execute the wake methods */
 
-    AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WAKING);
-    AcpiHwExecuteSleepMethod (METHOD_PATHNAME__WAK, SleepState);
+    AcpiHwExecuteSleepMethod (__UNCONST(METHOD_PATHNAME__SST), ACPI_SST_WAKING);
+    AcpiHwExecuteSleepMethod (__UNCONST(METHOD_PATHNAME__WAK), SleepState);
 
     /*
      * Some BIOS code assumes that WAK_STS will be cleared on resume
@@ -253,6 +253,6 @@
     (void) AcpiWrite ((UINT64) ACPI_X_WAKE_STATUS, &AcpiGbl_FADT.SleepStatus);
     AcpiGbl_SystemAwakeAndRunning = TRUE;
 
-    AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING);
+    AcpiHwExecuteSleepMethod (__UNCONST(METHOD_PATHNAME__SST), ACPI_SST_WORKING);
     return_ACPI_STATUS (AE_OK);
 }
--- a/sys/external/bsd/acpica/dist/hardware/hwsleep.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/hardware/hwsleep.c	Fri Dec 27 18:50:56 2013 +0000
@@ -301,7 +301,7 @@
     /* Ensure EnterSleepStatePrep -> EnterSleepState ordering */
 
     AcpiGbl_SleepTypeA = ACPI_SLEEP_TYPE_INVALID;
-    AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WAKING);
+    AcpiHwExecuteSleepMethod (__UNCONST(METHOD_PATHNAME__SST), ACPI_SST_WAKING);
 
     /*
      * GPEs must be enabled before _WAK is called as GPEs
@@ -327,7 +327,7 @@
      * Now we can execute _WAK, etc. Some machines require that the GPEs
      * are enabled before the wake methods are executed.
      */
-    AcpiHwExecuteSleepMethod (METHOD_PATHNAME__WAK, SleepState);
+    AcpiHwExecuteSleepMethod (__UNCONST(METHOD_PATHNAME__WAK), SleepState);
 
     /*
      * Some BIOS code assumes that WAK_STS will be cleared on resume
@@ -347,7 +347,7 @@
             AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].StatusRegisterId,
             ACPI_CLEAR_STATUS);
 
-    AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING);
+    AcpiHwExecuteSleepMethod (__UNCONST(METHOD_PATHNAME__SST), ACPI_SST_WORKING);
     return_ACPI_STATUS (Status);
 }
 
--- a/sys/external/bsd/acpica/dist/hardware/hwxfsleep.c	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/hardware/hwxfsleep.c	Fri Dec 27 18:50:56 2013 +0000
@@ -380,7 +380,7 @@
      * Set the system indicators to show the desired sleep state.
      * _SST is an optional method (return no error if not found)
      */
-    AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, SstValue);
+    AcpiHwExecuteSleepMethod (__UNCONST(METHOD_PATHNAME__SST), SstValue);
     return_ACPI_STATUS (AE_OK);
 }
 
--- a/sys/external/bsd/acpica/dist/include/acapps.h	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/include/acapps.h	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -52,7 +52,7 @@
 /* Common info for tool signons */
 
 #define ACPICA_NAME                 "Intel ACPI Component Architecture"
-#define ACPICA_COPYRIGHT            "Copyright (c) 2000 - 2011 Intel Corporation"
+#define ACPICA_COPYRIGHT            "Copyright (c) 2000 - 2013 Intel Corporation"
 
 #if ACPI_MACHINE_WIDTH == 64
 #define ACPI_WIDTH          "-64"
@@ -86,6 +86,15 @@
     Prefix, ACPICA_COPYRIGHT, \
     Prefix
 
+/* Macros for usage messages */
+
+#define ACPI_USAGE_HEADER(Usage) \
+    printf ("Usage: %s\nOptions:\n", Usage);
+
+#define ACPI_OPTION(Name, Description) \
+    printf ("  %-18s%s\n", Name, Description);
+
+
 #define FILE_SUFFIX_DISASSEMBLY     "dsl"
 #define ACPI_TABLE_FILE_SUFFIX      ".dat"
 
@@ -99,11 +108,18 @@
     char                    **argv,
     char                    *opts);
 
+int
+AcpiGetoptArgument (
+    int                     argc,
+    char                    **argv);
+
 extern int                  AcpiGbl_Optind;
 extern int                  AcpiGbl_Opterr;
+extern int                  AcpiGbl_SubOptChar;
 extern char                 *AcpiGbl_Optarg;
 
 
+#ifndef ACPI_DUMP_APP
 /*
  * adisasm
  */
@@ -208,6 +224,6 @@
     UINT32                  Length,
     char                    *TableName,
     char                    *OemTableId);
+#endif
 
 #endif /* _ACAPPS */
-
--- a/sys/external/bsd/acpica/dist/include/acdebug.h	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/include/acdebug.h	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -47,25 +47,33 @@
 
 #define ACPI_DEBUG_BUFFER_SIZE  0x4000      /* 16K buffer for return objects */
 
-typedef struct CommandInfo
+typedef struct acpi_db_command_info
 {
     const char              *Name;          /* Command Name */
     UINT8                   MinArgs;        /* Minimum arguments required */
 
-} COMMAND_INFO;
+} ACPI_DB_COMMAND_INFO;
 
-typedef struct ArgumentInfo
+typedef struct acpi_db_command_help
+{
+    UINT8                   LineCount;      /* Number of help lines */
+    char                    *Invocation;    /* Command Invocation */
+    char                    *Description;   /* Command Description */
+
+} ACPI_DB_COMMAND_HELP;
+
+typedef struct acpi_db_argument_info
 {
     const char              *Name;          /* Argument Name */
 
-} ARGUMENT_INFO;
+} ACPI_DB_ARGUMENT_INFO;
 
-typedef struct acpi_execute_walk
+typedef struct acpi_db_execute_walk
 {
     UINT32                  Count;
     UINT32                  MaxCount;
 
-} ACPI_EXECUTE_WALK;
+} ACPI_DB_EXECUTE_WALK;
 
 
 #define PARAM_LIST(pl)                  pl
@@ -107,9 +115,12 @@
     char                    *TableArg);
 
 void
+AcpiDbDisplayTemplate (
+    char                    *BufferArg);
+
+void
 AcpiDbUnloadAcpiTable (
-    char                    *TableArg,
-    char                    *InstanceArg);
+    char                    *Name);
 
 void
 AcpiDbSendNotify (
@@ -133,18 +144,52 @@
 AcpiDbDisplayResources (
     char                    *ObjectArg);
 
+ACPI_HW_DEPENDENT_RETURN_VOID (
 void
 AcpiDbDisplayGpes (
-    void);
+    void))
 
 void
 AcpiDbDisplayHandlers (
     void);
 
+ACPI_HW_DEPENDENT_RETURN_VOID (
 void
 AcpiDbGenerateGpe (
     char                    *GpeArg,
-    char                    *BlockArg);
+    char                    *BlockArg))
+
+ACPI_HW_DEPENDENT_RETURN_VOID (
+void
+AcpiDbGenerateSci (
+    void))
+
+/*
+ * dbconvert - miscellaneous conversion routines
+ */
+ACPI_STATUS
+AcpiDbHexCharToValue (
+    int                     HexChar,
+    UINT8                   *ReturnValue);
+
+ACPI_STATUS
+AcpiDbConvertToPackage (
+    char                    *String,
+    ACPI_OBJECT             *Object);
+
+ACPI_STATUS
+AcpiDbConvertToObject (
+    ACPI_OBJECT_TYPE        Type,
+    char                    *String,
+    ACPI_OBJECT             *Object);
+
+UINT8 *
+AcpiDbEncodePldBuffer (
+    ACPI_PLD_INFO           *PldInfo);
+
+void
+AcpiDbDumpPldBuffer (
+    ACPI_OBJECT             *ObjDesc);
 
 
 /*
@@ -193,6 +238,10 @@
     char                    *DepthArg);
 
 void
+AcpiDbDumpNamespacePaths (
+    void);
+
+void
 AcpiDbDumpNamespaceByOwner (
     char                    *OwnerArg,
     char                    *DepthArg);
@@ -286,6 +335,11 @@
     char                    *NumLoopsArg,
     char                    *MethodNameArg);
 
+void
+AcpiDbDeleteObjects (
+    UINT32                  Count,
+    ACPI_OBJECT             *Objects);
+
 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
 UINT32
 AcpiDbGetCacheInfo (
@@ -299,7 +353,7 @@
 ACPI_OBJECT_TYPE
 AcpiDbMatchArgument (
     char                    *UserArgument,
-    ARGUMENT_INFO           *Arguments);
+    ACPI_DB_ARGUMENT_INFO   *Arguments);
 
 void
 AcpiDbCloseDebugFile (
@@ -339,6 +393,10 @@
 AcpiDbGetFromHistory (
     char                    *CommandNumArg);
 
+char *
+AcpiDbGetHistoryByIndex (
+    UINT32                  CommanddNum);
+
 
 /*
  * dbinput - user front-end to the AML debugger
@@ -399,7 +457,7 @@
     char                    *Name);
 
 void
-AcpiDbUInt32ToHexString (
+AcpiDbUint32ToHexString (
     UINT32                  Value,
     char                    *Buffer);
 
--- a/sys/external/bsd/acpica/dist/include/acdisasm.h	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/include/acdisasm.h	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -63,74 +63,101 @@
 typedef const struct acpi_dmtable_info
 {
     UINT8                       Opcode;
-    UINT8                       Offset;
+    UINT16                      Offset;
     char                        *Name;
     UINT8                       Flags;
 
 } ACPI_DMTABLE_INFO;
 
+/* Values for Flags field above */
+
 #define DT_LENGTH                       0x01    /* Field is a subtable length */
 #define DT_FLAG                         0x02    /* Field is a flag value */
 #define DT_NON_ZERO                     0x04    /* Field must be non-zero */
-
-/* TBD: Not used at this time */
-
-#define DT_OPTIONAL                     0x08
-#define DT_COUNT                        0x10
+#define DT_OPTIONAL                     0x08    /* Field is optional */
+#define DT_DESCRIBES_OPTIONAL           0x10    /* Field describes an optional field (length, etc.) */
+#define DT_COUNT                        0x20    /* Currently not used */
 
 /*
  * Values for Opcode above.
- * Note: 0-7 must not change, used as a flag shift value
+ * Note: 0-7 must not change, they are used as a flag shift value. Other
+ * than those, new values can be added wherever appropriate.
  */
-#define ACPI_DMT_FLAG0                  0
-#define ACPI_DMT_FLAG1                  1
-#define ACPI_DMT_FLAG2                  2
-#define ACPI_DMT_FLAG3                  3
-#define ACPI_DMT_FLAG4                  4
-#define ACPI_DMT_FLAG5                  5
-#define ACPI_DMT_FLAG6                  6
-#define ACPI_DMT_FLAG7                  7
-#define ACPI_DMT_FLAGS0                 8
-#define ACPI_DMT_FLAGS2                 9
-#define ACPI_DMT_UINT8                  10
-#define ACPI_DMT_UINT16                 11
-#define ACPI_DMT_UINT24                 12
-#define ACPI_DMT_UINT32                 13
-#define ACPI_DMT_UINT56                 14
-#define ACPI_DMT_UINT64                 15
-#define ACPI_DMT_STRING                 16
-#define ACPI_DMT_NAME4                  17
-#define ACPI_DMT_NAME6                  18
-#define ACPI_DMT_NAME8                  19
-#define ACPI_DMT_CHKSUM                 20
-#define ACPI_DMT_SPACEID                21
-#define ACPI_DMT_GAS                    22
-#define ACPI_DMT_ASF                    23
-#define ACPI_DMT_DMAR                   24
-#define ACPI_DMT_HEST                   25
-#define ACPI_DMT_HESTNTFY               26
-#define ACPI_DMT_HESTNTYP               27
-#define ACPI_DMT_MADT                   28
-#define ACPI_DMT_SRAT                   29
-#define ACPI_DMT_EXIT                   30
-#define ACPI_DMT_SIG                    31
-#define ACPI_DMT_FADTPM                 32
-#define ACPI_DMT_BUF16                  33
-#define ACPI_DMT_IVRS                   34
-#define ACPI_DMT_BUFFER                 35
-#define ACPI_DMT_PCI_PATH               36
-#define ACPI_DMT_EINJACT                37
-#define ACPI_DMT_EINJINST               38
-#define ACPI_DMT_ERSTACT                39
-#define ACPI_DMT_ERSTINST               40
-#define ACPI_DMT_ACCWIDTH               41
-#define ACPI_DMT_UNICODE                42
-#define ACPI_DMT_UUID                   43
-#define ACPI_DMT_DEVICE_PATH            44
-#define ACPI_DMT_LABEL                  45
-#define ACPI_DMT_BUF7                   46
-#define ACPI_DMT_BUF128                 47
-#define ACPI_DMT_SLIC                   48
+typedef enum
+{
+    /* Simple Data Types */
+
+    ACPI_DMT_FLAG0          = 0,
+    ACPI_DMT_FLAG1          = 1,
+    ACPI_DMT_FLAG2          = 2,
+    ACPI_DMT_FLAG3          = 3,
+    ACPI_DMT_FLAG4          = 4,
+    ACPI_DMT_FLAG5          = 5,
+    ACPI_DMT_FLAG6          = 6,
+    ACPI_DMT_FLAG7          = 7,
+    ACPI_DMT_FLAGS0,
+    ACPI_DMT_FLAGS1,
+    ACPI_DMT_FLAGS2,
+    ACPI_DMT_FLAGS4,
+    ACPI_DMT_UINT8,
+    ACPI_DMT_UINT16,
+    ACPI_DMT_UINT24,
+    ACPI_DMT_UINT32,
+    ACPI_DMT_UINT40,
+    ACPI_DMT_UINT48,
+    ACPI_DMT_UINT56,
+    ACPI_DMT_UINT64,
+    ACPI_DMT_BUF7,
+    ACPI_DMT_BUF10,
+    ACPI_DMT_BUF16,
+    ACPI_DMT_BUF128,
+    ACPI_DMT_SIG,
+    ACPI_DMT_STRING,
+    ACPI_DMT_NAME4,
+    ACPI_DMT_NAME6,
+    ACPI_DMT_NAME8,
+
+    /* Types that are decoded to strings and miscellaneous */
+
+    ACPI_DMT_ACCWIDTH,
+    ACPI_DMT_CHKSUM,
+    ACPI_DMT_GAS,
+    ACPI_DMT_SPACEID,
+    ACPI_DMT_UNICODE,
+    ACPI_DMT_UUID,
+
+    /* Types used only for the Data Table Compiler */
+
+    ACPI_DMT_BUFFER,
+    ACPI_DMT_DEVICE_PATH,
+    ACPI_DMT_LABEL,
+    ACPI_DMT_PCI_PATH,
+
+    /* Types that are specific to particular ACPI tables */
+
+    ACPI_DMT_ASF,
+    ACPI_DMT_DMAR,
+    ACPI_DMT_EINJACT,
+    ACPI_DMT_EINJINST,
+    ACPI_DMT_ERSTACT,
+    ACPI_DMT_ERSTINST,
+    ACPI_DMT_FADTPM,
+    ACPI_DMT_HEST,
+    ACPI_DMT_HESTNTFY,
+    ACPI_DMT_HESTNTYP,
+    ACPI_DMT_IVRS,
+    ACPI_DMT_MADT,
+    ACPI_DMT_PCCT,
+    ACPI_DMT_PMTT,
+    ACPI_DMT_SLIC,
+    ACPI_DMT_SRAT,
+
+    /* Special opcodes */
+
+    ACPI_DMT_EXTRA_TEXT,
+    ACPI_DMT_EXIT
+
+} ACPI_ENTRY_TYPES;
 
 typedef
 void (*ACPI_DMTABLE_HANDLER) (
@@ -175,6 +202,11 @@
 #define ASL_WALK_CALLBACK_DEFINED
 #endif
 
+typedef
+void (*ACPI_RESOURCE_HANDLER) (
+    AML_RESOURCE            *Resource,
+    UINT32                  Length,
+    UINT32                  Level);
 
 typedef struct acpi_resource_tag
 {
@@ -202,8 +234,18 @@
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoAsfHdr[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoBoot[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoBert[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoBgrt[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoCpep[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoCpep0[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoCsrt0[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoCsrt1[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoCsrt2[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoDbg2[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoDbg2Device[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoDbg2Addr[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoDbg2Size[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoDbg2Name[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoDbg2OemData[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoDbgp[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoDmar[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoDmarHdr[];
@@ -212,6 +254,7 @@
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoDmar1[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoDmar2[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoDmar3[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoDrtm[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoEcdt[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoEinj[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoEinj0[];
@@ -221,7 +264,13 @@
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoFadt1[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoFadt2[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoFadt3[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoFadt5[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoFpdt[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoFpdtHdr[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoFpdt0[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoFpdt1[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoGas[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoGtdt[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoHeader[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoHest[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoHest0[];
@@ -254,14 +303,37 @@
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt8[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt9[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt10[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt11[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt12[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadtHdr[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMcfg[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMcfg0[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMchi[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMpst[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMpst0[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMpst0A[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMpst0B[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMpst1[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMpst2[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMsct[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMsct0[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMtmr[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMtmr0[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPmtt[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPmtt0[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPmtt1[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPmtt1a[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPmtt2[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPmttHdr[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcct[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcctHdr[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcct0[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoRsdp1[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoRsdp2[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3pt[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3ptHdr[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3pt0[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3pt1[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSbst[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSlicHdr[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSlic0[];
@@ -275,7 +347,10 @@
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSrat1[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSrat2[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTcpa[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTpm2[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoUefi[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoVrtc[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoVrtc0[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWaet[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWdat[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWdat0[];
@@ -338,6 +413,14 @@
     ACPI_TABLE_HEADER       *Table);
 
 void
+AcpiDmDumpCsrt (
+    ACPI_TABLE_HEADER       *Table);
+
+void
+AcpiDmDumpDbg2 (
+    ACPI_TABLE_HEADER       *Table);
+
+void
 AcpiDmDumpDmar (
     ACPI_TABLE_HEADER       *Table);
 
@@ -354,6 +437,10 @@
     ACPI_TABLE_HEADER       *Table);
 
 void
+AcpiDmDumpFpdt (
+    ACPI_TABLE_HEADER       *Table);
+
+void
 AcpiDmDumpHest (
     ACPI_TABLE_HEADER       *Table);
 
@@ -362,17 +449,33 @@
     ACPI_TABLE_HEADER       *Table);
 
 void
+AcpiDmDumpMadt (
+    ACPI_TABLE_HEADER       *Table);
+
+void
 AcpiDmDumpMcfg (
     ACPI_TABLE_HEADER       *Table);
 
 void
-AcpiDmDumpMadt (
+AcpiDmDumpMpst (
     ACPI_TABLE_HEADER       *Table);
 
 void
 AcpiDmDumpMsct (
     ACPI_TABLE_HEADER       *Table);
 
+void
+AcpiDmDumpMtmr (
+    ACPI_TABLE_HEADER       *Table);
+
+void
+AcpiDmDumpPcct (
+    ACPI_TABLE_HEADER       *Table);
+
+void
+AcpiDmDumpPmtt (
+    ACPI_TABLE_HEADER       *Table);
+
 UINT32
 AcpiDmDumpRsdp (
     ACPI_TABLE_HEADER       *Table);
@@ -381,6 +484,10 @@
 AcpiDmDumpRsdt (
     ACPI_TABLE_HEADER       *Table);
 
+UINT32
+AcpiDmDumpS3pt (
+    ACPI_TABLE_HEADER       *Table);
+
 void
 AcpiDmDumpSlic (
     ACPI_TABLE_HEADER       *Table);
@@ -394,6 +501,10 @@
     ACPI_TABLE_HEADER       *Table);
 
 void
+AcpiDmDumpVrtc (
+    ACPI_TABLE_HEADER       *Table);
+
+void
 AcpiDmDumpWdat (
     ACPI_TABLE_HEADER       *Table);
 
@@ -441,6 +552,14 @@
     ACPI_PARSE_OBJECT       *Op);
 
 void
+AcpiDmPredefinedDescription (
+    ACPI_PARSE_OBJECT       *Op);
+
+void
+AcpiDmFieldPredefinedDescription (
+    ACPI_PARSE_OBJECT       *Op);
+
+void
 AcpiDmFieldFlags (
     ACPI_PARSE_OBJECT       *Op);
 
@@ -527,11 +646,22 @@
 AcpiDmIsStringBuffer (
     ACPI_PARSE_OBJECT       *Op);
 
+BOOLEAN
+AcpiDmIsPldBuffer (
+    ACPI_PARSE_OBJECT       *Op);
+
+
+/*
+ * dmdeferred
+ */
+ACPI_STATUS
+AcpiDmParseDeferredOps (
+    ACPI_PARSE_OBJECT       *Root);
+
 
 /*
  * dmextern
  */
-
 ACPI_STATUS
 AcpiDmAddToExternalFileList (
     char                    *PathList);
@@ -541,11 +671,19 @@
     void);
 
 void
-AcpiDmAddToExternalList (
+AcpiDmAddOpToExternalList (
     ACPI_PARSE_OBJECT       *Op,
     char                    *Path,
     UINT8                   Type,
-    UINT32                  Value);
+    UINT32                  Value,
+    UINT16                  Flags);
+
+void
+AcpiDmAddNodeToExternalList (
+    ACPI_NAMESPACE_NODE     *Node,
+    UINT8                   Type,
+    UINT32                  Value,
+    UINT16                  Flags);
 
 void
 AcpiDmAddExternalsToNamespace (
@@ -563,6 +701,13 @@
 AcpiDmEmitExternals (
     void);
 
+void
+AcpiDmUnresolvedWarning (
+    UINT8                   Type);
+
+void
+AcpiDmGetExternalsFromFile (
+    void);
 
 /*
  * dmresrc
@@ -596,6 +741,7 @@
 
 ACPI_STATUS
 AcpiDmIsResourceTemplate (
+    ACPI_WALK_STATE         *WalkState,
     ACPI_PARSE_OBJECT       *Op);
 
 void
@@ -671,6 +817,18 @@
     UINT32                  Level);
 
 void
+AcpiDmGpioDescriptor (
+    AML_RESOURCE            *Resource,
+    UINT32                  Length,
+    UINT32                  Level);
+
+void
+AcpiDmSerialBusDescriptor (
+    AML_RESOURCE            *Resource,
+    UINT32                  Length,
+    UINT32                  Level);
+
+void
 AcpiDmVendorCommon (
     const char              *Name,
     UINT8                   *ByteData,
@@ -694,6 +852,12 @@
     UINT32                  Level);
 
 void
+AcpiDmFixedDmaDescriptor (
+    AML_RESOURCE            *Resource,
+    UINT32                  Length,
+    UINT32                  Level);
+
+void
 AcpiDmIoDescriptor (
     AML_RESOURCE            *Resource,
     UINT32                  Length,
--- a/sys/external/bsd/acpica/dist/include/acexcep.h	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/include/acexcep.h	Fri Dec 27 18:50:56 2013 +0000
@@ -74,10 +74,10 @@
  */
 typedef struct acpi_exception_info
 {
-    char                *Name;
+    const char                *Name;
 
 #ifdef ACPI_HELP_APP
-    char                *Description;
+    const char                *Description;
 #endif
 } ACPI_EXCEPTION_INFO;
 
--- a/sys/external/bsd/acpica/dist/include/acglobal.h	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/include/acglobal.h	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -72,7 +72,7 @@
 
 /*
  * Enable "slack" in the AML interpreter?  Default is FALSE, and the
- * interpreter strictly follows the ACPI specification.  Setting to TRUE
+ * interpreter strictly follows the ACPI specification. Setting to TRUE
  * allows the interpreter to ignore certain errors and/or bad AML constructs.
  *
  * Currently, these features are enabled by this flag:
@@ -121,6 +121,25 @@
 UINT8       ACPI_INIT_GLOBAL (AcpiGbl_CopyDsdtLocally, FALSE);
 
 /*
+ * Optionally ignore an XSDT if present and use the RSDT instead.
+ * Although the ACPI specification requires that an XSDT be used instead
+ * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
+ * some machines. Default behavior is to use the XSDT if present.
+ */
+UINT8       ACPI_INIT_GLOBAL (AcpiGbl_DoNotUseXsdt, FALSE);
+
+
+/*
+ * Optionally use 32-bit FADT addresses if and when there is a conflict
+ * (address mismatch) between the 32-bit and 64-bit versions of the
+ * address. Although ACPICA adheres to the ACPI specification which
+ * requires the use of the corresponding 64-bit address if it is non-zero,
+ * some machines have been found to have a corrupted non-zero 64-bit
+ * address. Default is FALSE, do not favor the 32-bit addresses.
+ */
+UINT8       ACPI_INIT_GLOBAL (AcpiGbl_Use32BitFadtAddresses, FALSE);
+
+/*
  * Optionally truncate I/O addresses to 16 bits. Provides compatibility
  * with other ACPI implementations. NOTE: During ACPICA initialization,
  * this value is set to TRUE if any Windows OSI strings have been
@@ -134,6 +153,18 @@
  */
 UINT8       ACPI_INIT_GLOBAL (AcpiGbl_DisableAutoRepair, FALSE);
 
+/*
+ * Optionally do not load any SSDTs from the RSDT/XSDT during initialization.
+ * This can be useful for debugging ACPI problems on some machines.
+ */
+UINT8       ACPI_INIT_GLOBAL (AcpiGbl_DisableSsdtTableLoad, FALSE);
+
+/*
+ * We keep track of the latest version of Windows that has been requested by
+ * the BIOS.
+ */
+UINT8       ACPI_INIT_GLOBAL (AcpiGbl_OsiData, 0);
+
 
 /* AcpiGbl_FADT is a local copy of the FADT, converted to a common format. */
 
@@ -143,7 +174,18 @@
 ACPI_NAME                   AcpiGbl_TraceMethodName;
 BOOLEAN                     AcpiGbl_SystemAwakeAndRunning;
 
-#endif
+/*
+ * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
+ * that the ACPI hardware is no longer required. A flag in the FADT indicates
+ * a reduced HW machine, and that flag is duplicated here for convenience.
+ */
+BOOLEAN                     AcpiGbl_ReducedHardware;
+
+#endif /* DEFINE_ACPI_GLOBALS */
+
+/* Do not disassemble buffers to resource descriptors */
+
+ACPI_EXTERN UINT8       ACPI_INIT_GLOBAL (AcpiGbl_NoResourceDisassembly, FALSE);
 
 /*****************************************************************************
  *
@@ -156,8 +198,12 @@
  * found in the RSDT/XSDT.
  */
 ACPI_EXTERN ACPI_TABLE_LIST             AcpiGbl_RootTableList;
+
+#if (!ACPI_REDUCED_HARDWARE)
 ACPI_EXTERN ACPI_TABLE_FACS            *AcpiGbl_FACS;
 
+#endif /* !ACPI_REDUCED_HARDWARE */
+
 /* These addresses are calculated from the FADT Event Block addresses */
 
 ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1aStatus;
@@ -183,7 +229,7 @@
 
 /*****************************************************************************
  *
- * Mutual exlusion within ACPICA subsystem
+ * Mutual exclusion within ACPICA subsystem
  *
  ****************************************************************************/
 
@@ -213,6 +259,7 @@
  */
 ACPI_EXTERN ACPI_SPINLOCK               AcpiGbl_GpeLock;      /* For GPE data structs and registers */
 ACPI_EXTERN ACPI_SPINLOCK               AcpiGbl_HardwareLock; /* For ACPI H/W except GPE registers */
+ACPI_EXTERN ACPI_SPINLOCK               AcpiGbl_ReferenceCountLock;
 
 /* Mutex for _OSI support */
 
@@ -239,14 +286,14 @@
 
 /* Global handlers */
 
-ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER  AcpiGbl_DeviceNotify;
-ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER  AcpiGbl_SystemNotify;
+ACPI_EXTERN ACPI_GLOBAL_NOTIFY_HANDLER  AcpiGbl_GlobalNotify[2];
 ACPI_EXTERN ACPI_EXCEPTION_HANDLER      AcpiGbl_ExceptionHandler;
 ACPI_EXTERN ACPI_INIT_HANDLER           AcpiGbl_InitHandler;
 ACPI_EXTERN ACPI_TABLE_HANDLER          AcpiGbl_TableHandler;
 ACPI_EXTERN void                       *AcpiGbl_TableHandlerContext;
 ACPI_EXTERN ACPI_WALK_STATE            *AcpiGbl_BreakpointWalk;
 ACPI_EXTERN ACPI_INTERFACE_HANDLER      AcpiGbl_InterfaceHandler;
+ACPI_EXTERN ACPI_SCI_HANDLER_INFO      *AcpiGbl_SciHandlerList;
 
 /* Owner ID support */
 
@@ -269,20 +316,11 @@
 ACPI_EXTERN BOOLEAN                     AcpiGbl_StepToNextCall;
 ACPI_EXTERN BOOLEAN                     AcpiGbl_AcpiHardwarePresent;
 ACPI_EXTERN BOOLEAN                     AcpiGbl_EventsInitialized;
-ACPI_EXTERN UINT8                       AcpiGbl_OsiData;
 ACPI_EXTERN ACPI_INTERFACE_INFO        *AcpiGbl_SupportedInterfaces;
-
+ACPI_EXTERN ACPI_ADDRESS_RANGE         *AcpiGbl_AddressRangeList[ACPI_ADDRESS_RANGE_MAX];
 
 #ifndef DEFINE_ACPI_GLOBALS
 
-/* Exception codes */
-
-extern char const                       *AcpiGbl_ExceptionNames_Env[];
-extern char const                       *AcpiGbl_ExceptionNames_Pgm[];
-extern char const                       *AcpiGbl_ExceptionNames_Tbl[];
-extern char const                       *AcpiGbl_ExceptionNames_Aml[];
-extern char const                       *AcpiGbl_ExceptionNames_Ctrl[];
-
 /* Other miscellaneous */
 
 extern BOOLEAN                          AcpiGbl_Shutdown;
@@ -343,7 +381,6 @@
  *
  ****************************************************************************/
 
-
 ACPI_EXTERN ACPI_THREAD_STATE          *AcpiGbl_CurrentWalkList;
 
 /* Control method single step flag */
@@ -368,6 +405,8 @@
  *
  ****************************************************************************/
 
+#if (!ACPI_REDUCED_HARDWARE)
+
 ACPI_EXTERN UINT8                       AcpiGbl_AllGpesInitialized;
 ACPI_EXTERN ACPI_GPE_XRUPT_INFO        *AcpiGbl_GpeXruptListHead;
 ACPI_EXTERN ACPI_GPE_BLOCK_INFO        *AcpiGbl_GpeFadtBlocks[ACPI_MAX_GPE_BLOCKS];
@@ -376,6 +415,7 @@
 ACPI_EXTERN ACPI_FIXED_EVENT_HANDLER    AcpiGbl_FixedEventHandlers[ACPI_NUM_FIXED_EVENTS];
 extern      ACPI_FIXED_EVENT_INFO       AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS];
 
+#endif /* !ACPI_REDUCED_HARDWARE */
 
 /*****************************************************************************
  *
@@ -404,7 +444,7 @@
 
 /*****************************************************************************
  *
- * Debugger globals
+ * Debugger and Disassembler globals
  *
  ****************************************************************************/
 
@@ -412,8 +452,12 @@
 
 #ifdef ACPI_DISASSEMBLER
 
+ACPI_EXTERN BOOLEAN                     ACPI_INIT_GLOBAL (AcpiGbl_IgnoreNoopOperator, FALSE);
+
 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_disasm;
 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_verbose;
+ACPI_EXTERN BOOLEAN                     AcpiGbl_NumExternalMethods;
+ACPI_EXTERN UINT32                      AcpiGbl_ResolvedExternalMethods;
 ACPI_EXTERN ACPI_EXTERNAL_LIST         *AcpiGbl_ExternalList;
 ACPI_EXTERN ACPI_EXTERNAL_FILE         *AcpiGbl_ExternalFileList;
 #endif
@@ -429,13 +473,6 @@
 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_stats;
 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_ini_methods;
 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_NoRegionSupport;
-
-ACPI_EXTERN char                       *AcpiGbl_DbArgs[ACPI_DEBUGGER_MAX_ARGS];
-ACPI_EXTERN ACPI_OBJECT_TYPE            AcpiGbl_DbArgTypes[ACPI_DEBUGGER_MAX_ARGS];
-ACPI_EXTERN char                        AcpiGbl_DbLineBuf[ACPI_DB_LINE_BUFFER_SIZE];
-ACPI_EXTERN char                        AcpiGbl_DbParsedBuf[ACPI_DB_LINE_BUFFER_SIZE];
-ACPI_EXTERN char                        AcpiGbl_DbScopeBuf[80];
-ACPI_EXTERN char                        AcpiGbl_DbDebugFilename[80];
 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOutputToFile;
 ACPI_EXTERN char                       *AcpiGbl_DbBuffer;
 ACPI_EXTERN char                       *AcpiGbl_DbFilename;
@@ -443,6 +480,16 @@
 ACPI_EXTERN UINT32                      AcpiGbl_DbConsoleDebugLevel;
 ACPI_EXTERN ACPI_NAMESPACE_NODE        *AcpiGbl_DbScopeNode;
 
+ACPI_EXTERN char                       *AcpiGbl_DbArgs[ACPI_DEBUGGER_MAX_ARGS];
+ACPI_EXTERN ACPI_OBJECT_TYPE            AcpiGbl_DbArgTypes[ACPI_DEBUGGER_MAX_ARGS];
+
+/* These buffers should all be the same size */
+
+ACPI_EXTERN char                        AcpiGbl_DbLineBuf[ACPI_DB_LINE_BUFFER_SIZE];
+ACPI_EXTERN char                        AcpiGbl_DbParsedBuf[ACPI_DB_LINE_BUFFER_SIZE];
+ACPI_EXTERN char                        AcpiGbl_DbScopeBuf[ACPI_DB_LINE_BUFFER_SIZE];
+ACPI_EXTERN char                        AcpiGbl_DbDebugFilename[ACPI_DB_LINE_BUFFER_SIZE];
+
 /*
  * Statistic globals
  */
@@ -461,4 +508,27 @@
 
 #endif /* ACPI_DEBUGGER */
 
+
+/*****************************************************************************
+ *
+ * Application globals
+ *
+ ****************************************************************************/
+
+#ifdef ACPI_APPLICATION
+
+ACPI_FILE   ACPI_INIT_GLOBAL (AcpiGbl_DebugFile, NULL);
+
+#endif /* ACPI_APPLICATION */
+
+
+/*****************************************************************************
+ *
+ * Info/help support
+ *
+ ****************************************************************************/
+
+extern const AH_PREDEFINED_NAME     AslPredefinedInfo[];
+
+
 #endif /* __ACGLOBAL_H__ */
--- a/sys/external/bsd/acpica/dist/include/acinterp.h	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/include/acinterp.h	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -620,7 +620,7 @@
 AcpiExRelinquishInterpreter (
     void);
 
-void
+BOOLEAN
 AcpiExTruncateFor32bitTable (
     ACPI_OPERAND_OBJECT     *ObjDesc);
 
@@ -642,6 +642,10 @@
     char                    *Dest,
     UINT64                  Value);
 
+BOOLEAN
+AcpiIsValidSpaceId (
+    UINT8                   SpaceId);
+
 
 /*
  * exregion - default OpRegion handlers
--- a/sys/external/bsd/acpica/dist/include/aclocal.h	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/include/aclocal.h	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -54,7 +54,7 @@
 
 /* Total number of aml opcodes defined */
 
-#define AML_NUM_OPCODES                 0x7F
+#define AML_NUM_OPCODES                 0x81
 
 
 /* Forward declarations */
@@ -212,7 +212,6 @@
 #define ANOBJ_IS_EXTERNAL               0x08    /* iASL only: This object created via External() */
 #define ANOBJ_METHOD_NO_RETVAL          0x10    /* iASL only: Method has no return value */
 #define ANOBJ_METHOD_SOME_NO_RETVAL     0x20    /* iASL only: Method has at least one return value */
-#define ANOBJ_IS_BIT_OFFSET             0x40    /* iASL only: Reference is a bit offset */
 #define ANOBJ_IS_REFERENCED             0x80    /* iASL only: Object was referenced */
 
 
@@ -285,12 +284,16 @@
     ACPI_NAMESPACE_NODE             *FieldNode;
     ACPI_NAMESPACE_NODE             *RegisterNode;
     ACPI_NAMESPACE_NODE             *DataRegisterNode;
+    ACPI_NAMESPACE_NODE             *ConnectionNode;
+    UINT8                           *ResourceBuffer;
     UINT32                          BankValue;
     UINT32                          FieldBitPosition;
     UINT32                          FieldBitLength;
+    UINT16                          ResourceLength;
     UINT8                           FieldFlags;
     UINT8                           Attribute;
     UINT8                           FieldType;
+    UINT8                           AccessLength;
 
 } ACPI_CREATE_FIELD_INFO;
 
@@ -301,7 +304,7 @@
 
 
 /*
- * Bitmapped ACPI types.  Used internally only
+ * Bitmapped ACPI types. Used internally only
  */
 #define ACPI_BTYPE_ANY                  0x00000000
 #define ACPI_BTYPE_INTEGER              0x00000001
@@ -331,6 +334,7 @@
 #define ACPI_BTYPE_OBJECTS_AND_REFS     0x0001FFFF  /* ARG or LOCAL */
 #define ACPI_BTYPE_ALL_OBJECTS          0x0000FFFF
 
+#pragma pack(1)
 
 /*
  * Information structure for ACPI predefined names.
@@ -343,7 +347,7 @@
 typedef struct acpi_name_info
 {
     char                        Name[ACPI_NAME_SIZE];
-    UINT8                       ParamCount;
+    UINT16                      ArgumentList;
     UINT8                       ExpectedBtypes;
 
 } ACPI_NAME_INFO;
@@ -358,7 +362,8 @@
 
 /*
  * Used for ACPI_PTYPE1_FIXED, ACPI_PTYPE1_VAR, ACPI_PTYPE2,
- * ACPI_PTYPE2_MIN, ACPI_PTYPE2_PKG_COUNT, ACPI_PTYPE2_COUNT
+ * ACPI_PTYPE2_MIN, ACPI_PTYPE2_PKG_COUNT, ACPI_PTYPE2_COUNT,
+ * ACPI_PTYPE2_FIX_VAR
  */
 typedef struct acpi_package_info
 {
@@ -367,7 +372,7 @@
     UINT8                       Count1;
     UINT8                       ObjectType2;
     UINT8                       Count2;
-    UINT8                       Reserved;
+    UINT16                      Reserved;
 
 } ACPI_PACKAGE_INFO;
 
@@ -378,6 +383,7 @@
     UINT8                       Type;
     UINT8                       Count;
     UINT8                       ObjectType[4];
+    UINT8                       Reserved;
 
 } ACPI_PACKAGE_INFO2;
 
@@ -389,7 +395,7 @@
     UINT8                       Count;
     UINT8                       ObjectType[2];
     UINT8                       TailObjectType;
-    UINT8                       Reserved;
+    UINT16                      Reserved;
 
 } ACPI_PACKAGE_INFO3;
 
@@ -402,23 +408,25 @@
 
 } ACPI_PREDEFINED_INFO;
 
+/* Reset to default packing */
 
-/* Data block used during object validation */
+#pragma pack()
+
+
+/* Return object auto-repair info */
 
-typedef struct acpi_predefined_data
+typedef ACPI_STATUS (*ACPI_OBJECT_CONVERTER) (
+    union acpi_operand_object   *OriginalObject,
+    union acpi_operand_object   **ConvertedObject);
+
+typedef struct acpi_simple_repair_info
 {
-    char                        *Pathname;
-    const ACPI_PREDEFINED_INFO  *Predefined;
-    union acpi_operand_object   *ParentPackage;
-    ACPI_NAMESPACE_NODE         *Node;
-    UINT32                      Flags;
-    UINT8                       NodeFlags;
+    char                        Name[ACPI_NAME_SIZE];
+    UINT32                      UnexpectedBtypes;
+    UINT32                      PackageIndex;
+    ACPI_OBJECT_CONVERTER       ObjectConverter;
 
-} ACPI_PREDEFINED_DATA;
-
-/* Defines for Flags field above */
-
-#define ACPI_OBJECT_REPAIRED    1
+} ACPI_SIMPLE_REPAIR_INFO;
 
 
 /*
@@ -444,6 +452,16 @@
  *
  ****************************************************************************/
 
+/* Dispatch info for each host-installed SCI handler */
+
+typedef struct acpi_sci_handler_info
+{
+    struct acpi_sci_handler_info    *Next;
+    ACPI_SCI_HANDLER                Address;        /* Address of handler */
+    void                            *Context;       /* Context to be passed to handler */
+
+} ACPI_SCI_HANDLER_INFO;
+
 /* Dispatch info for each GPE -- either a method or handler, cannot be both */
 
 typedef struct acpi_gpe_handler_info
@@ -456,6 +474,15 @@
 
 } ACPI_GPE_HANDLER_INFO;
 
+/* Notify info for implicit notify, multiple device objects */
+
+typedef struct acpi_gpe_notify_info
+{
+    ACPI_NAMESPACE_NODE             *DeviceNode;    /* Device to be notified */
+    struct acpi_gpe_notify_info     *Next;
+
+} ACPI_GPE_NOTIFY_INFO;
+
 /*
  * GPE dispatch info. At any time, the GPE can have at most one type
  * of dispatch - Method, Handler, or Implicit Notify.
@@ -463,8 +490,8 @@
 typedef union acpi_gpe_dispatch_info
 {
     ACPI_NAMESPACE_NODE             *MethodNode;    /* Method node for this GPE level */
-    struct acpi_gpe_handler_info    *Handler;       /* Installed GPE handler */
-    ACPI_NAMESPACE_NODE             *DeviceNode;    /* Parent _PRW device for implicit notify */
+    ACPI_GPE_HANDLER_INFO           *Handler;       /* Installed GPE handler */
+    ACPI_GPE_NOTIFY_INFO            *NotifyList;    /* List of _PRW devices for implicit notifies */
 
 } ACPI_GPE_DISPATCH_INFO;
 
@@ -474,7 +501,7 @@
  */
 typedef struct acpi_gpe_event_info
 {
-    union acpi_gpe_dispatch_info    Dispatch;       /* Either Method or Handler */
+    union acpi_gpe_dispatch_info    Dispatch;       /* Either Method, Handler, or NotifyList */
     struct acpi_gpe_register_info   *RegisterInfo;  /* Backpointer to register info */
     UINT8                           Flags;          /* Misc info about this GPE */
     UINT8                           GpeNumber;      /* This GPE */
@@ -674,7 +701,7 @@
 
 
 /*
- * Thread state - one per thread across multiple walk states.  Multiple walk
+ * Thread state - one per thread across multiple walk states. Multiple walk
  * states are created when there are nested control methods executing.
  */
 typedef struct acpi_thread_state
@@ -710,6 +737,15 @@
     struct acpi_walk_state          *WalkState);
 
 
+/* Global handlers for AML Notifies */
+
+typedef struct acpi_global_notify_handler
+{
+    ACPI_NOTIFY_HANDLER             Handler;
+    void                            *Context;
+
+} ACPI_GLOBAL_NOTIFY_HANDLER;
+
 /*
  * Notify info - used to pass info to the deferred notify
  * handler/dispatcher.
@@ -717,8 +753,10 @@
 typedef struct acpi_notify_info
 {
     ACPI_STATE_COMMON
+    UINT8                           HandlerListId;
     ACPI_NAMESPACE_NODE             *Node;
-    union acpi_operand_object       *HandlerObj;
+    union acpi_operand_object       *HandlerListHead;
+    ACPI_GLOBAL_NOTIFY_HANDLER      *Global;
 
 } ACPI_NOTIFY_INFO;
 
@@ -750,6 +788,17 @@
 ACPI_STATUS (*ACPI_EXECUTE_OP) (
     struct acpi_walk_state          *WalkState);
 
+/* Address Range info block */
+
+typedef struct acpi_address_range
+{
+    struct acpi_address_range   *Next;
+    ACPI_NAMESPACE_NODE         *RegionNode;
+    ACPI_PHYSICAL_ADDRESS       StartAddress;
+    ACPI_PHYSICAL_ADDRESS       EndAddress;
+
+} ACPI_ADDRESS_RANGE;
+
 
 /*****************************************************************************
  *
@@ -774,6 +823,17 @@
 
 } ACPI_OPCODE_INFO;
 
+/* Structure for Resource Tag information */
+
+typedef struct acpi_tag_info
+{
+    UINT32                          BitOffset;
+    UINT32                          BitLength;
+
+} ACPI_TAG_INFO;
+
+/* Value associated with the parse object */
+
 typedef union acpi_parse_value
 {
     UINT64                          Integer;        /* Integer constant (Up to 64 bits) */
@@ -782,6 +842,7 @@
     UINT8                           *Buffer;        /* buffer or string */
     char                            *Name;          /* NULL terminated string */
     union acpi_parse_object         *Arg;           /* arguments and contained ops */
+    ACPI_TAG_INFO                   Tag;            /* Resource descriptor tag info  */
 
 } ACPI_PARSE_VALUE;
 
@@ -808,15 +869,18 @@
     char                            AmlOpName[16])  /* Op name (debug only) */
 
 
-#define ACPI_DASM_BUFFER                0x00
-#define ACPI_DASM_RESOURCE              0x01
-#define ACPI_DASM_STRING                0x02
-#define ACPI_DASM_UNICODE               0x03
-#define ACPI_DASM_EISAID                0x04
-#define ACPI_DASM_MATCHOP               0x05
-#define ACPI_DASM_LNOT_PREFIX           0x06
-#define ACPI_DASM_LNOT_SUFFIX           0x07
-#define ACPI_DASM_IGNORE                0x08
+/* Flags for DisasmFlags field  above */
+
+#define ACPI_DASM_BUFFER                0x00        /* Buffer is a simple data buffer */
+#define ACPI_DASM_RESOURCE              0x01        /* Buffer is a Resource Descriptor */
+#define ACPI_DASM_STRING                0x02        /* Buffer is a ASCII string */
+#define ACPI_DASM_UNICODE               0x03        /* Buffer is a Unicode string */
+#define ACPI_DASM_PLD_METHOD            0x04        /* Buffer is a _PLD method bit-packed buffer */
+#define ACPI_DASM_EISAID                0x05        /* Integer is an EISAID */
+#define ACPI_DASM_MATCHOP               0x06        /* Parent opcode is a Match() operator */
+#define ACPI_DASM_LNOT_PREFIX           0x07        /* Start of a LNotEqual (etc.) pair of opcodes */
+#define ACPI_DASM_LNOT_SUFFIX           0x08        /* End  of a LNotEqual (etc.) pair of opcodes */
+#define ACPI_DASM_IGNORE                0x09        /* Not used at this time */
 
 /*
  * Generic operation (for example:  If, While, Store)
@@ -920,6 +984,7 @@
 #define ACPI_PARSEOP_IGNORE             0x01
 #define ACPI_PARSEOP_PARAMLIST          0x02
 #define ACPI_PARSEOP_EMPTY_TERMLIST     0x04
+#define ACPI_PARSEOP_PREDEF_CHECKED     0x08
 #define ACPI_PARSEOP_SPECIAL            0x10
 
 
@@ -1044,18 +1109,6 @@
 
 /* Structs and definitions for _OSI support and I/O port validation */
 
-#define ACPI_OSI_WIN_2000               0x01
-#define ACPI_OSI_WIN_XP                 0x02
-#define ACPI_OSI_WIN_XP_SP1             0x03
-#define ACPI_OSI_WINSRV_2003            0x04
-#define ACPI_OSI_WIN_XP_SP2             0x05
-#define ACPI_OSI_WINSRV_2003_SP1        0x06
-#define ACPI_OSI_WIN_VISTA              0x07
-#define ACPI_OSI_WINSRV_2008            0x08
-#define ACPI_OSI_WIN_VISTA_SP1          0x09
-#define ACPI_OSI_WIN_VISTA_SP2          0x0A
-#define ACPI_OSI_WIN_7                  0x0B
-
 #define ACPI_ALWAYS_ILLEGAL             0x00
 
 typedef struct acpi_interface_info
@@ -1069,6 +1122,9 @@
 
 #define ACPI_OSI_INVALID                0x01
 #define ACPI_OSI_DYNAMIC                0x02
+#define ACPI_OSI_FEATURE                0x04
+#define ACPI_OSI_DEFAULT_INVALID        0x08
+#define ACPI_OSI_OPTIONAL_FEATURE       (ACPI_OSI_FEATURE | ACPI_OSI_DEFAULT_INVALID | ACPI_OSI_INVALID)
 
 typedef struct acpi_port_info
 {
@@ -1112,7 +1168,7 @@
 #define ACPI_RESOURCE_NAME_END_DEPENDENT        0x38
 #define ACPI_RESOURCE_NAME_IO                   0x40
 #define ACPI_RESOURCE_NAME_FIXED_IO             0x48
-#define ACPI_RESOURCE_NAME_RESERVED_S1          0x50
+#define ACPI_RESOURCE_NAME_FIXED_DMA            0x50
 #define ACPI_RESOURCE_NAME_RESERVED_S2          0x58
 #define ACPI_RESOURCE_NAME_RESERVED_S3          0x60
 #define ACPI_RESOURCE_NAME_RESERVED_S4          0x68
@@ -1134,7 +1190,9 @@
 #define ACPI_RESOURCE_NAME_EXTENDED_IRQ         0x89
 #define ACPI_RESOURCE_NAME_ADDRESS64            0x8A
 #define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64   0x8B
-#define ACPI_RESOURCE_NAME_LARGE_MAX            0x8B
+#define ACPI_RESOURCE_NAME_GPIO                 0x8C
+#define ACPI_RESOURCE_NAME_SERIAL_BUS           0x8E
+#define ACPI_RESOURCE_NAME_LARGE_MAX            0x8E
 
 
 /*****************************************************************************
@@ -1159,14 +1217,17 @@
     struct acpi_external_list   *Next;
     UINT32                      Value;
     UINT16                      Length;
+    UINT16                      Flags;
     UINT8                       Type;
-    UINT8                       Flags;
 
 } ACPI_EXTERNAL_LIST;
 
 /* Values for Flags field above */
 
-#define ACPI_IPATH_ALLOCATED    0x01
+#define ACPI_EXT_RESOLVED_REFERENCE         0x01    /* Object was resolved during cross ref */
+#define ACPI_EXT_ORIGIN_FROM_FILE           0x02    /* External came from a file */
+#define ACPI_EXT_INTERNAL_PATH_ALLOCATED    0x04    /* Deallocate internal path on completion */
+#define ACPI_EXT_EXTERNAL_EMITTED           0x08    /* External() statement has been emitted */
 
 
 typedef struct acpi_external_file
@@ -1185,6 +1246,7 @@
 
 typedef struct acpi_db_method_info
 {
+    ACPI_HANDLE                     Method;
     ACPI_HANDLE                     MainThreadGate;
     ACPI_HANDLE                     ThreadCompleteGate;
     ACPI_HANDLE                     InfoGate;
@@ -1196,7 +1258,7 @@
     char                            *Name;
     UINT32                          Flags;
     UINT32                          NumLoops;
-    char                            Pathname[128];
+    char                            Pathname[ACPI_DB_LINE_BUFFER_SIZE];
     char                            **Args;
     ACPI_OBJECT_TYPE                *Types;
 
@@ -1223,6 +1285,7 @@
 } ACPI_INTEGRITY_INFO;
 
 
+#define ACPI_DB_DISABLE_OUTPUT          0x00
 #define ACPI_DB_REDIRECTABLE_OUTPUT     0x01
 #define ACPI_DB_CONSOLE_OUTPUT          0x02
 #define ACPI_DB_DUPLICATE_OUTPUT        0x03
@@ -1269,4 +1332,20 @@
 #define ACPI_NUM_MEM_LISTS              2
 
 
+/*****************************************************************************
+ *
+ * Info/help support
+ *
+ ****************************************************************************/
+
+typedef struct ah_predefined_name
+{
+    char            *Name;
+    char            *Description;
+#ifndef ACPI_ASL_COMPILER
+    char            *Action;
+#endif
+
+} AH_PREDEFINED_NAME;
+
 #endif /* __ACLOCAL_H__ */
--- a/sys/external/bsd/acpica/dist/include/acmacros.h	Fri Dec 27 18:45:57 2013 +0000
+++ b/sys/external/bsd/acpica/dist/include/acmacros.h	Fri Dec 27 18:50:56 2013 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -50,14 +50,18 @@
  * get into potential aligment issues -- see the STORE macros below.
  * Use with care.
  */
-#define ACPI_GET8(ptr)                  *ACPI_CAST_PTR (UINT8, ptr)
-#define ACPI_GET16(ptr)                 *ACPI_CAST_PTR (UINT16, ptr)
-#define ACPI_GET32(ptr)                 *ACPI_CAST_PTR (UINT32, ptr)
-#define ACPI_GET64(ptr)                 *ACPI_CAST_PTR (UINT64, ptr)
-#define ACPI_SET8(ptr)