ACK: [PATCH] ACPICA: Update version to 20150410 (LP: #1441773)
ivanhu
ivan.hu at canonical.com
Wed Apr 29 02:46:43 UTC 2015
On 2015年04月11日 23:47, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Update to ACPICA 20150410, for changes since the previous
> release incorporated in fwts please refer to the follwing:
>
> https://lists.acpica.org/pipermail/devel/2015-April/000688.html
> https://lists.acpica.org/pipermail/devel/2015-April/000690.html
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/acpica/source/common/adfile.c | 10 +-
> src/acpica/source/common/adisasm.c | 95 ++-
> src/acpica/source/common/dmtable.c | 136 ++--
> src/acpica/source/common/dmtbdump.c | 100 +--
> src/acpica/source/common/dmtbinfo.c | 42 +-
> src/acpica/source/compiler/aslcodegen.c | 2 +-
> src/acpica/source/compiler/aslcompile.c | 12 +-
> src/acpica/source/compiler/aslcompiler.h | 8 +
> src/acpica/source/compiler/aslcompiler.y | 55 +-
> src/acpica/source/compiler/asldefine.h | 1 -
> src/acpica/source/compiler/aslfold.c | 706 ++++++++++++++-------
> src/acpica/source/compiler/asllisting.c | 5 +-
> src/acpica/source/compiler/aslmain.c | 1 +
> src/acpica/source/compiler/aslmap.c | 2 +-
> src/acpica/source/compiler/aslrules.y | 53 +-
> src/acpica/source/compiler/aslstartup.c | 2 +-
> src/acpica/source/compiler/asltree.c | 199 ++++--
> src/acpica/source/compiler/asltypes.y | 2 +-
> src/acpica/source/compiler/aslutils.c | 9 +-
> src/acpica/source/compiler/aslwalks.c | 10 +-
> src/acpica/source/compiler/dtcompile.c | 17 +-
> src/acpica/source/compiler/dtcompiler.h | 20 +-
> src/acpica/source/compiler/dtio.c | 6 +-
> src/acpica/source/compiler/dttable.c | 35 +-
> src/acpica/source/compiler/dttemplate.h | 17 +
> src/acpica/source/compiler/dtutils.c | 3 +-
> src/acpica/source/components/debugger/dbmethod.c | 4 +-
> src/acpica/source/components/debugger/dbxface.c | 13 +-
> .../source/components/disassembler/dmopcode.c | 12 -
> src/acpica/source/components/disassembler/dmwalk.c | 2 +-
> src/acpica/source/components/dispatcher/dsopcode.c | 6 +-
> src/acpica/source/components/dispatcher/dsutils.c | 9 +
> src/acpica/source/components/events/evregion.c | 2 +-
> src/acpica/source/components/events/evxfevnt.c | 5 +-
> src/acpica/source/components/executer/exdump.c | 2 +-
> src/acpica/source/components/executer/exfldio.c | 4 +-
> src/acpica/source/components/executer/exoparg3.c | 13 +-
> src/acpica/source/components/executer/exregion.c | 13 +-
> src/acpica/source/components/hardware/hwgpe.c | 15 +-
> src/acpica/source/components/hardware/hwvalid.c | 12 +-
> src/acpica/source/components/namespace/nsdump.c | 6 +-
> src/acpica/source/components/parser/psopcode.c | 6 +-
> src/acpica/source/components/parser/psopinfo.c | 2 +-
> src/acpica/source/components/resources/rsaddr.c | 8 +-
> src/acpica/source/components/resources/rsdump.c | 279 ++++----
> .../source/components/resources/rsdumpinfo.c | 45 +-
> src/acpica/source/components/resources/rsxface.c | 10 +-
> src/acpica/source/components/tables/tbdata.c | 33 +-
> src/acpica/source/components/tables/tbinstal.c | 68 +-
> src/acpica/source/components/tables/tbprint.c | 18 +-
> src/acpica/source/components/tables/tbxfroot.c | 6 +-
> src/acpica/source/components/utilities/utaddress.c | 22 +-
> src/acpica/source/components/utilities/utbuffer.c | 9 +
> src/acpica/source/components/utilities/utglobal.c | 13 +-
> src/acpica/source/components/utilities/utmisc.c | 2 +
> src/acpica/source/components/utilities/utosi.c | 1 +
> src/acpica/source/components/utilities/utprint.c | 13 +-
> src/acpica/source/components/utilities/utstate.c | 38 --
> src/acpica/source/components/utilities/utuuid.c | 2 +
> src/acpica/source/include/acapps.h | 8 +-
> src/acpica/source/include/acdebug.h | 2 +-
> src/acpica/source/include/acdisasm.h | 20 +-
> src/acpica/source/include/acglobal.h | 9 +-
> src/acpica/source/include/aclocal.h | 2 +-
> src/acpica/source/include/acmacros.h | 13 +-
> src/acpica/source/include/acopcode.h | 2 +
> src/acpica/source/include/acpixf.h | 4 +-
> src/acpica/source/include/acresrc.h | 4 +-
> src/acpica/source/include/acrestyp.h | 54 +-
> src/acpica/source/include/acstruct.h | 5 -
> src/acpica/source/include/actables.h | 13 +-
> src/acpica/source/include/actbl2.h | 83 +--
> src/acpica/source/include/actypes.h | 46 +-
> src/acpica/source/include/acutils.h | 27 +-
> src/acpica/source/include/amlcode.h | 2 +-
> src/acpica/source/include/platform/acenv.h | 1 +
> src/acpica/source/tools/acpiexec/aeregion.c | 8 +-
> 77 files changed, 1413 insertions(+), 1131 deletions(-)
>
> diff --git a/src/acpica/source/common/adfile.c b/src/acpica/source/common/adfile.c
> index 6248983..96a2f25 100644
> --- a/src/acpica/source/common/adfile.c
> +++ b/src/acpica/source/common/adfile.c
> @@ -367,7 +367,10 @@ FlSplitInputPathname (
> char *Filename;
>
>
> - *OutDirectoryPath = NULL;
> + if (OutDirectoryPath)
> + {
> + *OutDirectoryPath = NULL;
> + }
>
> if (!InputPath)
> {
> @@ -412,7 +415,10 @@ FlSplitInputPathname (
> return (AE_NO_MEMORY);
> }
>
> - *OutDirectoryPath = DirectoryPath;
> + if (OutDirectoryPath)
> + {
> + *OutDirectoryPath = DirectoryPath;
> + }
>
> if (OutFilename)
> {
> diff --git a/src/acpica/source/common/adisasm.c b/src/acpica/source/common/adisasm.c
> index f4baa62..53abd15 100644
> --- a/src/acpica/source/common/adisasm.c
> +++ b/src/acpica/source/common/adisasm.c
> @@ -136,6 +136,11 @@ AdCreateTableHeader (
> char *Filename,
> ACPI_TABLE_HEADER *Table);
>
> +static ACPI_STATUS
> +AdStoreTable (
> + ACPI_TABLE_HEADER *Table,
> + UINT32 *TableIndex);
> +
> /* Stubs for ASL compiler */
>
> #ifndef ACPI_ASL_COMPILER
> @@ -370,7 +375,7 @@ AdAmlDisassemble (
> return (Status);
> }
>
> - if (!AcpiGbl_DbOpt_disasm)
> + if (!AcpiGbl_DbOpt_Disasm)
> {
> return (AE_OK);
> }
> @@ -409,7 +414,6 @@ AdAmlDisassemble (
> {
> fprintf (stderr, "Could not open output file %s\n", DisasmFilename);
> Status = AE_ERROR;
> - ACPI_FREE (DisasmFilename);
> goto Cleanup;
> }
>
> @@ -418,9 +422,11 @@ AdAmlDisassemble (
>
> *OutFilename = DisasmFilename;
>
> - if (!AcpiUtIsAmlTable (Table))
> + /* ForceAmlDisassembly means to assume the table contains valid AML */
> +
> + if (!AcpiGbl_ForceAmlDisassembly && !AcpiUtIsAmlTable (Table))
> {
> - AdDisassemblerHeader (Filename);
> + AdDisassemblerHeader (Filename, ACPI_IS_DATA_TABLE);
> AcpiOsPrintf (" * ACPI Data Table [%4.4s]\n *\n",
> Table->Signature);
> AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength] "
> @@ -558,7 +564,7 @@ AdAmlDisassemble (
>
> /* Optional displays */
>
> - if (AcpiGbl_DbOpt_disasm)
> + if (AcpiGbl_DbOpt_Disasm)
> {
> /* This is the real disassembly */
>
> @@ -587,7 +593,7 @@ AdAmlDisassemble (
>
> Cleanup:
>
> - if (Table && !AcpiUtIsAmlTable (Table))
> + if (Table && !AcpiGbl_ForceAmlDisassembly &&!AcpiUtIsAmlTable (Table))
> {
> ACPI_FREE (Table);
> }
> @@ -615,6 +621,7 @@ Cleanup:
> * FUNCTION: AdDisassemblerHeader
> *
> * PARAMETERS: Filename - Input file for the table
> + * TableType - Either AML or DataTable
> *
> * RETURN: None
> *
> @@ -625,7 +632,8 @@ Cleanup:
>
> void
> AdDisassemblerHeader (
> - char *Filename)
> + char *Filename,
> + UINT8 TableType)
> {
> time_t Timer;
>
> @@ -637,17 +645,20 @@ AdDisassemblerHeader (
> AcpiOsPrintf ("/*\n");
> AcpiOsPrintf (ACPI_COMMON_HEADER (AML_DISASSEMBLER_NAME, " * "));
>
> - if (AcpiGbl_CstyleDisassembly)
> + if (TableType == ACPI_IS_AML_TABLE)
> {
> - AcpiOsPrintf (
> - " * Disassembling to symbolic ASL+ operators\n"
> - " *\n");
> - }
> - else
> - {
> - AcpiOsPrintf (
> - " * Disassembling to non-symbolic legacy ASL operators\n"
> - " *\n");
> + if (AcpiGbl_CstyleDisassembly)
> + {
> + AcpiOsPrintf (
> + " * Disassembling to symbolic ASL+ operators\n"
> + " *\n");
> + }
> + else
> + {
> + AcpiOsPrintf (
> + " * Disassembling to non-symbolic legacy ASL operators\n"
> + " *\n");
> + }
> }
>
> AcpiOsPrintf (" * Disassembly of %s, %s", Filename, ctime (&Timer));
> @@ -681,7 +692,7 @@ AdCreateTableHeader (
> /*
> * Print file header and dump original table header
> */
> - AdDisassemblerHeader (Filename);
> + AdDisassemblerHeader (Filename, ACPI_IS_AML_TABLE);
>
> AcpiOsPrintf (" * Original Table Header:\n");
> AcpiOsPrintf (" * Signature \"%4.4s\"\n", Table->Signature);
> @@ -789,7 +800,7 @@ AdDisplayTables (
> return (AE_NOT_EXIST);
> }
>
> - if (!AcpiGbl_DbOpt_verbose)
> + if (!AcpiGbl_DbOpt_Verbose)
> {
> AdCreateTableHeader (Filename, Table);
> }
> @@ -797,7 +808,7 @@ AdDisplayTables (
> AcpiDmDisassemble (NULL, AcpiGbl_ParseOpRoot, ACPI_UINT32_MAX);
> MpEmitMappingInfo ();
>
> - if (AcpiGbl_DbOpt_verbose)
> + if (AcpiGbl_DbOpt_Verbose)
> {
> AcpiOsPrintf ("\n\nTable Header:\n");
> AcpiUtDebugDumpBuffer ((UINT8 *) Table, sizeof (ACPI_TABLE_HEADER),
> @@ -812,6 +823,43 @@ AdDisplayTables (
> }
>
>
> +/*******************************************************************************
> + *
> + * FUNCTION: AdStoreTable
> + *
> + * PARAMETERS: Table - Table header
> + * TableIndex - Where the table index is returned
> + *
> + * RETURN: Status and table index.
> + *
> + * DESCRIPTION: Add an ACPI table to the global table list
> + *
> + ******************************************************************************/
> +
> +static ACPI_STATUS
> +AdStoreTable (
> + ACPI_TABLE_HEADER *Table,
> + UINT32 *TableIndex)
> +{
> + ACPI_STATUS Status;
> + ACPI_TABLE_DESC *TableDesc;
> +
> +
> + Status = AcpiTbGetNextTableDescriptor (TableIndex, &TableDesc);
> + if (ACPI_FAILURE (Status))
> + {
> + return (Status);
> + }
> +
> + /* Initialize added table */
> +
> + AcpiTbInitTableDescriptor (TableDesc, ACPI_PTR_TO_PHYSADDR (Table),
> + ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, Table);
> + AcpiTbValidateTable (TableDesc);
> + return (AE_OK);
> +}
> +
> +
> /******************************************************************************
> *
> * FUNCTION: AdGetLocalTables
> @@ -849,8 +897,7 @@ AdGetLocalTables (
>
> /* Store DSDT in the Table Manager */
>
> - Status = AcpiTbStoreTable (0, NewTable, NewTable->Length,
> - 0, &TableIndex);
> + Status = AdStoreTable (NewTable, &TableIndex);
> if (ACPI_FAILURE (Status))
> {
> fprintf (stderr, "Could not store DSDT\n");
> @@ -943,9 +990,7 @@ AdParseTable (
>
> if (LoadTable)
> {
> - Status = AcpiTbStoreTable ((ACPI_PHYSICAL_ADDRESS) Table, Table,
> - Table->Length, ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL,
> - &TableIndex);
> + Status = AdStoreTable (Table, &TableIndex);
> if (ACPI_FAILURE (Status))
> {
> return (Status);
> diff --git a/src/acpica/source/common/dmtable.c b/src/acpica/source/common/dmtable.c
> index b495ad2..ca165df 100644
> --- a/src/acpica/source/common/dmtable.c
> +++ b/src/acpica/source/common/dmtable.c
> @@ -313,13 +313,6 @@ static const char *AcpiDmPmttSubnames[] =
> "Unknown SubTable Type" /* Reserved */
> };
>
> -static const char *AcpiDmSlicSubnames[] =
> -{
> - "Public Key Structure",
> - "Windows Marker Structure",
> - "Unknown SubTable Type" /* Reserved */
> -};
> -
> static const char *AcpiDmSratSubnames[] =
> {
> "Processor Local APIC/SAPIC Affinity",
> @@ -411,6 +404,7 @@ ACPI_DMTABLE_DATA AcpiDmTableData[] =
> {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi, "Management Controller Host Interface table"},
> {ACPI_SIG_MPST, AcpiDmTableInfoMpst, AcpiDmDumpMpst, DtCompileMpst, TemplateMpst, "Memory Power State Table"},
> {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct, "Maximum System Characteristics Table"},
> + {ACPI_SIG_MSDM, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateMsdm, "Microsoft Data Management table"},
> {ACPI_SIG_MTMR, NULL, AcpiDmDumpMtmr, DtCompileMtmr, TemplateMtmr, "MID Timer Table"},
> {ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct, "Platform Communications Channel Table"},
> {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt, "Platform Memory Topology Table"},
> @@ -587,10 +581,20 @@ AcpiDmDumpDataTable (
> }
> else
> {
> - AcpiOsPrintf ("\n**** Unknown ACPI table type [%4.4s]\n\n",
> + AcpiOsPrintf ("\n**** Unknown ACPI table signature [%4.4s]\n\n",
> Table->Signature);
> - fprintf (stderr, "Unknown ACPI table signature [%4.4s], decoding header only\n",
> +
> + fprintf (stderr, "Unknown ACPI table signature [%4.4s], ",
> Table->Signature);
> +
> + if (!AcpiGbl_ForceAmlDisassembly)
> + {
> + fprintf (stderr, "decoding ACPI table header only\n");
> + }
> + else
> + {
> + fprintf (stderr, "assuming table contains valid AML code\n");
> + }
> }
> }
> else if (TableData->TableHandler)
> @@ -758,6 +762,7 @@ AcpiDmDumpTable (
> UINT32 ByteLength;
> UINT8 Temp8;
> UINT16 Temp16;
> + UINT32 Temp32;
> UINT64 Value;
> ACPI_DMTABLE_DATA *TableData;
> const char *Name;
> @@ -787,7 +792,8 @@ AcpiDmDumpTable (
> if ((CurrentOffset >= TableLength) ||
> (SubtableLength && (Info->Offset >= SubtableLength)))
> {
> - AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n");
> + AcpiOsPrintf (
> + "**** ACPI table terminates in the middle of a data structure! (dump table)\n");
> return (AE_BAD_DATA);
> }
>
> @@ -832,7 +838,6 @@ AcpiDmDumpTable (
> case ACPI_DMT_UINT32:
> case ACPI_DMT_NAME4:
> case ACPI_DMT_SIG:
> - case ACPI_DMT_SLIC:
> case ACPI_DMT_LPIT:
>
> ByteLength = 4;
> @@ -877,6 +882,12 @@ AcpiDmDumpTable (
> ByteLength = 128;
> break;
>
> + case ACPI_DMT_BUFFER:
> + case ACPI_DMT_RAW_BUFFER:
> +
> + ByteLength = SubtableLength;
> + break;
> +
> case ACPI_DMT_STRING:
>
> ByteLength = ACPI_STRLEN (ACPI_CAST_PTR (char, Target)) + 1;
> @@ -910,7 +921,8 @@ AcpiDmDumpTable (
>
> if (CurrentOffset + ByteLength > TableLength)
> {
> - AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n");
> + AcpiOsPrintf (
> + "**** ACPI table terminates in the middle of a data structure!\n");
> return (AE_BAD_DATA);
> }
>
> @@ -1077,8 +1089,9 @@ AcpiDmDumpTable (
>
> AcpiOsPrintf ("%2.2X", *Target);
> Temp8 = AcpiDmGenerateChecksum (Table,
> - ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
> - ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum);
> + ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
> + ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum);
> +
> if (Temp8 != ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum)
> {
> AcpiOsPrintf (
> @@ -1104,7 +1117,7 @@ AcpiDmDumpTable (
> Temp8 = ACPI_GAS_WIDTH_RESERVED;
> }
>
> - AcpiOsPrintf (UINT8_FORMAT, Temp8, AcpiDmGasAccessWidth[Temp8]);
> + AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmGasAccessWidth[Temp8]);
> break;
>
> case ACPI_DMT_GAS:
> @@ -1141,7 +1154,8 @@ AcpiDmDumpTable (
> Temp16 = ACPI_DMAR_TYPE_RESERVED;
> }
>
> - AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target), AcpiDmDmarSubnames[Temp16]);
> + AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
> + AcpiDmDmarSubnames[Temp16]);
> break;
>
> case ACPI_DMT_DMAR_SCOPE:
> @@ -1154,7 +1168,8 @@ AcpiDmDumpTable (
> Temp8 = ACPI_DMAR_SCOPE_TYPE_RESERVED;
> }
>
> - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmDmarScope[Temp8]);
> + AcpiOsPrintf (UINT8_FORMAT, *Target,
> + AcpiDmDmarScope[Temp8]);
> break;
>
> case ACPI_DMT_EINJACT:
> @@ -1167,7 +1182,8 @@ AcpiDmDumpTable (
> Temp8 = ACPI_EINJ_ACTION_RESERVED;
> }
>
> - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmEinjActions[Temp8]);
> + AcpiOsPrintf (UINT8_FORMAT, *Target,
> + AcpiDmEinjActions[Temp8]);
> break;
>
> case ACPI_DMT_EINJINST:
> @@ -1180,7 +1196,8 @@ AcpiDmDumpTable (
> Temp8 = ACPI_EINJ_INSTRUCTION_RESERVED;
> }
>
> - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmEinjInstructions[Temp8]);
> + AcpiOsPrintf (UINT8_FORMAT, *Target,
> + AcpiDmEinjInstructions[Temp8]);
> break;
>
> case ACPI_DMT_ERSTACT:
> @@ -1193,7 +1210,8 @@ AcpiDmDumpTable (
> Temp8 = ACPI_ERST_ACTION_RESERVED;
> }
>
> - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmErstActions[Temp8]);
> + AcpiOsPrintf (UINT8_FORMAT, *Target,
> + AcpiDmErstActions[Temp8]);
> break;
>
> case ACPI_DMT_ERSTINST:
> @@ -1206,7 +1224,8 @@ AcpiDmDumpTable (
> Temp8 = ACPI_ERST_INSTRUCTION_RESERVED;
> }
>
> - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmErstInstructions[Temp8]);
> + AcpiOsPrintf (UINT8_FORMAT, *Target,
> + AcpiDmErstInstructions[Temp8]);
> break;
>
> case ACPI_DMT_GTDT:
> @@ -1219,7 +1238,8 @@ AcpiDmDumpTable (
> Temp8 = ACPI_GTDT_TYPE_RESERVED;
> }
>
> - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmGtdtSubnames[Temp8]);
> + AcpiOsPrintf (UINT8_FORMAT, *Target,
> + AcpiDmGtdtSubnames[Temp8]);
> break;
>
> case ACPI_DMT_HEST:
> @@ -1232,12 +1252,15 @@ AcpiDmDumpTable (
> Temp16 = ACPI_HEST_TYPE_RESERVED;
> }
>
> - AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target), AcpiDmHestSubnames[Temp16]);
> + AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
> + AcpiDmHestSubnames[Temp16]);
> break;
>
> case ACPI_DMT_HESTNTFY:
>
> - AcpiOsPrintf (STRING_FORMAT, "Hardware Error Notification Structure");
> + AcpiOsPrintf (STRING_FORMAT,
> + "Hardware Error Notification Structure");
> +
> AcpiDmDumpTable (TableLength, CurrentOffset, Target,
> sizeof (ACPI_HEST_NOTIFY), AcpiDmTableInfoHestNotify);
> AcpiOsPrintf ("\n");
> @@ -1254,7 +1277,8 @@ AcpiDmDumpTable (
> Temp8 = ACPI_HEST_NOTIFY_RESERVED;
> }
>
> - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmHestNotifySubnames[Temp8]);
> + AcpiOsPrintf (UINT8_FORMAT, *Target,
> + AcpiDmHestNotifySubnames[Temp8]);
> break;
>
> case ACPI_DMT_MADT:
> @@ -1267,7 +1291,8 @@ AcpiDmDumpTable (
> Temp8 = ACPI_MADT_TYPE_RESERVED;
> }
>
> - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmMadtSubnames[Temp8]);
> + AcpiOsPrintf (UINT8_FORMAT, *Target,
> + AcpiDmMadtSubnames[Temp8]);
> break;
>
> case ACPI_DMT_PCCT:
> @@ -1280,7 +1305,8 @@ AcpiDmDumpTable (
> Temp8 = ACPI_PCCT_TYPE_RESERVED;
> }
>
> - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmPcctSubnames[Temp8]);
> + AcpiOsPrintf (UINT8_FORMAT, *Target,
> + AcpiDmPcctSubnames[Temp8]);
> break;
>
> case ACPI_DMT_PMTT:
> @@ -1293,20 +1319,20 @@ AcpiDmDumpTable (
> Temp8 = ACPI_PMTT_TYPE_RESERVED;
> }
>
> - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmPmttSubnames[Temp8]);
> + AcpiOsPrintf (UINT8_FORMAT, *Target,
> + AcpiDmPmttSubnames[Temp8]);
> break;
>
> - case ACPI_DMT_SLIC:
> -
> - /* SLIC subtable types */
> -
> - Temp8 = *Target;
> - if (Temp8 > ACPI_SLIC_TYPE_RESERVED)
> - {
> - Temp8 = ACPI_SLIC_TYPE_RESERVED;
> - }
> + case ACPI_DMT_RAW_BUFFER:
> + /*
> + * Currently only used for SLIC table
> + */
> + AcpiOsPrintf ("/* Proprietary data structure */ ");
>
> - AcpiOsPrintf (UINT32_FORMAT, *Target, AcpiDmSlicSubnames[Temp8]);
> + AcpiDmDumpBuffer (Table, sizeof (ACPI_TABLE_HEADER),
> + ByteLength, sizeof (ACPI_TABLE_HEADER),
> + "Licensing Data", TRUE);
> + AcpiOsPrintf ("\n");
> break;
>
> case ACPI_DMT_SRAT:
> @@ -1319,7 +1345,8 @@ AcpiDmDumpTable (
> Temp8 = ACPI_SRAT_TYPE_RESERVED;
> }
>
> - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmSratSubnames[Temp8]);
> + AcpiOsPrintf (UINT8_FORMAT, *Target,
> + AcpiDmSratSubnames[Temp8]);
> break;
>
> case ACPI_DMT_FADTPM:
> @@ -1332,7 +1359,8 @@ AcpiDmDumpTable (
> Temp8 = ACPI_FADT_PM_RESERVED;
> }
>
> - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmFadtProfiles[Temp8]);
> + AcpiOsPrintf (UINT8_FORMAT, *Target,
> + AcpiDmFadtProfiles[Temp8]);
> break;
>
> case ACPI_DMT_IVRS:
> @@ -1367,26 +1395,14 @@ AcpiDmDumpTable (
>
> /* LPIT subtable types */
>
> - Temp8 = *Target;
> - switch (Temp8)
> + Temp32 = ACPI_GET32 (Target);
> + if (Temp32 > ACPI_LPIT_TYPE_RESERVED)
> {
> - case ACPI_LPIT_TYPE_NATIVE_CSTATE:
> -
> - Name = AcpiDmLpitSubnames[0];
> - break;
> -
> - case ACPI_LPIT_TYPE_SIMPLE_IO:
> -
> - Name = AcpiDmLpitSubnames[1];
> - break;
> -
> - default:
> -
> - Name = AcpiDmLpitSubnames[2];
> - break;
> + Temp32 = ACPI_LPIT_TYPE_RESERVED;
> }
>
> - AcpiOsPrintf (UINT32_FORMAT, *Target, Name);
> + AcpiOsPrintf (UINT32_FORMAT, ACPI_GET32 (Target),
> + AcpiDmLpitSubnames[Temp32]);
> break;
>
> case ACPI_DMT_EXIT:
> @@ -1403,8 +1419,10 @@ AcpiDmDumpTable (
>
> if (TableOffset && !SubtableLength)
> {
> - /* If this table is not the main table, subtable must have valid length */
> -
> + /*
> + * If this table is not the main table, the subtable must have a
> + * valid length
> + */
> AcpiOsPrintf ("Invalid zero length subtable\n");
> return (AE_BAD_DATA);
> }
> diff --git a/src/acpica/source/common/dmtbdump.c b/src/acpica/source/common/dmtbdump.c
> index 2f2abe6..a12020b 100644
> --- a/src/acpica/source/common/dmtbdump.c
> +++ b/src/acpica/source/common/dmtbdump.c
> @@ -131,14 +131,6 @@ AcpiDmValidateFadtLength (
> UINT32 Revision,
> UINT32 Length);
>
> -static void
> -AcpiDmDumpBuffer (
> - void *Table,
> - UINT32 BufferOffset,
> - UINT32 Length,
> - UINT32 AbsoluteOffset,
> - char *Header);
> -
>
> /*******************************************************************************
> *
> @@ -150,6 +142,7 @@ AcpiDmDumpBuffer (
> * AbsoluteOffset - Offset of buffer in the main ACPI table
> * Header - Name of the buffer field (printed on the
> * first line only.)
> + * MultiLine - TRUE if a large, multi-line buffer
> *
> * RETURN: None
> *
> @@ -158,13 +151,14 @@ AcpiDmDumpBuffer (
> *
> ******************************************************************************/
>
> -static void
> +void
> AcpiDmDumpBuffer (
> void *Table,
> UINT32 BufferOffset,
> UINT32 Length,
> UINT32 AbsoluteOffset,
> - char *Header)
> + char *Header,
> + BOOLEAN MultiLine)
> {
> UINT8 *Buffer;
> UINT32 i;
> @@ -182,10 +176,19 @@ AcpiDmDumpBuffer (
> {
> if (!(i % 16))
> {
> - AcpiOsPrintf ("\n");
> - AcpiDmLineHeader (AbsoluteOffset,
> - ((Length - i) > 16) ? 16 : (Length - i), Header);
> - Header = NULL;
> + if (MultiLine)
> + {
> + /* Insert a backslash - line continuation character */
> +
> + AcpiOsPrintf ("\\\n ");
> + }
> + else
> + {
> + AcpiOsPrintf ("\n");
> + AcpiDmLineHeader (AbsoluteOffset,
> + ((Length - i) > 16) ? 16 : (Length - i), Header);
> + Header = NULL;
> + }
> }
>
> AcpiOsPrintf ("%.02X ", *Buffer);
> @@ -598,7 +601,7 @@ AcpiDmDumpAsf (
> DataOffset++;
> if (DataOffset > Table->Length)
> {
> - AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n");
> + AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure! (ASF! table)\n");
> return;
> }
> }
> @@ -764,7 +767,7 @@ AcpiDmDumpCsrt (
> InfoLength = SubSubTable->Length - SubSubOffset;
>
> AcpiDmDumpBuffer (SubSubTable, SubSubOffset, InfoLength,
> - Offset + SubOffset + SubSubOffset, "ResourceInfo");
> + Offset + SubOffset + SubSubOffset, "ResourceInfo", FALSE);
> SubSubOffset += InfoLength;
>
> /* Point to next sub-subtable */
> @@ -884,7 +887,7 @@ AcpiDmDumpDbg2 (
> if (SubTable->OemDataOffset)
> {
> AcpiDmDumpBuffer (SubTable, SubTable->OemDataOffset, SubTable->OemDataLength,
> - Offset + SubTable->OemDataOffset, "OEM Data");
> + Offset + SubTable->OemDataOffset, "OEM Data", FALSE);
> }
>
> /* Point to next subtable */
> @@ -2607,67 +2610,8 @@ void
> AcpiDmDumpSlic (
> ACPI_TABLE_HEADER *Table)
> {
> - ACPI_STATUS Status;
> - UINT32 Offset = sizeof (ACPI_TABLE_SLIC);
> - ACPI_SLIC_HEADER *SubTable;
> - ACPI_DMTABLE_INFO *InfoTable;
> -
> -
> - /* There is no main SLIC table, only subtables */
> -
> - SubTable = ACPI_ADD_PTR (ACPI_SLIC_HEADER, Table, Offset);
> - while (Offset < Table->Length)
> - {
> - /* Common subtable header */
> -
> - AcpiOsPrintf ("\n");
> - Status = AcpiDmDumpTable (Table->Length, Offset, SubTable,
> - SubTable->Length, AcpiDmTableInfoSlicHdr);
> - if (ACPI_FAILURE (Status))
> - {
> - return;
> - }
> -
> - switch (SubTable->Type)
> - {
> - case ACPI_SLIC_TYPE_PUBLIC_KEY:
> -
> - InfoTable = AcpiDmTableInfoSlic0;
> - break;
> -
> - case ACPI_SLIC_TYPE_WINDOWS_MARKER:
> -
> - InfoTable = AcpiDmTableInfoSlic1;
> - break;
> -
> - default:
> -
> - AcpiOsPrintf ("\n**** Unknown SLIC subtable type 0x%X\n", SubTable->Type);
> -
> - /* Attempt to continue */
> -
> - if (!SubTable->Length)
> - {
> - AcpiOsPrintf ("Invalid zero length subtable\n");
> - return;
> - }
> - goto NextSubTable;
> - }
> -
> - AcpiOsPrintf ("\n");
> - Status = AcpiDmDumpTable (Table->Length, Offset, SubTable,
> - SubTable->Length, InfoTable);
> - if (ACPI_FAILURE (Status))
> - {
> - return;
> - }
> -
> -NextSubTable:
> - /* Point to next subtable */
> -
> - Offset += SubTable->Length;
> - SubTable = ACPI_ADD_PTR (ACPI_SLIC_HEADER, SubTable, SubTable->Length);
> - }
> + AcpiDmDumpTable (Table->Length, sizeof (ACPI_TABLE_HEADER), Table,
> + Table->Length - sizeof (*Table), AcpiDmTableInfoSlic);
> }
>
>
> diff --git a/src/acpica/source/common/dmtbinfo.c b/src/acpica/source/common/dmtbinfo.c
> index 309585a..0405462 100644
> --- a/src/acpica/source/common/dmtbinfo.c
> +++ b/src/acpica/source/common/dmtbinfo.c
> @@ -272,9 +272,7 @@
> #define ACPI_S3PTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_HEADER,f)
> #define ACPI_S3PT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_RESUME,f)
> #define ACPI_S3PT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_SUSPEND,f)
> -#define ACPI_SLICH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SLIC_HEADER,f)
> -#define ACPI_SLIC0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SLIC_KEY,f)
> -#define ACPI_SLIC1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SLIC_MARKER,f)
> +#define ACPI_SLIC_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIC,f)
> #define ACPI_SRATH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
> #define ACPI_SRAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_CPU_AFFINITY,f)
> #define ACPI_SRAT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_MEM_AFFINITY,f)
> @@ -2115,42 +2113,16 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSbst[] =
>
> /*******************************************************************************
> *
> - * SLIC - Software Licensing Description Table. There is no common table, just
> - * the standard ACPI header and then subtables.
> + * SLIC - Software Licensing Description Table. This table contains the standard
> + * ACPI header followed by proprietary data structures
> *
> ******************************************************************************/
>
> -/* Common Subtable header (one per Subtable) */
> -
> -ACPI_DMTABLE_INFO AcpiDmTableInfoSlicHdr[] =
> -{
> - {ACPI_DMT_SLIC, ACPI_SLICH_OFFSET (Type), "Subtable Type", 0},
> - {ACPI_DMT_UINT32, ACPI_SLICH_OFFSET (Length), "Length", DT_LENGTH},
> - ACPI_DMT_TERMINATOR
> -};
> -
> -ACPI_DMTABLE_INFO AcpiDmTableInfoSlic0[] =
> -{
> - {ACPI_DMT_UINT8, ACPI_SLIC0_OFFSET (KeyType), "Key Type", 0},
> - {ACPI_DMT_UINT8, ACPI_SLIC0_OFFSET (Version), "Version", 0},
> - {ACPI_DMT_UINT16, ACPI_SLIC0_OFFSET (Reserved), "Reserved", 0},
> - {ACPI_DMT_UINT32, ACPI_SLIC0_OFFSET (Algorithm), "Algorithm", 0},
> - {ACPI_DMT_NAME4, ACPI_SLIC0_OFFSET (Magic), "Magic", 0},
> - {ACPI_DMT_UINT32, ACPI_SLIC0_OFFSET (BitLength), "BitLength", 0},
> - {ACPI_DMT_UINT32, ACPI_SLIC0_OFFSET (Exponent), "Exponent", 0},
> - {ACPI_DMT_BUF128, ACPI_SLIC0_OFFSET (Modulus[0]), "Modulus", 0},
> - ACPI_DMT_TERMINATOR
> -};
> +/* Single subtable, a proprietary format, so treat it as a buffer */
>
> -ACPI_DMTABLE_INFO AcpiDmTableInfoSlic1[] =
> +ACPI_DMTABLE_INFO AcpiDmTableInfoSlic[] =
> {
> - {ACPI_DMT_UINT32, ACPI_SLIC1_OFFSET (Version), "Version", 0},
> - {ACPI_DMT_NAME6, ACPI_SLIC1_OFFSET (OemId[0]), "Oem ID", 0},
> - {ACPI_DMT_NAME8, ACPI_SLIC1_OFFSET (OemTableId[0]), "Oem Table ID", 0},
> - {ACPI_DMT_NAME8, ACPI_SLIC1_OFFSET (WindowsFlag[0]), "Windows Flag", 0},
> - {ACPI_DMT_UINT32, ACPI_SLIC1_OFFSET (SlicVersion), "SLIC Version", 0},
> - {ACPI_DMT_BUF16, ACPI_SLIC1_OFFSET (Reserved[0]), "Reserved", 0},
> - {ACPI_DMT_BUF128, ACPI_SLIC1_OFFSET (Signature[0]), "Signature", 0},
> + {ACPI_DMT_RAW_BUFFER, 0, "Software Licensing Structure", 0},
> ACPI_DMT_TERMINATOR
> };
>
> @@ -2163,7 +2135,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSlic1[] =
>
> ACPI_DMTABLE_INFO AcpiDmTableInfoSlit[] =
> {
> - {ACPI_DMT_UINT64, ACPI_SLIT_OFFSET (LocalityCount), "Localities", 0},
> + {ACPI_DMT_UINT64, ACPI_SLIT_OFFSET (LocalityCount), "Localities", 0},
> ACPI_DMT_TERMINATOR
> };
>
> diff --git a/src/acpica/source/compiler/aslcodegen.c b/src/acpica/source/compiler/aslcodegen.c
> index 7136ff1..2f10d31 100644
> --- a/src/acpica/source/compiler/aslcodegen.c
> +++ b/src/acpica/source/compiler/aslcodegen.c
> @@ -532,7 +532,7 @@ CgWriteTableHeader (
>
> /* Compiler version */
>
> - TableHeader.AslCompilerRevision = ASL_REVISION;
> + TableHeader.AslCompilerRevision = ACPI_CA_VERSION;
>
> /* Table length. Checksum zero for now, will rewrite later */
>
> diff --git a/src/acpica/source/compiler/aslcompile.c b/src/acpica/source/compiler/aslcompile.c
> index 6bf0604..969f97d 100644
> --- a/src/acpica/source/compiler/aslcompile.c
> +++ b/src/acpica/source/compiler/aslcompile.c
> @@ -267,8 +267,16 @@ CmDoCompile (
> Event = UtBeginEvent ("Constant folding via AML interpreter");
> DbgPrint (ASL_DEBUG_OUTPUT,
> "\nInterpreting compile-time constant expressions\n\n");
> - TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD,
> - OpcAmlConstantWalk, NULL, NULL);
> +
> + if (Gbl_FoldConstants)
> + {
> + TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD,
> + OpcAmlConstantWalk, NULL, NULL);
> + }
> + else
> + {
> + DbgPrint (ASL_PARSE_OUTPUT, " Optional folding disabled\n");
> + }
> UtEndEvent (Event);
>
> /* Update AML opcodes if necessary, after constant folding */
> diff --git a/src/acpica/source/compiler/aslcompiler.h b/src/acpica/source/compiler/aslcompiler.h
> index 36c9b9e..68042b2 100644
> --- a/src/acpica/source/compiler/aslcompiler.h
> +++ b/src/acpica/source/compiler/aslcompiler.h
> @@ -758,6 +758,10 @@ TrAllocateNode (
> UINT32 ParseOpcode);
>
> void
> +TrPrintNodeCompileFlags (
> + UINT32 Flags);
> +
> +void
> TrReleaseNode (
> ACPI_PARSE_OBJECT *Op);
>
> @@ -777,6 +781,10 @@ TrCreateLeafNode (
> UINT32 ParseOpcode);
>
> ACPI_PARSE_OBJECT *
> +TrCreateNullTarget (
> + void);
> +
> +ACPI_PARSE_OBJECT *
> TrCreateAssignmentNode (
> ACPI_PARSE_OBJECT *Target,
> ACPI_PARSE_OBJECT *Source);
> diff --git a/src/acpica/source/compiler/aslcompiler.y b/src/acpica/source/compiler/aslcompiler.y
> index 032d062..f1365ec 100644
> --- a/src/acpica/source/compiler/aslcompiler.y
> +++ b/src/acpica/source/compiler/aslcompiler.y
> @@ -644,7 +644,7 @@ AslLocalAllocate (
> %type <n> Term
> %type <n> TermArg
> %type <n> TermList
> -%type <n> UserTerm
> +%type <n> MethodInvocationTerm
>
> /* Type4Opcode is obsolete */
>
> @@ -1054,7 +1054,7 @@ Expression
> : PARSEOP_EXP_LOGICAL_NOT {$<n>$ = TrCreateLeafNode (PARSEOP_LNOT);}
> TermArg {$$ = TrLinkChildren ($<n>2,1,$3);}
> | PARSEOP_EXP_NOT {$<n>$ = TrCreateLeafNode (PARSEOP_NOT);}
> - TermArg {$$ = TrLinkChildren ($<n>2,2,$3,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>2,2,$3,TrCreateNullTarget ());}
>
> | SuperName PARSEOP_EXP_INCREMENT {$<n>$ = TrCreateLeafNode (PARSEOP_INCREMENT);}
> {$$ = TrLinkChildren ($<n>3,1,$1);}
> @@ -1064,27 +1064,27 @@ Expression
> /* Binary operators: math and logical */
>
> | TermArg PARSEOP_EXP_ADD {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_DIVIDE {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
> - TermArg {$$ = TrLinkChildren ($<n>3,4,$1,$4,TrCreateLeafNode (PARSEOP_ZERO),
> - TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,4,$1,$4,TrCreateNullTarget (),
> + TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_MODULO {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_MULTIPLY {$<n>$ = TrCreateLeafNode (PARSEOP_MULTIPLY);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_SHIFT_LEFT {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_SHIFT_RIGHT {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_SUBTRACT {$<n>$ = TrCreateLeafNode (PARSEOP_SUBTRACT);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
>
> | TermArg PARSEOP_EXP_AND {$<n>$ = TrCreateLeafNode (PARSEOP_AND);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_OR {$<n>$ = TrCreateLeafNode (PARSEOP_OR);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_XOR {$<n>$ = TrCreateLeafNode (PARSEOP_XOR);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
>
> | TermArg PARSEOP_EXP_GREATER {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
> TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
> @@ -1122,7 +1122,7 @@ EqualsTerm
> TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
>
> | TermArg PARSEOP_EXP_DIV_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
> - TermArg {$$ = TrLinkChildren ($<n>3,4,$1,$4,TrCreateLeafNode (PARSEOP_ZERO),
> + TermArg {$$ = TrLinkChildren ($<n>3,4,$1,$4,TrCreateNullTarget (),
> TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
>
> | TermArg PARSEOP_EXP_MOD_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
> @@ -1171,11 +1171,10 @@ TermList
>
> Term
> : Object {}
> - | Expression {}
> | Type1Opcode {}
> | Type2Opcode {}
> - | Type2IntegerOpcode {}
> - | Type2StringOpcode {}
> + | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> + | Type2StringOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> | Type2BufferOpcode {}
> | Type2BufferOrStringOpcode {}
> | error {$$ = AslDoError(); yyclearin;}
> @@ -1256,7 +1255,7 @@ NameSpaceModifier
> | ScopeTerm {}
> ;
>
> -UserTerm
> +MethodInvocationTerm
> : NameString '(' {TrUpdateNode (PARSEOP_METHODCALL, $1);}
> ArgList ')' {$$ = TrLinkChildNode ($1,$4);}
> ;
> @@ -1279,8 +1278,7 @@ Removed from TermArg due to reduce/reduce conflicts
> */
>
> TermArg
> - : Expression {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> - | Type2Opcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> + : Type2Opcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> | DataObject {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> | NameString {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> | ArgTerm {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> @@ -1288,8 +1286,8 @@ TermArg
> ;
>
> Target
> - : {$$ = TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), NODE_IS_TARGET | NODE_COMPILE_TIME_CONST);} /* Placeholder is a ZeroOp object */
> - | ',' {$$ = TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), NODE_IS_TARGET | NODE_COMPILE_TIME_CONST);} /* Placeholder is a ZeroOp object */
> + : {$$ = TrCreateNullTarget ();} /* Placeholder is a ZeroOp object */
> + | ',' {$$ = TrCreateNullTarget ();} /* Placeholder is a ZeroOp object */
> | ',' SuperName {$$ = TrSetNodeFlags ($2, NODE_IS_TARGET);}
> ;
>
> @@ -1377,7 +1375,7 @@ Type2Opcode
> | EqualsTerm {}
> | TimerTerm {}
> | WaitTerm {}
> - | UserTerm {}
> + | MethodInvocationTerm {}
> ;
>
> /*
> @@ -1385,7 +1383,8 @@ Type2Opcode
> */
>
> Type2IntegerOpcode /* "Type3" opcodes */
> - : AddTerm {}
> + : Expression {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> + | AddTerm {}
> | AndTerm {}
> | DecTerm {}
> | DivideTerm {}
> @@ -1431,7 +1430,7 @@ Type2BufferOpcode /* "Type5" Opcodes */
> ;
>
> Type2BufferOrStringOpcode
> - : ConcatTerm {}
> + : ConcatTerm {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> | PrintfTerm {}
> | FprintfTerm {}
> | MidTerm {}
> @@ -1467,7 +1466,7 @@ Type6Opcode
> : RefOfTerm {}
> | DerefOfTerm {}
> | IndexTerm {}
> - | UserTerm {}
> + | MethodInvocationTerm {}
> ;
>
> IncludeTerm
> @@ -2844,7 +2843,7 @@ SuperName
> | DebugTerm {}
> | Type6Opcode {}
>
> -/* For ObjectType: SuperName except for UserTerm (method invocation) */
> +/* For ObjectType: SuperName except for MethodInvocationTerm */
>
> ObjectTypeName
> : NameString {}
> @@ -2855,7 +2854,7 @@ ObjectTypeName
> | DerefOfTerm {}
> | IndexTerm {}
>
> -/* | UserTerm {} */ /* Caused reduce/reduce with Type6Opcode->UserTerm */
> +/* | MethodInvocationTerm {} */ /* Caused reduce/reduce with Type6Opcode->MethodInvocationTerm */
> ;
>
> ArgTerm
> diff --git a/src/acpica/source/compiler/asldefine.h b/src/acpica/source/compiler/asldefine.h
> index 00ad5a5..57f2ef4 100644
> --- a/src/acpica/source/compiler/asldefine.h
> +++ b/src/acpica/source/compiler/asldefine.h
> @@ -120,7 +120,6 @@
> /*
> * Compiler versions and names
> */
> -#define ASL_REVISION ACPI_CA_VERSION
> #define ASL_COMPILER_NAME "ASL+ Optimizing Compiler"
> #define AML_DISASSEMBLER_NAME "AML/ASL+ Disassembler"
> #define ASL_INVOCATION_NAME "iasl"
> diff --git a/src/acpica/source/compiler/aslfold.c b/src/acpica/source/compiler/aslfold.c
> index 82d6c8f..e320c76 100644
> --- a/src/acpica/source/compiler/aslfold.c
> +++ b/src/acpica/source/compiler/aslfold.c
> @@ -148,97 +148,125 @@ OpcUpdateIntegerNode (
> ACPI_PARSE_OBJECT *Op,
> UINT64 Value);
>
> +static ACPI_STATUS
> +TrTransformToStoreOp (
> + ACPI_PARSE_OBJECT *Op,
> + ACPI_WALK_STATE *WalkState);
> +
> +static ACPI_STATUS
> +TrSimpleConstantReduction (
> + ACPI_PARSE_OBJECT *Op,
> + ACPI_WALK_STATE *WalkState);
> +
> +static void
> +TrInstallReducedConstant (
> + ACPI_PARSE_OBJECT *Op,
> + ACPI_OPERAND_OBJECT *ObjDesc);
> +
>
> /*******************************************************************************
> *
> - * FUNCTION: OpcAmlEvaluationWalk1
> + * FUNCTION: OpcAmlConstantWalk
> *
> * PARAMETERS: ASL_WALK_CALLBACK
> *
> * RETURN: Status
> *
> - * DESCRIPTION: Descending callback for AML execution of constant subtrees
> + * DESCRIPTION: Reduce an Op and its subtree to a constant if possible
> *
> ******************************************************************************/
>
> -static ACPI_STATUS
> -OpcAmlEvaluationWalk1 (
> +ACPI_STATUS
> +OpcAmlConstantWalk (
> ACPI_PARSE_OBJECT *Op,
> UINT32 Level,
> void *Context)
> {
> - ACPI_WALK_STATE *WalkState = Context;
> - ACPI_STATUS Status;
> - ACPI_PARSE_OBJECT *OutOp;
> + ACPI_WALK_STATE *WalkState;
> + ACPI_STATUS Status = AE_OK;
>
>
> - WalkState->Op = Op;
> - WalkState->Opcode = Op->Common.AmlOpcode;
> - WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
> -
> - /* Copy child pointer to Arg for compatibility with Interpreter */
> + if (Op->Asl.CompileFlags == 0)
> + {
> + return (AE_OK);
> + }
>
> - if (Op->Asl.Child)
> + /*
> + * Only interested in subtrees that could possibly contain
> + * expressions that can be evaluated at this time
> + */
> + if ((!(Op->Asl.CompileFlags & NODE_COMPILE_TIME_CONST)) ||
> + (Op->Asl.CompileFlags & NODE_IS_TARGET))
> {
> - Op->Common.Value.Arg = Op->Asl.Child;
> + return (AE_OK);
> }
>
> - /* Call AML dispatcher */
> + /* Create a new walk state */
>
> - Status = AcpiDsExecBeginOp (WalkState, &OutOp);
> - if (ACPI_FAILURE (Status))
> + WalkState = AcpiDsCreateWalkState (0, NULL, NULL, NULL);
> + if (!WalkState)
> {
> - AcpiOsPrintf ("Constant interpretation failed - %s\n",
> - AcpiFormatException (Status));
> + return (AE_NO_MEMORY);
> }
>
> - return (Status);
> -}
> + WalkState->NextOp = NULL;
> + WalkState->Params = NULL;
>
> + /*
> + * Examine the entire subtree -- all nodes must be constants
> + * or type 3/4/5 opcodes
> + */
> + Status = TrWalkParseTree (Op, ASL_WALK_VISIT_DOWNWARD,
> + OpcAmlCheckForConstant, NULL, WalkState);
>
> -/*******************************************************************************
> - *
> - * FUNCTION: OpcAmlEvaluationWalk2
> - *
> - * PARAMETERS: ASL_WALK_CALLBACK
> - *
> - * RETURN: Status
> - *
> - * DESCRIPTION: Ascending callback for AML execution of constant subtrees
> - *
> - ******************************************************************************/
> + /*
> + * Did we find an entire subtree that contains all constants
> + * and type 3/4/5 opcodes?
> + */
> + switch (Status)
> + {
> + case AE_OK:
>
> -static ACPI_STATUS
> -OpcAmlEvaluationWalk2 (
> - ACPI_PARSE_OBJECT *Op,
> - UINT32 Level,
> - void *Context)
> -{
> - ACPI_WALK_STATE *WalkState = Context;
> - ACPI_STATUS Status;
> + /* Simple case, like Add(3,4) -> 7 */
>
> + Status = TrSimpleConstantReduction (Op, WalkState);
> + break;
>
> - WalkState->Op = Op;
> - WalkState->Opcode = Op->Common.AmlOpcode;
> - WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
> + case AE_CTRL_RETURN_VALUE:
>
> - /* Copy child pointer to Arg for compatibility with Interpreter */
> + /* More complex case, like Add(3,4,Local0) -> Store(7,Local0) */
>
> - if (Op->Asl.Child)
> - {
> - Op->Common.Value.Arg = Op->Asl.Child;
> - }
> + Status = TrTransformToStoreOp (Op, WalkState);
> + break;
>
> - /* Call AML dispatcher */
> + case AE_TYPE:
> +
> + AcpiDsDeleteWalkState (WalkState);
> + return (AE_OK);
> +
> + default:
> + AcpiDsDeleteWalkState (WalkState);
> + break;
> + }
>
> - Status = AcpiDsExecEndOp (WalkState);
> if (ACPI_FAILURE (Status))
> {
> - AcpiOsPrintf ("Constant interpretation failed - %s\n",
> - AcpiFormatException (Status));
> + DbgPrint (ASL_PARSE_OUTPUT, "Cannot resolve, %s\n",
> + AcpiFormatException (Status));
> +
> + /* We could not resolve the subtree for some reason */
> +
> + AslError (ASL_ERROR, ASL_MSG_CONSTANT_EVALUATION, Op,
> + (char *) AcpiFormatException (Status));
> +
> + /* Set the subtree value to ZERO anyway. Eliminates further errors */
> +
> + OpcUpdateIntegerNode (Op, 0);
> }
>
> - return (Status);
> + /* Abort the walk of this subtree, we are done with it */
> +
> + return (AE_CTRL_DEPTH);
> }
>
>
> @@ -261,6 +289,7 @@ OpcAmlCheckForConstant (
> void *Context)
> {
> ACPI_WALK_STATE *WalkState = Context;
> + ACPI_STATUS Status = AE_OK;
>
>
> WalkState->Op = Op;
> @@ -268,7 +297,20 @@ OpcAmlCheckForConstant (
> WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
>
> DbgPrint (ASL_PARSE_OUTPUT, "[%.4d] Opcode: %12.12s ",
> - Op->Asl.LogicalLineNumber, Op->Asl.ParseOpName);
> + Op->Asl.LogicalLineNumber, Op->Asl.ParseOpName);
> +
> + /*
> + * TBD: Ignore buffer constants for now. The problem is that these
> + * constants have been transformed into RAW_DATA at this point, from
> + * the parse tree transform process which currently happens before
> + * the constant folding process. We may need to defer this transform
> + * for buffer until after the constant folding.
> + */
> + if (WalkState->Opcode == AML_BUFFER_OP)
> + {
> + Status = AE_TYPE;
> + goto CleanupAndExit;
> + }
>
> /*
> * These opcodes do not appear in the OpcodeInfo table, but
> @@ -279,50 +321,32 @@ OpcAmlCheckForConstant (
> (WalkState->Opcode == AML_RAW_DATA_DWORD) ||
> (WalkState->Opcode == AML_RAW_DATA_QWORD))
> {
> - WalkState->WalkType = ACPI_WALK_CONST_OPTIONAL;
> - return (AE_TYPE);
> + DbgPrint (ASL_PARSE_OUTPUT, "RAW DATA");
> + Status = AE_TYPE;
> + goto CleanupAndExit;
> }
>
> + /* Type 3/4/5 opcodes have the AML_CONSTANT flag set */
> +
> if (!(WalkState->OpInfo->Flags & AML_CONSTANT))
> {
> - /* The opcode is not a Type 3/4/5 opcode */
> + /* Not 3/4/5 opcode, but maybe can convert to STORE */
>
> if (Op->Asl.CompileFlags & NODE_IS_TARGET)
> {
> DbgPrint (ASL_PARSE_OUTPUT,
> - "**** Valid Target, cannot reduce ****\n");
> - }
> - else
> - {
> - DbgPrint (ASL_PARSE_OUTPUT,
> - "**** Not a Type 3/4/5 opcode ****\n");
> + "**** Valid Target, transform to Store ****\n");
> + return (AE_CTRL_RETURN_VALUE);
> }
>
> - if (WalkState->WalkType == ACPI_WALK_CONST_OPTIONAL)
> - {
> - /*
> - * We are looking at at normal expression to see if it can be
> - * reduced. It can't. No error
> - */
> - return (AE_TYPE);
> - }
> + /* Expression cannot be reduced */
>
> - /*
> - * This is an expression that MUST reduce to a constant, and it
> - * can't be reduced. This is an error
> - */
> - if (Op->Asl.CompileFlags & NODE_IS_TARGET)
> - {
> - AslError (ASL_ERROR, ASL_MSG_INVALID_TARGET, Op,
> - Op->Asl.ParseOpName);
> - }
> - else
> - {
> - AslError (ASL_ERROR, ASL_MSG_INVALID_CONSTANT_OP, Op,
> - Op->Asl.ParseOpName);
> - }
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "**** Not a Type 3/4/5 opcode (%s) ****",
> + Op->Asl.ParseOpName);
>
> - return (AE_TYPE);
> + Status = AE_TYPE;
> + goto CleanupAndExit;
> }
>
> /* Debug output */
> @@ -331,250 +355,346 @@ OpcAmlCheckForConstant (
>
> if (Op->Asl.CompileFlags & NODE_IS_TARGET)
> {
> - DbgPrint (ASL_PARSE_OUTPUT, " TARGET");
> + if (Op->Asl.ParseOpcode == PARSEOP_ZERO)
> + {
> + DbgPrint (ASL_PARSE_OUTPUT, "%-16s", " NULL TARGET");
> + }
> + else
> + {
> + DbgPrint (ASL_PARSE_OUTPUT, "%-16s", " VALID TARGET");
> + }
> }
> if (Op->Asl.CompileFlags & NODE_IS_TERM_ARG)
> {
> - DbgPrint (ASL_PARSE_OUTPUT, " TERMARG");
> + DbgPrint (ASL_PARSE_OUTPUT, "%-16s", " TERMARG");
> }
>
> +CleanupAndExit:
> +
> + /* Dump the node compile flags also */
> +
> + TrPrintNodeCompileFlags (Op->Asl.CompileFlags);
> DbgPrint (ASL_PARSE_OUTPUT, "\n");
> - return (AE_OK);
> + return (Status);
> }
>
>
> /*******************************************************************************
> *
> - * FUNCTION: OpcAmlConstantWalk
> + * FUNCTION: TrSimpleConstantReduction
> *
> - * PARAMETERS: ASL_WALK_CALLBACK
> + * PARAMETERS: Op - Parent operator to be transformed
> + * WalkState - Current walk state
> *
> * RETURN: Status
> *
> - * DESCRIPTION: Reduce an Op and its subtree to a constant if possible
> + * DESCRIPTION: Reduce an entire AML operation to a single constant. The
> + * operation must not have a target operand.
> + *
> + * Add (32,64) --> 96
> *
> ******************************************************************************/
>
> -ACPI_STATUS
> -OpcAmlConstantWalk (
> +static ACPI_STATUS
> +TrSimpleConstantReduction (
> ACPI_PARSE_OBJECT *Op,
> - UINT32 Level,
> - void *Context)
> + ACPI_WALK_STATE *WalkState)
> {
> - ACPI_WALK_STATE *WalkState;
> - ACPI_STATUS Status = AE_OK;
> - ACPI_OPERAND_OBJECT *ObjDesc;
> ACPI_PARSE_OBJECT *RootOp;
> ACPI_PARSE_OBJECT *OriginalParentOp;
> - UINT8 WalkType;
> + ACPI_OPERAND_OBJECT *ObjDesc;
> + ACPI_STATUS Status;
>
>
> - /*
> - * Only interested in subtrees that could possibly contain
> - * expressions that can be evaluated at this time
> - */
> - if ((!(Op->Asl.CompileFlags & NODE_COMPILE_TIME_CONST)) ||
> - (Op->Asl.CompileFlags & NODE_IS_TARGET))
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "Simple subtree constant reduction, operator to constant\n");
> +
> + /* Allocate a new temporary root for this subtree */
> +
> + RootOp = TrAllocateNode (PARSEOP_INTEGER);
> + if (!RootOp)
> {
> - return (AE_OK);
> + return (AE_NO_MEMORY);
> }
>
> - /* Set the walk type based on the reduction used for this op */
> + RootOp->Common.AmlOpcode = AML_INT_EVAL_SUBTREE_OP;
>
> - if (Op->Asl.CompileFlags & NODE_IS_TERM_ARG)
> - {
> - /* Op is a TermArg, constant folding is merely optional */
> + OriginalParentOp = Op->Common.Parent;
> + Op->Common.Parent = RootOp;
>
> - if (!Gbl_FoldConstants)
> - {
> - return (AE_CTRL_DEPTH);
> - }
> + /* Hand off the subtree to the AML interpreter */
>
> - WalkType = ACPI_WALK_CONST_OPTIONAL;
> - }
> - else
> - {
> - /* Op is a DataObject, the expression MUST reduced to a constant */
> + WalkState->CallerReturnDesc = &ObjDesc;
> +
> + Status = TrWalkParseTree (Op, ASL_WALK_VISIT_TWICE,
> + OpcAmlEvaluationWalk1, OpcAmlEvaluationWalk2, WalkState);
> +
> + /* Restore original parse tree */
> +
> + Op->Common.Parent = OriginalParentOp;
>
> - WalkType = ACPI_WALK_CONST_REQUIRED;
> + if (ACPI_FAILURE (Status))
> + {
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "Constant Subtree evaluation(1), %s\n",
> + AcpiFormatException (Status));
> + return (Status);
> }
>
> - /* Create a new walk state */
> + /* Get the final result */
>
> - WalkState = AcpiDsCreateWalkState (0, NULL, NULL, NULL);
> - if (!WalkState)
> + Status = AcpiDsResultPop (&ObjDesc, WalkState);
> + if (ACPI_FAILURE (Status))
> {
> - return (AE_NO_MEMORY);
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "Constant Subtree evaluation(2), %s\n",
> + AcpiFormatException (Status));
> + return (Status);
> }
>
> - WalkState->NextOp = NULL;
> - WalkState->Params = NULL;
> - WalkState->WalkType = WalkType;
> - WalkState->CallerReturnDesc = &ObjDesc;
> + TrInstallReducedConstant (Op, ObjDesc);
>
> - /*
> - * Examine the entire subtree -- all nodes must be constants
> - * or type 3/4/5 opcodes
> - */
> - Status = TrWalkParseTree (Op, ASL_WALK_VISIT_DOWNWARD,
> - OpcAmlCheckForConstant, NULL, WalkState);
> + UtSetParseOpName (Op);
> + Op->Asl.Child = NULL;
> + return (AE_OK);
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: TrTransformToStoreOp
> + *
> + * PARAMETERS: Op - Parent operator to be transformed
> + * WalkState - Current walk state
> + *
> + * RETURN: Status
> + *
> + * DESCRIPTION: Transforms a single AML operation with a constant and target
> + * to a simple store operation:
> + *
> + * Add (32,64,DATA) --> Store (96,DATA)
> + *
> + ******************************************************************************/
> +
> +static ACPI_STATUS
> +TrTransformToStoreOp (
> + ACPI_PARSE_OBJECT *Op,
> + ACPI_WALK_STATE *WalkState)
> +{
> + ACPI_PARSE_OBJECT *OriginalTarget;
> + ACPI_PARSE_OBJECT *NewTarget;
> + ACPI_PARSE_OBJECT *Child1;
> + ACPI_PARSE_OBJECT *Child2;
> + ACPI_OPERAND_OBJECT *ObjDesc;
> + ACPI_PARSE_OBJECT *NewParent;
> + ACPI_PARSE_OBJECT *OriginalParent;
> + ACPI_STATUS Status;
> +
> +
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "Reduction/Transform to StoreOp: Store(Constant, Target)\n");
> +
> + /* Extract the operands */
> +
> + Child1 = Op->Asl.Child;
> + Child2 = Child1->Asl.Next;
>
> /*
> - * Did we find an entire subtree that contains all constants and type 3/4/5
> - * opcodes? (Only AE_OK or AE_TYPE returned from above)
> + * Special case for DIVIDE -- it has two targets. The first
> + * is for the remainder and if present, we will not attempt
> + * to reduce the expression.
> */
> - if (Status == AE_TYPE)
> + if (Op->Asl.ParseOpcode == PARSEOP_DIVIDE)
> {
> - /* Subtree cannot be reduced to a constant */
> -
> - if (WalkState->WalkType == ACPI_WALK_CONST_OPTIONAL)
> + Child2 = Child2->Asl.Next;
> + if (Child2->Asl.ParseOpcode != PARSEOP_ZERO)
> {
> - AcpiDsDeleteWalkState (WalkState);
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "Cannot reduce DIVIDE - has two targets\n\n");
> return (AE_OK);
> }
> + }
> +
> + /*
> + * Create a NULL (zero) target so that we can use the
> + * interpreter to evaluate the expression.
> + */
> + NewTarget = TrCreateNullTarget ();
> + NewTarget->Common.AmlOpcode = AML_INT_NAMEPATH_OP;
>
> - /* Don't descend any further, and use a default "constant" value */
> + /* Handle one-operand cases (NOT, TOBCD, etc.) */
>
> - Status = AE_CTRL_DEPTH;
> + if (!Child2->Asl.Next)
> + {
> + Child2 = Child1;
> }
> - else
> +
> + /* Link in new NULL target as the last operand */
> +
> + OriginalTarget = Child2->Asl.Next;
> + Child2->Asl.Next = NewTarget;
> + NewTarget->Asl.Parent = OriginalTarget->Asl.Parent;
> +
> + NewParent = TrAllocateNode (PARSEOP_INTEGER);
> + NewParent->Common.AmlOpcode = AML_INT_EVAL_SUBTREE_OP;
> +
> + OriginalParent = Op->Common.Parent;
> + Op->Common.Parent = NewParent;
> +
> + /* Hand off the subtree to the AML interpreter */
> +
> + WalkState->CallerReturnDesc = &ObjDesc;
> +
> + Status = TrWalkParseTree (Op, ASL_WALK_VISIT_TWICE,
> + OpcAmlEvaluationWalk1, OpcAmlEvaluationWalk2, WalkState);
> + if (ACPI_FAILURE (Status))
> {
> - /* Subtree can be reduced */
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "Constant Subtree evaluation(3), %s\n",
> + AcpiFormatException (Status));
> + goto EvalError;
> + }
>
> - /* Allocate a new temporary root for this subtree */
> + /* Get the final result */
>
> - RootOp = TrAllocateNode (PARSEOP_INTEGER);
> - if (!RootOp)
> - {
> - return (AE_NO_MEMORY);
> - }
> + Status = AcpiDsResultPop (&ObjDesc, WalkState);
> + if (ACPI_FAILURE (Status))
> + {
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "Constant Subtree evaluation(4), %s\n",
> + AcpiFormatException (Status));
> + goto EvalError;
> + }
>
> - RootOp->Common.AmlOpcode = AML_INT_EVAL_SUBTREE_OP;
> + /* Folded constant is in ObjDesc, store into Child1 */
>
> - OriginalParentOp = Op->Common.Parent;
> - Op->Common.Parent = RootOp;
> + TrInstallReducedConstant (Child1, ObjDesc);
>
> - /* Hand off the subtree to the AML interpreter */
> + /* Convert operator to STORE */
>
> - Status = TrWalkParseTree (Op, ASL_WALK_VISIT_TWICE,
> - OpcAmlEvaluationWalk1, OpcAmlEvaluationWalk2, WalkState);
> - Op->Common.Parent = OriginalParentOp;
> + Op->Asl.ParseOpcode = PARSEOP_STORE;
> + Op->Asl.AmlOpcode = AML_STORE_OP;
> + UtSetParseOpName (Op);
> + Op->Common.Parent = OriginalParent;
>
> - /* TBD: we really *should* release the RootOp node */
> + /* Truncate any subtree expressions, they have been evaluated */
>
> - if (ACPI_SUCCESS (Status))
> - {
> - TotalFolds++;
> + Child1->Asl.Child = NULL;
> + Child2->Asl.Child = NULL;
>
> - /* Get the final result */
> + /* First child is the folded constant */
>
> - Status = AcpiDsResultPop (&ObjDesc, WalkState);
> - }
> + /* Second child will be the target */
>
> - /* Check for error from the ACPICA core */
> + Child1->Asl.Next = OriginalTarget;
> + return (AE_OK);
>
> - if (ACPI_FAILURE (Status))
> - {
> - AslCoreSubsystemError (Op, Status,
> - "Failure during constant evaluation", FALSE);
> - }
> - }
>
> - if (ACPI_FAILURE (Status))
> - {
> - /* We could not resolve the subtree for some reason */
> +EvalError:
>
> - AslError (ASL_ERROR, ASL_MSG_CONSTANT_EVALUATION, Op,
> - Op->Asl.ParseOpName);
> + /* Restore original links */
>
> - /* Set the subtree value to ZERO anyway. Eliminates further errors */
> + Op->Common.Parent = OriginalParent;
> + Child2->Asl.Next = OriginalTarget;
> + return (Status);
> +}
>
> - OpcUpdateIntegerNode (Op, 0);
> - }
> - else
> - {
> - AslError (ASL_OPTIMIZATION, ASL_MSG_CONSTANT_FOLDED, Op,
> - Op->Asl.ParseOpName);
> -
> - /*
> - * Because we know we executed type 3/4/5 opcodes above, we know that
> - * the result must be either an Integer, String, or Buffer.
> - */
> - switch (ObjDesc->Common.Type)
> - {
> - case ACPI_TYPE_INTEGER:
>
> - OpcUpdateIntegerNode (Op, ObjDesc->Integer.Value);
> +/*******************************************************************************
> + *
> + * FUNCTION: TrInstallReducedConstant
> + *
> + * PARAMETERS: Op - Parent operator to be transformed
> + * ObjDesc - Reduced constant to be installed
> + *
> + * RETURN: None
> + *
> + * DESCRIPTION: Transform the original operator to a simple constant.
> + * Handles Integers, Strings, and Buffers.
> + *
> + ******************************************************************************/
> +
> +static void
> +TrInstallReducedConstant (
> + ACPI_PARSE_OBJECT *Op,
> + ACPI_OPERAND_OBJECT *ObjDesc)
> +{
> + ACPI_PARSE_OBJECT *RootOp;
>
> - DbgPrint (ASL_PARSE_OUTPUT,
> - "Constant expression reduced to (%s) %8.8X%8.8X\n",
> - Op->Asl.ParseOpName,
> - ACPI_FORMAT_UINT64 (Op->Common.Value.Integer));
> - break;
>
> - case ACPI_TYPE_STRING:
> + TotalFolds++;
> + AslError (ASL_OPTIMIZATION, ASL_MSG_CONSTANT_FOLDED, Op,
> + Op->Asl.ParseOpName);
>
> - Op->Asl.ParseOpcode = PARSEOP_STRING_LITERAL;
> - Op->Common.AmlOpcode = AML_STRING_OP;
> - Op->Asl.AmlLength = ACPI_STRLEN (ObjDesc->String.Pointer) + 1;
> - Op->Common.Value.String = ObjDesc->String.Pointer;
> + /*
> + * Because we know we executed type 3/4/5 opcodes above, we know that
> + * the result must be either an Integer, String, or Buffer.
> + */
> + switch (ObjDesc->Common.Type)
> + {
> + case ACPI_TYPE_INTEGER:
>
> - DbgPrint (ASL_PARSE_OUTPUT,
> - "Constant expression reduced to (STRING) %s\n",
> - Op->Common.Value.String);
> + OpcUpdateIntegerNode (Op, ObjDesc->Integer.Value);
>
> - break;
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "Constant expression reduced to (%s) %8.8X%8.8X\n\n",
> + Op->Asl.ParseOpName,
> + ACPI_FORMAT_UINT64 (Op->Common.Value.Integer));
> + break;
>
> - case ACPI_TYPE_BUFFER:
> + case ACPI_TYPE_STRING:
>
> - Op->Asl.ParseOpcode = PARSEOP_BUFFER;
> - Op->Common.AmlOpcode = AML_BUFFER_OP;
> - Op->Asl.CompileFlags = NODE_AML_PACKAGE;
> - UtSetParseOpName (Op);
> + Op->Asl.ParseOpcode = PARSEOP_STRING_LITERAL;
> + Op->Common.AmlOpcode = AML_STRING_OP;
> + Op->Asl.AmlLength = ACPI_STRLEN (ObjDesc->String.Pointer) + 1;
> + Op->Common.Value.String = ObjDesc->String.Pointer;
>
> - /* Child node is the buffer length */
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "Constant expression reduced to (STRING) %s\n\n",
> + Op->Common.Value.String);
>
> - RootOp = TrAllocateNode (PARSEOP_INTEGER);
> + break;
>
> - RootOp->Asl.AmlOpcode = AML_DWORD_OP;
> - RootOp->Asl.Value.Integer = ObjDesc->Buffer.Length;
> - RootOp->Asl.Parent = Op;
> + case ACPI_TYPE_BUFFER:
>
> - (void) OpcSetOptimalIntegerSize (RootOp);
> + Op->Asl.ParseOpcode = PARSEOP_BUFFER;
> + Op->Common.AmlOpcode = AML_BUFFER_OP;
> + Op->Asl.CompileFlags = NODE_AML_PACKAGE;
> + UtSetParseOpName (Op);
>
> - Op->Asl.Child = RootOp;
> - Op = RootOp;
> - UtSetParseOpName (Op);
> + /* Child node is the buffer length */
>
> - /* Peer to the child is the raw buffer data */
> + RootOp = TrAllocateNode (PARSEOP_INTEGER);
>
> - RootOp = TrAllocateNode (PARSEOP_RAW_DATA);
> - RootOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
> - RootOp->Asl.AmlLength = ObjDesc->Buffer.Length;
> - RootOp->Asl.Value.String = (char *) ObjDesc->Buffer.Pointer;
> - RootOp->Asl.Parent = Op->Asl.Parent;
> + RootOp->Asl.AmlOpcode = AML_DWORD_OP;
> + RootOp->Asl.Value.Integer = ObjDesc->Buffer.Length;
> + RootOp->Asl.Parent = Op;
>
> - Op->Asl.Next = RootOp;
> - Op = RootOp;
> + (void) OpcSetOptimalIntegerSize (RootOp);
>
> - DbgPrint (ASL_PARSE_OUTPUT,
> - "Constant expression reduced to (BUFFER) length %X\n",
> - ObjDesc->Buffer.Length);
> - break;
> + Op->Asl.Child = RootOp;
> + Op = RootOp;
> + UtSetParseOpName (Op);
>
> - default:
> + /* Peer to the child is the raw buffer data */
>
> - printf ("Unsupported return type: %s\n",
> - AcpiUtGetObjectTypeName (ObjDesc));
> - break;
> - }
> - }
> + RootOp = TrAllocateNode (PARSEOP_RAW_DATA);
> + RootOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
> + RootOp->Asl.AmlLength = ObjDesc->Buffer.Length;
> + RootOp->Asl.Value.String = (char *) ObjDesc->Buffer.Pointer;
> + RootOp->Asl.Parent = Op->Asl.Parent;
>
> - UtSetParseOpName (Op);
> - Op->Asl.Child = NULL;
> + Op->Asl.Next = RootOp;
> + Op = RootOp;
>
> - AcpiDsDeleteWalkState (WalkState);
> - return (AE_CTRL_DEPTH);
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "Constant expression reduced to (BUFFER) length %X\n\n",
> + ObjDesc->Buffer.Length);
> + break;
> +
> + default:
> + break;
> + }
> }
>
>
> @@ -583,10 +703,11 @@ OpcAmlConstantWalk (
> * FUNCTION: OpcUpdateIntegerNode
> *
> * PARAMETERS: Op - Current parse object
> + * Value - Value for the integer op
> *
> * RETURN: None
> *
> - * DESCRIPTION: Update node to the correct integer type.
> + * DESCRIPTION: Update node to the correct Integer type and value
> *
> ******************************************************************************/
>
> @@ -638,3 +759,98 @@ OpcUpdateIntegerNode (
>
> Op->Asl.AmlLength = 0;
> }
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: OpcAmlEvaluationWalk1
> + *
> + * PARAMETERS: ASL_WALK_CALLBACK
> + *
> + * RETURN: Status
> + *
> + * DESCRIPTION: Descending callback for AML execution of constant subtrees
> + *
> + ******************************************************************************/
> +
> +static ACPI_STATUS
> +OpcAmlEvaluationWalk1 (
> + ACPI_PARSE_OBJECT *Op,
> + UINT32 Level,
> + void *Context)
> +{
> + ACPI_WALK_STATE *WalkState = Context;
> + ACPI_STATUS Status;
> + ACPI_PARSE_OBJECT *OutOp;
> +
> +
> + WalkState->Op = Op;
> + WalkState->Opcode = Op->Common.AmlOpcode;
> + WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
> +
> + /* Copy child pointer to Arg for compatibility with Interpreter */
> +
> + if (Op->Asl.Child)
> + {
> + Op->Common.Value.Arg = Op->Asl.Child;
> + }
> +
> + /* Call AML dispatcher */
> +
> + Status = AcpiDsExecBeginOp (WalkState, &OutOp);
> + if (ACPI_FAILURE (Status))
> + {
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "%s Constant interpretation failed (1) - %s\n",
> + Op->Asl.ParseOpName, AcpiFormatException (Status));
> + }
> +
> + return (Status);
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: OpcAmlEvaluationWalk2
> + *
> + * PARAMETERS: ASL_WALK_CALLBACK
> + *
> + * RETURN: Status
> + *
> + * DESCRIPTION: Ascending callback for AML execution of constant subtrees
> + *
> + ******************************************************************************/
> +
> +static ACPI_STATUS
> +OpcAmlEvaluationWalk2 (
> + ACPI_PARSE_OBJECT *Op,
> + UINT32 Level,
> + void *Context)
> +{
> + ACPI_WALK_STATE *WalkState = Context;
> + ACPI_STATUS Status;
> +
> +
> + WalkState->Op = Op;
> + WalkState->Opcode = Op->Common.AmlOpcode;
> + WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
> +
> + /* Copy child pointer to Arg for compatibility with Interpreter */
> +
> + if (Op->Asl.Child)
> + {
> + Op->Common.Value.Arg = Op->Asl.Child;
> + }
> +
> + /* Call AML dispatcher */
> +
> + Status = AcpiDsExecEndOp (WalkState);
> + if (ACPI_FAILURE (Status))
> + {
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "%s: Constant interpretation failed (2) - %s\n",
> + Op->Asl.ParseOpName, AcpiFormatException (Status));
> + }
> +
> + return (Status);
> +}
> diff --git a/src/acpica/source/compiler/asllisting.c b/src/acpica/source/compiler/asllisting.c
> index b5a4559..8131cf4 100644
> --- a/src/acpica/source/compiler/asllisting.c
> +++ b/src/acpica/source/compiler/asllisting.c
> @@ -342,7 +342,10 @@ LsTreeWriteWalk (
>
> UtPrintFormattedName (Op->Asl.ParseOpcode, Level);
>
> - DbgPrint (ASL_TREE_OUTPUT, " (%.4X)\n", Op->Asl.ParseOpcode);
> + DbgPrint (ASL_TREE_OUTPUT, " (%.4X) Flags %8.8X",
> + Op->Asl.ParseOpcode, Op->Asl.CompileFlags);
> + TrPrintNodeCompileFlags (Op->Asl.CompileFlags);
> + DbgPrint (ASL_TREE_OUTPUT, "\n");
> return (AE_OK);
> }
>
> diff --git a/src/acpica/source/compiler/aslmain.c b/src/acpica/source/compiler/aslmain.c
> index 9e27551..59fdbe8 100644
> --- a/src/acpica/source/compiler/aslmain.c
> +++ b/src/acpica/source/compiler/aslmain.c
> @@ -259,6 +259,7 @@ Usage (
> ACPI_OPTION ("-db", "Do not translate Buffers to Resource Templates");
> ACPI_OPTION ("-dc <f1 f2 ...>", "Disassemble AML and immediately compile it");
> ACPI_OPTION ("", " (Obtain DSDT from current system if no input file)");
> + ACPI_OPTION ("-df", "Force disassembler to assume table contains valid AML");
> ACPI_OPTION ("-dl", "Emit legacy ASL code only (no C-style operators)");
> ACPI_OPTION ("-e <f1 f2 ...>", "Include ACPI table(s) for external symbol resolution");
> ACPI_OPTION ("-fe <file>", "Specify external symbol declaration file");
> diff --git a/src/acpica/source/compiler/aslmap.c b/src/acpica/source/compiler/aslmap.c
> index 5aed2b0..cb6a941 100644
> --- a/src/acpica/source/compiler/aslmap.c
> +++ b/src/acpica/source/compiler/aslmap.c
> @@ -294,7 +294,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
> /* EXTENDEDIO */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* EXTENDEDMEMORY */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
> /* EXTENDEDSPACE */ OP_TABLE_ENTRY (AML_RAW_DATA_QWORD, 0, 0, ACPI_BTYPE_INTEGER),
> -/* EXTERNAL */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
> +/* EXTERNAL */ OP_TABLE_ENTRY (AML_EXTERNAL_OP, 0, 0, 0),
> /* FATAL */ OP_TABLE_ENTRY (AML_FATAL_OP, 0, 0, 0),
> /* FIELD */ OP_TABLE_ENTRY (AML_FIELD_OP, 0, NODE_AML_PACKAGE, 0),
> /* FINDSETLEFTBIT */ OP_TABLE_ENTRY (AML_FIND_SET_LEFT_BIT_OP, 0, 0, ACPI_BTYPE_INTEGER),
> diff --git a/src/acpica/source/compiler/aslrules.y b/src/acpica/source/compiler/aslrules.y
> index ed5515c..63a0375 100644
> --- a/src/acpica/source/compiler/aslrules.y
> +++ b/src/acpica/source/compiler/aslrules.y
> @@ -202,7 +202,7 @@ Expression
> : PARSEOP_EXP_LOGICAL_NOT {$<n>$ = TrCreateLeafNode (PARSEOP_LNOT);}
> TermArg {$$ = TrLinkChildren ($<n>2,1,$3);}
> | PARSEOP_EXP_NOT {$<n>$ = TrCreateLeafNode (PARSEOP_NOT);}
> - TermArg {$$ = TrLinkChildren ($<n>2,2,$3,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>2,2,$3,TrCreateNullTarget ());}
>
> | SuperName PARSEOP_EXP_INCREMENT {$<n>$ = TrCreateLeafNode (PARSEOP_INCREMENT);}
> {$$ = TrLinkChildren ($<n>3,1,$1);}
> @@ -212,27 +212,27 @@ Expression
> /* Binary operators: math and logical */
>
> | TermArg PARSEOP_EXP_ADD {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_DIVIDE {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
> - TermArg {$$ = TrLinkChildren ($<n>3,4,$1,$4,TrCreateLeafNode (PARSEOP_ZERO),
> - TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,4,$1,$4,TrCreateNullTarget (),
> + TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_MODULO {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_MULTIPLY {$<n>$ = TrCreateLeafNode (PARSEOP_MULTIPLY);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_SHIFT_LEFT {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_SHIFT_RIGHT {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_SUBTRACT {$<n>$ = TrCreateLeafNode (PARSEOP_SUBTRACT);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
>
> | TermArg PARSEOP_EXP_AND {$<n>$ = TrCreateLeafNode (PARSEOP_AND);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_OR {$<n>$ = TrCreateLeafNode (PARSEOP_OR);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
> | TermArg PARSEOP_EXP_XOR {$<n>$ = TrCreateLeafNode (PARSEOP_XOR);}
> - TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateLeafNode (PARSEOP_ZERO));}
> + TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
>
> | TermArg PARSEOP_EXP_GREATER {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
> TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
> @@ -270,7 +270,7 @@ EqualsTerm
> TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
>
> | TermArg PARSEOP_EXP_DIV_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
> - TermArg {$$ = TrLinkChildren ($<n>3,4,$1,$4,TrCreateLeafNode (PARSEOP_ZERO),
> + TermArg {$$ = TrLinkChildren ($<n>3,4,$1,$4,TrCreateNullTarget (),
> TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
>
> | TermArg PARSEOP_EXP_MOD_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
> @@ -319,11 +319,10 @@ TermList
>
> Term
> : Object {}
> - | Expression {}
> | Type1Opcode {}
> | Type2Opcode {}
> - | Type2IntegerOpcode {}
> - | Type2StringOpcode {}
> + | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> + | Type2StringOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> | Type2BufferOpcode {}
> | Type2BufferOrStringOpcode {}
> | error {$$ = AslDoError(); yyclearin;}
> @@ -404,7 +403,7 @@ NameSpaceModifier
> | ScopeTerm {}
> ;
>
> -UserTerm
> +MethodInvocationTerm
> : NameString '(' {TrUpdateNode (PARSEOP_METHODCALL, $1);}
> ArgList ')' {$$ = TrLinkChildNode ($1,$4);}
> ;
> @@ -427,8 +426,7 @@ Removed from TermArg due to reduce/reduce conflicts
> */
>
> TermArg
> - : Expression {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> - | Type2Opcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> + : Type2Opcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> | DataObject {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> | NameString {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> | ArgTerm {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
> @@ -436,8 +434,8 @@ TermArg
> ;
>
> Target
> - : {$$ = TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), NODE_IS_TARGET | NODE_COMPILE_TIME_CONST);} /* Placeholder is a ZeroOp object */
> - | ',' {$$ = TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), NODE_IS_TARGET | NODE_COMPILE_TIME_CONST);} /* Placeholder is a ZeroOp object */
> + : {$$ = TrCreateNullTarget ();} /* Placeholder is a ZeroOp object */
> + | ',' {$$ = TrCreateNullTarget ();} /* Placeholder is a ZeroOp object */
> | ',' SuperName {$$ = TrSetNodeFlags ($2, NODE_IS_TARGET);}
> ;
>
> @@ -525,7 +523,7 @@ Type2Opcode
> | EqualsTerm {}
> | TimerTerm {}
> | WaitTerm {}
> - | UserTerm {}
> + | MethodInvocationTerm {}
> ;
>
> /*
> @@ -533,7 +531,8 @@ Type2Opcode
> */
>
> Type2IntegerOpcode /* "Type3" opcodes */
> - : AddTerm {}
> + : Expression {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> + | AddTerm {}
> | AndTerm {}
> | DecTerm {}
> | DivideTerm {}
> @@ -579,7 +578,7 @@ Type2BufferOpcode /* "Type5" Opcodes */
> ;
>
> Type2BufferOrStringOpcode
> - : ConcatTerm {}
> + : ConcatTerm {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
> | PrintfTerm {}
> | FprintfTerm {}
> | MidTerm {}
> @@ -615,7 +614,7 @@ Type6Opcode
> : RefOfTerm {}
> | DerefOfTerm {}
> | IndexTerm {}
> - | UserTerm {}
> + | MethodInvocationTerm {}
> ;
>
> IncludeTerm
> @@ -1992,7 +1991,7 @@ SuperName
> | DebugTerm {}
> | Type6Opcode {}
>
> -/* For ObjectType: SuperName except for UserTerm (method invocation) */
> +/* For ObjectType: SuperName except for MethodInvocationTerm */
>
> ObjectTypeName
> : NameString {}
> @@ -2003,7 +2002,7 @@ ObjectTypeName
> | DerefOfTerm {}
> | IndexTerm {}
>
> -/* | UserTerm {} */ /* Caused reduce/reduce with Type6Opcode->UserTerm */
> +/* | MethodInvocationTerm {} */ /* Caused reduce/reduce with Type6Opcode->MethodInvocationTerm */
> ;
>
> ArgTerm
> diff --git a/src/acpica/source/compiler/aslstartup.c b/src/acpica/source/compiler/aslstartup.c
> index 0894d45..9e6d7b3 100644
> --- a/src/acpica/source/compiler/aslstartup.c
> +++ b/src/acpica/source/compiler/aslstartup.c
> @@ -320,7 +320,7 @@ AslDoDisassembly (
>
> /* This is where the disassembly happens */
>
> - AcpiGbl_DbOpt_disasm = TRUE;
> + AcpiGbl_DbOpt_Disasm = TRUE;
> Status = AdAmlDisassemble (AslToFile,
> Gbl_Files[ASL_FILE_INPUT].Filename, Gbl_OutputFilenamePrefix,
> &Gbl_Files[ASL_FILE_INPUT].Filename);
> diff --git a/src/acpica/source/compiler/asltree.c b/src/acpica/source/compiler/asltree.c
> index a13707e..33194af 100644
> --- a/src/acpica/source/compiler/asltree.c
> +++ b/src/acpica/source/compiler/asltree.c
> @@ -127,10 +127,6 @@ static ACPI_PARSE_OBJECT *
> TrGetNextNode (
> void);
>
> -static char *
> -TrGetNodeFlagName (
> - UINT32 Flags);
> -
>
> /*******************************************************************************
> *
> @@ -259,7 +255,7 @@ TrUpdateNode (
> }
>
> DbgPrint (ASL_PARSE_OUTPUT,
> - "\nUpdateNode: Old - %s, New - %s\n\n",
> + "\nUpdateNode: Old - %s, New - %s\n",
> UtGetOpName (Op->Asl.ParseOpcode),
> UtGetOpName (ParseOpcode));
>
> @@ -333,90 +329,140 @@ TrUpdateNode (
>
> /*******************************************************************************
> *
> - * FUNCTION: TrGetNodeFlagName
> + * FUNCTION: TrPrintNodeCompileFlags
> *
> * PARAMETERS: Flags - Flags word to be decoded
> *
> - * RETURN: Name string. Always returns a valid string pointer.
> + * RETURN: None
> *
> - * DESCRIPTION: Decode a flags word
> + * DESCRIPTION: Decode a flags word to text. Displays all flags that are set.
> *
> ******************************************************************************/
>
> -static char *
> -TrGetNodeFlagName (
> +void
> +TrPrintNodeCompileFlags (
> UINT32 Flags)
> {
> + UINT32 i;
> + UINT32 FlagBit = 1;
> + char *FlagName = NULL;
> +
>
> - switch (Flags)
> + for (i = 0; i < 32; i++)
> {
> - case NODE_VISITED:
> + switch (Flags & FlagBit)
> + {
> + case NODE_VISITED:
> +
> + FlagName = "NODE_VISITED";
> + break;
> +
> + case NODE_AML_PACKAGE:
>
> - return ("NODE_VISITED");
> + FlagName = "NODE_AML_PACKAGE";
> + break;
> +
> + case NODE_IS_TARGET:
> +
> + FlagName = "NODE_IS_TARGET";
> + break;
> +
> + case NODE_IS_RESOURCE_DESC:
>
> - case NODE_AML_PACKAGE:
> + FlagName = "NODE_IS_RESOURCE_DESC";
> + break;
> +
> + case NODE_IS_RESOURCE_FIELD:
> +
> + FlagName = "NODE_IS_RESOURCE_FIELD";
> + break;
>
> - return ("NODE_AML_PACKAGE");
> + case NODE_HAS_NO_EXIT:
>
> - case NODE_IS_TARGET:
> + FlagName = "NODE_HAS_NO_EXIT";
> + break;
>
> - return ("NODE_IS_TARGET");
> + case NODE_IF_HAS_NO_EXIT:
>
> - case NODE_IS_RESOURCE_DESC:
> + FlagName = "NODE_IF_HAS_NO_EXIT";
> + break;
>
> - return ("NODE_IS_RESOURCE_DESC");
> + case NODE_NAME_INTERNALIZED:
>
> - case NODE_IS_RESOURCE_FIELD:
> + FlagName = "NODE_NAME_INTERNALIZED";
> + break;
>
> - return ("NODE_IS_RESOURCE_FIELD");
> + case NODE_METHOD_NO_RETVAL:
>
> - case NODE_HAS_NO_EXIT:
> + FlagName = "NODE_METHOD_NO_RETVAL";
> + break;
>
> - return ("NODE_HAS_NO_EXIT");
> + case NODE_METHOD_SOME_NO_RETVAL:
>
> - case NODE_IF_HAS_NO_EXIT:
> + FlagName = "NODE_METHOD_SOME_NO_RETVAL";
> + break;
>
> - return ("NODE_IF_HAS_NO_EXIT");
> + case NODE_RESULT_NOT_USED:
>
> - case NODE_NAME_INTERNALIZED:
> + FlagName = "NODE_RESULT_NOT_USED";
> + break;
>
> - return ("NODE_NAME_INTERNALIZED");
> + case NODE_METHOD_TYPED:
>
> - case NODE_METHOD_NO_RETVAL:
> + FlagName = "NODE_METHOD_TYPED";
> + break;
>
> - return ("NODE_METHOD_NO_RETVAL");
> + case NODE_COMPILE_TIME_CONST:
>
> - case NODE_METHOD_SOME_NO_RETVAL:
> + FlagName = "NODE_COMPILE_TIME_CONST";
> + break;
>
> - return ("NODE_METHOD_SOME_NO_RETVAL");
> + case NODE_IS_TERM_ARG:
>
> - case NODE_RESULT_NOT_USED:
> + FlagName = "NODE_IS_TERM_ARG";
> + break;
>
> - return ("NODE_RESULT_NOT_USED");
> + case NODE_WAS_ONES_OP:
>
> - case NODE_METHOD_TYPED:
> + FlagName = "NODE_WAS_ONES_OP";
> + break;
>
> - return ("NODE_METHOD_TYPED");
> + case NODE_IS_NAME_DECLARATION:
>
> - case NODE_COMPILE_TIME_CONST:
> + FlagName = "NODE_IS_NAME_DECLARATION";
> + break;
>
> - return ("NODE_COMPILE_TIME_CONST");
> + case NODE_COMPILER_EMITTED:
>
> - case NODE_IS_TERM_ARG:
> + FlagName = "NODE_COMPILER_EMITTED";
> + break;
>
> - return ("NODE_IS_TERM_ARG");
> + case NODE_IS_DUPLICATE:
>
> - case NODE_WAS_ONES_OP:
> + FlagName = "NODE_IS_DUPLICATE";
> + break;
>
> - return ("NODE_WAS_ONES_OP");
> + case NODE_IS_RESOURCE_DATA:
>
> - case NODE_IS_NAME_DECLARATION:
> + FlagName = "NODE_IS_RESOURCE_DATA";
> + break;
>
> - return ("NODE_IS_NAME_DECLARATION");
> + case NODE_IS_NULL_RETURN:
>
> - default:
> + FlagName = "NODE_IS_NULL_RETURN";
> + break;
>
> - return ("Multiple Flags (or unknown flag) set");
> + default:
> + break;
> + }
> +
> + if (FlagName)
> + {
> + DbgPrint (ASL_PARSE_OUTPUT, " %s", FlagName);
> + FlagName = NULL;
> + }
> +
> + FlagBit <<= 1;
> }
> }
>
> @@ -440,15 +486,17 @@ TrSetNodeFlags (
> UINT32 Flags)
> {
>
> - DbgPrint (ASL_PARSE_OUTPUT,
> - "\nSetNodeFlags: Op %p, %8.8X %s\n\n", Op, Flags,
> - TrGetNodeFlagName (Flags));
> -
> if (!Op)
> {
> return (NULL);
> }
>
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "\nSetNodeFlags: %s Op %p, %8.8X", Op->Asl.ParseOpName, Op, Flags);
> +
> + TrPrintNodeCompileFlags (Flags);
> + DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
> +
> Op->Asl.CompileFlags |= Flags;
> return (Op);
> }
> @@ -660,7 +708,40 @@ TrCreateLeafNode (
>
> DbgPrint (ASL_PARSE_OUTPUT,
> "\nCreateLeafNode Ln/Col %u/%u NewNode %p Op %s\n\n",
> - Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName(ParseOpcode));
> + Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName (ParseOpcode));
> +
> + return (Op);
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: TrCreateNullTarget
> + *
> + * PARAMETERS: None
> + *
> + * RETURN: Pointer to the new node. Aborts on allocation failure
> + *
> + * DESCRIPTION: Create a "null" target node. This is defined by the ACPI
> + * specification to be a zero AML opcode, and indicates that
> + * no target has been specified for the parent operation
> + *
> + ******************************************************************************/
> +
> +ACPI_PARSE_OBJECT *
> +TrCreateNullTarget (
> + void)
> +{
> + ACPI_PARSE_OBJECT *Op;
> +
> +
> + Op = TrAllocateNode (PARSEOP_ZERO);
> + Op->Asl.CompileFlags |= (NODE_IS_TARGET | NODE_COMPILE_TIME_CONST);
> +
> + DbgPrint (ASL_PARSE_OUTPUT,
> + "\nCreateNullTarget Ln/Col %u/%u NewNode %p Op %s\n",
> + Op->Asl.LineNumber, Op->Asl.Column, Op,
> + UtGetOpName (Op->Asl.ParseOpcode));
>
> return (Op);
> }
> @@ -692,7 +773,6 @@ TrCreateConstantLeafNode (
> time_t CurrentTime;
> char *StaticTimeString;
> char *TimeString;
> - char *Path;
> char *Filename;
>
>
> @@ -719,7 +799,7 @@ TrCreateConstantLeafNode (
>
> /* Get the simple filename from the full path */
>
> - FlSplitInputPathname (Op->Asl.Filename, &Path, &Filename);
> + FlSplitInputPathname (Op->Asl.Filename, NULL, &Filename);
> Op->Asl.Value.String = Filename;
> break;
>
> @@ -744,7 +824,7 @@ TrCreateConstantLeafNode (
> }
>
> DbgPrint (ASL_PARSE_OUTPUT,
> - "\nCreateConstantLeafNode Ln/Col %u/%u NewNode %p Op %s Value %8.8X%8.8X ",
> + "\nCreateConstantLeafNode Ln/Col %u/%u NewNode %p Op %s Value %8.8X%8.8X \n",
> Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName (ParseOpcode),
> ACPI_FORMAT_UINT64 (Op->Asl.Value.Integer));
> return (Op);
> @@ -885,7 +965,8 @@ TrCreateValuedLeafNode (
>
> case PARSEOP_INTEGER:
>
> - DbgPrint (ASL_PARSE_OUTPUT, "INTEGER");
> + DbgPrint (ASL_PARSE_OUTPUT, "INTEGER->%8.8X%8.8X",
> + ACPI_FORMAT_UINT64 (Value));
> break;
>
> default:
> @@ -1020,7 +1101,7 @@ TrCreateNode (
> }
> va_end(ap);
>
> - DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
> + DbgPrint (ASL_PARSE_OUTPUT, "\n");
> return (Op);
> }
>
> @@ -1176,7 +1257,7 @@ TrLinkPeerNode (
>
>
> DbgPrint (ASL_PARSE_OUTPUT,
> - "\nLinkPeerNode: 1=%p (%s), 2=%p (%s)\n\n",
> + "\nLinkPeerNode: 1=%p (%s), 2=%p (%s)\n",
> Op1, Op1 ? UtGetOpName(Op1->Asl.ParseOpcode) : NULL,
> Op2, Op2 ? UtGetOpName(Op2->Asl.ParseOpcode) : NULL);
>
> @@ -1202,7 +1283,7 @@ TrLinkPeerNode (
> if (Op1 == Op2)
> {
> DbgPrint (ASL_DEBUG_OUTPUT,
> - "\n\n************* Internal error, linking node to itself %p\n\n\n",
> + "\n************* Internal error, linking node to itself %p\n",
> Op1);
> AslError (ASL_WARNING, ASL_MSG_COMPILER_INTERNAL, Op1,
> "Linking node to itself");
> @@ -1286,7 +1367,7 @@ TrLinkPeerNodes (
> }
> va_end (ap);
>
> - DbgPrint (ASL_PARSE_OUTPUT,"\n\n");
> + DbgPrint (ASL_PARSE_OUTPUT,"\n");
> return (Start);
> }
>
> @@ -1313,7 +1394,7 @@ TrLinkChildNode (
>
>
> DbgPrint (ASL_PARSE_OUTPUT,
> - "\nLinkChildNode: Parent=%p (%s), Child=%p (%s)\n\n",
> + "\nLinkChildNode: Parent=%p (%s), Child=%p (%s)\n",
> Op1, Op1 ? UtGetOpName(Op1->Asl.ParseOpcode): NULL,
> Op2, Op2 ? UtGetOpName(Op2->Asl.ParseOpcode): NULL);
>
> diff --git a/src/acpica/source/compiler/asltypes.y b/src/acpica/source/compiler/asltypes.y
> index b1821f6..7051966 100644
> --- a/src/acpica/source/compiler/asltypes.y
> +++ b/src/acpica/source/compiler/asltypes.y
> @@ -146,7 +146,7 @@ NoEcho('
> %type <n> Term
> %type <n> TermArg
> %type <n> TermList
> -%type <n> UserTerm
> +%type <n> MethodInvocationTerm
>
> /* Type4Opcode is obsolete */
>
> diff --git a/src/acpica/source/compiler/aslutils.c b/src/acpica/source/compiler/aslutils.c
> index eb8a883..843c097 100644
> --- a/src/acpica/source/compiler/aslutils.c
> +++ b/src/acpica/source/compiler/aslutils.c
> @@ -575,8 +575,13 @@ UtDisplaySummary (
>
> if (Gbl_FileType != ASL_INPUT_TYPE_ASCII_DATA)
> {
> - FlPrintFile (FileId,
> - ", %u Optimizations", Gbl_ExceptionCount[ASL_OPTIMIZATION]);
> + FlPrintFile (FileId, ", %u Optimizations",
> + Gbl_ExceptionCount[ASL_OPTIMIZATION]);
> +
> + if (TotalFolds)
> + {
> + FlPrintFile (FileId, ", %u Constants Folded", TotalFolds);
> + }
> }
>
> FlPrintFile (FileId, "\n");
> diff --git a/src/acpica/source/compiler/aslwalks.c b/src/acpica/source/compiler/aslwalks.c
> index 679feb0..e1f2743 100644
> --- a/src/acpica/source/compiler/aslwalks.c
> +++ b/src/acpica/source/compiler/aslwalks.c
> @@ -324,6 +324,13 @@ AnOperandTypecheckWalkEnd (
> }
> return (AE_OK);
>
> + case AML_EXTERNAL_OP:
> + /*
> + * Not really a "runtime" opcode since it used by disassembler only.
> + * The parser will find any issues with the operands.
> + */
> + return (AE_OK);
> +
> default:
>
> break;
> @@ -460,9 +467,6 @@ AnOperandTypecheckWalkEnd (
> break;
>
> case PARSEOP_DEBUG:
> -
> - break;
> -
> case PARSEOP_REFOF:
> case PARSEOP_INDEX:
> default:
> diff --git a/src/acpica/source/compiler/dtcompile.c b/src/acpica/source/compiler/dtcompile.c
> index d5b3347..105151f 100644
> --- a/src/acpica/source/compiler/dtcompile.c
> +++ b/src/acpica/source/compiler/dtcompile.c
> @@ -174,13 +174,18 @@ DtDoCompile (
>
> /* Preprocessor */
>
> - Event = UtBeginEvent ("Preprocess input file");
> - PrDoPreprocess ();
> - UtEndEvent (Event);
> -
> - if (Gbl_PreprocessOnly)
> + if (Gbl_PreprocessFlag)
> {
> - return (AE_OK);
> + /* Preprocessor */
> +
> + Event = UtBeginEvent ("Preprocess input file");
> + PrDoPreprocess ();
> + UtEndEvent (Event);
> +
> + if (Gbl_PreprocessOnly)
> + {
> + return (AE_OK);
> + }
> }
>
> /*
> diff --git a/src/acpica/source/compiler/dtcompiler.h b/src/acpica/source/compiler/dtcompiler.h
> index b070c58..e063770 100644
> --- a/src/acpica/source/compiler/dtcompiler.h
> +++ b/src/acpica/source/compiler/dtcompiler.h
> @@ -157,15 +157,16 @@
> */
> typedef struct dt_field
> {
> - char *Name; /* Field name (from name : value) */
> - char *Value; /* Field value (from name : value) */
> - struct dt_field *Next; /* Next field */
> - struct dt_field *NextLabel; /* If field is a label, next label */
> - UINT32 Line; /* Line number for this field */
> - UINT32 ByteOffset; /* Offset in source file for field */
> - UINT32 NameColumn; /* Start column for field name */
> - UINT32 Column; /* Start column for field value */
> - UINT32 TableOffset;/* Binary offset within ACPI table */
> + char *Name; /* Field name (from name : value) */
> + char *Value; /* Field value (from name : value) */
> + UINT32 StringLength;/* Length of Value */
> + struct dt_field *Next; /* Next field */
> + struct dt_field *NextLabel; /* If field is a label, next label */
> + UINT32 Line; /* Line number for this field */
> + UINT32 ByteOffset; /* Offset in source file for field */
> + UINT32 NameColumn; /* Start column for field name */
> + UINT32 Column; /* Start column for field value */
> + UINT32 TableOffset; /* Binary offset within ACPI table */
> UINT8 Flags;
>
> } DT_FIELD;
> @@ -629,6 +630,7 @@ extern const unsigned char TemplateMcfg[];
> extern const unsigned char TemplateMchi[];
> extern const unsigned char TemplateMpst[];
> extern const unsigned char TemplateMsct[];
> +extern const unsigned char TemplateMsdm[];
> extern const unsigned char TemplateMtmr[];
> extern const unsigned char TemplatePcct[];
> extern const unsigned char TemplatePmtt[];
> diff --git a/src/acpica/source/compiler/dtio.c b/src/acpica/source/compiler/dtio.c
> index baec96a..111a6fa 100644
> --- a/src/acpica/source/compiler/dtio.c
> +++ b/src/acpica/source/compiler/dtio.c
> @@ -447,6 +447,7 @@ DtParseLine (
> Field->ByteOffset = Offset;
> Field->NameColumn = NameColumn;
> Field->Column = Column;
> + Field->StringLength = Length;
>
> DtLinkField (Field);
> }
> @@ -486,6 +487,7 @@ DtGetNextLine (
> int c;
>
>
> + ACPI_MEMSET (Gbl_CurrentLineBuffer, 0, Gbl_LineBufferSize);
> for (i = 0; ;)
> {
> /*
> @@ -1011,11 +1013,11 @@ DtDumpFieldList (
>
> DbgPrint (ASL_DEBUG_OUTPUT, "\nField List:\n"
> "LineNo ByteOff NameCol Column TableOff "
> - "Flags %32s : %s\n\n", "Name", "Value");
> + "Flags %32s : %s\n\n", "Name", "Value");
> while (Field)
> {
> DbgPrint (ASL_DEBUG_OUTPUT,
> - "%.08X %.08X %.08X %.08X %.08X %.08X %32s : %s\n",
> + "%.08X %.08X %.08X %.08X %.08X %2.2X %32s : %s\n",
> Field->Line, Field->ByteOffset, Field->NameColumn,
> Field->Column, Field->TableOffset, Field->Flags,
> Field->Name, Field->Value);
> diff --git a/src/acpica/source/compiler/dttable.c b/src/acpica/source/compiler/dttable.c
> index 56bfad7..85ffdad 100644
> --- a/src/acpica/source/compiler/dttable.c
> +++ b/src/acpica/source/compiler/dttable.c
> @@ -2312,15 +2312,11 @@ DtCompileSlic (
> DT_SUBTABLE *Subtable;
> DT_SUBTABLE *ParentTable;
> DT_FIELD **PFieldList = (DT_FIELD **) List;
> - DT_FIELD *SubtableStart;
> - ACPI_SLIC_HEADER *SlicHeader;
> - ACPI_DMTABLE_INFO *InfoTable;
>
>
> while (*PFieldList)
> {
> - SubtableStart = *PFieldList;
> - Status = DtCompileTable (PFieldList, AcpiDmTableInfoSlicHdr,
> + Status = DtCompileTable (PFieldList, AcpiDmTableInfoSlic,
> &Subtable, TRUE);
> if (ACPI_FAILURE (Status))
> {
> @@ -2330,35 +2326,6 @@ DtCompileSlic (
> ParentTable = DtPeekSubtable ();
> DtInsertSubtable (ParentTable, Subtable);
> DtPushSubtable (Subtable);
> -
> - SlicHeader = ACPI_CAST_PTR (ACPI_SLIC_HEADER, Subtable->Buffer);
> -
> - switch (SlicHeader->Type)
> - {
> - case ACPI_SLIC_TYPE_PUBLIC_KEY:
> -
> - InfoTable = AcpiDmTableInfoSlic0;
> - break;
> -
> - case ACPI_SLIC_TYPE_WINDOWS_MARKER:
> -
> - InfoTable = AcpiDmTableInfoSlic1;
> - break;
> -
> - default:
> -
> - DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "SLIC");
> - return (AE_ERROR);
> - }
> -
> - Status = DtCompileTable (PFieldList, InfoTable, &Subtable, TRUE);
> - if (ACPI_FAILURE (Status))
> - {
> - return (Status);
> - }
> -
> - ParentTable = DtPeekSubtable ();
> - DtInsertSubtable (ParentTable, Subtable);
> DtPopSubtable ();
> }
>
> diff --git a/src/acpica/source/compiler/dttemplate.h b/src/acpica/source/compiler/dttemplate.h
> index 9971f71..d7b84b1 100644
> --- a/src/acpica/source/compiler/dttemplate.h
> +++ b/src/acpica/source/compiler/dttemplate.h
> @@ -734,6 +734,23 @@ const unsigned char TemplateMchi[] =
> 0x00,0x00,0x00,0x00,0x00 /* 00000040 "....." */
> };
>
> +const unsigned char TemplateMsdm[] =
> +{
> + 0x4D,0x53,0x44,0x4D,0x64,0x00,0x00,0x00, /* 00000000 "MSDMd..." */
> + 0x01,0x34,0x49,0x6E,0x74,0x65,0x6C,0x00, /* 00000008 ".4Intel." */
> + 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
> + 0x03,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
> + 0x04,0x02,0x15,0x20,0x00,0x00,0x00,0x00, /* 00000020 "... ...." */
> + 0x0A,0x10,0x16,0x17,0x18,0x19,0x1A,0x1B, /* 00000028 "........" */
> + 0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23, /* 00000030 ".... !"#" */
> + 0x24,0x25,0x26,0x27,0x10,0x0A,0x15,0x16, /* 00000038 "$%&'...." */
> + 0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E, /* 00000040 "........" */
> + 0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26, /* 00000048 ". !"#$%&" */
> + 0x16,0x15,0x0A,0x10,0x16,0x17,0x18,0x19, /* 00000050 "........" */
> + 0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21, /* 00000058 "...... !" */
> + 0x22,0x23,0x24,0x25 /* 00000060 ""#$%" */
> +};
> +
> const unsigned char TemplateMpst[] =
> {
> 0x4D,0x50,0x53,0x54,0xB6,0x00,0x00,0x00, /* 00000000 "MPST...." */
> diff --git a/src/acpica/source/compiler/dtutils.c b/src/acpica/source/compiler/dtutils.c
> index 5beadd1..4b795c0 100644
> --- a/src/acpica/source/compiler/dtutils.c
> +++ b/src/acpica/source/compiler/dtutils.c
> @@ -436,6 +436,7 @@ DtGetFieldType (
> break;
>
> case ACPI_DMT_BUFFER:
> + case ACPI_DMT_RAW_BUFFER:
> case ACPI_DMT_BUF7:
> case ACPI_DMT_BUF10:
> case ACPI_DMT_BUF16:
> @@ -603,7 +604,6 @@ DtGetFieldLength (
>
> case ACPI_DMT_UINT32:
> case ACPI_DMT_NAME4:
> - case ACPI_DMT_SLIC:
> case ACPI_DMT_SIG:
> case ACPI_DMT_LPIT:
>
> @@ -660,6 +660,7 @@ DtGetFieldLength (
> break;
>
> case ACPI_DMT_BUFFER:
> + case ACPI_DMT_RAW_BUFFER:
>
> Value = DtGetFieldValue (Field);
> if (Value)
> diff --git a/src/acpica/source/components/debugger/dbmethod.c b/src/acpica/source/components/debugger/dbmethod.c
> index 72076a7..056da77 100644
> --- a/src/acpica/source/components/debugger/dbmethod.c
> +++ b/src/acpica/source/components/debugger/dbmethod.c
> @@ -466,9 +466,9 @@ AcpiDbDisassembleMethod (
>
> /* Now we can disassemble the method */
>
> - AcpiGbl_DbOpt_verbose = FALSE;
> + AcpiGbl_DbOpt_Verbose = FALSE;
> AcpiDmDisassemble (NULL, Op, 0);
> - AcpiGbl_DbOpt_verbose = TRUE;
> + AcpiGbl_DbOpt_Verbose = TRUE;
>
> AcpiPsDeleteParseTree (Op);
>
> diff --git a/src/acpica/source/components/debugger/dbxface.c b/src/acpica/source/components/debugger/dbxface.c
> index ac03ccc..542319f 100644
> --- a/src/acpica/source/components/debugger/dbxface.c
> +++ b/src/acpica/source/components/debugger/dbxface.c
> @@ -494,11 +494,9 @@ AcpiDbInitialize (
> AcpiGbl_DbConsoleDebugLevel = ACPI_NORMAL_DEFAULT | ACPI_LV_TABLES;
> AcpiGbl_DbOutputFlags = ACPI_DB_CONSOLE_OUTPUT;
>
> - AcpiGbl_DbOpt_tables = FALSE;
> - AcpiGbl_DbOpt_disasm = FALSE;
> - AcpiGbl_DbOpt_stats = FALSE;
> - AcpiGbl_DbOpt_verbose = TRUE;
> - AcpiGbl_DbOpt_ini_methods = TRUE;
> + AcpiGbl_DbOpt_Disasm = FALSE;
> + AcpiGbl_DbOpt_Verbose = TRUE;
> + AcpiGbl_DbOpt_NoIniMethods = FALSE;
>
> AcpiGbl_DbBuffer = AcpiOsAllocate (ACPI_DEBUG_BUFFER_SIZE);
> if (!AcpiGbl_DbBuffer)
> @@ -546,10 +544,9 @@ AcpiDbInitialize (
> }
> }
>
> - if (!AcpiGbl_DbOpt_verbose)
> + if (!AcpiGbl_DbOpt_Verbose)
> {
> - AcpiGbl_DbOpt_disasm = TRUE;
> - AcpiGbl_DbOpt_stats = FALSE;
> + AcpiGbl_DbOpt_Disasm = TRUE;
> }
>
> return_ACPI_STATUS (AE_OK);
> diff --git a/src/acpica/source/components/disassembler/dmopcode.c b/src/acpica/source/components/disassembler/dmopcode.c
> index 99d3ead..72cb99c 100644
> --- a/src/acpica/source/components/disassembler/dmopcode.c
> +++ b/src/acpica/source/components/disassembler/dmopcode.c
> @@ -924,18 +924,6 @@ AcpiDmDisassembleOneOp (
> }
> break;
>
> - case AML_INT_STATICSTRING_OP:
> -
> - if (Op->Common.Value.String)
> - {
> - AcpiOsPrintf ("%s", Op->Common.Value.String);
> - }
> - else
> - {
> - AcpiOsPrintf ("\"<NULL STATIC STRING PTR>\"");
> - }
> - break;
> -
> case AML_INT_NAMEPATH_OP:
>
> AcpiDmNamestring (Op->Common.Value.Name);
> diff --git a/src/acpica/source/components/disassembler/dmwalk.c b/src/acpica/source/components/disassembler/dmwalk.c
> index 79a1872..9c0a1ac 100644
> --- a/src/acpica/source/components/disassembler/dmwalk.c
> +++ b/src/acpica/source/components/disassembler/dmwalk.c
> @@ -634,7 +634,7 @@ AcpiDmDescendingOp (
>
> if (Op->Common.AmlOpcode != AML_INT_NAMEDFIELD_OP)
> {
> - if (AcpiGbl_DbOpt_verbose)
> + if (AcpiGbl_DbOpt_Verbose)
> {
> (void) AcpiPsDisplayObjectPathname (NULL, Op);
> }
> diff --git a/src/acpica/source/components/dispatcher/dsopcode.c b/src/acpica/source/components/dispatcher/dsopcode.c
> index 6a761f5..6a7a559 100644
> --- a/src/acpica/source/components/dispatcher/dsopcode.c
> +++ b/src/acpica/source/components/dispatcher/dsopcode.c
> @@ -549,7 +549,7 @@ AcpiDsEvalRegionOperands (
>
> ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
> ObjDesc,
> - ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
> + ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
> ObjDesc->Region.Length));
>
> /* Now the address and length are valid for this opregion */
> @@ -651,12 +651,12 @@ AcpiDsEvalTableRegionOperands (
> return_ACPI_STATUS (AE_NOT_EXIST);
> }
>
> - ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS) ACPI_TO_INTEGER (Table);
> + ObjDesc->Region.Address = ACPI_PTR_TO_PHYSADDR (Table);
> ObjDesc->Region.Length = Table->Length;
>
> ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
> ObjDesc,
> - ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
> + ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
> ObjDesc->Region.Length));
>
> /* Now the address and length are valid for this opregion */
> diff --git a/src/acpica/source/components/dispatcher/dsutils.c b/src/acpica/source/components/dispatcher/dsutils.c
> index b98fc9a..0269916 100644
> --- a/src/acpica/source/components/dispatcher/dsutils.c
> +++ b/src/acpica/source/components/dispatcher/dsutils.c
> @@ -671,6 +671,15 @@ AcpiDsCreateOperand (
> ACPI_OPERAND_OBJECT, AcpiGbl_RootNode);
> Status = AE_OK;
> }
> + else if (ParentOp->Common.AmlOpcode == AML_EXTERNAL_OP)
> + {
> + /* TBD: May only be temporary */
> +
> + ObjDesc = AcpiUtCreateStringObject ((ACPI_SIZE) NameLength);
> +
> + ACPI_STRNCPY (ObjDesc->String.Pointer, NameString, NameLength);
> + Status = AE_OK;
> + }
> else
> {
> /*
> diff --git a/src/acpica/source/components/events/evregion.c b/src/acpica/source/components/events/evregion.c
> index bd0fd7b..25a7900 100644
> --- a/src/acpica/source/components/events/evregion.c
> +++ b/src/acpica/source/components/events/evregion.c
> @@ -360,7 +360,7 @@ AcpiEvAddressSpaceDispatch (
> ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
> "Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
> &RegionObj->Region.Handler->AddressSpace, Handler,
> - ACPI_FORMAT_NATIVE_UINT (Address),
> + ACPI_FORMAT_UINT64 (Address),
> AcpiUtGetRegionName (RegionObj->Region.SpaceId)));
>
> if (!(HandlerDesc->AddressSpace.HandlerFlags &
> diff --git a/src/acpica/source/components/events/evxfevnt.c b/src/acpica/source/components/events/evxfevnt.c
> index 426a0be..271aacc 100644
> --- a/src/acpica/source/components/events/evxfevnt.c
> +++ b/src/acpica/source/components/events/evxfevnt.c
> @@ -473,7 +473,8 @@ AcpiGetEventStatus (
>
> if (InByte)
> {
> - LocalEventStatus |= ACPI_EVENT_FLAG_ENABLED;
> + LocalEventStatus |=
> + (ACPI_EVENT_FLAG_ENABLED | ACPI_EVENT_FLAG_ENABLE_SET);
> }
>
> /* Fixed event currently active? */
> @@ -487,7 +488,7 @@ AcpiGetEventStatus (
>
> if (InByte)
> {
> - LocalEventStatus |= ACPI_EVENT_FLAG_SET;
> + LocalEventStatus |= ACPI_EVENT_FLAG_STATUS_SET;
> }
>
> (*EventStatus) = LocalEventStatus;
> diff --git a/src/acpica/source/components/executer/exdump.c b/src/acpica/source/components/executer/exdump.c
> index 8d318a0..09930ed 100644
> --- a/src/acpica/source/components/executer/exdump.c
> +++ b/src/acpica/source/components/executer/exdump.c
> @@ -856,7 +856,7 @@ AcpiExDumpOperand (
> else
> {
> AcpiOsPrintf (" base %8.8X%8.8X Length %X\n",
> - ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
> + ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
> ObjDesc->Region.Length);
> }
> break;
> diff --git a/src/acpica/source/components/executer/exfldio.c b/src/acpica/source/components/executer/exfldio.c
> index 3e6b18f..cd0233d 100644
> --- a/src/acpica/source/components/executer/exfldio.c
> +++ b/src/acpica/source/components/executer/exfldio.c
> @@ -361,13 +361,13 @@ AcpiExAccessRegion (
> }
>
> ACPI_DEBUG_PRINT_RAW ((ACPI_DB_BFIELD,
> - " Region [%s:%X], Width %X, ByteBase %X, Offset %X at %p\n",
> + " Region [%s:%X], Width %X, ByteBase %X, Offset %X at %8.8X%8.8X\n",
> AcpiUtGetRegionName (RgnDesc->Region.SpaceId),
> RgnDesc->Region.SpaceId,
> ObjDesc->CommonField.AccessByteWidth,
> ObjDesc->CommonField.BaseByteOffset,
> FieldDatumByteOffset,
> - ACPI_CAST_PTR (void, (RgnDesc->Region.Address + RegionOffset))));
> + ACPI_FORMAT_UINT64 (RgnDesc->Region.Address + RegionOffset)));
>
> /* Invoke the appropriate AddressSpace/OpRegion handler */
>
> diff --git a/src/acpica/source/components/executer/exoparg3.c b/src/acpica/source/components/executer/exoparg3.c
> index 507720f..b0928af 100644
> --- a/src/acpica/source/components/executer/exoparg3.c
> +++ b/src/acpica/source/components/executer/exoparg3.c
> @@ -198,7 +198,18 @@ AcpiExOpcode_3A_0T_0R (
> /* Might return while OS is shutting down, just continue */
>
> ACPI_FREE (Fatal);
> - break;
> + goto Cleanup;
> +
> + case AML_EXTERNAL_OP:
> + /*
> + * If the interpreter sees this opcode, just ignore it. The External
> + * op is intended for use by disassemblers in order to properly
> + * disassemble control method invocations. The opcode or group of
> + * opcodes should be surrounded by an "if (0)" clause to ensure that
> + * AML interpreters never see the opcode.
> + */
> + Status = AE_OK;
> + goto Cleanup;
>
> default:
>
> diff --git a/src/acpica/source/components/executer/exregion.c b/src/acpica/source/components/executer/exregion.c
> index 5b66ffa..31bbb60 100644
> --- a/src/acpica/source/components/executer/exregion.c
> +++ b/src/acpica/source/components/executer/exregion.c
> @@ -247,8 +247,8 @@ AcpiExSystemMemorySpaceHandler (
> * one page, which is similar to the original code that used a 4k
> * maximum window.
> */
> - PageBoundaryMapLength =
> - ACPI_ROUND_UP (Address, ACPI_DEFAULT_PAGE_SIZE) - Address;
> + PageBoundaryMapLength = (ACPI_SIZE)
> + (ACPI_ROUND_UP (Address, ACPI_DEFAULT_PAGE_SIZE) - Address);
> if (PageBoundaryMapLength == 0)
> {
> PageBoundaryMapLength = ACPI_DEFAULT_PAGE_SIZE;
> @@ -261,13 +261,12 @@ AcpiExSystemMemorySpaceHandler (
>
> /* Create a new mapping starting at the address given */
>
> - MemInfo->MappedLogicalAddress = AcpiOsMapMemory (
> - (ACPI_PHYSICAL_ADDRESS) Address, MapLength);
> + MemInfo->MappedLogicalAddress = AcpiOsMapMemory (Address, MapLength);
> if (!MemInfo->MappedLogicalAddress)
> {
> ACPI_ERROR ((AE_INFO,
> "Could not map memory at 0x%8.8X%8.8X, size %u",
> - ACPI_FORMAT_NATIVE_UINT (Address), (UINT32) MapLength));
> + ACPI_FORMAT_UINT64 (Address), (UINT32) MapLength));
> MemInfo->MappedLength = 0;
> return_ACPI_STATUS (AE_NO_MEMORY);
> }
> @@ -287,7 +286,7 @@ AcpiExSystemMemorySpaceHandler (
>
> ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> "System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n",
> - BitWidth, Function, ACPI_FORMAT_NATIVE_UINT (Address)));
> + BitWidth, Function, ACPI_FORMAT_UINT64 (Address)));
>
> /*
> * Perform the memory read or write
> @@ -410,7 +409,7 @@ AcpiExSystemIoSpaceHandler (
>
> ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
> "System-IO (width %u) R/W %u Address=%8.8X%8.8X\n",
> - BitWidth, Function, ACPI_FORMAT_NATIVE_UINT (Address)));
> + BitWidth, Function, ACPI_FORMAT_UINT64 (Address)));
>
> /* Decode the function parameter */
>
> diff --git a/src/acpica/source/components/hardware/hwgpe.c b/src/acpica/source/components/hardware/hwgpe.c
> index d39b7ac..c532689 100644
> --- a/src/acpica/source/components/hardware/hwgpe.c
> +++ b/src/acpica/source/components/hardware/hwgpe.c
> @@ -352,6 +352,19 @@ AcpiHwGetGpeStatus (
> LocalEventStatus |= ACPI_EVENT_FLAG_WAKE_ENABLED;
> }
>
> + /* GPE currently enabled (enable bit == 1)? */
> +
> + Status = AcpiHwRead (&InByte, &GpeRegisterInfo->EnableAddress);
> + if (ACPI_FAILURE (Status))
> + {
> + return (Status);
> + }
> +
> + if (RegisterBit & InByte)
> + {
> + LocalEventStatus |= ACPI_EVENT_FLAG_ENABLE_SET;
> + }
> +
> /* GPE currently active (status bit == 1)? */
>
> Status = AcpiHwRead (&InByte, &GpeRegisterInfo->StatusAddress);
> @@ -362,7 +375,7 @@ AcpiHwGetGpeStatus (
>
> if (RegisterBit & InByte)
> {
> - LocalEventStatus |= ACPI_EVENT_FLAG_SET;
> + LocalEventStatus |= ACPI_EVENT_FLAG_STATUS_SET;
> }
>
> /* Set return value */
> diff --git a/src/acpica/source/components/hardware/hwvalid.c b/src/acpica/source/components/hardware/hwvalid.c
> index 410c42c..47dd722 100644
> --- a/src/acpica/source/components/hardware/hwvalid.c
> +++ b/src/acpica/source/components/hardware/hwvalid.c
> @@ -227,8 +227,8 @@ AcpiHwValidateIoRequest (
> ByteWidth = ACPI_DIV_8 (BitWidth);
> LastAddress = Address + ByteWidth - 1;
>
> - ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Address %p LastAddress %p Length %X",
> - ACPI_CAST_PTR (void, Address), ACPI_CAST_PTR (void, LastAddress),
> + ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Address %8.8X%8.8X LastAddress %8.8X%8.8X Length %X",
> + ACPI_FORMAT_UINT64 (Address), ACPI_FORMAT_UINT64 (LastAddress),
> ByteWidth));
>
> /* Maximum 16-bit address in I/O space */
> @@ -236,8 +236,8 @@ AcpiHwValidateIoRequest (
> if (LastAddress > ACPI_UINT16_MAX)
> {
> ACPI_ERROR ((AE_INFO,
> - "Illegal I/O port address/length above 64K: %p/0x%X",
> - ACPI_CAST_PTR (void, Address), ByteWidth));
> + "Illegal I/O port address/length above 64K: %8.8X%8.8X/0x%X",
> + ACPI_FORMAT_UINT64 (Address), ByteWidth));
> return_ACPI_STATUS (AE_LIMIT);
> }
>
> @@ -268,8 +268,8 @@ AcpiHwValidateIoRequest (
> if (AcpiGbl_OsiData >= PortInfo->OsiDependency)
> {
> ACPI_DEBUG_PRINT ((ACPI_DB_IO,
> - "Denied AML access to port 0x%p/%X (%s 0x%.4X-0x%.4X)",
> - ACPI_CAST_PTR (void, Address), ByteWidth, PortInfo->Name,
> + "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)",
> + ACPI_FORMAT_UINT64 (Address), ByteWidth, PortInfo->Name,
> PortInfo->Start, PortInfo->End));
>
> return_ACPI_STATUS (AE_AML_ILLEGAL_ADDRESS);
> diff --git a/src/acpica/source/components/namespace/nsdump.c b/src/acpica/source/components/namespace/nsdump.c
> index 3d0e596..8b6c8ce 100644
> --- a/src/acpica/source/components/namespace/nsdump.c
> +++ b/src/acpica/source/components/namespace/nsdump.c
> @@ -386,9 +386,9 @@ AcpiNsDumpOneObject (
> {
> case ACPI_TYPE_PROCESSOR:
>
> - AcpiOsPrintf ("ID %02X Len %02X Addr %p\n",
> + AcpiOsPrintf ("ID %02X Len %02X Addr %8.8X%8.8X\n",
> ObjDesc->Processor.ProcId, ObjDesc->Processor.Length,
> - ACPI_CAST_PTR (void, ObjDesc->Processor.Address));
> + ACPI_FORMAT_UINT64 (ObjDesc->Processor.Address));
> break;
>
> case ACPI_TYPE_DEVICE:
> @@ -461,7 +461,7 @@ AcpiNsDumpOneObject (
> if (ObjDesc->Region.Flags & AOPOBJ_DATA_VALID)
> {
> AcpiOsPrintf (" Addr %8.8X%8.8X Len %.4X\n",
> - ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
> + ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
> ObjDesc->Region.Length);
> }
> else
> diff --git a/src/acpica/source/components/parser/psopcode.c b/src/acpica/source/components/parser/psopcode.c
> index 1f94916..41181c6 100644
> --- a/src/acpica/source/components/parser/psopcode.c
> +++ b/src/acpica/source/components/parser/psopcode.c
> @@ -405,7 +405,11 @@ const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES] =
> /* ACPI 5.0 opcodes */
>
> /* 7F */ ACPI_OP ("-ConnectField-", ARGP_CONNECTFIELD_OP, ARGI_CONNECTFIELD_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, AML_HAS_ARGS),
> -/* 80 */ ACPI_OP ("-ExtAccessField-", ARGP_CONNECTFIELD_OP, ARGI_CONNECTFIELD_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0)
> +/* 80 */ ACPI_OP ("-ExtAccessField-", ARGP_CONNECTFIELD_OP, ARGI_CONNECTFIELD_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0),
> +
> +/* ACPI 6.0 opcodes */
> +
> +/* 81 */ ACPI_OP ("External", ARGP_EXTERNAL_OP, ARGI_EXTERNAL_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE,/* ? */ AML_TYPE_EXEC_3A_0T_0R, AML_FLAGS_EXEC_3A_0T_0R)
>
> /*! [End] no source code translation !*/
> };
> diff --git a/src/acpica/source/components/parser/psopinfo.c b/src/acpica/source/components/parser/psopinfo.c
> index a059b74..e0fbd89 100644
> --- a/src/acpica/source/components/parser/psopinfo.c
> +++ b/src/acpica/source/components/parser/psopinfo.c
> @@ -298,7 +298,7 @@ const UINT8 AcpiGbl_ShortOpIndex[256] =
> /* 8 9 A B C D E F */
> /* 0x00 */ 0x00, 0x01, _UNK, _UNK, _UNK, _UNK, 0x02, _UNK,
> /* 0x08 */ 0x03, _UNK, 0x04, 0x05, 0x06, 0x07, 0x6E, _UNK,
> -/* 0x10 */ 0x08, 0x09, 0x0a, 0x6F, 0x0b, _UNK, _UNK, _UNK,
> +/* 0x10 */ 0x08, 0x09, 0x0a, 0x6F, 0x0b, 0x81, _UNK, _UNK,
> /* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
> /* 0x20 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
> /* 0x28 */ _UNK, _UNK, _UNK, _UNK, _UNK, 0x63, _PFX, _PFX,
> diff --git a/src/acpica/source/components/resources/rsaddr.c b/src/acpica/source/components/resources/rsaddr.c
> index 583f3ef..9d1d4d7 100644
> --- a/src/acpica/source/components/resources/rsaddr.c
> +++ b/src/acpica/source/components/resources/rsaddr.c
> @@ -149,7 +149,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertAddress16[5] =
> * Address Translation Offset
> * Address Length
> */
> - {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.Address16.Granularity),
> + {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.Address16.Address.Granularity),
> AML_OFFSET (Address16.Granularity),
> 5},
>
> @@ -189,7 +189,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertAddress32[5] =
> * Address Translation Offset
> * Address Length
> */
> - {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.Address32.Granularity),
> + {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.Address32.Address.Granularity),
> AML_OFFSET (Address32.Granularity),
> 5},
>
> @@ -229,7 +229,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertAddress64[5] =
> * Address Translation Offset
> * Address Length
> */
> - {ACPI_RSC_MOVE64, ACPI_RS_OFFSET (Data.Address64.Granularity),
> + {ACPI_RSC_MOVE64, ACPI_RS_OFFSET (Data.Address64.Address.Granularity),
> AML_OFFSET (Address64.Granularity),
> 5},
>
> @@ -275,7 +275,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertExtAddress64[5] =
> * Address Length
> * Type-Specific Attribute
> */
> - {ACPI_RSC_MOVE64, ACPI_RS_OFFSET (Data.ExtAddress64.Granularity),
> + {ACPI_RSC_MOVE64, ACPI_RS_OFFSET (Data.ExtAddress64.Address.Granularity),
> AML_OFFSET (ExtAddress64.Granularity),
> 6}
> };
> diff --git a/src/acpica/source/components/resources/rsdump.c b/src/acpica/source/components/resources/rsdump.c
> index 0d3d2b7..6237118 100644
> --- a/src/acpica/source/components/resources/rsdump.c
> +++ b/src/acpica/source/components/resources/rsdump.c
> @@ -1,6 +1,6 @@
> /*******************************************************************************
> *
> - * Module Name: rsdump - Functions to display the resource structures.
> + * Module Name: rsdump - AML debugger support for resource structures.
> *
> ******************************************************************************/
>
> @@ -120,8 +120,10 @@
> #define _COMPONENT ACPI_RESOURCES
> ACPI_MODULE_NAME ("rsdump")
>
> -
> -#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER)
> +/*
> + * All functions in this module are used by the AML Debugger only
> + */
> +#if defined(ACPI_DEBUGGER)
>
> /* Local prototypes */
>
> @@ -161,8 +163,8 @@ AcpiRsDumpByteList (
>
> static void
> AcpiRsDumpWordList (
> - UINT16 Length,
> - UINT16 *Data);
> + UINT16 Length,
> + UINT16 *Data);
>
> static void
> AcpiRsDumpDwordList (
> @@ -171,8 +173,8 @@ AcpiRsDumpDwordList (
>
> static void
> AcpiRsDumpShortByteList (
> - UINT8 Length,
> - UINT8 *Data);
> + UINT8 Length,
> + UINT8 *Data);
>
> static void
> AcpiRsDumpResourceSource (
> @@ -185,7 +187,133 @@ AcpiRsDumpAddressCommon (
> static void
> AcpiRsDumpDescriptor (
> void *Resource,
> - ACPI_RSDUMP_INFO *Table);
> + ACPI_RSDUMP_INFO *Table);
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: AcpiRsDumpResourceList
> + *
> + * PARAMETERS: ResourceList - Pointer to a resource descriptor list
> + *
> + * RETURN: None
> + *
> + * DESCRIPTION: Dispatches the structure to the correct dump routine.
> + *
> + ******************************************************************************/
> +
> +void
> +AcpiRsDumpResourceList (
> + ACPI_RESOURCE *ResourceList)
> +{
> + UINT32 Count = 0;
> + UINT32 Type;
> +
> +
> + ACPI_FUNCTION_ENTRY ();
> +
> +
> + /* Check if debug output enabled */
> +
> + if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
> + {
> + return;
> + }
> +
> + /* Walk list and dump all resource descriptors (END_TAG terminates) */
> +
> + do
> + {
> + AcpiOsPrintf ("\n[%02X] ", Count);
> + Count++;
> +
> + /* Validate Type before dispatch */
> +
> + Type = ResourceList->Type;
> + if (Type > ACPI_RESOURCE_TYPE_MAX)
> + {
> + AcpiOsPrintf (
> + "Invalid descriptor type (%X) in resource list\n",
> + ResourceList->Type);
> + return;
> + }
> +
> + /* Sanity check the length. It must not be zero, or we loop forever */
> +
> + if (!ResourceList->Length)
> + {
> + AcpiOsPrintf (
> + "Invalid zero length descriptor in resource list\n");
> + return;
> + }
> +
> + /* Dump the resource descriptor */
> +
> + if (Type == ACPI_RESOURCE_TYPE_SERIAL_BUS)
> + {
> + AcpiRsDumpDescriptor (&ResourceList->Data,
> + AcpiGbl_DumpSerialBusDispatch[
> + ResourceList->Data.CommonSerialBus.Type]);
> + }
> + else
> + {
> + AcpiRsDumpDescriptor (&ResourceList->Data,
> + AcpiGbl_DumpResourceDispatch[Type]);
> + }
> +
> + /* Point to the next resource structure */
> +
> + ResourceList = ACPI_NEXT_RESOURCE (ResourceList);
> +
> + /* Exit when END_TAG descriptor is reached */
> +
> + } while (Type != ACPI_RESOURCE_TYPE_END_TAG);
> +}
> +
> +
> +/*******************************************************************************
> + *
> + * FUNCTION: AcpiRsDumpIrqList
> + *
> + * PARAMETERS: RouteTable - Pointer to the routing table to dump.
> + *
> + * RETURN: None
> + *
> + * DESCRIPTION: Print IRQ routing table
> + *
> + ******************************************************************************/
> +
> +void
> +AcpiRsDumpIrqList (
> + UINT8 *RouteTable)
> +{
> + ACPI_PCI_ROUTING_TABLE *PrtElement;
> + UINT8 Count;
> +
> +
> + ACPI_FUNCTION_ENTRY ();
> +
> +
> + /* Check if debug output enabled */
> +
> + if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
> + {
> + return;
> + }
> +
> + PrtElement = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, RouteTable);
> +
> + /* Dump all table elements, Exit on zero length element */
> +
> + for (Count = 0; PrtElement->Length; Count++)
> + {
> + AcpiOsPrintf ("\n[%02X] PCI IRQ Routing Table Package\n", Count);
> + AcpiRsDumpDescriptor (PrtElement, AcpiRsDumpPrt);
> +
> + PrtElement = ACPI_ADD_PTR (ACPI_PCI_ROUTING_TABLE,
> + PrtElement, PrtElement->Length);
> + }
> +}
>
>
> /*******************************************************************************
> @@ -360,14 +488,16 @@ AcpiRsDumpDescriptor (
> /*
> * Common flags for all Address resources
> */
> - AcpiRsDumpAddressCommon (ACPI_CAST_PTR (ACPI_RESOURCE_DATA, Target));
> + AcpiRsDumpAddressCommon (ACPI_CAST_PTR (
> + ACPI_RESOURCE_DATA, Target));
> break;
>
> case ACPI_RSD_SOURCE:
> /*
> * Optional ResourceSource for Address resources
> */
> - AcpiRsDumpResourceSource (ACPI_CAST_PTR (ACPI_RESOURCE_SOURCE, Target));
> + AcpiRsDumpResourceSource (ACPI_CAST_PTR (
> + ACPI_RESOURCE_SOURCE, Target));
> break;
>
> default:
> @@ -471,131 +601,6 @@ AcpiRsDumpAddressCommon (
>
> /*******************************************************************************
> *
> - * FUNCTION: AcpiRsDumpResourceList
> - *
> - * PARAMETERS: ResourceList - Pointer to a resource descriptor list
> - *
> - * RETURN: None
> - *
> - * DESCRIPTION: Dispatches the structure to the correct dump routine.
> - *
> - ******************************************************************************/
> -
> -void
> -AcpiRsDumpResourceList (
> - ACPI_RESOURCE *ResourceList)
> -{
> - UINT32 Count = 0;
> - UINT32 Type;
> -
> -
> - ACPI_FUNCTION_ENTRY ();
> -
> -
> - /* Check if debug output enabled */
> -
> - if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
> - {
> - return;
> - }
> -
> - /* Walk list and dump all resource descriptors (END_TAG terminates) */
> -
> - do
> - {
> - AcpiOsPrintf ("\n[%02X] ", Count);
> - Count++;
> -
> - /* Validate Type before dispatch */
> -
> - Type = ResourceList->Type;
> - if (Type > ACPI_RESOURCE_TYPE_MAX)
> - {
> - AcpiOsPrintf (
> - "Invalid descriptor type (%X) in resource list\n",
> - ResourceList->Type);
> - return;
> - }
> -
> - /* Sanity check the length. It must not be zero, or we loop forever */
> -
> - if (!ResourceList->Length)
> - {
> - AcpiOsPrintf (
> - "Invalid zero length descriptor in resource list\n");
> - return;
> - }
> -
> - /* Dump the resource descriptor */
> -
> - if (Type == ACPI_RESOURCE_TYPE_SERIAL_BUS)
> - {
> - AcpiRsDumpDescriptor (&ResourceList->Data,
> - AcpiGbl_DumpSerialBusDispatch[ResourceList->Data.CommonSerialBus.Type]);
> - }
> - else
> - {
> - AcpiRsDumpDescriptor (&ResourceList->Data,
> - AcpiGbl_DumpResourceDispatch[Type]);
> - }
> -
> - /* Point to the next resource structure */
> -
> - ResourceList = ACPI_NEXT_RESOURCE (ResourceList);
> -
> - /* Exit when END_TAG descriptor is reached */
> -
> - } while (Type != ACPI_RESOURCE_TYPE_END_TAG);
> -}
> -
> -
> -/*******************************************************************************
> - *
> - * FUNCTION: AcpiRsDumpIrqList
> - *
> - * PARAMETERS: RouteTable - Pointer to the routing table to dump.
> - *
> - * RETURN: None
> - *
> - * DESCRIPTION: Print IRQ routing table
> - *
> - ******************************************************************************/
> -
> -void
> -AcpiRsDumpIrqList (
> - UINT8 *RouteTable)
> -{
> - ACPI_PCI_ROUTING_TABLE *PrtElement;
> - UINT8 Count;
> -
> -
> - ACPI_FUNCTION_ENTRY ();
> -
> -
> - /* Check if debug output enabled */
> -
> - if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
> - {
> - return;
> - }
> -
> - PrtElement = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, RouteTable);
> -
> - /* Dump all table elements, Exit on zero length element */
> -
> - for (Count = 0; PrtElement->Length; Count++)
> - {
> - AcpiOsPrintf ("\n[%02X] PCI IRQ Routing Table Package\n", Count);
> - AcpiRsDumpDescriptor (PrtElement, AcpiRsDumpPrt);
> -
> - PrtElement = ACPI_ADD_PTR (ACPI_PCI_ROUTING_TABLE,
> - PrtElement, PrtElement->Length);
> - }
> -}
> -
> -
> -/*******************************************************************************
> - *
> * FUNCTION: AcpiRsOut*
> *
> * PARAMETERS: Title - Name of the resource field
> @@ -692,8 +697,8 @@ AcpiRsDumpByteList (
>
> static void
> AcpiRsDumpShortByteList (
> - UINT8 Length,
> - UINT8 *Data)
> + UINT8 Length,
> + UINT8 *Data)
> {
> UINT8 i;
>
> diff --git a/src/acpica/source/components/resources/rsdumpinfo.c b/src/acpica/source/components/resources/rsdumpinfo.c
> index c57f2ca..0f15187 100644
> --- a/src/acpica/source/components/resources/rsdumpinfo.c
> +++ b/src/acpica/source/components/resources/rsdumpinfo.c
> @@ -233,11 +233,12 @@ ACPI_RSDUMP_INFO AcpiRsDumpAddress16[8] =
> {
> {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpAddress16), "16-Bit WORD Address Space",NULL},
> {ACPI_RSD_ADDRESS, 0, NULL, NULL},
> - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Granularity), "Granularity", NULL},
> - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Minimum), "Address Minimum", NULL},
> - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Maximum), "Address Maximum", NULL},
> - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.TranslationOffset), "Translation Offset", NULL},
> - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.AddressLength), "Address Length", NULL},
> + {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Address.Granularity), "Granularity", NULL},
> + {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Address.Minimum), "Address Minimum", NULL},
> + {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Address.Maximum), "Address Maximum", NULL},
> + {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Address.TranslationOffset),
> + "Translation Offset", NULL},
> + {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (Address16.Address.AddressLength), "Address Length", NULL},
> {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (Address16.ResourceSource), NULL, NULL}
> };
>
> @@ -245,11 +246,12 @@ ACPI_RSDUMP_INFO AcpiRsDumpAddress32[8] =
> {
> {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpAddress32), "32-Bit DWORD Address Space", NULL},
> {ACPI_RSD_ADDRESS, 0, NULL, NULL},
> - {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Granularity), "Granularity", NULL},
> - {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Minimum), "Address Minimum", NULL},
> - {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Maximum), "Address Maximum", NULL},
> - {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.TranslationOffset), "Translation Offset", NULL},
> - {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.AddressLength), "Address Length", NULL},
> + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Address.Granularity), "Granularity", NULL},
> + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Address.Minimum), "Address Minimum", NULL},
> + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Address.Maximum), "Address Maximum", NULL},
> + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Address.TranslationOffset),
> + "Translation Offset", NULL},
> + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (Address32.Address.AddressLength), "Address Length", NULL},
> {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (Address32.ResourceSource), NULL, NULL}
> };
>
> @@ -257,11 +259,12 @@ ACPI_RSDUMP_INFO AcpiRsDumpAddress64[8] =
> {
> {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpAddress64), "64-Bit QWORD Address Space", NULL},
> {ACPI_RSD_ADDRESS, 0, NULL, NULL},
> - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Granularity), "Granularity", NULL},
> - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Minimum), "Address Minimum", NULL},
> - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Maximum), "Address Maximum", NULL},
> - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.TranslationOffset), "Translation Offset", NULL},
> - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.AddressLength), "Address Length", NULL},
> + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Address.Granularity), "Granularity", NULL},
> + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Address.Minimum), "Address Minimum", NULL},
> + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Address.Maximum), "Address Maximum", NULL},
> + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Address.TranslationOffset),
> + "Translation Offset", NULL},
> + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (Address64.Address.AddressLength), "Address Length", NULL},
> {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (Address64.ResourceSource), NULL, NULL}
> };
>
> @@ -269,11 +272,13 @@ ACPI_RSDUMP_INFO AcpiRsDumpExtAddress64[8] =
> {
> {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpExtAddress64), "64-Bit Extended Address Space", NULL},
> {ACPI_RSD_ADDRESS, 0, NULL, NULL},
> - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Granularity), "Granularity", NULL},
> - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Minimum), "Address Minimum", NULL},
> - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Maximum), "Address Maximum", NULL},
> - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.TranslationOffset), "Translation Offset", NULL},
> - {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.AddressLength), "Address Length", NULL},
> + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Address.Granularity), "Granularity", NULL},
> + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Address.Minimum), "Address Minimum", NULL},
> + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Address.Maximum), "Address Maximum", NULL},
> + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Address.TranslationOffset),
> + "Translation Offset", NULL},
> + {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.Address.AddressLength),
> + "Address Length", NULL},
> {ACPI_RSD_UINT64, ACPI_RSD_OFFSET (ExtAddress64.TypeSpecific), "Type-Specific Attribute", NULL}
> };
>
> diff --git a/src/acpica/source/components/resources/rsxface.c b/src/acpica/source/components/resources/rsxface.c
> index 86b35a6..834ae9c 100644
> --- a/src/acpica/source/components/resources/rsxface.c
> +++ b/src/acpica/source/components/resources/rsxface.c
> @@ -133,11 +133,11 @@
> ACPI_COPY_FIELD(Out, In, MinAddressFixed); \
> ACPI_COPY_FIELD(Out, In, MaxAddressFixed); \
> ACPI_COPY_FIELD(Out, In, Info); \
> - ACPI_COPY_FIELD(Out, In, Granularity); \
> - ACPI_COPY_FIELD(Out, In, Minimum); \
> - ACPI_COPY_FIELD(Out, In, Maximum); \
> - ACPI_COPY_FIELD(Out, In, TranslationOffset); \
> - ACPI_COPY_FIELD(Out, In, AddressLength); \
> + ACPI_COPY_FIELD(Out, In, Address.Granularity); \
> + ACPI_COPY_FIELD(Out, In, Address.Minimum); \
> + ACPI_COPY_FIELD(Out, In, Address.Maximum); \
> + ACPI_COPY_FIELD(Out, In, Address.TranslationOffset); \
> + ACPI_COPY_FIELD(Out, In, Address.AddressLength); \
> ACPI_COPY_FIELD(Out, In, ResourceSource);
>
>
> diff --git a/src/acpica/source/components/tables/tbdata.c b/src/acpica/source/components/tables/tbdata.c
> index ee352c8..b89f6e8 100644
> --- a/src/acpica/source/components/tables/tbdata.c
> +++ b/src/acpica/source/components/tables/tbdata.c
> @@ -193,7 +193,8 @@ AcpiTbAcquireTable (
> case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
> case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
>
> - Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER, TableDesc->Address);
> + Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER,
> + ACPI_PHYSADDR_TO_PTR (TableDesc->Address));
> break;
>
> default:
> @@ -299,7 +300,8 @@ AcpiTbAcquireTempTable (
> case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
> case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
>
> - TableHeader = ACPI_CAST_PTR (ACPI_TABLE_HEADER, Address);
> + TableHeader = ACPI_CAST_PTR (ACPI_TABLE_HEADER,
> + ACPI_PHYSADDR_TO_PTR (Address));
> if (!TableHeader)
> {
> return (AE_NO_MEMORY);
> @@ -509,11 +511,11 @@ AcpiTbVerifyTempTable (
> if (ACPI_FAILURE (Status))
> {
> ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
> - "%4.4s " ACPI_PRINTF_UINT
> + "%4.4s 0x%8.8X%8.8X"
> " Attempted table install failed",
> AcpiUtValidAcpiName (TableDesc->Signature.Ascii) ?
> TableDesc->Signature.Ascii : "????",
> - ACPI_FORMAT_TO_UINT (TableDesc->Address)));
> + ACPI_FORMAT_UINT64 (TableDesc->Address)));
> goto InvalidateAndExit;
> }
> }
> @@ -601,21 +603,24 @@ AcpiTbResizeRootTableList (
>
> /*******************************************************************************
> *
> - * FUNCTION: AcpiTbGetNextRootIndex
> + * FUNCTION: AcpiTbGetNextTableDescriptor
> *
> * PARAMETERS: TableIndex - Where table index is returned
> + * TableDesc - Where table descriptor is returned
> *
> - * RETURN: Status and table index.
> + * RETURN: Status and table index/descriptor.
> *
> * DESCRIPTION: Allocate a new ACPI table entry to the global table list
> *
> ******************************************************************************/
>
> ACPI_STATUS
> -AcpiTbGetNextRootIndex (
> - UINT32 *TableIndex)
> +AcpiTbGetNextTableDescriptor (
> + UINT32 *TableIndex,
> + ACPI_TABLE_DESC **TableDesc)
> {
> ACPI_STATUS Status;
> + UINT32 i;
>
>
> /* Ensure that there is room for the table in the Root Table List */
> @@ -630,8 +635,18 @@ AcpiTbGetNextRootIndex (
> }
> }
>
> - *TableIndex = AcpiGbl_RootTableList.CurrentTableCount;
> + i = AcpiGbl_RootTableList.CurrentTableCount;
> AcpiGbl_RootTableList.CurrentTableCount++;
> +
> + if (TableIndex)
> + {
> + *TableIndex = i;
> + }
> + if (TableDesc)
> + {
> + *TableDesc = &AcpiGbl_RootTableList.Tables[i];
> + }
> +
> return (AE_OK);
> }
>
> diff --git a/src/acpica/source/components/tables/tbinstal.c b/src/acpica/source/components/tables/tbinstal.c
> index 88e10ba..8833ef3 100644
> --- a/src/acpica/source/components/tables/tbinstal.c
> +++ b/src/acpica/source/components/tables/tbinstal.c
> @@ -273,8 +273,8 @@ AcpiTbInstallFixedTable (
> ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL);
> if (ACPI_FAILURE (Status))
> {
> - ACPI_ERROR ((AE_INFO, "Could not acquire table length at %p",
> - ACPI_CAST_PTR (void, Address)));
> + ACPI_ERROR ((AE_INFO, "Could not acquire table length at %8.8X%8.8X",
> + ACPI_FORMAT_UINT64 (Address)));
> return_ACPI_STATUS (Status);
> }
>
> @@ -340,8 +340,8 @@ AcpiTbInstallStandardTable (
> Status = AcpiTbAcquireTempTable (&NewTableDesc, Address, Flags);
> if (ACPI_FAILURE (Status))
> {
> - ACPI_ERROR ((AE_INFO, "Could not acquire table length at %p",
> - ACPI_CAST_PTR (void, Address)));
> + ACPI_ERROR ((AE_INFO, "Could not acquire table length at %8.8X%8.8X",
> + ACPI_FORMAT_UINT64 (Address)));
> return_ACPI_STATUS (Status);
> }
>
> @@ -353,8 +353,8 @@ AcpiTbInstallStandardTable (
> AcpiGbl_DisableSsdtTableInstall &&
> ACPI_COMPARE_NAME (&NewTableDesc.Signature, ACPI_SIG_SSDT))
> {
> - ACPI_INFO ((AE_INFO, "Ignoring installation of %4.4s at %p",
> - NewTableDesc.Signature.Ascii, ACPI_CAST_PTR (void, Address)));
> + ACPI_INFO ((AE_INFO, "Ignoring installation of %4.4s at %8.8X%8.8X",
> + NewTableDesc.Signature.Ascii, ACPI_FORMAT_UINT64 (Address)));
> goto ReleaseAndExit;
> }
>
> @@ -440,7 +440,6 @@ AcpiTbInstallStandardTable (
> */
> AcpiTbUninstallTable (&NewTableDesc);
> *TableIndex = i;
> - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
> return_ACPI_STATUS (AE_OK);
> }
> }
> @@ -448,7 +447,7 @@ AcpiTbInstallStandardTable (
>
> /* Add the table to the global root table list */
>
> - Status = AcpiTbGetNextRootIndex (&i);
> + Status = AcpiTbGetNextTableDescriptor (&i, NULL);
> if (ACPI_FAILURE (Status))
> {
> goto ReleaseAndExit;
> @@ -531,11 +530,11 @@ FinishOverride:
> return;
> }
>
> - ACPI_INFO ((AE_INFO, "%4.4s " ACPI_PRINTF_UINT
> - " %s table override, new table: " ACPI_PRINTF_UINT,
> + ACPI_INFO ((AE_INFO, "%4.4s 0x%8.8X%8.8X"
> + " %s table override, new table: 0x%8.8X%8.8X",
> OldTableDesc->Signature.Ascii,
> - ACPI_FORMAT_TO_UINT (OldTableDesc->Address),
> - OverrideType, ACPI_FORMAT_TO_UINT (NewTableDesc.Address)));
> + ACPI_FORMAT_UINT64 (OldTableDesc->Address),
> + OverrideType, ACPI_FORMAT_UINT64 (NewTableDesc.Address)));
>
> /* We can now uninstall the original table */
>
> @@ -557,49 +556,6 @@ FinishOverride:
>
> /*******************************************************************************
> *
> - * FUNCTION: AcpiTbStoreTable
> - *
> - * PARAMETERS: Address - Table address
> - * Table - Table header
> - * Length - Table length
> - * Flags - Install flags
> - * TableIndex - Where the table index is returned
> - *
> - * RETURN: Status and table index.
> - *
> - * DESCRIPTION: Add an ACPI table to the global table list
> - *
> - ******************************************************************************/
> -
> -ACPI_STATUS
> -AcpiTbStoreTable (
> - ACPI_PHYSICAL_ADDRESS Address,
> - ACPI_TABLE_HEADER *Table,
> - UINT32 Length,
> - UINT8 Flags,
> - UINT32 *TableIndex)
> -{
> - ACPI_STATUS Status;
> - ACPI_TABLE_DESC *TableDesc;
> -
> -
> - Status = AcpiTbGetNextRootIndex (TableIndex);
> - if (ACPI_FAILURE (Status))
> - {
> - return (Status);
> - }
> -
> - /* Initialize added table */
> -
> - TableDesc = &AcpiGbl_RootTableList.Tables[*TableIndex];
> - AcpiTbInitTableDescriptor (TableDesc, Address, Flags, Table);
> - TableDesc->Pointer = Table;
> - return (AE_OK);
> -}
> -
> -
> -/*******************************************************************************
> - *
> * FUNCTION: AcpiTbUninstallTable
> *
> * PARAMETERS: TableDesc - Table descriptor
> @@ -630,7 +586,7 @@ AcpiTbUninstallTable (
> if ((TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK) ==
> ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL)
> {
> - ACPI_FREE (ACPI_CAST_PTR (void, TableDesc->Address));
> + ACPI_FREE (ACPI_PHYSADDR_TO_PTR (TableDesc->Address));
> }
>
> TableDesc->Address = ACPI_PTR_TO_PHYSADDR (NULL);
> diff --git a/src/acpica/source/components/tables/tbprint.c b/src/acpica/source/components/tables/tbprint.c
> index 90a1a52..105925b 100644
> --- a/src/acpica/source/components/tables/tbprint.c
> +++ b/src/acpica/source/components/tables/tbprint.c
> @@ -216,18 +216,12 @@ AcpiTbPrintTableHeader (
> ACPI_TABLE_HEADER LocalHeader;
>
>
> - /*
> - * The reason that we use ACPI_PRINTF_UINT and ACPI_FORMAT_TO_UINT is to
> - * support both 32-bit and 64-bit hosts/addresses in a consistent manner.
> - * The %p specifier does not emit uniform output on all hosts. On some,
> - * leading zeros are not supported.
> - */
> if (ACPI_COMPARE_NAME (Header->Signature, ACPI_SIG_FACS))
> {
> /* FACS only has signature and length fields */
>
> - ACPI_INFO ((AE_INFO, "%-4.4s " ACPI_PRINTF_UINT " %06X",
> - Header->Signature, ACPI_FORMAT_TO_UINT (Address),
> + ACPI_INFO ((AE_INFO, "%-4.4s 0x%8.8X%8.8X %06X",
> + Header->Signature, ACPI_FORMAT_UINT64 (Address),
> Header->Length));
> }
> else if (ACPI_VALIDATE_RSDP_SIG (Header->Signature))
> @@ -238,8 +232,8 @@ AcpiTbPrintTableHeader (
> ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->OemId, ACPI_OEM_ID_SIZE);
> AcpiTbFixString (LocalHeader.OemId, ACPI_OEM_ID_SIZE);
>
> - ACPI_INFO ((AE_INFO, "RSDP " ACPI_PRINTF_UINT " %06X (v%.2d %-6.6s)",
> - ACPI_FORMAT_TO_UINT (Address),
> + ACPI_INFO ((AE_INFO, "RSDP 0x%8.8X%8.8X %06X (v%.2d %-6.6s)",
> + ACPI_FORMAT_UINT64 (Address),
> (ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Revision > 0) ?
> ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Length : 20,
> ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Revision,
> @@ -252,9 +246,9 @@ AcpiTbPrintTableHeader (
> AcpiTbCleanupTableHeader (&LocalHeader, Header);
>
> ACPI_INFO ((AE_INFO,
> - "%-4.4s " ACPI_PRINTF_UINT
> + "%-4.4s 0x%8.8X%8.8X"
> " %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)",
> - LocalHeader.Signature, ACPI_FORMAT_TO_UINT (Address),
> + LocalHeader.Signature, ACPI_FORMAT_UINT64 (Address),
> LocalHeader.Length, LocalHeader.Revision, LocalHeader.OemId,
> LocalHeader.OemTableId, LocalHeader.OemRevision,
> LocalHeader.AslCompilerId, LocalHeader.AslCompilerRevision));
> diff --git a/src/acpica/source/components/tables/tbxfroot.c b/src/acpica/source/components/tables/tbxfroot.c
> index 8c6be13..45d7d54 100644
> --- a/src/acpica/source/components/tables/tbxfroot.c
> +++ b/src/acpica/source/components/tables/tbxfroot.c
> @@ -230,7 +230,7 @@ AcpiTbValidateRsdp (
>
> ACPI_STATUS
> AcpiFindRootPointer (
> - ACPI_SIZE *TableAddress)
> + ACPI_PHYSICAL_ADDRESS *TableAddress)
> {
> UINT8 *TablePtr;
> UINT8 *MemRover;
> @@ -290,7 +290,7 @@ AcpiFindRootPointer (
>
> PhysicalAddress += (UINT32) ACPI_PTR_DIFF (MemRover, TablePtr);
>
> - *TableAddress = PhysicalAddress;
> + *TableAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress;
> return_ACPI_STATUS (AE_OK);
> }
> }
> @@ -321,7 +321,7 @@ AcpiFindRootPointer (
> PhysicalAddress = (UINT32)
> (ACPI_HI_RSDP_WINDOW_BASE + ACPI_PTR_DIFF (MemRover, TablePtr));
>
> - *TableAddress = PhysicalAddress;
> + *TableAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress;
> return_ACPI_STATUS (AE_OK);
> }
>
> diff --git a/src/acpica/source/components/utilities/utaddress.c b/src/acpica/source/components/utilities/utaddress.c
> index ddfe826..9d65019 100644
> --- a/src/acpica/source/components/utilities/utaddress.c
> +++ b/src/acpica/source/components/utilities/utaddress.c
> @@ -189,10 +189,10 @@ AcpiUtAddAddressRange (
> AcpiGbl_AddressRangeList[SpaceId] = RangeInfo;
>
> ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
> - "\nAdded [%4.4s] address range: 0x%p-0x%p\n",
> + "\nAdded [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n",
> AcpiUtGetNodeName (RangeInfo->RegionNode),
> - ACPI_CAST_PTR (void, Address),
> - ACPI_CAST_PTR (void, RangeInfo->EndAddress)));
> + ACPI_FORMAT_UINT64 (Address),
> + ACPI_FORMAT_UINT64 (RangeInfo->EndAddress)));
>
> (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
> return_ACPI_STATUS (AE_OK);
> @@ -251,10 +251,10 @@ AcpiUtRemoveAddressRange (
> }
>
> ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
> - "\nRemoved [%4.4s] address range: 0x%p-0x%p\n",
> + "\nRemoved [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n",
> AcpiUtGetNodeName (RangeInfo->RegionNode),
> - ACPI_CAST_PTR (void, RangeInfo->StartAddress),
> - ACPI_CAST_PTR (void, RangeInfo->EndAddress)));
> + ACPI_FORMAT_UINT64 (RangeInfo->StartAddress),
> + ACPI_FORMAT_UINT64 (RangeInfo->EndAddress)));
>
> ACPI_FREE (RangeInfo);
> return_VOID;
> @@ -338,12 +338,12 @@ AcpiUtCheckAddressRange (
> Pathname = AcpiNsGetExternalPathname (RangeInfo->RegionNode);
>
> ACPI_WARNING ((AE_INFO,
> - "%s range 0x%p-0x%p conflicts with OpRegion 0x%p-0x%p (%s)",
> + "%s range 0x%8.8X%8.8X-0x%8.8X%8.8X conflicts with OpRegion 0x%8.8X%8.8X-0x%8.8X%8.8X (%s)",
> AcpiUtGetRegionName (SpaceId),
> - ACPI_CAST_PTR (void, Address),
> - ACPI_CAST_PTR (void, EndAddress),
> - ACPI_CAST_PTR (void, RangeInfo->StartAddress),
> - ACPI_CAST_PTR (void, RangeInfo->EndAddress),
> + ACPI_FORMAT_UINT64 (Address),
> + ACPI_FORMAT_UINT64 (EndAddress),
> + ACPI_FORMAT_UINT64 (RangeInfo->StartAddress),
> + ACPI_FORMAT_UINT64 (RangeInfo->EndAddress),
> Pathname));
> ACPI_FREE (Pathname);
> }
> diff --git a/src/acpica/source/components/utilities/utbuffer.c b/src/acpica/source/components/utilities/utbuffer.c
> index d4a65b4..65110fb 100644
> --- a/src/acpica/source/components/utilities/utbuffer.c
> +++ b/src/acpica/source/components/utilities/utbuffer.c
> @@ -230,6 +230,15 @@ AcpiUtDumpBuffer (
> return;
> }
>
> + /*
> + * Add comment characters so rest of line is ignored when
> + * compiled
> + */
> + if (j == 0)
> + {
> + AcpiOsPrintf ("// ");
> + }
> +
> BufChar = Buffer[(ACPI_SIZE) i + j];
> if (ACPI_IS_PRINT (BufChar))
> {
> diff --git a/src/acpica/source/components/utilities/utglobal.c b/src/acpica/source/components/utilities/utglobal.c
> index 3f09d56..b4b48ba 100644
> --- a/src/acpica/source/components/utilities/utglobal.c
> +++ b/src/acpica/source/components/utilities/utglobal.c
> @@ -183,12 +183,19 @@ const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] =
> {"_SB_", ACPI_TYPE_DEVICE, NULL},
> {"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL},
> {"_TZ_", ACPI_TYPE_DEVICE, NULL},
> - {"_REV", ACPI_TYPE_INTEGER, (char *) ACPI_CA_SUPPORT_LEVEL},
> + /*
> + * March, 2015:
> + * The _REV object is in the process of being deprecated, because
> + * other ACPI implementations permanently return 2. Thus, it
> + * has little or no value. Return 2 for compatibility with
> + * other ACPI implementations.
> + */
> + {"_REV", ACPI_TYPE_INTEGER, ACPI_CAST_PTR (char, 2)},
> {"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME},
> - {"_GL_", ACPI_TYPE_MUTEX, (char *) 1},
> + {"_GL_", ACPI_TYPE_MUTEX, ACPI_CAST_PTR (char, 1)},
>
> #if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
> - {"_OSI", ACPI_TYPE_METHOD, (char *) 1},
> + {"_OSI", ACPI_TYPE_METHOD, ACPI_CAST_PTR (char, 1)},
> #endif
>
> /* Table terminator */
> diff --git a/src/acpica/source/components/utilities/utmisc.c b/src/acpica/source/components/utilities/utmisc.c
> index 30d23d8..32ce271 100644
> --- a/src/acpica/source/components/utilities/utmisc.c
> +++ b/src/acpica/source/components/utilities/utmisc.c
> @@ -156,6 +156,7 @@ AcpiUtIsPciRootBridge (
> }
>
>
> +#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP)
> /*******************************************************************************
> *
> * FUNCTION: AcpiUtIsAmlTable
> @@ -186,6 +187,7 @@ AcpiUtIsAmlTable (
>
> return (FALSE);
> }
> +#endif
>
>
> /*******************************************************************************
> diff --git a/src/acpica/source/components/utilities/utosi.c b/src/acpica/source/components/utilities/utosi.c
> index e578d2f..d88fe8f 100644
> --- a/src/acpica/source/components/utilities/utosi.c
> +++ b/src/acpica/source/components/utilities/utosi.c
> @@ -177,6 +177,7 @@ static ACPI_INTERFACE_INFO AcpiDefaultSupportedInterfaces[] =
> {"Windows 2009", NULL, 0, ACPI_OSI_WIN_7}, /* Windows 7 and Server 2008 R2 - Added 09/2009 */
> {"Windows 2012", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8 and Server 2012 - Added 08/2012 */
> {"Windows 2013", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8.1 and Server 2012 R2 - Added 01/2014 */
> + {"Windows 2015", NULL, 0, ACPI_OSI_WIN_10}, /* Windows 10 - Added 03/2015 */
>
> /* Feature Group Strings */
>
> diff --git a/src/acpica/source/components/utilities/utprint.c b/src/acpica/source/components/utilities/utprint.c
> index 50082f3..13bf94a 100644
> --- a/src/acpica/source/components/utilities/utprint.c
> +++ b/src/acpica/source/components/utilities/utprint.c
> @@ -514,11 +514,11 @@ AcpiUtVsnprintf (
> const char *Format,
> va_list Args)
> {
> - UINT8 Base = 10;
> - UINT8 Type = 0;
> - INT32 Width = -1;
> - INT32 Precision = -1;
> - char Qualifier = 0;
> + UINT8 Base;
> + UINT8 Type;
> + INT32 Width;
> + INT32 Precision;
> + char Qualifier;
> UINT64 Number;
> char *Pos;
> char *End;
> @@ -540,6 +540,9 @@ AcpiUtVsnprintf (
> continue;
> }
>
> + Type = 0;
> + Base = 10;
> +
> /* Process sign */
>
> do
> diff --git a/src/acpica/source/components/utilities/utstate.c b/src/acpica/source/components/utilities/utstate.c
> index 53aabbb..1e64186 100644
> --- a/src/acpica/source/components/utilities/utstate.c
> +++ b/src/acpica/source/components/utilities/utstate.c
> @@ -122,44 +122,6 @@
>
> /*******************************************************************************
> *
> - * FUNCTION: AcpiUtCreatePkgStateAndPush
> - *
> - * PARAMETERS: Object - Object to be added to the new state
> - * Action - Increment/Decrement
> - * StateList - List the state will be added to
> - *
> - * RETURN: Status
> - *
> - * DESCRIPTION: Create a new state and push it
> - *
> - ******************************************************************************/
> -
> -ACPI_STATUS
> -AcpiUtCreatePkgStateAndPush (
> - void *InternalObject,
> - void *ExternalObject,
> - UINT16 Index,
> - ACPI_GENERIC_STATE **StateList)
> -{
> - ACPI_GENERIC_STATE *State;
> -
> -
> - ACPI_FUNCTION_ENTRY ();
> -
> -
> - State = AcpiUtCreatePkgState (InternalObject, ExternalObject, Index);
> - if (!State)
> - {
> - return (AE_NO_MEMORY);
> - }
> -
> - AcpiUtPushGenericState (StateList, State);
> - return (AE_OK);
> -}
> -
> -
> -/*******************************************************************************
> - *
> * FUNCTION: AcpiUtPushGenericState
> *
> * PARAMETERS: ListHead - Head of the state stack
> diff --git a/src/acpica/source/components/utilities/utuuid.c b/src/acpica/source/components/utilities/utuuid.c
> index f0d740d..71fa0bc 100644
> --- a/src/acpica/source/components/utilities/utuuid.c
> +++ b/src/acpica/source/components/utilities/utuuid.c
> @@ -120,6 +120,7 @@
> ACPI_MODULE_NAME ("utuuid")
>
>
> +#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP)
> /*
> * UUID support functions.
> *
> @@ -171,3 +172,4 @@ AcpiUtConvertStringToUuid (
> AcpiUtAsciiCharToHex (InString[AcpiGbl_MapToUuidOffset[i] + 1]);
> }
> }
> +#endif
> diff --git a/src/acpica/source/include/acapps.h b/src/acpica/source/include/acapps.h
> index 21e71f4..1153642 100644
> --- a/src/acpica/source/include/acapps.h
> +++ b/src/acpica/source/include/acapps.h
> @@ -141,15 +141,15 @@
> /* Macros for signons and file headers */
>
> #define ACPI_COMMON_SIGNON(UtilityName) \
> - "\n%s\n%s version %8.8X%s [%s]\n%s\n\n", \
> + "\n%s\n%s version %8.8X%s\n%s\n\n", \
> ACPICA_NAME, \
> - UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \
> + UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, \
> ACPICA_COPYRIGHT
>
> #define ACPI_COMMON_HEADER(UtilityName, Prefix) \
> - "%s%s\n%s%s version %8.8X%s [%s]\n%s%s\n%s\n", \
> + "%s%s\n%s%s version %8.8X%s\n%s%s\n%s\n", \
> Prefix, ACPICA_NAME, \
> - Prefix, UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \
> + Prefix, UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, \
> Prefix, ACPICA_COPYRIGHT, \
> Prefix
>
> diff --git a/src/acpica/source/include/acdebug.h b/src/acpica/source/include/acdebug.h
> index 5c32d46..3c823e8 100644
> --- a/src/acpica/source/include/acdebug.h
> +++ b/src/acpica/source/include/acdebug.h
> @@ -149,7 +149,7 @@ typedef struct acpi_db_execute_walk
>
>
> #define PARAM_LIST(pl) pl
> -#define DBTEST_OUTPUT_LEVEL(lvl) if (AcpiGbl_DbOpt_verbose)
> +#define DBTEST_OUTPUT_LEVEL(lvl) if (AcpiGbl_DbOpt_Verbose)
> #define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\
> AcpiOsPrintf PARAM_LIST(fp);}
>
> diff --git a/src/acpica/source/include/acdisasm.h b/src/acpica/source/include/acdisasm.h
> index 0394728..5776d5d 100644
> --- a/src/acpica/source/include/acdisasm.h
> +++ b/src/acpica/source/include/acdisasm.h
> @@ -201,6 +201,7 @@ typedef enum
> /* Types used only for the Data Table Compiler */
>
> ACPI_DMT_BUFFER,
> + ACPI_DMT_RAW_BUFFER, /* Large, multiple line buffer */
> ACPI_DMT_DEVICE_PATH,
> ACPI_DMT_LABEL,
> ACPI_DMT_PCI_PATH,
> @@ -423,9 +424,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3ptHdr[];
> extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt0[];
> extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt1[];
> extern ACPI_DMTABLE_INFO AcpiDmTableInfoSbst[];
> -extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlicHdr[];
> -extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic0[];
> -extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic1[];
> +extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic[];
> extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlit[];
> extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpcr[];
> extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpmi[];
> @@ -494,6 +493,15 @@ AcpiDmLineHeader2 (
> * dmtbdump
> */
> void
> +AcpiDmDumpBuffer (
> + void *Table,
> + UINT32 BufferOffset,
> + UINT32 Length,
> + UINT32 AbsoluteOffset,
> + char *Header,
> + BOOLEAN MultiLine);
> +
> +void
> AcpiDmDumpAsf (
> ACPI_TABLE_HEADER *Table);
>
> @@ -1068,6 +1076,10 @@ AcpiDmCloseOperator (
> */
> void
> AdDisassemblerHeader (
> - char *Filename);
> + char *Filename,
> + UINT8 TableType);
> +
> +#define ACPI_IS_AML_TABLE 0
> +#define ACPI_IS_DATA_TABLE 1
>
> #endif /* __ACDISASM_H__ */
> diff --git a/src/acpica/source/include/acglobal.h b/src/acpica/source/include/acglobal.h
> index fe3ac39..1610799 100644
> --- a/src/acpica/source/include/acglobal.h
> +++ b/src/acpica/source/include/acglobal.h
> @@ -382,9 +382,10 @@ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DbOutputFlags, ACPI_DB_CONSOLE_O
> ACPI_INIT_GLOBAL (UINT8, AcpiGbl_NoResourceDisassembly, FALSE);
> ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_IgnoreNoopOperator, FALSE);
> ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_CstyleDisassembly, TRUE);
> +ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ForceAmlDisassembly, FALSE);
>
> -ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_disasm);
> -ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_verbose);
> +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_Disasm);
> +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_Verbose);
> ACPI_GLOBAL (BOOLEAN, AcpiGbl_NumExternalMethods);
> ACPI_GLOBAL (UINT32, AcpiGbl_ResolvedExternalMethods);
> ACPI_GLOBAL (ACPI_EXTERNAL_LIST *, AcpiGbl_ExternalList);
> @@ -397,9 +398,7 @@ ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DbTerminateThreads, FALSE);
> ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_AbortMethod, FALSE);
> ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_MethodExecuting, FALSE);
>
> -ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_tables);
> -ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_stats);
> -ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_ini_methods);
> +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_NoIniMethods);
> ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_NoRegionSupport);
> ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOutputToFile);
> ACPI_GLOBAL (char *, AcpiGbl_DbBuffer);
> diff --git a/src/acpica/source/include/aclocal.h b/src/acpica/source/include/aclocal.h
> index 96f292b..9e0d08d 100644
> --- a/src/acpica/source/include/aclocal.h
> +++ b/src/acpica/source/include/aclocal.h
> @@ -126,7 +126,7 @@ typedef UINT32 ACPI_MUTEX_HANDLE;
>
> /* Total number of aml opcodes defined */
>
> -#define AML_NUM_OPCODES 0x81
> +#define AML_NUM_OPCODES 0x82
>
>
> /* Forward declarations */
> diff --git a/src/acpica/source/include/acmacros.h b/src/acpica/source/include/acmacros.h
> index ba3d526..c1f5f81 100644
> --- a/src/acpica/source/include/acmacros.h
> +++ b/src/acpica/source/include/acmacros.h
> @@ -136,23 +136,12 @@
> #define ACPI_SET64(ptr, val) (*ACPI_CAST64 (ptr) = (UINT64) (val))
>
> /*
> - * printf() format helpers. These macros are workarounds for the difficulties
> + * printf() format helper. This macros is a workaround for the difficulties
> * with emitting 64-bit integers and 64-bit pointers with the same code
> * for both 32-bit and 64-bit hosts.
> */
> #define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i)
>
> -#if ACPI_MACHINE_WIDTH == 64
> -#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i)
> -#define ACPI_FORMAT_TO_UINT(i) ACPI_FORMAT_UINT64(i)
> -#define ACPI_PRINTF_UINT "0x%8.8X%8.8X"
> -
> -#else
> -#define ACPI_FORMAT_NATIVE_UINT(i) 0, (UINT32) (i)
> -#define ACPI_FORMAT_TO_UINT(i) (UINT32) (i)
> -#define ACPI_PRINTF_UINT "0x%8.8X"
> -#endif
> -
>
> /*
> * Macros for moving data around to/from buffers that are possibly unaligned.
> diff --git a/src/acpica/source/include/acopcode.h b/src/acpica/source/include/acopcode.h
> index 45423f3..133e134 100644
> --- a/src/acpica/source/include/acopcode.h
> +++ b/src/acpica/source/include/acopcode.h
> @@ -184,6 +184,7 @@
> #define ARGP_DWORD_OP ARGP_LIST1 (ARGP_DWORDDATA)
> #define ARGP_ELSE_OP ARGP_LIST2 (ARGP_PKGLENGTH, ARGP_TERMLIST)
> #define ARGP_EVENT_OP ARGP_LIST1 (ARGP_NAME)
> +#define ARGP_EXTERNAL_OP ARGP_LIST3 (ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_BYTEDATA)
> #define ARGP_FATAL_OP ARGP_LIST3 (ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_TERMARG)
> #define ARGP_FIELD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_FIELDLIST)
> #define ARGP_FIND_SET_LEFT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
> @@ -317,6 +318,7 @@
> #define ARGI_DWORD_OP ARGI_INVALID_OPCODE
> #define ARGI_ELSE_OP ARGI_INVALID_OPCODE
> #define ARGI_EVENT_OP ARGI_INVALID_OPCODE
> +#define ARGI_EXTERNAL_OP ARGI_LIST3 (ARGI_STRING, ARGI_INTEGER, ARGI_INTEGER)
> #define ARGI_FATAL_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER)
> #define ARGI_FIELD_OP ARGI_INVALID_OPCODE
> #define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
> diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
> index fa8f9ab..74de05e 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 0x20150204
> +#define ACPI_CA_VERSION 0x20150410
>
> #include "acconfig.h"
> #include "actypes.h"
> @@ -575,7 +575,7 @@ AcpiReallocateRootTable (
> ACPI_EXTERNAL_RETURN_STATUS (
> ACPI_STATUS
> AcpiFindRootPointer (
> - ACPI_SIZE *RsdpAddress))
> + ACPI_PHYSICAL_ADDRESS *RsdpAddress))
>
> ACPI_EXTERNAL_RETURN_STATUS (
> ACPI_STATUS
> diff --git a/src/acpica/source/include/acresrc.h b/src/acpica/source/include/acresrc.h
> index b361120..b259618 100644
> --- a/src/acpica/source/include/acresrc.h
> +++ b/src/acpica/source/include/acresrc.h
> @@ -425,8 +425,9 @@ AcpiRsSetResourceLength (
>
>
> /*
> - * rsdump
> + * rsdump - Debugger support
> */
> +#ifdef ACPI_DEBUGGER
> void
> AcpiRsDumpResourceList (
> ACPI_RESOURCE *Resource);
> @@ -434,6 +435,7 @@ AcpiRsDumpResourceList (
> void
> AcpiRsDumpIrqList (
> UINT8 *RouteTable);
> +#endif
>
>
> /*
> diff --git a/src/acpica/source/include/acrestyp.h b/src/acpica/source/include/acrestyp.h
> index 06a4db5..f81b5cd 100644
> --- a/src/acpica/source/include/acrestyp.h
> +++ b/src/acpica/source/include/acrestyp.h
> @@ -417,6 +417,36 @@ typedef struct acpi_resource_source
> UINT8 MaxAddressFixed; \
> ACPI_RESOURCE_ATTRIBUTE Info;
>
> +typedef struct acpi_address16_attribute
> +{
> + UINT16 Granularity;
> + UINT16 Minimum;
> + UINT16 Maximum;
> + UINT16 TranslationOffset;
> + UINT16 AddressLength;
> +
> +} ACPI_ADDRESS16_ATTRIBUTE;
> +
> +typedef struct acpi_address32_attribute
> +{
> + UINT32 Granularity;
> + UINT32 Minimum;
> + UINT32 Maximum;
> + UINT32 TranslationOffset;
> + UINT32 AddressLength;
> +
> +} ACPI_ADDRESS32_ATTRIBUTE;
> +
> +typedef struct acpi_address64_attribute
> +{
> + UINT64 Granularity;
> + UINT64 Minimum;
> + UINT64 Maximum;
> + UINT64 TranslationOffset;
> + UINT64 AddressLength;
> +
> +} ACPI_ADDRESS64_ATTRIBUTE;
> +
> typedef struct acpi_resource_address
> {
> ACPI_RESOURCE_ADDRESS_COMMON
> @@ -426,11 +456,7 @@ typedef struct acpi_resource_address
> typedef struct acpi_resource_address16
> {
> ACPI_RESOURCE_ADDRESS_COMMON
> - UINT16 Granularity;
> - UINT16 Minimum;
> - UINT16 Maximum;
> - UINT16 TranslationOffset;
> - UINT16 AddressLength;
> + ACPI_ADDRESS16_ATTRIBUTE Address;
> ACPI_RESOURCE_SOURCE ResourceSource;
>
> } ACPI_RESOURCE_ADDRESS16;
> @@ -438,11 +464,7 @@ typedef struct acpi_resource_address16
> typedef struct acpi_resource_address32
> {
> ACPI_RESOURCE_ADDRESS_COMMON
> - UINT32 Granularity;
> - UINT32 Minimum;
> - UINT32 Maximum;
> - UINT32 TranslationOffset;
> - UINT32 AddressLength;
> + ACPI_ADDRESS32_ATTRIBUTE Address;
> ACPI_RESOURCE_SOURCE ResourceSource;
>
> } ACPI_RESOURCE_ADDRESS32;
> @@ -450,11 +472,7 @@ typedef struct acpi_resource_address32
> typedef struct acpi_resource_address64
> {
> ACPI_RESOURCE_ADDRESS_COMMON
> - UINT64 Granularity;
> - UINT64 Minimum;
> - UINT64 Maximum;
> - UINT64 TranslationOffset;
> - UINT64 AddressLength;
> + ACPI_ADDRESS64_ATTRIBUTE Address;
> ACPI_RESOURCE_SOURCE ResourceSource;
>
> } ACPI_RESOURCE_ADDRESS64;
> @@ -463,11 +481,7 @@ typedef struct acpi_resource_extended_address64
> {
> ACPI_RESOURCE_ADDRESS_COMMON
> UINT8 RevisionID;
> - UINT64 Granularity;
> - UINT64 Minimum;
> - UINT64 Maximum;
> - UINT64 TranslationOffset;
> - UINT64 AddressLength;
> + ACPI_ADDRESS64_ATTRIBUTE Address;
> UINT64 TypeSpecific;
>
> } ACPI_RESOURCE_EXTENDED_ADDRESS64;
> diff --git a/src/acpica/source/include/acstruct.h b/src/acpica/source/include/acstruct.h
> index 5258f0e..ad43d6c 100644
> --- a/src/acpica/source/include/acstruct.h
> +++ b/src/acpica/source/include/acstruct.h
> @@ -141,11 +141,6 @@
> #define ACPI_WALK_METHOD 0x01
> #define ACPI_WALK_METHOD_RESTART 0x02
>
> -/* Flags for iASL compiler only */
> -
> -#define ACPI_WALK_CONST_REQUIRED 0x10
> -#define ACPI_WALK_CONST_OPTIONAL 0x20
> -
>
> typedef struct acpi_walk_state
> {
> diff --git a/src/acpica/source/include/actables.h b/src/acpica/source/include/actables.h
> index 4f82777..5a79540 100644
> --- a/src/acpica/source/include/actables.h
> +++ b/src/acpica/source/include/actables.h
> @@ -142,8 +142,9 @@ AcpiTbScanMemoryForRsdp (
> * tbdata - table data structure management
> */
> ACPI_STATUS
> -AcpiTbGetNextRootIndex (
> - UINT32 *TableIndex);
> +AcpiTbGetNextTableDescriptor (
> + UINT32 *TableIndex,
> + ACPI_TABLE_DESC **TableDesc);
>
> void
> AcpiTbInitTableDescriptor (
> @@ -245,14 +246,6 @@ AcpiTbInstallStandardTable (
> BOOLEAN Override,
> UINT32 *TableIndex);
>
> -ACPI_STATUS
> -AcpiTbStoreTable (
> - ACPI_PHYSICAL_ADDRESS Address,
> - ACPI_TABLE_HEADER *Table,
> - UINT32 Length,
> - UINT8 Flags,
> - UINT32 *TableIndex);
> -
> void
> AcpiTbUninstallTable (
> ACPI_TABLE_DESC *TableDesc);
> diff --git a/src/acpica/source/include/actbl2.h b/src/acpica/source/include/actbl2.h
> index 0d39c0e..df0cfb1 100644
> --- a/src/acpica/source/include/actbl2.h
> +++ b/src/acpica/source/include/actbl2.h
> @@ -147,6 +147,7 @@
> #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
> #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
> #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
> +#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
> #define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
> #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
> #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
> @@ -1051,7 +1052,8 @@ typedef struct acpi_lpit_header
> enum AcpiLpitType
> {
> ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
> - ACPI_LPIT_TYPE_SIMPLE_IO = 0x01
> + ACPI_LPIT_TYPE_SIMPLE_IO = 0x01,
> + ACPI_LPIT_TYPE_RESERVED = 0x02 /* 2 and above are reserved */
> };
>
> /* Masks for Flags field above */
> @@ -1156,6 +1158,24 @@ typedef struct acpi_table_mchi
>
> /*******************************************************************************
> *
> + * MSDM - Microsoft Data Management table
> + *
> + * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
> + * November 29, 2011. Copyright 2011 Microsoft
> + *
> + ******************************************************************************/
> +
> +/* Basic MSDM table is only the common ACPI header */
> +
> +typedef struct acpi_table_msdm
> +{
> + ACPI_TABLE_HEADER Header; /* Common ACPI table header */
> +
> +} ACPI_TABLE_MSDM;
> +
> +
> +/*******************************************************************************
> + *
> * MTMR - MID Timer Table
> * Version 1
> *
> @@ -1185,10 +1205,9 @@ typedef struct acpi_mtmr_entry
> /*******************************************************************************
> *
> * SLIC - Software Licensing Description Table
> - * Version 1
> *
> - * Conforms to "OEM Activation 2.0 for Windows Vista Operating Systems",
> - * Copyright 2006
> + * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
> + * November 29, 2011. Copyright 2011 Microsoft
> *
> ******************************************************************************/
>
> @@ -1201,62 +1220,6 @@ typedef struct acpi_table_slic
> } ACPI_TABLE_SLIC;
>
>
> -/* Common SLIC subtable header */
> -
> -typedef struct acpi_slic_header
> -{
> - UINT32 Type;
> - UINT32 Length;
> -
> -} ACPI_SLIC_HEADER;
> -
> -/* Values for Type field above */
> -
> -enum AcpiSlicType
> -{
> - ACPI_SLIC_TYPE_PUBLIC_KEY = 0,
> - ACPI_SLIC_TYPE_WINDOWS_MARKER = 1,
> - ACPI_SLIC_TYPE_RESERVED = 2 /* 2 and greater are reserved */
> -};
> -
> -
> -/*
> - * SLIC Subtables, correspond to Type in ACPI_SLIC_HEADER
> - */
> -
> -/* 0: Public Key Structure */
> -
> -typedef struct acpi_slic_key
> -{
> - ACPI_SLIC_HEADER Header;
> - UINT8 KeyType;
> - UINT8 Version;
> - UINT16 Reserved;
> - UINT32 Algorithm;
> - char Magic[4];
> - UINT32 BitLength;
> - UINT32 Exponent;
> - UINT8 Modulus[128];
> -
> -} ACPI_SLIC_KEY;
> -
> -
> -/* 1: Windows Marker Structure */
> -
> -typedef struct acpi_slic_marker
> -{
> - ACPI_SLIC_HEADER Header;
> - UINT32 Version;
> - char OemId[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */
> - char OemTableId[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */
> - char WindowsFlag[8];
> - UINT32 SlicVersion;
> - UINT8 Reserved[16];
> - UINT8 Signature[128];
> -
> -} ACPI_SLIC_MARKER;
> -
> -
> /*******************************************************************************
> *
> * SPCR - Serial Port Console Redirection table
> diff --git a/src/acpica/source/include/actypes.h b/src/acpica/source/include/actypes.h
> index 714edfe..2c7d1bb 100644
> --- a/src/acpica/source/include/actypes.h
> +++ b/src/acpica/source/include/actypes.h
> @@ -273,9 +273,29 @@ typedef int INT32;
>
> typedef INT32 ACPI_NATIVE_INT;
> typedef UINT32 ACPI_SIZE;
> +
> +#ifdef ACPI_32BIT_PHYSICAL_ADDRESS
> +
> +/*
> + * OSPMs can define this to shrink the size of the structures for 32-bit
> + * none PAE environment. ASL compiler may always define this to generate
> + * 32-bit OSPM compliant tables.
> + */
> typedef UINT32 ACPI_IO_ADDRESS;
> typedef UINT32 ACPI_PHYSICAL_ADDRESS;
>
> +#else /* ACPI_32BIT_PHYSICAL_ADDRESS */
> +
> +/*
> + * It is reported that, after some calculations, the physical addresses can
> + * wrap over the 32-bit boundary on 32-bit PAE environment.
> + * https://bugzilla.kernel.org/show_bug.cgi?id=87971
> + */
> +typedef UINT64 ACPI_IO_ADDRESS;
> +typedef UINT64 ACPI_PHYSICAL_ADDRESS;
> +
> +#endif /* ACPI_32BIT_PHYSICAL_ADDRESS */
> +
> #define ACPI_MAX_PTR ACPI_UINT32_MAX
> #define ACPI_SIZE_MAX ACPI_UINT32_MAX
>
> @@ -792,23 +812,26 @@ typedef UINT32 ACPI_EVENT_TYPE;
> * The encoding of ACPI_EVENT_STATUS is illustrated below.
> * Note that a set bit (1) indicates the property is TRUE
> * (e.g. if bit 0 is set then the event is enabled).
> - * +-------------+-+-+-+-+
> - * | Bits 31:4 |3|2|1|0|
> - * +-------------+-+-+-+-+
> - * | | | | |
> - * | | | | +- Enabled?
> - * | | | +--- Enabled for wake?
> - * | | +----- Set?
> - * | +------- Has a handler?
> - * +------------- <Reserved>
> + * +-------------+-+-+-+-+-+
> + * | Bits 31:5 |4|3|2|1|0|
> + * +-------------+-+-+-+-+-+
> + * | | | | | |
> + * | | | | | +- Enabled?
> + * | | | | +--- Enabled for wake?
> + * | | | +----- Status bit set?
> + * | | +------- Enable bit set?
> + * | +--------- Has a handler?
> + * +--------------- <Reserved>
> */
> typedef UINT32 ACPI_EVENT_STATUS;
>
> #define ACPI_EVENT_FLAG_DISABLED (ACPI_EVENT_STATUS) 0x00
> #define ACPI_EVENT_FLAG_ENABLED (ACPI_EVENT_STATUS) 0x01
> #define ACPI_EVENT_FLAG_WAKE_ENABLED (ACPI_EVENT_STATUS) 0x02
> -#define ACPI_EVENT_FLAG_SET (ACPI_EVENT_STATUS) 0x04
> -#define ACPI_EVENT_FLAG_HAS_HANDLER (ACPI_EVENT_STATUS) 0x08
> +#define ACPI_EVENT_FLAG_STATUS_SET (ACPI_EVENT_STATUS) 0x04
> +#define ACPI_EVENT_FLAG_ENABLE_SET (ACPI_EVENT_STATUS) 0x08
> +#define ACPI_EVENT_FLAG_HAS_HANDLER (ACPI_EVENT_STATUS) 0x10
> +#define ACPI_EVENT_FLAG_SET ACPI_EVENT_FLAG_STATUS_SET
>
> /* Actions for AcpiSetGpe, AcpiGpeWakeup, AcpiHwLowSetGpe */
>
> @@ -1416,6 +1439,7 @@ typedef struct acpi_memory_list
> #define ACPI_OSI_WIN_VISTA_SP2 0x0A
> #define ACPI_OSI_WIN_7 0x0B
> #define ACPI_OSI_WIN_8 0x0C
> +#define ACPI_OSI_WIN_10 0x0D
>
>
> /* Definitions of file IO */
> diff --git a/src/acpica/source/include/acutils.h b/src/acpica/source/include/acutils.h
> index f8a6783..2b3dad4 100644
> --- a/src/acpica/source/include/acutils.h
> +++ b/src/acpica/source/include/acutils.h
> @@ -795,6 +795,12 @@ const ACPI_PREDEFINED_INFO *
> AcpiUtMatchPredefinedMethod (
> char *Name);
>
> +void
> +AcpiUtGetExpectedReturnTypes (
> + char *Buffer,
> + UINT32 ExpectedBtypes);
> +
> +#if (defined ACPI_ASL_COMPILER || defined ACPI_HELP_APP)
> const ACPI_PREDEFINED_INFO *
> AcpiUtMatchResourceName (
> char *Name);
> @@ -805,15 +811,11 @@ AcpiUtDisplayPredefinedMethod (
> const ACPI_PREDEFINED_INFO *ThisName,
> BOOLEAN MultiLine);
>
> -void
> -AcpiUtGetExpectedReturnTypes (
> - char *Buffer,
> - UINT32 ExpectedBtypes);
> -
> UINT32
> AcpiUtGetResourceBitWidth (
> char *Buffer,
> UINT16 Types);
> +#endif
>
>
> /*
> @@ -854,13 +856,6 @@ AcpiUtCreateUpdateStateAndPush (
> UINT16 Action,
> ACPI_GENERIC_STATE **StateList);
>
> -ACPI_STATUS
> -AcpiUtCreatePkgStateAndPush (
> - void *InternalObject,
> - void *ExternalObject,
> - UINT16 Index,
> - ACPI_GENERIC_STATE **StateList);
> -
> ACPI_GENERIC_STATE *
> AcpiUtCreateControlState (
> void);
> @@ -899,9 +894,11 @@ BOOLEAN
> AcpiUtIsPciRootBridge (
> char *Id);
>
> +#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP)
> BOOLEAN
> AcpiUtIsAmlTable (
> ACPI_TABLE_HEADER *Table);
> +#endif
>
> ACPI_STATUS
> AcpiUtWalkPackageTree (
> @@ -990,6 +987,7 @@ void
> AcpiUtStrupr (
> char *SrcString);
>
> +#ifdef ACPI_ASL_COMPILER
> void
> AcpiUtStrlwr (
> char *SrcString);
> @@ -998,6 +996,7 @@ int
> AcpiUtStricmp (
> char *String1,
> char *String2);
> +#endif
>
> ACPI_STATUS
> AcpiUtStrtoul64 (
> @@ -1010,9 +1009,11 @@ AcpiUtPrintString (
> char *String,
> UINT16 MaxLength);
>
> +#if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP
> void
> UtConvertBackslashes (
> char *Pathname);
> +#endif
>
> BOOLEAN
> AcpiUtValidAcpiName (
> @@ -1259,9 +1260,11 @@ AcpiUtFilePrintf (
> /*
> * utuuid -- UUID support functions
> */
> +#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP)
> void
> AcpiUtConvertStringToUuid (
> char *InString,
> UINT8 *UuidBuffer);
> +#endif
>
> #endif /* _ACUTILS_H */
> diff --git a/src/acpica/source/include/amlcode.h b/src/acpica/source/include/amlcode.h
> index 2a5dc97..34ac987 100644
> --- a/src/acpica/source/include/amlcode.h
> +++ b/src/acpica/source/include/amlcode.h
> @@ -137,6 +137,7 @@
> #define AML_PACKAGE_OP (UINT16) 0x12
> #define AML_VAR_PACKAGE_OP (UINT16) 0x13 /* ACPI 2.0 */
> #define AML_METHOD_OP (UINT16) 0x14
> +#define AML_EXTERNAL_OP (UINT16) 0x15 /* ACPI 6.0 */
> #define AML_DUAL_NAME_PREFIX (UINT16) 0x2e
> #define AML_MULTI_NAME_PREFIX_OP (UINT16) 0x2f
> #define AML_NAME_CHAR_SUBSEQ (UINT16) 0x30
> @@ -281,7 +282,6 @@
> #define AML_INT_RESERVEDFIELD_OP (UINT16) 0x0031
> #define AML_INT_ACCESSFIELD_OP (UINT16) 0x0032
> #define AML_INT_BYTELIST_OP (UINT16) 0x0033
> -#define AML_INT_STATICSTRING_OP (UINT16) 0x0034
> #define AML_INT_METHODCALL_OP (UINT16) 0x0035
> #define AML_INT_RETURN_VALUE_OP (UINT16) 0x0036
> #define AML_INT_EVAL_SUBTREE_OP (UINT16) 0x0037
> diff --git a/src/acpica/source/include/platform/acenv.h b/src/acpica/source/include/platform/acenv.h
> index c1714ed..83ac402 100644
> --- a/src/acpica/source/include/platform/acenv.h
> +++ b/src/acpica/source/include/platform/acenv.h
> @@ -149,6 +149,7 @@
> #define ACPI_LARGE_NAMESPACE_NODE
> #define ACPI_DATA_TABLE_DISASSEMBLY
> #define ACPI_SINGLE_THREADED
> +#define ACPI_32BIT_PHYSICAL_ADDRESS
> #endif
>
> /* AcpiExec configuration. Multithreaded with full AML debugger */
> diff --git a/src/acpica/source/tools/acpiexec/aeregion.c b/src/acpica/source/tools/acpiexec/aeregion.c
> index a1b8ea2..a7823bf 100644
> --- a/src/acpica/source/tools/acpiexec/aeregion.c
> +++ b/src/acpica/source/tools/acpiexec/aeregion.c
> @@ -759,8 +759,8 @@ AeRegionHandler (
> {
> /* Right overlap */
>
> - RegionElement->Length = BaseAddress -
> - RegionAddress + Length;
> + RegionElement->Length = (UINT32) (BaseAddress -
> + RegionAddress + Length);
> BufferResize = TRUE;
> }
>
> @@ -771,8 +771,8 @@ AeRegionHandler (
> /* Left overlap */
>
> RegionElement->Address = BaseAddress;
> - RegionElement->Length = RegionAddress -
> - BaseAddress + RegionElement->Length;
> + RegionElement->Length = (UINT32) (RegionAddress -
> + BaseAddress + RegionElement->Length);
> BufferResize = TRUE;
> }
>
Acked-by: Ivan Hu<ivan.hu at canonical.com>
More information about the fwts-devel
mailing list