diff options
Diffstat (limited to 'source')
429 files changed, 2995 insertions, 785 deletions
diff --git a/source/common/acfileio.c b/source/common/acfileio.c index 7c624f5d3..a9118f61d 100644 --- a/source/common/acfileio.c +++ b/source/common/acfileio.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -387,16 +387,36 @@ AcGetOneTableFromFile ( ACPI_TABLE_HEADER TableHeader; ACPI_TABLE_HEADER *Table; INT32 Count; - long TableOffset; - + UINT32 TableLength; + UINT32 HeaderLength; + long TableOffset = 0; *ReturnTable = NULL; /* Get the table header to examine signature and length */ + /* + * Special handling for the CDAT table (both the Length field + * and the Checksum field are not in the standard positions). + * (The table header is non-standard). + */ + if (AcpiGbl_CDAT) + { + HeaderLength = sizeof (ACPI_TABLE_CDAT); + } + else + { + HeaderLength = sizeof (ACPI_TABLE_HEADER); + } + + Status = AcValidateTableHeader (File, TableOffset); + if (ACPI_FAILURE (Status)) + { + return (Status); + } TableOffset = ftell (File); - Count = fread (&TableHeader, 1, sizeof (ACPI_TABLE_HEADER), File); - if (Count != sizeof (ACPI_TABLE_HEADER)) + Count = fread (&TableHeader, 1, HeaderLength, File); + if (Count != (INT32) HeaderLength) { return (AE_CTRL_TERMINATE); } @@ -405,12 +425,6 @@ AcGetOneTableFromFile ( { /* Validate the table signature/header (limited ASCII chars) */ - Status = AcValidateTableHeader (File, TableOffset); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - /* * Table must be an AML table (DSDT/SSDT). * Used for iASL -e option only. @@ -425,9 +439,22 @@ AcGetOneTableFromFile ( } } + /* + * Special handling for the CDAT table (both the Length field + * and the Checksum field are not in the standard positions). + */ + if (AcpiGbl_CDAT) + { + TableLength = ACPI_CAST_PTR (ACPI_TABLE_CDAT, &TableHeader)->Length; + } + else + { + TableLength = TableHeader.Length; + } + /* Allocate a buffer for the entire table */ - Table = AcpiOsAllocate ((ACPI_SIZE) TableHeader.Length); + Table = AcpiOsAllocate ((ACPI_SIZE) TableLength); if (!Table) { return (AE_NO_MEMORY); @@ -436,22 +463,31 @@ AcGetOneTableFromFile ( /* Read the entire ACPI table, including header */ fseek (File, TableOffset, SEEK_SET); - - Count = fread (Table, 1, TableHeader.Length, File); + Count = fread (Table, 1, TableLength, File); /* * Checks for data table headers happen later in the execution. Only verify * for Aml tables at this point in the code. */ - if (GetOnlyAmlTables && Count != (INT32) TableHeader.Length) + if (GetOnlyAmlTables && Count != (INT32) TableLength) { Status = AE_ERROR; goto ErrorExit; } - /* Validate the checksum (just issue a warning) */ + /* + * Validate the checksum (just issue a warning if incorrect). + * Note: CDAT is special cased here because the table does + * not have the checksum field in the standard position. + */ + if (AcpiGbl_CDAT) + { + Status = AcpiUtVerifyCdatChecksum ((ACPI_TABLE_CDAT *) Table, TableLength); + } else + { + Status = AcpiUtVerifyChecksum (Table, TableLength); + } - Status = AcpiTbVerifyChecksum (Table, TableHeader.Length); if (ACPI_FAILURE (Status)) { Status = AcCheckTextModeCorruption (Table); @@ -540,6 +576,8 @@ AcValidateTableHeader ( long TableOffset) { ACPI_TABLE_HEADER TableHeader; + ACPI_TABLE_CDAT *CdatTableHeader = ACPI_CAST_PTR (ACPI_TABLE_CDAT, &TableHeader); + UINT32 HeaderLength; ACPI_SIZE Actual; long OriginalOffset; UINT32 FileSize; @@ -548,6 +586,16 @@ AcValidateTableHeader ( ACPI_FUNCTION_TRACE (AcValidateTableHeader); + /* Determine the type of table header */ + + if (AcpiGbl_CDAT) + { + HeaderLength = sizeof (ACPI_TABLE_CDAT); + } + else + { + HeaderLength = sizeof (ACPI_TABLE_HEADER); + } /* Read a potential table header */ @@ -556,41 +604,76 @@ AcValidateTableHeader ( { fprintf (stderr, "SEEK error\n"); } - Actual = fread (&TableHeader, 1, sizeof (ACPI_TABLE_HEADER), File); + Actual = fread (&TableHeader, 1, HeaderLength, File); if (fseek (File, OriginalOffset, SEEK_SET)) { fprintf (stderr, "SEEK error\n"); } - if (Actual < sizeof (ACPI_TABLE_HEADER)) + if (Actual < HeaderLength) { fprintf (stderr, "Could not read entire table header: Actual %u, Requested %u\n", - (UINT32) Actual, (UINT32) sizeof (ACPI_TABLE_HEADER)); + (UINT32) Actual, HeaderLength); return (AE_ERROR); } /* Validate the signature (limited ASCII chars) */ - if (!AcpiUtValidNameseg (TableHeader.Signature)) + if (!AcpiGbl_CDAT && !AcpiUtValidNameseg (TableHeader.Signature)) { + /* + * The "-ds cdat" option was not used, and the signature is not valid. + * + * For CDAT we are assuming that there should be at least one non-ASCII + * byte in the (normally) 4-character Signature field (at least the + * high-order byte should be zero). Otherwise, this is OK. + */ + fprintf (stderr, + "\nTable appears to be a CDAT table, which has no signature.\n" + "If this is in fact a CDAT table, use the -ds option on the\n" + "command line to specify the table type (signature):\n" + "\"iasl -d -ds CDAT <file>\" or \"iasl -ds CDAT -T CDAT\"\n\n"); + return (AE_BAD_SIGNATURE); } /* Validate table length against bytes remaining in the file */ FileSize = CmGetFileSize (File); - if (TableHeader.Length > (UINT32) (FileSize - TableOffset)) + if (!AcpiGbl_CDAT) + { + /* Standard ACPI table header */ + + if (TableHeader.Length > (UINT32) (FileSize - TableOffset)) + { + fprintf (stderr, "Table [%4.4s] is too long for file - " + "needs: 0x%.2X, remaining in file: 0x%.2X\n", + TableHeader.Signature, TableHeader.Length, + (UINT32) (FileSize - TableOffset)); + return (AE_BAD_HEADER); + } + } + else if (CdatTableHeader->Length > (UINT32) (FileSize - TableOffset)) { - fprintf (stderr, "Table [%4.4s] is too long for file - " + /* Special header for CDAT table */ + + fprintf (stderr, "Table [CDAT] is too long for file - " "needs: 0x%.2X, remaining in file: 0x%.2X\n", - TableHeader.Signature, TableHeader.Length, + CdatTableHeader->Length, (UINT32) (FileSize - TableOffset)); return (AE_BAD_HEADER); } + /* For CDAT table, there are no ASCII fields in the header, we are done */ + + if (AcpiGbl_CDAT) + { + return (AE_OK); + } + /* - * These fields must be ASCII: OemId, OemTableId, AslCompilerId. + * These standard fields must be ASCII: OemId, OemTableId, AslCompilerId. * We allow a NULL terminator in OemId and OemTableId. */ for (i = 0; i < ACPI_NAMESEG_SIZE; i++) diff --git a/source/common/acgetline.c b/source/common/acgetline.c index e5d0bf560..b26499277 100644 --- a/source/common/acgetline.c +++ b/source/common/acgetline.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/common/adfile.c b/source/common/adfile.c index 647333d9d..8bca7273f 100644 --- a/source/common/adfile.c +++ b/source/common/adfile.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/common/adisasm.c b/source/common/adisasm.c index ecb984858..5feb501a7 100644 --- a/source/common/adisasm.c +++ b/source/common/adisasm.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -476,13 +476,13 @@ AdDisassembleOneTable ( /* This is a "Data Table" (non-AML table) */ AcpiOsPrintf (" * ACPI Data Table [%4.4s]\n *\n", - Table->Signature); + AcpiGbl_CDAT ? (char *) AcpiGbl_CDAT : Table->Signature); AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength] " "FieldName : FieldValue (in hex)\n */\n\n"); AcpiDmDumpDataTable (Table); fprintf (stderr, "Acpi Data Table [%4.4s] decoded\n", - Table->Signature); + AcpiGbl_CDAT ? (char *) AcpiGbl_CDAT : Table->Signature); if (File) { diff --git a/source/common/adwalk.c b/source/common/adwalk.c index 6d51c7e17..f810abaf0 100644 --- a/source/common/adwalk.c +++ b/source/common/adwalk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/common/ahids.c b/source/common/ahids.c index 05c31bf50..8930dc64b 100644 --- a/source/common/ahids.c +++ b/source/common/ahids.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/common/ahpredef.c b/source/common/ahpredef.c index 724abe6a3..f4080587f 100644 --- a/source/common/ahpredef.c +++ b/source/common/ahpredef.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/common/ahtable.c b/source/common/ahtable.c index bff8ae790..8df0fb073 100644 --- a/source/common/ahtable.c +++ b/source/common/ahtable.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -206,6 +206,8 @@ const AH_TABLE AcpiGbl_SupportedTables[] = {ACPI_SIG_BERT, "Boot Error Record Table"}, {ACPI_SIG_BGRT, "Boot Graphics Resource Table"}, {ACPI_SIG_BOOT, "Simple Boot Flag Table"}, + {ACPI_SIG_CCEL, "CC-Event Log Table"}, + {ACPI_SIG_CDAT, "Coherent Device Attribute Table"}, {ACPI_SIG_CEDT, "CXL Early Discovery Table"}, {ACPI_SIG_CPEP, "Corrected Platform Error Polling Table"}, {ACPI_SIG_CSRT, "Core System Resource Table"}, @@ -230,6 +232,7 @@ const AH_TABLE AcpiGbl_SupportedTables[] = {ACPI_SIG_MADT, "Multiple APIC Description Table (MADT)"}, {ACPI_SIG_MCFG, "Memory Mapped Configuration Table"}, {ACPI_SIG_MCHI, "Management Controller Host Interface Table"}, + {ACPI_SIG_MPAM, "Memory System Resource Partitioning and Monitoring Table"}, {ACPI_SIG_MPST, "Memory Power State Table"}, {ACPI_SIG_MSCT, "Maximum System Characteristics Table"}, {ACPI_SIG_MSDM, "Microsoft Data Management Table"}, diff --git a/source/common/ahuuids.c b/source/common/ahuuids.c index 909698c57..219f0e8e2 100644 --- a/source/common/ahuuids.c +++ b/source/common/ahuuids.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -209,6 +209,9 @@ const AH_UUID Gbl_AcpiUuids[] = {"Hierarchical Data Extension", UUID_HIERARCHICAL_DATA_EXTENSION}, {"ARM Coresight Graph", UUID_CORESIGHT_GRAPH}, {"USB4 Capabilities", UUID_USB4_CAPABILITIES}, + {"First Function ID for _DSM", UUID_1ST_FUNCTION_ID}, + {"Second Function ID for _DSM", UUID_2ND_FUNCTION_ID}, + {NULL, NULL} }; diff --git a/source/common/cmfsize.c b/source/common/cmfsize.c index 474ccd950..e303b7655 100644 --- a/source/common/cmfsize.c +++ b/source/common/cmfsize.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/common/dmextern.c b/source/common/dmextern.c index 806daa33f..3a413f43d 100644 --- a/source/common/dmextern.c +++ b/source/common/dmextern.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/common/dmrestag.c b/source/common/dmrestag.c index b67729843..d9255c1ab 100644 --- a/source/common/dmrestag.c +++ b/source/common/dmrestag.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/common/dmswitch.c b/source/common/dmswitch.c index 4a4347368..c6e9f8b0e 100644 --- a/source/common/dmswitch.c +++ b/source/common/dmswitch.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/common/dmtable.c b/source/common/dmtable.c index b67848cfd..d5de9c286 100644 --- a/source/common/dmtable.c +++ b/source/common/dmtable.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -234,6 +234,17 @@ static const char *AcpiDmAsfSubnames[] = "Unknown Subtable Type" /* Reserved */ }; +static const char *AcpiDmCdatSubnames[] = +{ + "Device Scoped Memory Affinity Structure (DSMAS)", + "Device scoped Latency and Bandwidth Information Structure (DSLBIS)", + "Device Scoped Memory Side Cache Information Structure (DSMSCIS)", + "Device Scoped Initiator Structure (DSIS)", + "Device Scoped EFI Memory Type Structure (DSEMTS)", + "Switch Scoped Latency and Bandwidth Information Structure (SSLBIS)", + "Unknown Subtable Type" /* Reserved */ +}; + static const char *AcpiDmCedtSubnames[] = { "CXL Host Bridge Structure", @@ -414,6 +425,17 @@ static const char *AcpiDmMadtSubnames[] = "Types 80-FF are used for OEM data" /* Reserved for OEM data */ }; +static const char *AcpiDmMpamSubnames[] = +{ + "Processor cache", /* ACPI_MPAM_LOCATION_TYPE_PROCESSOR_CACHE */ + "Memory", /* ACPI_MPAM_LOCATION_TYPE_MEMORY */ + "SMMU", /* ACPI_MPAM_LOCATION_TYPE_SMMU */ + "Memory-side cache", /* ACPI_MPAM_LOCATION_TYPE_MEMORY_CACHE */ + "ACPI device", /* ACPI_MPAM_LOCATION_TYPE_ACPI_DEVICE */ + "Interconnect", /* ACPI_MPAM_LOCATION_TYPE_INTERCONNECT */ + "Unknown" /* ACPI_MPAM_LOCATION_TYPE_UNKNOWN */ +}; + static const char *AcpiDmNfitSubnames[] = { "System Physical Address Range", /* ACPI_NFIT_TYPE_SYSTEM_ADDRESS */ @@ -665,6 +687,8 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert}, {ACPI_SIG_BGRT, AcpiDmTableInfoBgrt, NULL, NULL, TemplateBgrt}, {ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot}, + {ACPI_SIG_CCEL, AcpiDmTableInfoCcel, NULL, NULL, TemplateCcel}, + {ACPI_SIG_CDAT, NULL, AcpiDmDumpCdat, NULL, TemplateCdat}, {ACPI_SIG_CEDT, NULL, AcpiDmDumpCedt, DtCompileCedt, TemplateCedt}, {ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep}, {ACPI_SIG_CSRT, NULL, AcpiDmDumpCsrt, DtCompileCsrt, TemplateCsrt}, @@ -687,6 +711,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, DtCompileMadt, TemplateMadt}, {ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, DtCompileMcfg, TemplateMcfg}, {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi}, + {ACPI_SIG_MPAM, NULL, AcpiDmDumpMpam, DtCompileMpam, TemplateMpam}, {ACPI_SIG_MPST, AcpiDmTableInfoMpst, AcpiDmDumpMpst, DtCompileMpst, TemplateMpst}, {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct}, {ACPI_SIG_MSDM, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateMsdm}, @@ -731,44 +756,6 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] = /******************************************************************************* * - * FUNCTION: AcpiDmGenerateChecksum - * - * PARAMETERS: Table - Pointer to table to be checksummed - * Length - Length of the table - * OriginalChecksum - Value of the checksum field - * - * RETURN: 8 bit checksum of buffer - * - * DESCRIPTION: Computes an 8 bit checksum of the table. - * - ******************************************************************************/ - -UINT8 -AcpiDmGenerateChecksum ( - void *Table, - UINT32 Length, - UINT8 OriginalChecksum) -{ - UINT8 Checksum; - - - /* Sum the entire table as-is */ - - Checksum = AcpiTbChecksum ((UINT8 *) Table, Length); - - /* Subtract off the existing checksum value in the table */ - - Checksum = (UINT8) (Checksum - OriginalChecksum); - - /* Compute the final checksum */ - - Checksum = (UINT8) (0 - Checksum); - return (Checksum); -} - - -/******************************************************************************* - * * FUNCTION: AcpiDmGetTableData * * PARAMETERS: Signature - ACPI signature (4 chars) to match @@ -841,7 +828,7 @@ AcpiDmDumpDataTable ( /* * Handle tables that don't use the common ACPI table header structure. - * Currently, these are the FACS, RSDP, and S3PT. + * Currently, these are the FACS, RSDP, S3PT and CDAT. */ if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS)) { @@ -861,6 +848,28 @@ AcpiDmDumpDataTable ( { Length = AcpiDmDumpS3pt (Table); } + else if (!AcpiUtValidNameseg (Table->Signature)) + { + /* + * For CDAT we are assuming that there should be at least one non-ASCII + * byte in the (normally) 4-character Signature field (at least the + * high-order byte should be zero). + */ + if (AcpiGbl_CDAT) + { + /* + * Invalid signature and <-ds CDAT> was specified on the command line. + * Therefore, we have a CDAT table. + */ + AcpiDmDumpCdat (Table); + } + else + { + fprintf (stderr, "Table has an invalid signature\n"); + } + + return; + } else { /* @@ -984,7 +993,7 @@ AcpiDmLineHeader ( { if (ByteLength) { - AcpiOsPrintf ("[%3.3Xh %4.4d% 4d] %28s : ", + AcpiOsPrintf ("[%3.3Xh %4.4u %3.3Xh] %27s : ", Offset, Offset, ByteLength, Name); } else @@ -1026,12 +1035,12 @@ AcpiDmLineHeader2 ( { if (ByteLength) { - AcpiOsPrintf ("[%3.3Xh %4.4d %3d] %24s %3d : ", + AcpiOsPrintf ("[%3.3Xh %4.4u %3.3Xh] %24s %3d : ", Offset, Offset, ByteLength, Name, Value); } else { - AcpiOsPrintf ("[%3.3Xh %4.4d ] %24s %3d : ", + AcpiOsPrintf ("[%3.3Xh %4.4u ] %24s %3d : ", Offset, Offset, Name, Value); } } @@ -1113,7 +1122,8 @@ AcpiDmDumpTable ( { AcpiOsPrintf ( "/**** ACPI table terminates " - "in the middle of a data structure! (dump table) */\n"); + "in the middle of a data structure! (dump table) \n" + "CurrentOffset: %X, TableLength: %X ***/", CurrentOffset, TableLength); return (AE_BAD_DATA); } @@ -1130,6 +1140,7 @@ AcpiDmDumpTable ( case ACPI_DMT_IVRS_DE: case ACPI_DMT_GTDT: case ACPI_DMT_MADT: + case ACPI_DMT_MPAM_LOCATOR: case ACPI_DMT_NHLT1: case ACPI_DMT_NHLT1a: case ACPI_DMT_NHLT1b: @@ -1147,6 +1158,7 @@ AcpiDmDumpTable ( case ACPI_DMT_AEST_XFACE: case ACPI_DMT_AEST_XRUPT: case ACPI_DMT_ASF: + case ACPI_DMT_CDAT: case ACPI_DMT_HESTNTYP: case ACPI_DMT_FADTPM: case ACPI_DMT_EINJACT: @@ -1529,7 +1541,7 @@ AcpiDmDumpTable ( /* Checksum, display and validate */ AcpiOsPrintf ("%2.2X", *Target); - Temp8 = AcpiDmGenerateChecksum (Table, + Temp8 = AcpiUtGenerateChecksum (Table, ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length, ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum); @@ -1675,6 +1687,20 @@ AcpiDmDumpTable ( AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmAsfSubnames[Temp16]); break; + case ACPI_DMT_CDAT: + + /* CDAT subtable types */ + + Temp8 = *Target; + if (Temp8 > ACPI_CDAT_TYPE_RESERVED) + { + Temp8 = ACPI_CDAT_TYPE_RESERVED; + } + + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmCdatSubnames[Temp8]); + break; + case ACPI_DMT_CEDT: /* CEDT subtable types */ @@ -1877,6 +1903,20 @@ AcpiDmDumpTable ( AcpiDmMadtSubnames[Temp8]); break; + case ACPI_DMT_MPAM_LOCATOR: + + /* MPAM subtable locator types */ + + Temp8 = *Target; + if (Temp8 > ACPI_MPAM_LOCATION_TYPE_INTERCONNECT) + { + Temp8 = ACPI_MPAM_LOCATION_TYPE_INTERCONNECT + 1; + } + + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmMpamSubnames[Temp8]); + break; + case ACPI_DMT_NFIT: /* NFIT subtable types */ @@ -2024,15 +2064,15 @@ AcpiDmDumpTable ( case ACPI_DMT_PHAT: - /* PMTT subtable types */ + /* PHAT subtable types */ - Temp16 = *Target; + Temp16 = ACPI_GET16 (Target); if (Temp16 > ACPI_PHAT_TYPE_RESERVED) { Temp16 = ACPI_PHAT_TYPE_RESERVED; } - AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16(Target), + AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target), AcpiDmPhatSubnames[Temp16]); break; @@ -2076,7 +2116,7 @@ AcpiDmDumpTable ( break; } - AcpiDmDumpUnicode (Table, CurrentOffset, ByteLength); + AcpiDmDumpUnicode (Table, 0, ByteLength); break; case ACPI_DMT_RAW_BUFFER: diff --git a/source/common/dmtables.c b/source/common/dmtables.c index 6f42bcb3b..c474a8c9a 100644 --- a/source/common/dmtables.c +++ b/source/common/dmtables.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -296,7 +296,7 @@ AdCreateTableHeader ( AcpiOsPrintf ("\n * Checksum 0x%2.2X", Table->Checksum); - Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), Table->Length); + Checksum = AcpiUtChecksum (ACPI_CAST_PTR (UINT8, Table), Table->Length); if (Checksum) { AcpiOsPrintf (" **** Incorrect checksum, should be 0x%2.2X", diff --git a/source/common/dmtbdump.c b/source/common/dmtbdump.c index b4faf6831..c4046b8e8 100644 --- a/source/common/dmtbdump.c +++ b/source/common/dmtbdump.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -384,7 +384,7 @@ AcpiDmDumpRsdp ( /* Validate the first checksum */ - Checksum = AcpiDmGenerateChecksum (Rsdp, sizeof (ACPI_RSDP_COMMON), + Checksum = AcpiUtGenerateChecksum (Rsdp, sizeof (ACPI_RSDP_COMMON), Rsdp->Checksum); if (Checksum != Rsdp->Checksum) { @@ -405,7 +405,7 @@ AcpiDmDumpRsdp ( /* Validate the extended checksum over entire RSDP */ - Checksum = AcpiDmGenerateChecksum (Rsdp, sizeof (ACPI_TABLE_RSDP), + Checksum = AcpiUtGenerateChecksum (Rsdp, sizeof (ACPI_TABLE_RSDP), Rsdp->ExtendedChecksum); if (Checksum != Rsdp->ExtendedChecksum) { diff --git a/source/common/dmtbdump1.c b/source/common/dmtbdump1.c index 13662611e..89e2e1a38 100644 --- a/source/common/dmtbdump1.c +++ b/source/common/dmtbdump1.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -153,6 +153,7 @@ #include "accommon.h" #include "acdisasm.h" #include "actables.h" +#include "aslcompiler.h" /* This module used for application-level code only */ @@ -608,6 +609,192 @@ AcpiDmDumpAsf ( } } + +/******************************************************************************* + * + * FUNCTION: AcpiDmDumpCdat + * + * PARAMETERS: InTable - A CDAT table + * + * RETURN: None + * + * DESCRIPTION: Format the contents of a CDAT. This table type consists + * of an open-ended number of subtables. + * + ******************************************************************************/ + +void +AcpiDmDumpCdat ( + ACPI_TABLE_HEADER *InTable) +{ + ACPI_TABLE_CDAT *Table = ACPI_CAST_PTR (ACPI_TABLE_CDAT, InTable); + ACPI_STATUS Status; + ACPI_CDAT_HEADER *Subtable; + ACPI_TABLE_CDAT *CdatTable = ACPI_CAST_PTR (ACPI_TABLE_CDAT, Table); + ACPI_DMTABLE_INFO *InfoTable; + UINT32 Length = CdatTable->Length; + UINT32 Offset = sizeof (ACPI_TABLE_CDAT); + UINT32 SubtableLength; + UINT32 SubtableType; + INT32 EntriesLength; + + + /* Main table */ + + Status = AcpiDmDumpTable (Offset, 0, CdatTable, 0, + AcpiDmTableInfoCdatTableHdr); + if (ACPI_FAILURE (Status)) + { + return; + } + + Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, sizeof (ACPI_TABLE_CDAT)); + while (Offset < Table->Length) + { + /* Dump the common subtable header */ + + DbgPrint (ASL_DEBUG_OUTPUT, "0) HeaderOffset: %X\n", Offset); + AcpiOsPrintf ("\n"); + Status = AcpiDmDumpTable (Length, Offset, Subtable, + sizeof (ACPI_CDAT_HEADER), AcpiDmTableInfoCdatHeader); + if (ACPI_FAILURE (Status)) + { + return; + } + + /* Point past the common subtable header, decode the subtable type */ + + Offset += sizeof (ACPI_CDAT_HEADER); + SubtableType = Subtable->Type; + + switch (Subtable->Type) + { + case ACPI_CDAT_TYPE_DSMAS: + Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset); + SubtableLength = sizeof (ACPI_CDAT_DSMAS); + + InfoTable = AcpiDmTableInfoCdat0; + break; + + case ACPI_CDAT_TYPE_DSLBIS: + Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset); + SubtableLength = sizeof (ACPI_CDAT_DSLBIS); + DbgPrint (ASL_DEBUG_OUTPUT, "1) Offset: %X\n", Offset); + + InfoTable = AcpiDmTableInfoCdat1; + break; + + case ACPI_CDAT_TYPE_DSMSCIS: + Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset); + SubtableLength = sizeof (ACPI_CDAT_DSMSCIS); + + InfoTable = AcpiDmTableInfoCdat2; + break; + + case ACPI_CDAT_TYPE_DSIS: + DbgPrint (ASL_DEBUG_OUTPUT, "2) Offset: %X ", Offset); + SubtableLength = sizeof (ACPI_CDAT_DSIS); + DbgPrint (ASL_DEBUG_OUTPUT, "1) input pointer: %p\n", Table); + Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset); + DbgPrint (ASL_DEBUG_OUTPUT, "1) output pointers: %p, %p, Offset: %X\n", + Table, Subtable, Offset); + DbgPrint (ASL_DEBUG_OUTPUT, "3) Offset: %X\n", Offset); + + InfoTable = AcpiDmTableInfoCdat3; + break; + + case ACPI_CDAT_TYPE_DSEMTS: + Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset); + SubtableLength = sizeof (ACPI_CDAT_DSEMTS); + + InfoTable = AcpiDmTableInfoCdat4; + break; + + case ACPI_CDAT_TYPE_SSLBIS: + SubtableLength = Subtable->Length; + + InfoTable = AcpiDmTableInfoCdat5; + Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset); + break; + + default: + fprintf (stderr, "ERROR: Unknown SubtableType: %X\n", Subtable->Type); + return; + } + + DbgPrint (ASL_DEBUG_OUTPUT, "SubtableType: %X, Length: %X Actual " + "Length: %X Offset: %X tableptr: %p\n", SubtableType, + Subtable->Length, SubtableLength, Offset, Table); + + /* + * Do the subtable-specific fields + */ + Status = AcpiDmDumpTable (Length, Offset, Subtable, Offset, InfoTable); + if (ACPI_FAILURE (Status)) + { + return; + } + + DbgPrint (ASL_DEBUG_OUTPUT, "Subtable Type: %X, Offset: %X, SubtableLength: %X\n", + SubtableType, Offset, SubtableLength); + + /* Additional sub-subtables, dependent on the main subtable type */ + + switch (SubtableType) + { + case ACPI_CDAT_TYPE_SSLBIS: + Offset += sizeof (ACPI_CDAT_SSLBIS); + Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, + Offset); + + DbgPrint (ASL_DEBUG_OUTPUT, "Case SSLBIS, Offset: %X, SubtableLength: %X " + "Subtable->Length %X\n", Offset, SubtableLength, Subtable->Length); + + /* Generate the total length of all the SSLBE entries */ + + EntriesLength = SubtableLength - sizeof (ACPI_CDAT_HEADER) - + sizeof (ACPI_CDAT_SSLBIS); + DbgPrint (ASL_DEBUG_OUTPUT, "EntriesLength: %X, Offset: %X, Table->Length: %X\n", + EntriesLength, Offset, Table->Length); + + /* Do each of the SSLBE Entries */ + + while ((EntriesLength > 0) && (Offset < Table->Length)) + { + AcpiOsPrintf ("\n"); + + Status = AcpiDmDumpTable (Length, Offset, Subtable, Offset, + AcpiDmTableInfoCdatEntries); + if (ACPI_FAILURE (Status)) + { + return; + } + + EntriesLength -= sizeof (ACPI_CDAT_SSLBE); + Offset += sizeof (ACPI_CDAT_SSLBE); + Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset); + } + + SubtableLength = 0; + break; + + default: + break; + } + + DbgPrint (ASL_DEBUG_OUTPUT, "Offset: %X, Subtable Length: %X\n", + Offset, SubtableLength); + + /* Point to next subtable */ + + Offset += SubtableLength; + Subtable = ACPI_ADD_PTR (ACPI_CDAT_HEADER, Table, Offset); + } + + return; +} + + /******************************************************************************* * * FUNCTION: AcpiDmDumpCedt @@ -651,12 +838,14 @@ AcpiDmDumpCedt ( case ACPI_CEDT_TYPE_CHBS: Status = AcpiDmDumpTable (Length, Offset, Subtable, Subtable->Length, AcpiDmTableInfoCedt0); - if (ACPI_FAILURE (Status)) { + if (ACPI_FAILURE (Status)) + { return; } break; - case ACPI_CEDT_TYPE_CFMWS: { + case ACPI_CEDT_TYPE_CFMWS: + { ACPI_CEDT_CFMWS *ptr = (ACPI_CEDT_CFMWS *) Subtable; unsigned int i, max = 0x01 << (ptr->InterleaveWays); @@ -664,18 +853,22 @@ AcpiDmDumpCedt ( Status = AcpiDmDumpTable (Length, Offset, Subtable, Subtable->Length, AcpiDmTableInfoCedt1); - if (ACPI_FAILURE (Status)) { + if (ACPI_FAILURE (Status)) + { return; } /* Now, print out any interleave targets beyond the first. */ - for (i = 1; i < max; i++) { - unsigned int loc_offset = Offset + (i * 4) + ACPI_OFFSET(ACPI_CEDT_CFMWS, InterleaveTargets); + for (i = 1; i < max; i++) + { + unsigned int loc_offset = Offset + (i * 4) + ACPI_OFFSET (ACPI_CEDT_CFMWS, InterleaveTargets); unsigned int *trg = &(ptr->InterleaveTargets[i]); + Status = AcpiDmDumpTable (Length, loc_offset, trg, Subtable->Length, AcpiDmTableInfoCedt1_te); - if (ACPI_FAILURE (Status)) { + if (ACPI_FAILURE (Status)) + { return; } } @@ -1837,7 +2030,7 @@ AcpiDmDumpHmat ( return; } - /* Dump HMAT structure additionals */ + /* Dump HMAT structure additional */ switch (HmatStruct->Type) { diff --git a/source/common/dmtbdump2.c b/source/common/dmtbdump2.c index c50a6a247..ee35c99a5 100644 --- a/source/common/dmtbdump2.c +++ b/source/common/dmtbdump2.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -149,6 +149,7 @@ * *****************************************************************************/ +#include <wchar.h> #include "acpi.h" #include "accommon.h" #include "acdisasm.h" @@ -1128,6 +1129,124 @@ AcpiDmDumpMcfg ( } } +/******************************************************************************* + * + * FUNCTION: AcpiDmDumpMpam + * + * PARAMETERS: Table - A MPAM table + * + * RETURN: None + * + * DESCRIPTION: Format the contents of a MPAM table + * + ******************************************************************************/ + +void +AcpiDmDumpMpam ( + ACPI_TABLE_HEADER *Table) +{ + ACPI_STATUS Status; + ACPI_MPAM_MSC_NODE *MpamMscNode; + ACPI_MPAM_RESOURCE_NODE *MpamResourceNode; + ACPI_DMTABLE_INFO *InfoTable; + UINT32 Offset = sizeof(ACPI_TABLE_HEADER); + UINT32 MpamResourceNodeLength = 0; + + while (Offset < Table->Length) + { + MpamMscNode = ACPI_ADD_PTR (ACPI_MPAM_MSC_NODE, Table, Offset); + + /* Subtable: MSC */ + Status = AcpiDmDumpTable (MpamMscNode->Length, 0, MpamMscNode, 0, + AcpiDmTableInfoMpam0); + if (ACPI_FAILURE (Status)) + { + return; + } + + /* Offset the start of the array of resources */ + Offset += sizeof(ACPI_MPAM_MSC_NODE); + + /* Subtable: MSC RIS(es) */ + for (int ResourceIdx = 0; ResourceIdx < MpamMscNode->NumResouceNodes; ResourceIdx++) + { + MpamResourceNode = ACPI_ADD_PTR (ACPI_MPAM_RESOURCE_NODE, Table, Offset); + + MpamResourceNodeLength = sizeof(ACPI_MPAM_RESOURCE_NODE) + + MpamResourceNode->NumFunctionalDeps * sizeof(ACPI_MPAM_FUNC_DEPS); + + Offset += MpamResourceNodeLength; + + /* Subtable: MSC RIS */ + Status = AcpiDmDumpTable (MpamResourceNodeLength, 0, MpamResourceNode, 0, + AcpiDmTableInfoMpam1); + if (ACPI_FAILURE (Status)) + { + return; + } + + switch (MpamResourceNode->LocatorType) + { + case ACPI_MPAM_LOCATION_TYPE_PROCESSOR_CACHE: + InfoTable = AcpiDmTableInfoMpam1A; + break; + case ACPI_MPAM_LOCATION_TYPE_MEMORY: + InfoTable = AcpiDmTableInfoMpam1B; + break; + case ACPI_MPAM_LOCATION_TYPE_SMMU: + InfoTable = AcpiDmTableInfoMpam1C; + break; + case ACPI_MPAM_LOCATION_TYPE_MEMORY_CACHE: + InfoTable = AcpiDmTableInfoMpam1D; + break; + case ACPI_MPAM_LOCATION_TYPE_ACPI_DEVICE: + InfoTable = AcpiDmTableInfoMpam1E; + break; + case ACPI_MPAM_LOCATION_TYPE_INTERCONNECT: + InfoTable = AcpiDmTableInfoMpam1F; + break; + case ACPI_MPAM_LOCATION_TYPE_UNKNOWN: + InfoTable = AcpiDmTableInfoMpam1G; + default: + AcpiOsPrintf ("\n**** Unknown MPAM locator type 0x%X\n", + MpamResourceNode->LocatorType); + return; + } + + /* Subtable: MSC Resource Locator(s) */ + Status = AcpiDmDumpTable (sizeof(ACPI_MPAM_RESOURCE_LOCATOR), 0, + &MpamResourceNode->Locator, 0, InfoTable); + if (ACPI_FAILURE (Status)) + { + return; + } + + /* Get the number of functional dependencies of an RIS */ + Status = AcpiDmDumpTable (sizeof(UINT32), 0, &MpamResourceNode->NumFunctionalDeps, 0, + AcpiDmTableInfoMpam1Deps); + if (ACPI_FAILURE (Status)) + { + return; + } + + /* Subtable: MSC functional dependencies */ + for (int funcDep = 0; funcDep < MpamResourceNode->NumFunctionalDeps; funcDep++) + { + Status = AcpiDmDumpTable (sizeof(ACPI_MPAM_FUNC_DEPS), 0, + &MpamResourceNode->NumFunctionalDeps, 0, AcpiDmTableInfoMpam2); + if (ACPI_FAILURE (Status)) + { + return; + } + } + + AcpiOsPrintf ("\n\n"); + } + + } + + return; +} /******************************************************************************* * @@ -2104,9 +2223,12 @@ AcpiDmDumpPhat ( UINT32 RecordCount; UINT32 Length = Table->Length; UINT32 Offset = sizeof (ACPI_TABLE_PHAT); + UINT32 OriginalOffset; UINT32 SubtableLength; UINT32 PathLength; UINT32 VendorLength; + UINT16 RecordType; + const wchar_t *WideString; Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Table, sizeof (ACPI_TABLE_PHAT)); @@ -2116,58 +2238,93 @@ AcpiDmDumpPhat ( /* Common subtable header */ AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, 0, Subtable, + Status = AcpiDmDumpTable (Length, Offset, Subtable, sizeof (ACPI_PHAT_HEADER), AcpiDmTableInfoPhatHdr); if (ACPI_FAILURE (Status)) { return; } + DbgPrint (ASL_DEBUG_OUTPUT, "\n/* %u, Subtable->Type %X */\n", + __LINE__, Subtable->Type); + switch (Subtable->Type) { case ACPI_PHAT_TYPE_FW_VERSION_DATA: InfoTable = AcpiDmTableInfoPhat0; - SubtableLength = sizeof (ACPI_PHAT_VERSION_DATA); + SubtableLength = Offset += sizeof (ACPI_PHAT_VERSION_DATA); break; case ACPI_PHAT_TYPE_FW_HEALTH_DATA: InfoTable = AcpiDmTableInfoPhat1; - SubtableLength = sizeof (ACPI_PHAT_HEALTH_DATA); + SubtableLength = Offset += sizeof (ACPI_PHAT_TYPE_FW_HEALTH_DATA); break; default: - AcpiOsPrintf ("\n**** Unknown PHAT subtable type 0x%X\n\n", + DbgPrint (ASL_DEBUG_OUTPUT, "\n**** Unknown PHAT subtable type 0x%X\n\n", Subtable->Type); return; } - Status = AcpiDmDumpTable (Length, 0, Subtable, + Status = AcpiDmDumpTable (Length, SubtableLength, Subtable, SubtableLength, InfoTable); if (ACPI_FAILURE (Status)) { return; } + OriginalOffset = Offset; switch (Subtable->Type) { case ACPI_PHAT_TYPE_FW_VERSION_DATA: VersionData = ACPI_CAST_PTR (ACPI_PHAT_VERSION_DATA, Subtable); RecordCount = VersionData->ElementCount; - while (RecordCount) + RecordType = *ACPI_CAST_PTR (UINT8, Subtable); + + /* + * Skip past a zero-valued block (not part of the ACPI PHAT specification). + * First, check for a zero length record and a zero element count + */ + if (!VersionData->Header.Length && !VersionData->ElementCount) { - Status = AcpiDmDumpTable (Length, Offset, - ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_VERSION_DATA)), + while (RecordType == 0) + { + Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Table, Offset); + RecordType = *ACPI_CAST_PTR (UINT8, Subtable); + RecordCount = VersionData->ElementCount; + Offset += 1; + } + + Offset -= 1; + AcpiOsPrintf ("\n/* Warning: Block of zeros found above starting at Offset %X Length %X */\n" + "/* (not compliant to PHAT specification -- ignoring block) */\n", + OriginalOffset - 12, Offset - OriginalOffset + 12); + } + + DbgPrint (ASL_DEBUG_OUTPUT, "/* %u, RecordCount: %X, Offset %X, SubtableLength %X */\n", + __LINE__, RecordCount, Offset, SubtableLength); + + /* Emit each of the version elements */ + + while (RecordCount && VersionData->Header.Length) + { + AcpiOsPrintf ("\n/* Version Element #%Xh Offset %Xh */\n\n", + VersionData->ElementCount - RecordCount + 1, Offset); + + Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Table, Offset); + Status = AcpiDmDumpTable (Length, Offset, Subtable, sizeof (ACPI_PHAT_VERSION_ELEMENT), AcpiDmTableInfoPhat0a); if (ACPI_FAILURE (Status)) { return; } + Offset += sizeof (ACPI_PHAT_VERSION_ELEMENT); RecordCount--; } @@ -2175,24 +2332,48 @@ AcpiDmDumpPhat ( case ACPI_PHAT_TYPE_FW_HEALTH_DATA: - /* account for the null terminator */ + /* + * Get the length of the Device Path (UEFI wide string). + * Include the wide null terminator (+2), + */ + WideString = ACPI_ADD_PTR (wchar_t, Subtable, + sizeof (ACPI_PHAT_HEALTH_DATA)); + + PathLength = (wcslen (WideString) * 2) + 2; + DbgPrint (ASL_DEBUG_OUTPUT, "/* %u, PathLength %X, Offset %X, Table->Length %X */\n", + __LINE__, PathLength, Offset, Length); - PathLength = strlen (ACPI_ADD_PTR (char, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA))) + 1; Status = AcpiDmDumpTable (Length, Offset, ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA)), PathLength, AcpiDmTableInfoPhat1a); + Offset += PathLength; if (ACPI_FAILURE (Status)) { return; } - /* Get vendor data - data length is the remaining subtable length */ + /* Get Device-Specific Data - length of which is the remaining subtable length. */ VendorLength = Subtable->Length - sizeof (ACPI_PHAT_HEALTH_DATA) - PathLength; - Status = AcpiDmDumpTable (Length, 0, - ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA) + PathLength), - VendorLength, AcpiDmTableInfoPhat1b); + DbgPrint (ASL_DEBUG_OUTPUT, "%u, Subtable->Length %X, VendorLength %X, Offset %X PathLength: %X\n", + __LINE__, Subtable->Length, VendorLength, Offset, PathLength); + + if (VendorLength) + { + /* Point past the Device Path, Compile the Device-Specific Data */ + + Status = AcpiDmDumpTable (Length, Offset, + ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, sizeof (ACPI_PHAT_HEALTH_DATA) + PathLength), + VendorLength, AcpiDmTableInfoPhat1b); + if (ACPI_FAILURE (Status)) + { + return; + } + + Offset += VendorLength; + } + if (ACPI_FAILURE (Status)) { return; @@ -2208,9 +2389,12 @@ AcpiDmDumpPhat ( /* Next subtable */ - Offset += Subtable->Length; - Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Subtable, - Subtable->Length); + DbgPrint (ASL_DEBUG_OUTPUT, "/* %u, Bottom of main loop: Offset %X, " + "Subtable->Length %X, Table->Length %X */\n", + __LINE__, Offset, Subtable->Length, Table->Length); + + Subtable = ACPI_ADD_PTR (ACPI_PHAT_HEADER, Table, + Offset); } } diff --git a/source/common/dmtbdump3.c b/source/common/dmtbdump3.c index cbcd9e7f0..8ac16cee1 100644 --- a/source/common/dmtbdump3.c +++ b/source/common/dmtbdump3.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/common/dmtbinfo.c b/source/common/dmtbinfo.c index 405399699..717e7df94 100644 --- a/source/common/dmtbinfo.c +++ b/source/common/dmtbinfo.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/common/dmtbinfo1.c b/source/common/dmtbinfo1.c index d6a94bfc1..80ff2938f 100644 --- a/source/common/dmtbinfo1.c +++ b/source/common/dmtbinfo1.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -494,6 +494,116 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoBoot[] = ACPI_DMT_TERMINATOR }; +/******************************************************************************* + * + * CDAT - Coherent Device Attribute Table + * + ******************************************************************************/ + + /* Table header (not ACPI-compliant) */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoCdatTableHdr[] = +{ + {ACPI_DMT_UINT32, ACPI_CDAT_OFFSET (Length), "CDAT Table Length", DT_LENGTH}, + {ACPI_DMT_UINT8, ACPI_CDAT_OFFSET (Revision), "Revision", 0}, + {ACPI_DMT_UINT8, ACPI_CDAT_OFFSET (Checksum), "Checksum", 0}, + {ACPI_DMT_UINT48, ACPI_CDAT_OFFSET (Reserved), "Reserved", 0}, + {ACPI_DMT_UINT32, ACPI_CDAT_OFFSET (Sequence), "Sequence", 0}, + ACPI_DMT_TERMINATOR +}; + +/* Common subtable header */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoCdatHeader[] = +{ + {ACPI_DMT_CDAT, ACPI_CDATH_OFFSET (Type), "Subtable Type", 0}, + {ACPI_DMT_UINT8, ACPI_CDATH_OFFSET (Reserved), "Reserved", 0}, + {ACPI_DMT_UINT16, ACPI_CDATH_OFFSET (Length), "Length", DT_LENGTH}, + ACPI_DMT_TERMINATOR +}; + +/* Subtable 0: Device Scoped Memory Affinity Structure (DSMAS) */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoCdat0[] = +{ + {ACPI_DMT_UINT8, ACPI_CDAT0_OFFSET (DsmadHandle), "DSMAD Handle", 0}, + {ACPI_DMT_UINT8, ACPI_CDAT0_OFFSET (Flags), "Flags", 0}, + {ACPI_DMT_UINT16, ACPI_CDAT0_OFFSET (Reserved), "Reserved", 0}, + {ACPI_DMT_UINT64, ACPI_CDAT0_OFFSET (DpaBaseAddress), "DPA Base Address", 0}, + {ACPI_DMT_UINT64, ACPI_CDAT0_OFFSET (DpaLength), "DPA Length", 0}, + ACPI_DMT_TERMINATOR +}; + +/* Subtable 1: Device scoped Latency and Bandwidth Information Structure (DSLBIS) */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoCdat1[] = +{ + {ACPI_DMT_UINT8, ACPI_CDAT1_OFFSET (Handle), "Handle", 0}, + {ACPI_DMT_UINT8, ACPI_CDAT1_OFFSET (Flags), "Flags", 0}, + {ACPI_DMT_UINT8, ACPI_CDAT1_OFFSET (DataType), "Data Type", 0}, + {ACPI_DMT_UINT8, ACPI_CDAT1_OFFSET (Reserved), "Reserved", 0}, + {ACPI_DMT_UINT64, ACPI_CDAT1_OFFSET (EntryBaseUnit), "Entry Base Unit", 0}, + {ACPI_DMT_UINT16, ACPI_CDAT1_OFFSET (Entry[0]), "Entry0", 0}, + {ACPI_DMT_UINT16, ACPI_CDAT1_OFFSET (Entry[1]), "Entry1", 0}, + {ACPI_DMT_UINT16, ACPI_CDAT1_OFFSET (Entry[2]), "Entry2", 0}, + {ACPI_DMT_UINT16, ACPI_CDAT1_OFFSET (Reserved2), "Reserved", 0}, + ACPI_DMT_TERMINATOR +}; + +/* Subtable 2: Device Scoped Memory Side Cache Information Structure (DSMSCIS) */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoCdat2[] = +{ + {ACPI_DMT_UINT8, ACPI_CDAT2_OFFSET (DsmasHandle), "DSMAS Handle", 0}, + {ACPI_DMT_UINT24, ACPI_CDAT2_OFFSET (Reserved[3]), "Reserved", 0}, + {ACPI_DMT_UINT64, ACPI_CDAT2_OFFSET (SideCacheSize), "Side Cache Size", 0}, + {ACPI_DMT_UINT32, ACPI_CDAT2_OFFSET (CacheAttributes), "Cache Attributes", 0}, + ACPI_DMT_TERMINATOR +}; + +/* Subtable 3: Device Scoped Initiator Structure (DSIS) */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoCdat3[] = +{ + {ACPI_DMT_UINT8, ACPI_CDAT3_OFFSET (Flags), "Flags", 0}, + {ACPI_DMT_UINT8, ACPI_CDAT3_OFFSET (Handle), "Handle", 0}, + {ACPI_DMT_UINT16, ACPI_CDAT3_OFFSET (Reserved), "Reserved", 0}, + ACPI_DMT_TERMINATOR +}; + +/* Subtable 4: Device Scoped EFI Memory Type Structure (DSEMTS) */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoCdat4[] = +{ + {ACPI_DMT_UINT8, ACPI_CDAT4_OFFSET (DsmasHandle), "DSMAS Handle", 0}, + {ACPI_DMT_UINT8, ACPI_CDAT4_OFFSET (MemoryType), "Memory Type", 0}, + {ACPI_DMT_UINT16, ACPI_CDAT4_OFFSET (Reserved), "Reserved", 0}, + {ACPI_DMT_UINT64, ACPI_CDAT4_OFFSET (DpaOffset), "DPA Offset", 0}, + {ACPI_DMT_UINT64, ACPI_CDAT4_OFFSET (RangeLength), "DPA Range Length", 0}, + ACPI_DMT_TERMINATOR +}; + +/* Subtable 5: Switch Scoped Latency and Bandwidth Information Structure (SSLBIS) */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoCdat5[] = +{ + {ACPI_DMT_UINT8, ACPI_CDAT5_OFFSET (DataType), "Data Type", 0}, + {ACPI_DMT_UINT24, ACPI_CDAT5_OFFSET (Reserved), "Reserved", 0}, + {ACPI_DMT_UINT64, ACPI_CDAT5_OFFSET (EntryBaseUnit), "Entry Base Unit", 0}, + ACPI_DMT_TERMINATOR +}; + +/* Switch Scoped Latency and Bandwidth Entry (SSLBE) (For subtable 5 above) */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoCdatEntries[] = +{ + {ACPI_DMT_UINT16, ACPI_CDATE_OFFSET (PortxId), "Port X Id", 0}, + {ACPI_DMT_UINT16, ACPI_CDATE_OFFSET (PortyId), "Port Y Id", 0}, + {ACPI_DMT_UINT16, ACPI_CDATE_OFFSET (LatencyOrBandwidth), "Latency or Bandwidth", 0}, + {ACPI_DMT_UINT16, ACPI_CDATE_OFFSET (Reserved), "Reserved", 0}, + ACPI_DMT_TERMINATOR +}; + /******************************************************************************* * diff --git a/source/common/dmtbinfo2.c b/source/common/dmtbinfo2.c index 2c7d81785..1dd3d696f 100644 --- a/source/common/dmtbinfo2.c +++ b/source/common/dmtbinfo2.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -412,6 +412,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoIort4[] = {ACPI_DMT_FLAG0, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "COHACC Override", 0}, {ACPI_DMT_FLAG1, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "HTTU Override", 0}, {ACPI_DMT_FLAG3, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "Proximity Domain Valid", 0}, + {ACPI_DMT_FLAG4, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "DeviceID Valid", 0}, {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Reserved), "Reserved", 0}, {ACPI_DMT_UINT64, ACPI_IORT4_OFFSET (VatosAddress), "VATOS Address", 0}, {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Model), "Model", 0}, @@ -863,6 +864,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoMadt11[] = {ACPI_DMT_UINT8, ACPI_MADT11_OFFSET (EfficiencyClass), "Efficiency Class", 0}, {ACPI_DMT_UINT8, ACPI_MADT11_OFFSET (Reserved2[0]), "Reserved", 0}, {ACPI_DMT_UINT16, ACPI_MADT11_OFFSET (SpeInterrupt), "SPE Overflow Interrupt", 0}, + {ACPI_DMT_UINT16, ACPI_MADT11_OFFSET (TrbeInterrupt), "TRBE Interrupt", 0}, ACPI_DMT_TERMINATOR }; @@ -978,6 +980,133 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoMchi[] = ACPI_DMT_TERMINATOR }; +/******************************************************************************* + * + * MPAM - Memory System Resource Partitioning and Monitoring Tables + * Arm's DEN0065 MPAM ACPI 2.0. December 2022. + ******************************************************************************/ + +/* MPAM subtables */ + +/* 0: MPAM Resource Node Structure - A root MSC table. + * Arm's DEN0065 MPAM ACPI 2.0. Table 4: MPAM MSC node body. + */ +ACPI_DMTABLE_INFO AcpiDmTableInfoMpam0[] = +{ + {ACPI_DMT_UINT16, ACPI_MPAM0_OFFSET (Length), "Length", 0}, + {ACPI_DMT_UINT8, ACPI_MPAM0_OFFSET (InterfaceType), "Interface type", 0}, + {ACPI_DMT_UINT8, ACPI_MPAM0_OFFSET (Reserved), "Reserved", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM0_OFFSET (Identifier), "Identifier", 0}, + {ACPI_DMT_UINT64, ACPI_MPAM0_OFFSET (BaseAddress), "Base address", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM0_OFFSET (MMIOSize), "MMIO size", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM0_OFFSET (OverflowInterrupt), "Overflow interrupt", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM0_OFFSET (OverflowInterruptFlags), "Overflow interrupt flags", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM0_OFFSET (Reserved1), "Reserved1", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM0_OFFSET (OverflowInterruptAffinity), "Overflow interrupt affinity", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM0_OFFSET (ErrorInterrupt), "Error interrupt", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM0_OFFSET (ErrorInterruptFlags), "Error interrupt flags", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM0_OFFSET (Reserved2), "Reserved2", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM0_OFFSET (ErrorInterruptAffinity), "Error interrupt affinity", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM0_OFFSET (MaxNrdyUsec), "MAX_NRDY_USEC", 0}, + {ACPI_DMT_NAME8, ACPI_MPAM0_OFFSET (HardwareIdLinkedDevice), "Hardware ID of linked device", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM0_OFFSET (InstanceIdLinkedDevice), "Instance ID of linked device", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM0_OFFSET (NumResouceNodes), "Number of resource nodes", 0}, + + ACPI_DMT_TERMINATOR +}; + +/* 1: MPAM Resource (RIS) Node Structure - A subtable of MSC Nodes. + * Arm's DEN0065 MPAM ACPI 2.0. Table 9: Resource node. + */ +ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1[] = +{ + {ACPI_DMT_UINT32, ACPI_MPAM1_OFFSET (Identifier), "Identifier", 0}, + {ACPI_DMT_UINT8, ACPI_MPAM1_OFFSET (RISIndex), "RIS Index", 0}, + {ACPI_DMT_UINT16, ACPI_MPAM1_OFFSET (Reserved1), "Reserved1", 0}, + {ACPI_DMT_MPAM_LOCATOR, ACPI_MPAM1_OFFSET (LocatorType), "Locator type", 0}, + ACPI_DMT_TERMINATOR +}; + +/* An RIS field part of the RIS subtable */ +ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1Deps[] = +{ + {ACPI_DMT_UINT32, 0, "Number of functional dependencies", 0}, + ACPI_DMT_TERMINATOR +}; + +/* 1A: MPAM Processor cache locator descriptor. A subtable of RIS. + * Arm's DEN0065 MPAM ACPI 2.0. Table 13. + */ +ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1A[] = +{ + {ACPI_DMT_UINT64, ACPI_MPAM1A_OFFSET (CacheReference), "Cache reference", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM1A_OFFSET (Reserved), "Reserved", 0}, +}; + +/* 1B: MPAM Memory locator descriptor. A subtable of RIS. + * Arm's DEN0065 MPAM ACPI 2.0. Table 14. + */ +ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1B[] = +{ + {ACPI_DMT_UINT64, ACPI_MPAM1B_OFFSET (ProximityDomain), "Proximity domain", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM1B_OFFSET (Reserved), "Reserved", 0}, +}; + +/* 1C: MPAM SMMU locator descriptor. A subtable of RIS. + * Arm's DEN0065 MPAM ACPI 2.0. Table 15. + */ +ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1C[] = +{ + {ACPI_DMT_UINT64, ACPI_MPAM1C_OFFSET (SmmuInterface), "SMMU Interface", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM1C_OFFSET (Reserved), "Reserved", 0}, +}; + +/* 1D: MPAM Memory-side cache locator descriptor. A subtable of RIS. + * Arm's DEN0065 MPAM ACPI 2.0. Table 16. + */ +ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1D[] = +{ + {ACPI_DMT_UINT56, ACPI_MPAM1D_OFFSET (Level), "Reserved", 0}, + {ACPI_DMT_UINT8, ACPI_MPAM1D_OFFSET (Level), "Level", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM1D_OFFSET (Reference), "Reference", 0}, +}; + +/* 1E: MPAM ACPI device locator descriptor. A subtable of RIS. + * Arm's DEN0065 MPAM ACPI 2.0. Table 17. + */ +ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1E[] = +{ + {ACPI_DMT_UINT64, ACPI_MPAM1E_OFFSET (AcpiHwId), "ACPI Hardware ID", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM1E_OFFSET (AcpiUniqueId), "ACPI Unique ID", 0}, +}; + +/* 1F: MPAM Interconnect locator descriptor. A subtable of RIS. + * Arm's DEN0065 MPAM ACPI 2.0. Table 18. + */ +ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1F[] = +{ + {ACPI_DMT_UINT64, ACPI_MPAM1F_OFFSET (InterConnectDescTblOff), "Interconnect descriptor table offset", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM1F_OFFSET (Reserved), "Reserved", 0}, +}; + +/* 1G: MPAM Locator structure. + * Arm's DEN0065 MPAM ACPI 2.0. Table 12. + */ +ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1G[] = +{ + {ACPI_DMT_UINT64, ACPI_MPAM1G_OFFSET (Descriptor1), "Descriptor1", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM1G_OFFSET (Descriptor2), "Descriptor2", 0}, +}; + +/* 2: MPAM Functional dependency descriptor. + * Arm's DEN0065 MPAM ACPI 2.0. Table 10. + */ +ACPI_DMTABLE_INFO AcpiDmTableInfoMpam2[] = +{ + {ACPI_DMT_UINT32, ACPI_MPAM2_OFFSET (Producer), "Producer", 0}, + {ACPI_DMT_UINT32, ACPI_MPAM2_OFFSET (Reserved), "Reserved", 0}, +}; + /******************************************************************************* * @@ -1652,11 +1781,13 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoPdtt0[] = * ******************************************************************************/ +/* Common subtable header */ + ACPI_DMTABLE_INFO AcpiDmTableInfoPhatHdr[] = { - {ACPI_DMT_PHAT, ACPI_PHATH_OFFSET (Type), "Subtable Type", 0}, - {ACPI_DMT_UINT16, ACPI_PHATH_OFFSET (Length), "Length", 0}, - {ACPI_DMT_UINT8, ACPI_PHATH_OFFSET (Revision), "Revision", 0}, + {ACPI_DMT_PHAT, ACPI_PHATH_OFFSET (Type), "Subtable Type", 0}, + {ACPI_DMT_UINT16, ACPI_PHATH_OFFSET (Length), "Length", DT_LENGTH}, + {ACPI_DMT_UINT8, ACPI_PHATH_OFFSET (Revision), "Revision", 0}, ACPI_DMT_TERMINATOR }; @@ -1664,16 +1795,16 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoPhatHdr[] = ACPI_DMTABLE_INFO AcpiDmTableInfoPhat0[] = { - {ACPI_DMT_UINT24, ACPI_PHAT0_OFFSET (Reserved), "Reserved", 0}, - {ACPI_DMT_UINT32, ACPI_PHAT0_OFFSET (ElementCount), "Element Count", 0}, + {ACPI_DMT_UINT24, ACPI_PHAT0_OFFSET (Reserved), "Reserved", 0}, + {ACPI_DMT_UINT32, ACPI_PHAT0_OFFSET (ElementCount), "Element Count", 0}, ACPI_DMT_TERMINATOR }; ACPI_DMTABLE_INFO AcpiDmTableInfoPhat0a[] = { - {ACPI_DMT_UUID, ACPI_PHAT0A_OFFSET (Guid), "GUID", 0}, - {ACPI_DMT_UINT64, ACPI_PHAT0A_OFFSET (VersionValue), "Version Value", 0}, - {ACPI_DMT_UINT32, ACPI_PHAT0A_OFFSET (ProducerId), "Producer ID", 0}, + {ACPI_DMT_UUID, ACPI_PHAT0A_OFFSET (Guid), "GUID", 0}, + {ACPI_DMT_UINT64, ACPI_PHAT0A_OFFSET (VersionValue), "Version Value", 0}, + {ACPI_DMT_UINT32, ACPI_PHAT0A_OFFSET (ProducerId), "Producer ID", 0}, ACPI_DMT_TERMINATOR }; @@ -1681,22 +1812,22 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoPhat0a[] = ACPI_DMTABLE_INFO AcpiDmTableInfoPhat1[] = { - {ACPI_DMT_UINT16, ACPI_PHAT1_OFFSET (Reserved), "Reserved", 0}, - {ACPI_DMT_UINT8, ACPI_PHAT1_OFFSET (Health), "Health", 0}, - {ACPI_DMT_UUID, ACPI_PHAT1_OFFSET (DeviceGuid), "Device GUID", 0}, - {ACPI_DMT_UINT32, ACPI_PHAT1_OFFSET (DeviceSpecificOffset), "Device specific offset", 0}, + {ACPI_DMT_UINT16, ACPI_PHAT1_OFFSET (Reserved), "Reserved", 0}, + {ACPI_DMT_UINT8, ACPI_PHAT1_OFFSET (Health), "Health", 0}, + {ACPI_DMT_UUID, ACPI_PHAT1_OFFSET (DeviceGuid), "Device GUID", 0}, + {ACPI_DMT_UINT32, ACPI_PHAT1_OFFSET (DeviceSpecificOffset), "Device-Specific Offset", 0}, ACPI_DMT_TERMINATOR }; ACPI_DMTABLE_INFO AcpiDmTableInfoPhat1a[] = { - {ACPI_DMT_STRING, 0, "Namepath", 0}, + {ACPI_DMT_UNICODE, 0, "Device Path", 0}, ACPI_DMT_TERMINATOR }; ACPI_DMTABLE_INFO AcpiDmTableInfoPhat1b[] = { - {ACPI_DMT_RAW_BUFFER, 0, "Vendor Data", 0}, + {ACPI_DMT_RAW_BUFFER, 0, "Device-Specific Data", DT_OPTIONAL}, ACPI_DMT_TERMINATOR }; @@ -1895,7 +2026,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoPrmtHandler[] = {ACPI_DMT_UINT16, ACPI_PRMT1_OFFSET (Length), "Length", 0}, {ACPI_DMT_UUID, ACPI_PRMT1_OFFSET (HandlerGuid[0]), "Handler GUID", 0}, {ACPI_DMT_UINT64, ACPI_PRMT1_OFFSET (HandlerAddress), "Handler address", 0}, - {ACPI_DMT_UINT64, ACPI_PRMT1_OFFSET (StaticDataBufferAddress),"Satic Data Address", 0}, + {ACPI_DMT_UINT64, ACPI_PRMT1_OFFSET (StaticDataBufferAddress),"Static Data Address", 0}, {ACPI_DMT_UINT64, ACPI_PRMT1_OFFSET (AcpiParamBufferAddress), "ACPI Parameter Address", 0}, ACPI_DMT_NEW_LINE, ACPI_DMT_TERMINATOR diff --git a/source/common/dmtbinfo3.c b/source/common/dmtbinfo3.c index fa698d2f4..280baf396 100644 --- a/source/common/dmtbinfo3.c +++ b/source/common/dmtbinfo3.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -192,6 +192,23 @@ /******************************************************************************* * + * CCEL - CC-Event Log Table + * + ******************************************************************************/ + +ACPI_DMTABLE_INFO AcpiDmTableInfoCcel[] = +{ + {ACPI_DMT_UINT8, ACPI_CCEL_OFFSET (CCType), "CC Type", 0}, + {ACPI_DMT_UINT8, ACPI_CCEL_OFFSET (CCSubType), "CC Sub Type", 0}, + {ACPI_DMT_UINT32, ACPI_CCEL_OFFSET (Reserved), "Reserved", 0}, + {ACPI_DMT_UINT64, ACPI_CCEL_OFFSET (LogAreaMinimumLength), "Log Area Minimum Length", 0}, + {ACPI_DMT_UINT64, ACPI_CCEL_OFFSET (LogAreaStartAddress), "Log Area Start Address", 0}, + ACPI_DMT_TERMINATOR +}; + + +/******************************************************************************* + * * SLIC - Software Licensing Description Table. This table contains the standard * ACPI header followed by proprietary data structures * diff --git a/source/common/getopt.c b/source/common/getopt.c index 772b66c0d..a2658efc2 100644 --- a/source/common/getopt.c +++ b/source/common/getopt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslallocate.c b/source/compiler/aslallocate.c index d697d059e..97b7e2311 100644 --- a/source/compiler/aslallocate.c +++ b/source/compiler/aslallocate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslanalyze.c b/source/compiler/aslanalyze.c index 9db7d4fbe..1941a4655 100644 --- a/source/compiler/aslanalyze.c +++ b/source/compiler/aslanalyze.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslascii.c b/source/compiler/aslascii.c index 6c0e62c41..b6b272710 100644 --- a/source/compiler/aslascii.c +++ b/source/compiler/aslascii.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslbtypes.c b/source/compiler/aslbtypes.c index f7b3fb1be..53d6823fb 100644 --- a/source/compiler/aslbtypes.c +++ b/source/compiler/aslbtypes.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslcache.c b/source/compiler/aslcache.c index 9cc707e20..11ba5f42a 100644 --- a/source/compiler/aslcache.c +++ b/source/compiler/aslcache.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslcodegen.c b/source/compiler/aslcodegen.c index 6ae3a0aa2..4013398fa 100644 --- a/source/compiler/aslcodegen.c +++ b/source/compiler/aslcodegen.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -153,6 +153,7 @@ #include "aslcompiler.y.h" #include "amlcode.h" #include "acconvert.h" +#include "actbinfo.h" #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("aslcodegen") @@ -181,6 +182,10 @@ static void CgUpdateHeader ( ACPI_PARSE_OBJECT *Op); +static void +CgUpdateCdatHeader ( + ACPI_PARSE_OBJECT *Op); + /******************************************************************************* * @@ -207,7 +212,14 @@ CgGenerateAmlOutput ( CgAmlWriteWalk, NULL, NULL); DbgPrint (ASL_TREE_OUTPUT, ASL_PARSE_TREE_HEADER2); - CgUpdateHeader (AslGbl_CurrentDB); + if (AcpiGbl_CDAT) + { + CgUpdateCdatHeader (AslGbl_CurrentDB); + } + else + { + CgUpdateHeader (AslGbl_CurrentDB); + } } @@ -658,6 +670,67 @@ CgWriteTableHeader ( /******************************************************************************* * + * FUNCTION: CgUpdateCdatHeader + * + * PARAMETERS: Op - Op for the Definition Block + * + * RETURN: None. + * + * DESCRIPTION: Complete the ACPI table by calculating the checksum and + * re-writing the header for the input definition block + * + ******************************************************************************/ + +static void +CgUpdateCdatHeader ( + ACPI_PARSE_OBJECT *Op) +{ + signed char Sum; + UINT32 i; + UINT32 Length; + UINT8 FileByte; + UINT8 Checksum; + + + /* Calculate the checksum over the entire definition block */ + + Sum = 0; + Length = sizeof (ACPI_TABLE_CDAT) + Op->Asl.AmlSubtreeLength; + FlSeekFile (ASL_FILE_AML_OUTPUT, Op->Asl.FinalAmlOffset); + + for (i = 0; i < Length; i++) + { + if (FlReadFile (ASL_FILE_AML_OUTPUT, &FileByte, 1) != AE_OK) + { + AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, NULL, + "Table length is greater than size of the input file"); + return; + } + + Sum = (signed char) (Sum + FileByte); + } + + Checksum = (UINT8) (0 - Sum); + + DbgPrint (ASL_DEBUG_OUTPUT, "Computed checksum = %X\n", Checksum); + + /* Re-write the checksum byte */ + + FlSeekFile (ASL_FILE_AML_OUTPUT, Op->Asl.FinalAmlOffset + + ACPI_CDAT_OFFSET (Checksum)); + + FlWriteFile (ASL_FILE_AML_OUTPUT, &Checksum, 1); + + /* + * Seek to the end of the file. This is done to support multiple file + * compilation. Doing this simplifies other parts of the codebase because + * it eliminates the need to seek for a different starting place. + */ + FlSeekFile (ASL_FILE_AML_OUTPUT, Op->Asl.FinalAmlOffset + Length); +} + +/******************************************************************************* + * * FUNCTION: CgUpdateHeader * * PARAMETERS: Op - Op for the Definition Block diff --git a/source/compiler/aslcompile.c b/source/compiler/aslcompile.c index c17e219c1..4217182c6 100644 --- a/source/compiler/aslcompile.c +++ b/source/compiler/aslcompile.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -241,7 +241,7 @@ CmDoCompile ( if (AslGbl_SyntaxError) { - fprintf (stderr, + AslError (ASL_ERROR, ASL_MSG_SYNTAX, NULL, "Compiler aborting due to parser-detected syntax error(s)\n"); /* Flag this error in the FileNode for compilation summary */ @@ -250,6 +250,8 @@ CmDoCompile ( FileNode->ParserErrorDetected = TRUE; AslGbl_ParserErrorDetected = TRUE; LsDumpParseTree (); + AePrintErrorLog(ASL_FILE_STDERR); + goto ErrorExit; } @@ -267,6 +269,8 @@ CmDoCompile ( goto ErrorExit; } + AePrintErrorLog(ASL_FILE_STDERR); + /* Flush out any remaining source after parse tree is complete */ Event = UtBeginEvent ("Flush source input"); @@ -283,10 +287,13 @@ CmDoCompile ( LsDumpParseTree (); + AslGbl_ParserErrorDetected = FALSE; + AslGbl_SyntaxError = FALSE; UtEndEvent (Event); UtEndEvent (FullCompile); - return (AE_OK); + AslGbl_ParserErrorDetected = FALSE; + AslGbl_SyntaxError = FALSE; ErrorExit: UtEndEvent (FullCompile); return (AE_ERROR); @@ -919,7 +926,6 @@ CmCleanupAndExit ( ASL_MAX_ERROR_COUNT); } - AslGbl_ExceptionCount[ASL_ERROR] = 0; UtDisplaySummary (ASL_FILE_STDOUT); /* diff --git a/source/compiler/aslcompiler.h b/source/compiler/aslcompiler.h index d52f60f21..e205696c8 100644 --- a/source/compiler/aslcompiler.h +++ b/source/compiler/aslcompiler.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslcompiler.l b/source/compiler/aslcompiler.l index 881096ad5..8b79b61ac 100644 --- a/source/compiler/aslcompiler.l +++ b/source/compiler/aslcompiler.l @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslcstyle.y b/source/compiler/aslcstyle.y index b4e9065fe..d249b51e8 100644 --- a/source/compiler/aslcstyle.y +++ b/source/compiler/aslcstyle.y @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/asldebug.c b/source/compiler/asldebug.c index 5ac6a4ed6..928bb206d 100644 --- a/source/compiler/asldebug.c +++ b/source/compiler/asldebug.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/asldefine.h b/source/compiler/asldefine.h index 12b2899e4..fe11d4517 100644 --- a/source/compiler/asldefine.h +++ b/source/compiler/asldefine.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslerror.c b/source/compiler/aslerror.c index a0ebe7b34..54d247e29 100644 --- a/source/compiler/aslerror.c +++ b/source/compiler/aslerror.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -1033,7 +1033,6 @@ AslLogNewError ( exit(1); } - AslGbl_ExceptionCount[ASL_ERROR] = 0; return; } diff --git a/source/compiler/aslexternal.c b/source/compiler/aslexternal.c index a7d2c9c3d..243145ed4 100644 --- a/source/compiler/aslexternal.c +++ b/source/compiler/aslexternal.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslfileio.c b/source/compiler/aslfileio.c index 88b9def90..7920de7f1 100644 --- a/source/compiler/aslfileio.c +++ b/source/compiler/aslfileio.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslfiles.c b/source/compiler/aslfiles.c index 2479b404e..51de2d1e2 100644 --- a/source/compiler/aslfiles.c +++ b/source/compiler/aslfiles.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslfold.c b/source/compiler/aslfold.c index 316890c4a..f03d19c51 100644 --- a/source/compiler/aslfold.c +++ b/source/compiler/aslfold.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslglobal.h b/source/compiler/aslglobal.h index ff00b92ef..438d0c5bc 100644 --- a/source/compiler/aslglobal.h +++ b/source/compiler/aslglobal.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslhelp.c b/source/compiler/aslhelp.c index d83d41e3d..137736da7 100644 --- a/source/compiler/aslhelp.c +++ b/source/compiler/aslhelp.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -262,6 +262,7 @@ Usage ( 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 ("-ds <signature(4)>", "Specify a table signature(4) (CDAT table only)"); ACPI_OPTION ("-e <f1 f2 ...>", "Include ACPI table(s) for external symbol resolution"); ACPI_OPTION ("-fe <file>", "Specify external symbol declaration file"); ACPI_OPTION ("-in", "Ignore NoOp opcodes"); diff --git a/source/compiler/aslhelpers.y b/source/compiler/aslhelpers.y index 2764bf65b..37cc5844c 100644 --- a/source/compiler/aslhelpers.y +++ b/source/compiler/aslhelpers.y @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslhex.c b/source/compiler/aslhex.c index a6e80fdf5..4a7118230 100644 --- a/source/compiler/aslhex.c +++ b/source/compiler/aslhex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslkeywords.y b/source/compiler/aslkeywords.y index 661cfc939..c6bb19c75 100644 --- a/source/compiler/aslkeywords.y +++ b/source/compiler/aslkeywords.y @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/asllength.c b/source/compiler/asllength.c index b1c062464..f55443537 100644 --- a/source/compiler/asllength.c +++ b/source/compiler/asllength.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/asllisting.c b/source/compiler/asllisting.c index 290d50621..1dd3b39bd 100644 --- a/source/compiler/asllisting.c +++ b/source/compiler/asllisting.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/asllistsup.c b/source/compiler/asllistsup.c index b03560d36..44a87f0a1 100644 --- a/source/compiler/asllistsup.c +++ b/source/compiler/asllistsup.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslload.c b/source/compiler/aslload.c index 3f827d0ba..3e35d6aa7 100644 --- a/source/compiler/aslload.c +++ b/source/compiler/aslload.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/asllookup.c b/source/compiler/asllookup.c index 44bf9a386..ae0729bb5 100644 --- a/source/compiler/asllookup.c +++ b/source/compiler/asllookup.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslmain.c b/source/compiler/aslmain.c index 3c2ce58ea..5b8f54e2b 100644 --- a/source/compiler/aslmain.c +++ b/source/compiler/aslmain.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslmap.c b/source/compiler/aslmap.c index 782d0d96c..c2d35cb6f 100644 --- a/source/compiler/aslmap.c +++ b/source/compiler/aslmap.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslmapenter.c b/source/compiler/aslmapenter.c index 5dae3e9ea..b167fb4e9 100644 --- a/source/compiler/aslmapenter.c +++ b/source/compiler/aslmapenter.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslmapoutput.c b/source/compiler/aslmapoutput.c index 95146ea65..74540f05d 100644 --- a/source/compiler/aslmapoutput.c +++ b/source/compiler/aslmapoutput.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslmaputils.c b/source/compiler/aslmaputils.c index 0b2c7e261..48b676003 100644 --- a/source/compiler/aslmaputils.c +++ b/source/compiler/aslmaputils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslmessages.c b/source/compiler/aslmessages.c index 990e376f7..fe697c854 100644 --- a/source/compiler/aslmessages.c +++ b/source/compiler/aslmessages.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslmessages.h b/source/compiler/aslmessages.h index 197e9e227..3346c5e01 100644 --- a/source/compiler/aslmessages.h +++ b/source/compiler/aslmessages.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslmethod.c b/source/compiler/aslmethod.c index 517ba778c..f092a296a 100644 --- a/source/compiler/aslmethod.c +++ b/source/compiler/aslmethod.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslnamesp.c b/source/compiler/aslnamesp.c index 60c488db0..a3578d3e8 100644 --- a/source/compiler/aslnamesp.c +++ b/source/compiler/aslnamesp.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/asloffset.c b/source/compiler/asloffset.c index b0954c701..874e6e59d 100644 --- a/source/compiler/asloffset.c +++ b/source/compiler/asloffset.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslopcodes.c b/source/compiler/aslopcodes.c index e07910b1f..f6c993e6d 100644 --- a/source/compiler/aslopcodes.c +++ b/source/compiler/aslopcodes.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/asloperands.c b/source/compiler/asloperands.c index 9330fdfb4..2c3c6fa96 100644 --- a/source/compiler/asloperands.c +++ b/source/compiler/asloperands.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslopt.c b/source/compiler/aslopt.c index 916aebfba..c81e27b2a 100644 --- a/source/compiler/aslopt.c +++ b/source/compiler/aslopt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/asloptions.c b/source/compiler/asloptions.c index 2808650e3..ca894a3b7 100644 --- a/source/compiler/asloptions.c +++ b/source/compiler/asloptions.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -152,6 +152,7 @@ #include "aslcompiler.h" #include "acapps.h" #include "acdisasm.h" +#include "acglobal.h" #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("asloption") @@ -176,7 +177,7 @@ AslDoResponseFile ( #define ASL_TOKEN_SEPARATORS " \t\n" -#define ASL_SUPPORTED_OPTIONS "@:a:b|c|d^D:e:f^gh^i|I:l^m:no|p:P^q^r:s|t|T+G^v^w|x:z" +#define ASL_SUPPORTED_OPTIONS "@:a:b|c|d^D:e:f^gh^i|I:l^m:no|p:P^q^r:s|:t|T+G^v^w|x:z" /******************************************************************************* @@ -270,7 +271,7 @@ AslDoOptions ( BOOLEAN IsResponseFile) { ACPI_STATUS Status; - UINT32 j; + INT32 j; /* Get the command line options */ @@ -366,7 +367,6 @@ AslDoOptions ( { return (-1); } - AslGbl_PruneType = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0); break; @@ -445,6 +445,28 @@ AslDoOptions ( AcpiGbl_CstyleDisassembly = FALSE; break; + case 's': /* Specify table signature (Only supported for CDAT table) */ + + /* Get the required argument */ + + if (AcpiGetoptArgument (argc, argv)) + { + return (-1); + } + + /* Check for exact string "CDAT" (upper or lower case) */ + + AcpiGbl_CDAT = ACPI_CAST_PTR (char, &AcpiGbl_Optarg); + if (AcpiUtStricmp (AcpiGbl_Optarg, ACPI_SIG_CDAT)) + { + printf ("\nUnknown table signature: %s\n", AcpiGbl_Optarg); + return (-1); + } + + AcpiGbl_CDAT = malloc (5); + AcpiUtSafeStrncpy ((char *) AcpiGbl_CDAT, ACPI_SIG_CDAT, 5); + break; + default: printf ("Unknown option: -d%s\n", AcpiGbl_Optarg); @@ -837,7 +859,7 @@ AslDoOptions ( AslGbl_HexOutputFlag = HEX_OUTPUT_C; break; - case 'p': /* data table flex/bison prototype */ + case 'p': /* data table flex/bison prototype */ AslGbl_DtLexBisonPrototype = TRUE; break; diff --git a/source/compiler/aslparseop.c b/source/compiler/aslparseop.c index ab81ac286..a529d952d 100644 --- a/source/compiler/aslparseop.c +++ b/source/compiler/aslparseop.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslparser.y b/source/compiler/aslparser.y index dff156192..7e7ea9679 100644 --- a/source/compiler/aslparser.y +++ b/source/compiler/aslparser.y @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslpld.c b/source/compiler/aslpld.c index 9faa8c263..eedfaa246 100644 --- a/source/compiler/aslpld.c +++ b/source/compiler/aslpld.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslpredef.c b/source/compiler/aslpredef.c index c52295ee8..925329978 100644 --- a/source/compiler/aslpredef.c +++ b/source/compiler/aslpredef.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -563,7 +563,7 @@ ApCheckForPredefinedName ( if (Name[0] == 0) { AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, Op, - "zero length name found"); + "Zero length name found"); } /* All reserved names are prefixed with a single underscore */ diff --git a/source/compiler/aslprepkg.c b/source/compiler/aslprepkg.c index f562dbe6b..21fe2db7a 100644 --- a/source/compiler/aslprepkg.c +++ b/source/compiler/aslprepkg.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslprimaries.y b/source/compiler/aslprimaries.y index 69565defe..f70597163 100644 --- a/source/compiler/aslprimaries.y +++ b/source/compiler/aslprimaries.y @@ -11,7 +11,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslprintf.c b/source/compiler/aslprintf.c index 3f270fec9..b2da0035f 100644 --- a/source/compiler/aslprintf.c +++ b/source/compiler/aslprintf.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslprune.c b/source/compiler/aslprune.c index 4626a1eef..dc1162c45 100644 --- a/source/compiler/aslprune.c +++ b/source/compiler/aslprune.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslresource.c b/source/compiler/aslresource.c index 104a48357..2f0127a11 100644 --- a/source/compiler/aslresource.c +++ b/source/compiler/aslresource.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslresources.y b/source/compiler/aslresources.y index a5752b01c..38f744a06 100644 --- a/source/compiler/aslresources.y +++ b/source/compiler/aslresources.y @@ -11,7 +11,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslrestype1.c b/source/compiler/aslrestype1.c index a6625c08c..53fa8621b 100644 --- a/source/compiler/aslrestype1.c +++ b/source/compiler/aslrestype1.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslrestype1i.c b/source/compiler/aslrestype1i.c index 84d5b653f..d352e65f4 100644 --- a/source/compiler/aslrestype1i.c +++ b/source/compiler/aslrestype1i.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslrestype2.c b/source/compiler/aslrestype2.c index 387e85c80..6a1c1cbed 100644 --- a/source/compiler/aslrestype2.c +++ b/source/compiler/aslrestype2.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslrestype2d.c b/source/compiler/aslrestype2d.c index 6b597e257..45013c2c7 100644 --- a/source/compiler/aslrestype2d.c +++ b/source/compiler/aslrestype2d.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslrestype2e.c b/source/compiler/aslrestype2e.c index 414b2d23f..c557f4020 100644 --- a/source/compiler/aslrestype2e.c +++ b/source/compiler/aslrestype2e.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslrestype2q.c b/source/compiler/aslrestype2q.c index ce7965972..62866594e 100644 --- a/source/compiler/aslrestype2q.c +++ b/source/compiler/aslrestype2q.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslrestype2s.c b/source/compiler/aslrestype2s.c index ea832da3d..6c904d031 100644 --- a/source/compiler/aslrestype2s.c +++ b/source/compiler/aslrestype2s.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslrestype2w.c b/source/compiler/aslrestype2w.c index a758e0581..9908494d3 100644 --- a/source/compiler/aslrestype2w.c +++ b/source/compiler/aslrestype2w.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslrules.y b/source/compiler/aslrules.y index 79aa2210a..2793749bc 100644 --- a/source/compiler/aslrules.y +++ b/source/compiler/aslrules.y @@ -11,7 +11,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslstartup.c b/source/compiler/aslstartup.c index 45462adf9..8b4e5c7cd 100644 --- a/source/compiler/aslstartup.c +++ b/source/compiler/aslstartup.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -317,7 +317,7 @@ AslDetectSourceFileType ( else { fprintf (stderr, - "Binary file does not contain a valid ACPI table\n"); + "Binary file does not contain a valid standard ACPI table\n"); } Type = ASL_INPUT_TYPE_BINARY; diff --git a/source/compiler/aslstubs.c b/source/compiler/aslstubs.c index 0e6cd56f4..e90115b8c 100644 --- a/source/compiler/aslstubs.c +++ b/source/compiler/aslstubs.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslsupport.l b/source/compiler/aslsupport.l index 0daec602e..8d589a949 100644 --- a/source/compiler/aslsupport.l +++ b/source/compiler/aslsupport.l @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -195,7 +195,7 @@ AslParserCleanup ( * * DESCRIPTION: Handle #line directives emitted by the preprocessor. * - * The #line directive is emitted by the preprocesser, and is used to + * The #line directive is emitted by the preprocessor, and is used to * pass through line numbers from the original source code file to the * preprocessor output file (.i). This allows any compiler-generated * error messages to be displayed with the correct line number. diff --git a/source/compiler/aslsupport.y b/source/compiler/aslsupport.y index 3f19af2f4..f74206728 100644 --- a/source/compiler/aslsupport.y +++ b/source/compiler/aslsupport.y @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/asltokens.y b/source/compiler/asltokens.y index c43561e7a..dfd0d1659 100644 --- a/source/compiler/asltokens.y +++ b/source/compiler/asltokens.y @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/asltransform.c b/source/compiler/asltransform.c index 573ddad15..d1fcbed27 100644 --- a/source/compiler/asltransform.c +++ b/source/compiler/asltransform.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/asltree.c b/source/compiler/asltree.c index 9cf49269f..d1a8837f3 100644 --- a/source/compiler/asltree.c +++ b/source/compiler/asltree.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/asltypes.h b/source/compiler/asltypes.h index d5689dea5..30cd7b789 100644 --- a/source/compiler/asltypes.h +++ b/source/compiler/asltypes.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/asltypes.y b/source/compiler/asltypes.y index ba98362cd..bb0f0e9b4 100644 --- a/source/compiler/asltypes.y +++ b/source/compiler/asltypes.y @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslutils.c b/source/compiler/aslutils.c index e91fd4602..86b040b98 100644 --- a/source/compiler/aslutils.c +++ b/source/compiler/aslutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -610,7 +610,7 @@ UtSetParseOpName ( * * FUNCTION: UtDisplayOneSummary * - * PARAMETERS: FileID - ID of outpout file + * PARAMETERS: FileID - ID of output file * * RETURN: None * @@ -733,7 +733,7 @@ UtDisplayOneSummary ( * * FUNCTION: UtDisplayErrorSummary * - * PARAMETERS: FileID - ID of outpout file + * PARAMETERS: FileID - ID of output file * * RETURN: None * @@ -800,7 +800,7 @@ UtDisplayErrorSummary ( * * FUNCTION: UtDisplaySummary * - * PARAMETERS: FileID - ID of outpout file + * PARAMETERS: FileID - ID of output file * * RETURN: None * diff --git a/source/compiler/asluuid.c b/source/compiler/asluuid.c index 0eb36050e..fbbf644af 100644 --- a/source/compiler/asluuid.c +++ b/source/compiler/asluuid.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslwalks.c b/source/compiler/aslwalks.c index 6e32f0818..0f7bc94f2 100644 --- a/source/compiler/aslwalks.c +++ b/source/compiler/aslwalks.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslxref.c b/source/compiler/aslxref.c index 3a00f5a92..0e1034ba7 100644 --- a/source/compiler/aslxref.c +++ b/source/compiler/aslxref.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/aslxrefout.c b/source/compiler/aslxrefout.c index dd3fe80c2..04471c635 100644 --- a/source/compiler/aslxrefout.c +++ b/source/compiler/aslxrefout.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/cvcompiler.c b/source/compiler/cvcompiler.c index b51a688b3..6689ca895 100644 --- a/source/compiler/cvcompiler.c +++ b/source/compiler/cvcompiler.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/cvdisasm.c b/source/compiler/cvdisasm.c index 250c009ac..7561e902f 100644 --- a/source/compiler/cvdisasm.c +++ b/source/compiler/cvdisasm.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/cvparser.c b/source/compiler/cvparser.c index 66b04e9a8..574cbe8d9 100644 --- a/source/compiler/cvparser.c +++ b/source/compiler/cvparser.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/dtcompile.c b/source/compiler/dtcompile.c index 89eb937d5..afb4e3427 100644 --- a/source/compiler/dtcompile.c +++ b/source/compiler/dtcompile.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -452,6 +452,48 @@ DtCompileDataTable ( } /* + * If the first field is named "CDAT Table Length" (not "Signature"), + * assume that we have a CDAT table (whose table header does not have + * a signature). Instead, the TableLength field is where the + * signature would (normally) be. + */ + else if (!strcmp ((*FieldList)->Name, "CDAT Table Length")) + { + /* No longer true: (However, use this technique in the disassembler) + * We are assuming that there + * should be at least one non-ASCII byte in the 4-character + * Signature field, (At least the high-order byte should be zero). + */ + Status = DtCompileTable (FieldList, AcpiDmTableInfoCdatTableHdr, + &AslGbl_RootTable); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + /* Compile the CDAT */ + + DtPushSubtable (AslGbl_RootTable); + Status = DtCompileCdat ((void **) FieldList); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + /* + * Set the overall table length and the table checksum. + * The entire compiled table (including the CDAT table header with + * the table length and checksum) is in AslGbl_RootTable->Buffer. + */ + DtSetTableLength (); + DtSetTableChecksum (&ACPI_CAST_PTR (ACPI_TABLE_CDAT, AslGbl_RootTable->Buffer)->Checksum); + + DtDumpFieldList (RootField); + DtDumpSubtableList (); + return (AE_OK); + } + + /* * All other tables must use the common ACPI table header. Insert the * current iASL IDs (name, version), and compile the header now. */ diff --git a/source/compiler/dtcompiler.h b/source/compiler/dtcompiler.h index 3b3683cc6..9447ae1c9 100644 --- a/source/compiler/dtcompiler.h +++ b/source/compiler/dtcompiler.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -578,7 +578,7 @@ DtCompileAsf ( void **PFieldList); ACPI_STATUS -DtCompileCpep ( +DtCompileCdat ( void **PFieldList); ACPI_STATUS @@ -586,6 +586,10 @@ DtCompileCedt ( void **PFieldList); ACPI_STATUS +DtCompileCpep ( + void **PFieldList); + +ACPI_STATUS DtCompileCsrt ( void **PFieldList); @@ -650,6 +654,10 @@ DtCompileMcfg ( void **PFieldList); ACPI_STATUS +DtCompileMpam ( + void **PFieldList); + +ACPI_STATUS DtCompileMpst ( void **PFieldList); @@ -773,6 +781,8 @@ extern const unsigned char TemplateBoot[]; extern const unsigned char TemplateBdat[]; extern const unsigned char TemplateBert[]; extern const unsigned char TemplateBgrt[]; +extern const unsigned char TemplateCcel[]; +extern const unsigned char TemplateCdat[]; extern const unsigned char TemplateCedt[]; extern const unsigned char TemplateCpep[]; extern const unsigned char TemplateCsrt[]; @@ -795,6 +805,7 @@ extern const unsigned char TemplateLpit[]; extern const unsigned char TemplateMadt[]; extern const unsigned char TemplateMcfg[]; extern const unsigned char TemplateMchi[]; +extern const unsigned char TemplateMpam[]; extern const unsigned char TemplateMpst[]; extern const unsigned char TemplateMsct[]; extern const unsigned char TemplateMsdm[]; diff --git a/source/compiler/dtcompilerparser.l b/source/compiler/dtcompilerparser.l index a00ef56e2..a4ff02a08 100644 --- a/source/compiler/dtcompilerparser.l +++ b/source/compiler/dtcompilerparser.l @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/dtcompilerparser.y b/source/compiler/dtcompilerparser.y index 30ead3afa..f03615ff1 100644 --- a/source/compiler/dtcompilerparser.y +++ b/source/compiler/dtcompilerparser.y @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/dtexpress.c b/source/compiler/dtexpress.c index fd292d8fe..462a7acb5 100644 --- a/source/compiler/dtexpress.c +++ b/source/compiler/dtexpress.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/dtfield.c b/source/compiler/dtfield.c index f93163195..32b5dba09 100644 --- a/source/compiler/dtfield.c +++ b/source/compiler/dtfield.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/dtio.c b/source/compiler/dtio.c index 1a00424c6..7d7fb2b45 100644 --- a/source/compiler/dtio.c +++ b/source/compiler/dtio.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -952,7 +952,7 @@ DtDumpBuffer ( UINT8 BufChar; - FlPrintFile (FileId, "Output: [%3.3Xh %4.4d %3d] ", + FlPrintFile (FileId, "Output: [%3.3Xh %4.4d %3.3Xh] ", Offset, Offset, Length); i = 0; diff --git a/source/compiler/dtparser.l b/source/compiler/dtparser.l index b7cb26e2b..0c003ecac 100644 --- a/source/compiler/dtparser.l +++ b/source/compiler/dtparser.l @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/dtparser.y b/source/compiler/dtparser.y index fc8275cc2..df804c916 100644 --- a/source/compiler/dtparser.y +++ b/source/compiler/dtparser.y @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/dtsubtable.c b/source/compiler/dtsubtable.c index 3c2798b64..0bbaa81ca 100644 --- a/source/compiler/dtsubtable.c +++ b/source/compiler/dtsubtable.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/dttable.c b/source/compiler/dttable.c index dfc34c134..1cbd4619a 100644 --- a/source/compiler/dttable.c +++ b/source/compiler/dttable.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/dttable1.c b/source/compiler/dttable1.c index 9ac043506..cf7c35eed 100644 --- a/source/compiler/dttable1.c +++ b/source/compiler/dttable1.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -657,6 +657,133 @@ DtCompileAsf ( /****************************************************************************** * + * FUNCTION: DtCompileCdat + * + * PARAMETERS: List - Current field list pointer + * + * RETURN: Status + * + * DESCRIPTION: Compile CDAT. + * + *****************************************************************************/ + +ACPI_STATUS +DtCompileCdat ( + void **List) +{ + ACPI_STATUS Status = AE_OK; + DT_SUBTABLE *Subtable; + DT_SUBTABLE *ParentTable; + DT_FIELD **PFieldList = (DT_FIELD **) List; + ACPI_CDAT_HEADER *CdatHeader; + ACPI_DMTABLE_INFO *InfoTable = NULL; + DT_FIELD *SubtableStart; + + + /* Walk the parse tree. + * + * Note: Main table consists of only the CDAT table header + * (This is not the standard ACPI table header, however)-- + * Followed by some number of subtables. + */ + while (*PFieldList) + { + SubtableStart = *PFieldList; + + /* Compile the expected CDAT Subtable header */ + + Status = DtCompileTable (PFieldList, AcpiDmTableInfoCdatHeader, + &Subtable); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + ParentTable = DtPeekSubtable (); + DtInsertSubtable (ParentTable, Subtable); + DtPushSubtable (Subtable); + + CdatHeader = ACPI_CAST_PTR (ACPI_CDAT_HEADER, Subtable->Buffer); + + /* Decode the subtable by type */ + + switch (CdatHeader->Type) + { + case ACPI_CDAT_TYPE_DSMAS: + InfoTable = AcpiDmTableInfoCdat0; + break; + + case ACPI_CDAT_TYPE_DSLBIS: + InfoTable = AcpiDmTableInfoCdat1; + break; + + case ACPI_CDAT_TYPE_DSMSCIS: + InfoTable = AcpiDmTableInfoCdat2; + break; + + case ACPI_CDAT_TYPE_DSIS: + InfoTable = AcpiDmTableInfoCdat3; + break; + + case ACPI_CDAT_TYPE_DSEMTS: + InfoTable = AcpiDmTableInfoCdat4; + break; + + case ACPI_CDAT_TYPE_SSLBIS: + InfoTable = AcpiDmTableInfoCdat5; + break; + + default: + DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "CDAT"); + } + + /* Compile the CDAT subtable */ + + Status = DtCompileTable (PFieldList, InfoTable, &Subtable); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + ParentTable = DtPeekSubtable (); + DtInsertSubtable (ParentTable, Subtable); + + switch (CdatHeader->Type) + { + /* Multiple entries supported for this type */ + + case ACPI_CDAT_TYPE_SSLBIS: + + /* + * Check for multiple SSLBEs + */ + while (*PFieldList && !AcpiUtStricmp ((*PFieldList)->Name, "Port X ID")) + { + Status = DtCompileTable (PFieldList, AcpiDmTableInfoCdatEntries, &Subtable); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + ParentTable = DtPeekSubtable (); + DtInsertSubtable (ParentTable, Subtable); + } + break; + + default: + break; + } + + /* Pop off the CDAT Subtable header subtree */ + + DtPopSubtable (); + } + + return (AE_OK); +} + + +/****************************************************************************** + * * FUNCTION: DtCompileCedt * * PARAMETERS: List - Current field list pointer @@ -1882,7 +2009,7 @@ DtCompileHmat ( DtInsertSubtable (ParentTable, Subtable); HmatStruct->Length += Subtable->Length; - /* Compile HMAT structure additionals */ + /* Compile HMAT structure additional */ switch (HmatStruct->Type) { @@ -2592,7 +2719,6 @@ DtCompileIvrs ( DtInsertSubtable (MainSubtable, Subtable); DtPushSubtable (Subtable); - ParentTable = MainSubtable; break; case ACPI_IVRS_TYPE_HID: diff --git a/source/compiler/dttable2.c b/source/compiler/dttable2.c index 1798a963e..9a9a39192 100644 --- a/source/compiler/dttable2.c +++ b/source/compiler/dttable2.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -425,6 +425,163 @@ DtCompileMcfg ( return (Status); } +/****************************************************************************** + * + * FUNCTION: DtCompileMpam + * + * PARAMETERS: List - Current field list pointer + * + * RETURN: Status + * + * DESCRIPTION: Compile MPAM. + * + *****************************************************************************/ + +ACPI_STATUS +DtCompileMpam ( + void **List) +{ + ACPI_STATUS Status; + DT_SUBTABLE *ParentTable; + DT_SUBTABLE *Subtable; + DT_FIELD *SubtableStart; + DT_FIELD **PFieldList = (DT_FIELD **) List; + ACPI_MPAM_MSC_NODE *MpamMscNode; + ACPI_MPAM_RESOURCE_NODE *MpamResourceNode; + UINT32 FuncDepsCount; + UINT32 RisLength; + ACPI_DMTABLE_INFO *InfoTable; + + ParentTable = DtPeekSubtable (); + + while (*PFieldList) + { + SubtableStart = *PFieldList; + + /* Main MSC Node table */ + Status = DtCompileTable (PFieldList, AcpiDmTableInfoMpam0, + &Subtable); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + MpamMscNode = ACPI_CAST_PTR (ACPI_MPAM_MSC_NODE, Subtable->Buffer); + + ParentTable = DtPeekSubtable (); + DtInsertSubtable (ParentTable, Subtable); + DtPushSubtable (Subtable); + + ParentTable = DtPeekSubtable (); + + /* + * RIS(es) per MSC node have variable lengths depending on how many RISes there and + * any how many functional dependencies per RIS. Calculate it in order + * to properly set the overall MSC length. + */ + RisLength = 0; + + /* Iterate over RIS subtables per MSC node */ + for (int ris = 0; ris < MpamMscNode->NumResouceNodes; ris++) + { + /* Compile RIS subtable */ + Status = DtCompileTable (PFieldList, AcpiDmTableInfoMpam1, + &Subtable); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + MpamResourceNode = ACPI_CAST_PTR (ACPI_MPAM_RESOURCE_NODE, Subtable->Buffer); + DtInsertSubtable (ParentTable, Subtable); + DtPushSubtable (Subtable); + + ParentTable = DtPeekSubtable (); + + switch (MpamResourceNode->LocatorType) + { + case ACPI_MPAM_LOCATION_TYPE_PROCESSOR_CACHE: + InfoTable = AcpiDmTableInfoMpam1A; + break; + case ACPI_MPAM_LOCATION_TYPE_MEMORY: + InfoTable = AcpiDmTableInfoMpam1B; + break; + case ACPI_MPAM_LOCATION_TYPE_SMMU: + InfoTable = AcpiDmTableInfoMpam1C; + break; + case ACPI_MPAM_LOCATION_TYPE_MEMORY_CACHE: + InfoTable = AcpiDmTableInfoMpam1D; + break; + case ACPI_MPAM_LOCATION_TYPE_ACPI_DEVICE: + InfoTable = AcpiDmTableInfoMpam1E; + break; + case ACPI_MPAM_LOCATION_TYPE_INTERCONNECT: + InfoTable = AcpiDmTableInfoMpam1F; + break; + case ACPI_MPAM_LOCATION_TYPE_UNKNOWN: + InfoTable = AcpiDmTableInfoMpam1G; + default: + DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "Resource Locator Type"); + return (AE_ERROR); + } + + /* Compile Resource Locator Table */ + Status = DtCompileTable (PFieldList, InfoTable, + &Subtable); + + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + DtInsertSubtable (ParentTable, Subtable); + + /* Compile the number of functional dependencies per RIS */ + Status = DtCompileTable (PFieldList, AcpiDmTableInfoMpam1Deps, + &Subtable); + + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + DtInsertSubtable (ParentTable, Subtable); + FuncDepsCount = *ACPI_CAST_PTR (UINT32, Subtable->Buffer); + + RisLength += sizeof(ACPI_MPAM_RESOURCE_NODE) + + FuncDepsCount * sizeof(ACPI_MPAM_FUNC_DEPS); + + /* Iterate over functional dependencies per RIS */ + for (int funcDep = 0; funcDep < FuncDepsCount; funcDep++) + { + /* Compiler functional dependencies table */ + Status = DtCompileTable (PFieldList, AcpiDmTableInfoMpam2, + &Subtable); + + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + DtInsertSubtable (ParentTable, Subtable); + } + + DtPopSubtable (); + } + + /* Check if the length of the MSC is correct and override with the correct length */ + if (MpamMscNode->Length != sizeof(ACPI_MPAM_MSC_NODE) + RisLength) + { + MpamMscNode->Length = sizeof(ACPI_MPAM_MSC_NODE) + RisLength; + DbgPrint (ASL_DEBUG_OUTPUT, "Overriding MSC->Length: %X\n", MpamMscNode->Length); + } + + DtPopSubtable (); + } + + return (AE_OK); +} + /****************************************************************************** * @@ -825,6 +982,7 @@ DtCompileNhlt ( ACPI_NHLT_FORMATS_CONFIG *FormatsConfig; ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_D *ConfigSpecific; ACPI_NHLT_DEVICE_INFO_COUNT *DeviceInfo; + ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B *Terminator; /* Main table */ @@ -1085,10 +1243,10 @@ DtCompileNhlt ( /* * If we are not done with the current Endpoint yet, then there must be - * some non documeneted structure(s) yet to be processed. First, get + * some non documented structure(s) yet to be processed. First, get * the count of such structure(s). */ - if (*PFieldList && (strcmp ((const char *) (*PFieldList)->Name, "Descriptor Length"))) + if (*PFieldList && !(strcmp ((const char *) (*PFieldList)->Name, "Device Info struct count"))) { /* Get the count of non documented structures */ @@ -1124,9 +1282,8 @@ DtCompileNhlt ( DtInsertSubtable (ParentTable, Subtable); } /* for (j = 0; j < LinuxSpecificCount; j++) */ - /* Undocumented data at the end of endpoint */ - if (*PFieldList && (strcmp ((const char *) (*PFieldList)->Name, "Descriptor Length"))) + if (*PFieldList && !(strcmp ((const char *) (*PFieldList)->Name, "Bytes"))) { Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt7b, &Subtable); @@ -1148,7 +1305,7 @@ DtCompileNhlt ( * All Endpoint Descriptors are completed. * Do the table terminator specific config (not in NHLT spec, optional) */ - if (*PFieldList && (strcmp ((const char *) (*PFieldList)->Name, "Descriptor Length"))) + if (*PFieldList && !(strcmp ((const char *) (*PFieldList)->Name, "Capabilities Size"))) { Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt5b, &Subtable); @@ -1160,15 +1317,20 @@ DtCompileNhlt ( ParentTable = DtPeekSubtable (); DtInsertSubtable (ParentTable, Subtable); - Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt3a, - &Subtable); - if (ACPI_FAILURE (Status)) + Terminator = ACPI_CAST_PTR (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B, Subtable->Buffer); + + if (Terminator->CapabilitiesSize) { - return (Status); - } + Status = DtCompileTable (PFieldList, AcpiDmTableInfoNhlt3a, + &Subtable); + if (ACPI_FAILURE (Status)) + { + return (Status); + } - ParentTable = DtPeekSubtable (); - DtInsertSubtable (ParentTable, Subtable); + ParentTable = DtPeekSubtable (); + DtInsertSubtable (ParentTable, Subtable); + } } return (AE_OK); @@ -1369,19 +1531,30 @@ DtCompilePhat ( ACPI_PHAT_HEADER *PhatHeader; ACPI_DMTABLE_INFO *Info; ACPI_PHAT_VERSION_DATA *VersionData; + UINT32 DeviceDataLength; UINT32 RecordCount; + DT_FIELD *DataOffsetField; + DT_FIELD *DevicePathField; + UINT32 TableOffset = 0; + UINT32 DataOffsetValue; + UINT32 i; - /* The table consist of subtables */ + /* The table consists of subtables */ while (*PFieldList) { + /* Compile the common subtable header */ + Status = DtCompileTable (PFieldList, AcpiDmTableInfoPhatHdr, &Subtable); if (ACPI_FAILURE (Status)) { return (Status); } + TableOffset += Subtable->Length; + DbgPrint (ASL_DEBUG_OUTPUT, "0 Subtable->Length: %X\n", Subtable->Length); + ParentTable = DtPeekSubtable (); DtInsertSubtable (ParentTable, Subtable); DtPushSubtable (Subtable); @@ -1392,12 +1565,66 @@ DtCompilePhat ( { case ACPI_PHAT_TYPE_FW_VERSION_DATA: + /* Compile the middle portion of the Firmware Version Data */ + Info = AcpiDmTableInfoPhat0; PhatHeader->Length = sizeof (ACPI_PHAT_VERSION_DATA); + DataOffsetField = NULL; break; case ACPI_PHAT_TYPE_FW_HEALTH_DATA: + DbgPrint (ASL_DEBUG_OUTPUT, "1 Offset: %X, Name: \"%s\" Length: %X\n", + (*PFieldList)->TableOffset, (*PFieldList)->Name, Subtable->Length); + + DataOffsetField = *PFieldList; + + /* Walk the field list to get to the "Device-specific data Offset" field */ + + TableOffset = sizeof (ACPI_PHAT_HEALTH_DATA); + for (i = 0; i < 3; i++) + { + DataOffsetField = DataOffsetField->Next; + DbgPrint (ASL_DEBUG_OUTPUT, "2 Offset: %X, Name: \"%s\" Length: %X Value: %s:\n", + TableOffset, DataOffsetField->Name, DataOffsetField->StringLength, DataOffsetField->Value); + } + + /* Convert DataOffsetField->Value (a char * string) to an integer value */ + + sscanf (DataOffsetField->Value, "%X", &DataOffsetValue); + + /* + * Get the next field (Device Path): + * DataOffsetField points to "Device-Specific Offset", next field is + * "Device Path". + */ + DevicePathField = DataOffsetField->Next; + + /* Compute the size of the input ASCII string as a unicode string (*2 + 2) */ + + DevicePathField->StringLength = (strlen ((const char *) DevicePathField->Value) * 2) + 2; + TableOffset += DevicePathField->StringLength; + + DbgPrint (ASL_DEBUG_OUTPUT, "3 Offset: %X, Length: %X devicepathLength: %X\n", + TableOffset, Subtable->Length, DevicePathField->StringLength); + + /* Set the DataOffsetField to the current TableOffset */ + /* Must set the DataOffsetField here (not later) */ + + if (DataOffsetValue != 0) + { + snprintf (DataOffsetField->Value, Subtable->Length, "%X", TableOffset); + } + + DbgPrint (ASL_DEBUG_OUTPUT, "4 Offset: %X, Length: %X\n", TableOffset, Subtable->Length); + + DbgPrint (ASL_DEBUG_OUTPUT, "5 TableOffset: %X, DataOffsetField->StringLength: " + "%X DevicePathField Length: %X DevicePathField->Value: %s, DataOffsetField->Value: %s DataOffsetField->ByteOffset %X\n", + TableOffset, DataOffsetField->StringLength, DevicePathField->StringLength, + DevicePathField->Value, DataOffsetField->Value, DataOffsetField->ByteOffset); + + /* Compile the middle portion of the Health Data Record */ + Info = AcpiDmTableInfoPhat1; PhatHeader->Length = sizeof (ACPI_PHAT_HEALTH_DATA); break; @@ -1406,16 +1633,19 @@ DtCompilePhat ( DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, *PFieldList, "PHAT"); return (AE_ERROR); - - break; } + /* Compile either the Version Data or the Health Data */ + Status = DtCompileTable (PFieldList, Info, &Subtable); if (ACPI_FAILURE (Status)) { return (Status); } + DbgPrint (ASL_DEBUG_OUTPUT, "6 Offset: %X, Name: \"%s\" SubtableLength: %X\n", + TableOffset /* - StartTableOffset*/, (*PFieldList)->Name, Subtable->Length); + ParentTable = DtPeekSubtable (); DtInsertSubtable (ParentTable, Subtable); @@ -1427,6 +1657,8 @@ DtCompilePhat ( (Subtable->Buffer - sizeof (ACPI_PHAT_HEADER))); RecordCount = VersionData->ElementCount; + /* Compile all of the Version Elements */ + while (RecordCount) { Status = DtCompileTable (PFieldList, AcpiDmTableInfoPhat0a, @@ -1435,17 +1667,29 @@ DtCompilePhat ( { return (Status); } + ParentTable = DtPeekSubtable (); DtInsertSubtable (ParentTable, Subtable); + TableOffset += Subtable->Length; RecordCount--; PhatHeader->Length += sizeof (ACPI_PHAT_VERSION_ELEMENT); } + + DtPopSubtable (); break; case ACPI_PHAT_TYPE_FW_HEALTH_DATA: - /* Compile device path */ + /* Compile the Device Path */ + + DeviceDataLength = Subtable->Length; + TableOffset += Subtable->Length; + + DbgPrint (ASL_DEBUG_OUTPUT, "7 Device Path Length: %X FieldName: \"%s\" FieldLength: " + "%s FieldValue: %s SubtableLength: %X TableOffset: %X\n", DeviceDataLength, + (*PFieldList)->Name, DataOffsetField->Value, (*PFieldList)->Value, + Subtable->Length, TableOffset); Status = DtCompileTable (PFieldList, AcpiDmTableInfoPhat1a, &Subtable); if (ACPI_FAILURE (Status)) @@ -1455,20 +1699,58 @@ DtCompilePhat ( ParentTable = DtPeekSubtable (); DtInsertSubtable (ParentTable, Subtable); + /* *PFieldList will be null if previous field was at the end-of-ParseTree (EOF) */ + + if (!*PFieldList) + { + DbgPrint (ASL_DEBUG_OUTPUT, "8 Exit on end-of-ParseTree\n"); + return (AE_OK); + } + + DbgPrint (ASL_DEBUG_OUTPUT, "9 Device Data Length: %X FieldName: \"%s" + " TableOffset: %X FieldLength: %X Field Value: %s SubtableLength: %X\n", + DeviceDataLength, (*PFieldList)->Name, TableOffset, + (*PFieldList)->StringLength, (*PFieldList)->Value, Subtable->Length); + PhatHeader->Length += (UINT16) Subtable->Length; - /* Compile vendor specific data */ + /* Convert DataOffsetField->Value (a hex char * string) to an integer value */ - Status = DtCompileTable (PFieldList, AcpiDmTableInfoPhat1b, &Subtable); - if (ACPI_FAILURE (Status)) + sscanf (DataOffsetField->Value, "%X", &DataOffsetValue); + + DbgPrint (ASL_DEBUG_OUTPUT, "10 Device-Specific Offset: %X Table Offset: %X\n", + DataOffsetValue, TableOffset); + if (DataOffsetValue != 0) { - return (Status); + /* Compile Device-Specific Data - only if the Data Offset is non-zero */ + + Status = DtCompileTable (PFieldList, AcpiDmTableInfoPhat1b, &Subtable); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + DbgPrint (ASL_DEBUG_OUTPUT, "11 Subtable: %p Table Offset: %X\n", + Subtable, TableOffset); + if (Subtable) + { + DbgPrint (ASL_DEBUG_OUTPUT, "12 Device Specific Offset: " + "%X FieldName \"%s\" SubtableLength %X\n", + DeviceDataLength, DataOffsetField->Name, Subtable->Length); + + DeviceDataLength += Subtable->Length; + + ParentTable = DtPeekSubtable (); + DtInsertSubtable (ParentTable, Subtable); + + PhatHeader->Length += (UINT16) Subtable->Length; + } } - ParentTable = DtPeekSubtable (); - DtInsertSubtable (ParentTable, Subtable); - PhatHeader->Length += (UINT16) Subtable->Length; + DtPopSubtable (); + DbgPrint (ASL_DEBUG_OUTPUT, "13 FieldName: \"%s\" FieldLength: %X Field Value: %s\n", + DataOffsetField->Name, DataOffsetField->StringLength, DataOffsetField->Value); break; default: @@ -1675,7 +1957,7 @@ DtCompilePptt ( DtInsertSubtable (ParentTable, Subtable); PpttHeader->Length += (UINT8)(Subtable->Length); - /* Compile PPTT subtable additionals */ + /* Compile PPTT subtable additional */ switch (PpttHeader->Type) { diff --git a/source/compiler/dttemplate.c b/source/compiler/dttemplate.c index 1bcc4a12c..77edbc852 100644 --- a/source/compiler/dttemplate.c +++ b/source/compiler/dttemplate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/dttemplate.h b/source/compiler/dttemplate.h index ad5af7074..a9caf288b 100644 --- a/source/compiler/dttemplate.h +++ b/source/compiler/dttemplate.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -341,6 +341,17 @@ const unsigned char TemplateBoot[] = 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00 /* 00000020 "(.. ...." */ }; +const unsigned char TemplateCcel[] = +{ + 0x43,0x43,0x45,0x4C,0x38,0x00,0x00,0x00, /* 00000000 "CCEL8..." */ + 0x04,0x1C,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */ + 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */ + 0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ + 0x30,0x09,0x21,0x20,0x00,0x00,0x00,0x00, /* 00000020 "0.! ...." */ + 0xEF,0xCD,0xAB,0x78,0x56,0x34,0x12,0x00, /* 00000028 "...xV4.." */ + 0x78,0x56,0x34,0x12,0xEF,0xCD,0xAB,0x00 /* 00000030 "xV4....." */ +}; + const unsigned char TemplateCedt[] = { 0x43,0x45,0x44,0x54,0x9c,0x01,0x00,0x00, /* 00000000 "CEDT...." */ @@ -397,6 +408,39 @@ const unsigned char TemplateCedt[] = 0x03,0x5e,0xba,0x00 /* 00000198 ".^.." */ }; +const unsigned char TemplateCdat[] = +{ + 0xE4,0x00,0x00,0x00,0x01,0x0C,0x00,0x00, /* 00000000 "........" */ + 0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00, /* 00000008 "........" */ + 0x03,0x00,0x08,0x00,0x04,0x56,0x00,0x00, /* 00000010 ".....V.." */ + 0x00,0x00,0x18,0x00,0xEF,0x01,0x00,0x00, /* 00000018 "........" */ + 0x89,0x67,0x45,0x23,0x01,0x00,0x00,0x00, /* 00000020 ".gE#...." */ + 0xAB,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */ + 0x03,0x00,0x08,0x00,0x04,0x56,0x00,0x00, /* 00000030 ".....V.." */ + 0x01,0x00,0x18,0x00,0x44,0x04,0x64,0x00, /* 00000038 "....D.d." */ + 0xCD,0xAB,0x89,0x67,0x45,0x23,0x01,0x00, /* 00000040 "...gE#.." */ + 0x33,0x22,0x44,0x33,0x55,0x44,0x00,0x00, /* 00000048 "3"D3UD.." */ + 0x02,0x00,0x14,0x00,0x99,0x00,0x00,0x00, /* 00000050 "........" */ + 0x00,0x00,0x00,0x00,0x78,0x56,0x34,0x12, /* 00000058 "....xV4." */ + 0x55,0x55,0x44,0x44,0x04,0x00,0x18,0x00, /* 00000060 "UUDD...." */ + 0x88,0x32,0x00,0x00,0x77,0x77,0x77,0x77, /* 00000068 ".2..wwww" */ + 0x11,0x11,0x11,0x11,0x88,0x88,0x88,0x88, /* 00000070 "........" */ + 0x22,0x22,0x22,0x22,0x05,0x00,0x20,0x00, /* 00000078 """"".. ." */ + 0x04,0x00,0x00,0x00,0x44,0x44,0x44,0x44, /* 00000080 "....DDDD" */ + 0x33,0x33,0x33,0x33,0x44,0x44,0x55,0x55, /* 00000088 "3333DDUU" */ + 0x66,0x66,0x00,0x00,0x77,0x77,0x88,0x88, /* 00000090 "ff..ww.." */ + 0x99,0x99,0x00,0x00,0x05,0x00,0x18,0x00, /* 00000098 "........" */ + 0x04,0x00,0x00,0x00,0x22,0x22,0x22,0x22, /* 000000A0 "....""""" */ + 0x11,0x11,0x11,0x11,0x34,0x12,0x56,0x78, /* 000000A8 "....4.Vx" */ + 0x11,0x11,0x00,0x00,0x05,0x00,0x30,0x00, /* 000000B0 "......0." */ + 0x08,0x00,0x00,0x00,0x66,0x66,0x66,0x66, /* 000000B8 "....ffff" */ + 0x55,0x55,0x55,0x55,0x44,0x44,0x55,0x55, /* 000000C0 "UUUUDDUU" */ + 0x66,0x66,0x00,0x00,0x77,0x77,0x88,0x88, /* 000000C8 "ff..ww.." */ + 0x99,0x99,0x00,0x00,0xAA,0xAA,0xBB,0xBB, /* 000000D0 "........" */ + 0xCC,0xCC,0x00,0x00,0x55,0x55,0x44,0x44, /* 000000D8 "....UUDD" */ + 0x33,0x33,0x00,0x00 /* 000000E0 "33.." */ +}; + const unsigned char TemplateCpep[] = { 0x43,0x50,0x45,0x50,0x34,0x00,0x00,0x00, /* 00000000 "CPEP4..." */ @@ -1153,6 +1197,42 @@ const unsigned char TemplateMsdm[] = 0x22,0x23,0x24,0x25 /* 00000060 ""#$%" */ }; +const unsigned char TemplateMpam[] = +{ + 0x4D,0x50,0x41,0x4D,0xFC,0x00,0x00,0x00, /* 00000000 "MPAM...." */ + 0x02,0x34,0x48,0x49,0x53,0x49,0x20,0x20, /* 00000008 ".4HISI " */ + 0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */ + 0x02,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ + 0x20,0x10,0x22,0x20,0x60,0x00,0x00,0x00, /* 00000020 " ." `..." */ + 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xC0, /* 00000028 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00, /* 00000030 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000048 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000050 "........" */ + 0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "2......." */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000060 "........" */ + 0x01,0x00,0x00,0x00,0x11,0x00,0x00,0x00, /* 00000068 "........" */ + 0x00,0x00,0x00,0x01,0x20,0x00,0x00,0x00, /* 00000070 ".... ..." */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */ + 0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00, /* 00000080 "....x..." */ + 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0xD0, /* 00000088 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00, /* 00000090 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000098 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A8 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */ + 0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B8 "2......." */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C0 "........" */ + 0x02,0x00,0x00,0x00,0x12,0x00,0x00,0x00, /* 000000C8 "........" */ + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000D0 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D8 "........" */ + 0x00,0x00,0x00,0x00,0x13,0x00,0x00,0x00, /* 000000E0 "........" */ + 0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00, /* 000000E8 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F0 "........" */ + 0x00,0x00,0x00,0x00 /* 000000F8 "...." */ +}; + const unsigned char TemplateMpst[] = { 0x4D,0x50,0x53,0x54,0xB6,0x00,0x00,0x00, /* 00000000 "MPST...." */ @@ -1430,20 +1510,27 @@ const unsigned char TemplatePdtt[] = const unsigned char TemplatePhat [] = { - 0x50,0x48,0x41,0x54,0x6F,0x00,0x00,0x00, /* 00000000 "PHATo..." */ - 0x01,0xC7,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */ + 0x50,0x48,0x41,0x54,0xA2,0x00,0x00,0x00, /* 00000000 "PHAT...." */ + 0x01,0xCA,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */ 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */ 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ - 0x05,0x01,0x21,0x20,0x00,0x00,0x28,0x00, /* 00000020 "..! ..(." */ + 0x31,0x03,0x22,0x20,0x00,0x00,0x28,0x00, /* 00000020 "1." ..(." */ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000028 "........" */ 0x30,0x05,0xAF,0x91,0x86,0x5D,0x0E,0x47, /* 00000030 "0....].G" */ 0xA6,0xB0,0x0A,0x2D,0xB9,0x40,0x82,0x49, /* 00000038 "...-.@.I" */ 0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01, /* 00000040 "........" */ - 0x0C,0x0B,0x0A,0x09,0x01,0x00,0x23,0x00, /* 00000048 "......#." */ + 0x0C,0x0B,0x0A,0x09,0x01,0x00,0x2E,0x00, /* 00000048 "........" */ 0x00,0x00,0x00,0x00,0x30,0x05,0xAF,0x91, /* 00000050 "....0..." */ 0x86,0x5D,0x0E,0x47,0xA6,0xB0,0x0A,0x2D, /* 00000058 ".].G...-" */ - 0xB9,0x40,0x82,0x49,0x00,0x00,0x00,0x00, /* 00000060 ".@.I...." */ - 0x61,0x73,0x64,0x66,0x00,0xFF,0x11 /* 00000068 "asdf..." */ + 0xB9,0x40,0x82,0x49,0x2A,0x00,0x00,0x00, /* 00000060 ".@.I*..." */ + 0x41,0x00,0x42,0x00,0x43,0x00,0x44,0x00, /* 00000068 "A.B.C.D." */ + 0x45,0x00,0x46,0x00,0x00,0x00,0x01,0x02, /* 00000070 "E.F....." */ + 0x03,0x04,0x00,0x00,0x28,0x00,0x00,0x00, /* 00000078 "....(..." */ + 0x00,0x00,0x01,0x00,0x00,0x00,0x30,0x05, /* 00000080 "......0." */ + 0xAF,0x91,0x86,0x5D,0x0E,0x47,0xA6,0xB0, /* 00000088 "...].G.." */ + 0x0A,0x2D,0xB9,0x40,0x82,0x49,0x08,0x07, /* 00000090 ".-.@.I.." */ + 0x06,0x05,0x04,0x03,0x02,0x01,0x0C,0x0B, /* 00000098 "........" */ + 0x0A,0x09 /* 000000A0 ".." */ }; const unsigned char TemplatePmtt[] = diff --git a/source/compiler/dtutils.c b/source/compiler/dtutils.c index e950763e7..d410719d5 100644 --- a/source/compiler/dtutils.c +++ b/source/compiler/dtutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -584,6 +584,7 @@ DtGetFieldLength ( case ACPI_DMT_IVRS_DE: case ACPI_DMT_GTDT: case ACPI_DMT_MADT: + case ACPI_DMT_MPAM_LOCATOR: case ACPI_DMT_NHLT1: case ACPI_DMT_NHLT1a: case ACPI_DMT_NHLT1b: @@ -601,6 +602,7 @@ DtGetFieldLength ( case ACPI_DMT_AEST_XFACE: case ACPI_DMT_AEST_XRUPT: case ACPI_DMT_ASF: + case ACPI_DMT_CDAT: case ACPI_DMT_HESTNTYP: case ACPI_DMT_FADTPM: case ACPI_DMT_EINJACT: @@ -800,7 +802,7 @@ DtSum ( UINT8 *Sum = ReturnValue; - Checksum = AcpiTbChecksum (Subtable->Buffer, Subtable->Length); + Checksum = AcpiUtChecksum (Subtable->Buffer, Subtable->Length); *Sum = (UINT8) (*Sum + Checksum); } diff --git a/source/compiler/preprocess.h b/source/compiler/preprocess.h index 9c25dd132..3ad4d16d0 100644 --- a/source/compiler/preprocess.h +++ b/source/compiler/preprocess.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/prexpress.c b/source/compiler/prexpress.c index 8ac1fd887..885706858 100644 --- a/source/compiler/prexpress.c +++ b/source/compiler/prexpress.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/prmacros.c b/source/compiler/prmacros.c index 5b3669784..8a1049331 100644 --- a/source/compiler/prmacros.c +++ b/source/compiler/prmacros.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/prparser.l b/source/compiler/prparser.l index 828d81b26..c701da4a4 100644 --- a/source/compiler/prparser.l +++ b/source/compiler/prparser.l @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/prparser.y b/source/compiler/prparser.y index 3854d9891..2f4d03279 100644 --- a/source/compiler/prparser.y +++ b/source/compiler/prparser.y @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/prscan.c b/source/compiler/prscan.c index 0d9af86ea..7ca364e23 100644 --- a/source/compiler/prscan.c +++ b/source/compiler/prscan.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/compiler/prutils.c b/source/compiler/prutils.c index eea42f890..907ca3ae9 100644 --- a/source/compiler/prutils.c +++ b/source/compiler/prutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbcmds.c b/source/components/debugger/dbcmds.c index 6f5514763..b8c2b4228 100644 --- a/source/components/debugger/dbcmds.c +++ b/source/components/debugger/dbcmds.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbconvert.c b/source/components/debugger/dbconvert.c index 9d1e1dddc..0b852261d 100644 --- a/source/components/debugger/dbconvert.c +++ b/source/components/debugger/dbconvert.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbdisply.c b/source/components/debugger/dbdisply.c index 276217f58..ad69737f5 100644 --- a/source/components/debugger/dbdisply.c +++ b/source/components/debugger/dbdisply.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbexec.c b/source/components/debugger/dbexec.c index eed0aa35c..73759c882 100644 --- a/source/components/debugger/dbexec.c +++ b/source/components/debugger/dbexec.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbfileio.c b/source/components/debugger/dbfileio.c index 09f8f2271..8fc11da8f 100644 --- a/source/components/debugger/dbfileio.c +++ b/source/components/debugger/dbfileio.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbhistry.c b/source/components/debugger/dbhistry.c index 31bfc3c56..ecdfaeba9 100644 --- a/source/components/debugger/dbhistry.c +++ b/source/components/debugger/dbhistry.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c index 0f21b731c..5e5c62893 100644 --- a/source/components/debugger/dbinput.c +++ b/source/components/debugger/dbinput.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbmethod.c b/source/components/debugger/dbmethod.c index 82202e8e2..5060bf6dd 100644 --- a/source/components/debugger/dbmethod.c +++ b/source/components/debugger/dbmethod.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c index 963f81251..ae4a10ca5 100644 --- a/source/components/debugger/dbnames.c +++ b/source/components/debugger/dbnames.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbobject.c b/source/components/debugger/dbobject.c index b8bade432..fe38be909 100644 --- a/source/components/debugger/dbobject.c +++ b/source/components/debugger/dbobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbstats.c b/source/components/debugger/dbstats.c index 3d31378f5..b5f31948b 100644 --- a/source/components/debugger/dbstats.c +++ b/source/components/debugger/dbstats.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbtest.c b/source/components/debugger/dbtest.c index 23690ed67..a4d48c7a4 100644 --- a/source/components/debugger/dbtest.c +++ b/source/components/debugger/dbtest.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbutils.c b/source/components/debugger/dbutils.c index ef649b2c1..70664ee2d 100644 --- a/source/components/debugger/dbutils.c +++ b/source/components/debugger/dbutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbxface.c b/source/components/debugger/dbxface.c index c44e1d0d5..667e90e5f 100644 --- a/source/components/debugger/dbxface.c +++ b/source/components/debugger/dbxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmbuffer.c b/source/components/disassembler/dmbuffer.c index d5d813c83..79f5a3ccf 100644 --- a/source/components/disassembler/dmbuffer.c +++ b/source/components/disassembler/dmbuffer.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmcstyle.c b/source/components/disassembler/dmcstyle.c index f0bef68ef..0af72d1e1 100644 --- a/source/components/disassembler/dmcstyle.c +++ b/source/components/disassembler/dmcstyle.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmdeferred.c b/source/components/disassembler/dmdeferred.c index 82ce2bec3..3a1ca550d 100644 --- a/source/components/disassembler/dmdeferred.c +++ b/source/components/disassembler/dmdeferred.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmnames.c b/source/components/disassembler/dmnames.c index 8852921f9..356af85f7 100644 --- a/source/components/disassembler/dmnames.c +++ b/source/components/disassembler/dmnames.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmopcode.c b/source/components/disassembler/dmopcode.c index 1cfe710d7..8f201d218 100644 --- a/source/components/disassembler/dmopcode.c +++ b/source/components/disassembler/dmopcode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c index 0a183e9c5..e1dc3475c 100644 --- a/source/components/disassembler/dmresrc.c +++ b/source/components/disassembler/dmresrc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmresrcl.c b/source/components/disassembler/dmresrcl.c index 9aa6ac1fb..75cafe5da 100644 --- a/source/components/disassembler/dmresrcl.c +++ b/source/components/disassembler/dmresrcl.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmresrcl2.c b/source/components/disassembler/dmresrcl2.c index 59d00f6c3..d21fd4e0c 100644 --- a/source/components/disassembler/dmresrcl2.c +++ b/source/components/disassembler/dmresrcl2.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmresrcs.c b/source/components/disassembler/dmresrcs.c index db5ce5db9..358836256 100644 --- a/source/components/disassembler/dmresrcs.c +++ b/source/components/disassembler/dmresrcs.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmutils.c b/source/components/disassembler/dmutils.c index 2a7b7b330..b6c133f51 100644 --- a/source/components/disassembler/dmutils.c +++ b/source/components/disassembler/dmutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmwalk.c b/source/components/disassembler/dmwalk.c index 7d2429b72..beaa5f0a7 100644 --- a/source/components/disassembler/dmwalk.c +++ b/source/components/disassembler/dmwalk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsargs.c b/source/components/dispatcher/dsargs.c index 522466939..6b9e4a35d 100644 --- a/source/components/dispatcher/dsargs.c +++ b/source/components/dispatcher/dsargs.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dscontrol.c b/source/components/dispatcher/dscontrol.c index 1d7d676c2..205b9b55b 100644 --- a/source/components/dispatcher/dscontrol.c +++ b/source/components/dispatcher/dscontrol.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsdebug.c b/source/components/dispatcher/dsdebug.c index 9111a2156..06f7ec816 100644 --- a/source/components/dispatcher/dsdebug.c +++ b/source/components/dispatcher/dsdebug.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsfield.c b/source/components/dispatcher/dsfield.c index 2d3851ff9..37cc25a94 100644 --- a/source/components/dispatcher/dsfield.c +++ b/source/components/dispatcher/dsfield.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsinit.c b/source/components/dispatcher/dsinit.c index 5f941f0c9..79e557190 100644 --- a/source/components/dispatcher/dsinit.c +++ b/source/components/dispatcher/dsinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsmethod.c b/source/components/dispatcher/dsmethod.c index d5fc3038f..02d9c6bea 100644 --- a/source/components/dispatcher/dsmethod.c +++ b/source/components/dispatcher/dsmethod.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -705,7 +705,7 @@ AcpiDsCallControlMethod ( if (!Info) { Status = AE_NO_MEMORY; - goto Cleanup; + goto PopWalkState; } Info->Parameters = &ThisWalkState->Operands[0]; @@ -717,7 +717,7 @@ AcpiDsCallControlMethod ( ACPI_FREE (Info); if (ACPI_FAILURE (Status)) { - goto Cleanup; + goto PopWalkState; } NextWalkState->MethodNestingDepth = ThisWalkState->MethodNestingDepth + 1; @@ -764,6 +764,12 @@ AcpiDsCallControlMethod ( return_ACPI_STATUS (Status); +PopWalkState: + + /* On error, pop the walk state to be deleted from thread */ + + AcpiDsPopWalkState(Thread); + Cleanup: /* On error, we must terminate the method properly */ diff --git a/source/components/dispatcher/dsmthdat.c b/source/components/dispatcher/dsmthdat.c index af1567901..1461af5d9 100644 --- a/source/components/dispatcher/dsmthdat.c +++ b/source/components/dispatcher/dsmthdat.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsobject.c b/source/components/dispatcher/dsobject.c index 5ffd198ba..147edc29c 100644 --- a/source/components/dispatcher/dsobject.c +++ b/source/components/dispatcher/dsobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsopcode.c b/source/components/dispatcher/dsopcode.c index 190be1b3f..7689df633 100644 --- a/source/components/dispatcher/dsopcode.c +++ b/source/components/dispatcher/dsopcode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dspkginit.c b/source/components/dispatcher/dspkginit.c index bd2bf2e32..a159d769c 100644 --- a/source/components/dispatcher/dspkginit.c +++ b/source/components/dispatcher/dspkginit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsutils.c b/source/components/dispatcher/dsutils.c index b159b34c3..059e05596 100644 --- a/source/components/dispatcher/dsutils.c +++ b/source/components/dispatcher/dsutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dswexec.c b/source/components/dispatcher/dswexec.c index 686f03c8c..5ae0ad716 100644 --- a/source/components/dispatcher/dswexec.c +++ b/source/components/dispatcher/dswexec.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -569,9 +569,11 @@ AcpiDsExecEndOp ( /* * All opcodes require operand resolution, with the only exceptions - * being the ObjectType and SizeOf operators. + * being the ObjectType and SizeOf operators as well as opcodes that + * take no arguments. */ - if (!(WalkState->OpInfo->Flags & AML_NO_OPERAND_RESOLVE)) + if (!(WalkState->OpInfo->Flags & AML_NO_OPERAND_RESOLVE) && + (WalkState->OpInfo->Flags & AML_HAS_ARGS)) { /* Resolve all operands */ diff --git a/source/components/dispatcher/dswload.c b/source/components/dispatcher/dswload.c index 4fdf955a5..74071c2e6 100644 --- a/source/components/dispatcher/dswload.c +++ b/source/components/dispatcher/dswload.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dswload2.c b/source/components/dispatcher/dswload2.c index 496ee91fb..c48b555ac 100644 --- a/source/components/dispatcher/dswload2.c +++ b/source/components/dispatcher/dswload2.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dswscope.c b/source/components/dispatcher/dswscope.c index dad0c4974..bce120c17 100644 --- a/source/components/dispatcher/dswscope.c +++ b/source/components/dispatcher/dswscope.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dswstate.c b/source/components/dispatcher/dswstate.c index 68b7f3d10..f761ceb80 100644 --- a/source/components/dispatcher/dswstate.c +++ b/source/components/dispatcher/dswstate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evevent.c b/source/components/events/evevent.c index b92646a4e..7d10c16c1 100644 --- a/source/components/events/evevent.c +++ b/source/components/events/evevent.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evglock.c b/source/components/events/evglock.c index 79b519a0f..5992671bd 100644 --- a/source/components/events/evglock.c +++ b/source/components/events/evglock.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evgpe.c b/source/components/events/evgpe.c index b246567d3..d7dcc3ea8 100644 --- a/source/components/events/evgpe.c +++ b/source/components/events/evgpe.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evgpeblk.c b/source/components/events/evgpeblk.c index 4dac205ee..7317f6e0f 100644 --- a/source/components/events/evgpeblk.c +++ b/source/components/events/evgpeblk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evgpeinit.c b/source/components/events/evgpeinit.c index 6f0472cf1..adbe86eb4 100644 --- a/source/components/events/evgpeinit.c +++ b/source/components/events/evgpeinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evgpeutil.c b/source/components/events/evgpeutil.c index 1f66717df..23f6369f3 100644 --- a/source/components/events/evgpeutil.c +++ b/source/components/events/evgpeutil.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evhandler.c b/source/components/events/evhandler.c index e0859c30a..47393a7d0 100644 --- a/source/components/events/evhandler.c +++ b/source/components/events/evhandler.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evmisc.c b/source/components/events/evmisc.c index b6c6eb6ad..40548b503 100644 --- a/source/components/events/evmisc.c +++ b/source/components/events/evmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evregion.c b/source/components/events/evregion.c index 6cf77791f..73db629f6 100644 --- a/source/components/events/evregion.c +++ b/source/components/events/evregion.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -329,6 +329,14 @@ AcpiEvAddressSpaceDispatch ( Ctx->SubspaceId = (UINT8) RegionObj->Region.Address; } + if (RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE) + { + ACPI_FFH_INFO *Ctx = HandlerDesc->AddressSpace.Context; + + Ctx->Length = RegionObj->Region.Length; + Ctx->Offset = RegionObj->Region.Address; + } + /* * We must exit the interpreter because the region setup will * potentially execute control methods (for example, the _REG method diff --git a/source/components/events/evrgnini.c b/source/components/events/evrgnini.c index 7cbbe30c0..6d329cb20 100644 --- a/source/components/events/evrgnini.c +++ b/source/components/events/evrgnini.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evsci.c b/source/components/events/evsci.c index 268919252..bb850e4d1 100644 --- a/source/components/events/evsci.c +++ b/source/components/events/evsci.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evxface.c b/source/components/events/evxface.c index 245ca8a41..ef2fbcc49 100644 --- a/source/components/events/evxface.c +++ b/source/components/events/evxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evxfevnt.c b/source/components/events/evxfevnt.c index 3384e0982..2b95395d9 100644 --- a/source/components/events/evxfevnt.c +++ b/source/components/events/evxfevnt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evxfgpe.c b/source/components/events/evxfgpe.c index 87dab0f81..fe354d219 100644 --- a/source/components/events/evxfgpe.c +++ b/source/components/events/evxfgpe.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evxfregn.c b/source/components/events/evxfregn.c index ee44e10d5..00fe86209 100644 --- a/source/components/events/evxfregn.c +++ b/source/components/events/evxfregn.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -163,13 +163,14 @@ /******************************************************************************* * - * FUNCTION: AcpiInstallAddressSpaceHandler + * FUNCTION: AcpiInstallAddressSpaceHandlerInternal * * PARAMETERS: Device - Handle for the device * SpaceId - The address space ID * Handler - Address of the handler * Setup - Address of the setup function * Context - Value passed to the handler on each access + * Run_Reg - Run _REG methods for this address space? * * RETURN: Status * @@ -180,16 +181,19 @@ * are executed here, and these methods can only be safely executed after * the default handlers have been installed and the hardware has been * initialized (via AcpiEnableSubsystem.) + * To avoid this problem pass FALSE for Run_Reg and later on call + * AcpiExecuteRegMethods() to execute _REG. * ******************************************************************************/ -ACPI_STATUS -AcpiInstallAddressSpaceHandler ( +static ACPI_STATUS +AcpiInstallAddressSpaceHandlerInternal ( ACPI_HANDLE Device, ACPI_ADR_SPACE_TYPE SpaceId, ACPI_ADR_SPACE_HANDLER Handler, ACPI_ADR_SPACE_SETUP Setup, - void *Context) + void *Context, + BOOLEAN Run_Reg) { ACPI_NAMESPACE_NODE *Node; ACPI_STATUS Status; @@ -231,16 +235,42 @@ AcpiInstallAddressSpaceHandler ( /* Run all _REG methods for this address space */ - AcpiEvExecuteRegMethods (Node, SpaceId, ACPI_REG_CONNECT); - + if (Run_Reg) + { + AcpiEvExecuteRegMethods (Node, SpaceId, ACPI_REG_CONNECT); + } UnlockAndExit: (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); return_ACPI_STATUS (Status); } +ACPI_STATUS +AcpiInstallAddressSpaceHandler ( + ACPI_HANDLE Device, + ACPI_ADR_SPACE_TYPE SpaceId, + ACPI_ADR_SPACE_HANDLER Handler, + ACPI_ADR_SPACE_SETUP Setup, + void *Context) +{ + return AcpiInstallAddressSpaceHandlerInternal (Device, SpaceId, Handler, Setup, Context, TRUE); +} + ACPI_EXPORT_SYMBOL (AcpiInstallAddressSpaceHandler) +ACPI_STATUS +AcpiInstallAddressSpaceHandlerNo_Reg ( + ACPI_HANDLE Device, + ACPI_ADR_SPACE_TYPE SpaceId, + ACPI_ADR_SPACE_HANDLER Handler, + ACPI_ADR_SPACE_SETUP Setup, + void *Context) +{ + return AcpiInstallAddressSpaceHandlerInternal (Device, SpaceId, Handler, Setup, Context, FALSE); +} + +ACPI_EXPORT_SYMBOL (AcpiInstallAddressSpaceHandlerNo_Reg) + /******************************************************************************* * @@ -387,3 +417,62 @@ UnlockAndExit: } ACPI_EXPORT_SYMBOL (AcpiRemoveAddressSpaceHandler) + + +/******************************************************************************* + * + * FUNCTION: AcpiExecuteRegMethods + * + * PARAMETERS: Device - Handle for the device + * SpaceId - The address space ID + * + * RETURN: Status + * + * DESCRIPTION: Execute _REG for all OpRegions of a given SpaceId. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiExecuteRegMethods ( + ACPI_HANDLE Device, + ACPI_ADR_SPACE_TYPE SpaceId) +{ + ACPI_NAMESPACE_NODE *Node; + ACPI_STATUS Status; + + + ACPI_FUNCTION_TRACE (AcpiExecuteRegMethods); + + + /* Parameter validation */ + + if (!Device) + { + return_ACPI_STATUS (AE_BAD_PARAMETER); + } + + Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + + /* Convert and validate the device handle */ + + Node = AcpiNsValidateHandle (Device); + if (Node) + { + /* Run all _REG methods for this address space */ + + AcpiEvExecuteRegMethods (Node, SpaceId, ACPI_REG_CONNECT); + } + else + { + Status = AE_BAD_PARAMETER; + } + + (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); + return_ACPI_STATUS (Status); +} + +ACPI_EXPORT_SYMBOL (AcpiExecuteRegMethods) diff --git a/source/components/executer/exconcat.c b/source/components/executer/exconcat.c index 335d78f19..f504bc0c7 100644 --- a/source/components/executer/exconcat.c +++ b/source/components/executer/exconcat.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exconfig.c b/source/components/executer/exconfig.c index 11c8ba64b..ae95a9200 100644 --- a/source/components/executer/exconfig.c +++ b/source/components/executer/exconfig.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exconvrt.c b/source/components/executer/exconvrt.c index c9572e90b..3382b520f 100644 --- a/source/components/executer/exconvrt.c +++ b/source/components/executer/exconvrt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/excreate.c b/source/components/executer/excreate.c index e83810810..563557263 100644 --- a/source/components/executer/excreate.c +++ b/source/components/executer/excreate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exdebug.c b/source/components/executer/exdebug.c index 88f75966d..5ccfccdb2 100644 --- a/source/components/executer/exdebug.c +++ b/source/components/executer/exdebug.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exdump.c b/source/components/executer/exdump.c index e72ac01fc..7a2c4a81b 100644 --- a/source/components/executer/exdump.c +++ b/source/components/executer/exdump.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exfield.c b/source/components/executer/exfield.c index 2834e7b38..f7d092064 100644 --- a/source/components/executer/exfield.c +++ b/source/components/executer/exfield.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -296,7 +296,8 @@ AcpiExReadDataFromField ( (ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS || ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS || ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI || - ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT)) + ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT || + ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE)) { /* SMBus, GSBus, IPMI serial */ @@ -469,7 +470,8 @@ AcpiExWriteDataToField ( (ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS || ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS || ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI || - ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT)) + ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT || + ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE)) { /* SMBus, GSBus, IPMI serial */ diff --git a/source/components/executer/exfldio.c b/source/components/executer/exfldio.c index 30d17c196..c29cd0e89 100644 --- a/source/components/executer/exfldio.c +++ b/source/components/executer/exfldio.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exmisc.c b/source/components/executer/exmisc.c index 4a1e2ff25..9b6608ba8 100644 --- a/source/components/executer/exmisc.c +++ b/source/components/executer/exmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exmutex.c b/source/components/executer/exmutex.c index 8b335680d..3abac6a8e 100644 --- a/source/components/executer/exmutex.c +++ b/source/components/executer/exmutex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exnames.c b/source/components/executer/exnames.c index 6045bc6b3..af68c82fa 100644 --- a/source/components/executer/exnames.c +++ b/source/components/executer/exnames.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exoparg1.c b/source/components/executer/exoparg1.c index 2d9bbddf2..82250ff65 100644 --- a/source/components/executer/exoparg1.c +++ b/source/components/executer/exoparg1.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exoparg2.c b/source/components/executer/exoparg2.c index 8b63d615f..29d9dc7e2 100644 --- a/source/components/executer/exoparg2.c +++ b/source/components/executer/exoparg2.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exoparg3.c b/source/components/executer/exoparg3.c index 7b74d32ef..a22b72579 100644 --- a/source/components/executer/exoparg3.c +++ b/source/components/executer/exoparg3.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exoparg6.c b/source/components/executer/exoparg6.c index 5506b2c1a..ad69405ee 100644 --- a/source/components/executer/exoparg6.c +++ b/source/components/executer/exoparg6.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exprep.c b/source/components/executer/exprep.c index 6d239d7a7..678ee8a1d 100644 --- a/source/components/executer/exprep.c +++ b/source/components/executer/exprep.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exregion.c b/source/components/executer/exregion.c index 01d49065d..858d31feb 100644 --- a/source/components/executer/exregion.c +++ b/source/components/executer/exregion.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exresnte.c b/source/components/executer/exresnte.c index 6801b25be..b5dc24c60 100644 --- a/source/components/executer/exresnte.c +++ b/source/components/executer/exresnte.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exresolv.c b/source/components/executer/exresolv.c index af5202ab8..460c6d773 100644 --- a/source/components/executer/exresolv.c +++ b/source/components/executer/exresolv.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exresop.c b/source/components/executer/exresop.c index 4abe93766..f4734d892 100644 --- a/source/components/executer/exresop.c +++ b/source/components/executer/exresop.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exserial.c b/source/components/executer/exserial.c index 4dfd65992..6d57e3761 100644 --- a/source/components/executer/exserial.c +++ b/source/components/executer/exserial.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -484,6 +484,12 @@ AcpiExWriteSerialBus ( Function = ACPI_WRITE; break; + case ACPI_ADR_SPACE_FIXED_HARDWARE: + + BufferLength = ACPI_FFH_INPUT_BUFFER_SIZE; + Function = ACPI_WRITE; + break; + default: return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID); } diff --git a/source/components/executer/exstore.c b/source/components/executer/exstore.c index ba1a05d94..95bb19afa 100644 --- a/source/components/executer/exstore.c +++ b/source/components/executer/exstore.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exstoren.c b/source/components/executer/exstoren.c index df4a6f405..628592f26 100644 --- a/source/components/executer/exstoren.c +++ b/source/components/executer/exstoren.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exstorob.c b/source/components/executer/exstorob.c index 56d048a7e..f318f0274 100644 --- a/source/components/executer/exstorob.c +++ b/source/components/executer/exstorob.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exsystem.c b/source/components/executer/exsystem.c index 62768bcf0..3f1deb14c 100644 --- a/source/components/executer/exsystem.c +++ b/source/components/executer/exsystem.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -339,18 +339,6 @@ AcpiExSystemDoSleep ( AcpiExExitInterpreter (); /* - * Warn users about excessive sleep times, so ASL code can be improved to - * use polling or similar techniques. - */ - if (HowLongMs > 10) - { - ACPI_WARNING ((AE_INFO, - "Firmware issue: Excessive sleep time (0x%8.8X%8.8X ms > 10 ms)" - " in ACPI Control Method", - ACPI_FORMAT_UINT64 (HowLongMs))); - } - - /* * For compatibility with other ACPI implementations and to prevent * accidental deep sleeps, limit the sleep time to something reasonable. */ diff --git a/source/components/executer/extrace.c b/source/components/executer/extrace.c index a677393f1..e574e4890 100644 --- a/source/components/executer/extrace.c +++ b/source/components/executer/extrace.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exutils.c b/source/components/executer/exutils.c index e27f567b6..3d9dd4fa7 100644 --- a/source/components/executer/exutils.c +++ b/source/components/executer/exutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwacpi.c b/source/components/hardware/hwacpi.c index 8b3222099..1772e7954 100644 --- a/source/components/hardware/hwacpi.c +++ b/source/components/hardware/hwacpi.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwesleep.c b/source/components/hardware/hwesleep.c index 85e4cb950..ec03e5ed1 100644 --- a/source/components/hardware/hwesleep.c +++ b/source/components/hardware/hwesleep.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwgpe.c b/source/components/hardware/hwgpe.c index 7f9a5f052..994fc4756 100644 --- a/source/components/hardware/hwgpe.c +++ b/source/components/hardware/hwgpe.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwpci.c b/source/components/hardware/hwpci.c index b8e8aa9f3..745f9c81e 100644 --- a/source/components/hardware/hwpci.c +++ b/source/components/hardware/hwpci.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwregs.c b/source/components/hardware/hwregs.c index 7b4ae88af..c499c111d 100644 --- a/source/components/hardware/hwregs.c +++ b/source/components/hardware/hwregs.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwsleep.c b/source/components/hardware/hwsleep.c index 6667c27ec..80af628c9 100644 --- a/source/components/hardware/hwsleep.c +++ b/source/components/hardware/hwsleep.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwtimer.c b/source/components/hardware/hwtimer.c index 829e2a353..504f84d03 100644 --- a/source/components/hardware/hwtimer.c +++ b/source/components/hardware/hwtimer.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwvalid.c b/source/components/hardware/hwvalid.c index d297905b7..80f0f5709 100644 --- a/source/components/hardware/hwvalid.c +++ b/source/components/hardware/hwvalid.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -169,8 +169,8 @@ AcpiHwValidateIoRequest ( * * The table is used to implement the Microsoft port access rules that * first appeared in Windows XP. Some ports are always illegal, and some - * ports are only illegal if the BIOS calls _OSI with a WinXP string or - * later (meaning that the BIOS itelf is post-XP.) + * ports are only illegal if the BIOS calls _OSI with nothing newer than + * the specific _OSI strings. * * This provides ACPICA with the desired port protections and * Microsoft compatibility. @@ -301,8 +301,8 @@ AcpiHwValidateIoRequest ( if ((Address <= PortInfo->End) && (LastAddress >= PortInfo->Start)) { /* Port illegality may depend on the _OSI calls made by the BIOS */ - - if (AcpiGbl_OsiData >= PortInfo->OsiDependency) + if (PortInfo->OsiDependency == ACPI_ALWAYS_ILLEGAL || + AcpiGbl_OsiData == PortInfo->OsiDependency) { ACPI_DEBUG_PRINT ((ACPI_DB_VALUES, "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)\n", diff --git a/source/components/hardware/hwxface.c b/source/components/hardware/hwxface.c index 8fd3561a0..febe90de5 100644 --- a/source/components/hardware/hwxface.c +++ b/source/components/hardware/hwxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwxfsleep.c b/source/components/hardware/hwxfsleep.c index 5f8b7db0a..4cd7eba86 100644 --- a/source/components/hardware/hwxfsleep.c +++ b/source/components/hardware/hwxfsleep.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsaccess.c b/source/components/namespace/nsaccess.c index 2b810facb..b6d9d8490 100644 --- a/source/components/namespace/nsaccess.c +++ b/source/components/namespace/nsaccess.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsalloc.c b/source/components/namespace/nsalloc.c index 560f6f363..706270771 100644 --- a/source/components/namespace/nsalloc.c +++ b/source/components/namespace/nsalloc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsarguments.c b/source/components/namespace/nsarguments.c index 2da06f2f6..bb081b754 100644 --- a/source/components/namespace/nsarguments.c +++ b/source/components/namespace/nsarguments.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsconvert.c b/source/components/namespace/nsconvert.c index 2971f08ec..ed2fa03e7 100644 --- a/source/components/namespace/nsconvert.c +++ b/source/components/namespace/nsconvert.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsdump.c b/source/components/namespace/nsdump.c index 36cfbdf6b..731c32d92 100644 --- a/source/components/namespace/nsdump.c +++ b/source/components/namespace/nsdump.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsdumpdv.c b/source/components/namespace/nsdumpdv.c index 0cc9b5a5e..af0b29656 100644 --- a/source/components/namespace/nsdumpdv.c +++ b/source/components/namespace/nsdumpdv.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nseval.c b/source/components/namespace/nseval.c index 1cb07615d..23ed486c8 100644 --- a/source/components/namespace/nseval.c +++ b/source/components/namespace/nseval.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsinit.c b/source/components/namespace/nsinit.c index c523035f1..5ca332eb7 100644 --- a/source/components/namespace/nsinit.c +++ b/source/components/namespace/nsinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsload.c b/source/components/namespace/nsload.c index c3423e55b..0e93791bf 100644 --- a/source/components/namespace/nsload.c +++ b/source/components/namespace/nsload.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsnames.c b/source/components/namespace/nsnames.c index c8412c2ed..ea3d7d571 100644 --- a/source/components/namespace/nsnames.c +++ b/source/components/namespace/nsnames.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsobject.c b/source/components/namespace/nsobject.c index 82d735eb1..842a36a5f 100644 --- a/source/components/namespace/nsobject.c +++ b/source/components/namespace/nsobject.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsparse.c b/source/components/namespace/nsparse.c index 0ac5efb42..86afef097 100644 --- a/source/components/namespace/nsparse.c +++ b/source/components/namespace/nsparse.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nspredef.c b/source/components/namespace/nspredef.c index e28d68967..04c3012a4 100644 --- a/source/components/namespace/nspredef.c +++ b/source/components/namespace/nspredef.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsprepkg.c b/source/components/namespace/nsprepkg.c index e6959daca..2bfc89a7d 100644 --- a/source/components/namespace/nsprepkg.c +++ b/source/components/namespace/nsprepkg.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsrepair.c b/source/components/namespace/nsrepair.c index 59f7aa33f..7aa02a80f 100644 --- a/source/components/namespace/nsrepair.c +++ b/source/components/namespace/nsrepair.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -328,9 +328,10 @@ AcpiNsSimpleRepair ( */ if (!ReturnObject) { - if (ExpectedBtypes && (!(ExpectedBtypes & ACPI_RTYPE_NONE))) + if (ExpectedBtypes) { - if (PackageIndex != ACPI_NOT_PACKAGE_ELEMENT) + if (!(ExpectedBtypes & ACPI_RTYPE_NONE) && + PackageIndex != ACPI_NOT_PACKAGE_ELEMENT) { ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, ACPI_WARN_ALWAYS, "Found unexpected NULL package element")); @@ -342,13 +343,14 @@ AcpiNsSimpleRepair ( return (AE_OK); /* Repair was successful */ } } - else + + if (ExpectedBtypes != ACPI_RTYPE_NONE) { ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, - ACPI_WARN_ALWAYS, "Missing expected return value")); + ACPI_WARN_ALWAYS, + "Missing expected return value")); + return (AE_AML_NO_RETURN_VALUE); } - - return (AE_AML_NO_RETURN_VALUE); } } diff --git a/source/components/namespace/nsrepair2.c b/source/components/namespace/nsrepair2.c index bf76b7dd7..7f50c05f4 100644 --- a/source/components/namespace/nsrepair2.c +++ b/source/components/namespace/nsrepair2.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -565,13 +565,6 @@ AcpiNsRepair_CID ( (*ElementPtr)->Common.ReferenceCount = OriginalRefCount; - - /* - * The OriginalElement holds a reference from the package object - * that represents _HID. Since a new element was created by _HID, - * remove the reference from the _CID package. - */ - AcpiUtRemoveReference (OriginalElement); } ElementPtr++; @@ -702,7 +695,7 @@ AcpiNsRepair_HID ( char *Dest; - ACPI_FUNCTION_NAME (NsRepair_HID); + ACPI_FUNCTION_TRACE (NsRepair_HID); /* We only care about string _HID objects (not integers) */ diff --git a/source/components/namespace/nssearch.c b/source/components/namespace/nssearch.c index 706963c49..a992a7e4c 100644 --- a/source/components/namespace/nssearch.c +++ b/source/components/namespace/nssearch.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsutils.c b/source/components/namespace/nsutils.c index f4208179b..1162fca73 100644 --- a/source/components/namespace/nsutils.c +++ b/source/components/namespace/nsutils.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -500,7 +500,7 @@ AcpiNsBuildInternalName ( * * PARAMETERS: *ExternalName - External representation of name * **Converted Name - Where to return the resulting - * internal represention of the name + * internal representation of the name * * RETURN: Status * diff --git a/source/components/namespace/nswalk.c b/source/components/namespace/nswalk.c index 3d0fc639f..7abc6b81e 100644 --- a/source/components/namespace/nswalk.c +++ b/source/components/namespace/nswalk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsxfeval.c b/source/components/namespace/nsxfeval.c index 9724d0242..a4213f280 100644 --- a/source/components/namespace/nsxfeval.c +++ b/source/components/namespace/nsxfeval.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsxfname.c b/source/components/namespace/nsxfname.c index 7d52330f6..c19b02442 100644 --- a/source/components/namespace/nsxfname.c +++ b/source/components/namespace/nsxfname.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -192,7 +192,7 @@ AcpiNsCopyDeviceId ( ACPI_STATUS AcpiGetHandle ( ACPI_HANDLE Parent, - ACPI_STRING Pathname, + const char *Pathname, ACPI_HANDLE *RetHandle) { ACPI_STATUS Status; diff --git a/source/components/namespace/nsxfobj.c b/source/components/namespace/nsxfobj.c index 2aa1fc17b..50ca5b2e6 100644 --- a/source/components/namespace/nsxfobj.c +++ b/source/components/namespace/nsxfobj.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psargs.c b/source/components/parser/psargs.c index f510623eb..ff0780c65 100644 --- a/source/components/parser/psargs.c +++ b/source/components/parser/psargs.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psloop.c b/source/components/parser/psloop.c index 2b4c1f2a8..e759e081f 100644 --- a/source/components/parser/psloop.c +++ b/source/components/parser/psloop.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psobject.c b/source/components/parser/psobject.c index 18a32ef36..ff1069d0a 100644 --- a/source/components/parser/psobject.c +++ b/source/components/parser/psobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psopcode.c b/source/components/parser/psopcode.c index 540716af5..db0c2e475 100644 --- a/source/components/parser/psopcode.c +++ b/source/components/parser/psopcode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psopinfo.c b/source/components/parser/psopinfo.c index fcb080cac..99fada101 100644 --- a/source/components/parser/psopinfo.c +++ b/source/components/parser/psopinfo.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psparse.c b/source/components/parser/psparse.c index e0cd5915b..f7e584b91 100644 --- a/source/components/parser/psparse.c +++ b/source/components/parser/psparse.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psscope.c b/source/components/parser/psscope.c index 269410a6a..9fe84e387 100644 --- a/source/components/parser/psscope.c +++ b/source/components/parser/psscope.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/pstree.c b/source/components/parser/pstree.c index 92f623046..cbcb35994 100644 --- a/source/components/parser/pstree.c +++ b/source/components/parser/pstree.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psutils.c b/source/components/parser/psutils.c index a9ea35364..f10179369 100644 --- a/source/components/parser/psutils.c +++ b/source/components/parser/psutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/pswalk.c b/source/components/parser/pswalk.c index 31232fd46..4a5fd986f 100644 --- a/source/components/parser/pswalk.c +++ b/source/components/parser/pswalk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psxface.c b/source/components/parser/psxface.c index 295da1af6..d44cb9f64 100644 --- a/source/components/parser/psxface.c +++ b/source/components/parser/psxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsaddr.c b/source/components/resources/rsaddr.c index 93d45ca35..08cea5c49 100644 --- a/source/components/resources/rsaddr.c +++ b/source/components/resources/rsaddr.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rscalc.c b/source/components/resources/rscalc.c index c966636b6..a244ee32a 100644 --- a/source/components/resources/rscalc.c +++ b/source/components/resources/rscalc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rscreate.c b/source/components/resources/rscreate.c index 6c230bce0..da0967ee8 100644 --- a/source/components/resources/rscreate.c +++ b/source/components/resources/rscreate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsdump.c b/source/components/resources/rsdump.c index e8f13724c..02fc37ca4 100644 --- a/source/components/resources/rsdump.c +++ b/source/components/resources/rsdump.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsdumpinfo.c b/source/components/resources/rsdumpinfo.c index 83b22caa6..42a5e33bb 100644 --- a/source/components/resources/rsdumpinfo.c +++ b/source/components/resources/rsdumpinfo.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsinfo.c b/source/components/resources/rsinfo.c index b9d4df46b..976b7e7b3 100644 --- a/source/components/resources/rsinfo.c +++ b/source/components/resources/rsinfo.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsio.c b/source/components/resources/rsio.c index 299326232..1640cdb21 100644 --- a/source/components/resources/rsio.c +++ b/source/components/resources/rsio.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsirq.c b/source/components/resources/rsirq.c index 9a8fc18fc..c2d306aa2 100644 --- a/source/components/resources/rsirq.c +++ b/source/components/resources/rsirq.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rslist.c b/source/components/resources/rslist.c index fdd24688c..bce499170 100644 --- a/source/components/resources/rslist.c +++ b/source/components/resources/rslist.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsmemory.c b/source/components/resources/rsmemory.c index e527bad7b..170bb6799 100644 --- a/source/components/resources/rsmemory.c +++ b/source/components/resources/rsmemory.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsmisc.c b/source/components/resources/rsmisc.c index 16c52134e..52358421c 100644 --- a/source/components/resources/rsmisc.c +++ b/source/components/resources/rsmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsserial.c b/source/components/resources/rsserial.c index 3075b4c47..1b4b2180d 100644 --- a/source/components/resources/rsserial.c +++ b/source/components/resources/rsserial.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsutils.c b/source/components/resources/rsutils.c index 7110406f4..e6889f86c 100644 --- a/source/components/resources/rsutils.c +++ b/source/components/resources/rsutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsxface.c b/source/components/resources/rsxface.c index d3aaf1d0f..f46ff346b 100644 --- a/source/components/resources/rsxface.c +++ b/source/components/resources/rsxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbdata.c b/source/components/tables/tbdata.c index 5e4f7ca74..e00376376 100644 --- a/source/components/tables/tbdata.c +++ b/source/components/tables/tbdata.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -724,7 +724,7 @@ AcpiTbVerifyTempTable ( { /* Verify the checksum */ - Status = AcpiTbVerifyChecksum (TableDesc->Pointer, TableDesc->Length); + Status = AcpiUtVerifyChecksum (TableDesc->Pointer, TableDesc->Length); if (ACPI_FAILURE (Status)) { ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY, diff --git a/source/components/tables/tbfadt.c b/source/components/tables/tbfadt.c index 7ae35f190..d2bd1eb32 100644 --- a/source/components/tables/tbfadt.c +++ b/source/components/tables/tbfadt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -472,7 +472,7 @@ AcpiTbParseFadt ( * Validate the FADT checksum before we copy the table. Ignore * checksum error as we want to try to get the DSDT and FACS. */ - (void) AcpiTbVerifyChecksum (Table, Length); + (void) AcpiUtVerifyChecksum (Table, Length); /* Create a local copy of the FADT in common ACPI 2.0+ format */ diff --git a/source/components/tables/tbfind.c b/source/components/tables/tbfind.c index 81ed2d97a..4adf09e22 100644 --- a/source/components/tables/tbfind.c +++ b/source/components/tables/tbfind.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbinstal.c b/source/components/tables/tbinstal.c index 9253bd1db..eda1d0a73 100644 --- a/source/components/tables/tbinstal.c +++ b/source/components/tables/tbinstal.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbprint.c b/source/components/tables/tbprint.c index 0b53e7373..13502ee1b 100644 --- a/source/components/tables/tbprint.c +++ b/source/components/tables/tbprint.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -152,6 +152,8 @@ #include "acpi.h" #include "accommon.h" #include "actables.h" +#include "acdisasm.h" +#include "acutils.h" #define _COMPONENT ACPI_TABLES ACPI_MODULE_NAME ("tbprint") @@ -192,7 +194,7 @@ AcpiTbFixString ( while (Length && *String) { - if (!isprint ((int) *String)) + if (!isprint ((int) (UINT8) *String)) { *String = '?'; } @@ -293,89 +295,3 @@ AcpiTbPrintTableHeader ( } } - -/******************************************************************************* - * - * FUNCTION: AcpiTbValidateChecksum - * - * PARAMETERS: Table - ACPI table to verify - * Length - Length of entire table - * - * RETURN: Status - * - * DESCRIPTION: Verifies that the table checksums to zero. Optionally returns - * exception on bad checksum. - * - ******************************************************************************/ - -ACPI_STATUS -AcpiTbVerifyChecksum ( - ACPI_TABLE_HEADER *Table, - UINT32 Length) -{ - UINT8 Checksum; - - - /* - * FACS/S3PT: - * They are the odd tables, have no standard ACPI header and no checksum - */ - - if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT) || - ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS)) - { - return (AE_OK); - } - - /* Compute the checksum on the table */ - - Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), Length); - - /* Checksum ok? (should be zero) */ - - if (Checksum) - { - ACPI_BIOS_WARNING ((AE_INFO, - "Incorrect checksum in table [%4.4s] - 0x%2.2X, " - "should be 0x%2.2X", - Table->Signature, Table->Checksum, - (UINT8) (Table->Checksum - Checksum))); - -#if (ACPI_CHECKSUM_ABORT) - return (AE_BAD_CHECKSUM); -#endif - } - - return (AE_OK); -} - - -/******************************************************************************* - * - * FUNCTION: AcpiTbChecksum - * - * PARAMETERS: Buffer - Pointer to memory region to be checked - * Length - Length of this memory region - * - * RETURN: Checksum (UINT8) - * - * DESCRIPTION: Calculates circular checksum of memory region. - * - ******************************************************************************/ - -UINT8 -AcpiTbChecksum ( - UINT8 *Buffer, - UINT32 Length) -{ - UINT8 Sum = 0; - UINT8 *End = Buffer + Length; - - - while (Buffer < End) - { - Sum = (UINT8) (Sum + *(Buffer++)); - } - - return (Sum); -} diff --git a/source/components/tables/tbutils.c b/source/components/tables/tbutils.c index d2a30dc38..d86ed252a 100644 --- a/source/components/tables/tbutils.c +++ b/source/components/tables/tbutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -471,7 +471,7 @@ AcpiTbParseRootTable ( /* Validate the root table checksum */ - Status = AcpiTbVerifyChecksum (Table, Length); + Status = AcpiUtVerifyChecksum (Table, Length); if (ACPI_FAILURE (Status)) { AcpiOsUnmapMemory (Table, Length); diff --git a/source/components/tables/tbxface.c b/source/components/tables/tbxface.c index 919ad1381..b37377efd 100644 --- a/source/components/tables/tbxface.c +++ b/source/components/tables/tbxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbxfload.c b/source/components/tables/tbxfload.c index ddd9b795e..7ae42346e 100644 --- a/source/components/tables/tbxfload.c +++ b/source/components/tables/tbxfload.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbxfroot.c b/source/components/tables/tbxfroot.c index bb90f6059..923d05fb7 100644 --- a/source/components/tables/tbxfroot.c +++ b/source/components/tables/tbxfroot.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -227,7 +227,7 @@ AcpiTbValidateRsdp ( /* Check the standard checksum */ - if (AcpiTbChecksum ((UINT8 *) Rsdp, ACPI_RSDP_CHECKSUM_LENGTH) != 0) + if (AcpiUtChecksum ((UINT8 *) Rsdp, ACPI_RSDP_CHECKSUM_LENGTH) != 0) { return (AE_BAD_CHECKSUM); } @@ -235,7 +235,7 @@ AcpiTbValidateRsdp ( /* Check extended checksum if table version >= 2 */ if ((Rsdp->Revision >= 2) && - (AcpiTbChecksum ((UINT8 *) Rsdp, ACPI_RSDP_XCHECKSUM_LENGTH) != 0)) + (AcpiUtChecksum ((UINT8 *) Rsdp, ACPI_RSDP_XCHECKSUM_LENGTH) != 0)) { return (AE_BAD_CHECKSUM); } @@ -271,6 +271,7 @@ AcpiFindRootPointer ( UINT8 *TablePtr; UINT8 *MemRover; UINT32 PhysicalAddress; + UINT32 EbdaWindowSize; ACPI_FUNCTION_TRACE (AcpiFindRootPointer); @@ -299,27 +300,40 @@ AcpiFindRootPointer ( /* EBDA present? */ - if (PhysicalAddress > 0x400) + /* + * Check that the EBDA pointer from memory is sane and does not point + * above valid low memory + */ + if (PhysicalAddress > 0x400 && + PhysicalAddress < 0xA0000) { /* - * 1b) Search EBDA paragraphs (EBDA is required to be a - * minimum of 1K length) + * Calculate the scan window size + * The EBDA is not guaranteed to be larger than a KiB and in case + * that it is smaller, the scanning function would leave the low + * memory and continue to the VGA range. + */ + EbdaWindowSize = ACPI_MIN(ACPI_EBDA_WINDOW_SIZE, + 0xA0000 - PhysicalAddress); + + /* + * 1b) Search EBDA paragraphs */ TablePtr = AcpiOsMapMemory ( (ACPI_PHYSICAL_ADDRESS) PhysicalAddress, - ACPI_EBDA_WINDOW_SIZE); + EbdaWindowSize); if (!TablePtr) { ACPI_ERROR ((AE_INFO, "Could not map memory at 0x%8.8X for length %u", - PhysicalAddress, ACPI_EBDA_WINDOW_SIZE)); + PhysicalAddress, EbdaWindowSize)); return_ACPI_STATUS (AE_NO_MEMORY); } MemRover = AcpiTbScanMemoryForRsdp ( - TablePtr, ACPI_EBDA_WINDOW_SIZE); - AcpiOsUnmapMemory (TablePtr, ACPI_EBDA_WINDOW_SIZE); + TablePtr, EbdaWindowSize); + AcpiOsUnmapMemory (TablePtr, EbdaWindowSize); if (MemRover) { diff --git a/source/components/utilities/utaddress.c b/source/components/utilities/utaddress.c index 5aa12832b..e3a502890 100644 --- a/source/components/utilities/utaddress.c +++ b/source/components/utilities/utaddress.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utalloc.c b/source/components/utilities/utalloc.c index aa06339cb..d4a7e501c 100644 --- a/source/components/utilities/utalloc.c +++ b/source/components/utilities/utalloc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utascii.c b/source/components/utilities/utascii.c index db2389024..6f6d92298 100644 --- a/source/components/utilities/utascii.c +++ b/source/components/utilities/utascii.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utbuffer.c b/source/components/utilities/utbuffer.c index 2cf097bf5..be1082e8c 100644 --- a/source/components/utilities/utbuffer.c +++ b/source/components/utilities/utbuffer.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utcache.c b/source/components/utilities/utcache.c index 2ff1540c1..32c527d57 100644 --- a/source/components/utilities/utcache.c +++ b/source/components/utilities/utcache.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utcksum.c b/source/components/utilities/utcksum.c new file mode 100644 index 000000000..de97d15ff --- /dev/null +++ b/source/components/utilities/utcksum.c @@ -0,0 +1,335 @@ +/****************************************************************************** + * + * Module Name: utcksum - Support generating table checksums + * + *****************************************************************************/ + +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. + * All rights reserved. + * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + ***************************************************************************** + * + * Alternatively, you may choose to be licensed under the terms of the + * following license: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Alternatively, you may choose to be licensed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + *****************************************************************************/ + +#include "acpi.h" +#include "accommon.h" +#include "acdisasm.h" +#include "acutils.h" + + +/* This module used for application-level code only */ + +#define _COMPONENT ACPI_CA_DISASSEMBLER + ACPI_MODULE_NAME ("utcksum") + + +/******************************************************************************* + * + * FUNCTION: AcpiUtVerifyChecksum + * + * PARAMETERS: Table - ACPI table to verify + * Length - Length of entire table + * + * RETURN: Status + * + * DESCRIPTION: Verifies that the table checksums to zero. Optionally returns + * exception on bad checksum. + * Note: We don't have to check for a CDAT here, since CDAT is + * not in the RSDT/XSDT, and the CDAT table is never installed + * via ACPICA. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiUtVerifyChecksum ( + ACPI_TABLE_HEADER *Table, + UINT32 Length) +{ + UINT8 Checksum; + + + /* + * FACS/S3PT: + * They are the odd tables, have no standard ACPI header and no checksum + */ + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT) || + ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS)) + { + return (AE_OK); + } + + /* Compute the checksum on the table */ + + Length = Table->Length; + Checksum = AcpiUtGenerateChecksum (ACPI_CAST_PTR (UINT8, Table), Length, Table->Checksum); + + /* Computed checksum matches table? */ + + if (Checksum != Table->Checksum) + { + ACPI_BIOS_WARNING ((AE_INFO, + "Incorrect checksum in table [%4.4s] - 0x%2.2X, " + "should be 0x%2.2X", + Table->Signature, Table->Checksum, + Table->Checksum - Checksum)); + +#if (ACPI_CHECKSUM_ABORT) + return (AE_BAD_CHECKSUM); +#endif + } + + return (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiUtVerifyCdatChecksum + * + * PARAMETERS: Table - CDAT ACPI table to verify + * Length - Length of entire table + * + * RETURN: Status + * + * DESCRIPTION: Verifies that the CDAT table checksums to zero. Optionally + * returns an exception on bad checksum. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiUtVerifyCdatChecksum ( + ACPI_TABLE_CDAT *CdatTable, + UINT32 Length) +{ + UINT8 Checksum; + + + /* Compute the checksum on the table */ + + Checksum = AcpiUtGenerateChecksum (ACPI_CAST_PTR (UINT8, CdatTable), + CdatTable->Length, CdatTable->Checksum); + + /* Computed checksum matches table? */ + + if (Checksum != CdatTable->Checksum) + { + ACPI_BIOS_WARNING ((AE_INFO, + "Incorrect checksum in table [%4.4s] - 0x%2.2X, " + "should be 0x%2.2X", + AcpiGbl_CDAT, CdatTable->Checksum, Checksum)); + +#if (ACPI_CHECKSUM_ABORT) + return (AE_BAD_CHECKSUM); +#endif + } + + CdatTable->Checksum = Checksum; + return (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiUtGenerateChecksum + * + * PARAMETERS: Table - Pointer to table to be checksummed + * Length - Length of the table + * OriginalChecksum - Value of the checksum field + * + * RETURN: 8 bit checksum of buffer + * + * DESCRIPTION: Computes an 8 bit checksum of the table. + * + ******************************************************************************/ + +UINT8 +AcpiUtGenerateChecksum ( + void *Table, + UINT32 Length, + UINT8 OriginalChecksum) +{ + UINT8 Checksum; + + + /* Sum the entire table as-is */ + + Checksum = AcpiUtChecksum ((UINT8 *) Table, Length); + + /* Subtract off the existing checksum value in the table */ + + Checksum = (UINT8) (Checksum - OriginalChecksum); + + /* Compute and return the final checksum */ + + Checksum = (UINT8) (0 - Checksum); + return (Checksum); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiUtChecksum + * + * PARAMETERS: Buffer - Pointer to memory region to be checked + * Length - Length of this memory region + * + * RETURN: Checksum (UINT8) + * + * DESCRIPTION: Calculates circular checksum of memory region. + * + ******************************************************************************/ + +UINT8 +AcpiUtChecksum ( + UINT8 *Buffer, + UINT32 Length) +{ + UINT8 Sum = 0; + UINT8 *End = Buffer + Length; + + + while (Buffer < End) + { + Sum = (UINT8) (Sum + *(Buffer++)); + } + + return (Sum); +} diff --git a/source/components/utilities/utclib.c b/source/components/utilities/utclib.c index 42f8d1714..9c49163d4 100644 --- a/source/components/utilities/utclib.c +++ b/source/components/utilities/utclib.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utcopy.c b/source/components/utilities/utcopy.c index e725d55b5..e9024bdd1 100644 --- a/source/components/utilities/utcopy.c +++ b/source/components/utilities/utcopy.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utdebug.c b/source/components/utilities/utdebug.c index baaf6a691..b6e914592 100644 --- a/source/components/utilities/utdebug.c +++ b/source/components/utilities/utdebug.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utdecode.c b/source/components/utilities/utdecode.c index 2a49cbd8d..b100c61bf 100644 --- a/source/components/utilities/utdecode.c +++ b/source/components/utilities/utdecode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utdelete.c b/source/components/utilities/utdelete.c index b36c4bb3a..1227b2115 100644 --- a/source/components/utilities/utdelete.c +++ b/source/components/utilities/utdelete.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/uterror.c b/source/components/utilities/uterror.c index 2aee4d54f..c88081f9e 100644 --- a/source/components/utilities/uterror.c +++ b/source/components/utilities/uterror.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/uteval.c b/source/components/utilities/uteval.c index f4ccea68b..bccbdda5a 100644 --- a/source/components/utilities/uteval.c +++ b/source/components/utilities/uteval.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utexcep.c b/source/components/utilities/utexcep.c index 279d33fcd..094df3ab4 100644 --- a/source/components/utilities/utexcep.c +++ b/source/components/utilities/utexcep.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utglobal.c b/source/components/utilities/utglobal.c index 43de5c0a7..28e4c341d 100644 --- a/source/components/utilities/utglobal.c +++ b/source/components/utilities/utglobal.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/uthex.c b/source/components/utilities/uthex.c index c64d3def8..801627e2d 100644 --- a/source/components/utilities/uthex.c +++ b/source/components/utilities/uthex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utids.c b/source/components/utilities/utids.c index 498338a10..3df4d97db 100644 --- a/source/components/utilities/utids.c +++ b/source/components/utilities/utids.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utinit.c b/source/components/utilities/utinit.c index e3774bac3..1e21ebdc3 100644 --- a/source/components/utilities/utinit.c +++ b/source/components/utilities/utinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utlock.c b/source/components/utilities/utlock.c index 9357279b3..e56b74843 100644 --- a/source/components/utilities/utlock.c +++ b/source/components/utilities/utlock.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utmath.c b/source/components/utilities/utmath.c index b534bb3e0..b854368e6 100644 --- a/source/components/utilities/utmath.c +++ b/source/components/utilities/utmath.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utmisc.c b/source/components/utilities/utmisc.c index 1efe0afc9..64e33672f 100644 --- a/source/components/utilities/utmisc.c +++ b/source/components/utilities/utmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utmutex.c b/source/components/utilities/utmutex.c index 1f1c1d82d..2ce621fa3 100644 --- a/source/components/utilities/utmutex.c +++ b/source/components/utilities/utmutex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utnonansi.c b/source/components/utilities/utnonansi.c index e3c2f460d..5db704223 100644 --- a/source/components/utilities/utnonansi.c +++ b/source/components/utilities/utnonansi.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utobject.c b/source/components/utilities/utobject.c index 52e02beb9..f53f31637 100644 --- a/source/components/utilities/utobject.c +++ b/source/components/utilities/utobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utosi.c b/source/components/utilities/utosi.c index 700f30a68..b6431c883 100644 --- a/source/components/utilities/utosi.c +++ b/source/components/utilities/utosi.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utownerid.c b/source/components/utilities/utownerid.c index 30ba6b750..ad2796be3 100644 --- a/source/components/utilities/utownerid.c +++ b/source/components/utilities/utownerid.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utpredef.c b/source/components/utilities/utpredef.c index 7f97ee7c4..6afc65594 100644 --- a/source/components/utilities/utpredef.c +++ b/source/components/utilities/utpredef.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utprint.c b/source/components/utilities/utprint.c index 4d9252ac5..7d8611b03 100644 --- a/source/components/utilities/utprint.c +++ b/source/components/utilities/utprint.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utresdecode.c b/source/components/utilities/utresdecode.c index 12ab68758..3003925a9 100644 --- a/source/components/utilities/utresdecode.c +++ b/source/components/utilities/utresdecode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utresrc.c b/source/components/utilities/utresrc.c index 26c382d87..03e93be34 100644 --- a/source/components/utilities/utresrc.c +++ b/source/components/utilities/utresrc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utstate.c b/source/components/utilities/utstate.c index f089ffeaa..ec13a07aa 100644 --- a/source/components/utilities/utstate.c +++ b/source/components/utilities/utstate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utstring.c b/source/components/utilities/utstring.c index 5af4c4d36..aed0d10c7 100644 --- a/source/components/utilities/utstring.c +++ b/source/components/utilities/utstring.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -308,7 +308,7 @@ AcpiUtRepairName ( return; } - ACPI_COPY_NAMESEG (&OriginalName, Name); + ACPI_COPY_NAMESEG (&OriginalName, &Name[0]); /* Check each character in the name */ @@ -321,10 +321,10 @@ AcpiUtRepairName ( /* * Replace a bad character with something printable, yet technically - * still invalid. This prevents any collisions with existing "good" + * "odd". This prevents any collisions with existing "good" * names in the namespace. */ - Name[i] = '*'; + Name[i] = '_'; FoundBadChar = TRUE; } @@ -335,8 +335,8 @@ AcpiUtRepairName ( if (!AcpiGbl_EnableInterpreterSlack) { ACPI_WARNING ((AE_INFO, - "Invalid character(s) in name (0x%.8X), repaired: [%4.4s]", - OriginalName, Name)); + "Invalid character(s) in name (0x%.8X) %p, repaired: [%4.4s]", + OriginalName, Name, &Name[0])); } else { diff --git a/source/components/utilities/utstrsuppt.c b/source/components/utilities/utstrsuppt.c index 0487a4f63..31e720c94 100644 --- a/source/components/utilities/utstrsuppt.c +++ b/source/components/utilities/utstrsuppt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utstrtoul64.c b/source/components/utilities/utstrtoul64.c index 1ef50eac0..1aee5d02a 100644 --- a/source/components/utilities/utstrtoul64.c +++ b/source/components/utilities/utstrtoul64.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/uttrack.c b/source/components/utilities/uttrack.c index 7791fe9b7..77e1b659a 100644 --- a/source/components/utilities/uttrack.c +++ b/source/components/utilities/uttrack.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utuuid.c b/source/components/utilities/utuuid.c index 8fd85d629..055086f12 100644 --- a/source/components/utilities/utuuid.c +++ b/source/components/utilities/utuuid.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxface.c b/source/components/utilities/utxface.c index 74a8ff485..d335bb1a2 100644 --- a/source/components/utilities/utxface.c +++ b/source/components/utilities/utxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxferror.c b/source/components/utilities/utxferror.c index 77701dfec..6534e1a1f 100644 --- a/source/components/utilities/utxferror.c +++ b/source/components/utilities/utxferror.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxfinit.c b/source/components/utilities/utxfinit.c index 865fe9d2d..0ccaf5caa 100644 --- a/source/components/utilities/utxfinit.c +++ b/source/components/utilities/utxfinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxfmutex.c b/source/components/utilities/utxfmutex.c index 2e77fc95a..cec55dfc2 100644 --- a/source/components/utilities/utxfmutex.c +++ b/source/components/utilities/utxfmutex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acapps.h b/source/include/acapps.h index 382ab1700..9662e5117 100644 --- a/source/include/acapps.h +++ b/source/include/acapps.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -159,7 +159,7 @@ /* Common info for tool signons */ #define ACPICA_NAME "Intel ACPI Component Architecture" -#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2022 Intel Corporation" +#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2023 Intel Corporation" #if ACPI_MACHINE_WIDTH == 64 #define ACPI_WIDTH " (64-bit version)" diff --git a/source/include/acbuffer.h b/source/include/acbuffer.h index 0739feb52..63225aa7d 100644 --- a/source/include/acbuffer.h +++ b/source/include/acbuffer.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acclib.h b/source/include/acclib.h index 75c48119c..d03652c1a 100644 --- a/source/include/acclib.h +++ b/source/include/acclib.h @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/accommon.h b/source/include/accommon.h index 210035cd4..219372d3b 100644 --- a/source/include/accommon.h +++ b/source/include/accommon.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acconfig.h b/source/include/acconfig.h index 8ba7dc284..5ae00322e 100644 --- a/source/include/acconfig.h +++ b/source/include/acconfig.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -335,6 +335,8 @@ #define ACPI_PRM_INPUT_BUFFER_SIZE 26 +#define ACPI_FFH_INPUT_BUFFER_SIZE 256 + /* _SxD and _SxW control methods */ #define ACPI_NUM_SxD_METHODS 4 diff --git a/source/include/acconvert.h b/source/include/acconvert.h index 048fd53e4..3aa36a8bf 100644 --- a/source/include/acconvert.h +++ b/source/include/acconvert.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acdebug.h b/source/include/acdebug.h index 6716a094d..c1596ee89 100644 --- a/source/include/acdebug.h +++ b/source/include/acdebug.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h index 352417cbb..e8a559fda 100644 --- a/source/include/acdisasm.h +++ b/source/include/acdisasm.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -260,6 +260,7 @@ typedef enum ACPI_DMT_AEST_XRUPT, ACPI_DMT_AGDI, ACPI_DMT_ASF, + ACPI_DMT_CDAT, ACPI_DMT_CEDT, ACPI_DMT_DMAR, ACPI_DMT_DMAR_SCOPE, @@ -279,6 +280,7 @@ typedef enum ACPI_DMT_IVRS_UNTERMINATED_STRING, ACPI_DMT_LPIT, ACPI_DMT_MADT, + ACPI_DMT_MPAM_LOCATOR, ACPI_DMT_NFIT, ACPI_DMT_NHLT1, ACPI_DMT_NHLT1a, @@ -402,6 +404,16 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoBdat[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoBoot[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoBert[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoBgrt[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoCcel[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdatTableHdr[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdatHeader[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat0[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat1[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat2[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat3[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat4[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat5[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdatEntries[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedtHdr[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedt0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedt1[]; @@ -539,6 +551,17 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadtHdr[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMchi[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpam0[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1A[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1B[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1C[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1D[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1E[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1F[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1G[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpam1Deps[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpam2[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst0[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst0A[]; @@ -748,6 +771,14 @@ AcpiDmDumpAsf ( ACPI_TABLE_HEADER *Table); void +AcpiDmDumpCcel ( + ACPI_TABLE_HEADER *Table); + +void +AcpiDmDumpCdat ( + ACPI_TABLE_HEADER *Table); + +void AcpiDmDumpCedt ( ACPI_TABLE_HEADER *Table); @@ -820,6 +851,10 @@ AcpiDmDumpMcfg ( ACPI_TABLE_HEADER *Table); void +AcpiDmDumpMpam ( + ACPI_TABLE_HEADER *Table); + +void AcpiDmDumpMpst ( ACPI_TABLE_HEADER *Table); diff --git a/source/include/acdispat.h b/source/include/acdispat.h index 2c44c9f19..3e8ad8106 100644 --- a/source/include/acdispat.h +++ b/source/include/acdispat.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acevents.h b/source/include/acevents.h index f8c5d7769..f9972d8de 100644 --- a/source/include/acevents.h +++ b/source/include/acevents.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acexcep.h b/source/include/acexcep.h index 92e949722..9271dc4c8 100644 --- a/source/include/acexcep.h +++ b/source/include/acexcep.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acglobal.h b/source/include/acglobal.h index eddecc9f8..1010f768a 100644 --- a/source/include/acglobal.h +++ b/source/include/acglobal.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -167,6 +167,7 @@ ACPI_GLOBAL (ACPI_TABLE_LIST, AcpiGbl_RootTableList); ACPI_GLOBAL (ACPI_TABLE_HEADER *, AcpiGbl_DSDT); ACPI_GLOBAL (ACPI_TABLE_HEADER, AcpiGbl_OriginalDsdtHeader); +ACPI_INIT_GLOBAL (char *, AcpiGbl_CDAT, NULL); ACPI_INIT_GLOBAL (UINT32, AcpiGbl_DsdtIndex, ACPI_INVALID_TABLE_INDEX); ACPI_INIT_GLOBAL (UINT32, AcpiGbl_FacsIndex, ACPI_INVALID_TABLE_INDEX); ACPI_INIT_GLOBAL (UINT32, AcpiGbl_XFacsIndex, ACPI_INVALID_TABLE_INDEX); diff --git a/source/include/achware.h b/source/include/achware.h index 256008c74..6e0631e05 100644 --- a/source/include/achware.h +++ b/source/include/achware.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acinterp.h b/source/include/acinterp.h index d9cec3455..4c36708a0 100644 --- a/source/include/acinterp.h +++ b/source/include/acinterp.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/aclocal.h b/source/include/aclocal.h index 74eb6e27f..08e18500d 100644 --- a/source/include/aclocal.h +++ b/source/include/aclocal.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acmacros.h b/source/include/acmacros.h index 11fd47cc3..66c90b6ab 100644 --- a/source/include/acmacros.h +++ b/source/include/acmacros.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acnames.h b/source/include/acnames.h index 846d192b2..a6cdd2e2c 100644 --- a/source/include/acnames.h +++ b/source/include/acnames.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acnamesp.h b/source/include/acnamesp.h index 7b8d069d6..432d9d447 100644 --- a/source/include/acnamesp.h +++ b/source/include/acnamesp.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acobject.h b/source/include/acobject.h index b2c9dd9b7..4454c572b 100644 --- a/source/include/acobject.h +++ b/source/include/acobject.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acopcode.h b/source/include/acopcode.h index 7e54a47f7..f2ce2cd53 100644 --- a/source/include/acopcode.h +++ b/source/include/acopcode.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acoutput.h b/source/include/acoutput.h index cd3d26d52..502d9a94f 100644 --- a/source/include/acoutput.h +++ b/source/include/acoutput.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acparser.h b/source/include/acparser.h index 4437d612e..0dd0e3456 100644 --- a/source/include/acparser.h +++ b/source/include/acparser.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acpi.h b/source/include/acpi.h index 081e3b7d2..445e4413e 100644 --- a/source/include/acpi.h +++ b/source/include/acpi.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acpiosxf.h b/source/include/acpiosxf.h index 67c110136..c4857cae9 100644 --- a/source/include/acpiosxf.h +++ b/source/include/acpiosxf.h @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acpixf.h b/source/include/acpixf.h index f62c16cbd..a23978c1f 100644 --- a/source/include/acpixf.h +++ b/source/include/acpixf.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -154,7 +154,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20220331 +#define ACPI_CA_VERSION 0x20221020 #include "acconfig.h" #include "actypes.h" @@ -770,7 +770,7 @@ ACPI_EXTERNAL_RETURN_STATUS ( ACPI_STATUS AcpiGetHandle ( ACPI_HANDLE Parent, - ACPI_STRING Pathname, + const char *Pathname, ACPI_HANDLE *RetHandle)) ACPI_EXTERNAL_RETURN_STATUS ( @@ -944,6 +944,21 @@ AcpiInstallAddressSpaceHandler ( ACPI_EXTERNAL_RETURN_STATUS ( ACPI_STATUS +AcpiInstallAddressSpaceHandlerNo_Reg( + ACPI_HANDLE Device, + ACPI_ADR_SPACE_TYPE SpaceId, + ACPI_ADR_SPACE_HANDLER Handler, + ACPI_ADR_SPACE_SETUP Setup, + void *Context)) + +ACPI_EXTERNAL_RETURN_STATUS ( +ACPI_STATUS +AcpiExecuteRegMethods ( + ACPI_HANDLE Device, + ACPI_ADR_SPACE_TYPE SpaceId)) + +ACPI_EXTERNAL_RETURN_STATUS ( +ACPI_STATUS AcpiRemoveAddressSpaceHandler ( ACPI_HANDLE Device, ACPI_ADR_SPACE_TYPE SpaceId, diff --git a/source/include/acpredef.h b/source/include/acpredef.h index 9ad8c0ffc..ca47e7cc0 100644 --- a/source/include/acpredef.h +++ b/source/include/acpredef.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acresrc.h b/source/include/acresrc.h index 8214ed835..7d7fda538 100644 --- a/source/include/acresrc.h +++ b/source/include/acresrc.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/acrestyp.h b/source/include/acrestyp.h index f045c2000..f48ae7614 100644 --- a/source/include/acrestyp.h +++ b/source/include/acrestyp.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -538,7 +538,7 @@ typedef struct acpi_resource_extended_irq UINT8 WakeCapable; UINT8 InterruptCount; ACPI_RESOURCE_SOURCE ResourceSource; - UINT32 Interrupts[1]; + UINT32 Interrupts[]; } ACPI_RESOURCE_EXTENDED_IRQ; @@ -927,8 +927,10 @@ typedef struct acpi_pci_routing_table UINT32 Pin; UINT64 Address; /* here for 64-bit alignment */ UINT32 SourceIndex; - char Source[4]; /* pad to 64 bits so sizeof() works in all cases */ - + union { + char Pad[4]; /* pad to 64 bits so sizeof() works in all cases */ + ACPI_FLEX_ARRAY(char, Source); + }; } ACPI_PCI_ROUTING_TABLE; #endif /* __ACRESTYP_H__ */ diff --git a/source/include/acstruct.h b/source/include/acstruct.h index d50c7a1b6..fe0871794 100644 --- a/source/include/acstruct.h +++ b/source/include/acstruct.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/actables.h b/source/include/actables.h index 40b79a47c..21c344358 100644 --- a/source/include/actables.h +++ b/source/include/actables.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -345,16 +345,6 @@ AcpiTbPrintTableHeader( ACPI_PHYSICAL_ADDRESS Address, ACPI_TABLE_HEADER *Header); -UINT8 -AcpiTbChecksum ( - UINT8 *Buffer, - UINT32 Length); - -ACPI_STATUS -AcpiTbVerifyChecksum ( - ACPI_TABLE_HEADER *Table, - UINT32 Length); - void AcpiTbCheckDsdtHeader ( void); diff --git a/source/include/actbinfo.h b/source/include/actbinfo.h index 633f7349b..575955ba1 100644 --- a/source/include/actbinfo.h +++ b/source/include/actbinfo.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -161,6 +161,7 @@ #define ACPI_BERT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BERT,f) #define ACPI_BGRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BGRT,f) #define ACPI_BOOT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BOOT,f) +#define ACPI_CCEL_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_CCEL,f) #define ACPI_CPEP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_CPEP,f) #define ACPI_DBG2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_DBG2,f) #define ACPI_DBGP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_DBGP,f) @@ -233,6 +234,15 @@ #define ACPI_ASF2a_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_CONTROL_DATA,f) #define ACPI_ASF3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_RMCP,f) #define ACPI_ASF4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ADDRESS,f) +#define ACPI_CDAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_CDAT,f) +#define ACPI_CDATH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_HEADER,f) +#define ACPI_CDAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_DSMAS,f) +#define ACPI_CDAT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_DSLBIS,f) +#define ACPI_CDAT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_DSMSCIS,f) +#define ACPI_CDAT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_DSIS,f) +#define ACPI_CDAT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_DSEMTS,f) +#define ACPI_CDAT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_SSLBIS,f) +#define ACPI_CDATE_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_SSLBE,f) #define ACPI_CEDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_HEADER, f) #define ACPI_CEDT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_CHBS, f) #define ACPI_CEDT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_CFMWS, f) @@ -321,6 +331,16 @@ #define ACPI_MADT17_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_OEM_DATA,f) #define ACPI_MADTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f) #define ACPI_MCFG0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MCFG_ALLOCATION,f) +#define ACPI_MPAM0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPAM_MSC_NODE,f) +#define ACPI_MPAM1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPAM_RESOURCE_NODE,f) +#define ACPI_MPAM1A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPAM_RESOURCE_CACHE_LOCATOR,f) +#define ACPI_MPAM1B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPAM_RESOURCE_MEMORY_LOCATOR,f) +#define ACPI_MPAM1C_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPAM_RESOURCE_SMMU_INTERFACE,f) +#define ACPI_MPAM1D_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPAM_RESOURCE_MEMCACHE_INTERFACE,f) +#define ACPI_MPAM1E_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPAM_RESOURCE_ACPI_INTERFACE,f) +#define ACPI_MPAM1F_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPAM_RESOURCE_INTERCONNECT_INTERFACE,f) +#define ACPI_MPAM1G_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPAM_RESOURCE_GENERIC_LOCATOR,f) +#define ACPI_MPAM2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPAM_FUNC_DEPS,f) #define ACPI_MPST0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_NODE,f) #define ACPI_MPST0A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_STATE,f) #define ACPI_MPST0B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_COMPONENT,f) diff --git a/source/include/actbl.h b/source/include/actbl.h index f23080fb4..2a1484910 100644 --- a/source/include/actbl.h +++ b/source/include/actbl.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/actbl1.h b/source/include/actbl1.h index 3de78b0d8..092351c48 100644 --- a/source/include/actbl1.h +++ b/source/include/actbl1.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -189,6 +189,7 @@ #define ACPI_SIG_HMAT "HMAT" /* Heterogeneous Memory Attributes Table */ #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ #define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */ +#define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table*/ #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */ #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */ @@ -496,10 +497,151 @@ typedef struct acpi_table_boot /******************************************************************************* * + * CDAT - Coherent Device Attribute Table + * Version 1 + * + * Conforms to the "Coherent Device Attribute Table (CDAT) Specification + " (Revision 1.01, October 2020.) + * + ******************************************************************************/ + +typedef struct acpi_table_cdat +{ + UINT32 Length; /* Length of table in bytes, including this header */ + UINT8 Revision; /* ACPI Specification minor version number */ + UINT8 Checksum; /* To make sum of entire table == 0 */ + UINT8 Reserved[6]; + UINT32 Sequence; /* Used to detect runtime CDAT table changes */ + +} ACPI_TABLE_CDAT; + + +/* CDAT common subtable header */ + +typedef struct acpi_cdat_header +{ + UINT8 Type; + UINT8 Reserved; + UINT16 Length; + +} ACPI_CDAT_HEADER; + +/* Values for Type field above */ + +enum AcpiCdatType +{ + ACPI_CDAT_TYPE_DSMAS = 0, + ACPI_CDAT_TYPE_DSLBIS = 1, + ACPI_CDAT_TYPE_DSMSCIS = 2, + ACPI_CDAT_TYPE_DSIS = 3, + ACPI_CDAT_TYPE_DSEMTS = 4, + ACPI_CDAT_TYPE_SSLBIS = 5, + ACPI_CDAT_TYPE_RESERVED = 6 /* 6 through 0xFF are reserved */ +}; + + +/* Subtable 0: Device Scoped Memory Affinity Structure (DSMAS) */ + +typedef struct acpi_cdat_dsmas +{ + UINT8 DsmadHandle; + UINT8 Flags; + UINT16 Reserved; + UINT64 DpaBaseAddress; + UINT64 DpaLength; + +} ACPI_CDAT_DSMAS; + +/* Flags for subtable above */ + +#define ACPI_CEDT_DSMAS_NON_VOLATILE (1 << 2) + + +/* Subtable 1: Device scoped Latency and Bandwidth Information Structure (DSLBIS) */ + +typedef struct acpi_cdat_dslbis +{ + UINT8 Handle; + UINT8 Flags; /* If Handle matches a DSMAS handle, the definition of this field matches + * Flags field in HMAT System Locality Latency */ + UINT8 DataType; + UINT8 Reserved; + UINT64 EntryBaseUnit; + UINT16 Entry[3]; + UINT16 Reserved2; + +} ACPI_CDAT_DSLBIS; + + +/* Subtable 2: Device Scoped Memory Side Cache Information Structure (DSMSCIS) */ + +typedef struct acpi_cdat_dsmscis +{ + UINT8 DsmasHandle; + UINT8 Reserved[3]; + UINT64 SideCacheSize; + UINT32 CacheAttributes; + +} ACPI_CDAT_DSMSCIS; + + +/* Subtable 3: Device Scoped Initiator Structure (DSIS) */ + +typedef struct acpi_cdat_dsis +{ + UINT8 Flags; + UINT8 Handle; + UINT16 Reserved; + +} ACPI_CDAT_DSIS; + +/* Flags for above subtable */ + +#define ACPI_CDAT_DSIS_MEM_ATTACHED (1 << 0) + + +/* Subtable 4: Device Scoped EFI Memory Type Structure (DSEMTS) */ + +typedef struct acpi_cdat_dsemts +{ + UINT8 DsmasHandle; + UINT8 MemoryType; + UINT16 Reserved; + UINT64 DpaOffset; + UINT64 RangeLength; + +} ACPI_CDAT_DSEMTS; + + +/* Subtable 5: Switch Scoped Latency and Bandwidth Information Structure (SSLBIS) */ + +typedef struct acpi_cdat_sslbis +{ + UINT8 DataType; + UINT8 Reserved[3]; + UINT64 EntryBaseUnit; + +} ACPI_CDAT_SSLBIS; + + +/* Sub-subtable for above, SslbeEntries field */ + +typedef struct acpi_cdat_sslbe +{ + UINT16 PortxId; + UINT16 PortyId; + UINT16 LatencyOrBandwidth; + UINT16 Reserved; + +} ACPI_CDAT_SSLBE; + + +/******************************************************************************* + * * CEDT - CXL Early Discovery Table * Version 1 * - * Conforms to the "CXL Early Discovery Table" (CXL 2.0) + * Conforms to the "CXL Early Discovery Table" (CXL 2.0, October 2020) * ******************************************************************************/ @@ -525,7 +667,9 @@ enum AcpiCedtType { ACPI_CEDT_TYPE_CHBS = 0, ACPI_CEDT_TYPE_CFMWS = 1, - ACPI_CEDT_TYPE_RESERVED = 2, + ACPI_CEDT_TYPE_CXIMS = 2, + ACPI_CEDT_TYPE_RDPAS = 3, + ACPI_CEDT_TYPE_RESERVED = 4, }; /* Values for version field above */ @@ -583,6 +727,7 @@ typedef struct acpi_cedt_cfmws_target_element /* Values for Interleave Arithmetic field above */ #define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0) +#define ACPI_CEDT_CFMWS_ARITHMETIC_XOR (1) /* Values for Restrictions field above */ @@ -592,6 +737,35 @@ typedef struct acpi_cedt_cfmws_target_element #define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3) #define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4) +/* 2: CXL XOR Interleave Math Structure */ + +struct acpi_cedt_cxims { + ACPI_CEDT_HEADER Header; + UINT16 Reserved1; + UINT8 Hbig; + UINT8 NrXormaps; + UINT64 XormapList[]; +}; + +/* 3: CXL RCEC Downstream Port Association Structure */ + +struct acpi_cedt_rdpas { + ACPI_CEDT_HEADER Header; + UINT8 Reserved1; + UINT16 Length; + UINT16 Segment; + UINT16 Bdf; + UINT8 Protocol; + UINT64 Address; +}; + +/* Masks for bdf field above */ +#define ACPI_CEDT_RDPAS_BUS_MASK 0xff00 +#define ACPI_CEDT_RDPAS_DEVICE_MASK 0x00f8 +#define ACPI_CEDT_RDPAS_FUNCTION_MASK 0x0007 + +#define ACPI_CEDT_RDPAS_PROTOCOL_IO (0) +#define ACPI_CEDT_RDPAS_PROTOCOL_CACHEMEM (1) /******************************************************************************* * diff --git a/source/include/actbl2.h b/source/include/actbl2.h index 1460d3d01..41bbfe888 100644 --- a/source/include/actbl2.h +++ b/source/include/actbl2.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -171,14 +171,16 @@ #define ACPI_SIG_AGDI "AGDI" /* Arm Generic Diagnostic Dump and Reset Device Interface */ #define ACPI_SIG_APMT "APMT" /* Arm Performance Monitoring Unit table */ #define ACPI_SIG_BDAT "BDAT" /* BIOS Data ACPI Table */ +#define ACPI_SIG_CCEL "CCEL" /* CC Event Log Table */ +#define ACPI_SIG_CDAT "CDAT" /* Coherent Device Attribute Table */ #define ACPI_SIG_IORT "IORT" /* IO Remapping Table */ #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */ #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */ #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ +#define ACPI_SIG_MPAM "MPAM" /* Memory System Resource Partitioning and Monitoring Table */ #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */ -#define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */ #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */ #define ACPI_SIG_NHLT "NHLT" /* Non HD Audio Link Table */ @@ -521,13 +523,31 @@ typedef struct acpi_table_bdat } ACPI_TABLE_BDAT; +/******************************************************************************* + * + * CCEL - CC-Event Log + * From: "Guest-Host-Communication Interface (GHCI) for Intel + * Trust Domain Extensions (Intel TDX)". Feb 2022 + * + ******************************************************************************/ + +typedef struct acpi_table_ccel +{ + ACPI_TABLE_HEADER Header; /* Common ACPI table header */ + UINT8 CCType; + UINT8 CCSubType; + UINT16 Reserved; + UINT64 LogAreaMinimumLength; + UINT64 LogAreaStartAddress; + +} ACPI_TABLE_CCEL; /******************************************************************************* * * IORT - IO Remapping Table * * Conforms to "IO Remapping Table System Software on ARM Platforms", - * Document number: ARM DEN 0049E.d, Feb 2022 + * Document number: ARM DEN 0049E.e, Sep 2022 * ******************************************************************************/ @@ -725,6 +745,7 @@ typedef struct acpi_iort_smmu_v3 #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1) #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (3<<1) #define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3) +#define ACPI_IORT_SMMU_V3_DEVICEID_VALID (1<<4) typedef struct acpi_iort_pmcg { @@ -1270,7 +1291,7 @@ typedef struct acpi_madt_local_x2apic_nmi } ACPI_MADT_LOCAL_X2APIC_NMI; -/* 11: Generic Interrupt - GICC (ACPI 5.0 + ACPI 6.0 + ACPI 6.3 changes) */ +/* 11: Generic Interrupt - GICC (ACPI 5.0 + ACPI 6.0 + ACPI 6.3 + ACPI 6.5 changes) */ typedef struct acpi_madt_generic_interrupt { @@ -1291,6 +1312,7 @@ typedef struct acpi_madt_generic_interrupt UINT8 EfficiencyClass; UINT8 Reserved2[1]; UINT16 SpeInterrupt; /* ACPI 6.3 */ + UINT16 TrbeInterrupt; /* ACPI 6.5 */ } ACPI_MADT_GENERIC_INTERRUPT; @@ -1530,7 +1552,7 @@ enum AcpiMadtLpcPicVersion { typedef struct acpi_madt_oem_data { - UINT8 OemData[0]; + ACPI_FLEX_ARRAY(UINT8, OemData); } ACPI_MADT_OEM_DATA; @@ -1619,6 +1641,132 @@ typedef struct acpi_table_mchi } ACPI_TABLE_MCHI; +/******************************************************************************* + * + * MPAM - Memory System Resource Partitioning and Monitoring + * + * Conforms to "ACPI for Memory System Resource Partitioning and Monitoring 2.0" + * Document number: ARM DEN 0065, December, 2022. + * + ******************************************************************************/ + +/* MPAM RIS locator types. Table 11, Location types */ +enum AcpiMpamLocatorType { + ACPI_MPAM_LOCATION_TYPE_PROCESSOR_CACHE = 0, + ACPI_MPAM_LOCATION_TYPE_MEMORY = 1, + ACPI_MPAM_LOCATION_TYPE_SMMU = 2, + ACPI_MPAM_LOCATION_TYPE_MEMORY_CACHE = 3, + ACPI_MPAM_LOCATION_TYPE_ACPI_DEVICE = 4, + ACPI_MPAM_LOCATION_TYPE_INTERCONNECT = 5, + ACPI_MPAM_LOCATION_TYPE_UNKNOWN = 0xFF +}; + +/* MPAM Functional dependency descriptor. Table 10 */ +typedef struct acpi_mpam_func_deps +{ + UINT32 Producer; + UINT32 Reserved; +} ACPI_MPAM_FUNC_DEPS; + +/* MPAM Processor cache locator descriptor. Table 13 */ +typedef struct acpi_mpam_resource_cache_locator +{ + UINT64 CacheReference; + UINT32 Reserved; +} ACPI_MPAM_RESOURCE_CACHE_LOCATOR; + +/* MPAM Memory locator descriptor. Table 14 */ +typedef struct acpi_mpam_resource_memory_locator +{ + UINT64 ProximityDomain; + UINT32 Reserved; +} ACPI_MPAM_RESOURCE_MEMORY_LOCATOR; + +/* MPAM SMMU locator descriptor. Table 15 */ +typedef struct acpi_mpam_resource_smmu_locator +{ + UINT64 SmmuInterface; + UINT32 Reserved; +} ACPI_MPAM_RESOURCE_SMMU_INTERFACE; + +/* MPAM Memory-side cache locator descriptor. Table 16 */ +typedef struct acpi_mpam_resource_memcache_locator +{ + UINT8 Reserved[7]; + UINT8 Level; + UINT32 Reference; +} ACPI_MPAM_RESOURCE_MEMCACHE_INTERFACE; + +/* MPAM ACPI device locator descriptor. Table 17 */ +typedef struct acpi_mpam_resource_acpi_locator +{ + UINT64 AcpiHwId; + UINT32 AcpiUniqueId; +} ACPI_MPAM_RESOURCE_ACPI_INTERFACE; + +/* MPAM Interconnect locator descriptor. Table 18 */ +typedef struct acpi_mpam_resource_interconnect_locator +{ + UINT64 InterConnectDescTblOff; + UINT32 Reserved; +} ACPI_MPAM_RESOURCE_INTERCONNECT_INTERFACE; + +/* MPAM Locator structure. Table 12 */ +typedef struct acpi_mpam_resource_generic_locator +{ + UINT64 Descriptor1; + UINT32 Descriptor2; +} ACPI_MPAM_RESOURCE_GENERIC_LOCATOR; + +typedef union acpi_mpam_resource_locator +{ + ACPI_MPAM_RESOURCE_CACHE_LOCATOR CacheLocator; + ACPI_MPAM_RESOURCE_MEMORY_LOCATOR MemoryLocator; + ACPI_MPAM_RESOURCE_SMMU_INTERFACE SmmuLocator; + ACPI_MPAM_RESOURCE_MEMCACHE_INTERFACE MemCacheLocator; + ACPI_MPAM_RESOURCE_ACPI_INTERFACE AcpiLocator; + ACPI_MPAM_RESOURCE_INTERCONNECT_INTERFACE InterconnectIfcLocator; + ACPI_MPAM_RESOURCE_GENERIC_LOCATOR GenericLocator; +} ACPI_MPAM_RESOURCE_LOCATOR; + +/* Memory System Component Resource Node Structure Table 9 */ +typedef struct acpi_mpam_resource_node +{ + UINT32 Identifier; + UINT8 RISIndex; + UINT16 Reserved1; + UINT8 LocatorType; + ACPI_MPAM_RESOURCE_LOCATOR Locator; + UINT32 NumFunctionalDeps; +} ACPI_MPAM_RESOURCE_NODE; + +/* Memory System Component (MSC) Node Structure. Table 4 */ +typedef struct acpi_mpam_msc_node +{ + UINT16 Length; + UINT8 InterfaceType; + UINT8 Reserved; + UINT32 Identifier; + UINT64 BaseAddress; + UINT32 MMIOSize; + UINT32 OverflowInterrupt; + UINT32 OverflowInterruptFlags; + UINT32 Reserved1; + UINT32 OverflowInterruptAffinity; + UINT32 ErrorInterrupt; + UINT32 ErrorInterruptFlags; + UINT32 Reserved2; + UINT32 ErrorInterruptAffinity; + UINT32 MaxNrdyUsec; + UINT64 HardwareIdLinkedDevice; + UINT32 InstanceIdLinkedDevice; + UINT32 NumResouceNodes; +} ACPI_MPAM_MSC_NODE; + +typedef struct acpi_table_mpam +{ + ACPI_TABLE_HEADER Header; /* Common ACPI table header */ +} ACPI_TABLE_MPAM; /******************************************************************************* * diff --git a/source/include/actbl3.h b/source/include/actbl3.h index 7cc633a27..15ef01959 100644 --- a/source/include/actbl3.h +++ b/source/include/actbl3.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/actypes.h b/source/include/actypes.h index b7f22172f..8486d2b98 100644 --- a/source/include/actypes.h +++ b/source/include/actypes.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -1336,6 +1336,12 @@ typedef struct acpi_pcc_info { UINT8 *InternalBuffer; } ACPI_PCC_INFO; +/* Special Context data for FFH Opregion (ACPI 6.5) */ + +typedef struct acpi_ffh_info { + UINT64 Offset; + UINT64 Length; +} ACPI_FFH_INFO; typedef ACPI_STATUS (*ACPI_ADR_SPACE_SETUP) ( diff --git a/source/include/acutils.h b/source/include/acutils.h index f23ee559b..e9e627499 100644 --- a/source/include/acutils.h +++ b/source/include/acutils.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -318,6 +318,31 @@ AcpiUtCheckAndRepairAscii ( /* + * utcksum - Checksum utilities + */ +UINT8 +AcpiUtGenerateChecksum ( + void *Table, + UINT32 Length, + UINT8 OriginalChecksum); + +UINT8 +AcpiUtChecksum ( + UINT8 *Buffer, + UINT32 Length); + +ACPI_STATUS +AcpiUtVerifyCdatChecksum ( + ACPI_TABLE_CDAT *CdatTable, + UINT32 Length); + +ACPI_STATUS +AcpiUtVerifyChecksum ( + ACPI_TABLE_HEADER *Table, + UINT32 Length); + + +/* * utnonansi - Non-ANSI C library functions */ void diff --git a/source/include/acuuid.h b/source/include/acuuid.h index bc41fa40b..cf3abc0fc 100644 --- a/source/include/acuuid.h +++ b/source/include/acuuid.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -211,5 +211,6 @@ #define UUID_HIERARCHICAL_DATA_EXTENSION "dbb8e3e6-5886-4ba6-8795-1319f52a966b" #define UUID_CORESIGHT_GRAPH "3ecbc8b6-1d0e-4fb3-8107-e627f805c6cd" #define UUID_USB4_CAPABILITIES "23a0d13a-26ab-486c-9c5f-0ffa525a575a" - +#define UUID_1ST_FUNCTION_ID "893f00a6-660c-494e-bcfd-3043f4fb67c0" +#define UUID_2ND_FUNCTION_ID "107ededd-d381-4fd7-8da9-08e9a6c79644" #endif /* __ACUUID_H__ */ diff --git a/source/include/amlcode.h b/source/include/amlcode.h index 25d591e55..62cbffad0 100644 --- a/source/include/amlcode.h +++ b/source/include/amlcode.h @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/amlresrc.h b/source/include/amlresrc.h index e89cd824d..74cfafbf1 100644 --- a/source/include/amlresrc.h +++ b/source/include/amlresrc.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/accygwin.h b/source/include/platform/accygwin.h index 217237d9b..98782ff8e 100644 --- a/source/include/platform/accygwin.h +++ b/source/include/platform/accygwin.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acdragonflyex.h b/source/include/platform/acdragonflyex.h index ba3ef0168..bfc3273b4 100644 --- a/source/include/platform/acdragonflyex.h +++ b/source/include/platform/acdragonflyex.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acefi.h b/source/include/platform/acefi.h index fefcca843..71cdf2f91 100644 --- a/source/include/platform/acefi.h +++ b/source/include/platform/acefi.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acefiex.h b/source/include/platform/acefiex.h index 83aa907b6..dce3518be 100644 --- a/source/include/platform/acefiex.h +++ b/source/include/platform/acefiex.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acenv.h b/source/include/platform/acenv.h index 674c4c7d0..4867eb02f 100644 --- a/source/include/platform/acenv.h +++ b/source/include/platform/acenv.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -419,6 +419,17 @@ #endif /* + * Flexible array members are not allowed to be part of a union under + * C99, but this is not for any technical reason. Work around the + * limitation. + */ +#define ACPI_FLEX_ARRAY(TYPE, NAME) \ + struct { \ + struct { } __Empty_ ## NAME; \ + TYPE NAME[]; \ + } + +/* * Configurable calling conventions: * * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) diff --git a/source/include/platform/acenvex.h b/source/include/platform/acenvex.h index 32db36c6e..33e19b689 100644 --- a/source/include/platform/acenvex.h +++ b/source/include/platform/acenvex.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acfreebsd.h b/source/include/platform/acfreebsd.h index 022f7165e..ffe6a4856 100644 --- a/source/include/platform/acfreebsd.h +++ b/source/include/platform/acfreebsd.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acgcc.h b/source/include/platform/acgcc.h index 3ad22a1f8..81e29f90d 100644 --- a/source/include/platform/acgcc.h +++ b/source/include/platform/acgcc.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acgccex.h b/source/include/platform/acgccex.h index 035b999d9..156bab471 100644 --- a/source/include/platform/acgccex.h +++ b/source/include/platform/acgccex.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/achaiku.h b/source/include/platform/achaiku.h index 81c1927cc..ead3261a9 100644 --- a/source/include/platform/achaiku.h +++ b/source/include/platform/achaiku.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acintel.h b/source/include/platform/acintel.h index 889c7594e..bfdc286bf 100644 --- a/source/include/platform/acintel.h +++ b/source/include/platform/acintel.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/aclinux.h b/source/include/platform/aclinux.h index a4f7d27bf..025fc8007 100644 --- a/source/include/platform/aclinux.h +++ b/source/include/platform/aclinux.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -330,7 +330,7 @@ #if defined(__ia64__) || (defined(__x86_64__) && !defined(__ILP32__)) ||\ defined(__aarch64__) || defined(__PPC64__) ||\ - defined(__s390x__) ||\ + defined(__s390x__) || defined(__loongarch__) ||\ (defined(__riscv) && (defined(__LP64__) || defined(_LP64))) #define ACPI_MACHINE_WIDTH 64 #define COMPILER_DEPENDENT_INT64 long diff --git a/source/include/platform/aclinuxex.h b/source/include/platform/aclinuxex.h index 4e84cd4b7..a10412a7b 100644 --- a/source/include/platform/aclinuxex.h +++ b/source/include/platform/aclinuxex.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acmacosx.h b/source/include/platform/acmacosx.h index 0335cc0ae..0166c2452 100644 --- a/source/include/platform/acmacosx.h +++ b/source/include/platform/acmacosx.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acmsvc.h b/source/include/platform/acmsvc.h index 736706530..d6a265d22 100644 --- a/source/include/platform/acmsvc.h +++ b/source/include/platform/acmsvc.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acmsvcex.h b/source/include/platform/acmsvcex.h index 2350d8596..306ef619c 100644 --- a/source/include/platform/acmsvcex.h +++ b/source/include/platform/acmsvcex.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acnetbsd.h b/source/include/platform/acnetbsd.h index c0e3619d6..b948a5d6d 100644 --- a/source/include/platform/acnetbsd.h +++ b/source/include/platform/acnetbsd.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acos2.h b/source/include/platform/acos2.h index fe776095e..f3b1183de 100644 --- a/source/include/platform/acos2.h +++ b/source/include/platform/acos2.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acqnx.h b/source/include/platform/acqnx.h index db1c103fa..40b50ceb9 100644 --- a/source/include/platform/acqnx.h +++ b/source/include/platform/acqnx.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acwin.h b/source/include/platform/acwin.h index dc2d1eb5b..90dc0e3ca 100644 --- a/source/include/platform/acwin.h +++ b/source/include/platform/acwin.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/include/platform/acwin64.h b/source/include/platform/acwin64.h index e20454520..f151435ab 100644 --- a/source/include/platform/acwin64.h +++ b/source/include/platform/acwin64.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/os_specific/efi/oseficlib.c b/source/os_specific/efi/oseficlib.c index bf39fd317..cf8b55e89 100644 --- a/source/os_specific/efi/oseficlib.c +++ b/source/os_specific/efi/oseficlib.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/os_specific/efi/osefitbl.c b/source/os_specific/efi/osefitbl.c index f21326538..15d5ec862 100644 --- a/source/os_specific/efi/osefitbl.c +++ b/source/os_specific/efi/osefitbl.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/os_specific/efi/osefixf.c b/source/os_specific/efi/osefixf.c index 8cf8c97df..0bcdafe15 100644 --- a/source/os_specific/efi/osefixf.c +++ b/source/os_specific/efi/osefixf.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/os_specific/service_layers/osbsdtbl.c b/source/os_specific/service_layers/osbsdtbl.c index 043dec46f..7babce61a 100644 --- a/source/os_specific/service_layers/osbsdtbl.c +++ b/source/os_specific/service_layers/osbsdtbl.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/os_specific/service_layers/oslinuxtbl.c b/source/os_specific/service_layers/oslinuxtbl.c index ad5888f10..4382c82eb 100644 --- a/source/os_specific/service_layers/oslinuxtbl.c +++ b/source/os_specific/service_layers/oslinuxtbl.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/os_specific/service_layers/osunixdir.c b/source/os_specific/service_layers/osunixdir.c index 54f53ea2d..ed69c33c5 100644 --- a/source/os_specific/service_layers/osunixdir.c +++ b/source/os_specific/service_layers/osunixdir.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/os_specific/service_layers/osunixmap.c b/source/os_specific/service_layers/osunixmap.c index 2f6e0b14b..c12528522 100644 --- a/source/os_specific/service_layers/osunixmap.c +++ b/source/os_specific/service_layers/osunixmap.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/os_specific/service_layers/osunixxf.c b/source/os_specific/service_layers/osunixxf.c index ef1651b67..addccb71a 100644 --- a/source/os_specific/service_layers/osunixxf.c +++ b/source/os_specific/service_layers/osunixxf.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/os_specific/service_layers/oswindir.c b/source/os_specific/service_layers/oswindir.c index b523102a5..30ce06d9b 100644 --- a/source/os_specific/service_layers/oswindir.c +++ b/source/os_specific/service_layers/oswindir.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/os_specific/service_layers/oswintbl.c b/source/os_specific/service_layers/oswintbl.c index e053f0568..2542e0da2 100644 --- a/source/os_specific/service_layers/oswintbl.c +++ b/source/os_specific/service_layers/oswintbl.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/os_specific/service_layers/oswinxf.c b/source/os_specific/service_layers/oswinxf.c index dc85f9bcf..532218937 100644 --- a/source/os_specific/service_layers/oswinxf.c +++ b/source/os_specific/service_layers/oswinxf.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpibin/abcompare.c b/source/tools/acpibin/abcompare.c index f974f129a..c3a42c4c6 100644 --- a/source/tools/acpibin/abcompare.c +++ b/source/tools/acpibin/abcompare.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpibin/abmain.c b/source/tools/acpibin/abmain.c index 365b437d9..6bacb2a38 100644 --- a/source/tools/acpibin/abmain.c +++ b/source/tools/acpibin/abmain.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpibin/acpibin.h b/source/tools/acpibin/acpibin.h index 510b3a855..ea90aee2b 100644 --- a/source/tools/acpibin/acpibin.h +++ b/source/tools/acpibin/acpibin.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpidump/acpidump.h b/source/tools/acpidump/acpidump.h index 87858875f..d8c14a636 100644 --- a/source/tools/acpidump/acpidump.h +++ b/source/tools/acpidump/acpidump.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpidump/apdump.c b/source/tools/acpidump/apdump.c index d66832d1a..f2e807675 100644 --- a/source/tools/acpidump/apdump.c +++ b/source/tools/acpidump/apdump.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -234,7 +234,9 @@ ApIsValidChecksum ( } else { - Status = AcpiTbVerifyChecksum (Table, Table->Length); + /* We don't have to check for a CDAT here, since CDAT is not in the RSDT/XSDT */ + + Status = AcpiUtVerifyChecksum (Table, Table->Length); } if (ACPI_FAILURE (Status)) diff --git a/source/tools/acpidump/apfiles.c b/source/tools/acpidump/apfiles.c index 16371088e..902408e9c 100644 --- a/source/tools/acpidump/apfiles.c +++ b/source/tools/acpidump/apfiles.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpidump/apmain.c b/source/tools/acpidump/apmain.c index 5fba99bb1..5bb2c24ce 100644 --- a/source/tools/acpidump/apmain.c +++ b/source/tools/acpidump/apmain.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpiexec/aecommon.h b/source/tools/acpiexec/aecommon.h index 7bfdd278c..0745aac2b 100644 --- a/source/tools/acpiexec/aecommon.h +++ b/source/tools/acpiexec/aecommon.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpiexec/aeexception.c b/source/tools/acpiexec/aeexception.c index f0903c1f6..326407c8e 100644 --- a/source/tools/acpiexec/aeexception.c +++ b/source/tools/acpiexec/aeexception.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpiexec/aeexec.c b/source/tools/acpiexec/aeexec.c index 5bf1ebd33..af6a18f78 100644 --- a/source/tools/acpiexec/aeexec.c +++ b/source/tools/acpiexec/aeexec.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpiexec/aehandlers.c b/source/tools/acpiexec/aehandlers.c index 9b12aa65e..e36a4759f 100644 --- a/source/tools/acpiexec/aehandlers.c +++ b/source/tools/acpiexec/aehandlers.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpiexec/aeinitfile.c b/source/tools/acpiexec/aeinitfile.c index 600f2c7d8..c3d4d8e5b 100644 --- a/source/tools/acpiexec/aeinitfile.c +++ b/source/tools/acpiexec/aeinitfile.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpiexec/aeinstall.c b/source/tools/acpiexec/aeinstall.c index 28d08d8ab..9e1940c3f 100644 --- a/source/tools/acpiexec/aeinstall.c +++ b/source/tools/acpiexec/aeinstall.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpiexec/aemain.c b/source/tools/acpiexec/aemain.c index 9c5a6e0db..01fee3ba4 100644 --- a/source/tools/acpiexec/aemain.c +++ b/source/tools/acpiexec/aemain.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpiexec/aeregion.c b/source/tools/acpiexec/aeregion.c index 400fd66e3..f0646729c 100644 --- a/source/tools/acpiexec/aeregion.c +++ b/source/tools/acpiexec/aeregion.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpiexec/aetables.c b/source/tools/acpiexec/aetables.c index 97f4fb73a..6cee6daeb 100644 --- a/source/tools/acpiexec/aetables.c +++ b/source/tools/acpiexec/aetables.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -267,7 +267,7 @@ AeInitializeTableHeader ( /* Set the checksum, must set to zero first */ Header->Checksum = 0; - Header->Checksum = (UINT8) -AcpiTbChecksum ( + Header->Checksum = (UINT8) -AcpiUtChecksum ( (void *) Header, Header->Length); } @@ -420,7 +420,7 @@ AeBuildLocalTables ( AeInitializeTableHeader ((void *) LocalXSDT, ACPI_SIG_XSDT, XsdtSize); LocalRSDP.Checksum = 0; - LocalRSDP.Checksum = (UINT8) -AcpiTbChecksum ( + LocalRSDP.Checksum = (UINT8) -AcpiUtChecksum ( (void *) &LocalRSDP, ACPI_RSDP_CHECKSUM_LENGTH); if (!DsdtAddress) @@ -471,7 +471,7 @@ AeBuildLocalTables ( /* Complete the external FADT with the checksum */ ExternalFadt->Header.Checksum = 0; - ExternalFadt->Header.Checksum = (UINT8) -AcpiTbChecksum ( + ExternalFadt->Header.Checksum = (UINT8) -AcpiUtChecksum ( (void *) ExternalFadt, ExternalFadt->Header.Length); } else if (AcpiGbl_UseHwReducedFadt) @@ -551,7 +551,7 @@ AeBuildLocalTables ( LocalTEST.Length = sizeof (ACPI_TABLE_HEADER); LocalTEST.Checksum = 0; - LocalTEST.Checksum = (UINT8) -AcpiTbChecksum ( + LocalTEST.Checksum = (UINT8) -AcpiUtChecksum ( (void *) &LocalTEST, LocalTEST.Length); /* @@ -565,7 +565,7 @@ AeBuildLocalTables ( LocalBADTABLE.Length = sizeof (ACPI_TABLE_HEADER); LocalBADTABLE.Checksum = 0; - LocalBADTABLE.Checksum = (UINT8) -AcpiTbChecksum ( + LocalBADTABLE.Checksum = (UINT8) -AcpiUtChecksum ( (void *) &LocalBADTABLE, LocalBADTABLE.Length); } diff --git a/source/tools/acpiexec/aetables.h b/source/tools/acpiexec/aetables.h index 446210ae3..0f2a0498e 100644 --- a/source/tools/acpiexec/aetables.h +++ b/source/tools/acpiexec/aetables.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpiexec/aetests.c b/source/tools/acpiexec/aetests.c index 94e26686a..f35527fb1 100644 --- a/source/tools/acpiexec/aetests.c +++ b/source/tools/acpiexec/aetests.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpihelp/acpihelp.h b/source/tools/acpihelp/acpihelp.h index abc9480ef..87cb66451 100644 --- a/source/tools/acpihelp/acpihelp.h +++ b/source/tools/acpihelp/acpihelp.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpihelp/ahaml.c b/source/tools/acpihelp/ahaml.c index df8326908..04cd3faf8 100644 --- a/source/tools/acpihelp/ahaml.c +++ b/source/tools/acpihelp/ahaml.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpihelp/ahamlops.c b/source/tools/acpihelp/ahamlops.c index bd2b13fb7..a27c11d42 100644 --- a/source/tools/acpihelp/ahamlops.c +++ b/source/tools/acpihelp/ahamlops.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpihelp/ahasl.c b/source/tools/acpihelp/ahasl.c index 0b046995f..dea6bebda 100644 --- a/source/tools/acpihelp/ahasl.c +++ b/source/tools/acpihelp/ahasl.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpihelp/ahaslkey.c b/source/tools/acpihelp/ahaslkey.c index 40da5b33d..0f1fa80a4 100644 --- a/source/tools/acpihelp/ahaslkey.c +++ b/source/tools/acpihelp/ahaslkey.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpihelp/ahaslops.c b/source/tools/acpihelp/ahaslops.c index 00c05de2c..44f3a4f8b 100644 --- a/source/tools/acpihelp/ahaslops.c +++ b/source/tools/acpihelp/ahaslops.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpihelp/ahdecode.c b/source/tools/acpihelp/ahdecode.c index 0de81918f..f9a328b7a 100644 --- a/source/tools/acpihelp/ahdecode.c +++ b/source/tools/acpihelp/ahdecode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpihelp/ahgrammar.c b/source/tools/acpihelp/ahgrammar.c index 03838bd97..5c50f02f1 100644 --- a/source/tools/acpihelp/ahgrammar.c +++ b/source/tools/acpihelp/ahgrammar.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpihelp/ahmain.c b/source/tools/acpihelp/ahmain.c index 808a8edaf..828b75241 100644 --- a/source/tools/acpihelp/ahmain.c +++ b/source/tools/acpihelp/ahmain.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -160,7 +160,7 @@ AhDisplayUsage ( void); #define AH_UTILITY_NAME "ACPI Help Utility" -#define AH_SUPPORTED_OPTIONS "adeghikmopstuvx^" +#define AH_SUPPORTED_OPTIONS "adeghikmopstuv^x" #if defined ACPI_OPTION diff --git a/source/tools/acpisrc/acpisrc.h b/source/tools/acpisrc/acpisrc.h index 0ebfaef35..733127f30 100644 --- a/source/tools/acpisrc/acpisrc.h +++ b/source/tools/acpisrc/acpisrc.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpisrc/ascase.c b/source/tools/acpisrc/ascase.c index 4f231704b..b64fa7fbd 100644 --- a/source/tools/acpisrc/ascase.c +++ b/source/tools/acpisrc/ascase.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpisrc/asconvrt.c b/source/tools/acpisrc/asconvrt.c index ab34a6fe1..ffa33aa22 100644 --- a/source/tools/acpisrc/asconvrt.c +++ b/source/tools/acpisrc/asconvrt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -185,7 +185,7 @@ AsCountLines ( #define MODULE_HEADER_BEGIN "/******************************************************************************\n *\n * Module Name:"; #define MODULE_HEADER_END " *****************************************************************************/\n\n" -#define INTEL_COPYRIGHT " * Copyright (C) 2000 - 2022, Intel Corp.\n" +#define INTEL_COPYRIGHT " * Copyright (C) 2000 - 2023, Intel Corp.\n" /* Opening signature of the Intel legal header */ diff --git a/source/tools/acpisrc/asfile.c b/source/tools/acpisrc/asfile.c index 3f8f97c44..b79e0823d 100644 --- a/source/tools/acpisrc/asfile.c +++ b/source/tools/acpisrc/asfile.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpisrc/asmain.c b/source/tools/acpisrc/asmain.c index aa382f0b2..7b8be3762 100644 --- a/source/tools/acpisrc/asmain.c +++ b/source/tools/acpisrc/asmain.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpisrc/asremove.c b/source/tools/acpisrc/asremove.c index 7f230af15..4bd6a1597 100644 --- a/source/tools/acpisrc/asremove.c +++ b/source/tools/acpisrc/asremove.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpisrc/astable.c b/source/tools/acpisrc/astable.c index ec4344776..92fa54bc6 100644 --- a/source/tools/acpisrc/astable.c +++ b/source/tools/acpisrc/astable.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -197,7 +197,7 @@ ACPI_STRING_TABLE StandardDataTypes[] = { char EmptyHeader[] = ""; char DualLicenseHeader[] = "/*\n" -" * Copyright (C) 2000 - 2022, Intel Corp.\n" +" * Copyright (C) 2000 - 2023, Intel Corp.\n" " * All rights reserved.\n" " *\n" " * Redistribution and use in source and binary forms, with or without\n" @@ -648,12 +648,12 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = { {"ACPI_TABLE_BERT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_BGRT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_BOOT", SRC_TYPE_STRUCT}, + {"ACPI_TABLE_CCEL", SRC_TYPE_STRUCT}, {"ACPI_TABLE_CEDT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_CPEP", SRC_TYPE_STRUCT}, {"ACPI_TABLE_CSRT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_DBG2", SRC_TYPE_STRUCT}, {"ACPI_TABLE_DBGP", SRC_TYPE_STRUCT}, - {"ACPI_TABLE_CEDT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_DMAR", SRC_TYPE_STRUCT}, {"ACPI_TABLE_DRTM", SRC_TYPE_STRUCT}, {"ACPI_TABLE_ECDT", SRC_TYPE_STRUCT}, @@ -672,6 +672,7 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = { {"ACPI_TABLE_MADT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_MCFG", SRC_TYPE_STRUCT}, {"ACPI_TABLE_MCHI", SRC_TYPE_STRUCT}, + {"ACPI_TABLE_MPAM", SRC_TYPE_STRUCT}, {"ACPI_TABLE_MPST", SRC_TYPE_STRUCT}, {"ACPI_TABLE_MSCT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_MSDM", SRC_TYPE_STRUCT}, @@ -686,7 +687,6 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = { {"ACPI_TABLE_RGRT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_RSDP", SRC_TYPE_STRUCT}, {"ACPI_TABLE_RSDT", SRC_TYPE_STRUCT}, - {"ACPI_TABLE_MCHI", SRC_TYPE_STRUCT}, {"ACPI_TABLE_S3PT", SRC_TYPE_STRUCT}, {"ACPI_TABLE_SBST", SRC_TYPE_STRUCT}, {"ACPI_TABLE_SDEV", SRC_TYPE_STRUCT}, @@ -830,6 +830,9 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = { {"ACPI_MADT_MULTIPROC_WAKEUP_MAILBOX", SRC_TYPE_STRUCT}, {"ACPI_MADT_PROCESSOR_APIC", SRC_TYPE_STRUCT}, {"ACPI_MCFG_ALLOCATION", SRC_TYPE_STRUCT}, + {"ACPI_MPAM_MSC_NODE", SRC_TYPE_STRUCT}, + {"ACPI_MPAM_RESOURCE_LOCATOR", SRC_TYPE_STRUCT}, + {"ACPI_MPAM_RESOURCE_NODE", SRC_TYPE_STRUCT}, {"ACPI_MPST_COMPONENT", SRC_TYPE_STRUCT}, {"ACPI_MPST_DATA_HDR", SRC_TYPE_STRUCT}, {"ACPI_MPST_POWER_DATA", SRC_TYPE_STRUCT}, @@ -887,7 +890,6 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = { {"ACPI_PHAT_HEADER", SRC_TYPE_STRUCT}, {"ACPI_PHAT_VERSION_DATA", SRC_TYPE_STRUCT}, {"ACPI_PHAT_VERSION_ELEMENT", SRC_TYPE_STRUCT}, - {"ACPI_PHAT_VERSION_ELEMENT", SRC_TYPE_STRUCT}, {"ACPI_PHAT_HEALTH_DATA", SRC_TYPE_STRUCT}, {"ACPI_PMTT_CONTROLLER", SRC_TYPE_STRUCT}, {"ACPI_PMTT_HEADER", SRC_TYPE_STRUCT}, @@ -1247,8 +1249,8 @@ ACPI_CONVERSION_TABLE LicenseConversionTable = ACPI_STRING_TABLE CustomReplacements[] = { - {"(c) 1999 - 2021", "(c) 1999 - 2022", REPLACE_WHOLE_WORD}, /* Main ACPICA source */ - {"(c) 2006 - 2021", "(c) 2006 - 2022", REPLACE_WHOLE_WORD}, /* Test suites */ + {"(c) 1999 - 2021", "(c) 1999 - 2023", REPLACE_WHOLE_WORD}, /* Main ACPICA source */ + {"(c) 2006 - 2021", "(c) 2006 - 2023", REPLACE_WHOLE_WORD}, /* Test suites */ #if 0 {"SUPPORT, ASSISTANCE", "SUPPORT, ASSISTANCE", REPLACE_WHOLE_WORD}, /* Fix intel header */ diff --git a/source/tools/acpisrc/asutils.c b/source/tools/acpisrc/asutils.c index cc97cca6b..6d481ea81 100644 --- a/source/tools/acpisrc/asutils.c +++ b/source/tools/acpisrc/asutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpixtract/acpixtract.c b/source/tools/acpixtract/acpixtract.c index 480e20e80..fd53818c9 100644 --- a/source/tools/acpixtract/acpixtract.c +++ b/source/tools/acpixtract/acpixtract.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -561,7 +561,7 @@ AxListAllTables ( FILE *InputFile; unsigned char Header[48]; UINT32 ByteCount = 0; - UINT32 ThisLineByteCount; + INT32 ThisLineByteCount; unsigned int State = AX_STATE_FIND_HEADER; diff --git a/source/tools/acpixtract/acpixtract.h b/source/tools/acpixtract/acpixtract.h index 2e7646bbd..bff2ed5c7 100644 --- a/source/tools/acpixtract/acpixtract.h +++ b/source/tools/acpixtract/acpixtract.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpixtract/axmain.c b/source/tools/acpixtract/axmain.c index 30f3d68a9..c504783ee 100644 --- a/source/tools/acpixtract/axmain.c +++ b/source/tools/acpixtract/axmain.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/acpixtract/axutils.c b/source/tools/acpixtract/axutils.c index 54021778f..a51cc6917 100644 --- a/source/tools/acpixtract/axutils.c +++ b/source/tools/acpixtract/axutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/efihello/efihello.c b/source/tools/efihello/efihello.c index ed4c8b4ec..a8aead35c 100644 --- a/source/tools/efihello/efihello.c +++ b/source/tools/efihello/efihello.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/examples/examples.c b/source/tools/examples/examples.c index 0b4497508..235775556 100644 --- a/source/tools/examples/examples.c +++ b/source/tools/examples/examples.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/examples/examples.h b/source/tools/examples/examples.h index 66c28219b..2881926ba 100644 --- a/source/tools/examples/examples.h +++ b/source/tools/examples/examples.h @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/examples/exstubs.c b/source/tools/examples/exstubs.c index 2cc8636fb..a4fc1ad21 100644 --- a/source/tools/examples/exstubs.c +++ b/source/tools/examples/exstubs.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/tools/examples/extables.c b/source/tools/examples/extables.c index 9f2bcc108..5c58baf01 100644 --- a/source/tools/examples/extables.c +++ b/source/tools/examples/extables.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -315,19 +315,19 @@ ExInitializeAcpiTables ( /* Set new checksums for the modified tables */ Rsdp->Checksum = 0; - Rsdp->Checksum = (UINT8) -AcpiTbChecksum ( + Rsdp->Checksum = (UINT8) -AcpiUtChecksum ( (void *) RsdpCode, ACPI_RSDP_CHECKSUM_LENGTH); Rsdt->Header.Checksum = 0; - Rsdt->Header.Checksum = (UINT8) -AcpiTbChecksum ( + Rsdt->Header.Checksum = (UINT8) -AcpiUtChecksum ( (void *) Rsdt, Rsdt->Header.Length); Xsdt->Header.Checksum = 0; - Xsdt->Header.Checksum = (UINT8) -AcpiTbChecksum ( + Xsdt->Header.Checksum = (UINT8) -AcpiUtChecksum ( (void *) Xsdt, Xsdt->Header.Length); Fadt->Header.Checksum = 0; - Fadt->Header.Checksum = (UINT8) -AcpiTbChecksum ( + Fadt->Header.Checksum = (UINT8) -AcpiUtChecksum ( (void *) Fadt, Fadt->Header.Length); } |