diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2018-05-08 18:10:55 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2018-05-08 18:10:55 +0000 |
commit | c7fe43df360e722274513d9e47c1358a580c8a9b (patch) | |
tree | 3b6f20cad9ae91c9c0fbe664b1699f7e20c1faf4 | |
parent | 5dc04bcfd5c1bd0942e4a6640bf39d15f464af4f (diff) |
Import ACPICA 20180508.vendor/acpica/20180508
Notes
Notes:
svn path=/vendor-sys/acpica/dist/; revision=333378
svn path=/vendor-sys/acpica/20180508/; revision=333379; tag=vendor/acpica/20180508
-rw-r--r-- | changes.txt | 21 | ||||
-rw-r--r-- | source/components/executer/exconfig.c | 10 | ||||
-rw-r--r-- | source/components/namespace/nsinit.c | 82 | ||||
-rw-r--r-- | source/components/utilities/utbuffer.c | 4 | ||||
-rw-r--r-- | source/include/aclocal.h | 11 | ||||
-rw-r--r-- | source/include/acnamesp.h | 6 | ||||
-rw-r--r-- | source/include/acpixf.h | 2 | ||||
-rw-r--r-- | source/tools/acpibin/abmain.c | 1 | ||||
-rw-r--r-- | source/tools/acpixtract/acpixtract.h | 5 | ||||
-rw-r--r-- | source/tools/acpixtract/axutils.c | 10 |
10 files changed, 120 insertions, 32 deletions
diff --git a/changes.txt b/changes.txt index 906b336360d2..8273d37b2688 100644 --- a/changes.txt +++ b/changes.txt @@ -1,4 +1,25 @@ ---------------------------------------- +8 May 2018. Summary of changes for version 20180508: + + +1) ACPICA kernel-resident subsystem: + +Completed the new (recently deployed) package resolution mechanism for +the Load and LoadTable ASL/AML operators. This fixes a regression that +was introduced in version 20180209 that could result in an +AE_AML_INTERNAL exception during the loading of a dynamic ACPI/AML table +(SSDT) that contains package objects. + + +2) iASL Compiler/Disassembler and Tools: + +AcpiDump and AcpiXtract: Implemented support for ACPI tables larger than +1 MB. This change allows for table offsets within the acpidump file to be +up to 8 characters. These changes are backwards compatible with existing +acpidump files. + + +---------------------------------------- 27 April 2018. Summary of changes for version 20180427: diff --git a/source/components/executer/exconfig.c b/source/components/executer/exconfig.c index 2ae60f554e08..590d83661a2d 100644 --- a/source/components/executer/exconfig.c +++ b/source/components/executer/exconfig.c @@ -342,6 +342,11 @@ AcpiExLoadTableOp ( return_ACPI_STATUS (Status); } + /* Complete the initialization/resolution of package objects */ + + Status = AcpiNsWalkNamespace (ACPI_TYPE_PACKAGE, ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, 0, AcpiNsInitOnePackage, NULL, NULL, NULL); + /* Parameter Data (optional) */ if (ParameterNode) @@ -615,6 +620,11 @@ AcpiExLoadOp ( return_ACPI_STATUS (Status); } + /* Complete the initialization/resolution of package objects */ + + Status = AcpiNsWalkNamespace (ACPI_TYPE_PACKAGE, ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, 0, AcpiNsInitOnePackage, NULL, NULL, NULL); + /* Store the DdbHandle into the Target operand */ Status = AcpiExStore (DdbHandle, Target, WalkState); diff --git a/source/components/namespace/nsinit.c b/source/components/namespace/nsinit.c index dc76db9f6a70..dcfb41ed7d5d 100644 --- a/source/components/namespace/nsinit.c +++ b/source/components/namespace/nsinit.c @@ -408,6 +408,65 @@ ErrorExit: /******************************************************************************* * + * FUNCTION: AcpiNsInitOnePackage + * + * PARAMETERS: ObjHandle - Node + * Level - Current nesting level + * Context - Not used + * ReturnValue - Not used + * + * RETURN: Status + * + * DESCRIPTION: Callback from AcpiWalkNamespace. Invoked for every package + * within the namespace. Used during dynamic load of an SSDT. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiNsInitOnePackage ( + ACPI_HANDLE ObjHandle, + UINT32 Level, + void *Context, + void **ReturnValue) +{ + ACPI_STATUS Status; + ACPI_OPERAND_OBJECT *ObjDesc; + ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle; + + + ObjDesc = AcpiNsGetAttachedObject (Node); + if (!ObjDesc) + { + return (AE_OK); + } + + /* Exit if package is already initialized */ + + if (ObjDesc->Package.Flags & AOPOBJ_DATA_VALID) + { + return (AE_OK); + } + + Status = AcpiDsGetPackageArguments (ObjDesc); + if (ACPI_FAILURE (Status)) + { + return (AE_OK); + } + + Status = AcpiUtWalkPackageTree (ObjDesc, NULL, AcpiDsInitPackageElement, + NULL); + if (ACPI_FAILURE (Status)) + { + return (AE_OK); + } + + ObjDesc->Package.Flags |= AOPOBJ_DATA_VALID; + return (AE_OK); +} + + +/******************************************************************************* + * * FUNCTION: AcpiNsInitOneObject * * PARAMETERS: ObjHandle - Node @@ -533,27 +592,10 @@ AcpiNsInitOneObject ( case ACPI_TYPE_PACKAGE: - Info->PackageInit++; - Status = AcpiDsGetPackageArguments (ObjDesc); - if (ACPI_FAILURE (Status)) - { - break; - } - - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_PARSE, - "%s: Completing resolution of Package elements\n", - ACPI_GET_FUNCTION_NAME)); + /* Complete the initialization/resolution of the package object */ - /* - * Resolve all named references in package objects (and all - * sub-packages). This action has been deferred until the entire - * namespace has been loaded, in order to support external and - * forward references from individual package elements (05/2017). - */ - Status = AcpiUtWalkPackageTree (ObjDesc, NULL, - AcpiDsInitPackageElement, NULL); - - ObjDesc->Package.Flags |= AOPOBJ_DATA_VALID; + Info->PackageInit++; + Status = AcpiNsInitOnePackage (ObjHandle, Level, NULL, NULL); break; default: diff --git a/source/components/utilities/utbuffer.c b/source/components/utilities/utbuffer.c index 741742c4668f..83a5b3c5fa12 100644 --- a/source/components/utilities/utbuffer.c +++ b/source/components/utilities/utbuffer.c @@ -205,7 +205,7 @@ AcpiUtDumpBuffer ( { /* Print current offset */ - AcpiOsPrintf ("%6.4X: ", (BaseOffset + i)); + AcpiOsPrintf ("%8.4X: ", (BaseOffset + i)); /* Print 16 hex chars */ @@ -387,7 +387,7 @@ AcpiUtDumpBufferToFile ( { /* Print current offset */ - fprintf (File, "%6.4X: ", (BaseOffset + i)); + fprintf (File, "%8.4X: ", (BaseOffset + i)); /* Print 16 hex chars */ diff --git a/source/include/aclocal.h b/source/include/aclocal.h index f487a4ec9bf0..d92e6bbd76ff 100644 --- a/source/include/aclocal.h +++ b/source/include/aclocal.h @@ -284,7 +284,7 @@ typedef enum * DescriptorType is used to differentiate between internal descriptors. * * The node is optimized for both 32-bit and 64-bit platforms: - * 20 bytes for the 32-bit case, 32 bytes for the 64-bit case. + * 28 bytes for the 32-bit case, 48 bytes for the 64-bit case. * * Note: The DescriptorType and Type fields must appear in the identical * position in both the ACPI_NAMESPACE_NODE and ACPI_OPERAND_OBJECT @@ -301,10 +301,12 @@ typedef struct acpi_namespace_node struct acpi_namespace_node *Parent; /* Parent node */ struct acpi_namespace_node *Child; /* First child */ struct acpi_namespace_node *Peer; /* First peer */ + struct acpi_namespace_node *OwnerList; /* All nodes owned by a table or method */ - /* - * The following fields are used by the ASL compiler and disassembler only - */ +/* + * The following fields are appended to the namespace node and + * are used by the ASL compiler and AML disassembler only + */ #ifdef ACPI_LARGE_NAMESPACE_NODE union acpi_parse_object *Op; void *MethodLocals; @@ -312,7 +314,6 @@ typedef struct acpi_namespace_node UINT32 Value; UINT32 Length; UINT8 ArgCount; - #endif } ACPI_NAMESPACE_NODE; diff --git a/source/include/acnamesp.h b/source/include/acnamesp.h index a2c80dfeea0a..529fc6e78a36 100644 --- a/source/include/acnamesp.h +++ b/source/include/acnamesp.h @@ -204,6 +204,12 @@ ACPI_STATUS AcpiNsInitializeDevices ( UINT32 Flags); +ACPI_STATUS +AcpiNsInitOnePackage ( + ACPI_HANDLE ObjHandle, + UINT32 Level, + void *Context, + void **ReturnValue); /* * nsload - Namespace loading diff --git a/source/include/acpixf.h b/source/include/acpixf.h index 2fee13a51e02..6e10c851974d 100644 --- a/source/include/acpixf.h +++ b/source/include/acpixf.h @@ -154,7 +154,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20180427 +#define ACPI_CA_VERSION 0x20180508 #include "acconfig.h" #include "actypes.h" diff --git a/source/tools/acpibin/abmain.c b/source/tools/acpibin/abmain.c index 35e533cf35eb..1cf18c6876cb 100644 --- a/source/tools/acpibin/abmain.c +++ b/source/tools/acpibin/abmain.c @@ -186,7 +186,6 @@ AbDisplayUsage ( ACPI_OPTION ("-a <File1> <File2>", "Compare two binary AML files, dump all mismatches"); ACPI_OPTION ("-c <File1> <File2>", "Compare two binary AML files, dump first 100 mismatches"); ACPI_OPTION ("-d <In> <Out>", "Dump AML binary to text file"); - ACPI_OPTION ("-e <Sig> <In> <Out>", "Extract binary AML table from acpidump file"); ACPI_OPTION ("-o <Value>", "Start comparison at this offset into second file"); ACPI_OPTION ("-h <File>", "Display table header for binary AML file"); ACPI_OPTION ("-s <File>", "Update checksum for binary AML file"); diff --git a/source/tools/acpixtract/acpixtract.h b/source/tools/acpixtract/acpixtract.h index cd7b9553b589..88b16670ec10 100644 --- a/source/tools/acpixtract/acpixtract.h +++ b/source/tools/acpixtract/acpixtract.h @@ -193,8 +193,9 @@ #define AX_LINE_BUFFER_SIZE 256 #define AX_MIN_BLOCK_HEADER_LENGTH 6 /* strlen ("DSDT @") */ -#define AX_IS_TABLE_BLOCK_HEADER (strlen (Gbl_LineBuffer) < AX_END_OF_HEX_DATA) && (strstr (Gbl_LineBuffer, " @ ")) -#define AX_END_OF_HEX_DATA 55 +#define AX_HEX_DATA_LENGTH 49 /* (3 * 16) + 1 for the colon delimiter */ +#define AX_IS_TABLE_BLOCK_HEADER (strlen (Gbl_LineBuffer) < AX_HEX_DATA_LENGTH) && \ + (strstr (Gbl_LineBuffer, " @ ")) typedef struct AxTableInfo diff --git a/source/tools/acpixtract/axutils.c b/source/tools/acpixtract/axutils.c index 6334189c7b3c..8fba70047f93 100644 --- a/source/tools/acpixtract/axutils.c +++ b/source/tools/acpixtract/axutils.c @@ -432,6 +432,7 @@ AxConvertToBinary ( char *InputLine, unsigned char *OutputData) { + char *ColonDelimiter; int BytesConverted; int Converted[16]; int i; @@ -441,10 +442,17 @@ AxConvertToBinary ( * Terminate input line immediately after the data. Otherwise, the * second line below will not scan correctly. * + * This handles varying lengths for the offset: line prefix. This support + * for tables larger than 1mb was added 05/2018. + * * 00b0: 03 00 00 00 43 48 41 36 0c 00 00 00 03 00 00 00 ....CHA6........ * 00c0: 43 48 41 37 CHA7 + * + * 012340b0: 03 00 00 00 43 48 41 36 0c 00 00 00 03 00 00 00 ....CHA6........ + * 012340c0: 43 48 41 37 CHA7 */ - InputLine [AX_END_OF_HEX_DATA] = 0; + ColonDelimiter = strchr (InputLine, ':'); + ColonDelimiter [AX_HEX_DATA_LENGTH] = 0; /* * Convert one line of table data, of the form: |