ACK: [PATCH] ACPICA: Update to version 20180531
ivanhu
ivan.hu at canonical.com
Tue Jun 5 02:46:11 UTC 2018
On 06/01/2018 07:48 PM, Colin King wrote:
> 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/2018-May/001808.html
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/acpica/fwts_acpica.c | 1 +
> src/acpica/source/common/acfileio.c | 23 +++++---
> src/acpica/source/common/dmtbdump2.c | 6 ++
> src/acpica/source/common/dmtbinfo2.c | 17 +++++-
> src/acpica/source/compiler/aslload.c | 6 +-
> src/acpica/source/compiler/dttable1.c | 13 +++++
> src/acpica/source/compiler/dttemplate.h | 57 ++++++++++++-------
> .../source/components/debugger/dbnames.c | 1 +
> .../source/components/debugger/dbobject.c | 26 ++++++++-
> .../source/components/dispatcher/dsdebug.c | 10 +++-
> .../source/components/executer/exconfig.c | 11 ++++
> .../source/components/namespace/nsdump.c | 4 ++
> src/acpica/source/components/parser/psloop.c | 40 ++++++++++++-
> .../source/components/parser/psobject.c | 29 ++++++++++
> src/acpica/source/components/parser/pswalk.c | 29 +++++++++-
> .../source/components/utilities/uterror.c | 10 ++--
> src/acpica/source/include/acdisasm.h | 1 +
> src/acpica/source/include/aclocal.h | 11 ++--
> src/acpica/source/include/acoutput.h | 4 +-
> src/acpica/source/include/acpixf.h | 2 +-
> src/acpica/source/include/actbinfo.h | 1 +
> src/acpica/source/include/actbl2.h | 26 +++++++--
> src/acpica/source/tools/acpiexec/aecommon.h | 1 +
> .../source/tools/acpiexec/aeexception.c | 56 +++++++++++-------
> 24 files changed, 305 insertions(+), 80 deletions(-)
>
> diff --git a/src/acpica/fwts_acpica.c b/src/acpica/fwts_acpica.c
> index 89beecc0..f4c45c6f 100644
> --- a/src/acpica/fwts_acpica.c
> +++ b/src/acpica/fwts_acpica.c
> @@ -80,6 +80,7 @@ typedef void * (*pthread_callback)(void *);
>
> BOOLEAN AcpiGbl_AbortLoopOnTimeout = FALSE;
> BOOLEAN AcpiGbl_IgnoreErrors = FALSE;
> +BOOLEAN AcpiGbl_VerboseHandlers = FALSE;
> UINT8 AcpiGbl_RegionFillValue = 0;
>
> static ACPI_TABLE_DESC Tables[ACPI_MAX_INIT_TABLES]; /* ACPICA Table descriptors */
> diff --git a/src/acpica/source/common/acfileio.c b/src/acpica/source/common/acfileio.c
> index 8aabeb43..75a20d01 100644
> --- a/src/acpica/source/common/acfileio.c
> +++ b/src/acpica/source/common/acfileio.c
> @@ -401,16 +401,16 @@ AcGetOneTableFromFile (
> return (AE_CTRL_TERMINATE);
> }
>
> - /* Validate the table signature/header (limited ASCII chars) */
> -
> - Status = AcValidateTableHeader (File, TableOffset);
> - if (ACPI_FAILURE (Status))
> - {
> - return (Status);
> - }
> -
> if (GetOnlyAmlTables)
> {
> + /* Validate the table signature/header (limited ASCII chars) */
> +
> + Status = AcValidateTableHeader (File, TableOffset);
> + if (ACPI_FAILURE (Status))
> + {
> + return (Status);
> + }
> +
> /*
> * Table must be an AML table (DSDT/SSDT).
> * Used for iASL -e option only.
> @@ -438,7 +438,12 @@ AcGetOneTableFromFile (
> fseek (File, TableOffset, SEEK_SET);
>
> Count = fread (Table, 1, TableHeader.Length, File);
> - if (Count != (INT32) TableHeader.Length)
> +
> + /*
> + * Checks for data table headers happen later in the execution. Only verify
> + * for Aml tables at this point in the code.
> + */
> + if (GetOnlyAmlTables && Count != (INT32) TableHeader.Length)
> {
> Status = AE_ERROR;
> goto ErrorExit;
> diff --git a/src/acpica/source/common/dmtbdump2.c b/src/acpica/source/common/dmtbdump2.c
> index d2c584bb..71ef9c02 100644
> --- a/src/acpica/source/common/dmtbdump2.c
> +++ b/src/acpica/source/common/dmtbdump2.c
> @@ -265,6 +265,12 @@ AcpiDmDumpIort (
> Length = IortNode->Length - NodeOffset;
> break;
>
> + case ACPI_IORT_NODE_PMCG:
> +
> + InfoTable = AcpiDmTableInfoIort5;
> + Length = IortNode->Length - NodeOffset;
> + break;
> +
> default:
>
> AcpiOsPrintf ("\n**** Unknown IORT node type 0x%X\n",
> diff --git a/src/acpica/source/common/dmtbinfo2.c b/src/acpica/source/common/dmtbinfo2.c
> index 1efd3fd9..1d7e2ec1 100644
> --- a/src/acpica/source/common/dmtbinfo2.c
> +++ b/src/acpica/source/common/dmtbinfo2.c
> @@ -290,6 +290,8 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoIort2[] =
> {ACPI_DMT_IORTMEM, ACPI_IORT2_OFFSET (MemoryProperties), "Memory Properties", 0},
> {ACPI_DMT_UINT32, ACPI_IORT2_OFFSET (AtsAttribute), "ATS Attribute", 0},
> {ACPI_DMT_UINT32, ACPI_IORT2_OFFSET (PciSegmentNumber), "PCI Segment Number", 0},
> + {ACPI_DMT_UINT8, ACPI_IORT2_OFFSET (MemoryAddressLimit), "Memory Size Limit", 0},
> + {ACPI_DMT_UINT24, ACPI_IORT2_OFFSET (Reserved[0]), "Reserved", 0},
> ACPI_DMT_TERMINATOR
> };
>
> @@ -350,13 +352,22 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoIort4[] =
> {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_UINT8, ACPI_IORT4_OFFSET (Pxm), "Proximity Domain", 0},
> - {ACPI_DMT_UINT8, ACPI_IORT4_OFFSET (Reserved1), "Reserved", 0},
> - {ACPI_DMT_UINT16, ACPI_IORT4_OFFSET (Reserved2), "Reserved", 0},
> + {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Pxm), "Proximity Domain", 0},
> {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (IdMappingIndex), "Device ID Mapping Index", 0},
> ACPI_DMT_TERMINATOR
> };
>
> +/* 0x05: PMCG */
> +
> +ACPI_DMTABLE_INFO AcpiDmTableInfoIort5[] =
> +{
> + {ACPI_DMT_UINT64, ACPI_IORT5_OFFSET (Page0BaseAddress), "Page 0 Base Address", 0},
> + {ACPI_DMT_UINT32, ACPI_IORT5_OFFSET (OverflowGsiv), "Overflow Interrupt GSIV", 0},
> + {ACPI_DMT_UINT32, ACPI_IORT5_OFFSET (NodeReference), "Node Reference", 0},
> + {ACPI_DMT_UINT64, ACPI_IORT5_OFFSET (Page1BaseAddress), "Page 1 Base Address", 0},
> + ACPI_DMT_TERMINATOR
> +};
> +
>
> /*******************************************************************************
> *
> diff --git a/src/acpica/source/compiler/aslload.c b/src/acpica/source/compiler/aslload.c
> index 4082b388..a57ba5e0 100644
> --- a/src/acpica/source/compiler/aslload.c
> +++ b/src/acpica/source/compiler/aslload.c
> @@ -233,7 +233,11 @@ LdLoadNamespace (
>
> /* Dump the namespace if debug is enabled */
>
> - AcpiNsDumpTables (ACPI_NS_ALL, ACPI_UINT32_MAX);
> + if (AcpiDbgLevel & ACPI_LV_TABLES)
> + {
> + AcpiNsDumpTables (ACPI_NS_ALL, ACPI_UINT32_MAX);
> + }
> +
> ACPI_FREE (WalkState);
> return (AE_OK);
> }
> diff --git a/src/acpica/source/compiler/dttable1.c b/src/acpica/source/compiler/dttable1.c
> index 084adc3e..a7f19732 100644
> --- a/src/acpica/source/compiler/dttable1.c
> +++ b/src/acpica/source/compiler/dttable1.c
> @@ -1829,6 +1829,19 @@ DtCompileIort (
> NodeLength += Subtable->Length;
> break;
>
> + case ACPI_IORT_NODE_PMCG:
> +
> + Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort5,
> + &Subtable);
> + 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/dttemplate.h b/src/acpica/source/compiler/dttemplate.h
> index 39e57ccf..b13348fa 100644
> --- a/src/acpica/source/compiler/dttemplate.h
> +++ b/src/acpica/source/compiler/dttemplate.h
> @@ -696,18 +696,18 @@ const unsigned char TemplateHpet[] =
>
> const unsigned char TemplateIort[] =
> {
> - 0x49,0x4F,0x52,0x54,0x90,0x01,0x00,0x00, /* 00000000 "IORT...." */
> - 0x00,0x5F,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "._INTEL " */
> + 0x49,0x4F,0x52,0x54,0xF8,0x01,0x00,0x00, /* 00000000 "IORT...." */
> + 0x00,0x72,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".rINTEL " */
> 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
> 0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
> - 0x31,0x08,0x17,0x20,0x05,0x00,0x00,0x00, /* 00000020 "1.. ...." */
> + 0x13,0x03,0x18,0x20,0x06,0x00,0x00,0x00, /* 00000020 "... ...." */
> 0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "4......." */
> 0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00, /* 00000030 "........" */
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
> 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000040 "........" */
> - 0x00,0x00,0x00,0x00,0x01,0x58,0x00,0x00, /* 00000048 ".....X.." */
> + 0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00, /* 00000048 "........" */
> 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000050 "........" */
> - 0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "D......." */
> + 0x6C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "l......." */
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000060 "........" */
> 0x00,0x5C,0x5F,0x53,0x42,0x2E,0x50,0x43, /* 00000068 ".\_SB.PC" */
> 0x49,0x30,0x2E,0x44,0x45,0x56,0x30,0x00, /* 00000070 "I0.DEV0." */
> @@ -716,36 +716,49 @@ const unsigned char TemplateIort[] =
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000088 "........" */
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000090 "........" */
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000098 "........" */
> - 0x00,0x00,0x00,0x00,0x02,0x34,0x00,0x00, /* 000000A0 ".....4.." */
> - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000A8 "........" */
> - 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 " ......." */
> + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "........" */
> + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A8 "........" */
> + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B8 "........" */
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C0 "........" */
> - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C8 "........" */
> - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D0 "........" */
> - 0x03,0x60,0x00,0x01,0x00,0x00,0x00,0x00, /* 000000D8 ".`......" */
> - 0x01,0x00,0x00,0x00,0x4C,0x00,0x00,0x00, /* 000000E0 "....L..." */
> + 0x00,0x00,0x00,0x00,0x02,0x38,0x00,0x00, /* 000000C8 ".....8.." */
> + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000D0 "........" */
> + 0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D8 "$......." */
> + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E0 "........" */
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E8 "........" */
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F0 "........" */
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F8 "........" */
> - 0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000100 "<......." */
> - 0x4C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000108 "L......." */
> + 0x00,0x00,0x00,0x00,0x03,0x60,0x00,0x01, /* 00000100 ".....`.." */
> + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000108 "........" */
> 0x4C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000110 "L......." */
> 0x00,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 "........" */
> - 0x04,0x58,0x00,0x01,0x00,0x00,0x00,0x00, /* 00000138 ".X......" */
> - 0x01,0x00,0x00,0x00,0x44,0x00,0x00,0x00, /* 00000140 "....D..." */
> + 0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x00, /* 00000128 "....<..." */
> + 0x00,0x00,0x00,0x00,0x4C,0x00,0x00,0x00, /* 00000130 "....L..." */
> + 0x00,0x00,0x00,0x00,0x4C,0x00,0x00,0x00, /* 00000138 "....L..." */
> + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000140 "........" */
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000148 "........" */
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000150 "........" */
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000158 "........" */
> - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000160 "........" */
> - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000168 "........" */
> - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000170 "........" */
> + 0x00,0x00,0x00,0x00,0x04,0x58,0x00,0x01, /* 00000160 ".....X.." */
> + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000168 "........" */
> + 0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000170 "D......." */
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000178 "........" */
> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000180 "........" */
> - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000188 "........" */
> + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000188 "........" */
> + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000190 "........" */
> + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000198 "........" */
> + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001A0 "........" */
> + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001A8 "........" */
> + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001B0 "........" */
> + 0x00,0x00,0x00,0x00,0x05,0x3C,0x00,0x01, /* 000001B8 ".....<.." */
> + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000001C0 "........" */
> + 0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001C8 "(......." */
> + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001D0 "........" */
> + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001D8 "........" */
> + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001E0 "........" */
> + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001E8 "........" */
> + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00 /* 000001F0 "........" */
> };
>
> const unsigned char TemplateIvrs[] =
> diff --git a/src/acpica/source/components/debugger/dbnames.c b/src/acpica/source/components/debugger/dbnames.c
> index c151a3ef..900a9abe 100644
> --- a/src/acpica/source/components/debugger/dbnames.c
> +++ b/src/acpica/source/components/debugger/dbnames.c
> @@ -522,6 +522,7 @@ AcpiDbWalkAndMatchName (
> }
> else
> {
> + Info.Count = 0;
> Info.OwnerId = ACPI_OWNER_ID_MAX;
> Info.DebugLevel = ACPI_UINT32_MAX;
> Info.DisplayType = ACPI_DISPLAY_SUMMARY | ACPI_DISPLAY_SHORT;
> diff --git a/src/acpica/source/components/debugger/dbobject.c b/src/acpica/source/components/debugger/dbobject.c
> index 989adef0..a3b515a7 100644
> --- a/src/acpica/source/components/debugger/dbobject.c
> +++ b/src/acpica/source/components/debugger/dbobject.c
> @@ -187,7 +187,17 @@ AcpiDbDumpMethodInfo (
> ACPI_WALK_STATE *WalkState)
> {
> ACPI_THREAD_STATE *Thread;
> + ACPI_NAMESPACE_NODE *Node;
> +
> +
> + Node = WalkState->MethodNode;
> +
> + /* There are no locals or arguments for the module-level code case */
>
> + if (Node == AcpiGbl_RootNode)
> + {
> + return;
> + }
>
> /* Ignore control codes, they are not errors */
>
> @@ -556,8 +566,15 @@ AcpiDbDecodeLocals (
> BOOLEAN DisplayLocals = FALSE;
>
>
> + Node = WalkState->MethodNode;
> ObjDesc = WalkState->MethodDesc;
> - Node = WalkState->MethodNode;
> +
> + /* There are no locals for the module-level code case */
> +
> + if (Node == AcpiGbl_RootNode)
> + {
> + return;
> + }
>
> if (!Node)
> {
> @@ -635,6 +652,13 @@ AcpiDbDecodeArguments (
> Node = WalkState->MethodNode;
> ObjDesc = WalkState->MethodDesc;
>
> + /* There are no arguments for the module-level code case */
> +
> + if (Node == AcpiGbl_RootNode)
> + {
> + return;
> + }
> +
> if (!Node)
> {
> AcpiOsPrintf (
> diff --git a/src/acpica/source/components/dispatcher/dsdebug.c b/src/acpica/source/components/dispatcher/dsdebug.c
> index 52208f81..10bd84f9 100644
> --- a/src/acpica/source/components/dispatcher/dsdebug.c
> +++ b/src/acpica/source/components/dispatcher/dsdebug.c
> @@ -251,6 +251,7 @@ AcpiDsDumpMethodStack (
>
> ACPI_FUNCTION_TRACE (DsDumpMethodStack);
>
> +
> /* Ignore control codes, they are not errors */
>
> if ((Status & AE_CODE_MASK) == AE_CODE_CONTROL)
> @@ -320,8 +321,13 @@ AcpiDsDumpMethodStack (
> Op->Common.Next = NULL;
>
> #ifdef ACPI_DISASSEMBLER
> - AcpiOsPrintf ("Failed at ");
> - AcpiDmDisassemble (NextWalkState, Op, ACPI_UINT32_MAX);
> + if (WalkState->MethodNode != AcpiGbl_RootNode)
> + {
> + /* More verbose if not module-level code */
> +
> + AcpiOsPrintf ("Failed at ");
> + AcpiDmDisassemble (NextWalkState, Op, ACPI_UINT32_MAX);
> + }
> #endif
> Op->Common.Next = Next;
> }
> diff --git a/src/acpica/source/components/executer/exconfig.c b/src/acpica/source/components/executer/exconfig.c
> index 590d8366..f8766530 100644
> --- a/src/acpica/source/components/executer/exconfig.c
> +++ b/src/acpica/source/components/executer/exconfig.c
> @@ -677,6 +677,17 @@ AcpiExUnloadTable (
> ACPI_WARNING ((AE_INFO,
> "Received request to unload an ACPI table"));
>
> + /*
> + * May 2018: Unload is no longer supported for the following reasons:
> + * 1) A correct implementation on some hosts may not be possible.
> + * 2) Other ACPI implementations do not correctly/fully support it.
> + * 3) It requires host device driver support which does not exist.
> + * (To properly support namespace unload out from underneath.)
> + * 4) This AML operator has never been seen in the field.
> + */
> + ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
> + "AML Unload operator is not supported"));
> +
> /*
> * Validate the handle
> * Although the handle is partially validated in AcpiExReconfiguration()
> diff --git a/src/acpica/source/components/namespace/nsdump.c b/src/acpica/source/components/namespace/nsdump.c
> index b1e72f5d..f87ca2b1 100644
> --- a/src/acpica/source/components/namespace/nsdump.c
> +++ b/src/acpica/source/components/namespace/nsdump.c
> @@ -293,6 +293,7 @@ AcpiNsDumpPathname (
> }
> #endif
>
> +
> /*******************************************************************************
> *
> * FUNCTION: AcpiNsDumpOneObject
> @@ -351,6 +352,7 @@ AcpiNsDumpOneObject (
> }
>
> Type = ThisNode->Type;
> + Info->Count++;
>
> /* Check if the owner matches */
>
> @@ -815,6 +817,7 @@ AcpiNsDumpObjects (
> return;
> }
>
> + Info.Count = 0;
> Info.DebugLevel = ACPI_LV_TABLES;
> Info.OwnerId = OwnerId;
> Info.DisplayType = DisplayType;
> @@ -823,6 +826,7 @@ AcpiNsDumpObjects (
> ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES,
> AcpiNsDumpOneObject, NULL, (void *) &Info, NULL);
>
> + AcpiOsPrintf ("\nNamespace node count: %u\n\n", Info.Count);
> (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
> }
>
> diff --git a/src/acpica/source/components/parser/psloop.c b/src/acpica/source/components/parser/psloop.c
> index 28d17962..fd6773c1 100644
> --- a/src/acpica/source/components/parser/psloop.c
> +++ b/src/acpica/source/components/parser/psloop.c
> @@ -665,6 +665,19 @@ AcpiPsParseLoop (
> {
> return_ACPI_STATUS (Status);
> }
> + if (WalkState->Opcode == AML_SCOPE_OP)
> + {
> + /*
> + * If the scope op fails to parse, skip the body of the
> + * scope op because the parse failure indicates that the
> + * device may not exist.
> + */
> + WalkState->ParserState.Aml = WalkState->Aml + 1;
> + WalkState->ParserState.Aml =
> + AcpiPsGetNextPackageEnd(&WalkState->ParserState);
> + WalkState->Aml = WalkState->ParserState.Aml;
> + ACPI_ERROR ((AE_INFO, "Skipping Scope block"));
> + }
>
> continue;
> }
> @@ -707,7 +720,32 @@ AcpiPsParseLoop (
> {
> return_ACPI_STATUS (Status);
> }
> -
> + if ((WalkState->ControlState) &&
> + ((WalkState->ControlState->Control.Opcode == AML_IF_OP) ||
> + (WalkState->ControlState->Control.Opcode == AML_WHILE_OP)))
> + {
> + /*
> + * If the if/while op fails to parse, we will skip parsing
> + * the body of the op.
> + */
> + ParserState->Aml =
> + WalkState->ControlState->Control.AmlPredicateStart + 1;
> + ParserState->Aml =
> + AcpiPsGetNextPackageEnd (ParserState);
> + WalkState->Aml = ParserState->Aml;
> +
> + ACPI_ERROR ((AE_INFO, "Skipping While/If block"));
> + if (*WalkState->Aml == AML_ELSE_OP)
> + {
> + ACPI_ERROR ((AE_INFO, "Skipping Else block"));
> + WalkState->ParserState.Aml = WalkState->Aml + 1;
> + WalkState->ParserState.Aml =
> + AcpiPsGetNextPackageEnd (ParserState);
> + WalkState->Aml = ParserState->Aml;
> + }
> + ACPI_FREE(AcpiUtPopGenericState (&WalkState->ControlState));
> + }
> + Op = NULL;
> continue;
> }
> }
> diff --git a/src/acpica/source/components/parser/psobject.c b/src/acpica/source/components/parser/psobject.c
> index 63e2b3b1..8d6f81bd 100644
> --- a/src/acpica/source/components/parser/psobject.c
> +++ b/src/acpica/source/components/parser/psobject.c
> @@ -154,6 +154,7 @@
> #include "acparser.h"
> #include "amlcode.h"
> #include "acconvert.h"
> +#include "acnamesp.h"
>
> #define _COMPONENT ACPI_PARSER
> ACPI_MODULE_NAME ("psobject")
> @@ -722,6 +723,20 @@ AcpiPsCompleteOp (
> {
> if (*Op)
> {
> + /*
> + * These Opcodes need to be removed from the namespace because they
> + * get created even if these opcodes cannot be created due to
> + * errors.
> + */
> + if (((*Op)->Common.AmlOpcode == AML_REGION_OP) ||
> + ((*Op)->Common.AmlOpcode == AML_DATA_REGION_OP))
> + {
> + AcpiNsDeleteChildren ((*Op)->Common.Node);
> + AcpiNsRemoveNode ((*Op)->Common.Node);
> + (*Op)->Common.Node = NULL;
> + AcpiPsDeleteParseTree (*Op);
> + }
> +
> Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
> if (ACPI_FAILURE (Status2))
> {
> @@ -747,6 +762,20 @@ AcpiPsCompleteOp (
> #endif
> WalkState->PrevOp = NULL;
> WalkState->PrevArgTypes = WalkState->ArgTypes;
> +
> + if (WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL)
> + {
> + /*
> + * There was something that went wrong while executing code at the
> + * module-level. We need to skip parsing whatever caused the
> + * error and keep going. One runtime error during the table load
> + * should not cause the entire table to not be loaded. This is
> + * because there could be correct AML beyond the parts that caused
> + * the runtime error.
> + */
> + ACPI_ERROR ((AE_INFO, "Ignore error and continue table load"));
> + return_ACPI_STATUS (AE_OK);
> + }
> return_ACPI_STATUS (Status);
> }
>
> diff --git a/src/acpica/source/components/parser/pswalk.c b/src/acpica/source/components/parser/pswalk.c
> index eb57e36a..db4999e0 100644
> --- a/src/acpica/source/components/parser/pswalk.c
> +++ b/src/acpica/source/components/parser/pswalk.c
> @@ -169,6 +169,8 @@
> *
> ******************************************************************************/
>
> +#include "amlcode.h"
> +
> void
> AcpiPsDeleteParseTree (
> ACPI_PARSE_OBJECT *SubtreeRoot)
> @@ -176,19 +178,40 @@ AcpiPsDeleteParseTree (
> ACPI_PARSE_OBJECT *Op = SubtreeRoot;
> ACPI_PARSE_OBJECT *Next = NULL;
> ACPI_PARSE_OBJECT *Parent = NULL;
> + UINT32 Level = 0;
>
>
> ACPI_FUNCTION_TRACE_PTR (PsDeleteParseTree, SubtreeRoot);
>
> + ACPI_DEBUG_PRINT ((ACPI_DB_PARSE_TREES,
> + " root %p\n", SubtreeRoot));
>
> /* Visit all nodes in the subtree */
>
> while (Op)
> {
> - /* Check if we are not ascending */
> -
> if (Op != Parent)
> {
> + /* This is the descending case */
> +
> + if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_PARSE_TREES, _COMPONENT))
> + {
> + /* This debug option will print the entire parse tree */
> +
> + AcpiOsPrintf (" %*.s%s %p", (Level * 4), " ",
> + AcpiPsGetOpcodeName (Op->Common.AmlOpcode), Op);
> +
> + if (Op->Named.AmlOpcode == AML_INT_NAMEPATH_OP)
> + {
> + AcpiOsPrintf (" %4.4s", Op->Common.Value.String);
> + }
> + if (Op->Named.AmlOpcode == AML_STRING_OP)
> + {
> + AcpiOsPrintf (" %s", Op->Common.Value.String);
> + }
> + AcpiOsPrintf ("\n");
> + }
> +
> /* Look for an argument or child of the current op */
>
> Next = AcpiPsGetArg (Op, 0);
> @@ -197,6 +220,7 @@ AcpiPsDeleteParseTree (
> /* Still going downward in tree (Op is not completed yet) */
>
> Op = Next;
> + Level++;
> continue;
> }
> }
> @@ -221,6 +245,7 @@ AcpiPsDeleteParseTree (
> }
> else
> {
> + Level--;
> Op = Parent;
> }
> }
> diff --git a/src/acpica/source/components/utilities/uterror.c b/src/acpica/source/components/utilities/uterror.c
> index a44c106f..eca92f3b 100644
> --- a/src/acpica/source/components/utilities/uterror.c
> +++ b/src/acpica/source/components/utilities/uterror.c
> @@ -352,20 +352,20 @@ AcpiUtPrefixedNamespaceError (
> {
> case AE_ALREADY_EXISTS:
>
> - AcpiOsPrintf (ACPI_MSG_BIOS_ERROR);
> + AcpiOsPrintf ("\n" ACPI_MSG_BIOS_ERROR);
> Message = "Failure creating";
> break;
>
> case AE_NOT_FOUND:
>
> - AcpiOsPrintf (ACPI_MSG_BIOS_ERROR);
> - Message = "Failure looking up";
> + AcpiOsPrintf ("\n" ACPI_MSG_BIOS_ERROR);
> + Message = "Could not resolve";
> break;
>
> default:
>
> - AcpiOsPrintf (ACPI_MSG_ERROR);
> - Message = "Failure looking up";
> + AcpiOsPrintf ("\n" ACPI_MSG_ERROR);
> + Message = "Failure resolving";
> break;
> }
>
> diff --git a/src/acpica/source/include/acdisasm.h b/src/acpica/source/include/acdisasm.h
> index 7f7f7bf8..271a57a4 100644
> --- a/src/acpica/source/include/acdisasm.h
> +++ b/src/acpica/source/include/acdisasm.h
> @@ -449,6 +449,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3a[];
> extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3b[];
> extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3c[];
> extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort4[];
> +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort5[];
> extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortAcc[];
> extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortHdr[];
> extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortMap[];
> diff --git a/src/acpica/source/include/aclocal.h b/src/acpica/source/include/aclocal.h
> index d92e6bbd..f487a4ec 100644
> --- a/src/acpica/source/include/aclocal.h
> +++ b/src/acpica/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:
> - * 28 bytes for the 32-bit case, 48 bytes for the 64-bit case.
> + * 20 bytes for the 32-bit case, 32 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,12 +301,10 @@ 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 appended to the namespace node and
> - * are used by the ASL compiler and AML disassembler only
> - */
> + /*
> + * The following fields are used by the ASL compiler and disassembler only
> + */
> #ifdef ACPI_LARGE_NAMESPACE_NODE
> union acpi_parse_object *Op;
> void *MethodLocals;
> @@ -314,6 +312,7 @@ typedef struct acpi_namespace_node
> UINT32 Value;
> UINT32 Length;
> UINT8 ArgCount;
> +
> #endif
>
> } ACPI_NAMESPACE_NODE;
> diff --git a/src/acpica/source/include/acoutput.h b/src/acpica/source/include/acoutput.h
> index 49b85059..358ff55a 100644
> --- a/src/acpica/source/include/acoutput.h
> +++ b/src/acpica/source/include/acoutput.h
> @@ -223,7 +223,8 @@
> #define ACPI_LV_ALLOCATIONS 0x00100000
> #define ACPI_LV_FUNCTIONS 0x00200000
> #define ACPI_LV_OPTIMIZATIONS 0x00400000
> -#define ACPI_LV_VERBOSITY2 0x00700000 | ACPI_LV_VERBOSITY1
> +#define ACPI_LV_PARSE_TREES 0x00800000
> +#define ACPI_LV_VERBOSITY2 0x00F00000 | ACPI_LV_VERBOSITY1
> #define ACPI_LV_ALL ACPI_LV_VERBOSITY2
>
> /* Trace verbosity level 3 [Threading, I/O, and Interrupts] */
> @@ -275,6 +276,7 @@
> #define ACPI_DB_TABLES ACPI_DEBUG_LEVEL (ACPI_LV_TABLES)
> #define ACPI_DB_FUNCTIONS ACPI_DEBUG_LEVEL (ACPI_LV_FUNCTIONS)
> #define ACPI_DB_OPTIMIZATIONS ACPI_DEBUG_LEVEL (ACPI_LV_OPTIMIZATIONS)
> +#define ACPI_DB_PARSE_TREES ACPI_DEBUG_LEVEL (ACPI_LV_PARSE_TREES)
> #define ACPI_DB_VALUES ACPI_DEBUG_LEVEL (ACPI_LV_VALUES)
> #define ACPI_DB_OBJECTS ACPI_DEBUG_LEVEL (ACPI_LV_OBJECTS)
> #define ACPI_DB_ALLOCATIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALLOCATIONS)
> diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
> index 6e10c851..cfe83791 100644
> --- a/src/acpica/source/include/acpixf.h
> +++ b/src/acpica/source/include/acpixf.h
> @@ -154,7 +154,7 @@
>
> /* Current ACPICA subsystem version in YYYYMMDD format */
>
> -#define ACPI_CA_VERSION 0x20180508
> +#define ACPI_CA_VERSION 0x20180531
>
> #include "acconfig.h"
> #include "actypes.h"
> diff --git a/src/acpica/source/include/actbinfo.h b/src/acpica/source/include/actbinfo.h
> index 5a84f35b..347a3940 100644
> --- a/src/acpica/source/include/actbinfo.h
> +++ b/src/acpica/source/include/actbinfo.h
> @@ -257,6 +257,7 @@
> #define ACPI_IORT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU,f)
> #define ACPI_IORT3A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_GSI,f)
> #define ACPI_IORT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_V3,f)
> +#define ACPI_IORT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_PMCG,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)
> diff --git a/src/acpica/source/include/actbl2.h b/src/acpica/source/include/actbl2.h
> index 4b3d460d..174f2c64 100644
> --- a/src/acpica/source/include/actbl2.h
> +++ b/src/acpica/source/include/actbl2.h
> @@ -213,7 +213,7 @@
> * IORT - IO Remapping Table
> *
> * Conforms to "IO Remapping Table System Software on ARM Platforms",
> - * Document number: ARM DEN 0049C, May 2017
> + * Document number: ARM DEN 0049D, March 2018
> *
> ******************************************************************************/
>
> @@ -250,7 +250,8 @@ enum AcpiIortNodeType
> ACPI_IORT_NODE_NAMED_COMPONENT = 0x01,
> ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02,
> ACPI_IORT_NODE_SMMU = 0x03,
> - ACPI_IORT_NODE_SMMU_V3 = 0x04
> + ACPI_IORT_NODE_SMMU_V3 = 0x04,
> + ACPI_IORT_NODE_PMCG = 0x05
> };
>
>
> @@ -316,12 +317,18 @@ typedef struct acpi_iort_named_component
>
> } ACPI_IORT_NAMED_COMPONENT;
>
> +/* Masks for Flags field above */
> +
> +#define ACPI_IORT_NC_STALL_SUPPORTED (1)
> +#define ACPI_IORT_NC_PASID_BITS (31<<1)
>
> typedef struct acpi_iort_root_complex
> {
> UINT64 MemoryProperties; /* Memory access properties */
> UINT32 AtsAttribute;
> UINT32 PciSegmentNumber;
> + UINT8 MemoryAddressLimit; /* Memory address size limit */
> + UINT8 Reserved[3]; /* Reserved, must be zero */
>
> } ACPI_IORT_ROOT_COMPLEX;
>
> @@ -383,9 +390,7 @@ typedef struct acpi_iort_smmu_v3
> UINT32 PriGsiv;
> UINT32 GerrGsiv;
> UINT32 SyncGsiv;
> - UINT8 Pxm;
> - UINT8 Reserved1;
> - UINT16 Reserved2;
> + UINT32 Pxm;
> UINT32 IdMappingIndex;
>
> } ACPI_IORT_SMMU_V3;
> @@ -399,9 +404,18 @@ typedef struct 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)
> +#define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (3<<1)
> #define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3)
>
> +typedef struct acpi_iort_pmcg
> +{
> + UINT64 Page0BaseAddress;
> + UINT32 OverflowGsiv;
> + UINT32 NodeReference;
> + UINT64 Page1BaseAddress;
> +
> +} ACPI_IORT_PMCG;
> +
>
> /*******************************************************************************
> *
> diff --git a/src/acpica/source/tools/acpiexec/aecommon.h b/src/acpica/source/tools/acpiexec/aecommon.h
> index 49a386be..233edc2b 100644
> --- a/src/acpica/source/tools/acpiexec/aecommon.h
> +++ b/src/acpica/source/tools/acpiexec/aecommon.h
> @@ -190,6 +190,7 @@ typedef struct ae_debug_regions
>
>
> extern BOOLEAN AcpiGbl_UseLocalFaultHandler;
> +extern BOOLEAN AcpiGbl_VerboseHandlers;
> extern BOOLEAN AcpiGbl_IgnoreErrors;
> extern BOOLEAN AcpiGbl_AbortLoopOnTimeout;
> extern UINT8 AcpiGbl_RegionFillValue;
> diff --git a/src/acpica/source/tools/acpiexec/aeexception.c b/src/acpica/source/tools/acpiexec/aeexception.c
> index 2f5bfb22..5098c878 100644
> --- a/src/acpica/source/tools/acpiexec/aeexception.c
> +++ b/src/acpica/source/tools/acpiexec/aeexception.c
> @@ -162,6 +162,10 @@ AeDisplayMethodCallStack (
> void);
>
>
> +UINT32 SigintCount = 0;
> +#define ACPI_MAX_CONTROL_C 5
> +
> +
> /******************************************************************************
> *
> * FUNCTION: AeExceptionHandler
> @@ -194,35 +198,39 @@ AeExceptionHandler (
>
>
> Exception = AcpiFormatException (AmlStatus);
> - AcpiOsPrintf (AE_PREFIX
> - "Exception %s during execution\n", Exception);
>
> - if (Name)
> + if (AcpiGbl_VerboseHandlers)
> {
> - if (ACPI_COMPARE_NAME (&Name, ACPI_ROOT_PATHNAME))
> + AcpiOsPrintf (AE_PREFIX
> + "Exception %s during execution\n", Exception);
> +
> + if (Name)
> {
> - AcpiOsPrintf (AE_PREFIX
> - "Evaluating executable code at [%s]\n", ACPI_NAMESPACE_ROOT);
> + if (ACPI_COMPARE_NAME (&Name, ACPI_ROOT_PATHNAME))
> + {
> + AcpiOsPrintf (AE_PREFIX
> + "Evaluating executable code at [%s]\n", ACPI_NAMESPACE_ROOT);
> + }
> + else
> + {
> + AcpiOsPrintf (AE_PREFIX
> + "Evaluating Method or Node: [%4.4s]\n", (char *) &Name);
> + }
> }
> - else
> +
> + /* Be terse about loop timeouts */
> +
> + if ((AmlStatus == AE_AML_LOOP_TIMEOUT) && AcpiGbl_AbortLoopOnTimeout)
> {
> - AcpiOsPrintf (AE_PREFIX
> - "Evaluating Method or Node: [%4.4s]\n", (char *) &Name);
> + AcpiOsPrintf (AE_PREFIX "Aborting loop after timeout\n");
> + return (AE_OK);
> }
> - }
>
> - /* Be terse about loop timeouts */
> -
> - if ((AmlStatus == AE_AML_LOOP_TIMEOUT) && AcpiGbl_AbortLoopOnTimeout)
> - {
> - AcpiOsPrintf (AE_PREFIX "Aborting loop after timeout\n");
> - return (AE_OK);
> + AcpiOsPrintf ("\n" AE_PREFIX
> + "AML Opcode [%s], Method Offset ~%5.5X\n",
> + AcpiPsGetOpcodeName (Opcode), AmlOffset);
> }
>
> - AcpiOsPrintf ("\n" AE_PREFIX
> - "AML Opcode [%s], Method Offset ~%5.5X\n",
> - AcpiPsGetOpcodeName (Opcode), AmlOffset);
> -
> /* Invoke the _ERR method if present */
>
> Status = AcpiGetHandle (NULL, "\\_ERR", &ErrHandle);
> @@ -321,6 +329,14 @@ AeSignalHandler (
> signal(Sig, SIG_IGN);
> AcpiOsPrintf ("<Control-C>\n");
>
> + /* Force exit on multiple control-c */
> +
> + SigintCount++;
> + if (SigintCount >= ACPI_MAX_CONTROL_C)
> + {
> + exit (0);
> + }
> +
> /* Abort the application if there are no methods executing */
>
> if (!AcpiGbl_MethodExecuting)
Acked-by: Ivan Hu <ivan.hu at canonical.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20180605/f06326ad/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20180605/f06326ad/attachment-0001.sig>
More information about the fwts-devel
mailing list