mirror of
https://git.FreeBSD.org/src.git
synced 2026-06-02 11:24:32 +00:00
Import ACPICA 20260408
This commit is contained in:
+24
@@ -1,3 +1,27 @@
|
||||
----------------------------------------
|
||||
8 April 2026. Summary of changes for version 20260804:
|
||||
|
||||
Major changes:
|
||||
|
||||
• ACPI Table Enhancements:
|
||||
Updated IORT and MADT template compilations to add new IWB and GICv5 translator/router/ITS entries. Introduced full support for the new DTPR table, including compiler and disassembler handling, template fixes, and register structure refinements. — Jose Marinho and Michal Camacho Romero
|
||||
|
||||
• Expanded IDs, GUIDs, and Methods:
|
||||
Added Framework Computer Hardware IDs, modern standby _DSM GUIDs, and TPM2 start methods. Updated _DSM Arg3 formatting and _CPC handling to align with newer ACPI specifications and avoid Linux compatibility warnings. — Daniel Schaefer and Saket Dumbre
|
||||
|
||||
• Compiler, Disassembler, and Tooling Improvements:
|
||||
Enhanced the ASL compiler and disassembler with External() deduplication, alias node support, improved validation of malformed inputs, and comma-separated Package output. Updated acpisrc to recognize missing structures and improved parse tree walk termination logic. — ikaros and Pawel Chmielewski
|
||||
|
||||
• Security and Stability Fixes:
|
||||
Fixed multiple critical issues, including heap-buffer-overflows, use-after-free, NULL pointer dereferences, integer overflows, and out-of-bounds accesses across AML parsing, interpretation, and table handling code paths. — ikaros and Weiming Shi
|
||||
|
||||
• Resource and Register Refactoring:
|
||||
Corrected I2C LVR resource descriptor handling and refactored TPR Base/Limit registers to use compatible bitmask representations, with additional validation and cleanup across DTPR-related code. — Akhil R and Michal Camacho Romero
|
||||
|
||||
• General Cleanup and Build Fixes:
|
||||
Fixed a syntax error caused by a stray character, corrected spelling issues, improved comment alignment and formatting, updated dummy compiler metadata, and disabled excessive MSVC bitfield warnings (C4214) to improve build clarity. — Colin Ian King and Saket Dumbre
|
||||
|
||||
|
||||
----------------------------------------
|
||||
12 December 2025. Summary of changes for version 20251212:
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -452,6 +452,15 @@ AcGetOneTableFromFile (
|
||||
TableLength = TableHeader.Length;
|
||||
}
|
||||
|
||||
/* Table length must be at least large enough to hold the header */
|
||||
|
||||
if (TableLength < HeaderLength)
|
||||
{
|
||||
fprintf (stderr, "Table length too small for header: 0x%.2X\n",
|
||||
TableLength);
|
||||
return (AE_BAD_HEADER);
|
||||
}
|
||||
|
||||
/* Allocate a buffer for the entire table */
|
||||
|
||||
Table = AcpiOsAllocate ((ACPI_SIZE) TableLength);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -202,6 +202,14 @@ const AH_DEVICE_ID AslDeviceIds[] =
|
||||
{"CPLM3218", "Capella Micro CM3218x Ambient Light Sensor"},
|
||||
{"DELLABCE", "Dell Airplane Mode Switch Driver"},
|
||||
{"DLAC3002", "Qualcomm Atheros Bluetooth UART Transport"},
|
||||
{"FRMW0001", "Framework I2C HID from EC (Laptop 13 Intel 11-13th Gen)"},
|
||||
{"FRMW0002", "Framework PS2 Touchpad Emulation"},
|
||||
{"FRMW0003", "Framework I2C HID from EC (Laptop 16 AMD Ryzen 7040)"},
|
||||
{"FRMW0004", "Framework I2C HID from EC for keyboard media ikeys"},
|
||||
{"FRMW0005", "Framework I2C HID from EC for ALS Sensor"},
|
||||
{"FRMW0006", "Framework Desktop ARGB HID Interface (Chrome EC RGBKBD)"},
|
||||
{"FRMWC004", "Framework EC Controller"},
|
||||
{"FRMWC006", "Framework EC Sensor Hub"},
|
||||
{"FTTH5506", "FocalTech 5506 Touch Controller"},
|
||||
{"HAD0F28", "Intel HDMI Audio Driver"},
|
||||
{"INBC0000", "GPIO Expander"},
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -216,6 +216,7 @@ const AH_TABLE AcpiGbl_SupportedTables[] =
|
||||
{ACPI_SIG_DBGP, "Debug Port Table"},
|
||||
{ACPI_SIG_DMAR, "DMA Remapping Table"},
|
||||
{ACPI_SIG_DRTM, "Dynamic Root of Trust for Measurement Table"},
|
||||
{ACPI_SIG_DTPR, "DMA TXT Protection Ranges Table"},
|
||||
{ACPI_SIG_DSDT, "Differentiated System Description Table (AML table)"},
|
||||
{ACPI_SIG_ECDT, "Embedded Controller Boot Resources Table"},
|
||||
{ACPI_SIG_EINJ, "Error Injection Table"},
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -204,6 +204,11 @@ const AH_UUID Gbl_AcpiUuids[] =
|
||||
{"Cache Properties", UUID_CACHE_PROPERTIES},
|
||||
{"Physical Package Property", UUID_PHYSICAL_PROPERTY},
|
||||
|
||||
{"[Modern Standby]", NULL},
|
||||
{"Modern Standby Microsoft", UUID_LPS0_MICROSOFT},
|
||||
{"Modern Standby Intel", UUID_LPS0_INTEL},
|
||||
{"Modern Standby AMD", UUID_LPS0_AMD},
|
||||
|
||||
{"[Miscellaneous]", NULL},
|
||||
{"Platform-wide Capabilities", UUID_PLATFORM_CAPABILITIES},
|
||||
{"Dynamic Enumeration", UUID_DYNAMIC_ENUMERATION},
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -568,6 +568,10 @@ static const char *AcpiDmTpm2Subnames[] =
|
||||
"Reserved",
|
||||
"Reserved",
|
||||
"Command Response Buffer with ARM SMC",
|
||||
"FIFO over I2C",
|
||||
"Command Response Buffer with AMD Mailbox",
|
||||
"Reserved",
|
||||
"Command Response Buffer with ARM Framework-A",
|
||||
"Unknown Subtable Type" /* Reserved */
|
||||
};
|
||||
|
||||
@@ -700,6 +704,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] =
|
||||
{ACPI_SIG_DBGP, AcpiDmTableInfoDbgp, NULL, NULL, TemplateDbgp},
|
||||
{ACPI_SIG_DMAR, NULL, AcpiDmDumpDmar, DtCompileDmar, TemplateDmar},
|
||||
{ACPI_SIG_DRTM, NULL, AcpiDmDumpDrtm, DtCompileDrtm, TemplateDrtm},
|
||||
{ACPI_SIG_DTPR, NULL, AcpiDmDumpDtpr, DtCompileDtpr, TemplateDtpr},
|
||||
{ACPI_SIG_ECDT, AcpiDmTableInfoEcdt, NULL, NULL, TemplateEcdt},
|
||||
{ACPI_SIG_EINJ, NULL, AcpiDmDumpEinj, DtCompileEinj, TemplateEinj},
|
||||
{ACPI_SIG_ERDT, NULL, AcpiDmDumpErdt, DtCompileErdt, TemplateErdt},
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
+110
-1
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -1670,6 +1670,115 @@ AcpiDmDumpDrtm (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDmDumpDtpr
|
||||
*
|
||||
* PARAMETERS: Table - A DTPR table
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Format the contents of a DTPR.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
AcpiDmDumpDtpr (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
ACPI_TPR_ARRAY *TprArr;
|
||||
ACPI_TPR_INSTANCE *TprInstance;
|
||||
ACPI_TPR_AUX_SR *TprAuxSr;
|
||||
ACPI_TPR_SERIALIZE_REQUEST *TprSerializeRequest;
|
||||
UINT32 i = 0, j, InsCnt, TprRefCnt;
|
||||
UINT32 Offset = sizeof(ACPI_TABLE_DTPR);
|
||||
|
||||
/* Main table */
|
||||
|
||||
Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoDtpr);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Subtables */
|
||||
|
||||
while (Offset < Table->Length)
|
||||
{
|
||||
InsCnt = ((ACPI_TABLE_DTPR*) Table)->InsCnt;
|
||||
|
||||
for (i = 0; i < InsCnt; i++)
|
||||
{
|
||||
TprInstance = ACPI_ADD_PTR(ACPI_TPR_INSTANCE, Table, Offset);
|
||||
Status = AcpiDmDumpTable(Table->Length, Offset, TprInstance,
|
||||
sizeof(ACPI_TPR_INSTANCE), AcpiDmTableInfoDtprInstance);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Each of the TPR instances must have the same number of TPRs*/
|
||||
TprRefCnt = TprInstance->TprCnt;
|
||||
|
||||
Offset += sizeof(ACPI_TPR_INSTANCE);
|
||||
|
||||
if (TprInstance->TprCnt < 2)
|
||||
{
|
||||
AcpiOsPrintf("TPR Instance No.%d has invalid number of TPRs.\n"
|
||||
"There should be at least 2 of them, but there is %d.",
|
||||
i, TprInstance->TprCnt);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (TprInstance->TprCnt != TprRefCnt)
|
||||
{
|
||||
AcpiOsPrintf("Each of TPR instances should have equal\n"
|
||||
"number of TPRs. TprInstance No.%d has %d TPRs"
|
||||
", while the reference TPR instance has %d.\n",
|
||||
i, TprInstance->TprCnt, TprRefCnt);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (j = 0; j < TprInstance->TprCnt; j++)
|
||||
{
|
||||
TprArr = ACPI_ADD_PTR(ACPI_TPR_ARRAY, Table, Offset);
|
||||
Status = AcpiDmDumpTable(Table->Length, Offset, TprArr,
|
||||
sizeof(ACPI_TPR_ARRAY), AcpiDmTableInfoDtprArr);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Offset += sizeof(ACPI_TPR_ARRAY);
|
||||
}
|
||||
}
|
||||
|
||||
TprAuxSr = ACPI_ADD_PTR(ACPI_TPR_AUX_SR, Table, Offset);
|
||||
Status = AcpiDmDumpTable(Table->Length, Offset, TprAuxSr,
|
||||
sizeof(ACPI_TPR_AUX_SR), AcpiDmTableInfoDtprSerializeReq0);
|
||||
|
||||
Offset += sizeof(ACPI_TPR_AUX_SR);
|
||||
|
||||
for (i = 0; i < TprAuxSr->SrlCnt; i++)
|
||||
{
|
||||
TprSerializeRequest = ACPI_ADD_PTR(ACPI_TPR_SERIALIZE_REQUEST,
|
||||
Table, Offset);
|
||||
Status = AcpiDmDumpTable(Table->Length, Offset, TprSerializeRequest,
|
||||
sizeof(ACPI_TPR_SERIALIZE_REQUEST), AcpiDmTableInfoDtprSerializeReq1);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Offset += sizeof(ACPI_TPR_SERIALIZE_REQUEST);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDmDumpEinj
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -1153,6 +1153,44 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm2[] =
|
||||
};
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* DTPR - DMA TXT Protection Ranges Table
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoDtpr[] =
|
||||
{
|
||||
{ACPI_DMT_UINT32, ACPI_DTPR_OFFSET (Flags), "Flags (reserved)", 0},
|
||||
{ACPI_DMT_UINT32, ACPI_DTPR_OFFSET (InsCnt), "Instance Count", 0},
|
||||
ACPI_DMT_TERMINATOR
|
||||
};
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoDtprInstance[] =
|
||||
{
|
||||
{ACPI_DMT_UINT32, ACPI_DTPR_INST_OFFSET (Flags), "Instance control flags (reserved)", 0},
|
||||
{ACPI_DMT_UINT32, ACPI_DTPR_INST_OFFSET (TprCnt), "Number of TPR ranges in instance", 0},
|
||||
ACPI_DMT_TERMINATOR
|
||||
};
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoDtprArr[] =
|
||||
{
|
||||
{ACPI_DMT_UINT64, ACPI_DTPR_ARR_OFFSET (Base), "TPR Base Address", 0},
|
||||
ACPI_DMT_TERMINATOR
|
||||
};
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoDtprSerializeReq0[] =
|
||||
{
|
||||
{ACPI_DMT_UINT32, ACPI_DTPR_AUX_SR_OFFSET (SrlCnt), "Number of serialization registers", 0},
|
||||
ACPI_DMT_TERMINATOR
|
||||
};
|
||||
|
||||
ACPI_DMTABLE_INFO AcpiDmTableInfoDtprSerializeReq1[] =
|
||||
{
|
||||
{ACPI_DMT_UINT64, ACPI_DTPR_SR_OFFSET (SrRegister), "Serialize Request register", 0},
|
||||
ACPI_DMT_TERMINATOR
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* ECDT - Embedded Controller Boot Resources Table
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -1243,7 +1243,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoMadt30[] =
|
||||
{
|
||||
{ACPI_DMT_UINT16, ACPI_MADT30_OFFSET (Reserved), "Reserved", 0},
|
||||
{ACPI_DMT_UINT32, ACPI_MADT30_OFFSET (LinkedTranslatorId), "Linked Its Id", 0},
|
||||
{ACPI_DMT_UINT32, ACPI_MADT30_OFFSET (TranslateFrameId), "Its Transalte Id", 0},
|
||||
{ACPI_DMT_UINT32, ACPI_MADT30_OFFSET (TranslateFrameId), "Its Translate Id", 0},
|
||||
{ACPI_DMT_UINT32, ACPI_MADT30_OFFSET (Reserved2), "Reserved", 0},
|
||||
{ACPI_DMT_UINT64, ACPI_MADT30_OFFSET (BaseAddress), "Its Translate Frame Physical Base Address", 0},
|
||||
ACPI_DMT_TERMINATOR
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -586,14 +586,16 @@ CgWriteTableHeader (
|
||||
/* OEMID */
|
||||
|
||||
Child = Child->Asl.Next;
|
||||
memcpy (AslGbl_TableHeader.OemId, Child->Asl.Value.String,
|
||||
strlen (Child->Asl.Value.String));
|
||||
/* Bound copy to header field size to avoid overflow on malformed input */
|
||||
strncpy (AslGbl_TableHeader.OemId, Child->Asl.Value.String,
|
||||
ACPI_OEM_ID_SIZE);
|
||||
|
||||
/* OEM TableID */
|
||||
|
||||
Child = Child->Asl.Next;
|
||||
memcpy (AslGbl_TableHeader.OemTableId, Child->Asl.Value.String,
|
||||
strlen (Child->Asl.Value.String));
|
||||
/* Bound copy to header field size to avoid overflow on malformed input */
|
||||
strncpy (AslGbl_TableHeader.OemTableId, Child->Asl.Value.String,
|
||||
ACPI_OEM_TABLE_ID_SIZE);
|
||||
|
||||
/* OEM Revision */
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -9,7 +9,7 @@ NoEcho('
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -170,6 +170,10 @@ static void
|
||||
ExMoveExternals (
|
||||
ACPI_PARSE_OBJECT *DefinitionBlockOp);
|
||||
|
||||
static void
|
||||
ExRemoveOpFromTree (
|
||||
ACPI_PARSE_OBJECT *Op);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@@ -194,9 +198,14 @@ ExDoExternal (
|
||||
ACPI_PARSE_OBJECT *ArgCountOp;
|
||||
ACPI_PARSE_OBJECT *TypeOp;
|
||||
ACPI_PARSE_OBJECT *ExternTypeOp = Op->Asl.Child->Asl.Next;
|
||||
ACPI_PARSE_OBJECT *Existing;
|
||||
ACPI_PARSE_OBJECT *NameOp = Op->Asl.Child;
|
||||
ACPI_PARSE_OBJECT *ExistingNameOp;
|
||||
UINT32 ExternType;
|
||||
UINT8 ParamCount = ASL_EXTERNAL_METHOD_UNKNOWN_PARAMS;
|
||||
UINT32 ParamTypes[ACPI_METHOD_NUM_ARGS];
|
||||
char *NewPath = NULL;
|
||||
char *ExistingPath;
|
||||
|
||||
|
||||
ExternType = AnMapObjTypeToBtype (ExternTypeOp);
|
||||
@@ -250,6 +259,53 @@ ExDoExternal (
|
||||
ArgCountOp->Asl.Value.Integer = ParamCount;
|
||||
UtSetParseOpName (ArgCountOp);
|
||||
|
||||
/*
|
||||
* Deduplicate identical External() declarations. The disassembler
|
||||
* already collapses duplicates; mirror that behavior in the compiler
|
||||
* so duplicate externals do not bloat emitted AML.
|
||||
*/
|
||||
|
||||
NewPath = NameOp->Asl.Namepath;
|
||||
if (!NewPath && NameOp->Asl.Value.String)
|
||||
{
|
||||
(void) UtInternalizeName (NameOp->Asl.Value.String, &NewPath);
|
||||
NameOp->Asl.Namepath = NewPath;
|
||||
}
|
||||
|
||||
Existing = AslGbl_ExternalsListHead;
|
||||
while (Existing && NewPath)
|
||||
{
|
||||
ExistingNameOp = Existing->Asl.Child->Asl.Child;
|
||||
ExistingPath = ExistingNameOp->Asl.Namepath;
|
||||
if (!ExistingPath && ExistingNameOp->Asl.Value.String)
|
||||
{
|
||||
(void) UtInternalizeName (ExistingNameOp->Asl.Value.String,
|
||||
&ExistingPath);
|
||||
ExistingNameOp->Asl.Namepath = ExistingPath;
|
||||
}
|
||||
|
||||
if (ExistingPath && !strcmp (NewPath, ExistingPath))
|
||||
{
|
||||
ACPI_PARSE_OBJECT *ExistingArgCount;
|
||||
|
||||
/* Update arg count if this instance is more specific */
|
||||
|
||||
ExistingArgCount = Existing->Asl.Child->Asl.Child->Asl.Next->Asl.Next;
|
||||
if ((ExternType == ACPI_BTYPE_METHOD) &&
|
||||
(ParamCount < ExistingArgCount->Asl.Value.Integer))
|
||||
{
|
||||
ExistingArgCount->Asl.Value.Integer = ParamCount;
|
||||
}
|
||||
|
||||
/* Remove duplicate External node from the parse tree */
|
||||
|
||||
ExRemoveOpFromTree (Op);
|
||||
return;
|
||||
}
|
||||
|
||||
Existing = Existing->Asl.Next;
|
||||
}
|
||||
|
||||
/* Create new list node of arbitrary type */
|
||||
|
||||
ListOp = TrAllocateOp (PARSEOP_DEFAULT_ARG);
|
||||
@@ -280,6 +336,53 @@ ExDoExternal (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: ExRemoveOpFromTree
|
||||
*
|
||||
* PARAMETERS: Op - Parse op to remove from the tree
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Unlink a parse op from its parent sibling list. Used to drop
|
||||
* duplicate External() declarations before AML emission.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static void
|
||||
ExRemoveOpFromTree (
|
||||
ACPI_PARSE_OBJECT *Op)
|
||||
{
|
||||
ACPI_PARSE_OBJECT *Parent;
|
||||
ACPI_PARSE_OBJECT *Child;
|
||||
|
||||
|
||||
if (!Op || !Op->Asl.Parent)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Parent = Op->Asl.Parent;
|
||||
Child = Parent->Asl.Child;
|
||||
|
||||
if (Child == Op)
|
||||
{
|
||||
Parent->Asl.Child = Op->Asl.Next;
|
||||
return;
|
||||
}
|
||||
|
||||
while (Child && Child->Asl.Next != Op)
|
||||
{
|
||||
Child = Child->Asl.Next;
|
||||
}
|
||||
|
||||
if (Child)
|
||||
{
|
||||
Child->Asl.Next = Op->Asl.Next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: ExInsertArgCount
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -252,6 +252,7 @@ extern FILE *AslCompilerin;
|
||||
extern int DtParserdebug;
|
||||
extern int PrParserdebug;
|
||||
extern const ASL_MAPPING_ENTRY AslKeywordMapping[];
|
||||
extern const UINT32 AslKeywordMappingCount;
|
||||
extern char *AslCompilertext;
|
||||
extern char *DtCompilerParsertext;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -9,7 +9,7 @@ NoEcho('
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -9,7 +9,7 @@ NoEcho('
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -1406,6 +1406,8 @@ LdNamespace2Begin (
|
||||
|
||||
/* Save the target node within the alias node as well as type information */
|
||||
|
||||
/* Mark as alias node and store target namespace node */
|
||||
Node->Flags |= ANOBJ_IS_ALIAS;
|
||||
Node->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode);
|
||||
Node->Type = TargetNode->Type;
|
||||
if (Node->Type == ACPI_TYPE_METHOD)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -611,3 +611,5 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
|
||||
/*! [End] no source code translation !*/
|
||||
|
||||
};
|
||||
|
||||
const UINT32 AslKeywordMappingCount = ACPI_ARRAY_LENGTH (AslKeywordMapping);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -412,7 +412,8 @@ const char *AslTableCompilerMsgs [] =
|
||||
/* ASL_MSG_UNKNOWN_FORMAT */ "Unknown format value",
|
||||
/* ASL_MSG_RESERVED_VALUE */ "Value for field is reserved or unknown",
|
||||
/* ASL_MSG_TWO_ZERO_VALUES */ "32-bit DSDT Address and 64-bit X_DSDT Address cannot both be zero",
|
||||
/* ASL_MSG_BAD_PARSE_TREE */ "Parse tree appears to be ill-defined"
|
||||
/* ASL_MSG_BAD_PARSE_TREE */ "Parse tree appears to be ill-defined",
|
||||
/* ASL_MSG_MALFORMED_HEADER */ "Malformed ACPI table header detected"
|
||||
};
|
||||
|
||||
/* Preprocessor */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -414,6 +414,7 @@ typedef enum
|
||||
ASL_MSG_RESERVED_VALUE,
|
||||
ASL_MSG_TWO_ZERO_VALUES,
|
||||
ASL_MSG_BAD_PARSE_TREE,
|
||||
ASL_MSG_MALFORMED_HEADER,
|
||||
|
||||
/* These messages are used by the Preprocessor only */
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -863,6 +863,14 @@ OpcGenerateAmlOpcode (
|
||||
|
||||
Index = (UINT16) (Op->Asl.ParseOpcode - ASL_PARSE_OPCODE_BASE);
|
||||
|
||||
if ((Op->Asl.ParseOpcode < ASL_PARSE_OPCODE_BASE) ||
|
||||
(Index >= AslKeywordMappingCount))
|
||||
{
|
||||
AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, Op,
|
||||
"Invalid parse opcode in OpcGenerateAmlOpcode");
|
||||
return;
|
||||
}
|
||||
|
||||
Op->Asl.AmlOpcode = AslKeywordMapping[Index].AmlOpcode;
|
||||
Op->Asl.AcpiBtype = AslKeywordMapping[Index].AcpiBtype;
|
||||
Op->Asl.CompileFlags |= AslKeywordMapping[Index].Flags;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -851,7 +851,9 @@ OpnDoPackage (
|
||||
{
|
||||
ACPI_PARSE_OBJECT *InitializerOp;
|
||||
ACPI_PARSE_OBJECT *PackageLengthOp;
|
||||
UINT64 DeclaredLength;
|
||||
UINT32 PackageLength = 0;
|
||||
UINT32 MaxEncodedLength = 0x0FFFFFFF; /* Max AML package length encoding (28 bits) */
|
||||
|
||||
|
||||
/* Opcode and package length first, followed by the initializer list */
|
||||
@@ -875,9 +877,21 @@ OpnDoPackage (
|
||||
/* If package length is a constant, compare to the initializer list */
|
||||
|
||||
if ((PackageLengthOp->Asl.ParseOpcode == PARSEOP_INTEGER) ||
|
||||
(PackageLengthOp->Asl.ParseOpcode == PARSEOP_QWORDCONST))
|
||||
(PackageLengthOp->Asl.ParseOpcode == PARSEOP_QWORDCONST) ||
|
||||
(PackageLengthOp->Asl.ParseOpcode == PARSEOP_PACKAGE_LENGTH))
|
||||
{
|
||||
if (PackageLengthOp->Asl.Value.Integer > PackageLength)
|
||||
DeclaredLength = PackageLengthOp->Asl.Value.Integer;
|
||||
|
||||
/* Guard against values that cannot be encoded in AML package length format */
|
||||
|
||||
if (DeclaredLength > MaxEncodedLength)
|
||||
{
|
||||
AslError (ASL_ERROR, ASL_MSG_ENCODING_LENGTH, PackageLengthOp, NULL);
|
||||
DeclaredLength = MaxEncodedLength;
|
||||
PackageLengthOp->Asl.Value.Integer = DeclaredLength;
|
||||
}
|
||||
|
||||
if (DeclaredLength > PackageLength)
|
||||
{
|
||||
/*
|
||||
* Allow package length to be longer than the initializer
|
||||
@@ -891,9 +905,9 @@ OpnDoPackage (
|
||||
PackageLengthOp, NULL);
|
||||
}
|
||||
|
||||
PackageLength = (UINT32) PackageLengthOp->Asl.Value.Integer;
|
||||
PackageLength = (UINT32) DeclaredLength;
|
||||
}
|
||||
else if (PackageLengthOp->Asl.Value.Integer < PackageLength)
|
||||
else if (DeclaredLength < PackageLength)
|
||||
{
|
||||
/*
|
||||
* The package length is smaller than the length of the
|
||||
@@ -999,7 +1013,13 @@ OpnDoLoadTable (
|
||||
/* Fourth child is the RootPath string */
|
||||
|
||||
Next = Next->Asl.Next;
|
||||
if (Next->Asl.ParseOpcode == PARSEOP_ZERO)
|
||||
if ((Next->Asl.ParseOpcode == PARSEOP_ZERO) ||
|
||||
((Next->Asl.Value.Integer == 0) &&
|
||||
((Next->Asl.ParseOpcode == PARSEOP_INTEGER) ||
|
||||
(Next->Asl.ParseOpcode == PARSEOP_BYTECONST) ||
|
||||
(Next->Asl.ParseOpcode == PARSEOP_WORDCONST) ||
|
||||
(Next->Asl.ParseOpcode == PARSEOP_DWORDCONST)||
|
||||
(Next->Asl.ParseOpcode == PARSEOP_QWORDCONST))))
|
||||
{
|
||||
Next->Asl.ParseOpcode = PARSEOP_STRING_LITERAL;
|
||||
Next->Asl.Value.String = "\\";
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -11,7 +11,7 @@ NoEcho('
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -11,7 +11,7 @@ NoEcho('
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -11,7 +11,7 @@ NoEcho('
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -9,7 +9,7 @@ NoEcho('
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -9,7 +9,7 @@ NoEcho('
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -9,7 +9,7 @@ NoEcho('
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -197,6 +197,7 @@ AnMethodTypingWalkEnd (
|
||||
void *Context)
|
||||
{
|
||||
UINT32 ThisOpBtype;
|
||||
ACPI_PARSE_OBJECT *TargetMethodOp;
|
||||
|
||||
|
||||
switch (Op->Asl.ParseOpcode)
|
||||
@@ -227,12 +228,24 @@ AnMethodTypingWalkEnd (
|
||||
if (Op->Asl.Child->Asl.Node &&
|
||||
(Op->Asl.ParentMethod != Op->Asl.Child->Asl.Node->Op))
|
||||
{
|
||||
TargetMethodOp = Op->Asl.Child->Asl.Node->Op;
|
||||
|
||||
/* Break mutual-recursion loops during typing */
|
||||
if (TargetMethodOp->Asl.CompileFlags & OP_VISITED)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
TargetMethodOp->Asl.CompileFlags |= OP_VISITED;
|
||||
|
||||
/* We must type the method here */
|
||||
|
||||
TrWalkParseTree (Op->Asl.Child->Asl.Node->Op,
|
||||
TrWalkParseTree (TargetMethodOp,
|
||||
ASL_WALK_VISIT_UPWARD, NULL,
|
||||
AnMethodTypingWalkEnd, NULL);
|
||||
|
||||
TargetMethodOp->Asl.CompileFlags &= ~OP_VISITED;
|
||||
|
||||
ThisOpBtype = AnGetBtype (Op->Asl.Child);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@@ -558,11 +558,23 @@ XfNamespaceLocateBegin (
|
||||
|
||||
Node = NextOp->Asl.Node;
|
||||
|
||||
/* Malformed tree: parent method has no namespace node */
|
||||
if (!Node)
|
||||
{
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
/* Get Arg # */
|
||||
|
||||
RegisterNumber = Op->Asl.AmlOpcode - AML_ARG0; /* 0x68 through 0x6F */
|
||||
MethodArgs = Node->MethodArgs;
|
||||
|
||||
/* Gracefully handle malformed trees where method args were not set up */
|
||||
if (!MethodArgs)
|
||||
{
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
/* Mark this Arg as referenced */
|
||||
|
||||
MethodArgs[RegisterNumber].Flags |= ASL_ARG_REFERENCED;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user