[PATCH 1/2] ACPICA: Update to version 20160318 (LP: #1559312)

Colin King colin.king at canonical.com
Fri Mar 18 23:58:30 UTC 2016


From: Colin Ian King <colin.king at canonical.com>

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

https://lists.acpica.org/pipermail/devel/2016-March/000894.html

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/acpica/Makefile.am                             |   1 +
 src/acpica/fwts_acpica.c                           | 119 ++-
 src/acpica/source/common/adwalk.c                  |  82 ++-
 src/acpica/source/common/dmextern.c                | 173 ++---
 src/acpica/source/common/dmtable.c                 |   6 +
 src/acpica/source/common/dmtables.c                |  39 +-
 src/acpica/source/common/dmtbdump.c                |  12 +-
 src/acpica/source/common/dmtbinfo.c                |  46 +-
 src/acpica/source/compiler/Makefile.am             |   1 +
 src/acpica/source/compiler/aslcodegen.c            |   6 +
 src/acpica/source/compiler/aslcompile.c            |  13 +-
 src/acpica/source/compiler/aslcompiler.h           |   8 +
 src/acpica/source/compiler/aslexternal.c           |  61 +-
 src/acpica/source/compiler/aslglobal.h             |   1 +
 src/acpica/source/compiler/asllength.c             |   8 +
 src/acpica/source/compiler/aslload.c               |  19 +
 src/acpica/source/compiler/aslmessages.c           |   4 +-
 src/acpica/source/compiler/aslopcodes.c            | 707 +-----------------
 src/acpica/source/compiler/aslopt.c                |  44 +-
 src/acpica/source/compiler/aslpld.c                | 801 +++++++++++++++++++++
 src/acpica/source/compiler/aslrestype2e.c          |   2 +-
 src/acpica/source/compiler/aslstubs.c              |   7 +
 src/acpica/source/compiler/asltransform.c          |   6 +-
 src/acpica/source/compiler/aslutils.c              |   4 +-
 src/acpica/source/compiler/aslwalks.c              |   7 +-
 src/acpica/source/compiler/aslxrefout.c            |  36 +-
 src/acpica/source/compiler/dtparser.y              |   6 +-
 src/acpica/source/compiler/dttable1.c              |  17 +-
 src/acpica/source/compiler/dttable2.c              |   4 +-
 src/acpica/source/compiler/dttemplate.h            |  15 +-
 src/acpica/source/compiler/prparser.y              |   4 +-
 src/acpica/source/compiler/prscan.c                |  11 +
 src/acpica/source/components/debugger/dbconvert.c  |   3 +-
 src/acpica/source/components/debugger/dbinput.c    |  11 +-
 src/acpica/source/components/debugger/dbutils.c    |   8 +-
 .../source/components/disassembler/dmbuffer.c      |  84 +--
 .../source/components/disassembler/dmopcode.c      |   4 +-
 .../source/components/disassembler/dmresrc.c       |   8 +-
 .../source/components/disassembler/dmresrcl.c      |   6 +-
 .../source/components/disassembler/dmutils.c       |   2 +-
 src/acpica/source/components/events/evregion.c     |  82 +--
 src/acpica/source/components/events/evrgnini.c     |   1 -
 src/acpica/source/components/executer/exconcat.c   | 533 ++++++++++++++
 src/acpica/source/components/executer/exconfig.c   |   5 +-
 src/acpica/source/components/executer/exconvrt.c   |   3 +-
 src/acpica/source/components/executer/exdump.c     |  23 +-
 src/acpica/source/components/executer/exmisc.c     | 302 --------
 src/acpica/source/components/executer/exsystem.c   |   2 +-
 src/acpica/source/components/executer/exutils.c    |  12 +-
 src/acpica/source/components/hardware/hwregs.c     | 200 ++++-
 src/acpica/source/components/hardware/hwxface.c    |   3 +-
 src/acpica/source/components/namespace/nsaccess.c  |   2 +-
 src/acpica/source/components/namespace/nsconvert.c |   2 +-
 src/acpica/source/components/namespace/nsdump.c    |   9 +-
 src/acpica/source/components/namespace/nsinit.c    |  74 +-
 src/acpica/source/components/namespace/nsload.c    |   2 +-
 src/acpica/source/components/namespace/nsprepkg.c  |  48 +-
 src/acpica/source/components/parser/psopinfo.c     |   2 +-
 src/acpica/source/components/resources/rsdump.c    |  44 +-
 src/acpica/source/components/resources/rsutils.c   |   2 +-
 src/acpica/source/components/tables/tbfadt.c       |  25 +-
 src/acpica/source/components/tables/tbxfload.c     |  27 +-
 src/acpica/source/components/utilities/utdebug.c   |  40 +-
 src/acpica/source/components/utilities/uteval.c    |   4 +-
 src/acpica/source/components/utilities/utglobal.c  |  55 ++
 src/acpica/source/components/utilities/utmisc.c    |   2 +-
 src/acpica/source/components/utilities/utnonansi.c |  61 +-
 src/acpica/source/components/utilities/utprint.c   |   6 -
 src/acpica/source/components/utilities/uttrack.c   |   2 +-
 src/acpica/source/components/utilities/utxfinit.c  |  47 +-
 src/acpica/source/include/acdebug.h                |   4 +-
 src/acpica/source/include/acdisasm.h               |  11 +-
 src/acpica/source/include/acevents.h               |   4 -
 src/acpica/source/include/acglobal.h               |  10 +
 src/acpica/source/include/acinterp.h               |   2 +-
 src/acpica/source/include/aclocal.h                |   1 +
 src/acpica/source/include/acmacros.h               |   4 +
 src/acpica/source/include/acnamesp.h               |   4 +-
 src/acpica/source/include/acparser.h               |   2 +-
 src/acpica/source/include/acpixf.h                 |   2 +-
 src/acpica/source/include/acresrc.h                |   4 +-
 src/acpica/source/include/acstruct.h               |   2 +-
 src/acpica/source/include/actbl.h                  |   2 +
 src/acpica/source/include/actbl1.h                 |  49 +-
 src/acpica/source/include/actbl2.h                 |  42 +-
 src/acpica/source/include/actbl3.h                 |  52 +-
 src/acpica/source/include/actypes.h                |   4 +-
 src/acpica/source/include/acutils.h                |  18 +-
 src/acpica/source/include/platform/acenv.h         |  44 +-
 src/acpica/source/tools/acpiexec/aeinitfile.c      |   3 +-
 90 files changed, 2517 insertions(+), 1763 deletions(-)
 create mode 100644 src/acpica/source/compiler/aslpld.c
 create mode 100644 src/acpica/source/components/executer/exconcat.c

diff --git a/src/acpica/Makefile.am b/src/acpica/Makefile.am
index 9b1c435..28fab56 100644
--- a/src/acpica/Makefile.am
+++ b/src/acpica/Makefile.am
@@ -122,6 +122,7 @@ libfwtsacpica_la_SOURCES =				\
 	source/components/events/evxfregn.c		\
 	source/components/events/evglock.c		\
 	source/components/events/evhandler.c		\
+	source/components/executer/exconcat.c		\
 	source/components/executer/exfield.c		\
 	source/components/executer/exfldio.c		\
 	source/components/executer/exmisc.c		\
diff --git a/src/acpica/fwts_acpica.c b/src/acpica/fwts_acpica.c
index ba41ded..ce21911 100644
--- a/src/acpica/fwts_acpica.c
+++ b/src/acpica/fwts_acpica.c
@@ -379,8 +379,8 @@ static ACPI_STATUS fwts_region_handler(
 
 		switch (function) {
 		case ACPI_READ:
-			/* Fake it, return all zeros */
-			memset(value, 0, bytewidth);
+			/* Fake it, return all set */
+			memset(value, 0x00, bytewidth);
 		break;
 		case ACPI_WRITE:
 			/* Fake it, do nothing */
@@ -809,27 +809,36 @@ void AcpiOsSleep(UINT64 milliseconds)
 {
 }
 
-int fwtsInstallEarlyHandlers(fwts_framework *fw)
+static void fwtsOverrideRegionHandlers(fwts_framework *fw)
 {
 	int i;
-	ACPI_HANDLE	handle;
-
-	static ACPI_ADR_SPACE_TYPE fwts_space_id_list[] =
-	{
+	static ACPI_ADR_SPACE_TYPE fwts_default_space_id_list[] = {
 		ACPI_ADR_SPACE_SYSTEM_MEMORY,
 		ACPI_ADR_SPACE_SYSTEM_IO,
-		ACPI_ADR_SPACE_EC,
-		ACPI_ADR_SPACE_SMBUS,
-		ACPI_ADR_SPACE_CMOS,
-		ACPI_ADR_SPACE_GSBUS,
-		ACPI_ADR_SPACE_GPIO,
-		ACPI_ADR_SPACE_PCI_BAR_TARGET,
-		ACPI_ADR_SPACE_IPMI,
-		ACPI_ADR_SPACE_FIXED_HARDWARE,
-		ACPI_ADR_SPACE_USER_DEFINED1,
-		ACPI_ADR_SPACE_USER_DEFINED2
+		ACPI_ADR_SPACE_PCI_CONFIG,
+		ACPI_ADR_SPACE_EC
 	};
 
+	for (i = 0; i < ACPI_ARRAY_LENGTH(fwts_default_space_id_list); i++) {
+		/* Install handler at the root object */
+		ACPI_STATUS status;
+
+		status = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT,
+				fwts_default_space_id_list[i], fwts_region_handler,
+				fwts_region_init, NULL);
+
+		if ((status != AE_OK) && (status != AE_SAME_HANDLER)) {
+			fwts_log_error(fw, "Failed to install an OpRegion handler for %s space(%u)",
+				AcpiUtGetRegionName((UINT8)fwts_default_space_id_list[i]),
+				fwts_default_space_id_list[i]);
+		}
+	}
+}
+
+static int fwtsInstallEarlyHandlers(fwts_framework *fw)
+{
+	ACPI_HANDLE	handle;
+
 	if (AcpiInstallInterfaceHandler(fwts_interface_handler) != AE_OK) {
 		fwts_log_error(fw, "Failed to install interface handler.");
 		return FWTS_ERROR;
@@ -896,11 +905,37 @@ int fwtsInstallEarlyHandlers(fwts_framework *fw)
 		}
 	}
 
+	fwtsOverrideRegionHandlers(fw);
+
+	return FWTS_OK;
+}
+
+static int fwtsInstallLateHandlers(fwts_framework *fw)
+{
+	int i;
+	ACPI_STATUS status;
+	static ACPI_ADR_SPACE_TYPE fwts_space_id_list[] =
+	{
+		ACPI_ADR_SPACE_SYSTEM_MEMORY,
+		ACPI_ADR_SPACE_SYSTEM_IO,
+		ACPI_ADR_SPACE_EC,
+		ACPI_ADR_SPACE_SMBUS,
+		ACPI_ADR_SPACE_CMOS,
+		ACPI_ADR_SPACE_GSBUS,
+		ACPI_ADR_SPACE_GPIO,
+		ACPI_ADR_SPACE_PCI_BAR_TARGET,
+		ACPI_ADR_SPACE_IPMI,
+		ACPI_ADR_SPACE_FIXED_HARDWARE,
+		ACPI_ADR_SPACE_USER_DEFINED1,
+		ACPI_ADR_SPACE_USER_DEFINED2
+	};
+
 	for (i = 0; i < ACPI_ARRAY_LENGTH(fwts_space_id_list); i++) {
-		if (AcpiInstallAddressSpaceHandler(AcpiGbl_RootNode,
-		    fwts_space_id_list[i], fwts_region_handler, fwts_region_init, NULL) != AE_OK) {
+		status = AcpiInstallAddressSpaceHandler(ACPI_ROOT_OBJECT,
+		    fwts_space_id_list[i], fwts_region_handler, fwts_region_init, NULL);
+		if ((status != AE_OK) && (status != AE_SAME_HANDLER)) {
 			fwts_log_error(fw,
-				"Could not install an OpRegion handler for %s space(%u)",
+				"Failed to install an OpRegion handler for %s space(%u)",
 				AcpiUtGetRegionName((UINT8)fwts_space_id_list[i]),
 				fwts_space_id_list[i]);
 			return FWTS_ERROR;
@@ -908,16 +943,17 @@ int fwtsInstallEarlyHandlers(fwts_framework *fw)
 	}
 
 	if (!AcpiGbl_ReducedHardware) {
-		if (AcpiInstallFixedEventHandler(ACPI_EVENT_GLOBAL, fwts_event_handler, NULL) != AE_OK) {
+		status = AcpiInstallFixedEventHandler(ACPI_EVENT_GLOBAL, fwts_event_handler, NULL);
+		if ((status != AE_OK) && (status != AE_SAME_HANDLER)) {
 			fwts_log_error(fw, "Failed to install global event handler.");
 			return FWTS_ERROR;
 		}
-		if (AcpiInstallFixedEventHandler(ACPI_EVENT_RTC, fwts_event_handler, NULL) != AE_OK) {
+		status = AcpiInstallFixedEventHandler(ACPI_EVENT_RTC, fwts_event_handler, NULL);
+		if ((status != AE_OK) && (status != AE_SAME_HANDLER)) {
 			fwts_log_error(fw, "Failed to install RTC event handler.");
 			return FWTS_ERROR;
 		}
 	}
-
 	return FWTS_OK;
 }
 
@@ -956,6 +992,8 @@ int fwts_acpica_init(fwts_framework *fw)
 		FWTS_ACPICA_MODE(fw, FWTS_ACPICA_MODE_IGNORE_ERRORS);
 	AcpiGbl_DisableAutoRepair =
 		FWTS_ACPICA_MODE(fw, FWTS_ACPICA_MODE_DISABLE_AUTO_REPAIR);
+	AcpiGbl_GroupModuleLevelCode = FALSE;
+	AcpiGbl_CstyleDisassembly = FALSE;
 
 	pthread_mutex_init(&mutex_lock_sem_table, NULL);
 	pthread_mutex_init(&mutex_thread_info, NULL);
@@ -1105,23 +1143,46 @@ int fwts_acpica_init(fwts_framework *fw)
 		fwts_log_error(fw, "Failed to initialise ACPICA subsystem.");
 		goto failed;
 	}
-
+#if 0
+	if (ACPI_FAILURE(AcpiInitializeDebugger())) {
+		fwts_log_error(fw, "Failed to initialise ACPICA subsystem.");
+		goto failed;
+	}
+#endif
 	if (AcpiInitializeTables(Tables, ACPI_MAX_INIT_TABLES, TRUE) != AE_OK) {
 		fwts_log_error(fw, "Failed to initialise tables.");
 		goto failed;
 	}
-	if (AcpiReallocateRootTable() != AE_OK) {
+	if (fwtsInstallEarlyHandlers(fw) != FWTS_OK) {
+		fwts_log_error(fw, "Failed to install early handlers.");
+		goto failed;
+	}
+	if (ACPI_FAILURE(AcpiReallocateRootTable())) {
 		fwts_log_error(fw, "Failed to reallocate root table.");
 		goto failed;
 	}
-	if (AcpiLoadTables() != AE_OK) {
+
+	init_flags = (ACPI_NO_HANDLER_INIT | ACPI_NO_ACPI_ENABLE |
+		      ACPI_NO_DEVICE_INIT | ACPI_NO_OBJECT_INIT);
+	AcpiGbl_MaxLoopIterations = 0x10;
+
+	if (ACPI_FAILURE(AcpiEnableSubsystem(init_flags))) {
+		fwts_log_error(fw, "Failed to enable ACPI subsystem.");
+		goto failed;
+	}
+	if (ACPI_FAILURE(AcpiLoadTables() != AE_OK)) {
 		fwts_log_error(fw, "Failed to load tables.");
 		goto failed;
 	}
 
-	(void)fwtsInstallEarlyHandlers(fw);
-	AcpiEnableSubsystem(init_flags);
-	AcpiInitializeObjects(init_flags);
+	if (fwtsInstallLateHandlers(fw) != FWTS_OK) {
+		fwts_log_error(fw, "Failed to install late handlers.");
+		goto failed;
+	}
+	if (ACPI_FAILURE(AcpiInitializeObjects(init_flags))) {
+		fwts_log_error(fw, "Failed to initialize ACPI objects.");
+		goto failed;
+	}
 
 	fwts_acpica_init_called = true;
 	return FWTS_OK;
diff --git a/src/acpica/source/common/adwalk.c b/src/acpica/source/common/adwalk.c
index 8bc07ee..ca4ece9 100644
--- a/src/acpica/source/common/adwalk.c
+++ b/src/acpica/source/common/adwalk.c
@@ -399,6 +399,7 @@ AcpiDmConvertResourceIndexes (
         WalkState);
     if (ACPI_FAILURE (Status))
     {
+        ACPI_FREE (WalkState);
         return;
     }
 
@@ -514,7 +515,7 @@ AcpiDmDumpDescending (
  *
  * DESCRIPTION: Check namepath Ops for orphaned method invocations
  *
- * Note: Experimental.
+ * Note: Parts of this are experimental, under possible further development.
  *
  ******************************************************************************/
 
@@ -580,6 +581,7 @@ AcpiDmFindOrphanDescending (
                 ChildOp->Common.Value.String, ACPI_TYPE_METHOD, ArgCount, 0);
         }
         break;
+
 #endif
 
     case AML_STORE_OP:
@@ -604,7 +606,7 @@ AcpiDmFindOrphanDescending (
                 /* One Arg means this is just a Store(Name,Target) */
 
                 AcpiDmAddOpToExternalList (ChildOp,
-                    ChildOp->Common.Value.String, ACPI_TYPE_INTEGER, 0, 0);
+                    ChildOp->Common.Value.String, ACPI_TYPE_INTEGER, ArgCount, 0);
                 return (AE_OK);
             }
 
@@ -626,7 +628,7 @@ AcpiDmFindOrphanDescending (
             (ParentOp->Common.AmlOpcode != AML_INT_METHODCALL_OP) &&
             !Op->Common.Node)
         {
-            ArgCount = AcpiDmInspectPossibleArgs (0, 0, Op->Common.Next);
+            ArgCount = AcpiDmInspectPossibleArgs (0, 0, Op);
 
             /*
              * Check if namepath is a predicate for if/while or lone parameter to
@@ -860,6 +862,7 @@ AcpiDmXrefDescendingOp (
                 Op->Common.Next->Common.Next->Common.Value.Integer;
         }
 
+        Flags |= ACPI_EXT_RESOLVED_REFERENCE | ACPI_EXT_ORIGIN_FROM_OPCODE;
         AcpiDmAddOpToExternalList (Op, Path,
             (UINT8) ObjectType, ParamCount, Flags);
 
@@ -927,12 +930,12 @@ AcpiDmXrefDescendingOp (
     Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY,
         ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
         WalkState, &Node);
+
     if (ACPI_SUCCESS (Status) && (Node->Flags & ANOBJ_IS_EXTERNAL))
     {
         /* Node was created by an External() statement */
 
         Status = AE_NOT_FOUND;
-        Flags = ACPI_EXT_RESOLVED_REFERENCE;
     }
 
     if (ACPI_FAILURE (Status))
@@ -952,12 +955,12 @@ AcpiDmXrefDescendingOp (
                 if (Node)
                 {
                     AcpiDmAddNodeToExternalList (Node,
-                        (UINT8) ObjectType, 0, Flags);
+                        (UINT8) ObjectType, 7, Flags);
                 }
                 else
                 {
                     AcpiDmAddOpToExternalList (Op, Path,
-                        (UINT8) ObjectType, 0, Flags);
+                        (UINT8) ObjectType, 7, Flags);
                 }
             }
         }
@@ -1139,40 +1142,69 @@ AcpiDmInspectPossibleArgs (
 {
     const ACPI_OPCODE_INFO  *OpInfo;
     UINT32                  i;
-    UINT32                  Last = 0;
-    UINT32                  Lookahead;
+    UINT32                  ArgumentCount = 0;
+    ACPI_PARSE_OBJECT       *NextOp;
+    ACPI_PARSE_OBJECT       *ExecuteOp;
 
 
-    Lookahead = (ACPI_METHOD_NUM_ARGS + TargetCount) - CurrentOpArgCount;
+    if (!Op)
+    {
+        return (0);
+    }
 
     /* Lookahead for the maximum number of possible arguments */
 
-    for (i = 0; i < Lookahead; i++)
+    NextOp = Op->Common.Next;
+
+    for (i = 0; (i < ACPI_METHOD_NUM_ARGS) && NextOp; i++)
     {
-        if (!Op)
-        {
-            break;
-        }
+        OpInfo = AcpiPsGetOpcodeInfo (NextOp->Common.AmlOpcode);
 
-        OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
+        /* Any one of these operators is "very probably" not a method arg */
 
-        /*
-         * Any one of these operators is "very probably" not a method arg
-         */
-        if ((Op->Common.AmlOpcode == AML_STORE_OP) ||
-            (Op->Common.AmlOpcode == AML_NOTIFY_OP))
+        if ((NextOp->Common.AmlOpcode == AML_STORE_OP) ||
+            (NextOp->Common.AmlOpcode == AML_NOTIFY_OP) ||
+            (OpInfo->Class == AML_CLASS_CONTROL) ||
+            (OpInfo->Class == AML_CLASS_CREATE) ||
+            (OpInfo->Class == AML_CLASS_NAMED_OBJECT))
         {
             break;
         }
 
-        if ((OpInfo->Class != AML_CLASS_EXECUTE) &&
-            (OpInfo->Class != AML_CLASS_CONTROL))
+        if (OpInfo->Class == AML_CLASS_EXECUTE)
         {
-            Last = i+1;
+            /* Probable that this is method arg if there is no target */
+
+            ExecuteOp = NextOp->Common.Value.Arg;
+            while (ExecuteOp)
+            {
+                if ((ExecuteOp->Common.AmlOpcode == AML_INT_NAMEPATH_OP) &&
+                    (ExecuteOp->Common.Value.Arg == NULL))
+                {
+                    /* No target, could be a method arg */
+
+                    break;
+                }
+
+                if (NextOp->Common.AmlOpcode == AML_REF_OF_OP)
+                {
+                    break;
+                }
+
+                ExecuteOp = ExecuteOp->Common.Next;
+            }
+
+            if (!ExecuteOp)
+            {
+                /* Has a target, not method arg */
+
+                return (ArgumentCount);
+            }
         }
 
-        Op = Op->Common.Next;
+        ArgumentCount++;
+        NextOp = NextOp->Common.Next;
     }
 
-    return (Last);
+    return (ArgumentCount);
 }
diff --git a/src/acpica/source/common/dmextern.c b/src/acpica/source/common/dmextern.c
index 397fe2b..d4b66a4 100644
--- a/src/acpica/source/common/dmextern.c
+++ b/src/acpica/source/common/dmextern.c
@@ -826,46 +826,6 @@ AcpiDmAddPathToExternalList (
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiDmEternalIsMatch
- *
- * PARAMETERS:  NamePath            - Path to match to External Name
- *              ExternalPath        - External NamePath to be matched
- *
- * RETURN:      BOOLEAN
- *
- * DESCRIPTION: Returns TRUE if NamePath matches the last NamePath-length
- *              characters of ExternalPath.
- *
- *              External (_SB_.DEV0.ABCD) will match:
- *                  _SB_.DEV0.ABCD
- *                  DEV0.ABCD
- *                  ABCD
- *
- ******************************************************************************/
-
-static BOOLEAN
-AcpiDmExternalIsMatch (
-    const char *            NamePath,
-    const char *            ListNamePath)
-{
-    BOOLEAN                 Match = FALSE;
-
-
-    if (strlen (ListNamePath) >= strlen (NamePath))
-    {
-        if (!strcmp (ListNamePath +
-            (strlen (ListNamePath) - strlen (NamePath)), NamePath))
-        {
-            return (TRUE);
-        }
-    }
-
-    return (Match);
-}
-
-
-/*******************************************************************************
- *
  * FUNCTION:    AcpiDmCreateNewExternal
  *
  * PARAMETERS:  ExternalPath        - External path to the object
@@ -922,26 +882,29 @@ AcpiDmCreateNewExternal (
     {
         /* Check for duplicates */
 
-        if (AcpiDmExternalIsMatch (ExternalPath, NextExternal->Path))
+        if (!strcmp (ExternalPath, NextExternal->Path))
         {
-            /* Duplicate method, check that the Value (ArgCount) is the same */
-
-            if ((NextExternal->Type == ACPI_TYPE_METHOD) &&
-                (NextExternal->Flags & ANOBJ_IS_EXTERNAL) &&
-                (NextExternal->Value != Value) &&
-                (Value > 0))
+            /*
+             * If this external came from an External() opcode, we are
+             * finished with this one. (No need to check any further).
+             */
+            if (NextExternal->Flags & ACPI_EXT_ORIGIN_FROM_OPCODE)
             {
-                ACPI_ERROR ((AE_INFO,
-                    "External method arg count mismatch %s: "
-                    "Current %u, attempted %u",
-                    NextExternal->Path, NextExternal->Value, Value));
+                return_ACPI_STATUS (AE_ALREADY_EXISTS);
             }
 
             /* Allow upgrade of type from ANY */
 
-            else if (NextExternal->Type == ACPI_TYPE_ANY)
+            else if ((NextExternal->Type == ACPI_TYPE_ANY) &&
+                (Type != ACPI_TYPE_ANY))
             {
                 NextExternal->Type = Type;
+            }
+
+            /* Update the argument count as necessary */
+
+            if (Value < NextExternal->Value)
+            {
                 NextExternal->Value = Value;
             }
 
@@ -1197,90 +1160,62 @@ AcpiDmEmitExternals (
 
     AcpiDmUnresolvedWarning (1);
 
-    /* Emit any unresolved method externals in a single text block */
-
-    NextExternal = AcpiGbl_ExternalList;
-    while (NextExternal)
-    {
-        if ((NextExternal->Type == ACPI_TYPE_METHOD) &&
-            (!(NextExternal->Flags & ACPI_EXT_RESOLVED_REFERENCE)))
-        {
-            AcpiOsPrintf ("    External (%s%s",
-                NextExternal->Path,
-                AcpiDmGetObjectTypeName (NextExternal->Type));
-
-            AcpiOsPrintf (")    // Warning: Unresolved method, "
-                "guessing %u arguments\n",
-                NextExternal->Value);
-
-            NextExternal->Flags |= ACPI_EXT_EXTERNAL_EMITTED;
-        }
-
-        NextExternal = NextExternal->Next;
-    }
-
-    AcpiOsPrintf ("\n");
-
-
-    /* Emit externals that were imported from a file */
-
     if (Gbl_ExternalRefFilename)
     {
         AcpiOsPrintf (
-            "    /*\n     * External declarations that were imported from\n"
-            "     * the reference file [%s]\n     */\n",
+            "    /*\n     * External declarations were imported from\n"
+            "     * a reference file -- %s\n     */\n\n",
             Gbl_ExternalRefFilename);
-
-        NextExternal = AcpiGbl_ExternalList;
-        while (NextExternal)
-        {
-            if (!(NextExternal->Flags & ACPI_EXT_EXTERNAL_EMITTED) &&
-                (NextExternal->Flags & ACPI_EXT_ORIGIN_FROM_FILE))
-            {
-                AcpiOsPrintf ("    External (%s%s",
-                    NextExternal->Path,
-                    AcpiDmGetObjectTypeName (NextExternal->Type));
-
-                if (NextExternal->Type == ACPI_TYPE_METHOD)
-                {
-                    AcpiOsPrintf (")    // %u Arguments\n",
-                        NextExternal->Value);
-                }
-                else
-                {
-                    AcpiOsPrintf (")\n");
-                }
-                NextExternal->Flags |= ACPI_EXT_EXTERNAL_EMITTED;
-            }
-
-            NextExternal = NextExternal->Next;
-        }
-
-        AcpiOsPrintf ("\n");
     }
 
     /*
-     * Walk the list of externals found during the AML parsing
+     * Walk and emit the list of externals found during the AML parsing
      */
     while (AcpiGbl_ExternalList)
     {
         if (!(AcpiGbl_ExternalList->Flags & ACPI_EXT_EXTERNAL_EMITTED))
         {
-            AcpiOsPrintf ("    External (%s%s",
+            AcpiOsPrintf ("    External (%s%s)",
                 AcpiGbl_ExternalList->Path,
                 AcpiDmGetObjectTypeName (AcpiGbl_ExternalList->Type));
 
-            /* For methods, add a comment with the number of arguments */
+            /* Check for "unresolved" method reference */
 
-            if (AcpiGbl_ExternalList->Type == ACPI_TYPE_METHOD)
+            if ((AcpiGbl_ExternalList->Type == ACPI_TYPE_METHOD) &&
+                (!(AcpiGbl_ExternalList->Flags & ACPI_EXT_RESOLVED_REFERENCE)))
             {
-                AcpiOsPrintf (")    // %u Arguments\n",
+                AcpiOsPrintf ("    // Warning: Unknown method, "
+                    "guessing %u arguments",
                     AcpiGbl_ExternalList->Value);
             }
+
+            /* Check for external from a external references file */
+
+            else if (AcpiGbl_ExternalList->Flags & ACPI_EXT_ORIGIN_FROM_FILE)
+            {
+                if (AcpiGbl_ExternalList->Type == ACPI_TYPE_METHOD)
+                {
+                    AcpiOsPrintf ("    // %u Arguments",
+                        AcpiGbl_ExternalList->Value);
+                }
+
+                AcpiOsPrintf ("    // From external reference file");
+            }
+
+            /* This is the normal external case */
+
             else
             {
-                AcpiOsPrintf (")\n");
+                /* For methods, add a comment with the number of arguments */
+
+                if (AcpiGbl_ExternalList->Type == ACPI_TYPE_METHOD)
+                {
+                    AcpiOsPrintf ("    // %u Arguments",
+                        AcpiGbl_ExternalList->Value);
+                }
             }
+
+            AcpiOsPrintf ("\n");
         }
 
         /* Free this external info block and move on to next external */
@@ -1413,15 +1348,17 @@ AcpiDmUnresolvedWarning (
     Format = Type ? Pad : NoPad;
 
     sprintf (ExternalWarningPart1,
-        "%s iASL Warning: There were %u external control methods found during\n"
+        "%s iASL Warning: There %s %u external control method%s found during\n"
         "%s disassembly, but only %u %s resolved (%u unresolved). Additional\n"
         "%s ACPI tables may be required to properly disassemble the code. This\n"
         "%s resulting disassembler output file may not compile because the\n"
         "%s disassembler did not know how many arguments to assign to the\n"
         "%s unresolved methods. Note: SSDTs can be dynamically loaded at\n"
         "%s runtime and may or may not be available via the host OS.\n",
-        Format, AcpiGbl_NumExternalMethods, Format, AcpiGbl_ResolvedExternalMethods,
-        (AcpiGbl_ResolvedExternalMethods > 1 ? "were" : "was"),
+        Format, (AcpiGbl_NumExternalMethods != 1 ? "were" : "was"),
+        AcpiGbl_NumExternalMethods, (AcpiGbl_NumExternalMethods != 1 ? "s" : ""),
+        Format, AcpiGbl_ResolvedExternalMethods,
+        (AcpiGbl_ResolvedExternalMethods != 1 ? "were" : "was"),
         (AcpiGbl_NumExternalMethods - AcpiGbl_ResolvedExternalMethods),
         Format, Format, Format, Format, Format);
 
@@ -1463,7 +1400,7 @@ AcpiDmUnresolvedWarning (
         {
             /* The -e option was specified, but there are still some unresolved externals */
 
-            AcpiOsPrintf ("    /*\n%s     *\n     *\n     */\n",
+            AcpiOsPrintf ("    /*\n%s     *\n%s     *\n%s     */\n",
                ExternalWarningPart1, ExternalWarningPart3, ExternalWarningPart4);
         }
     }
diff --git a/src/acpica/source/common/dmtable.c b/src/acpica/source/common/dmtable.c
index a62c48d..35c4fa1 100644
--- a/src/acpica/source/common/dmtable.c
+++ b/src/acpica/source/common/dmtable.c
@@ -190,6 +190,7 @@ static const char           *AcpiDmEinjActions[] =
     "Check Busy Status",
     "Get Command Status",
     "Set Error Type With Address",
+    "Get Execute Timings",
     "Unknown Action"
 };
 
@@ -222,6 +223,7 @@ static const char           *AcpiDmErstActions[] =
     "Get Error Address Range",
     "Get Error Address Length",
     "Get Error Attributes",
+    "Execute Timings",
     "Unknown Action"
 };
 
@@ -281,6 +283,10 @@ static const char           *AcpiDmHestNotifySubnames[] =
     "NMI",
     "CMCI",                         /* ACPI 5.0 */
     "MCE",                          /* ACPI 5.0 */
+    "GPIO",                         /* ACPI 6.0 */
+    "SEA",                          /* ACPI 6.1 */
+    "SEI",                          /* ACPI 6.1 */
+    "GSIV",                         /* ACPI 6.1 */
     "Unknown Notify Type"           /* Reserved */
 };
 
diff --git a/src/acpica/source/common/dmtables.c b/src/acpica/source/common/dmtables.c
index 6894d9f..813ba83 100644
--- a/src/acpica/source/common/dmtables.c
+++ b/src/acpica/source/common/dmtables.c
@@ -213,7 +213,6 @@ AdCreateTableHeader (
     char                    *Filename,
     ACPI_TABLE_HEADER       *Table)
 {
-    char                    *NewFilename;
     UINT8                   Checksum;
 
 
@@ -256,11 +255,10 @@ AdCreateTableHeader (
 
         break;
     }
-    AcpiOsPrintf ("\n");
 
     /* Print and validate the table checksum */
 
-    AcpiOsPrintf (" *     Checksum         0x%2.2X",        Table->Checksum);
+    AcpiOsPrintf ("\n *     Checksum         0x%2.2X",        Table->Checksum);
 
     Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), Table->Length);
     if (Checksum)
@@ -277,33 +275,16 @@ AdCreateTableHeader (
     AcpiOsPrintf (" *     Compiler Version 0x%8.8X (%u)\n", Table->AslCompilerRevision, Table->AslCompilerRevision);
     AcpiOsPrintf (" */\n");
 
-    /* Create AML output filename based on input filename */
-
-    if (Filename)
-    {
-        NewFilename = FlGenerateFilename (Filename, "aml");
-    }
-    else
-    {
-        NewFilename = UtStringCacheCalloc (9);
-        if (NewFilename)
-        {
-            strncat (NewFilename, Table->Signature, 4);
-            strcat (NewFilename, ".aml");
-        }
-    }
-
-    if (!NewFilename)
-    {
-        AcpiOsPrintf (" **** Could not generate AML output filename\n");
-        return;
-    }
-
-    /* Open the ASL definition block */
-
+    /*
+     * Open the ASL definition block.
+     *
+     * Note: the AMLFilename string is left zero-length in order to just let
+     * the compiler create it when the disassembled file is compiled. This
+     * makes it easier to rename the disassembled ASL file if needed.
+     */
     AcpiOsPrintf (
-        "DefinitionBlock (\"%s\", \"%4.4s\", %hu, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
-        NewFilename, Table->Signature, Table->Revision,
+        "DefinitionBlock (\"\", \"%4.4s\", %hu, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
+        Table->Signature, Table->Revision,
         Table->OemId, Table->OemTableId, Table->OemRevision);
 }
 
diff --git a/src/acpica/source/common/dmtbdump.c b/src/acpica/source/common/dmtbdump.c
index a3f67c9..bf09e58 100644
--- a/src/acpica/source/common/dmtbdump.c
+++ b/src/acpica/source/common/dmtbdump.c
@@ -1845,6 +1845,12 @@ AcpiDmDumpIort (
             IortSmmu = ACPI_ADD_PTR (ACPI_IORT_SMMU, IortNode, NodeOffset);
             break;
 
+        case ACPI_IORT_NODE_SMMU_V3:
+
+            InfoTable = AcpiDmTableInfoIort4;
+            Length = IortNode->Length - NodeOffset;
+            break;
+
         default:
 
             AcpiOsPrintf ("\n**** Unknown IORT node type 0x%X\n",
@@ -3211,7 +3217,7 @@ AcpiDmDumpS3pt (
 {
     ACPI_STATUS             Status;
     UINT32                  Offset = sizeof (ACPI_TABLE_S3PT);
-    ACPI_S3PT_HEADER        *SubTable;
+    ACPI_FPDT_HEADER        *SubTable;
     ACPI_DMTABLE_INFO       *InfoTable;
     ACPI_TABLE_S3PT         *S3ptTable = ACPI_CAST_PTR (ACPI_TABLE_S3PT, Tables);
 
@@ -3224,7 +3230,7 @@ AcpiDmDumpS3pt (
         return 0;
     }
 
-    SubTable = ACPI_ADD_PTR (ACPI_S3PT_HEADER, S3ptTable, Offset);
+    SubTable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, S3ptTable, Offset);
     while (Offset < S3ptTable->Length)
     {
         /* Common subtable header */
@@ -3276,7 +3282,7 @@ NextSubTable:
         /* Point to next subtable */
 
         Offset += SubTable->Length;
-        SubTable = ACPI_ADD_PTR (ACPI_S3PT_HEADER, SubTable, SubTable->Length);
+        SubTable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, SubTable, SubTable->Length);
     }
 
     return (S3ptTable->Length);
diff --git a/src/acpica/source/common/dmtbinfo.c b/src/acpica/source/common/dmtbinfo.c
index bb2cdbf..ea30313 100644
--- a/src/acpica/source/common/dmtbinfo.c
+++ b/src/acpica/source/common/dmtbinfo.c
@@ -222,8 +222,8 @@
 #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_FPDT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_FPDT_BOOT_POINTER,f)
+#define ACPI_FPDT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_FPDT_S3PT_POINTER,f)
 #define ACPI_GTDT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_GTDT_TIMER_BLOCK,f)
 #define ACPI_GTDT0a_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_GTDT_TIMER_ENTRY,f)
 #define ACPI_GTDT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_GTDT_WATCHDOG,f)
@@ -242,6 +242,7 @@
 #define ACPI_IORT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_NAMED_COMPONENT,f)
 #define ACPI_IORT2_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_ROOT_COMPLEX,f)
 #define ACPI_IORT3_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU,f)
+#define ACPI_IORT4_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_V3,f)
 #define ACPI_IORTA_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_MEMORY_ACCESS,f)
 #define ACPI_IORTH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_NODE,f)
 #define ACPI_IORTM_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_ID_MAPPING,f)
@@ -294,7 +295,7 @@
 #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_S3PTH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_FPDT_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_SLIC_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIC,f)
@@ -328,6 +329,7 @@
 #define ACPI_GTDT0a_FLAG_OFFSET(f,o)    ACPI_FLAG_OFFSET (ACPI_GTDT_TIMER_ENTRY,f,o)
 #define ACPI_GTDT1_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_GTDT_WATCHDOG,f,o)
 #define ACPI_IORT3_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_IORT_SMMU,f,o)
+#define ACPI_IORT4_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_IORT_SMMU_V3,f,o)
 #define ACPI_IORTA_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_IORT_MEMORY_ACCESS,f,o)
 #define ACPI_IORTM_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_IORT_ID_MAPPING,f,o)
 #define ACPI_LPITH_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_LPIT_HEADER,f,o)
@@ -1167,11 +1169,7 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoFpdtHdr[] =
 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_UINT64,   ACPI_FPDT1_OFFSET (Address),                "FPDT Boot Record Address", 0},
     ACPI_DMT_TERMINATOR
 };
 
@@ -1180,10 +1178,18 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoFpdt0[] =
 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_UINT64,   ACPI_FPDT1_OFFSET (Address),                "S3PT Record Address", 0},
     ACPI_DMT_TERMINATOR
 };
 
+#if 0
+    /* Boot Performance Record, not supported at this time. */
+    {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},
+#endif
 
 /*******************************************************************************
  *
@@ -1629,6 +1635,23 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoIort3c[] =
     ACPI_DMT_TERMINATOR
 };
 
+/* 0x04: SMMUv3 */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoIort4[] =
+{
+    {ACPI_DMT_UINT64,   ACPI_IORT4_OFFSET (BaseAddress),            "Base Address", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (Flags),                  "Flags (decoded below)", 0},
+    {ACPI_DMT_FLAG0,    ACPI_IORT4_FLAG_OFFSET (Flags, 0),          "COHACC Override", 0},
+    {ACPI_DMT_FLAG1,    ACPI_IORT4_FLAG_OFFSET (Flags, 0),          "HTTU Override", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (Reserved),               "Reserved", 0},
+    {ACPI_DMT_UINT64,   ACPI_IORT4_OFFSET (VatosAddress),           "VATOS Address", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (Model),                  "Model", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (EventGsiv),              "Event GSIV", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (PriGsiv),                "PRI GSIV", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (GerrGsiv),               "GERR GSIV", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (SyncGsiv),               "Sync GSIV", 0},
+    ACPI_DMT_TERMINATOR
+};
 
 /*******************************************************************************
  *
@@ -2281,7 +2304,10 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoNfit4[] =
     {ACPI_DMT_UINT16,   ACPI_NFIT4_OFFSET (SubsystemVendorId),      "Subsystem Vendor Id", 0},
     {ACPI_DMT_UINT16,   ACPI_NFIT4_OFFSET (SubsystemDeviceId),      "Subsystem Device Id", 0},
     {ACPI_DMT_UINT16,   ACPI_NFIT4_OFFSET (SubsystemRevisionId),    "Subsystem Revision Id", 0},
-    {ACPI_DMT_UINT48,   ACPI_NFIT4_OFFSET (Reserved[0]),            "Reserved", 0},
+    {ACPI_DMT_UINT8,    ACPI_NFIT4_OFFSET (ValidFields),            "Valid Fields", 0},
+    {ACPI_DMT_UINT8,    ACPI_NFIT4_OFFSET (ManufacturingLocation),  "Manufacturing Location", 0},
+    {ACPI_DMT_UINT16,   ACPI_NFIT4_OFFSET (ManufacturingDate),      "Manufacturing Date", 0},
+    {ACPI_DMT_UINT16,   ACPI_NFIT4_OFFSET (Reserved[0]),            "Reserved", 0},
     {ACPI_DMT_UINT32,   ACPI_NFIT4_OFFSET (SerialNumber),           "Serial Number", 0},
     {ACPI_DMT_UINT16,   ACPI_NFIT4_OFFSET (Code),                   "Code", 0},
     {ACPI_DMT_UINT16,   ACPI_NFIT4_OFFSET (Windows),                "Window Count", 0},
diff --git a/src/acpica/source/compiler/Makefile.am b/src/acpica/source/compiler/Makefile.am
index 9dc9539..33accbf 100644
--- a/src/acpica/source/compiler/Makefile.am
+++ b/src/acpica/source/compiler/Makefile.am
@@ -80,6 +80,7 @@ libfwtsiasl_la_SOURCES = 			\
 	aslopcodes.c 				\
 	asloperands.c 				\
 	aslopt.c 				\
+	aslpld.c				\
 	aslpredef.c 				\
 	aslresource.c 				\
 	aslrestype1.c 				\
diff --git a/src/acpica/source/compiler/aslcodegen.c b/src/acpica/source/compiler/aslcodegen.c
index ae96b36..410a400 100644
--- a/src/acpica/source/compiler/aslcodegen.c
+++ b/src/acpica/source/compiler/aslcodegen.c
@@ -662,6 +662,12 @@ CgWriteNode (
         return;
     }
 
+    if ((Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) &&
+        Gbl_DoExternals == FALSE)
+    {
+        return;
+    }
+
     Op->Asl.FinalAmlLength = 0;
 
     switch (Op->Asl.AmlOpcode)
diff --git a/src/acpica/source/compiler/aslcompile.c b/src/acpica/source/compiler/aslcompile.c
index 63d9c6a..b9843a9 100644
--- a/src/acpica/source/compiler/aslcompile.c
+++ b/src/acpica/source/compiler/aslcompile.c
@@ -353,11 +353,14 @@ CmDoCompile (
 
     /* Resolve External Declarations */
 
-    Event = UtBeginEvent ("Resolve all Externals");
-    DbgPrint (ASL_DEBUG_OUTPUT, "\nResolve Externals\n\n");
-    TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
-        ExAmlExternalWalkBegin, ExAmlExternalWalkEnd, NULL);
-    UtEndEvent (Event);
+    if (Gbl_DoExternals)
+    {
+        Event = UtBeginEvent ("Resolve all Externals");
+        DbgPrint (ASL_DEBUG_OUTPUT, "\nResolve Externals\n\n");
+        TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
+            ExAmlExternalWalkBegin, ExAmlExternalWalkEnd, NULL);
+        UtEndEvent (Event);
+    }
 
     /*
      * Semantic analysis. This can happen only after the
diff --git a/src/acpica/source/compiler/aslcompiler.h b/src/acpica/source/compiler/aslcompiler.h
index d610260..ce36df6 100644
--- a/src/acpica/source/compiler/aslcompiler.h
+++ b/src/acpica/source/compiler/aslcompiler.h
@@ -610,6 +610,14 @@ OptOptimizeNamePath (
 
 
 /*
+ * aslpld - ToPLD macro support
+ */
+void
+OpcDoPld (
+    ACPI_PARSE_OBJECT       *Op);
+
+
+/*
  * aslprintf - Printf/Fprintf macros
  */
 void
diff --git a/src/acpica/source/compiler/aslexternal.c b/src/acpica/source/compiler/aslexternal.c
index 7a347f5..ff7b785 100644
--- a/src/acpica/source/compiler/aslexternal.c
+++ b/src/acpica/source/compiler/aslexternal.c
@@ -218,6 +218,7 @@ ExInsertArgCount (
     char *                  ExternalName;
     char *                  CallName;
     UINT16                  ArgCount = 0;
+    ACPI_STATUS             Status;
 
 
     CallName = AcpiNsGetNormalizedPathname (Op->Asl.Node, TRUE);
@@ -238,43 +239,49 @@ ExInsertArgCount (
         NameOp = Next->Asl.Child->Asl.Child;
         ExternalName = AcpiNsGetNormalizedPathname (NameOp->Asl.Node, TRUE);
 
-        if (!strcmp (CallName, ExternalName))
+        if (strcmp (CallName, ExternalName))
         {
-            Next->Asl.Child->Asl.CompileFlags |= NODE_VISITED;
-
-            /*
-             * Since we will reposition Externals to the Root, set Namepath
-             * to the fully qualified name and recalculate the aml length
-             */
-            if (ACPI_FAILURE (UtInternalizeName (
-                ExternalName, &NameOp->Asl.Value.String)))
-            {
-                AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL,
-                    NULL, "- Could not Internalize External");
+            ACPI_FREE (ExternalName);
+            Next = Next->Asl.Next;
+            continue;
+        }
 
-                break;
-            }
+        Next->Asl.Child->Asl.CompileFlags |= NODE_VISITED;
 
-            NameOp->Asl.AmlLength = strlen (NameOp->Asl.Value.String);
+        /*
+         * Since we will reposition Externals to the Root, set Namepath
+         * to the fully qualified name and recalculate the aml length
+         */
+        Status = UtInternalizeName (ExternalName,
+            &NameOp->Asl.Value.String);
 
-            /* Get argument count */
+        ACPI_FREE (ExternalName);
+        if (ACPI_FAILURE (Status))
+        {
+            AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL,
+                NULL, "- Could not Internalize External");
+            break;
+        }
 
-            Child = Op->Asl.Child;
-            while (Child)
-            {
-                ArgCount++;
-                Child = Child->Asl.Next;
-            }
+        NameOp->Asl.AmlLength = strlen (NameOp->Asl.Value.String);
 
-            /* Setup ArgCount operand */
+        /* Get argument count */
 
-            ArgCountOp = Next->Asl.Child->Asl.Child->Asl.Next->Asl.Next;
-            ArgCountOp->Asl.Value.Integer = ArgCount;
-            break;
+        Child = Op->Asl.Child;
+        while (Child)
+        {
+            ArgCount++;
+            Child = Child->Asl.Next;
         }
 
-        Next = Next->Asl.Next;
+        /* Setup ArgCount operand */
+
+        ArgCountOp = Next->Asl.Child->Asl.Child->Asl.Next->Asl.Next;
+        ArgCountOp->Asl.Value.Integer = ArgCount;
+        break;
     }
+
+    ACPI_FREE (CallName);
 }
 
 
diff --git a/src/acpica/source/compiler/aslglobal.h b/src/acpica/source/compiler/aslglobal.h
index 14a4db2..255dbe0 100644
--- a/src/acpica/source/compiler/aslglobal.h
+++ b/src/acpica/source/compiler/aslglobal.h
@@ -253,6 +253,7 @@ ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_AllExceptionsDisabled,
 ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_PruneParseTree, FALSE);
 ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_DoTypechecking, TRUE);
 ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_EnableReferenceTypechecking, FALSE);
+ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_DoExternals, TRUE);
 
 
 #define HEX_OUTPUT_NONE             0
diff --git a/src/acpica/source/compiler/asllength.c b/src/acpica/source/compiler/asllength.c
index 79e70a6..4ac924b 100644
--- a/src/acpica/source/compiler/asllength.c
+++ b/src/acpica/source/compiler/asllength.c
@@ -478,6 +478,14 @@ CgGenerateAmlLengths (
 
         break;
 
+    case PARSEOP_EXTERNAL:
+
+        if (Gbl_DoExternals == TRUE)
+        {
+            CgGenerateAmlOpcodeLength (Op);
+        }
+        break;
+
     default:
 
         CgGenerateAmlOpcodeLength (Op);
diff --git a/src/acpica/source/compiler/aslload.c b/src/acpica/source/compiler/aslload.c
index d85750d..30a8b64 100644
--- a/src/acpica/source/compiler/aslload.c
+++ b/src/acpica/source/compiler/aslload.c
@@ -770,6 +770,25 @@ LdNamespace1Begin (
                  */
                 Status = AE_OK;
             }
+            else if ((Node->Flags & ANOBJ_IS_EXTERNAL) &&
+                     (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) &&
+                     (ObjectType == ACPI_TYPE_ANY))
+            {
+                /* Allow update of externals of unknown type. */
+
+                if (AcpiNsOpensScope (ActualObjectType))
+                {
+                    Node->Type = (UINT8) ActualObjectType;
+                    Status = AE_OK;
+                }
+                else
+                {
+                    sprintf (MsgBuffer, "%s [%s]", Op->Asl.ExternalName,
+                        AcpiUtGetTypeName (Node->Type));
+                    AslError (ASL_ERROR, ASL_MSG_SCOPE_TYPE, Op, MsgBuffer);
+                    return_ACPI_STATUS (AE_OK);
+                }
+            }
             else
             {
                 /* Valid error, object already exists */
diff --git a/src/acpica/source/compiler/aslmessages.c b/src/acpica/source/compiler/aslmessages.c
index db144ca..b8d8cbd 100644
--- a/src/acpica/source/compiler/aslmessages.c
+++ b/src/acpica/source/compiler/aslmessages.c
@@ -202,7 +202,7 @@ const char                      *AslCompilerMsgs [] =
 /*    ASL_MSG_HID_SUFFIX */                 "_HID suffix must be all hex digits",
 /*    ASL_MSG_INCLUDE_FILE_OPEN */          "Could not open include file",
 /*    ASL_MSG_INPUT_FILE_OPEN */            "Could not open input file",
-/*    ASL_MSG_INTEGER_LENGTH */             "64-bit integer in 32-bit table, truncating (DSDT version < 2)",
+/*    ASL_MSG_INTEGER_LENGTH */             "64-bit integer in 32-bit table, truncating (DSDT or SSDT version < 2)",
 /*    ASL_MSG_INTEGER_OPTIMIZATION */       "Integer optimized to single-byte AML opcode",
 /*    ASL_MSG_INTERRUPT_LIST */             "Too many interrupts (16 max)",
 /*    ASL_MSG_INTERRUPT_NUMBER */           "Invalid interrupt number (must be 0-15)",
@@ -296,7 +296,7 @@ const char                      *AslCompilerMsgs [] =
 /*    ASL_MSG_TAG_SMALLER */                "ResourceTag smaller than Field",
 /*    ASL_MSG_TIMEOUT */                    "Result is not used, possible operator timeout will be missed",
 /*    ASL_MSG_TOO_MANY_TEMPS */             "Method requires too many temporary variables (_T_x)",
-/*    ASL_MSG_TRUNCATION */                 "64-bit return value will be truncated to 32 bits (DSDT version < 2)",
+/*    ASL_MSG_TRUNCATION */                 "64-bit return value will be truncated to 32 bits (DSDT or SSDT version < 2)",
 /*    ASL_MSG_UNKNOWN_RESERVED_NAME */      "Unknown reserved name",
 /*    ASL_MSG_UNREACHABLE_CODE */           "Statement is unreachable",
 /*    ASL_MSG_UNSUPPORTED */                "Unsupported feature",
diff --git a/src/acpica/source/compiler/aslopcodes.c b/src/acpica/source/compiler/aslopcodes.c
index bc49954..8445ca1 100644
--- a/src/acpica/source/compiler/aslopcodes.c
+++ b/src/acpica/source/compiler/aslopcodes.c
@@ -140,62 +140,9 @@ OpcDoEisaId (
     ACPI_PARSE_OBJECT       *Op);
 
 static void
-OpcDoPld (
-    ACPI_PARSE_OBJECT       *Op);
-
-static void
 OpcDoUuId (
     ACPI_PARSE_OBJECT       *Op);
 
-static UINT8 *
-OpcEncodePldBuffer (
-    ACPI_PLD_INFO           *PldInfo);
-
-
-/* ToPld strings */
-
-static char *AslPldPanelList[] =
-{
-    "TOP",
-    "BOTTOM",
-    "LEFT",
-    "RIGHT",
-    "FRONT",
-    "BACK",
-    "UNKNOWN",
-    NULL
-};
-
-static char *AslPldVerticalPositionList[] =
-{
-    "UPPER",
-    "CENTER",
-    "LOWER",
-    NULL
-};
-
-static char *AslPldHorizontalPositionList[] =
-{
-    "LEFT",
-    "CENTER",
-    "RIGHT",
-    NULL
-};
-
-static char *AslPldShapeList[] =
-{
-    "ROUND",
-    "OVAL",
-    "SQUARE",
-    "VERTICALRECTANGLE",
-    "HORIZONTALRECTANGLE",
-    "VERTICALTRAPEZOID",
-    "HORIZONTALTRAPEZOID",
-    "UNKNOWN",
-    "CHAMFERED",
-    NULL
-};
-
 
 /*******************************************************************************
  *
@@ -781,651 +728,6 @@ OpcDoEisaId (
 
 /*******************************************************************************
  *
- * FUNCTION:    OpcEncodePldBuffer
- *
- * PARAMETERS:  PldInfo             - _PLD buffer struct (Using local struct)
- *
- * RETURN:      Encode _PLD buffer suitable for return value from _PLD
- *
- * DESCRIPTION: Bit-packs a _PLD buffer struct.
- *
- ******************************************************************************/
-
-static UINT8 *
-OpcEncodePldBuffer (
-    ACPI_PLD_INFO           *PldInfo)
-{
-    UINT32                  *Buffer;
-    UINT32                  Dword;
-
-
-    Buffer = ACPI_ALLOCATE_ZEROED (ACPI_PLD_BUFFER_SIZE);
-    if (!Buffer)
-    {
-        return (NULL);
-    }
-
-    /* First 32 bits */
-
-    Dword = 0;
-    ACPI_PLD_SET_REVISION       (&Dword, PldInfo->Revision);
-    ACPI_PLD_SET_IGNORE_COLOR   (&Dword, PldInfo->IgnoreColor);
-    ACPI_PLD_SET_RED            (&Dword, PldInfo->Red);
-    ACPI_PLD_SET_GREEN          (&Dword, PldInfo->Green);
-    ACPI_PLD_SET_BLUE           (&Dword, PldInfo->Blue);
-    ACPI_MOVE_32_TO_32          (&Buffer[0], &Dword);
-
-    /* Second 32 bits */
-
-    Dword = 0;
-    ACPI_PLD_SET_WIDTH          (&Dword, PldInfo->Width);
-    ACPI_PLD_SET_HEIGHT         (&Dword, PldInfo->Height);
-    ACPI_MOVE_32_TO_32          (&Buffer[1], &Dword);
-
-    /* Third 32 bits */
-
-    Dword = 0;
-    ACPI_PLD_SET_USER_VISIBLE   (&Dword, PldInfo->UserVisible);
-    ACPI_PLD_SET_DOCK           (&Dword, PldInfo->Dock);
-    ACPI_PLD_SET_LID            (&Dword, PldInfo->Lid);
-    ACPI_PLD_SET_PANEL          (&Dword, PldInfo->Panel);
-    ACPI_PLD_SET_VERTICAL       (&Dword, PldInfo->VerticalPosition);
-    ACPI_PLD_SET_HORIZONTAL     (&Dword, PldInfo->HorizontalPosition);
-    ACPI_PLD_SET_SHAPE          (&Dword, PldInfo->Shape);
-    ACPI_PLD_SET_ORIENTATION    (&Dword, PldInfo->GroupOrientation);
-    ACPI_PLD_SET_TOKEN          (&Dword, PldInfo->GroupToken);
-    ACPI_PLD_SET_POSITION       (&Dword, PldInfo->GroupPosition);
-    ACPI_PLD_SET_BAY            (&Dword, PldInfo->Bay);
-    ACPI_MOVE_32_TO_32          (&Buffer[2], &Dword);
-
-    /* Fourth 32 bits */
-
-    Dword = 0;
-    ACPI_PLD_SET_EJECTABLE      (&Dword, PldInfo->Ejectable);
-    ACPI_PLD_SET_OSPM_EJECT     (&Dword, PldInfo->OspmEjectRequired);
-    ACPI_PLD_SET_CABINET        (&Dword, PldInfo->CabinetNumber);
-    ACPI_PLD_SET_CARD_CAGE      (&Dword, PldInfo->CardCageNumber);
-    ACPI_PLD_SET_REFERENCE      (&Dword, PldInfo->Reference);
-    ACPI_PLD_SET_ROTATION       (&Dword, PldInfo->Rotation);
-    ACPI_PLD_SET_ORDER          (&Dword, PldInfo->Order);
-    ACPI_MOVE_32_TO_32          (&Buffer[3], &Dword);
-
-    if (PldInfo->Revision >= 2)
-    {
-        /* Fifth 32 bits */
-
-        Dword = 0;
-        ACPI_PLD_SET_VERT_OFFSET    (&Dword, PldInfo->VerticalOffset);
-        ACPI_PLD_SET_HORIZ_OFFSET   (&Dword, PldInfo->HorizontalOffset);
-        ACPI_MOVE_32_TO_32          (&Buffer[4], &Dword);
-    }
-
-    return (ACPI_CAST_PTR (UINT8, Buffer));
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    OpcFindName
- *
- * PARAMETERS:  List                - Array of char strings to be searched
- *              Name                - Char string to string for
- *              Index               - Index value to set if found
- *
- * RETURN:      TRUE if any names matched, FALSE otherwise
- *
- * DESCRIPTION: Match PLD name to value in lookup table. Sets Value to
- *              equivalent parameter value.
- *
- ******************************************************************************/
-
-static BOOLEAN
-OpcFindName (
-    char                    **List,
-    char                    *Name,
-    UINT64                  *Index)
-{
-    char                     *Str;
-    UINT32                   i;
-
-
-    AcpiUtStrupr (Name);
-
-    for (i = 0, Str = List[0]; Str; i++, Str = List[i])
-    {
-        if (!(strncmp (Str, Name, strlen (Name))))
-        {
-            *Index = i;
-            return (TRUE);
-        }
-    }
-
-    return (FALSE);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    OpcDoPld
- *
- * PARAMETERS:  Op                  - Parse node
- *
- * RETURN:      None
- *
- * DESCRIPTION: Convert ToPLD macro to 20-byte buffer
- *
- ******************************************************************************/
-
-static void
-OpcDoPld (
-    ACPI_PARSE_OBJECT       *Op)
-{
-    UINT8                   *Buffer;
-    ACPI_PARSE_OBJECT       *Node;
-    ACPI_PLD_INFO           PldInfo;
-    ACPI_PARSE_OBJECT       *NewOp;
-
-
-    if (!Op)
-    {
-        AslError(ASL_ERROR, ASL_MSG_NOT_EXIST, Op, NULL);
-        return;
-    }
-
-    if (Op->Asl.ParseOpcode != PARSEOP_TOPLD)
-    {
-        AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Op, NULL);
-        return;
-    }
-
-    memset (&PldInfo, 0, sizeof (ACPI_PLD_INFO));
-
-    Node = Op->Asl.Child;
-    while (Node)
-    {
-        switch (Node->Asl.ParseOpcode)
-        {
-        case PARSEOP_PLD_REVISION:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 127)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            PldInfo.Revision = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_IGNORECOLOR:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 1)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            PldInfo.IgnoreColor = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_RED:
-        case PARSEOP_PLD_GREEN:
-        case PARSEOP_PLD_BLUE:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 255)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.ParseOpcode == PARSEOP_PLD_RED)
-            {
-                PldInfo.Red = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else if (Node->Asl.ParseOpcode == PARSEOP_PLD_GREEN)
-            {
-                PldInfo.Green = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else /* PARSEOP_PLD_BLUE */
-            {
-                PldInfo.Blue = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            break;
-
-        case PARSEOP_PLD_WIDTH:
-        case PARSEOP_PLD_HEIGHT:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 65535)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.ParseOpcode == PARSEOP_PLD_WIDTH)
-            {
-                PldInfo.Width = (UINT16) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else /* PARSEOP_PLD_HEIGHT */
-            {
-                PldInfo.Height = (UINT16) Node->Asl.Child->Asl.Value.Integer;
-            }
-
-            break;
-
-        case PARSEOP_PLD_USERVISIBLE:
-        case PARSEOP_PLD_DOCK:
-        case PARSEOP_PLD_LID:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 1)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.ParseOpcode == PARSEOP_PLD_USERVISIBLE)
-            {
-                PldInfo.UserVisible = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else if (Node->Asl.ParseOpcode == PARSEOP_PLD_DOCK)
-            {
-                PldInfo.Dock = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else
-            {
-                PldInfo.Lid = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-
-            break;
-
-        case PARSEOP_PLD_PANEL:
-
-            if (Node->Asl.Child->Asl.ParseOpcode == PARSEOP_INTEGER)
-            {
-                if (Node->Asl.Child->Asl.Value.Integer > 6)
-                {
-                    AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                    break;
-                }
-            }
-            else /* PARSEOP_STRING */
-            {
-                if (!OpcFindName(AslPldPanelList,
-                    Node->Asl.Child->Asl.Value.String,
-                    &Node->Asl.Child->Asl.Value.Integer))
-                {
-                    AslError(ASL_ERROR, ASL_MSG_INVALID_OPERAND, Node, NULL);
-                    break;
-                }
-            }
-
-            PldInfo.Panel = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_VERTICALPOSITION:
-
-            if (Node->Asl.Child->Asl.ParseOpcode == PARSEOP_INTEGER)
-            {
-                if (Node->Asl.Child->Asl.Value.Integer > 2)
-                {
-                    AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                    break;
-                }
-            }
-            else /* PARSEOP_STRING */
-            {
-                if (!OpcFindName(AslPldVerticalPositionList,
-                    Node->Asl.Child->Asl.Value.String,
-                    &Node->Asl.Child->Asl.Value.Integer))
-                {
-                    AslError(ASL_ERROR, ASL_MSG_INVALID_OPERAND, Node, NULL);
-                    break;
-                }
-            }
-
-            PldInfo.VerticalPosition = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_HORIZONTALPOSITION:
-
-            if (Node->Asl.Child->Asl.ParseOpcode == PARSEOP_INTEGER)
-            {
-                if (Node->Asl.Child->Asl.Value.Integer > 2)
-                {
-                    AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                    break;
-                }
-            }
-            else /* PARSEOP_STRING */
-            {
-                if (!OpcFindName(AslPldHorizontalPositionList,
-                    Node->Asl.Child->Asl.Value.String,
-                    &Node->Asl.Child->Asl.Value.Integer))
-                {
-                    AslError(ASL_ERROR, ASL_MSG_INVALID_OPERAND, Node, NULL);
-                    break;
-                }
-            }
-
-            PldInfo.HorizontalPosition = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_SHAPE:
-
-            if (Node->Asl.Child->Asl.ParseOpcode == PARSEOP_INTEGER)
-            {
-                if (Node->Asl.Child->Asl.Value.Integer > 8)
-                {
-                    AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                    break;
-                }
-            }
-            else /* PARSEOP_STRING */
-            {
-                if (!OpcFindName(AslPldShapeList,
-                    Node->Asl.Child->Asl.Value.String,
-                    &Node->Asl.Child->Asl.Value.Integer))
-                {
-                    AslError(ASL_ERROR, ASL_MSG_INVALID_OPERAND, Node, NULL);
-                    break;
-                }
-            }
-
-            PldInfo.Shape = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_GROUPORIENTATION:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 1)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            PldInfo.GroupOrientation = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_GROUPTOKEN:
-        case PARSEOP_PLD_GROUPPOSITION:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 255)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-
-            if (Node->Asl.ParseOpcode == PARSEOP_PLD_GROUPTOKEN)
-            {
-                PldInfo.GroupToken = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else /* PARSEOP_PLD_GROUPPOSITION */
-            {
-                PldInfo.GroupPosition = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-
-            break;
-
-        case PARSEOP_PLD_BAY:
-        case PARSEOP_PLD_EJECTABLE:
-        case PARSEOP_PLD_EJECTREQUIRED:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 1)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.ParseOpcode == PARSEOP_PLD_BAY)
-            {
-                PldInfo.Bay = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else if (Node->Asl.ParseOpcode == PARSEOP_PLD_EJECTABLE)
-            {
-                PldInfo.Ejectable = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else /* PARSEOP_PLD_EJECTREQUIRED */
-            {
-                PldInfo.OspmEjectRequired = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-
-            break;
-
-        case PARSEOP_PLD_CABINETNUMBER:
-        case PARSEOP_PLD_CARDCAGENUMBER:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 255)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.ParseOpcode == PARSEOP_PLD_CABINETNUMBER)
-            {
-                PldInfo.CabinetNumber = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else /* PARSEOP_PLD_CARDCAGENUMBER */
-            {
-                PldInfo.CardCageNumber = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-
-            break;
-
-        case PARSEOP_PLD_REFERENCE:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 1)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            PldInfo.Reference = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_ROTATION:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 7)
-            {
-                switch (Node->Asl.Child->Asl.Value.Integer)
-                {
-                case 45:
-
-                    Node->Asl.Child->Asl.Value.Integer = 1;
-                    break;
-
-                case 90:
-
-                    Node->Asl.Child->Asl.Value.Integer = 2;
-                    break;
-
-                case 135:
-
-                    Node->Asl.Child->Asl.Value.Integer = 3;
-                    break;
-
-                case 180:
-
-                    Node->Asl.Child->Asl.Value.Integer = 4;
-                    break;
-
-                case 225:
-
-                    Node->Asl.Child->Asl.Value.Integer = 5;
-                    break;
-
-                case 270:
-
-                    Node->Asl.Child->Asl.Value.Integer = 6;
-                    break;
-
-                case 315:
-
-                    Node->Asl.Child->Asl.Value.Integer = 7;
-                    break;
-
-                default:
-
-                    AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                    break;
-                }
-            }
-
-            PldInfo.Rotation = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_ORDER:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 31)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            PldInfo.Order = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_VERTICALOFFSET:
-        case PARSEOP_PLD_HORIZONTALOFFSET:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 65535)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.ParseOpcode == PARSEOP_PLD_VERTICALOFFSET)
-            {
-                PldInfo.VerticalOffset = (UINT16) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else /* PARSEOP_PLD_HORIZONTALOFFSET */
-            {
-                PldInfo.HorizontalOffset = (UINT16) Node->Asl.Child->Asl.Value.Integer;
-            }
-
-            break;
-
-        default:
-
-            AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-            break;
-        }
-
-        Node = Node->Asl.Next;
-    }
-
-    Buffer = OpcEncodePldBuffer(&PldInfo);
-
-    /* Change Op to a Buffer */
-
-    Op->Asl.ParseOpcode = PARSEOP_BUFFER;
-    Op->Common.AmlOpcode = AML_BUFFER_OP;
-
-    /* Disable further optimization */
-
-    Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST;
-    UtSetParseOpName (Op);
-
-    /* Child node is the buffer length */
-
-    NewOp = TrAllocateNode (PARSEOP_INTEGER);
-
-    NewOp->Asl.AmlOpcode = AML_BYTE_OP;
-    NewOp->Asl.Value.Integer = 20;
-    NewOp->Asl.Parent = Op;
-
-    Op->Asl.Child = NewOp;
-    Op = NewOp;
-
-    /* Peer to the child is the raw buffer data */
-
-    NewOp = TrAllocateNode (PARSEOP_RAW_DATA);
-    NewOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
-    NewOp->Asl.AmlLength = 20;
-    NewOp->Asl.Value.String = ACPI_CAST_PTR (char, Buffer);
-    NewOp->Asl.Parent = Op->Asl.Parent;
-
-    Op->Asl.Next = NewOp;
-}
-
-
-/*******************************************************************************
- *
  * FUNCTION:    OpcDoUuId
  *
  * PARAMETERS:  Op                  - Parse node
@@ -1585,6 +887,15 @@ OpcGenerateAmlOpcode (
         Gbl_HasIncludeFiles = TRUE;
         break;
 
+    case PARSEOP_EXTERNAL:
+
+        if (Gbl_DoExternals == FALSE)
+        {
+            Op->Asl.Child->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
+            Op->Asl.Child->Asl.Next->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
+        }
+        break;
+
     case PARSEOP_TIMER:
 
         if (AcpiGbl_IntegerBitWidth == 32)
diff --git a/src/acpica/source/compiler/aslopt.c b/src/acpica/source/compiler/aslopt.c
index a1af93f..ab8a931 100644
--- a/src/acpica/source/compiler/aslopt.c
+++ b/src/acpica/source/compiler/aslopt.c
@@ -289,7 +289,7 @@ OptBuildShortestPath (
     UINT32                  Index;
     UINT32                  NumCarats;
     UINT32                  i;
-    char                    *NewPath;
+    char                    *NewPathInternal;
     char                    *NewPathExternal;
     ACPI_NAMESPACE_NODE     *Node;
     ACPI_GENERIC_STATE      ScopeInfo;
@@ -325,11 +325,11 @@ OptBuildShortestPath (
     {
         /* Compare two single NameSegs */
 
+        Index = (NumCommonSegments * ACPI_PATH_SEGMENT_LENGTH) + 1;
+
         if (!ACPI_COMPARE_NAME (
-            &((char *) TargetPath->Pointer)[
-                (NumCommonSegments * ACPI_PATH_SEGMENT_LENGTH) + 1],
-            &((char *) CurrentPath->Pointer)[
-                (NumCommonSegments * ACPI_PATH_SEGMENT_LENGTH) + 1]))
+            &(ACPI_CAST_PTR (char, TargetPath->Pointer)) [Index],
+            &(ACPI_CAST_PTR (char, CurrentPath->Pointer)) [Index]))
         {
             /* Mismatch */
 
@@ -369,8 +369,8 @@ OptBuildShortestPath (
     /*
      * Construct a new target string
      */
-    NewPathExternal = ACPI_ALLOCATE_ZEROED (
-        TargetPath->Length + NumCarats + 1);
+    NewPathExternal =
+        ACPI_ALLOCATE_ZEROED (TargetPath->Length + NumCarats + 1);
 
     /* Insert the Carats into the Target string */
 
@@ -387,7 +387,8 @@ OptBuildShortestPath (
 
     /* Special handling for exact subpath in a name declaration */
 
-    if (IsDeclaration && SubPath && (CurrentPath->Length > TargetPath->Length))
+    if (IsDeclaration && SubPath &&
+        (CurrentPath->Length > TargetPath->Length))
     {
         /*
          * The current path is longer than the target, and the target is a
@@ -413,7 +414,8 @@ OptBuildShortestPath (
         Index = TargetPath->Length;
     }
 
-    strcpy (&NewPathExternal[i], &((char *) TargetPath->Pointer)[Index]);
+    strcpy (&NewPathExternal[i],
+        &(ACPI_CAST_PTR (char, TargetPath->Pointer))[Index]);
     ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS, " %-24s", NewPathExternal));
 
     /*
@@ -421,22 +423,24 @@ OptBuildShortestPath (
      * string to make sure that this is in fact an optimization. If the
      * original string is already optimal, there is no point in continuing.
      */
-    Status = AcpiNsInternalizeName (NewPathExternal, &NewPath);
+    Status = AcpiNsInternalizeName (NewPathExternal, &NewPathInternal);
     if (ACPI_FAILURE (Status))
     {
         AslCoreSubsystemError (Op, Status, "Internalizing new NamePath",
             ASL_NO_ABORT);
-        ACPI_FREE (NewPathExternal);
-        return (Status);
+        goto Cleanup;
     }
 
-    if (strlen (NewPath) >= AmlNameStringLength)
+    if (strlen (NewPathInternal) >= AmlNameStringLength)
     {
         ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS,
             " NOT SHORTER (New %u old %u)",
-            (UINT32) strlen (NewPath), (UINT32) AmlNameStringLength));
-        ACPI_FREE (NewPathExternal);
-        return (AE_NOT_FOUND);
+            (UINT32) strlen (NewPathInternal),
+            (UINT32) AmlNameStringLength));
+
+        ACPI_FREE (NewPathInternal);
+        Status = AE_NOT_FOUND;
+        goto Cleanup;
     }
 
     /*
@@ -444,7 +448,7 @@ OptBuildShortestPath (
      * looking for. This is simply a sanity check on the new
      * path that has been created.
      */
-    Status = AcpiNsLookup (&ScopeInfo,  NewPath,
+    Status = AcpiNsLookup (&ScopeInfo, NewPathInternal,
         ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
         ACPI_NS_DONT_OPEN_SCOPE, WalkState, &(Node));
     if (ACPI_SUCCESS (Status))
@@ -457,7 +461,7 @@ OptBuildShortestPath (
 
             AslError (ASL_OPTIMIZATION, ASL_MSG_NAME_OPTIMIZATION,
                 Op, NewPathExternal);
-            *ReturnNewPath = NewPath;
+            *ReturnNewPath = NewPathInternal;
         }
         else
         {
@@ -473,11 +477,15 @@ OptBuildShortestPath (
     {
         /* The lookup failed, we obviously cannot use this optimization */
 
+        ACPI_FREE (NewPathInternal);
+
         ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS, " ***** NOT FOUND"));
         AslError (ASL_WARNING, ASL_MSG_COMPILER_INTERNAL, Op,
             "Not using optimized name - did not find node");
     }
 
+Cleanup:
+
     ACPI_FREE (NewPathExternal);
     return (Status);
 }
diff --git a/src/acpica/source/compiler/aslpld.c b/src/acpica/source/compiler/aslpld.c
new file mode 100644
index 0000000..f2c18a3
--- /dev/null
+++ b/src/acpica/source/compiler/aslpld.c
@@ -0,0 +1,801 @@
+/******************************************************************************
+ *
+ * Module Name: aslpld - Implementation of ASL ToPLD macro
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2016, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************/
+
+#include "aslcompiler.h"
+#include "aslcompiler.y.h"
+#include "amlcode.h"
+
+#define _COMPONENT          ACPI_COMPILER
+        ACPI_MODULE_NAME    ("aslpld")
+
+
+/* Local prototypes */
+
+static UINT8 *
+OpcEncodePldBuffer (
+    ACPI_PLD_INFO           *PldInfo);
+
+static BOOLEAN
+OpcFindName (
+    const char              **List,
+    char                    *Name,
+    UINT32                  *Index);
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    OpcDoPld
+ *
+ * PARAMETERS:  Op                  - Current parse node
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Convert ToPLD macro to 20-byte buffer
+ *
+ * The ToPLD parse tree looks like this:
+ *
+ *      TOPLD
+ *          PLD_REVISION
+ *              INTEGER
+ *          PLD_IGNORECOLOR
+ *              INTEGER
+ *          ...
+ *          etc.
+ *
+ ******************************************************************************/
+
+void
+OpcDoPld (
+    ACPI_PARSE_OBJECT       *Op)
+{
+    ACPI_PLD_INFO           PldInfo;
+    UINT8                   *Buffer;
+    ACPI_PARSE_OBJECT       *ThisOp;
+    ACPI_PARSE_OBJECT       *NewOp;
+    UINT16                  ParseOpcode;
+    UINT32                  Value;
+
+
+    if (!Op)
+    {
+        AslError (ASL_ERROR, ASL_MSG_NOT_EXIST, Op, NULL);
+        return;
+    }
+
+    if (Op->Asl.ParseOpcode != PARSEOP_TOPLD)
+    {
+        AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, Op, NULL);
+        return;
+    }
+
+    memset (&PldInfo, 0, sizeof (ACPI_PLD_INFO));
+
+    /* Traverse the list of PLD Ops (one per PLD field) */
+
+    ThisOp = Op->Asl.Child;
+    while (ThisOp)
+    {
+        /* Get child values */
+
+        ParseOpcode = ThisOp->Asl.Child->Asl.ParseOpcode;
+        Value = (UINT32) ThisOp->Asl.Child->Asl.Value.Integer;
+
+        switch (ThisOp->Asl.ParseOpcode)
+        {
+        case PARSEOP_PLD_REVISION:
+
+            if (ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ThisOp, NULL);
+                break;
+            }
+
+            if (Value > 127)
+            {
+                AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                break;
+            }
+
+            PldInfo.Revision = (UINT8) Value;
+            break;
+
+        case PARSEOP_PLD_IGNORECOLOR:
+
+            if (ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ThisOp, NULL);
+                break;
+            }
+
+            if (Value > 1)
+            {
+                AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                break;
+            }
+
+            PldInfo.IgnoreColor = (UINT8) Value;
+            break;
+
+        case PARSEOP_PLD_RED:
+        case PARSEOP_PLD_GREEN:
+        case PARSEOP_PLD_BLUE:
+
+            if (ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                break;
+            }
+
+            if (Value > 255)
+            {
+                AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                break;
+            }
+
+            if (ThisOp->Asl.ParseOpcode == PARSEOP_PLD_RED)
+            {
+                PldInfo.Red = (UINT8) Value;
+            }
+            else if (ThisOp->Asl.ParseOpcode == PARSEOP_PLD_GREEN)
+            {
+                PldInfo.Green = (UINT8) Value;
+            }
+            else /* PARSEOP_PLD_BLUE */
+            {
+                PldInfo.Blue = (UINT8) Value;
+            }
+            break;
+
+        case PARSEOP_PLD_WIDTH:
+        case PARSEOP_PLD_HEIGHT:
+
+            if (ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ThisOp, NULL);
+                break;
+            }
+
+            if (Value > 65535)
+            {
+                AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                break;
+            }
+
+            if (ThisOp->Asl.ParseOpcode == PARSEOP_PLD_WIDTH)
+            {
+                PldInfo.Width = (UINT16) Value;
+            }
+            else /* PARSEOP_PLD_HEIGHT */
+            {
+                PldInfo.Height = (UINT16) Value;
+            }
+
+            break;
+
+        case PARSEOP_PLD_USERVISIBLE:
+        case PARSEOP_PLD_DOCK:
+        case PARSEOP_PLD_LID:
+
+            if (ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ThisOp, NULL);
+                break;
+            }
+
+            if (Value > 1)
+            {
+                AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                break;
+            }
+
+            if (ThisOp->Asl.ParseOpcode == PARSEOP_PLD_USERVISIBLE)
+            {
+                PldInfo.UserVisible = (UINT8) Value;
+            }
+            else if (ThisOp->Asl.ParseOpcode == PARSEOP_PLD_DOCK)
+            {
+                PldInfo.Dock = (UINT8) Value;
+            }
+            else
+            {
+                PldInfo.Lid = (UINT8) Value;
+            }
+
+            break;
+
+        case PARSEOP_PLD_PANEL:
+
+            if (ParseOpcode == PARSEOP_INTEGER)
+            {
+                if (Value > 6)
+                {
+                    AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                    break;
+                }
+            }
+            else /* PARSEOP_STRING */
+            {
+                if (!OpcFindName (AcpiGbl_PldPanelList,
+                    ThisOp->Asl.Child->Asl.Value.String,
+                    &Value))
+                {
+                    AslError (ASL_ERROR, ASL_MSG_INVALID_OPERAND, ThisOp, NULL);
+                    break;
+                }
+            }
+
+            PldInfo.Panel = (UINT8) Value;
+            break;
+
+        case PARSEOP_PLD_VERTICALPOSITION:
+
+            if (ParseOpcode == PARSEOP_INTEGER)
+            {
+                if (Value > 2)
+                {
+                    AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                    break;
+                }
+            }
+            else /* PARSEOP_STRING */
+            {
+                if (!OpcFindName (AcpiGbl_PldVerticalPositionList,
+                    ThisOp->Asl.Child->Asl.Value.String,
+                    &Value))
+                {
+                    AslError (ASL_ERROR, ASL_MSG_INVALID_OPERAND, ThisOp, NULL);
+                    break;
+                }
+            }
+
+            PldInfo.VerticalPosition = (UINT8) Value;
+            break;
+
+        case PARSEOP_PLD_HORIZONTALPOSITION:
+
+            if (ParseOpcode == PARSEOP_INTEGER)
+            {
+                if (Value > 2)
+                {
+                    AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                    break;
+                }
+            }
+            else /* PARSEOP_STRING */
+            {
+                if (!OpcFindName (AcpiGbl_PldHorizontalPositionList,
+                    ThisOp->Asl.Child->Asl.Value.String,
+                    &Value))
+                {
+                    AslError (ASL_ERROR, ASL_MSG_INVALID_OPERAND, ThisOp, NULL);
+                    break;
+                }
+            }
+
+            PldInfo.HorizontalPosition = (UINT8) Value;
+            break;
+
+        case PARSEOP_PLD_SHAPE:
+
+            if (ParseOpcode == PARSEOP_INTEGER)
+            {
+                if (Value > 8)
+                {
+                    AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                    break;
+                }
+            }
+            else /* PARSEOP_STRING */
+            {
+                if (!OpcFindName (AcpiGbl_PldShapeList,
+                    ThisOp->Asl.Child->Asl.Value.String,
+                    &Value))
+                {
+                    AslError (ASL_ERROR, ASL_MSG_INVALID_OPERAND, ThisOp, NULL);
+                    break;
+                }
+            }
+
+            PldInfo.Shape = (UINT8) Value;
+            break;
+
+        case PARSEOP_PLD_GROUPORIENTATION:
+
+            if (ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ThisOp, NULL);
+                break;
+            }
+
+            if (Value > 1)
+            {
+                AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                break;
+            }
+
+            PldInfo.GroupOrientation = (UINT8) Value;
+            break;
+
+        case PARSEOP_PLD_GROUPTOKEN:
+        case PARSEOP_PLD_GROUPPOSITION:
+
+            if (ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ThisOp, NULL);
+                break;
+            }
+
+            if (Value > 255)
+            {
+                AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                break;
+            }
+
+            if (ThisOp->Asl.ParseOpcode == PARSEOP_PLD_GROUPTOKEN)
+            {
+                PldInfo.GroupToken = (UINT8) Value;
+            }
+            else /* PARSEOP_PLD_GROUPPOSITION */
+            {
+                PldInfo.GroupPosition = (UINT8) Value;
+            }
+
+            break;
+
+        case PARSEOP_PLD_BAY:
+        case PARSEOP_PLD_EJECTABLE:
+        case PARSEOP_PLD_EJECTREQUIRED:
+
+            if (ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ThisOp, NULL);
+                break;
+            }
+
+            if (Value > 1)
+            {
+                AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                break;
+            }
+
+            if (ThisOp->Asl.ParseOpcode == PARSEOP_PLD_BAY)
+            {
+                PldInfo.Bay = (UINT8) Value;
+            }
+            else if (ThisOp->Asl.ParseOpcode == PARSEOP_PLD_EJECTABLE)
+            {
+                PldInfo.Ejectable = (UINT8) Value;
+            }
+            else /* PARSEOP_PLD_EJECTREQUIRED */
+            {
+                PldInfo.OspmEjectRequired = (UINT8) Value;
+            }
+
+            break;
+
+        case PARSEOP_PLD_CABINETNUMBER:
+        case PARSEOP_PLD_CARDCAGENUMBER:
+
+            if (ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ThisOp, NULL);
+                break;
+            }
+
+            if (Value > 255)
+            {
+                AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                break;
+            }
+
+            if (ThisOp->Asl.ParseOpcode == PARSEOP_PLD_CABINETNUMBER)
+            {
+                PldInfo.CabinetNumber = (UINT8) Value;
+            }
+            else /* PARSEOP_PLD_CARDCAGENUMBER */
+            {
+                PldInfo.CardCageNumber = (UINT8) Value;
+            }
+
+            break;
+
+        case PARSEOP_PLD_REFERENCE:
+
+            if (ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ThisOp, NULL);
+                break;
+            }
+
+            if (Value > 1)
+            {
+                AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                break;
+            }
+
+            PldInfo.Reference = (UINT8) Value;
+            break;
+
+        case PARSEOP_PLD_ROTATION:
+
+            if (ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ThisOp, NULL);
+                break;
+            }
+
+            if (Value > 7)
+            {
+                switch (Value)
+                {
+                case 45:
+
+                    Value = 1;
+                    break;
+
+                case 90:
+
+                    Value = 2;
+                    break;
+
+                case 135:
+
+                    Value = 3;
+                    break;
+
+                case 180:
+
+                    Value = 4;
+                    break;
+
+                case 225:
+
+                    Value = 5;
+                    break;
+
+                case 270:
+
+                    Value = 6;
+                    break;
+
+                case 315:
+
+                    Value = 7;
+                    break;
+
+                default:
+
+                    AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                    break;
+                }
+            }
+
+            PldInfo.Rotation = (UINT8) Value;
+            break;
+
+        case PARSEOP_PLD_ORDER:
+
+            if (ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ThisOp, NULL);
+                break;
+            }
+
+            if (Value > 31)
+            {
+                AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                break;
+            }
+
+            PldInfo.Order = (UINT8) Value;
+            break;
+
+        case PARSEOP_PLD_VERTICALOFFSET:
+        case PARSEOP_PLD_HORIZONTALOFFSET:
+
+            if (ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ThisOp, NULL);
+                break;
+            }
+
+            if (Value > 65535)
+            {
+                AslError (ASL_ERROR, ASL_MSG_RANGE, ThisOp, NULL);
+                break;
+            }
+
+            if (ThisOp->Asl.ParseOpcode == PARSEOP_PLD_VERTICALOFFSET)
+            {
+                PldInfo.VerticalOffset = (UINT16) Value;
+            }
+            else /* PARSEOP_PLD_HORIZONTALOFFSET */
+            {
+                PldInfo.HorizontalOffset = (UINT16) Value;
+            }
+
+            break;
+
+        default:
+
+            AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ThisOp, NULL);
+            break;
+        }
+
+        ThisOp = ThisOp->Asl.Next;
+    }
+
+    Buffer = OpcEncodePldBuffer (&PldInfo);
+
+    /* Change Op to a Buffer */
+
+    Op->Asl.ParseOpcode = PARSEOP_BUFFER;
+    Op->Common.AmlOpcode = AML_BUFFER_OP;
+
+    /* Disable further optimization */
+
+    Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST;
+    UtSetParseOpName (Op);
+
+    /* Child node is the buffer length */
+
+    NewOp = TrAllocateNode (PARSEOP_INTEGER);
+
+    NewOp->Asl.AmlOpcode = AML_BYTE_OP;
+    NewOp->Asl.Value.Integer = 20;
+    NewOp->Asl.Parent = Op;
+
+    Op->Asl.Child = NewOp;
+    Op = NewOp;
+
+    /* Peer to the child is the raw buffer data */
+
+    NewOp = TrAllocateNode (PARSEOP_RAW_DATA);
+    NewOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
+    NewOp->Asl.AmlLength = 20;
+    NewOp->Asl.Value.String = ACPI_CAST_PTR (char, Buffer);
+    NewOp->Asl.Parent = Op->Asl.Parent;
+
+    Op->Asl.Next = NewOp;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    OpcEncodePldBuffer
+ *
+ * PARAMETERS:  PldInfo             - _PLD buffer struct (Using local struct)
+ *
+ * RETURN:      Encode _PLD buffer suitable for return value from _PLD
+ *
+ * DESCRIPTION: Bit-packs a _PLD buffer struct.
+ *
+ ******************************************************************************/
+
+static UINT8 *
+OpcEncodePldBuffer (
+    ACPI_PLD_INFO           *PldInfo)
+{
+    UINT32                  *Buffer;
+    UINT32                  Dword;
+
+
+    Buffer = ACPI_ALLOCATE_ZEROED (ACPI_PLD_BUFFER_SIZE);
+    if (!Buffer)
+    {
+        return (NULL);
+    }
+
+    /* First 32 bits */
+
+    Dword = 0;
+    ACPI_PLD_SET_REVISION       (&Dword, PldInfo->Revision);
+    ACPI_PLD_SET_IGNORE_COLOR   (&Dword, PldInfo->IgnoreColor);
+    ACPI_PLD_SET_RED            (&Dword, PldInfo->Red);
+    ACPI_PLD_SET_GREEN          (&Dword, PldInfo->Green);
+    ACPI_PLD_SET_BLUE           (&Dword, PldInfo->Blue);
+    ACPI_MOVE_32_TO_32          (&Buffer[0], &Dword);
+
+    /* Second 32 bits */
+
+    Dword = 0;
+    ACPI_PLD_SET_WIDTH          (&Dword, PldInfo->Width);
+    ACPI_PLD_SET_HEIGHT         (&Dword, PldInfo->Height);
+    ACPI_MOVE_32_TO_32          (&Buffer[1], &Dword);
+
+    /* Third 32 bits */
+
+    Dword = 0;
+    ACPI_PLD_SET_USER_VISIBLE   (&Dword, PldInfo->UserVisible);
+    ACPI_PLD_SET_DOCK           (&Dword, PldInfo->Dock);
+    ACPI_PLD_SET_LID            (&Dword, PldInfo->Lid);
+    ACPI_PLD_SET_PANEL          (&Dword, PldInfo->Panel);
+    ACPI_PLD_SET_VERTICAL       (&Dword, PldInfo->VerticalPosition);
+    ACPI_PLD_SET_HORIZONTAL     (&Dword, PldInfo->HorizontalPosition);
+    ACPI_PLD_SET_SHAPE          (&Dword, PldInfo->Shape);
+    ACPI_PLD_SET_ORIENTATION    (&Dword, PldInfo->GroupOrientation);
+    ACPI_PLD_SET_TOKEN          (&Dword, PldInfo->GroupToken);
+    ACPI_PLD_SET_POSITION       (&Dword, PldInfo->GroupPosition);
+    ACPI_PLD_SET_BAY            (&Dword, PldInfo->Bay);
+    ACPI_MOVE_32_TO_32          (&Buffer[2], &Dword);
+
+    /* Fourth 32 bits */
+
+    Dword = 0;
+    ACPI_PLD_SET_EJECTABLE      (&Dword, PldInfo->Ejectable);
+    ACPI_PLD_SET_OSPM_EJECT     (&Dword, PldInfo->OspmEjectRequired);
+    ACPI_PLD_SET_CABINET        (&Dword, PldInfo->CabinetNumber);
+    ACPI_PLD_SET_CARD_CAGE      (&Dword, PldInfo->CardCageNumber);
+    ACPI_PLD_SET_REFERENCE      (&Dword, PldInfo->Reference);
+    ACPI_PLD_SET_ROTATION       (&Dword, PldInfo->Rotation);
+    ACPI_PLD_SET_ORDER          (&Dword, PldInfo->Order);
+    ACPI_MOVE_32_TO_32          (&Buffer[3], &Dword);
+
+    /* Revision 2 adds an additional DWORD */
+
+    if (PldInfo->Revision >= 2)
+    {
+        /* Fifth 32 bits */
+
+        Dword = 0;
+        ACPI_PLD_SET_VERT_OFFSET    (&Dword, PldInfo->VerticalOffset);
+        ACPI_PLD_SET_HORIZ_OFFSET   (&Dword, PldInfo->HorizontalOffset);
+        ACPI_MOVE_32_TO_32          (&Buffer[4], &Dword);
+    }
+
+    return (ACPI_CAST_PTR (UINT8, Buffer));
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    OpcFindName
+ *
+ * PARAMETERS:  List                - Array of char strings to be searched
+ *              Name                - Char string to string for
+ *              Index               - Index value to set if found
+ *
+ * RETURN:      TRUE if any names matched, FALSE otherwise
+ *
+ * DESCRIPTION: Match PLD name to value in lookup table. Sets Value to
+ *              equivalent parameter value.
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+OpcFindName (
+    const char              **List,
+    char                    *Name,
+    UINT32                  *Index)
+{
+    const char              *NameString;
+    UINT32                  i;
+
+
+    AcpiUtStrupr (Name);
+
+    for (i = 0, NameString = List[0];
+            NameString;
+            i++, NameString = List[i])
+    {
+        if (!(strncmp (NameString, Name, strlen (Name))))
+        {
+            *Index = i;
+            return (TRUE);
+        }
+    }
+
+    return (FALSE);
+}
diff --git a/src/acpica/source/compiler/aslrestype2e.c b/src/acpica/source/compiler/aslrestype2e.c
index 1d91913..9288a95 100644
--- a/src/acpica/source/compiler/aslrestype2e.c
+++ b/src/acpica/source/compiler/aslrestype2e.c
@@ -215,7 +215,7 @@ RsDoExtendedIoDescriptor (
             RsCreateQwordField (InitializerOp, ACPI_RESTAG_GRANULARITY,
                 CurrentByteOffset + ASL_RESDESC_OFFSET (ExtAddress64.Granularity));
             GranOp = InitializerOp;
-           break;
+            break;
 
         case 6: /* Address Min */
 
diff --git a/src/acpica/source/compiler/aslstubs.c b/src/acpica/source/compiler/aslstubs.c
index 055392b..1ae9e2a 100644
--- a/src/acpica/source/compiler/aslstubs.c
+++ b/src/acpica/source/compiler/aslstubs.c
@@ -136,6 +136,13 @@ AcpiNsExecModuleCodeList (
 }
 
 ACPI_STATUS
+AcpiNsInitializeObjects (
+    void)
+{
+    return (AE_OK);
+}
+
+ACPI_STATUS
 AcpiHwReadPort (
     ACPI_IO_ADDRESS         Address,
     UINT32                  *Value,
diff --git a/src/acpica/source/compiler/asltransform.c b/src/acpica/source/compiler/asltransform.c
index 530076d..13e26fe 100644
--- a/src/acpica/source/compiler/asltransform.c
+++ b/src/acpica/source/compiler/asltransform.c
@@ -422,7 +422,11 @@ TrTransformSubtree (
 
     case PARSEOP_EXTERNAL:
 
-        ExDoExternal (Op);
+        if (Gbl_DoExternals == TRUE)
+        {
+            ExDoExternal (Op);
+        }
+
         break;
 
     default:
diff --git a/src/acpica/source/compiler/aslutils.c b/src/acpica/source/compiler/aslutils.c
index 2a45f6e..1b7e844 100644
--- a/src/acpica/source/compiler/aslutils.c
+++ b/src/acpica/source/compiler/aslutils.c
@@ -978,7 +978,9 @@ UtDoConstant (
     char                    ErrBuf[64];
 
 
-    Status = AcpiUtStrtoul64 (String, 0, &Converted);
+    Status = AcpiUtStrtoul64 (String, ACPI_ANY_BASE,
+        ACPI_MAX64_BYTE_WIDTH, &Converted);
+
     if (ACPI_FAILURE (Status))
     {
         sprintf (ErrBuf, "%s %s\n", "Conversion error:",
diff --git a/src/acpica/source/compiler/aslwalks.c b/src/acpica/source/compiler/aslwalks.c
index 1eb7d45..bb743c6 100644
--- a/src/acpica/source/compiler/aslwalks.c
+++ b/src/acpica/source/compiler/aslwalks.c
@@ -176,9 +176,12 @@ AnMethodTypingWalkEnd (
                  * The called method is untyped at this time (typically a
                  * forward reference).
                  *
-                 * Check for a recursive method call first.
+                 * Check for a recursive method call first. Note: the
+                 * Child->Node will be null if the method has not been
+                 * resolved.
                  */
-                if (Op->Asl.ParentMethod != Op->Asl.Child->Asl.Node->Op)
+                if (Op->Asl.Child->Asl.Node &&
+                    (Op->Asl.ParentMethod != Op->Asl.Child->Asl.Node->Op))
                 {
                     /* We must type the method here */
 
diff --git a/src/acpica/source/compiler/aslxrefout.c b/src/acpica/source/compiler/aslxrefout.c
index 6fe872d..38942e0 100644
--- a/src/acpica/source/compiler/aslxrefout.c
+++ b/src/acpica/source/compiler/aslxrefout.c
@@ -324,7 +324,6 @@ OtXrefWalkPart1 (
 
         MethodInfo->CurrentOp = Op;
         Node = Op->Asl.Node;
-        ParentPath = AcpiNsGetNormalizedPathname (Node, TRUE);
 
         /* Find all objects referenced by this method */
 
@@ -333,8 +332,11 @@ OtXrefWalkPart1 (
 
         if (Status == AE_CTRL_TERMINATE)
         {
+            ParentPath = AcpiNsGetNormalizedPathname (Node, TRUE);
+
             FlPrintFile (ASL_FILE_XREF_OUTPUT, "            %-40s %s",
                 ParentPath, AcpiUtGetTypeName (Node->Type));
+            ACPI_FREE (ParentPath);
 
             switch (Node->Type)
             {
@@ -396,12 +398,12 @@ OtXrefWalkPart1 (
                 }
                 else
                 {
-                    ACPI_FREE (ParentPath);
                     ParentPath = AcpiNsGetNormalizedPathname (
                         NextOp->Asl.Node, TRUE);
 
                     FlPrintFile (ASL_FILE_XREF_OUTPUT, " (%.2u bit) in Buffer %s",
                         Length, ParentPath);
+                    ACPI_FREE (ParentPath);
                 }
                 break;
 
@@ -411,13 +413,13 @@ OtXrefWalkPart1 (
                 FieldOp = NextOp->Asl.Parent;
                 NextOp = FieldOp->Asl.Child;
 
-                ACPI_FREE (ParentPath);
                 ParentPath = AcpiNsGetNormalizedPathname (
                     NextOp->Asl.Node, TRUE);
 
                 FlPrintFile (ASL_FILE_XREF_OUTPUT, " (%.2u bit) in Region %s",
                     (UINT32) Node->Op->Asl.Child->Asl.Value.Integer,
                     ParentPath);
+                ACPI_FREE (ParentPath);
 
                 if (FieldOp->Asl.ParseOpcode == PARSEOP_FIELD)
                 {
@@ -439,7 +441,6 @@ OtXrefWalkPart1 (
             }
 
             FlPrintFile (ASL_FILE_XREF_OUTPUT, "\n");
-            ACPI_FREE (ParentPath);
         }
         break;
 
@@ -744,6 +745,7 @@ OtXrefWalkPart3 (
         "\n[%5u]  %-40s %s Declaration\n",
         Op->Asl.LogicalLineNumber, ParentPath,
         AcpiUtGetTypeName (Node->Type));
+    ACPI_FREE (ParentPath);
 
     XrefInfo->MethodOp = Op;
     XrefInfo->ThisObjectReferences = 0;
@@ -788,7 +790,7 @@ OtXrefAnalysisWalkPart3 (
     void                    *Context)
 {
     ASL_XREF_INFO           *XrefInfo = (ASL_XREF_INFO *) Context;
-    char                    *CallerFullPathname;
+    char                    *CallerFullPathname = NULL;
     ACPI_PARSE_OBJECT       *CallerOp;
     const char              *Operator;
 
@@ -828,27 +830,24 @@ OtXrefAnalysisWalkPart3 (
         CallerOp = CallerOp->Asl.Parent;
     }
 
-    /* There are some special cases for the oddball operators */
+    if (CallerOp == XrefInfo->CurrentMethodOp)
+    {
+        return (AE_OK);
+    }
+
+    /* Null CallerOp means the caller is at the namespace root */
 
     if (CallerOp)
     {
         CallerFullPathname = AcpiNsGetNormalizedPathname (
             CallerOp->Asl.Node, TRUE);
     }
-    else
-    {
-        CallerFullPathname = "<root>";
-    }
 
-    if (CallerOp == XrefInfo->CurrentMethodOp)
-    {
-        return (AE_OK);
-    }
+    /* There are some special cases for the oddball operators */
 
     if (Op->Asl.ParseOpcode == PARSEOP_SCOPE)
     {
         Operator = "Scope";
-
     }
     else if (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_ALIAS)
     {
@@ -866,7 +865,7 @@ OtXrefAnalysisWalkPart3 (
     FlPrintFile (ASL_FILE_XREF_OUTPUT,
         "[%5u]     %-40s %-8s via path: %s, Operator: %s\n",
         Op->Asl.LogicalLineNumber,
-        CallerFullPathname,
+        CallerFullPathname ? CallerFullPathname : "<root>",
         Operator,
         Op->Asl.ExternalName,
         Op->Asl.Parent->Asl.ParseOpName);
@@ -876,6 +875,11 @@ OtXrefAnalysisWalkPart3 (
         CallerOp = ACPI_TO_POINTER (0xFFFFFFFF);
     }
 
+    if (CallerFullPathname)
+    {
+        ACPI_FREE (CallerFullPathname);
+    }
+
     XrefInfo->CurrentMethodOp = CallerOp;
     XrefInfo->ThisObjectReferences++;
     return (AE_OK);
diff --git a/src/acpica/source/compiler/dtparser.y b/src/acpica/source/compiler/dtparser.y
index d66936e..cf61ff2 100644
--- a/src/acpica/source/compiler/dtparser.y
+++ b/src/acpica/source/compiler/dtparser.y
@@ -241,15 +241,15 @@ Expression
 
       /* Default base for a non-prefixed integer is 16 */
 
-    | EXPOP_NUMBER                                  { AcpiUtStrtoul64 (DtParsertext, 16, &$$);}
+    | EXPOP_NUMBER                                  { AcpiUtStrtoul64 (DtParsertext, 16, ACPI_MAX64_BYTE_WIDTH, &$$);}
 
       /* Standard hex number (0x1234) */
 
-    | EXPOP_HEX_NUMBER                              { AcpiUtStrtoul64 (DtParsertext, 16, &$$);}
+    | EXPOP_HEX_NUMBER                              { AcpiUtStrtoul64 (DtParsertext, 16, ACPI_MAX64_BYTE_WIDTH, &$$);}
 
       /* TBD: Decimal number with prefix (0d1234) - Not supported by strtoul64 at this time */
 
-    | EXPOP_DECIMAL_NUMBER                          { AcpiUtStrtoul64 (DtParsertext, 10, &$$);}
+    | EXPOP_DECIMAL_NUMBER                          { AcpiUtStrtoul64 (DtParsertext, 10, ACPI_MAX64_BYTE_WIDTH, &$$);}
     ;
 %%
 
diff --git a/src/acpica/source/compiler/dttable1.c b/src/acpica/source/compiler/dttable1.c
index ada7fca..cacd9de 100644
--- a/src/acpica/source/compiler/dttable1.c
+++ b/src/acpica/source/compiler/dttable1.c
@@ -1315,8 +1315,8 @@ DtCompileIort (
     DtInsertSubtable (ParentTable, Subtable);
 
     /*
-     * Using ACPI_SUB_PTR, We needn't define a seperate structure. Care
-     * should be taken to avoid accessing ACPI_TABLE_HADER fields.
+     * Using ACPI_SUB_PTR, We needn't define a separate structure. Care
+     * should be taken to avoid accessing ACPI_TABLE_HEADER fields.
      */
     Iort = ACPI_SUB_PTR (ACPI_TABLE_IORT,
         Subtable->Buffer, sizeof (ACPI_TABLE_HEADER));
@@ -1547,6 +1547,19 @@ DtCompileIort (
             IortSmmu->PmuInterruptCount = PmuIrptNumber;
             break;
 
+        case ACPI_IORT_NODE_SMMU_V3:
+
+            Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort4,
+                &Subtable, TRUE);
+            if (ACPI_FAILURE (Status))
+            {
+                return (Status);
+            }
+
+            DtInsertSubtable (ParentTable, Subtable);
+            NodeLength += Subtable->Length;
+            break;
+
         default:
 
             DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "IORT");
diff --git a/src/acpica/source/compiler/dttable2.c b/src/acpica/source/compiler/dttable2.c
index b281b5c..bd5e570 100644
--- a/src/acpica/source/compiler/dttable2.c
+++ b/src/acpica/source/compiler/dttable2.c
@@ -1048,7 +1048,7 @@ DtCompileS3pt (
     DT_FIELD                **PFieldList)
 {
     ACPI_STATUS             Status;
-    ACPI_S3PT_HEADER        *S3ptHeader;
+    ACPI_FPDT_HEADER        *S3ptHeader;
     DT_SUBTABLE             *Subtable;
     DT_SUBTABLE             *ParentTable;
     ACPI_DMTABLE_INFO       *InfoTable;
@@ -1078,7 +1078,7 @@ DtCompileS3pt (
         DtInsertSubtable (ParentTable, Subtable);
         DtPushSubtable (Subtable);
 
-        S3ptHeader = ACPI_CAST_PTR (ACPI_S3PT_HEADER, Subtable->Buffer);
+        S3ptHeader = ACPI_CAST_PTR (ACPI_FPDT_HEADER, Subtable->Buffer);
 
         switch (S3ptHeader->Type)
         {
diff --git a/src/acpica/source/compiler/dttemplate.h b/src/acpica/source/compiler/dttemplate.h
index f27a77a..71f0041 100644
--- a/src/acpica/source/compiler/dttemplate.h
+++ b/src/acpica/source/compiler/dttemplate.h
@@ -615,11 +615,11 @@ const unsigned char TemplateHpet[] =
 
 const unsigned char TemplateIort[] =
 {
-    0x49,0x4F,0x52,0x54,0x0C,0x01,0x00,0x00,  /* 00000000    "IORT...." */
-    0x00,0xBC,0x49,0x4E,0x54,0x45,0x4C,0x20,  /* 00000008    "..INTEL " */
+    0x49,0x4F,0x52,0x54,0x48,0x01,0x00,0x00,  /* 00000000    "IORTH..." */
+    0x00,0x02,0x49,0x4E,0x54,0x45,0x4C,0x20,  /* 00000008    "..INTEL " */
     0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45,  /* 00000010    "TEMPLATE" */
     0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
-    0x10,0x04,0x15,0x20,0x04,0x00,0x00,0x00,  /* 00000020    "... ...." */
+    0x12,0x02,0x16,0x20,0x05,0x00,0x00,0x00,  /* 00000020    "... ...." */
     0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000028    "4......." */
     0x00,0x00,0x00,0x00,0x00,0x2C,0x00,0x00,  /* 00000030    ".....,.." */
     0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 00000038    "........" */
@@ -648,7 +648,14 @@ const unsigned char TemplateIort[] =
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000F0    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000F8    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000100    "........" */
-    0x00,0x00,0x00,0x00                       /* 00000108    "...."     */
+    0x00,0x00,0x00,0x00,0x04,0x3C,0x00,0x00,  /* 00000108    ".....<.." */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000110    "........" */
+    0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000118    "<......." */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000120    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000128    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000130    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000138    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00   /* 00000140    "........" */
 };
 
 const unsigned char TemplateIvrs[] =
diff --git a/src/acpica/source/compiler/prparser.y b/src/acpica/source/compiler/prparser.y
index b69a3a4..127701e 100644
--- a/src/acpica/source/compiler/prparser.y
+++ b/src/acpica/source/compiler/prparser.y
@@ -254,11 +254,11 @@ Expression
 
       /* Default base for a non-prefixed integer is 10 */
 
-    | EXPOP_NUMBER                                  { AcpiUtStrtoul64 (PrParsertext, 10, &$$);}
+    | EXPOP_NUMBER                                  { AcpiUtStrtoul64 (PrParsertext, 10, ACPI_MAX64_BYTE_WIDTH, &$$);}
 
       /* Standard hex number (0x1234) */
 
-    | EXPOP_HEX_NUMBER                              { AcpiUtStrtoul64 (PrParsertext, 16, &$$);}
+    | EXPOP_HEX_NUMBER                              { AcpiUtStrtoul64 (PrParsertext, 16, ACPI_MAX64_BYTE_WIDTH, &$$);}
     ;
 %%
 
diff --git a/src/acpica/source/compiler/prscan.c b/src/acpica/source/compiler/prscan.c
index 3fab524..67cd12c 100644
--- a/src/acpica/source/compiler/prscan.c
+++ b/src/acpica/source/compiler/prscan.c
@@ -991,6 +991,17 @@ PrGetNextLine (
         c = getc (Handle);
         if (c == EOF)
         {
+            /*
+             * On EOF: If there is anything in the line buffer, terminate
+             * it with a newline, and catch the EOF on the next call
+             * to this function.
+             */
+            if (i > 0)
+            {
+                Gbl_CurrentLineBuffer[i] = '\n';
+                return (AE_OK);
+            }
+
             return (ASL_EOF);
         }
 
diff --git a/src/acpica/source/components/debugger/dbconvert.c b/src/acpica/source/components/debugger/dbconvert.c
index 968a2d7..1b36e63 100644
--- a/src/acpica/source/components/debugger/dbconvert.c
+++ b/src/acpica/source/components/debugger/dbconvert.c
@@ -393,7 +393,8 @@ AcpiDbConvertToObject (
     default:
 
         Object->Type = ACPI_TYPE_INTEGER;
-        Status = AcpiUtStrtoul64 (String, 16, &Object->Integer.Value);
+        Status = AcpiUtStrtoul64 (String, 16, AcpiGbl_IntegerByteWidth,
+            &Object->Integer.Value);
         break;
     }
 
diff --git a/src/acpica/source/components/debugger/dbinput.c b/src/acpica/source/components/debugger/dbinput.c
index 976e916..7a31c58 100644
--- a/src/acpica/source/components/debugger/dbinput.c
+++ b/src/acpica/source/components/debugger/dbinput.c
@@ -141,7 +141,7 @@ AcpiDbSingleThread (
 
 static void
 AcpiDbDisplayCommandInfo (
-    char                    *Command,
+    const char              *Command,
     BOOLEAN                 DisplayAll);
 
 static void
@@ -150,7 +150,7 @@ AcpiDbDisplayHelp (
 
 static BOOLEAN
 AcpiDbMatchCommandHelp (
-    char                        *Command,
+    const char                  *Command,
     const ACPI_DB_COMMAND_HELP  *Help);
 
 
@@ -430,7 +430,7 @@ static const ACPI_DB_COMMAND_HELP   AcpiGbl_DbCommandHelp[] =
 
 static BOOLEAN
 AcpiDbMatchCommandHelp (
-    char                        *Command,
+    const char                  *Command,
     const ACPI_DB_COMMAND_HELP  *Help)
 {
     char                    *Invocation = Help->Invocation;
@@ -492,7 +492,7 @@ AcpiDbMatchCommandHelp (
 
 static void
 AcpiDbDisplayCommandInfo (
-    char                    *Command,
+    const char              *Command,
     BOOLEAN                 DisplayAll)
 {
     const ACPI_DB_COMMAND_HELP  *Next;
@@ -792,7 +792,8 @@ AcpiDbMatchCommand (
 
     for (i = CMD_FIRST_VALID; AcpiGbl_DbCommands[i].Name; i++)
     {
-        if (strstr (AcpiGbl_DbCommands[i].Name, UserCommand) ==
+        if (strstr (
+            ACPI_CAST_PTR (char, AcpiGbl_DbCommands[i].Name), UserCommand) ==
             AcpiGbl_DbCommands[i].Name)
         {
             return (i);
diff --git a/src/acpica/source/components/debugger/dbutils.c b/src/acpica/source/components/debugger/dbutils.c
index 751ff43..1129bbf 100644
--- a/src/acpica/source/components/debugger/dbutils.c
+++ b/src/acpica/source/components/debugger/dbutils.c
@@ -135,8 +135,6 @@ AcpiDbDumpBuffer (
     UINT32                  Address);
 #endif
 
-static char                 *Gbl_HexToAscii = "0123456789ABCDEF";
-
 
 /*******************************************************************************
  *
@@ -166,7 +164,9 @@ AcpiDbMatchArgument (
 
     for (i = 0; Arguments[i].Name; i++)
     {
-        if (strstr (Arguments[i].Name, UserArgument) == Arguments[i].Name)
+        if (strstr (
+            ACPI_CAST_PTR (char, Arguments[i].Name),
+            ACPI_CAST_PTR (char, UserArgument)) == Arguments[i].Name)
         {
             return (i);
         }
@@ -458,7 +458,7 @@ AcpiDbUint32ToHexString (
 
     for (i = 7; i >= 0; i--)
     {
-        Buffer[i] = Gbl_HexToAscii [Value & 0x0F];
+        Buffer[i] = AcpiGbl_UpperHexDigits [Value & 0x0F];
         Value = Value >> 4;
     }
 }
diff --git a/src/acpica/source/components/disassembler/dmbuffer.c b/src/acpica/source/components/disassembler/dmbuffer.c
index 7dc0b90..72d2ada 100644
--- a/src/acpica/source/components/disassembler/dmbuffer.c
+++ b/src/acpica/source/components/disassembler/dmbuffer.c
@@ -145,53 +145,13 @@ AcpiDmPldBuffer (
     UINT8                   *ByteData,
     UINT32                  ByteCount);
 
+static const char *
+AcpiDmFindNameByIndex (
+    UINT64                  Index,
+    const char              **List);
 
-#define ACPI_BUFFER_BYTES_PER_LINE      8
-
-
-/* Strings for ToPld */
-
-static char *DmPanelList[] =
-{
-    "TOP",
-    "BOTTOM",
-    "LEFT",
-    "RIGHT",
-    "FRONT",
-    "BACK",
-    "UNKNOWN",
-    NULL
-};
-
-static char *DmVerticalPositionList[] =
-{
-    "UPPER",
-    "CENTER",
-    "LOWER",
-    NULL
-};
-
-static char *DmHorizontalPositionList[] =
-{
-    "LEFT",
-    "CENTER",
-    "RIGHT",
-    NULL
-};
 
-static char *DmShapeList[] =
-{
-    "ROUND",
-    "OVAL",
-    "SQUARE",
-    "VERTICALRECTANGLE",
-    "HORIZONTALRECTANGLE",
-    "VERTICALTRAPEZOID",
-    "HORIZONTALTRAPEZOID",
-    "UNKNOWN",
-    "CHAMFERED",
-    NULL
-};
+#define ACPI_BUFFER_BYTES_PER_LINE      8
 
 
 /*******************************************************************************
@@ -725,24 +685,24 @@ AcpiDmIsPldBuffer (
  *
  ******************************************************************************/
 
-static char *
+static const char *
 AcpiDmFindNameByIndex (
     UINT64                  Index,
-    char                    **List)
+    const char              **List)
 {
-    char                     *Str;
-    UINT32                   i;
+    const char              *NameString;
+    UINT32                  i;
 
 
     /* Bounds check */
 
-    Str = List[0];
+    NameString = List[0];
     i = 0;
 
-    while(Str)
+    while (NameString)
     {
         i++;
-        Str = List[i];
+        NameString = List[i];
     }
 
     if (Index >= i)
@@ -770,12 +730,12 @@ AcpiDmFindNameByIndex (
  *
  ******************************************************************************/
 
-#define ACPI_PLD_OUTPUT08   "%*.s%-18s = 0x%X,\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUT08P  "%*.s%-18s = 0x%X)\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUT16   "%*.s%-18s = 0x%X,\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUT16P  "%*.s%-18s = 0x%X)\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUT24   "%*.s%-18s = 0x%X,\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUTSTR  "%*.s%-18s = \"%s\",\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT08   "%*.s%-22s = 0x%X,\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT08P  "%*.s%-22s = 0x%X)\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT16   "%*.s%-22s = 0x%X,\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT16P  "%*.s%-22s = 0x%X)\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT24   "%*.s%-22s = 0x%X,\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUTSTR  "%*.s%-22s = \"%s\",\n", ACPI_MUL_4 (Level), " "
 
 static void
 AcpiDmPldBuffer (
@@ -823,16 +783,16 @@ AcpiDmPldBuffer (
     AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_Dock", PldInfo->Dock);
     AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_Lid", PldInfo->Lid);
     AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_Panel",
-        AcpiDmFindNameByIndex(PldInfo->Panel, DmPanelList));
+        AcpiDmFindNameByIndex(PldInfo->Panel, AcpiGbl_PldPanelList));
 
     AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_VerticalPosition",
-        AcpiDmFindNameByIndex(PldInfo->VerticalPosition, DmVerticalPositionList));
+        AcpiDmFindNameByIndex(PldInfo->VerticalPosition, AcpiGbl_PldVerticalPositionList));
 
     AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_HorizontalPosition",
-        AcpiDmFindNameByIndex(PldInfo->HorizontalPosition, DmHorizontalPositionList));
+        AcpiDmFindNameByIndex(PldInfo->HorizontalPosition, AcpiGbl_PldHorizontalPositionList));
 
     AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_Shape",
-        AcpiDmFindNameByIndex(PldInfo->Shape, DmShapeList));
+        AcpiDmFindNameByIndex(PldInfo->Shape, AcpiGbl_PldShapeList));
     AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_GroupOrientation", PldInfo->GroupOrientation);
 
     AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_GroupToken", PldInfo->GroupToken);
diff --git a/src/acpica/source/components/disassembler/dmopcode.c b/src/acpica/source/components/disassembler/dmopcode.c
index 45b9f7d..16c0e5b 100644
--- a/src/acpica/source/components/disassembler/dmopcode.c
+++ b/src/acpica/source/components/disassembler/dmopcode.c
@@ -718,8 +718,8 @@ AcpiDmMatchKeyword (
     }
     else
     {
-        AcpiOsPrintf ("%s", ACPI_CAST_PTR (char,
-            AcpiGbl_MatchOps[(ACPI_SIZE) Op->Common.Value.Integer]));
+        AcpiOsPrintf ("%s",
+            AcpiGbl_MatchOps[(ACPI_SIZE) Op->Common.Value.Integer]);
     }
 }
 
diff --git a/src/acpica/source/components/disassembler/dmresrc.c b/src/acpica/source/components/disassembler/dmresrc.c
index 8788beb..7980256 100644
--- a/src/acpica/source/components/disassembler/dmresrc.c
+++ b/src/acpica/source/components/disassembler/dmresrc.c
@@ -217,7 +217,7 @@ AcpiDmDescriptorName (
 void
 AcpiDmDumpInteger8 (
     UINT8                   Value,
-    char                    *Name)
+    const char              *Name)
 {
     AcpiOsPrintf ("0x%2.2X,               // %s\n", Value, Name);
 }
@@ -225,7 +225,7 @@ AcpiDmDumpInteger8 (
 void
 AcpiDmDumpInteger16 (
     UINT16                  Value,
-    char                    *Name)
+    const char              *Name)
 {
     AcpiOsPrintf ("0x%4.4X,             // %s\n", Value, Name);
 }
@@ -233,7 +233,7 @@ AcpiDmDumpInteger16 (
 void
 AcpiDmDumpInteger32 (
     UINT32                  Value,
-    char                    *Name)
+    const char              *Name)
 {
     AcpiOsPrintf ("0x%8.8X,         // %s\n", Value, Name);
 }
@@ -241,7 +241,7 @@ AcpiDmDumpInteger32 (
 void
 AcpiDmDumpInteger64 (
     UINT64                  Value,
-    char                    *Name)
+    const char              *Name)
 {
     AcpiOsPrintf ("0x%8.8X%8.8X, // %s\n", ACPI_FORMAT_UINT64 (Value), Name);
 }
diff --git a/src/acpica/source/components/disassembler/dmresrcl.c b/src/acpica/source/components/disassembler/dmresrcl.c
index dd0cea6..8e71a67 100644
--- a/src/acpica/source/components/disassembler/dmresrcl.c
+++ b/src/acpica/source/components/disassembler/dmresrcl.c
@@ -124,7 +124,7 @@
 
 /* Common names for address and memory descriptors */
 
-static char                 *AcpiDmAddressNames[] =
+static const char           *AcpiDmAddressNames[] =
 {
     "Granularity",
     "Range Minimum",
@@ -133,7 +133,7 @@ static char                 *AcpiDmAddressNames[] =
     "Length"
 };
 
-static char                 *AcpiDmMemoryNames[] =
+static const char           *AcpiDmMemoryNames[] =
 {
     "Range Minimum",
     "Range Maximum",
@@ -1100,7 +1100,7 @@ AcpiDmInterruptDescriptor (
 
 void
 AcpiDmVendorCommon (
-    char                    *Name,
+    const char              *Name,
     UINT8                   *ByteData,
     UINT32                  Length,
     UINT32                  Level)
diff --git a/src/acpica/source/components/disassembler/dmutils.c b/src/acpica/source/components/disassembler/dmutils.c
index 0afc663..3af4736 100644
--- a/src/acpica/source/components/disassembler/dmutils.c
+++ b/src/acpica/source/components/disassembler/dmutils.c
@@ -299,7 +299,7 @@ AcpiDmIndent (
         return;
     }
 
-    AcpiOsPrintf ("%*.s", ACPI_MUL_4 (Level), " ");
+    AcpiOsPrintf ("%*.s", (Level * 4), " ");
 }
 
 
diff --git a/src/acpica/source/components/events/evregion.c b/src/acpica/source/components/events/evregion.c
index 9e1aa1c..57d3f2b 100644
--- a/src/acpica/source/components/events/evregion.c
+++ b/src/acpica/source/components/events/evregion.c
@@ -623,58 +623,6 @@ AcpiEvAttachRegion (
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiEvAssociateRegMethod
- *
- * PARAMETERS:  RegionObj           - Region object
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Find and associate _REG method to a region
- *
- ******************************************************************************/
-
-void
-AcpiEvAssociateRegMethod (
-    ACPI_OPERAND_OBJECT     *RegionObj)
-{
-    ACPI_NAME               *RegNamePtr = (ACPI_NAME *) METHOD_NAME__REG;
-    ACPI_NAMESPACE_NODE     *MethodNode;
-    ACPI_NAMESPACE_NODE     *Node;
-    ACPI_OPERAND_OBJECT     *RegionObj2;
-    ACPI_STATUS             Status;
-
-
-    ACPI_FUNCTION_TRACE (EvAssociateRegMethod);
-
-
-    RegionObj2 = AcpiNsGetSecondaryObject (RegionObj);
-    if (!RegionObj2)
-    {
-        return_VOID;
-    }
-
-    Node = RegionObj->Region.Node->Parent;
-
-    /* Find any "_REG" method associated with this region definition */
-
-    Status = AcpiNsSearchOneScope (
-        *RegNamePtr, Node, ACPI_TYPE_METHOD, &MethodNode);
-    if (ACPI_SUCCESS (Status))
-    {
-        /*
-         * The _REG method is optional and there can be only one per region
-         * definition. This will be executed when the handler is attached
-         * or removed
-         */
-        RegionObj2->Extra.Method_REG = MethodNode;
-    }
-
-    return_VOID;
-}
-
-
-/*******************************************************************************
- *
  * FUNCTION:    AcpiEvExecuteRegMethod
  *
  * PARAMETERS:  RegionObj           - Region object
@@ -694,21 +642,45 @@ AcpiEvExecuteRegMethod (
     ACPI_EVALUATE_INFO      *Info;
     ACPI_OPERAND_OBJECT     *Args[3];
     ACPI_OPERAND_OBJECT     *RegionObj2;
+    const ACPI_NAME         *RegNamePtr = ACPI_CAST_PTR (ACPI_NAME, METHOD_NAME__REG);
+    ACPI_NAMESPACE_NODE     *MethodNode;
+    ACPI_NAMESPACE_NODE     *Node;
     ACPI_STATUS             Status;
 
 
     ACPI_FUNCTION_TRACE (EvExecuteRegMethod);
 
 
+    if (!AcpiGbl_NamespaceInitialized ||
+        RegionObj->Region.Handler == NULL)
+    {
+        return_ACPI_STATUS (AE_OK);
+    }
+
     RegionObj2 = AcpiNsGetSecondaryObject (RegionObj);
     if (!RegionObj2)
     {
         return_ACPI_STATUS (AE_NOT_EXIST);
     }
 
-    if (RegionObj2->Extra.Method_REG == NULL ||
-        RegionObj->Region.Handler == NULL ||
-        !AcpiGbl_NamespaceInitialized)
+    /*
+     * Find any "_REG" method associated with this region definition.
+     * The method should always be updated as this function may be
+     * invoked after a namespace change.
+     */
+    Node = RegionObj->Region.Node->Parent;
+    Status = AcpiNsSearchOneScope (
+        *RegNamePtr, Node, ACPI_TYPE_METHOD, &MethodNode);
+    if (ACPI_SUCCESS (Status))
+    {
+        /*
+         * The _REG method is optional and there can be only one per
+         * region definition. This will be executed when the handler is
+         * attached or removed.
+         */
+        RegionObj2->Extra.Method_REG = MethodNode;
+    }
+    if (RegionObj2->Extra.Method_REG == NULL)
     {
         return_ACPI_STATUS (AE_OK);
     }
diff --git a/src/acpica/source/components/events/evrgnini.c b/src/acpica/source/components/events/evrgnini.c
index f896c7e..7880d04 100644
--- a/src/acpica/source/components/events/evrgnini.c
+++ b/src/acpica/source/components/events/evrgnini.c
@@ -654,7 +654,6 @@ AcpiEvInitializeRegion (
         return_ACPI_STATUS (AE_OK);
     }
 
-    AcpiEvAssociateRegMethod (RegionObj);
     RegionObj->Common.Flags |= AOPOBJ_OBJECT_INITIALIZED;
 
     Node = RegionObj->Region.Node->Parent;
diff --git a/src/acpica/source/components/executer/exconcat.c b/src/acpica/source/components/executer/exconcat.c
new file mode 100644
index 0000000..db9f71c
--- /dev/null
+++ b/src/acpica/source/components/executer/exconcat.c
@@ -0,0 +1,533 @@
+/******************************************************************************
+ *
+ * Module Name: exconcat - Concatenate-type AML operators
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2016, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************/
+
+#include "acpi.h"
+#include "accommon.h"
+#include "acinterp.h"
+#include "amlresrc.h"
+
+
+#define _COMPONENT          ACPI_EXECUTER
+        ACPI_MODULE_NAME    ("exconcat")
+
+/* Local Prototypes */
+
+static ACPI_STATUS
+AcpiExConvertToObjectTypeString (
+    ACPI_OPERAND_OBJECT     *ObjDesc,
+    ACPI_OPERAND_OBJECT     **ResultDesc);
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiExDoConcatenate
+ *
+ * PARAMETERS:  Operand0            - First source object
+ *              Operand1            - Second source object
+ *              ActualReturnDesc    - Where to place the return object
+ *              WalkState           - Current walk state
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Concatenate two objects with the ACPI-defined conversion
+ *              rules as necessary.
+ * NOTE:
+ * Per the ACPI spec (up to 6.1), Concatenate only supports Integer,
+ * String, and Buffer objects. However, we support all objects here
+ * as an extension. This improves the usefulness of both Concatenate
+ * and the Printf/Fprintf macros. The extension returns a string
+ * describing the object type for the other objects.
+ * 02/2016.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiExDoConcatenate (
+    ACPI_OPERAND_OBJECT     *Operand0,
+    ACPI_OPERAND_OBJECT     *Operand1,
+    ACPI_OPERAND_OBJECT     **ActualReturnDesc,
+    ACPI_WALK_STATE         *WalkState)
+{
+    ACPI_OPERAND_OBJECT     *LocalOperand0 = Operand0;
+    ACPI_OPERAND_OBJECT     *LocalOperand1 = Operand1;
+    ACPI_OPERAND_OBJECT     *TempOperand1 = NULL;
+    ACPI_OPERAND_OBJECT     *ReturnDesc;
+    char                    *Buffer;
+    ACPI_OBJECT_TYPE        Operand0Type;
+    ACPI_OBJECT_TYPE        Operand1Type;
+    ACPI_STATUS             Status;
+
+
+    ACPI_FUNCTION_TRACE (ExDoConcatenate);
+
+
+    /* Operand 0 preprocessing */
+
+    switch (Operand0->Common.Type)
+    {
+    case ACPI_TYPE_INTEGER:
+    case ACPI_TYPE_STRING:
+    case ACPI_TYPE_BUFFER:
+
+        Operand0Type = Operand0->Common.Type;
+        break;
+
+    default:
+
+        /* For all other types, get the "object type" string */
+
+        Status = AcpiExConvertToObjectTypeString (
+            Operand0, &LocalOperand0);
+        if (ACPI_FAILURE (Status))
+        {
+            goto Cleanup;
+        }
+
+        Operand0Type = ACPI_TYPE_STRING;
+        break;
+    }
+
+    /* Operand 1 preprocessing */
+
+    switch (Operand1->Common.Type)
+    {
+    case ACPI_TYPE_INTEGER:
+    case ACPI_TYPE_STRING:
+    case ACPI_TYPE_BUFFER:
+
+        Operand1Type = Operand1->Common.Type;
+        break;
+
+    default:
+
+        /* For all other types, get the "object type" string */
+
+        Status = AcpiExConvertToObjectTypeString (
+            Operand1, &LocalOperand1);
+        if (ACPI_FAILURE (Status))
+        {
+            goto Cleanup;
+        }
+
+        Operand1Type = ACPI_TYPE_STRING;
+        break;
+    }
+
+    /*
+     * Convert the second operand if necessary. The first operand (0)
+     * determines the type of the second operand (1) (See the Data Types
+     * section of the ACPI specification). Both object types are
+     * guaranteed to be either Integer/String/Buffer by the operand
+     * resolution mechanism.
+     */
+    switch (Operand0Type)
+    {
+    case ACPI_TYPE_INTEGER:
+
+        Status = AcpiExConvertToInteger (LocalOperand1, &TempOperand1, 16);
+        break;
+
+    case ACPI_TYPE_BUFFER:
+
+        Status = AcpiExConvertToBuffer (LocalOperand1, &TempOperand1);
+        break;
+
+    case ACPI_TYPE_STRING:
+
+        switch (Operand1Type)
+        {
+        case ACPI_TYPE_INTEGER:
+        case ACPI_TYPE_STRING:
+        case ACPI_TYPE_BUFFER:
+
+            /* Other types have already been converted to string */
+
+            Status = AcpiExConvertToString (
+                LocalOperand1, &TempOperand1, ACPI_IMPLICIT_CONVERT_HEX);
+            break;
+
+        default:
+
+            Status = AE_OK;
+            break;
+        }
+        break;
+
+    default:
+
+        ACPI_ERROR ((AE_INFO, "Invalid object type: 0x%X",
+            Operand0->Common.Type));
+        Status = AE_AML_INTERNAL;
+    }
+
+    if (ACPI_FAILURE (Status))
+    {
+        goto Cleanup;
+    }
+
+    /* Take care with any newly created operand objects */
+
+    if ((LocalOperand1 != Operand1) &&
+        (LocalOperand1 != TempOperand1))
+    {
+        AcpiUtRemoveReference (LocalOperand1);
+    }
+
+    LocalOperand1 = TempOperand1;
+
+    /*
+     * Both operands are now known to be the same object type
+     * (Both are Integer, String, or Buffer), and we can now perform
+     * the concatenation.
+     *
+     * There are three cases to handle, as per the ACPI spec:
+     *
+     * 1) Two Integers concatenated to produce a new Buffer
+     * 2) Two Strings concatenated to produce a new String
+     * 3) Two Buffers concatenated to produce a new Buffer
+     */
+    switch (Operand0Type)
+    {
+    case ACPI_TYPE_INTEGER:
+
+        /* Result of two Integers is a Buffer */
+        /* Need enough buffer space for two integers */
+
+        ReturnDesc = AcpiUtCreateBufferObject (
+            (ACPI_SIZE) ACPI_MUL_2 (AcpiGbl_IntegerByteWidth));
+        if (!ReturnDesc)
+        {
+            Status = AE_NO_MEMORY;
+            goto Cleanup;
+        }
+
+        Buffer = (char *) ReturnDesc->Buffer.Pointer;
+
+        /* Copy the first integer, LSB first */
+
+        memcpy (Buffer, &Operand0->Integer.Value,
+            AcpiGbl_IntegerByteWidth);
+
+        /* Copy the second integer (LSB first) after the first */
+
+        memcpy (Buffer + AcpiGbl_IntegerByteWidth,
+            &LocalOperand1->Integer.Value, AcpiGbl_IntegerByteWidth);
+        break;
+
+    case ACPI_TYPE_STRING:
+
+        /* Result of two Strings is a String */
+
+        ReturnDesc = AcpiUtCreateStringObject (
+            ((ACPI_SIZE) LocalOperand0->String.Length +
+            LocalOperand1->String.Length));
+        if (!ReturnDesc)
+        {
+            Status = AE_NO_MEMORY;
+            goto Cleanup;
+        }
+
+        Buffer = ReturnDesc->String.Pointer;
+
+        /* Concatenate the strings */
+
+        strcpy (Buffer, LocalOperand0->String.Pointer);
+        strcat (Buffer, LocalOperand1->String.Pointer);
+        break;
+
+    case ACPI_TYPE_BUFFER:
+
+        /* Result of two Buffers is a Buffer */
+
+        ReturnDesc = AcpiUtCreateBufferObject (
+            ((ACPI_SIZE) Operand0->Buffer.Length +
+            LocalOperand1->Buffer.Length));
+        if (!ReturnDesc)
+        {
+            Status = AE_NO_MEMORY;
+            goto Cleanup;
+        }
+
+        Buffer = (char *) ReturnDesc->Buffer.Pointer;
+
+        /* Concatenate the buffers */
+
+        memcpy (Buffer, Operand0->Buffer.Pointer,
+            Operand0->Buffer.Length);
+        memcpy (Buffer + Operand0->Buffer.Length,
+            LocalOperand1->Buffer.Pointer,
+            LocalOperand1->Buffer.Length);
+        break;
+
+    default:
+
+        /* Invalid object type, should not happen here */
+
+        ACPI_ERROR ((AE_INFO, "Invalid object type: 0x%X",
+            Operand0->Common.Type));
+        Status = AE_AML_INTERNAL;
+        goto Cleanup;
+    }
+
+    *ActualReturnDesc = ReturnDesc;
+
+Cleanup:
+    if (LocalOperand0 != Operand0)
+    {
+        AcpiUtRemoveReference (LocalOperand0);
+    }
+
+    if (LocalOperand1 != Operand1)
+    {
+        AcpiUtRemoveReference (LocalOperand1);
+    }
+
+    return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiExConvertToObjectTypeString
+ *
+ * PARAMETERS:  ObjDesc             - Object to be converted
+ *              ReturnDesc          - Where to place the return object
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Convert an object of arbitrary type to a string object that
+ *              contains the namestring for the object. Used for the
+ *              concatenate operator.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiExConvertToObjectTypeString (
+    ACPI_OPERAND_OBJECT     *ObjDesc,
+    ACPI_OPERAND_OBJECT     **ResultDesc)
+{
+    ACPI_OPERAND_OBJECT     *ReturnDesc;
+    const char              *TypeString;
+
+
+    TypeString = AcpiUtGetTypeName (ObjDesc->Common.Type);
+
+    ReturnDesc = AcpiUtCreateStringObject (
+        ((ACPI_SIZE) strlen (TypeString) + 9)); /* 9 For "[ Object]" */
+    if (!ReturnDesc)
+    {
+        return (AE_NO_MEMORY);
+    }
+
+    strcpy (ReturnDesc->String.Pointer, "[");
+    strcat (ReturnDesc->String.Pointer, TypeString);
+    strcat (ReturnDesc->String.Pointer, " Object]");
+
+    *ResultDesc = ReturnDesc;
+    return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiExConcatTemplate
+ *
+ * PARAMETERS:  Operand0            - First source object
+ *              Operand1            - Second source object
+ *              ActualReturnDesc    - Where to place the return object
+ *              WalkState           - Current walk state
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Concatenate two resource templates
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiExConcatTemplate (
+    ACPI_OPERAND_OBJECT     *Operand0,
+    ACPI_OPERAND_OBJECT     *Operand1,
+    ACPI_OPERAND_OBJECT     **ActualReturnDesc,
+    ACPI_WALK_STATE         *WalkState)
+{
+    ACPI_STATUS             Status;
+    ACPI_OPERAND_OBJECT     *ReturnDesc;
+    UINT8                   *NewBuf;
+    UINT8                   *EndTag;
+    ACPI_SIZE               Length0;
+    ACPI_SIZE               Length1;
+    ACPI_SIZE               NewLength;
+
+
+    ACPI_FUNCTION_TRACE (ExConcatTemplate);
+
+
+    /*
+     * Find the EndTag descriptor in each resource template.
+     * Note1: returned pointers point TO the EndTag, not past it.
+     * Note2: zero-length buffers are allowed; treated like one EndTag
+     */
+
+    /* Get the length of the first resource template */
+
+    Status = AcpiUtGetResourceEndTag (Operand0, &EndTag);
+    if (ACPI_FAILURE (Status))
+    {
+        return_ACPI_STATUS (Status);
+    }
+
+    Length0 = ACPI_PTR_DIFF (EndTag, Operand0->Buffer.Pointer);
+
+    /* Get the length of the second resource template */
+
+    Status = AcpiUtGetResourceEndTag (Operand1, &EndTag);
+    if (ACPI_FAILURE (Status))
+    {
+        return_ACPI_STATUS (Status);
+    }
+
+    Length1 = ACPI_PTR_DIFF (EndTag, Operand1->Buffer.Pointer);
+
+    /* Combine both lengths, minimum size will be 2 for EndTag */
+
+    NewLength = Length0 + Length1 + sizeof (AML_RESOURCE_END_TAG);
+
+    /* Create a new buffer object for the result (with one EndTag) */
+
+    ReturnDesc = AcpiUtCreateBufferObject (NewLength);
+    if (!ReturnDesc)
+    {
+        return_ACPI_STATUS (AE_NO_MEMORY);
+    }
+
+    /*
+     * Copy the templates to the new buffer, 0 first, then 1 follows. One
+     * EndTag descriptor is copied from Operand1.
+     */
+    NewBuf = ReturnDesc->Buffer.Pointer;
+    memcpy (NewBuf, Operand0->Buffer.Pointer, Length0);
+    memcpy (NewBuf + Length0, Operand1->Buffer.Pointer, Length1);
+
+    /* Insert EndTag and set the checksum to zero, means "ignore checksum" */
+
+    NewBuf[NewLength - 1] = 0;
+    NewBuf[NewLength - 2] = ACPI_RESOURCE_NAME_END_TAG | 1;
+
+    /* Return the completed resource template */
+
+    *ActualReturnDesc = ReturnDesc;
+    return_ACPI_STATUS (AE_OK);
+}
diff --git a/src/acpica/source/components/executer/exconfig.c b/src/acpica/source/components/executer/exconfig.c
index eea6e2a..333567f 100644
--- a/src/acpica/source/components/executer/exconfig.c
+++ b/src/acpica/source/components/executer/exconfig.c
@@ -202,7 +202,10 @@ AcpiExAddTable (
     /* Execute any module-level code that was found in the table */
 
     AcpiExExitInterpreter ();
-    AcpiNsExecModuleCodeList ();
+    if (AcpiGbl_GroupModuleLevelCode)
+    {
+        AcpiNsExecModuleCodeList ();
+    }
     AcpiExEnterInterpreter ();
 
     /*
diff --git a/src/acpica/source/components/executer/exconvrt.c b/src/acpica/source/components/executer/exconvrt.c
index 8ab128e..4a83d61 100644
--- a/src/acpica/source/components/executer/exconvrt.c
+++ b/src/acpica/source/components/executer/exconvrt.c
@@ -209,7 +209,8 @@ AcpiExConvertToInteger (
          * of ACPI 3.0) is that the ToInteger() operator allows both decimal
          * and hexadecimal strings (hex prefixed with "0x").
          */
-        Status = AcpiUtStrtoul64 ((char *) Pointer, Flags, &Result);
+        Status = AcpiUtStrtoul64 ((char *) Pointer, Flags,
+            AcpiGbl_IntegerByteWidth, &Result);
         if (ACPI_FAILURE (Status))
         {
             return_ACPI_STATUS (Status);
diff --git a/src/acpica/source/components/executer/exdump.c b/src/acpica/source/components/executer/exdump.c
index a03a439..d0db3a6 100644
--- a/src/acpica/source/components/executer/exdump.c
+++ b/src/acpica/source/components/executer/exdump.c
@@ -132,13 +132,13 @@
 
 static void
 AcpiExOutString (
-    char                    *Title,
-    char                    *Value);
+    const char              *Title,
+    const char              *Value);
 
 static void
 AcpiExOutPointer (
-    char                    *Title,
-    void                    *Value);
+    const char              *Title,
+    const void              *Value);
 
 static void
 AcpiExDumpObject (
@@ -452,8 +452,7 @@ AcpiExDumpObject (
     ACPI_EXDUMP_INFO        *Info)
 {
     UINT8                   *Target;
-    char                    *Name;
-    const char              *ReferenceName;
+    const char              *Name;
     UINT8                   Count;
     ACPI_OPERAND_OBJECT     *Start;
     ACPI_OPERAND_OBJECT     *Data = NULL;
@@ -544,9 +543,7 @@ AcpiExDumpObject (
 
         case ACPI_EXD_REFERENCE:
 
-            ReferenceName = AcpiUtGetReferenceName (ObjDesc);
-            AcpiExOutString (
-                "Class Name", ACPI_CAST_PTR (char, ReferenceName));
+            AcpiExOutString ("Class Name", AcpiUtGetReferenceName (ObjDesc));
             AcpiExDumpReferenceObj (ObjDesc);
             break;
 
@@ -1043,16 +1040,16 @@ AcpiExDumpOperands (
 
 static void
 AcpiExOutString (
-    char                    *Title,
-    char                    *Value)
+    const char              *Title,
+    const char              *Value)
 {
     AcpiOsPrintf ("%20s : %s\n", Title, Value);
 }
 
 static void
 AcpiExOutPointer (
-    char                    *Title,
-    void                    *Value)
+    const char              *Title,
+    const void              *Value)
 {
     AcpiOsPrintf ("%20s : %p\n", Title, Value);
 }
diff --git a/src/acpica/source/components/executer/exmisc.c b/src/acpica/source/components/executer/exmisc.c
index 77005d1..559decc 100644
--- a/src/acpica/source/components/executer/exmisc.c
+++ b/src/acpica/source/components/executer/exmisc.c
@@ -118,7 +118,6 @@
 #include "accommon.h"
 #include "acinterp.h"
 #include "amlcode.h"
-#include "amlresrc.h"
 
 
 #define _COMPONENT          ACPI_EXECUTER
@@ -223,307 +222,6 @@ AcpiExGetObjectReference (
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiExConcatTemplate
- *
- * PARAMETERS:  Operand0            - First source object
- *              Operand1            - Second source object
- *              ActualReturnDesc    - Where to place the return object
- *              WalkState           - Current walk state
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Concatenate two resource templates
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiExConcatTemplate (
-    ACPI_OPERAND_OBJECT     *Operand0,
-    ACPI_OPERAND_OBJECT     *Operand1,
-    ACPI_OPERAND_OBJECT     **ActualReturnDesc,
-    ACPI_WALK_STATE         *WalkState)
-{
-    ACPI_STATUS             Status;
-    ACPI_OPERAND_OBJECT     *ReturnDesc;
-    UINT8                   *NewBuf;
-    UINT8                   *EndTag;
-    ACPI_SIZE               Length0;
-    ACPI_SIZE               Length1;
-    ACPI_SIZE               NewLength;
-
-
-    ACPI_FUNCTION_TRACE (ExConcatTemplate);
-
-
-    /*
-     * Find the EndTag descriptor in each resource template.
-     * Note1: returned pointers point TO the EndTag, not past it.
-     * Note2: zero-length buffers are allowed; treated like one EndTag
-     */
-
-    /* Get the length of the first resource template */
-
-    Status = AcpiUtGetResourceEndTag (Operand0, &EndTag);
-    if (ACPI_FAILURE (Status))
-    {
-        return_ACPI_STATUS (Status);
-    }
-
-    Length0 = ACPI_PTR_DIFF (EndTag, Operand0->Buffer.Pointer);
-
-    /* Get the length of the second resource template */
-
-    Status = AcpiUtGetResourceEndTag (Operand1, &EndTag);
-    if (ACPI_FAILURE (Status))
-    {
-        return_ACPI_STATUS (Status);
-    }
-
-    Length1 = ACPI_PTR_DIFF (EndTag, Operand1->Buffer.Pointer);
-
-    /* Combine both lengths, minimum size will be 2 for EndTag */
-
-    NewLength = Length0 + Length1 + sizeof (AML_RESOURCE_END_TAG);
-
-    /* Create a new buffer object for the result (with one EndTag) */
-
-    ReturnDesc = AcpiUtCreateBufferObject (NewLength);
-    if (!ReturnDesc)
-    {
-        return_ACPI_STATUS (AE_NO_MEMORY);
-    }
-
-    /*
-     * Copy the templates to the new buffer, 0 first, then 1 follows. One
-     * EndTag descriptor is copied from Operand1.
-     */
-    NewBuf = ReturnDesc->Buffer.Pointer;
-    memcpy (NewBuf, Operand0->Buffer.Pointer, Length0);
-    memcpy (NewBuf + Length0, Operand1->Buffer.Pointer, Length1);
-
-    /* Insert EndTag and set the checksum to zero, means "ignore checksum" */
-
-    NewBuf[NewLength - 1] = 0;
-    NewBuf[NewLength - 2] = ACPI_RESOURCE_NAME_END_TAG | 1;
-
-    /* Return the completed resource template */
-
-    *ActualReturnDesc = ReturnDesc;
-    return_ACPI_STATUS (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    AcpiExDoConcatenate
- *
- * PARAMETERS:  Operand0            - First source object
- *              Operand1            - Second source object
- *              ActualReturnDesc    - Where to place the return object
- *              WalkState           - Current walk state
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Concatenate two objects OF THE SAME TYPE.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiExDoConcatenate (
-    ACPI_OPERAND_OBJECT     *Operand0,
-    ACPI_OPERAND_OBJECT     *Operand1,
-    ACPI_OPERAND_OBJECT     **ActualReturnDesc,
-    ACPI_WALK_STATE         *WalkState)
-{
-    ACPI_OPERAND_OBJECT     *LocalOperand1 = Operand1;
-    ACPI_OPERAND_OBJECT     *ReturnDesc;
-    char                    *NewBuf;
-    const char              *TypeString;
-    ACPI_STATUS             Status;
-
-
-    ACPI_FUNCTION_TRACE (ExDoConcatenate);
-
-
-    /*
-     * Convert the second operand if necessary. The first operand
-     * determines the type of the second operand, (See the Data Types
-     * section of the ACPI specification.)  Both object types are
-     * guaranteed to be either Integer/String/Buffer by the operand
-     * resolution mechanism.
-     */
-    switch (Operand0->Common.Type)
-    {
-    case ACPI_TYPE_INTEGER:
-
-        Status = AcpiExConvertToInteger (Operand1, &LocalOperand1, 16);
-        break;
-
-    case ACPI_TYPE_STRING:
-        /*
-         * Per the ACPI spec, Concatenate only supports int/str/buf.
-         * However, we support all objects here as an extension.
-         * This improves the usefulness of the Printf() macro.
-         * 12/2015.
-         */
-        switch (Operand1->Common.Type)
-        {
-        case ACPI_TYPE_INTEGER:
-        case ACPI_TYPE_STRING:
-        case ACPI_TYPE_BUFFER:
-
-            Status = AcpiExConvertToString (
-                Operand1, &LocalOperand1, ACPI_IMPLICIT_CONVERT_HEX);
-            break;
-
-        default:
-            /*
-             * Just emit a string containing the object type.
-             */
-            TypeString = AcpiUtGetTypeName (Operand1->Common.Type);
-
-            LocalOperand1 = AcpiUtCreateStringObject (
-                ((ACPI_SIZE) strlen (TypeString) + 9)); /* 9 For "[Object]" */
-            if (!LocalOperand1)
-            {
-                Status = AE_NO_MEMORY;
-                goto Cleanup;
-            }
-
-            strcpy (LocalOperand1->String.Pointer, "[");
-            strcat (LocalOperand1->String.Pointer, TypeString);
-            strcat (LocalOperand1->String.Pointer, " Object]");
-            Status = AE_OK;
-            break;
-        }
-        break;
-
-    case ACPI_TYPE_BUFFER:
-
-        Status = AcpiExConvertToBuffer (Operand1, &LocalOperand1);
-        break;
-
-    default:
-
-        ACPI_ERROR ((AE_INFO, "Invalid object type: 0x%X",
-            Operand0->Common.Type));
-        Status = AE_AML_INTERNAL;
-    }
-
-    if (ACPI_FAILURE (Status))
-    {
-        goto Cleanup;
-    }
-
-    /*
-     * Both operands are now known to be the same object type
-     * (Both are Integer, String, or Buffer), and we can now perform the
-     * concatenation.
-     */
-
-    /*
-     * There are three cases to handle:
-     *
-     * 1) Two Integers concatenated to produce a new Buffer
-     * 2) Two Strings concatenated to produce a new String
-     * 3) Two Buffers concatenated to produce a new Buffer
-     */
-    switch (Operand0->Common.Type)
-    {
-    case ACPI_TYPE_INTEGER:
-
-        /* Result of two Integers is a Buffer */
-        /* Need enough buffer space for two integers */
-
-        ReturnDesc = AcpiUtCreateBufferObject (
-            (ACPI_SIZE) ACPI_MUL_2 (AcpiGbl_IntegerByteWidth));
-        if (!ReturnDesc)
-        {
-            Status = AE_NO_MEMORY;
-            goto Cleanup;
-        }
-
-        NewBuf = (char *) ReturnDesc->Buffer.Pointer;
-
-        /* Copy the first integer, LSB first */
-
-        memcpy (NewBuf, &Operand0->Integer.Value,
-            AcpiGbl_IntegerByteWidth);
-
-        /* Copy the second integer (LSB first) after the first */
-
-        memcpy (NewBuf + AcpiGbl_IntegerByteWidth,
-            &LocalOperand1->Integer.Value, AcpiGbl_IntegerByteWidth);
-        break;
-
-    case ACPI_TYPE_STRING:
-
-        /* Result of two Strings is a String */
-
-        ReturnDesc = AcpiUtCreateStringObject (
-            ((ACPI_SIZE) Operand0->String.Length +
-            LocalOperand1->String.Length));
-        if (!ReturnDesc)
-        {
-            Status = AE_NO_MEMORY;
-            goto Cleanup;
-        }
-
-        NewBuf = ReturnDesc->String.Pointer;
-
-        /* Concatenate the strings */
-
-        strcpy (NewBuf, Operand0->String.Pointer);
-        strcat (NewBuf, LocalOperand1->String.Pointer);
-        break;
-
-    case ACPI_TYPE_BUFFER:
-
-        /* Result of two Buffers is a Buffer */
-
-        ReturnDesc = AcpiUtCreateBufferObject (
-            ((ACPI_SIZE) Operand0->Buffer.Length +
-            LocalOperand1->Buffer.Length));
-        if (!ReturnDesc)
-        {
-            Status = AE_NO_MEMORY;
-            goto Cleanup;
-        }
-
-        NewBuf = (char *) ReturnDesc->Buffer.Pointer;
-
-        /* Concatenate the buffers */
-
-        memcpy (NewBuf, Operand0->Buffer.Pointer,
-            Operand0->Buffer.Length);
-        memcpy (NewBuf + Operand0->Buffer.Length,
-            LocalOperand1->Buffer.Pointer,
-            LocalOperand1->Buffer.Length);
-        break;
-
-    default:
-
-        /* Invalid object type, should not happen here */
-
-        ACPI_ERROR ((AE_INFO, "Invalid object type: 0x%X",
-            Operand0->Common.Type));
-        Status =AE_AML_INTERNAL;
-        goto Cleanup;
-    }
-
-    *ActualReturnDesc = ReturnDesc;
-
-Cleanup:
-    if (LocalOperand1 != Operand1)
-    {
-        AcpiUtRemoveReference (LocalOperand1);
-    }
-    return_ACPI_STATUS (Status);
-}
-
-
-/*******************************************************************************
- *
  * FUNCTION:    AcpiExDoMathOp
  *
  * PARAMETERS:  Opcode              - AML opcode
diff --git a/src/acpica/source/components/executer/exsystem.c b/src/acpica/source/components/executer/exsystem.c
index b8fbdd7..ef64344 100644
--- a/src/acpica/source/components/executer/exsystem.c
+++ b/src/acpica/source/components/executer/exsystem.c
@@ -166,7 +166,7 @@ AcpiExSystemWaitSemaphore (
 
         /* Reacquire the interpreter */
 
-       AcpiExEnterInterpreter ();
+        AcpiExEnterInterpreter ();
     }
 
     return_ACPI_STATUS (Status);
diff --git a/src/acpica/source/components/executer/exutils.c b/src/acpica/source/components/executer/exutils.c
index b8398a5..ec22f84 100644
--- a/src/acpica/source/components/executer/exutils.c
+++ b/src/acpica/source/components/executer/exutils.c
@@ -413,8 +413,8 @@ AcpiExDigitsNeeded (
  *
  * FUNCTION:    AcpiExEisaIdToString
  *
- * PARAMETERS:  CompressedId    - EISAID to be converted
- *              OutString       - Where to put the converted string (8 bytes)
+ * PARAMETERS:  OutString       - Where to put the converted string (8 bytes)
+ *              CompressedId    - EISAID to be converted
  *
  * RETURN:      None
  *
@@ -472,7 +472,7 @@ AcpiExEisaIdToString (
  *                                possible 64-bit integer.
  *              Value           - Value to be converted
  *
- * RETURN:      None, string
+ * RETURN:      Converted string in OutString
  *
  * DESCRIPTION: Convert a 64-bit integer to decimal string representation.
  *              Assumes string buffer is large enough to hold the string. The
@@ -509,9 +509,9 @@ AcpiExIntegerToString (
  * FUNCTION:    AcpiExPciClsToString
  *
  * PARAMETERS:  OutString       - Where to put the converted string (7 bytes)
- * PARAMETERS:  ClassCode       - PCI class code to be converted (3 bytes)
+ *              ClassCode       - PCI class code to be converted (3 bytes)
  *
- * RETURN:      None
+ * RETURN:      Converted string in OutString
  *
  * DESCRIPTION: Convert 3-bytes PCI class code to string representation.
  *              Return buffer must be large enough to hold the string. The
@@ -547,7 +547,7 @@ AcpiExPciClsToString (
  *
  * PARAMETERS:  SpaceId             - ID to be validated
  *
- * RETURN:      TRUE if valid/supported ID.
+ * RETURN:      TRUE if SpaceId is a valid/supported ID.
  *
  * DESCRIPTION: Validate an operation region SpaceID.
  *
diff --git a/src/acpica/source/components/hardware/hwregs.c b/src/acpica/source/components/hardware/hwregs.c
index ffad33f..e0f3053 100644
--- a/src/acpica/source/components/hardware/hwregs.c
+++ b/src/acpica/source/components/hardware/hwregs.c
@@ -163,6 +163,9 @@ AcpiHwValidateRegister (
     UINT8                   MaxBitWidth,
     UINT64                  *Address)
 {
+    UINT8                   BitWidth;
+    UINT8                   AccessWidth;
+
 
     /* Must have a valid pointer to a GAS structure */
 
@@ -192,24 +195,26 @@ AcpiHwValidateRegister (
         return (AE_SUPPORT);
     }
 
-    /* Validate the BitWidth */
+    /* Validate the AccessWidth */
 
-    if ((Reg->BitWidth != 8) &&
-        (Reg->BitWidth != 16) &&
-        (Reg->BitWidth != 32) &&
-        (Reg->BitWidth != MaxBitWidth))
+    if (Reg->AccessWidth > 4)
     {
         ACPI_ERROR ((AE_INFO,
-            "Unsupported register bit width: 0x%X", Reg->BitWidth));
+            "Unsupported register access width: 0x%X", Reg->AccessWidth));
         return (AE_SUPPORT);
     }
 
-    /* Validate the BitOffset. Just a warning for now. */
+    /* Validate the BitWidth, convert AccessWidth into number of bits */
 
-    if (Reg->BitOffset != 0)
+    AccessWidth = Reg->AccessWidth ? Reg->AccessWidth : 1;
+    AccessWidth = 1 << (AccessWidth + 2);
+    BitWidth = ACPI_ROUND_UP (Reg->BitOffset + Reg->BitWidth, AccessWidth);
+    if (MaxBitWidth < BitWidth)
     {
         ACPI_WARNING ((AE_INFO,
-            "Unsupported register bit offset: 0x%X", Reg->BitOffset));
+            "Requested bit width 0x%X is smaller than register bit width 0x%X",
+            MaxBitWidth, BitWidth));
+        return (AE_SUPPORT);
     }
 
     return (AE_OK);
@@ -230,10 +235,7 @@ AcpiHwValidateRegister (
  *              64-bit values is not needed.
  *
  * LIMITATIONS: <These limitations also apply to AcpiHwWrite>
- *      BitWidth must be exactly 8, 16, or 32.
  *      SpaceID must be SystemMemory or SystemIO.
- *      BitOffset and AccessWidth are currently ignored, as there has
- *          not been a need to implement these.
  *
  ******************************************************************************/
 
@@ -243,7 +245,12 @@ AcpiHwRead (
     ACPI_GENERIC_ADDRESS    *Reg)
 {
     UINT64                  Address;
+    UINT8                   AccessWidth;
+    UINT32                  BitWidth;
+    UINT8                   BitOffset;
     UINT64                  Value64;
+    UINT32                  Value32;
+    UINT8                   Index;
     ACPI_STATUS             Status;
 
 
@@ -258,30 +265,65 @@ AcpiHwRead (
         return (Status);
     }
 
-    /* Initialize entire 32-bit return value to zero */
-
+    /*
+     * Initialize entire 32-bit return value to zero, convert AccessWidth
+     * into number of bits based
+     */
     *Value = 0;
+    AccessWidth = Reg->AccessWidth ? Reg->AccessWidth : 1;
+    AccessWidth = 1 << (AccessWidth + 2);
+    BitWidth = ACPI_ROUND_UP (Reg->BitOffset + Reg->BitWidth, AccessWidth);
+    BitOffset = Reg->BitOffset;
 
     /*
      * Two address spaces supported: Memory or IO. PCI_Config is
      * not supported here because the GAS structure is insufficient
      */
-    if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
+    Index = 0;
+    while (BitWidth)
     {
-        Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
-            Address, &Value64, Reg->BitWidth);
+        if (BitOffset > AccessWidth)
+        {
+            Value32 = 0;
+            BitOffset -= AccessWidth;
+        }
+        else
+        {
+            if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
+            {
+                Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
+                    Address + Index * ACPI_DIV_8 (AccessWidth),
+                    &Value64, AccessWidth);
+                Value32 = (UINT32) Value64;
+            }
+            else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
+            {
+                Status = AcpiHwReadPort ((ACPI_IO_ADDRESS)
+                    Address + Index * ACPI_DIV_8 (AccessWidth),
+                    &Value32, AccessWidth);
+            }
+
+            if (BitOffset)
+            {
+                Value32 &= ACPI_MASK_BITS_BELOW (BitOffset);
+                BitOffset = 0;
+            }
+            if (BitWidth < AccessWidth)
+            {
+                Value32 &= ACPI_MASK_BITS_ABOVE (BitWidth);
+            }
+        }
 
-        *Value = (UINT32) Value64;
-    }
-    else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
-    {
-        Status = AcpiHwReadPort ((ACPI_IO_ADDRESS)
-            Address, Value, Reg->BitWidth);
+        ACPI_SET_BITS (Value, Index * AccessWidth,
+            ((1 << AccessWidth) - 1), Value32);
+
+        BitWidth -= BitWidth > AccessWidth ? AccessWidth : BitWidth;
+        Index++;
     }
 
     ACPI_DEBUG_PRINT ((ACPI_DB_IO,
         "Read:  %8.8X width %2d from %8.8X%8.8X (%s)\n",
-        *Value, Reg->BitWidth, ACPI_FORMAT_UINT64 (Address),
+        *Value, AccessWidth, ACPI_FORMAT_UINT64 (Address),
         AcpiUtGetRegionName (Reg->SpaceId)));
 
     return (Status);
@@ -309,6 +351,12 @@ AcpiHwWrite (
     ACPI_GENERIC_ADDRESS    *Reg)
 {
     UINT64                  Address;
+    UINT8                   AccessWidth;
+    UINT32                  BitWidth;
+    UINT8                   BitOffset;
+    UINT64                  Value64;
+    UINT32                  NewValue32, OldValue32;
+    UINT8                   Index;
     ACPI_STATUS             Status;
 
 
@@ -323,24 +371,110 @@ AcpiHwWrite (
         return (Status);
     }
 
+    /* Convert AccessWidth into number of bits based */
+
+    AccessWidth = Reg->AccessWidth ? Reg->AccessWidth : 1;
+    AccessWidth = 1 << (AccessWidth + 2);
+    BitWidth = ACPI_ROUND_UP (Reg->BitOffset + Reg->BitWidth, AccessWidth);
+    BitOffset = Reg->BitOffset;
+
     /*
      * Two address spaces supported: Memory or IO. PCI_Config is
      * not supported here because the GAS structure is insufficient
      */
-    if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
+    Index = 0;
+    while (BitWidth)
     {
-        Status = AcpiOsWriteMemory ((ACPI_PHYSICAL_ADDRESS)
-            Address, (UINT64) Value, Reg->BitWidth);
-    }
-    else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
-    {
-        Status = AcpiHwWritePort ((ACPI_IO_ADDRESS)
-            Address, Value, Reg->BitWidth);
+        NewValue32 = ACPI_GET_BITS (&Value, (Index * AccessWidth),
+            ((1 << AccessWidth) - 1));
+
+        if (BitOffset > AccessWidth)
+        {
+            BitOffset -= AccessWidth;
+        }
+        else
+        {
+            if (BitOffset)
+            {
+                NewValue32 &= ACPI_MASK_BITS_BELOW (BitOffset);
+            }
+
+            if (BitWidth < AccessWidth)
+            {
+                NewValue32 &= ACPI_MASK_BITS_ABOVE (BitWidth);
+            }
+
+            if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
+            {
+                if (BitOffset || BitWidth < AccessWidth)
+                {
+                    /*
+                     * Read old values in order not to modify the bits that
+                     * are beyond the register BitWidth/BitOffset setting.
+                     */
+                    Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
+                        Address + Index * ACPI_DIV_8 (AccessWidth),
+                        &Value64, AccessWidth);
+                    OldValue32 = (UINT32) Value64;
+
+                    if (BitOffset)
+                    {
+                        OldValue32 &= ACPI_MASK_BITS_ABOVE (BitOffset + 1);
+                        BitOffset = 0;
+                    }
+
+                    if (BitWidth < AccessWidth)
+                    {
+                        OldValue32 &= ACPI_MASK_BITS_BELOW (BitWidth - 1);
+                    }
+
+                    NewValue32 |= OldValue32;
+                }
+
+                Value64 = (UINT64) NewValue32;
+                Status = AcpiOsWriteMemory ((ACPI_PHYSICAL_ADDRESS)
+                    Address + Index * ACPI_DIV_8 (AccessWidth),
+                    Value64, AccessWidth);
+            }
+            else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
+            {
+                if (BitOffset || BitWidth < AccessWidth)
+                {
+                    /*
+                     * Read old values in order not to modify the bits that
+                     * are beyond the register BitWidth/BitOffset setting.
+                     */
+                    Status = AcpiHwReadPort ((ACPI_IO_ADDRESS)
+                        Address + Index * ACPI_DIV_8 (AccessWidth),
+                        &OldValue32, AccessWidth);
+
+                    if (BitOffset)
+                    {
+                        OldValue32 &= ACPI_MASK_BITS_ABOVE (BitOffset + 1);
+                        BitOffset = 0;
+                    }
+
+                    if (BitWidth < AccessWidth)
+                    {
+                        OldValue32 &= ACPI_MASK_BITS_BELOW (BitWidth - 1);
+                    }
+
+                    NewValue32 |= OldValue32;
+                }
+
+                Status = AcpiHwWritePort ((ACPI_IO_ADDRESS)
+                    Address + Index * ACPI_DIV_8 (AccessWidth),
+                    NewValue32, AccessWidth);
+            }
+        }
+
+        BitWidth -= BitWidth > AccessWidth ? AccessWidth : BitWidth;
+        Index++;
     }
 
     ACPI_DEBUG_PRINT ((ACPI_DB_IO,
         "Wrote: %8.8X width %2d   to %8.8X%8.8X (%s)\n",
-        Value, Reg->BitWidth, ACPI_FORMAT_UINT64 (Address),
+        Value, AccessWidth, ACPI_FORMAT_UINT64 (Address),
         AcpiUtGetRegionName (Reg->SpaceId)));
 
     return (Status);
diff --git a/src/acpica/source/components/hardware/hwxface.c b/src/acpica/source/components/hardware/hwxface.c
index 2fbc366..acf3709 100644
--- a/src/acpica/source/components/hardware/hwxface.c
+++ b/src/acpica/source/components/hardware/hwxface.c
@@ -637,8 +637,7 @@ AcpiGetSleepTypeData (
      * Evaluate the \_Sx namespace object containing the register values
      * for this state
      */
-    Info->RelativePathname = ACPI_CAST_PTR (char,
-        AcpiGbl_SleepStateNames[SleepState]);
+    Info->RelativePathname = AcpiGbl_SleepStateNames[SleepState];
 
     Status = AcpiNsEvaluate (Info);
     if (ACPI_FAILURE (Status))
diff --git a/src/acpica/source/components/namespace/nsaccess.c b/src/acpica/source/components/namespace/nsaccess.c
index 175a92c..9ac25b1 100644
--- a/src/acpica/source/components/namespace/nsaccess.c
+++ b/src/acpica/source/components/namespace/nsaccess.c
@@ -188,7 +188,7 @@ AcpiNsRootInitialize (
             continue;
         }
 
-        Status = AcpiNsLookup (NULL, InitVal->Name, InitVal->Type,
+        Status = AcpiNsLookup (NULL, (char *) InitVal->Name, InitVal->Type,
             ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH,
             NULL, &NewNode);
         if (ACPI_FAILURE (Status))
diff --git a/src/acpica/source/components/namespace/nsconvert.c b/src/acpica/source/components/namespace/nsconvert.c
index f172989..ef321e7 100644
--- a/src/acpica/source/components/namespace/nsconvert.c
+++ b/src/acpica/source/components/namespace/nsconvert.c
@@ -156,7 +156,7 @@ AcpiNsConvertToInteger (
         /* String-to-Integer conversion */
 
         Status = AcpiUtStrtoul64 (OriginalObject->String.Pointer,
-            ACPI_ANY_BASE, &Value);
+            ACPI_ANY_BASE, AcpiGbl_IntegerByteWidth, &Value);
         if (ACPI_FAILURE (Status))
         {
             return (Status);
diff --git a/src/acpica/source/components/namespace/nsdump.c b/src/acpica/source/components/namespace/nsdump.c
index bce5880..ff84b3b 100644
--- a/src/acpica/source/components/namespace/nsdump.c
+++ b/src/acpica/source/components/namespace/nsdump.c
@@ -172,7 +172,7 @@ AcpiNsGetMaxDepth (
 void
 AcpiNsPrintPathname (
     UINT32                  NumSegments,
-    char                    *Pathname)
+    const char              *Pathname)
 {
     UINT32                  i;
 
@@ -212,6 +212,9 @@ AcpiNsPrintPathname (
 }
 
 
+#ifdef ACPI_OBSOLETE_FUNCTIONS
+/* Not used at this time, perhaps later */
+
 /*******************************************************************************
  *
  * FUNCTION:    AcpiNsDumpPathname
@@ -231,7 +234,7 @@ AcpiNsPrintPathname (
 void
 AcpiNsDumpPathname (
     ACPI_HANDLE             Handle,
-    char                    *Msg,
+    const char              *Msg,
     UINT32                  Level,
     UINT32                  Component)
 {
@@ -252,7 +255,7 @@ AcpiNsDumpPathname (
     AcpiOsPrintf ("\n");
     return_VOID;
 }
-
+#endif
 
 /*******************************************************************************
  *
diff --git a/src/acpica/source/components/namespace/nsinit.c b/src/acpica/source/components/namespace/nsinit.c
index c26dd03..fedbcf2 100644
--- a/src/acpica/source/components/namespace/nsinit.c
+++ b/src/acpica/source/components/namespace/nsinit.c
@@ -171,6 +171,8 @@ AcpiNsInitializeObjects (
     ACPI_FUNCTION_TRACE (NsInitializeObjects);
 
 
+    ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+        "[Init] Completing Initialization of ACPI Objects\n"));
     ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
         "**** Starting initialization of namespace objects ****\n"));
     ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
@@ -228,6 +230,7 @@ AcpiNsInitializeDevices (
 {
     ACPI_STATUS             Status = AE_OK;
     ACPI_DEVICE_WALK_INFO   Info;
+    ACPI_HANDLE             Handle;
 
 
     ACPI_FUNCTION_TRACE (NsInitializeDevices);
@@ -281,6 +284,27 @@ AcpiNsInitializeDevices (
         {
             Info.Num_INI++;
         }
+
+        /*
+         * Execute \_SB._INI.
+	 * There appears to be a strict order requirement for \_SB._INI,
+         * which should be evaluated before any _REG evaluations.
+         */
+        Status = AcpiGetHandle (NULL, "\\_SB", &Handle);
+        if (ACPI_SUCCESS (Status))
+        {
+            memset (Info.EvaluateInfo, 0, sizeof (ACPI_EVALUATE_INFO));
+            Info.EvaluateInfo->PrefixNode = Handle;
+            Info.EvaluateInfo->RelativePathname = METHOD_NAME__INI;
+            Info.EvaluateInfo->Parameters = NULL;
+            Info.EvaluateInfo->Flags = ACPI_IGNORE_RETURN_VALUE;
+
+            Status = AcpiNsEvaluate (Info.EvaluateInfo);
+            if (ACPI_SUCCESS (Status))
+            {
+                Info.Num_INI++;
+            }
+        }
     }
 
     /*
@@ -289,6 +313,12 @@ AcpiNsInitializeDevices (
      * Note: Any objects accessed by the _REG methods will be automatically
      * initialized, even if they contain executable AML (see the call to
      * AcpiNsInitializeObjects below).
+     *
+     * Note: According to the ACPI specification, we actually needn't execute
+     * _REG for SystemMemory/SystemIo operation regions, but for PCI_Config
+     * operation regions, it is required to evaluate _REG for those on a PCI
+     * root bus that doesn't contain _BBN object. So this code is kept here
+     * in order not to break things.
      */
     if (!(Flags & ACPI_NO_ADDRESS_SPACE_INIT))
     {
@@ -712,33 +742,37 @@ AcpiNsInitOneDevice (
      * Note: We know there is an _INI within this subtree, but it may not be
      * under this particular device, it may be lower in the branch.
      */
-    ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (
-        ACPI_TYPE_METHOD, DeviceNode, METHOD_NAME__INI));
+    if (!ACPI_COMPARE_NAME (DeviceNode->Name.Ascii, "_SB_") ||
+        DeviceNode->Parent != AcpiGbl_RootNode)
+    {
+        ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (
+            ACPI_TYPE_METHOD, DeviceNode, METHOD_NAME__INI));
 
-    memset (Info, 0, sizeof (ACPI_EVALUATE_INFO));
-    Info->PrefixNode = DeviceNode;
-    Info->RelativePathname = METHOD_NAME__INI;
-    Info->Parameters = NULL;
-    Info->Flags = ACPI_IGNORE_RETURN_VALUE;
+        memset (Info, 0, sizeof (ACPI_EVALUATE_INFO));
+        Info->PrefixNode = DeviceNode;
+        Info->RelativePathname = METHOD_NAME__INI;
+        Info->Parameters = NULL;
+        Info->Flags = ACPI_IGNORE_RETURN_VALUE;
 
-    Status = AcpiNsEvaluate (Info);
-    if (ACPI_SUCCESS (Status))
-    {
-        WalkInfo->Num_INI++;
-    }
+        Status = AcpiNsEvaluate (Info);
+        if (ACPI_SUCCESS (Status))
+        {
+            WalkInfo->Num_INI++;
+        }
 
 #ifdef ACPI_DEBUG_OUTPUT
-    else if (Status != AE_NOT_FOUND)
-    {
-        /* Ignore error and move on to next device */
+        else if (Status != AE_NOT_FOUND)
+        {
+            /* Ignore error and move on to next device */
 
-        char *ScopeName = AcpiNsGetNormalizedPathname (DeviceNode, TRUE);
+            char *ScopeName = AcpiNsGetNormalizedPathname (DeviceNode, TRUE);
 
-        ACPI_EXCEPTION ((AE_INFO, Status, "during %s._INI execution",
-            ScopeName));
-        ACPI_FREE (ScopeName);
-    }
+            ACPI_EXCEPTION ((AE_INFO, Status, "during %s._INI execution",
+                ScopeName));
+            ACPI_FREE (ScopeName);
+        }
 #endif
+    }
 
     /* Ignore errors from above */
 
diff --git a/src/acpica/source/components/namespace/nsload.c b/src/acpica/source/components/namespace/nsload.c
index d33719f..c3869aa 100644
--- a/src/acpica/source/components/namespace/nsload.c
+++ b/src/acpica/source/components/namespace/nsload.c
@@ -212,8 +212,8 @@ AcpiNsLoadTable (
         (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
         AcpiNsDeleteNamespaceByOwner (
             AcpiGbl_RootTableList.Tables[TableIndex].OwnerId);
-            AcpiTbReleaseOwnerId (TableIndex);
 
+        AcpiTbReleaseOwnerId (TableIndex);
         return_ACPI_STATUS (Status);
     }
 
diff --git a/src/acpica/source/components/namespace/nsprepkg.c b/src/acpica/source/components/namespace/nsprepkg.c
index aad9de0..bb82674 100644
--- a/src/acpica/source/components/namespace/nsprepkg.c
+++ b/src/acpica/source/components/namespace/nsprepkg.c
@@ -260,6 +260,7 @@ AcpiNsCheckPackage (
             {
                 return (Status);
             }
+
             Elements++;
         }
         break;
@@ -304,6 +305,7 @@ AcpiNsCheckPackage (
                     return (Status);
                 }
             }
+
             Elements++;
         }
         break;
@@ -414,7 +416,7 @@ AcpiNsCheckPackage (
         while (Count > 0)
         {
             Status = AcpiNsCheckObjectType(Info, Elements,
-                        Package->RetInfo.ObjectType1, 0);
+                Package->RetInfo.ObjectType1, 0);
             if (ACPI_FAILURE(Status))
             {
                 return (Status);
@@ -430,7 +432,7 @@ AcpiNsCheckPackage (
             }
 
             Status = AcpiNsCheckObjectType(Info, Elements + 1,
-                        Package->RetInfo.ObjectType2, 0);
+                Package->RetInfo.ObjectType2, 0);
             if (ACPI_FAILURE(Status))
             {
                 return (Status);
@@ -438,8 +440,8 @@ AcpiNsCheckPackage (
 
             Elements += 2;
             Count -= 2;
-         }
-         break;
+        }
+        break;
 
     default:
 
@@ -514,7 +516,7 @@ AcpiNsCheckPackageList (
         /* Each sub-object must be of type Package */
 
         Status = AcpiNsCheckObjectType (Info, &SubPackage,
-                    ACPI_RTYPE_PACKAGE, i);
+            ACPI_RTYPE_PACKAGE, i);
         if (ACPI_FAILURE (Status))
         {
             return (Status);
@@ -538,10 +540,10 @@ AcpiNsCheckPackageList (
             }
 
             Status = AcpiNsCheckPackageElements (Info, SubElements,
-                        Package->RetInfo.ObjectType1,
-                        Package->RetInfo.Count1,
-                        Package->RetInfo.ObjectType2,
-                        Package->RetInfo.Count2, 0);
+                Package->RetInfo.ObjectType1,
+                Package->RetInfo.Count1,
+                Package->RetInfo.ObjectType2,
+                Package->RetInfo.Count2, 0);
             if (ACPI_FAILURE (Status))
             {
                 return (Status);
@@ -560,10 +562,10 @@ AcpiNsCheckPackageList (
             }
 
             Status = AcpiNsCheckPackageElements (Info, SubElements,
-                        Package->RetInfo.ObjectType1,
-                        Package->RetInfo.Count1,
-                        Package->RetInfo.ObjectType2,
-                        SubPackage->Package.Count - Package->RetInfo.Count1, 0);
+                Package->RetInfo.ObjectType1,
+                Package->RetInfo.Count1,
+                Package->RetInfo.ObjectType2,
+                SubPackage->Package.Count - Package->RetInfo.Count1, 0);
             if (ACPI_FAILURE (Status))
             {
                 return (Status);
@@ -591,7 +593,7 @@ AcpiNsCheckPackageList (
             for (j = 0; j < ExpectedCount; j++)
             {
                 Status = AcpiNsCheckObjectType (Info, &SubElements[j],
-                            Package->RetInfo2.ObjectType[j], j);
+                    Package->RetInfo2.ObjectType[j], j);
                 if (ACPI_FAILURE (Status))
                 {
                     return (Status);
@@ -612,8 +614,8 @@ AcpiNsCheckPackageList (
             /* Check the type of each subpackage element */
 
             Status = AcpiNsCheckPackageElements (Info, SubElements,
-                        Package->RetInfo.ObjectType1,
-                        SubPackage->Package.Count, 0, 0, 0);
+                Package->RetInfo.ObjectType1,
+                SubPackage->Package.Count, 0, 0, 0);
             if (ACPI_FAILURE (Status))
             {
                 return (Status);
@@ -626,7 +628,7 @@ AcpiNsCheckPackageList (
              * the count field (the ACPI name is NumElements)
              */
             Status = AcpiNsCheckObjectType (Info, SubElements,
-                        ACPI_RTYPE_INTEGER, 0);
+                ACPI_RTYPE_INTEGER, 0);
             if (ACPI_FAILURE (Status))
             {
                 return (Status);
@@ -641,11 +643,13 @@ AcpiNsCheckPackageList (
             {
                 goto PackageTooSmall;
             }
+
             if (SubPackage->Package.Count < Package->RetInfo.Count1)
             {
                 ExpectedCount = Package->RetInfo.Count1;
                 goto PackageTooSmall;
             }
+
             if (ExpectedCount == 0)
             {
                 /*
@@ -661,8 +665,8 @@ AcpiNsCheckPackageList (
             /* Check the type of each subpackage element */
 
             Status = AcpiNsCheckPackageElements (Info, (SubElements + 1),
-                        Package->RetInfo.ObjectType1,
-                        (ExpectedCount - 1), 0, 0, 1);
+                Package->RetInfo.ObjectType1,
+                (ExpectedCount - 1), 0, 0, 1);
             if (ACPI_FAILURE (Status))
             {
                 return (Status);
@@ -734,22 +738,24 @@ AcpiNsCheckPackageElements (
     for (i = 0; i < Count1; i++)
     {
         Status = AcpiNsCheckObjectType (Info, ThisElement,
-                    Type1, i + StartIndex);
+            Type1, i + StartIndex);
         if (ACPI_FAILURE (Status))
         {
             return (Status);
         }
+
         ThisElement++;
     }
 
     for (i = 0; i < Count2; i++)
     {
         Status = AcpiNsCheckObjectType (Info, ThisElement,
-                    Type2, (i + Count1 + StartIndex));
+            Type2, (i + Count1 + StartIndex));
         if (ACPI_FAILURE (Status))
         {
             return (Status);
         }
+
         ThisElement++;
     }
 
diff --git a/src/acpica/source/components/parser/psopinfo.c b/src/acpica/source/components/parser/psopinfo.c
index 6556d05..fcc0375 100644
--- a/src/acpica/source/components/parser/psopinfo.c
+++ b/src/acpica/source/components/parser/psopinfo.c
@@ -237,7 +237,7 @@ AcpiPsGetOpcodeInfo (
  *
  ******************************************************************************/
 
-char *
+const char *
 AcpiPsGetOpcodeName (
     UINT16                  Opcode)
 {
diff --git a/src/acpica/source/components/resources/rsdump.c b/src/acpica/source/components/resources/rsdump.c
index 73c4cda..3a67505 100644
--- a/src/acpica/source/components/resources/rsdump.c
+++ b/src/acpica/source/components/resources/rsdump.c
@@ -128,32 +128,32 @@
 
 static void
 AcpiRsOutString (
-    char                    *Title,
-    char                    *Value);
+    const char              *Title,
+    const char              *Value);
 
 static void
 AcpiRsOutInteger8 (
-    char                    *Title,
+    const char              *Title,
     UINT8                   Value);
 
 static void
 AcpiRsOutInteger16 (
-    char                    *Title,
+    const char              *Title,
     UINT16                  Value);
 
 static void
 AcpiRsOutInteger32 (
-    char                    *Title,
+    const char              *Title,
     UINT32                  Value);
 
 static void
 AcpiRsOutInteger64 (
-    char                    *Title,
+    const char              *Title,
     UINT64                  Value);
 
 static void
 AcpiRsOutTitle (
-    char                    *Title);
+    const char              *Title);
 
 static void
 AcpiRsDumpByteList (
@@ -335,8 +335,8 @@ AcpiRsDumpDescriptor (
 {
     UINT8                   *Target = NULL;
     UINT8                   *PreviousTarget;
-    char                    *Name;
-    UINT8                    Count;
+    const char              *Name;
+    UINT8                   Count;
 
 
     /* First table entry must contain the table length (# of table entries) */
@@ -379,8 +379,7 @@ AcpiRsDumpDescriptor (
 
             if (Table->Pointer)
             {
-                AcpiRsOutString (Name, ACPI_CAST_PTR (char,
-                    Table->Pointer [*Target]));
+                AcpiRsOutString (Name, Table->Pointer [*Target]);
             }
             else
             {
@@ -407,20 +406,17 @@ AcpiRsDumpDescriptor (
 
         case ACPI_RSD_1BITFLAG:
 
-            AcpiRsOutString (Name, ACPI_CAST_PTR (char,
-                Table->Pointer [*Target & 0x01]));
+            AcpiRsOutString (Name, Table->Pointer [*Target & 0x01]);
             break;
 
         case ACPI_RSD_2BITFLAG:
 
-            AcpiRsOutString (Name, ACPI_CAST_PTR (char,
-                Table->Pointer [*Target & 0x03]));
+            AcpiRsOutString (Name, Table->Pointer [*Target & 0x03]);
             break;
 
         case ACPI_RSD_3BITFLAG:
 
-            AcpiRsOutString (Name, ACPI_CAST_PTR (char,
-                Table->Pointer [*Target & 0x07]));
+            AcpiRsOutString (Name, Table->Pointer [*Target & 0x07]);
             break;
 
         case ACPI_RSD_SHORTLIST:
@@ -614,8 +610,8 @@ AcpiRsDumpAddressCommon (
 
 static void
 AcpiRsOutString (
-    char                    *Title,
-    char                    *Value)
+    const char              *Title,
+    const char              *Value)
 {
 
     AcpiOsPrintf ("%27s : %s", Title, Value);
@@ -628,7 +624,7 @@ AcpiRsOutString (
 
 static void
 AcpiRsOutInteger8 (
-    char                    *Title,
+    const char              *Title,
     UINT8                   Value)
 {
     AcpiOsPrintf ("%27s : %2.2X\n", Title, Value);
@@ -636,7 +632,7 @@ AcpiRsOutInteger8 (
 
 static void
 AcpiRsOutInteger16 (
-    char                    *Title,
+    const char              *Title,
     UINT16                  Value)
 {
 
@@ -645,7 +641,7 @@ AcpiRsOutInteger16 (
 
 static void
 AcpiRsOutInteger32 (
-    char                    *Title,
+    const char              *Title,
     UINT32                  Value)
 {
 
@@ -654,7 +650,7 @@ AcpiRsOutInteger32 (
 
 static void
 AcpiRsOutInteger64 (
-    char                    *Title,
+    const char              *Title,
     UINT64                  Value)
 {
 
@@ -664,7 +660,7 @@ AcpiRsOutInteger64 (
 
 static void
 AcpiRsOutTitle (
-    char                    *Title)
+    const char              *Title)
 {
 
     AcpiOsPrintf ("%27s : ", Title);
diff --git a/src/acpica/source/components/resources/rsutils.c b/src/acpica/source/components/resources/rsutils.c
index fdb08b5..3c8c633 100644
--- a/src/acpica/source/components/resources/rsutils.c
+++ b/src/acpica/source/components/resources/rsutils.c
@@ -812,7 +812,7 @@ AcpiRsGetAeiMethodData (
 ACPI_STATUS
 AcpiRsGetMethodData (
     ACPI_HANDLE             Handle,
-    char                    *Path,
+    const char              *Path,
     ACPI_BUFFER             *RetBuffer)
 {
     ACPI_OPERAND_OBJECT     *ObjDesc;
diff --git a/src/acpica/source/components/tables/tbfadt.c b/src/acpica/source/components/tables/tbfadt.c
index 7e9ddba..413b2fd 100644
--- a/src/acpica/source/components/tables/tbfadt.c
+++ b/src/acpica/source/components/tables/tbfadt.c
@@ -128,7 +128,7 @@ AcpiTbInitGenericAddress (
     UINT8                   SpaceId,
     UINT8                   ByteWidth,
     UINT64                  Address,
-    char                    *RegisterName,
+    const char              *RegisterName,
     UINT8                   Flags);
 
 static void
@@ -150,7 +150,7 @@ AcpiTbSelectAddress (
 
 typedef struct acpi_fadt_info
 {
-    char                    *Name;
+    const char              *Name;
     UINT16                  Address64;
     UINT16                  Address32;
     UINT16                  Length;
@@ -284,7 +284,7 @@ AcpiTbInitGenericAddress (
     UINT8                   SpaceId,
     UINT8                   ByteWidth,
     UINT64                  Address,
-    char                    *RegisterName,
+    const char              *RegisterName,
     UINT8                   Flags)
 {
     UINT8                   BitWidth;
@@ -492,15 +492,16 @@ AcpiTbCreateLocalFadt (
 
     /*
      * Check if the FADT is larger than the largest table that we expect
-     * (the ACPI 5.0 version). If so, truncate the table, and issue
-     * a warning.
+     * (typically the current ACPI specification version). If so, truncate
+     * the table, and issue a warning.
      */
     if (Length > sizeof (ACPI_TABLE_FADT))
     {
         ACPI_BIOS_WARNING ((AE_INFO,
-            "FADT (revision %u) is longer than ACPI 5.0 version, "
+            "FADT (revision %u) is longer than %s length, "
             "truncating length %u to %u",
-            Table->Revision, Length, (UINT32) sizeof (ACPI_TABLE_FADT)));
+            Table->Revision, ACPI_FADT_CONFORMANCE, Length,
+            (UINT32) sizeof (ACPI_TABLE_FADT)));
     }
 
     /* Clear the entire local FADT */
@@ -578,7 +579,7 @@ static void
 AcpiTbConvertFadt (
     void)
 {
-    char                    *Name;
+    const char              *Name;
     ACPI_GENERIC_ADDRESS    *Address64;
     UINT32                  Address32;
     UINT8                   Length;
@@ -748,9 +749,11 @@ AcpiTbConvertFadt (
                 (!Address64->Address && Length))
             {
                 ACPI_BIOS_WARNING ((AE_INFO,
-                    "Optional FADT field %s has zero address or length: "
-                    "0x%8.8X%8.8X/0x%X",
-                    Name, ACPI_FORMAT_UINT64 (Address64->Address), Length));
+                    "Optional FADT field %s has valid %s but zero %s: "
+                    "0x%8.8X%8.8X/0x%X", Name,
+                    (Length ? "Length" : "Address"),
+                    (Length ? "Address": "Length"),
+                    ACPI_FORMAT_UINT64 (Address64->Address), Length));
             }
         }
     }
diff --git a/src/acpica/source/components/tables/tbxfload.c b/src/acpica/source/components/tables/tbxfload.c
index 9de6979..6c6f2be 100644
--- a/src/acpica/source/components/tables/tbxfload.c
+++ b/src/acpica/source/components/tables/tbxfload.c
@@ -159,14 +159,11 @@ AcpiLoadTables (
      * between AcpiInitializeSubsystem() and AcpiLoadTables() to use
      * their customized default region handlers.
      */
-    if (AcpiGbl_GroupModuleLevelCode)
+    Status = AcpiEvInstallRegionHandlers ();
+    if (ACPI_FAILURE (Status))
     {
-        Status = AcpiEvInstallRegionHandlers ();
-        if (ACPI_FAILURE (Status) && Status != AE_ALREADY_EXISTS)
-        {
-            ACPI_EXCEPTION ((AE_INFO, Status, "During Region initialization"));
-            return_ACPI_STATUS (Status);
-        }
+        ACPI_EXCEPTION ((AE_INFO, Status, "During Region initialization"));
+        return_ACPI_STATUS (Status);
     }
 
     /* Load the namespace from the tables */
@@ -186,6 +183,22 @@ AcpiLoadTables (
             "While loading namespace from ACPI tables"));
     }
 
+    if (!AcpiGbl_GroupModuleLevelCode)
+    {
+        /*
+         * Initialize the objects that remain uninitialized. This
+         * runs the executable AML that may be part of the
+         * declaration of these objects:
+         * OperationRegions, BufferFields, Buffers, and Packages.
+         */
+        Status = AcpiNsInitializeObjects ();
+        if (ACPI_FAILURE (Status))
+        {
+            return_ACPI_STATUS (Status);
+        }
+    }
+
+    AcpiGbl_NamespaceInitialized = TRUE;
     return_ACPI_STATUS (Status);
 }
 
diff --git a/src/acpica/source/components/utilities/utdebug.c b/src/acpica/source/components/utilities/utdebug.c
index e50f838..b68d36e 100644
--- a/src/acpica/source/components/utilities/utdebug.c
+++ b/src/acpica/source/components/utilities/utdebug.c
@@ -125,15 +125,9 @@
 
 #ifdef ACPI_DEBUG_OUTPUT
 
-static ACPI_THREAD_ID       AcpiGbl_PrevThreadId = (ACPI_THREAD_ID) 0xFFFFFFFF;
-static char                 *AcpiGbl_FnEntryStr = "----Entry";
-static char                 *AcpiGbl_FnExitStr  = "----Exit-";
-
-/* Local prototypes */
-
-static const char *
-AcpiUtTrimFunctionName (
-    const char              *FunctionName);
+static ACPI_THREAD_ID       AcpiGbl_PreviousThreadId = (ACPI_THREAD_ID) 0xFFFFFFFF;
+static const char           *AcpiGbl_FunctionEntryPrefix = "----Entry";
+static const char           *AcpiGbl_FunctionExitPrefix  = "----Exit-";
 
 
 /*******************************************************************************
@@ -273,16 +267,16 @@ AcpiDebugPrint (
      * Thread tracking and context switch notification
      */
     ThreadId = AcpiOsGetThreadId ();
-    if (ThreadId != AcpiGbl_PrevThreadId)
+    if (ThreadId != AcpiGbl_PreviousThreadId)
     {
         if (ACPI_LV_THREADS & AcpiDbgLevel)
         {
             AcpiOsPrintf (
                 "\n**** Context Switch from TID %u to TID %u ****\n\n",
-                (UINT32) AcpiGbl_PrevThreadId, (UINT32) ThreadId);
+                (UINT32) AcpiGbl_PreviousThreadId, (UINT32) ThreadId);
         }
 
-        AcpiGbl_PrevThreadId = ThreadId;
+        AcpiGbl_PreviousThreadId = ThreadId;
         AcpiGbl_NestingLevel = 0;
     }
 
@@ -397,7 +391,7 @@ AcpiUtTrace (
     {
         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
             LineNumber, FunctionName, ModuleName, ComponentId,
-            "%s\n", AcpiGbl_FnEntryStr);
+            "%s\n", AcpiGbl_FunctionEntryPrefix);
     }
 }
 
@@ -427,7 +421,7 @@ AcpiUtTracePtr (
     const char              *FunctionName,
     const char              *ModuleName,
     UINT32                  ComponentId,
-    void                    *Pointer)
+    const void              *Pointer)
 {
 
     AcpiGbl_NestingLevel++;
@@ -439,7 +433,7 @@ AcpiUtTracePtr (
     {
         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
             LineNumber, FunctionName, ModuleName, ComponentId,
-            "%s %p\n", AcpiGbl_FnEntryStr, Pointer);
+            "%s %p\n", AcpiGbl_FunctionEntryPrefix, Pointer);
     }
 }
 
@@ -467,7 +461,7 @@ AcpiUtTraceStr (
     const char              *FunctionName,
     const char              *ModuleName,
     UINT32                  ComponentId,
-    char                    *String)
+    const char              *String)
 {
 
     AcpiGbl_NestingLevel++;
@@ -479,7 +473,7 @@ AcpiUtTraceStr (
     {
         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
             LineNumber, FunctionName, ModuleName, ComponentId,
-            "%s %s\n", AcpiGbl_FnEntryStr, String);
+            "%s %s\n", AcpiGbl_FunctionEntryPrefix, String);
     }
 }
 
@@ -519,7 +513,7 @@ AcpiUtTraceU32 (
     {
         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
             LineNumber, FunctionName, ModuleName, ComponentId,
-            "%s %08X\n", AcpiGbl_FnEntryStr, Integer);
+            "%s %08X\n", AcpiGbl_FunctionEntryPrefix, Integer);
     }
 }
 
@@ -554,7 +548,7 @@ AcpiUtExit (
     {
         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
             LineNumber, FunctionName, ModuleName, ComponentId,
-            "%s\n", AcpiGbl_FnExitStr);
+            "%s\n", AcpiGbl_FunctionExitPrefix);
     }
 
     if (AcpiGbl_NestingLevel)
@@ -600,14 +594,14 @@ AcpiUtStatusExit (
         {
             AcpiDebugPrint (ACPI_LV_FUNCTIONS,
                 LineNumber, FunctionName, ModuleName, ComponentId,
-                "%s %s\n", AcpiGbl_FnExitStr,
+                "%s %s\n", AcpiGbl_FunctionExitPrefix,
                 AcpiFormatException (Status));
         }
         else
         {
             AcpiDebugPrint (ACPI_LV_FUNCTIONS,
                 LineNumber, FunctionName, ModuleName, ComponentId,
-                "%s ****Exception****: %s\n", AcpiGbl_FnExitStr,
+                "%s ****Exception****: %s\n", AcpiGbl_FunctionExitPrefix,
                 AcpiFormatException (Status));
         }
     }
@@ -653,7 +647,7 @@ AcpiUtValueExit (
     {
         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
             LineNumber, FunctionName, ModuleName, ComponentId,
-            "%s %8.8X%8.8X\n", AcpiGbl_FnExitStr,
+            "%s %8.8X%8.8X\n", AcpiGbl_FunctionExitPrefix,
             ACPI_FORMAT_UINT64 (Value));
     }
 
@@ -698,7 +692,7 @@ AcpiUtPtrExit (
     {
         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
             LineNumber, FunctionName, ModuleName, ComponentId,
-            "%s %p\n", AcpiGbl_FnExitStr, Ptr);
+            "%s %p\n", AcpiGbl_FunctionExitPrefix, Ptr);
     }
 
     if (AcpiGbl_NestingLevel)
diff --git a/src/acpica/source/components/utilities/uteval.c b/src/acpica/source/components/utilities/uteval.c
index 2028d83..ebe66e2 100644
--- a/src/acpica/source/components/utilities/uteval.c
+++ b/src/acpica/source/components/utilities/uteval.c
@@ -144,7 +144,7 @@
 ACPI_STATUS
 AcpiUtEvaluateObject (
     ACPI_NAMESPACE_NODE     *PrefixNode,
-    char                    *Path,
+    const char              *Path,
     UINT32                  ExpectedReturnBtypes,
     ACPI_OPERAND_OBJECT     **ReturnDesc)
 {
@@ -291,7 +291,7 @@ Cleanup:
 
 ACPI_STATUS
 AcpiUtEvaluateNumericObject (
-    char                    *ObjectName,
+    const char              *ObjectName,
     ACPI_NAMESPACE_NODE     *DeviceNode,
     UINT64                  *Value)
 {
diff --git a/src/acpica/source/components/utilities/utglobal.c b/src/acpica/source/components/utilities/utglobal.c
index f36a48b..fa29f47 100644
--- a/src/acpica/source/components/utilities/utglobal.c
+++ b/src/acpica/source/components/utilities/utglobal.c
@@ -159,6 +159,12 @@ const char                  *AcpiGbl_HighestDstateNames[ACPI_NUM_SxD_METHODS] =
 };
 
 
+/* Hex-to-ascii */
+
+const char                  AcpiGbl_LowerHexDigits[] = "0123456789abcdef";
+const char                  AcpiGbl_UpperHexDigits[] = "0123456789ABCDEF";
+
+
 /*******************************************************************************
  *
  * Namespace globals
@@ -251,6 +257,55 @@ ACPI_FIXED_EVENT_INFO       AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS] =
 };
 #endif /* !ACPI_REDUCED_HARDWARE */
 
+
+#if defined (ACPI_DISASSEMBLER) || defined (ACPI_ASL_COMPILER)
+
+/* ToPld macro: compile/disassemble strings */
+
+const char              *AcpiGbl_PldPanelList[] =
+{
+    "TOP",
+    "BOTTOM",
+    "LEFT",
+    "RIGHT",
+    "FRONT",
+    "BACK",
+    "UNKNOWN",
+    NULL
+};
+
+const char              *AcpiGbl_PldVerticalPositionList[] =
+{
+    "UPPER",
+    "CENTER",
+    "LOWER",
+    NULL
+};
+
+const char              *AcpiGbl_PldHorizontalPositionList[] =
+{
+    "LEFT",
+    "CENTER",
+    "RIGHT",
+    NULL
+};
+
+const char              *AcpiGbl_PldShapeList[] =
+{
+    "ROUND",
+    "OVAL",
+    "SQUARE",
+    "VERTICALRECTANGLE",
+    "HORIZONTALRECTANGLE",
+    "VERTICALTRAPEZOID",
+    "HORIZONTALTRAPEZOID",
+    "UNKNOWN",
+    "CHAMFERED",
+    NULL
+};
+#endif
+
+
 /* Public globals */
 
 ACPI_EXPORT_SYMBOL (AcpiGbl_FADT)
diff --git a/src/acpica/source/components/utilities/utmisc.c b/src/acpica/source/components/utilities/utmisc.c
index fb1d08c..41f2c72 100644
--- a/src/acpica/source/components/utilities/utmisc.c
+++ b/src/acpica/source/components/utilities/utmisc.c
@@ -473,7 +473,7 @@ void
 AcpiUtDisplayInitPathname (
     UINT8                   Type,
     ACPI_NAMESPACE_NODE     *ObjHandle,
-    char                    *Path)
+    const char              *Path)
 {
     ACPI_STATUS             Status;
     ACPI_BUFFER             Buffer;
diff --git a/src/acpica/source/components/utilities/utnonansi.c b/src/acpica/source/components/utilities/utnonansi.c
index 47413cd..1e6512e 100644
--- a/src/acpica/source/components/utilities/utnonansi.c
+++ b/src/acpica/source/components/utilities/utnonansi.c
@@ -316,41 +316,44 @@ AcpiUtSafeStrncat (
  *
  * FUNCTION:    AcpiUtStrtoul64
  *
- * PARAMETERS:  String          - Null terminated string
- *              Base            - Radix of the string: 16 or ACPI_ANY_BASE;
- *                                ACPI_ANY_BASE means 'in behalf of ToInteger'
- *              RetInteger      - Where the converted integer is returned
+ * PARAMETERS:  String                  - Null terminated string
+ *              Base                    - Radix of the string: 16 or 10 or
+ *                                        ACPI_ANY_BASE
+ *              MaxIntegerByteWidth     - Maximum allowable integer,in bytes:
+ *                                        4 or 8 (32 or 64 bits)
+ *              RetInteger              - Where the converted integer is
+ *                                        returned
  *
  * RETURN:      Status and Converted value
  *
  * DESCRIPTION: Convert a string into an unsigned value. Performs either a
- *              32-bit or 64-bit conversion, depending on the current mode
- *              of the interpreter.
+ *              32-bit or 64-bit conversion, depending on the input integer
+ *              size (often the current mode of the interpreter).
  *
- * NOTES:       AcpiGbl_IntegerByteWidth should be set to the proper width.
+ * NOTES:       Negative numbers are not supported, as they are not supported
+ *              by ACPI.
+ *
+ *              AcpiGbl_IntegerByteWidth should be set to the proper width.
  *              For the core ACPICA code, this width depends on the DSDT
- *              version. For iASL, the default byte width is always 8.
+ *              version. For iASL, the default byte width is always 8 for the
+ *              parser, but error checking is performed later to flag cases
+ *              where a 64-bit constant is defined in a 32-bit DSDT/SSDT.
  *
  *              Does not support Octal strings, not needed at this time.
  *
- *              There is an earlier version of the function after this one,
- *              below. It is slightly different than this one, and the two
- *              may eventually may need to be merged. (01/2016).
- *
  ******************************************************************************/
 
 ACPI_STATUS
 AcpiUtStrtoul64 (
     char                    *String,
     UINT32                  Base,
+    UINT32                  MaxIntegerByteWidth,
     UINT64                  *RetInteger)
 {
     UINT32                  ThisDigit = 0;
     UINT64                  ReturnValue = 0;
     UINT64                  Quotient;
     UINT64                  Dividend;
-    UINT32                  ToIntegerOp = (Base == ACPI_ANY_BASE);
-    UINT32                  Mode32 = (AcpiGbl_IntegerByteWidth == 4);
     UINT8                   ValidDigits = 0;
     UINT8                   SignOf0x = 0;
     UINT8                   Term = 0;
@@ -362,6 +365,7 @@ AcpiUtStrtoul64 (
     switch (Base)
     {
     case ACPI_ANY_BASE:
+    case 10:
     case 16:
 
         break;
@@ -385,10 +389,10 @@ AcpiUtStrtoul64 (
         String++;
     }
 
-    if (ToIntegerOp)
+    if (Base == ACPI_ANY_BASE)
     {
         /*
-         * Base equal to ACPI_ANY_BASE means 'ToInteger operation case'.
+         * Base equal to ACPI_ANY_BASE means 'Either decimal or hex'.
          * We need to determine if it is decimal or hexadecimal.
          */
         if ((*String == '0') && (tolower ((int) *(String + 1)) == 'x'))
@@ -409,7 +413,7 @@ AcpiUtStrtoul64 (
 
     if (!(*String) || isspace ((int) *String) || *String == '\t')
     {
-        if (ToIntegerOp)
+        if (Base == ACPI_ANY_BASE)
         {
             goto ErrorExit;
         }
@@ -420,10 +424,11 @@ AcpiUtStrtoul64 (
     }
 
     /*
-     * Perform a 32-bit or 64-bit conversion, depending upon the current
-     * execution mode of the interpreter
+     * Perform a 32-bit or 64-bit conversion, depending upon the input
+     * byte width
      */
-    Dividend = (Mode32) ? ACPI_UINT32_MAX : ACPI_UINT64_MAX;
+    Dividend = (MaxIntegerByteWidth <= ACPI_MAX32_BYTE_WIDTH) ?
+        ACPI_UINT32_MAX : ACPI_UINT64_MAX;
 
     /* Main loop: convert the string to a 32- or 64-bit integer */
 
@@ -458,7 +463,7 @@ AcpiUtStrtoul64 (
 
         if (Term)
         {
-            if (ToIntegerOp)
+            if (Base == ACPI_ANY_BASE)
             {
                 goto ErrorExit;
             }
@@ -476,11 +481,12 @@ AcpiUtStrtoul64 (
 
         ValidDigits++;
 
-        if (SignOf0x && ((ValidDigits > 16) || ((ValidDigits > 8) && Mode32)))
+        if (SignOf0x && ((ValidDigits > 16) ||
+            ((ValidDigits > 8) && (MaxIntegerByteWidth <= ACPI_MAX32_BYTE_WIDTH))))
         {
             /*
              * This is ToInteger operation case.
-             * No any restrictions for string-to-integer conversion,
+             * No restrictions for string-to-integer conversion,
              * see ACPI spec.
              */
             goto ErrorExit;
@@ -493,7 +499,7 @@ AcpiUtStrtoul64 (
 
         if (ReturnValue > Quotient)
         {
-            if (ToIntegerOp)
+            if (Base == ACPI_ANY_BASE)
             {
                 goto ErrorExit;
             }
@@ -520,7 +526,8 @@ AllDone:
 
 
 ErrorExit:
-    /* Base was set/validated above */
+
+    /* Base was set/validated above (10 or 16) */
 
     if (Base == 10)
     {
@@ -532,9 +539,9 @@ ErrorExit:
     }
 }
 
+
 #ifdef _OBSOLETE_FUNCTIONS
-/* TBD: use version in ACPICA main code base? */
-/* DONE: 01/2016 */
+/* Removed: 01/2016 */
 
 /*******************************************************************************
  *
diff --git a/src/acpica/source/components/utilities/utprint.c b/src/acpica/source/components/utilities/utprint.c
index 848a46d..5ca859e 100644
--- a/src/acpica/source/components/utilities/utprint.c
+++ b/src/acpica/source/components/utilities/utprint.c
@@ -160,12 +160,6 @@ AcpiUtPutNumber (
     BOOLEAN                 Upper);
 
 
-/* Module globals */
-
-static const char           AcpiGbl_LowerHexDigits[] = "0123456789abcdef";
-static const char           AcpiGbl_UpperHexDigits[] = "0123456789ABCDEF";
-
-
 /*******************************************************************************
  *
  * FUNCTION:    AcpiUtBoundStringLength
diff --git a/src/acpica/source/components/utilities/uttrack.c b/src/acpica/source/components/utilities/uttrack.c
index 7808ed5..cd3495f 100644
--- a/src/acpica/source/components/utilities/uttrack.c
+++ b/src/acpica/source/components/utilities/uttrack.c
@@ -172,7 +172,7 @@ AcpiUtRemoveAllocation (
 
 ACPI_STATUS
 AcpiUtCreateList (
-    char                    *ListName,
+    const char              *ListName,
     UINT16                  ObjectSize,
     ACPI_MEMORY_LIST        **ReturnCache)
 {
diff --git a/src/acpica/source/components/utilities/utxfinit.c b/src/acpica/source/components/utilities/utxfinit.c
index 1513ea6..c6a26d9 100644
--- a/src/acpica/source/components/utilities/utxfinit.c
+++ b/src/acpica/source/components/utilities/utxfinit.c
@@ -240,25 +240,6 @@ AcpiEnableSubsystem (
      */
     AcpiGbl_EarlyInitialization = FALSE;
 
-    /*
-     * Install the default operation region handlers. These are the
-     * handlers that are defined by the ACPI specification to be
-     * "always accessible" -- namely, SystemMemory, SystemIO, and
-     * PCI_Config. This also means that no _REG methods need to be
-     * run for these address spaces. We need to have these handlers
-     * installed before any AML code can be executed, especially any
-     * module-level code (11/2015).
-     */
-    if (!AcpiGbl_GroupModuleLevelCode)
-    {
-        Status = AcpiEvInstallRegionHandlers ();
-        if (ACPI_FAILURE (Status))
-        {
-            ACPI_EXCEPTION ((AE_INFO, Status, "During Region initialization"));
-            return_ACPI_STATUS (Status);
-        }
-    }
-
 #if (!ACPI_REDUCED_HARDWARE)
 
     /* Enable ACPI mode */
@@ -387,27 +368,23 @@ AcpiInitializeObjects (
     if (AcpiGbl_GroupModuleLevelCode)
     {
         AcpiNsExecModuleCodeList ();
-    }
 
-    /*
-     * Initialize the objects that remain uninitialized. This runs the
-     * executable AML that may be part of the declaration of these objects:
-     * OperationRegions, BufferFields, Buffers, and Packages.
-     */
-    if (!(Flags & ACPI_NO_OBJECT_INIT))
-    {
-        ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
-            "[Init] Completing Initialization of ACPI Objects\n"));
-
-        Status = AcpiNsInitializeObjects ();
-        if (ACPI_FAILURE (Status))
+        /*
+         * Initialize the objects that remain uninitialized. This
+         * runs the executable AML that may be part of the
+         * declaration of these objects:
+         * OperationRegions, BufferFields, Buffers, and Packages.
+         */
+        if (!(Flags & ACPI_NO_OBJECT_INIT))
         {
-            return_ACPI_STATUS (Status);
+            Status = AcpiNsInitializeObjects ();
+            if (ACPI_FAILURE (Status))
+            {
+                return_ACPI_STATUS (Status);
+            }
         }
     }
 
-    AcpiGbl_NamespaceInitialized = TRUE;
-
     /*
      * Initialize all device/region objects in the namespace. This runs
      * the device _STA and _INI methods and region _REG methods.
diff --git a/src/acpica/source/include/acdebug.h b/src/acpica/source/include/acdebug.h
index b2083f0..a8c95ad 100644
--- a/src/acpica/source/include/acdebug.h
+++ b/src/acpica/source/include/acdebug.h
@@ -127,7 +127,7 @@
 
 typedef struct acpi_db_command_info
 {
-    char                    *Name;          /* Command Name */
+    const char              *Name;          /* Command Name */
     UINT8                   MinArgs;        /* Minimum arguments required */
 
 } ACPI_DB_COMMAND_INFO;
@@ -142,7 +142,7 @@ typedef struct acpi_db_command_help
 
 typedef struct acpi_db_argument_info
 {
-    char                    *Name;          /* Argument Name */
+    const char              *Name;          /* Argument Name */
 
 } ACPI_DB_ARGUMENT_INFO;
 
diff --git a/src/acpica/source/include/acdisasm.h b/src/acpica/source/include/acdisasm.h
index f949a8b..b62568d 100644
--- a/src/acpica/source/include/acdisasm.h
+++ b/src/acpica/source/include/acdisasm.h
@@ -391,6 +391,7 @@ extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort3[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort3a[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort3b[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort3c[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort4[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIortAcc[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIortHdr[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIortMap[];
@@ -880,22 +881,22 @@ AcpiDmGetExternalsFromFile (
 void
 AcpiDmDumpInteger8 (
     UINT8                   Value,
-    char                    *Name);
+    const char              *Name);
 
 void
 AcpiDmDumpInteger16 (
     UINT16                  Value,
-    char                    *Name);
+    const char              *Name);
 
 void
 AcpiDmDumpInteger32 (
     UINT32                  Value,
-    char                    *Name);
+    const char              *Name);
 
 void
 AcpiDmDumpInteger64 (
     UINT64                  Value,
-    char                    *Name);
+    const char              *Name);
 
 void
 AcpiDmResourceTemplate (
@@ -1007,7 +1008,7 @@ AcpiDmSerialBusDescriptor (
 
 void
 AcpiDmVendorCommon (
-    char                    *Name,
+    const char              *Name,
     UINT8                   *ByteData,
     UINT32                  Length,
     UINT32                  Level);
diff --git a/src/acpica/source/include/acevents.h b/src/acpica/source/include/acevents.h
index d88f8b8..912c940 100644
--- a/src/acpica/source/include/acevents.h
+++ b/src/acpica/source/include/acevents.h
@@ -345,10 +345,6 @@ AcpiEvDetachRegion (
     BOOLEAN                 AcpiNsIsLocked);
 
 void
-AcpiEvAssociateRegMethod (
-    ACPI_OPERAND_OBJECT     *RegionObj);
-
-void
 AcpiEvExecuteRegMethods (
     ACPI_NAMESPACE_NODE     *Node,
     ACPI_ADR_SPACE_TYPE     SpaceId,
diff --git a/src/acpica/source/include/acglobal.h b/src/acpica/source/include/acglobal.h
index 86e9eb9..67a1672 100644
--- a/src/acpica/source/include/acglobal.h
+++ b/src/acpica/source/include/acglobal.h
@@ -261,6 +261,8 @@ extern const char                      *AcpiGbl_SleepStateNames[ACPI_S_STATE_COU
 extern const char                      *AcpiGbl_LowestDstateNames[ACPI_NUM_SxW_METHODS];
 extern const char                      *AcpiGbl_HighestDstateNames[ACPI_NUM_SxD_METHODS];
 extern const char                      *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
+extern const char                       AcpiGbl_LowerHexDigits[];
+extern const char                       AcpiGbl_UpperHexDigits[];
 extern const ACPI_OPCODE_INFO           AcpiGbl_AmlOpInfo[AML_NUM_OPCODES];
 
 
@@ -442,6 +444,14 @@ ACPI_GLOBAL (ACPI_MUTEX,                AcpiGbl_DbCommandComplete);
 
 #endif /* ACPI_DEBUGGER */
 
+#if defined (ACPI_DISASSEMBLER) || defined (ACPI_ASL_COMPILER)
+
+ACPI_GLOBAL (const char,                *AcpiGbl_PldPanelList[]);
+ACPI_GLOBAL (const char,                *AcpiGbl_PldVerticalPositionList[]);
+ACPI_GLOBAL (const char,                *AcpiGbl_PldHorizontalPositionList[]);
+ACPI_GLOBAL (const char,                *AcpiGbl_PldShapeList[]);
+
+#endif
 
 /*****************************************************************************
  *
diff --git a/src/acpica/source/include/acinterp.h b/src/acpica/source/include/acinterp.h
index 4029b14..3abfdb0 100644
--- a/src/acpica/source/include/acinterp.h
+++ b/src/acpica/source/include/acinterp.h
@@ -141,7 +141,7 @@ typedef const struct acpi_exdump_info
 {
     UINT8                   Opcode;
     UINT8                   Offset;
-    char                    *Name;
+    const char              *Name;
 
 } ACPI_EXDUMP_INFO;
 
diff --git a/src/acpica/source/include/aclocal.h b/src/acpica/source/include/aclocal.h
index 383555a..39bad5b 100644
--- a/src/acpica/source/include/aclocal.h
+++ b/src/acpica/source/include/aclocal.h
@@ -1357,6 +1357,7 @@ typedef struct acpi_external_list
 #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 */
+#define ACPI_EXT_ORIGIN_FROM_OPCODE         0x10    /* External came from a External() opcode */
 
 
 typedef struct acpi_external_file
diff --git a/src/acpica/source/include/acmacros.h b/src/acpica/source/include/acmacros.h
index 65d56c2..529a285 100644
--- a/src/acpica/source/include/acmacros.h
+++ b/src/acpica/source/include/acmacros.h
@@ -336,6 +336,10 @@
 
 #define ACPI_IS_MISALIGNED(value)           (((ACPI_SIZE) value) & (sizeof(ACPI_SIZE)-1))
 
+/* Generic (power-of-two) rounding */
+
+#define ACPI_IS_POWER_OF_TWO(a)             (((a) & ((a) - 1)) == 0)
+
 /*
  * Bitmask creation
  * Bit positions start at zero.
diff --git a/src/acpica/source/include/acnamesp.h b/src/acpica/source/include/acnamesp.h
index 7141d51..2c43486 100644
--- a/src/acpica/source/include/acnamesp.h
+++ b/src/acpica/source/include/acnamesp.h
@@ -330,14 +330,14 @@ AcpiNsDumpEntry (
 void
 AcpiNsDumpPathname (
     ACPI_HANDLE             Handle,
-    char                    *Msg,
+    const char              *Msg,
     UINT32                  Level,
     UINT32                  Component);
 
 void
 AcpiNsPrintPathname (
     UINT32                  NumSegments,
-    char                    *Pathname);
+    const char              *Pathname);
 
 ACPI_STATUS
 AcpiNsDumpOneObject (
diff --git a/src/acpica/source/include/acparser.h b/src/acpica/source/include/acparser.h
index 09b6bfd..406b0f3 100644
--- a/src/acpica/source/include/acparser.h
+++ b/src/acpica/source/include/acparser.h
@@ -243,7 +243,7 @@ const ACPI_OPCODE_INFO *
 AcpiPsGetOpcodeInfo (
     UINT16                  Opcode);
 
-char *
+const char *
 AcpiPsGetOpcodeName (
     UINT16                  Opcode);
 
diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
index cad585b..b9ef5df 100644
--- a/src/acpica/source/include/acpixf.h
+++ b/src/acpica/source/include/acpixf.h
@@ -118,7 +118,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20160212
+#define ACPI_CA_VERSION                 0x20160318
 
 #include "acconfig.h"
 #include "actypes.h"
diff --git a/src/acpica/source/include/acresrc.h b/src/acpica/source/include/acresrc.h
index 7110cb9..5c63854 100644
--- a/src/acpica/source/include/acresrc.h
+++ b/src/acpica/source/include/acresrc.h
@@ -203,7 +203,7 @@ typedef const struct acpi_rsdump_info
 {
     UINT8                   Opcode;
     UINT8                   Offset;
-    char                    *Name;
+    const char              *Name;
     const char              **Pointer;
 
 } ACPI_RSDUMP_INFO;
@@ -300,7 +300,7 @@ AcpiRsGetPrsMethodData (
 ACPI_STATUS
 AcpiRsGetMethodData (
     ACPI_HANDLE             Handle,
-    char                    *Path,
+    const char              *Path,
     ACPI_BUFFER             *RetBuffer);
 
 ACPI_STATUS
diff --git a/src/acpica/source/include/acstruct.h b/src/acpica/source/include/acstruct.h
index a9624d9..e823eae 100644
--- a/src/acpica/source/include/acstruct.h
+++ b/src/acpica/source/include/acstruct.h
@@ -274,7 +274,7 @@ typedef struct acpi_evaluate_info
     /* The first 3 elements are passed by the caller to AcpiNsEvaluate */
 
     ACPI_NAMESPACE_NODE             *PrefixNode;        /* Input: starting node */
-    char                            *RelativePathname;  /* Input: path relative to PrefixNode */
+    const char                      *RelativePathname;  /* Input: path relative to PrefixNode */
     ACPI_OPERAND_OBJECT             **Parameters;       /* Input: argument list */
 
     ACPI_NAMESPACE_NODE             *Node;              /* Resolved node (PrefixNode:RelativePathname) */
diff --git a/src/acpica/source/include/actbl.h b/src/acpica/source/include/actbl.h
index 6cc4dbf..65261e1 100644
--- a/src/acpica/source/include/actbl.h
+++ b/src/acpica/source/include/actbl.h
@@ -521,4 +521,6 @@ typedef struct acpi_table_desc
 #define ACPI_FADT_V5_SIZE       (UINT32) (ACPI_FADT_OFFSET (HypervisorId))
 #define ACPI_FADT_V6_SIZE       (UINT32) (sizeof (ACPI_TABLE_FADT))
 
+#define ACPI_FADT_CONFORMANCE   "ACPI 6.1 (FADT version 6)"
+
 #endif /* __ACTBL_H__ */
diff --git a/src/acpica/source/include/actbl1.h b/src/acpica/source/include/actbl1.h
index 4e3f84c..edca747 100644
--- a/src/acpica/source/include/actbl1.h
+++ b/src/acpica/source/include/actbl1.h
@@ -653,7 +653,11 @@ enum AcpiHestNotifyTypes
     ACPI_HEST_NOTIFY_NMI        = 4,
     ACPI_HEST_NOTIFY_CMCI       = 5,    /* ACPI 5.0 */
     ACPI_HEST_NOTIFY_MCE        = 6,    /* ACPI 5.0 */
-    ACPI_HEST_NOTIFY_RESERVED   = 7     /* 7 and greater are reserved */
+    ACPI_HEST_NOTIFY_GPIO       = 7,    /* ACPI 6.0 */
+    ACPI_HEST_NOTIFY_SEA        = 8,    /* ACPI 6.1 */
+    ACPI_HEST_NOTIFY_SEI        = 9,    /* ACPI 6.1 */
+    ACPI_HEST_NOTIFY_GSIV       = 10,   /* ACPI 6.1 */
+    ACPI_HEST_NOTIFY_RESERVED   = 11    /* 11 and greater are reserved */
 };
 
 /* Values for ConfigWriteEnable bitfield above */
@@ -826,10 +830,38 @@ typedef struct acpi_hest_generic_data
     UINT32                  ErrorDataLength;
     UINT8                   FruId[16];
     UINT8                   FruText[20];
-    UINT64                  TimeStamp;
 
 } ACPI_HEST_GENERIC_DATA;
 
+/* Extension for revision 0x0300 */
+
+typedef struct acpi_hest_generic_data_v300
+{
+    UINT8                   SectionType[16];
+    UINT32                  ErrorSeverity;
+    UINT16                  Revision;
+    UINT8                   ValidationBits;
+    UINT8                   Flags;
+    UINT32                  ErrorDataLength;
+    UINT8                   FruId[16];
+    UINT8                   FruText[20];
+    UINT64                  TimeStamp;
+
+} ACPI_HEST_GENERIC_DATA_V300;
+
+/* Values for ErrorSeverity above */
+
+#define ACPI_HEST_GEN_ERROR_RECOVERABLE     0
+#define ACPI_HEST_GEN_ERROR_FATAL           1
+#define ACPI_HEST_GEN_ERROR_CORRECTED       2
+#define ACPI_HEST_GEN_ERROR_NONE            3
+
+/* Flags for ValidationBits above */
+
+#define ACPI_HEST_GEN_VALID_FRU_ID          (1)
+#define ACPI_HEST_GEN_VALID_FRU_STRING      (1<<1)
+#define ACPI_HEST_GEN_VALID_TIMESTAMP       (1<<2)
+
 
 /*******************************************************************************
  *
@@ -1192,7 +1224,7 @@ typedef struct acpi_msct_proximity
 
 /*******************************************************************************
  *
- * NFIT - NVDIMM Interface Table (ACPI 6.0)
+ * NFIT - NVDIMM Interface Table (ACPI 6.0+)
  *        Version 1
  *
  ******************************************************************************/
@@ -1324,7 +1356,10 @@ typedef struct acpi_nfit_control_region
     UINT16                  SubsystemVendorId;
     UINT16                  SubsystemDeviceId;
     UINT16                  SubsystemRevisionId;
-    UINT8                   Reserved[6];        /* Reserved, must be zero */
+    UINT8                   ValidFields;
+    UINT8                   ManufacturingLocation;
+    UINT16                  ManufacturingDate;
+    UINT8                   Reserved[2];        /* Reserved, must be zero */
     UINT32                  SerialNumber;
     UINT16                  Code;
     UINT16                  Windows;
@@ -1340,7 +1375,11 @@ typedef struct acpi_nfit_control_region
 
 /* Flags */
 
-#define ACPI_NFIT_CONTROL_BUFFERED      (1)     /* Block Data Windows implementation is buffered */
+#define ACPI_NFIT_CONTROL_BUFFERED          (1)     /* Block Data Windows implementation is buffered */
+
+/* ValidFields bits */
+
+#define ACPI_NFIT_CONTROL_MFG_INFO_VALID    (1)     /* Manufacturing fields are valid */
 
 
 /* 5: NVDIMM Block Data Window Region Structure */
diff --git a/src/acpica/source/include/actbl2.h b/src/acpica/source/include/actbl2.h
index d3e9055..35707a2 100644
--- a/src/acpica/source/include/actbl2.h
+++ b/src/acpica/source/include/actbl2.h
@@ -436,7 +436,7 @@ typedef struct acpi_csrt_descriptor
  * DBG2 - Debug Port Table 2
  *        Version 0 (Both main table and subtables)
  *
- * Conforms to "Microsoft Debug Port Table 2 (DBG2)", May 22 2012.
+ * Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015
  *
  ******************************************************************************/
 
@@ -493,6 +493,11 @@ typedef struct acpi_dbg2_device
 
 #define ACPI_DBG2_16550_COMPATIBLE  0x0000
 #define ACPI_DBG2_16550_SUBSET      0x0001
+#define ACPI_DBG2_ARM_PL011         0x0003
+#define ACPI_DBG2_ARM_SBSA_32BIT    0x000D
+#define ACPI_DBG2_ARM_SBSA_GENERIC  0x000E
+#define ACPI_DBG2_ARM_DCC           0x000F
+#define ACPI_DBG2_BCM2835           0x0010
 
 #define ACPI_DBG2_1394_STANDARD     0x0000
 
@@ -525,7 +530,7 @@ typedef struct acpi_table_dbgp
  *        Version 1
  *
  * Conforms to "Intel Virtualization Technology for Directed I/O",
- * Version 2.2, Sept. 2013
+ * Version 2.3, October 2014
  *
  ******************************************************************************/
 
@@ -541,6 +546,8 @@ typedef struct acpi_table_dmar
 /* Masks for Flags field above */
 
 #define ACPI_DMAR_INTR_REMAP        (1)
+#define ACPI_DMAR_X2APIC_OPT_OUT    (1<<1)
+#define ACPI_DMAR_X2APIC_MODE       (1<<2)
 
 
 /* DMAR subtable header */
@@ -829,7 +836,7 @@ typedef struct acpi_ibft_target
  * IORT - IO Remapping Table
  *
  * Conforms to "IO Remapping Table System Software on ARM Platforms",
- * Document number: ARM DEN 0049A, 2015
+ * Document number: ARM DEN 0049B, October 2015
  *
  ******************************************************************************/
 
@@ -865,7 +872,8 @@ enum AcpiIortNodeType
     ACPI_IORT_NODE_ITS_GROUP            = 0x00,
     ACPI_IORT_NODE_NAMED_COMPONENT      = 0x01,
     ACPI_IORT_NODE_PCI_ROOT_COMPLEX     = 0x02,
-    ACPI_IORT_NODE_SMMU                 = 0x03
+    ACPI_IORT_NODE_SMMU                 = 0x03,
+    ACPI_IORT_NODE_SMMU_V3              = 0x04
 };
 
 
@@ -974,6 +982,26 @@ typedef struct acpi_iort_smmu
 #define ACPI_IORT_SMMU_COHERENT_WALK    (1<<1)
 
 
+typedef struct acpi_iort_smmu_v3
+{
+    UINT64                  BaseAddress;            /* SMMUv3 base address */
+    UINT32                  Flags;
+    UINT32                  Reserved;
+    UINT64                  VatosAddress;
+    UINT32                  Model;                 /* O: generic SMMUv3 */
+    UINT32                  EventGsiv;
+    UINT32                  PriGsiv;
+    UINT32                  GerrGsiv;
+    UINT32                  SyncGsiv;
+
+} ACPI_IORT_SMMU_V3;
+
+/* Masks for Flags field above */
+
+#define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE   (1)
+#define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE     (1<<1)
+
+
 /*******************************************************************************
  *
  * IVRS - I/O Virtualization Reporting Structure
@@ -1356,10 +1384,10 @@ typedef struct acpi_table_slic
 /*******************************************************************************
  *
  * SPCR - Serial Port Console Redirection table
- *        Version 1
+ *        Version 2
  *
  * Conforms to "Serial Port Console Redirection Table",
- * Version 1.00, January 11, 2002
+ * Version 1.03, August 10, 2015
  *
  ******************************************************************************/
 
@@ -1393,6 +1421,8 @@ typedef struct acpi_table_spcr
 
 #define ACPI_SPCR_DO_NOT_DISABLE    (1)
 
+/* Values for Interface Type: See the definition of the DBG2 table */
+
 
 /*******************************************************************************
  *
diff --git a/src/acpica/source/include/actbl3.h b/src/acpica/source/include/actbl3.h
index 14b0a8a..933a155 100644
--- a/src/acpica/source/include/actbl3.h
+++ b/src/acpica/source/include/actbl3.h
@@ -277,7 +277,7 @@ typedef struct acpi_table_fpdt
 } ACPI_TABLE_FPDT;
 
 
-/* FPDT subtable header */
+/* FPDT subtable header (Performance Record Structure) */
 
 typedef struct acpi_fpdt_header
 {
@@ -302,33 +302,29 @@ enum AcpiFpdtType
 
 /* 0: Firmware Basic Boot Performance Record */
 
-typedef struct acpi_fpdt_boot
+typedef struct acpi_fpdt_boot_pointer
 {
     ACPI_FPDT_HEADER        Header;
     UINT8                   Reserved[4];
-    UINT64                  ResetEnd;
-    UINT64                  LoadStart;
-    UINT64                  StartupStart;
-    UINT64                  ExitServicesEntry;
-    UINT64                  ExitServicesExit;
+    UINT64                  Address;
 
-} ACPI_FPDT_BOOT;
+} ACPI_FPDT_BOOT_POINTER;
 
 
 /* 1: S3 Performance Table Pointer Record */
 
-typedef struct acpi_fpdt_s3pt_ptr
+typedef struct acpi_fpdt_s3pt_pointer
 {
     ACPI_FPDT_HEADER        Header;
     UINT8                   Reserved[4];
     UINT64                  Address;
 
-} ACPI_FPDT_S3PT_PTR;
+} ACPI_FPDT_S3PT_POINTER;
 
 
 /*
  * S3PT - S3 Performance Table. This table is pointed to by the
- * FPDT S3 Pointer Record above.
+ * S3 Pointer Record above.
  */
 typedef struct acpi_table_s3pt
 {
@@ -339,27 +335,21 @@ typedef struct acpi_table_s3pt
 
 
 /*
- * S3PT Subtables
+ * S3PT Subtables (Not part of the actual FPDT)
  */
-typedef struct acpi_s3pt_header
-{
-    UINT16                  Type;
-    UINT8                   Length;
-    UINT8                   Revision;
 
-} ACPI_S3PT_HEADER;
-
-/* Values for Type field above */
+/* Values for Type field in S3PT header */
 
 enum AcpiS3ptType
 {
     ACPI_S3PT_TYPE_RESUME               = 0,
-    ACPI_S3PT_TYPE_SUSPEND              = 1
+    ACPI_S3PT_TYPE_SUSPEND              = 1,
+    ACPI_FPDT_BOOT_PERFORMANCE          = 2
 };
 
 typedef struct acpi_s3pt_resume
 {
-    ACPI_S3PT_HEADER        Header;
+    ACPI_FPDT_HEADER        Header;
     UINT32                  ResumeCount;
     UINT64                  FullResume;
     UINT64                  AverageResume;
@@ -368,13 +358,29 @@ typedef struct acpi_s3pt_resume
 
 typedef struct acpi_s3pt_suspend
 {
-    ACPI_S3PT_HEADER        Header;
+    ACPI_FPDT_HEADER        Header;
     UINT64                  SuspendStart;
     UINT64                  SuspendEnd;
 
 } ACPI_S3PT_SUSPEND;
 
 
+/*
+ * FPDT Boot Performance Record (Not part of the actual FPDT)
+ */
+typedef struct acpi_fpdt_boot
+{
+    ACPI_FPDT_HEADER        Header;
+    UINT8                   Reserved[4];
+    UINT64                  ResetEnd;
+    UINT64                  LoadStart;
+    UINT64                  StartupStart;
+    UINT64                  ExitServicesEntry;
+    UINT64                  ExitServicesExit;
+
+} ACPI_FPDT_BOOT;
+
+
 /*******************************************************************************
  *
  * GTDT - Generic Timer Description Table (ACPI 5.1)
diff --git a/src/acpica/source/include/actypes.h b/src/acpica/source/include/actypes.h
index 5f85dd8..039d71a 100644
--- a/src/acpica/source/include/actypes.h
+++ b/src/acpica/source/include/actypes.h
@@ -1106,7 +1106,7 @@ typedef struct acpi_buffer
  */
 typedef struct acpi_predefined_names
 {
-    char                            *Name;
+    const char                      *Name;
     UINT8                           Type;
     char                            *Val;
 
@@ -1397,7 +1397,7 @@ typedef struct acpi_mem_space_context
  */
 typedef struct acpi_memory_list
 {
-    char                            *ListName;
+    const char                      *ListName;
     void                            *ListHead;
     UINT16                          ObjectSize;
     UINT16                          MaxDepth;
diff --git a/src/acpica/source/include/acutils.h b/src/acpica/source/include/acutils.h
index 08dc928..90069f5 100644
--- a/src/acpica/source/include/acutils.h
+++ b/src/acpica/source/include/acutils.h
@@ -266,8 +266,14 @@ ACPI_STATUS
 AcpiUtStrtoul64 (
     char                    *String,
     UINT32                  Base,
+    UINT32                  MaxIntegerByteWidth,
     UINT64                  *RetInteger);
 
+/* Values for MaxIntegerByteWidth above */
+
+#define ACPI_MAX32_BYTE_WIDTH       4
+#define ACPI_MAX64_BYTE_WIDTH       8
+
 
 /*
  * utglobal - Global data structures and procedures
@@ -413,7 +419,7 @@ AcpiUtTracePtr (
     const char              *FunctionName,
     const char              *ModuleName,
     UINT32                  ComponentId,
-    void                    *Pointer);
+    const void              *Pointer);
 
 void
 AcpiUtTraceU32 (
@@ -429,7 +435,7 @@ AcpiUtTraceStr (
     const char              *FunctionName,
     const char              *ModuleName,
     UINT32                  ComponentId,
-    char                    *String);
+    const char              *String);
 
 void
 AcpiUtExit (
@@ -532,13 +538,13 @@ AcpiUtDeleteInternalObjectList (
 ACPI_STATUS
 AcpiUtEvaluateObject (
     ACPI_NAMESPACE_NODE     *PrefixNode,
-    char                    *Path,
+    const char              *Path,
     UINT32                  ExpectedReturnBtypes,
     ACPI_OPERAND_OBJECT     **ReturnDesc);
 
 ACPI_STATUS
 AcpiUtEvaluateNumericObject (
-    char                    *ObjectName,
+    const char              *ObjectName,
     ACPI_NAMESPACE_NODE     *DeviceNode,
     UINT64                  *Value);
 
@@ -829,7 +835,7 @@ void
 AcpiUtDisplayInitPathname (
     UINT8                   Type,
     ACPI_NAMESPACE_NODE     *ObjHandle,
-    char                    *Path);
+    const char              *Path);
 #endif
 
 
@@ -1006,7 +1012,7 @@ AcpiUtDumpAllocations (
 
 ACPI_STATUS
 AcpiUtCreateList (
-    char                    *ListName,
+    const char              *ListName,
     UINT16                  ObjectSize,
     ACPI_MEMORY_LIST        **ReturnCache);
 
diff --git a/src/acpica/source/include/platform/acenv.h b/src/acpica/source/include/platform/acenv.h
index 63076ab..7a72456 100644
--- a/src/acpica/source/include/platform/acenv.h
+++ b/src/acpica/source/include/platform/acenv.h
@@ -139,17 +139,28 @@
  *
  *****************************************************************************/
 
+/* Common application configuration. All single threaded except for AcpiExec. */
+
+#if (defined ACPI_ASL_COMPILER) || \
+    (defined ACPI_BIN_APP)      || \
+    (defined ACPI_DUMP_APP)     || \
+    (defined ACPI_HELP_APP)     || \
+    (defined ACPI_NAMES_APP)    || \
+    (defined ACPI_SRC_APP)      || \
+    (defined ACPI_XTRACT_APP)   || \
+    (defined ACPI_EXAMPLE_APP)
+#define ACPI_APPLICATION
+#define ACPI_SINGLE_THREADED
+#endif
+
 /* iASL configuration */
 
 #ifdef ACPI_ASL_COMPILER
-#define ACPI_APPLICATION
 #define ACPI_DEBUG_OUTPUT
 #define ACPI_CONSTANT_EVAL_ONLY
 #define ACPI_LARGE_NAMESPACE_NODE
 #define ACPI_DATA_TABLE_DISASSEMBLY
-#define ACPI_SINGLE_THREADED
 #define ACPI_32BIT_PHYSICAL_ADDRESS
-
 #define ACPI_DISASSEMBLER 1
 #endif
 
@@ -162,21 +173,6 @@
 #define ACPI_DBG_TRACK_ALLOCATIONS
 #endif
 
-/*
- * AcpiBin/AcpiDump/AcpiHelp/AcpiNames/AcpiSrc/AcpiXtract/Example
- * configuration. All single threaded.
- */
-#if (defined ACPI_BIN_APP)      || \
-    (defined ACPI_DUMP_APP)     || \
-    (defined ACPI_HELP_APP)     || \
-    (defined ACPI_NAMES_APP)    || \
-    (defined ACPI_SRC_APP)      || \
-    (defined ACPI_XTRACT_APP)   || \
-    (defined ACPI_EXAMPLE_APP)
-#define ACPI_APPLICATION
-#define ACPI_SINGLE_THREADED
-#endif
-
 /* AcpiHelp configuration. Error messages disabled. */
 
 #ifdef ACPI_HELP_APP
@@ -211,11 +207,16 @@
 #define ACPI_REDUCED_HARDWARE 1
 #endif
 
-/* Linkable ACPICA library */
+/* Linkable ACPICA library. Two versions, one with full debug. */
 
 #ifdef ACPI_LIBRARY
 #define ACPI_USE_LOCAL_CACHE
-#define ACPI_FULL_DEBUG
+#define ACPI_DEBUGGER 1
+#define ACPI_DISASSEMBLER 1
+
+#ifdef _DEBUG
+#define ACPI_DEBUG_OUTPUT
+#endif
 #endif
 
 /* Common for all ACPICA applications */
@@ -290,6 +291,9 @@
 #elif defined(__HAIKU__)
 #include "achaiku.h"
 
+#elif defined(__QNX__)
+#include "acqnx.h"
+
 #else
 
 /* Unknown environment */
diff --git a/src/acpica/source/tools/acpiexec/aeinitfile.c b/src/acpica/source/tools/acpiexec/aeinitfile.c
index 31316d8..57c20dc 100644
--- a/src/acpica/source/tools/acpiexec/aeinitfile.c
+++ b/src/acpica/source/tools/acpiexec/aeinitfile.c
@@ -274,7 +274,8 @@ AeDoOneOverride (
 
     /* Extract the 64-bit integer */
 
-    Status = AcpiUtStrtoul64 (ValueString, 0, &Value);
+    Status = AcpiUtStrtoul64 (ValueString, ACPI_ANY_BASE,
+        ACPI_MAX64_BYTE_WIDTH, &Value);
     if (ACPI_FAILURE (Status))
     {
         AcpiOsPrintf ("%s %s\n", ValueString,
-- 
2.7.3




More information about the fwts-devel mailing list