diff options
Diffstat (limited to 'sys/contrib/dev/acpica/components')
187 files changed, 1240 insertions, 488 deletions
diff --git a/sys/contrib/dev/acpica/components/debugger/dbcmds.c b/sys/contrib/dev/acpica/components/debugger/dbcmds.c index 04eecb841ae6..17ec5f342618 100644 --- a/sys/contrib/dev/acpica/components/debugger/dbcmds.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -157,7 +157,6 @@ #include <contrib/dev/acpica/include/acresrc.h> #include <contrib/dev/acpica/include/actables.h> - #define _COMPONENT ACPI_CA_DEBUGGER ACPI_MODULE_NAME ("dbcmds") @@ -1291,6 +1290,64 @@ AcpiDbDisplayResources ( } +/******************************************************************************* + * + * FUNCTION: AcpiDbGenerateGed + * + * PARAMETERS: GedArg - Raw GED number, ascii string + * + * RETURN: None + * + * DESCRIPTION: Simulate firing of a GED + * + ******************************************************************************/ + +void +AcpiDbGenerateInterrupt ( + char *GsivArg) +{ + UINT32 GsivNumber; + ACPI_GED_HANDLER_INFO *GedInfo = AcpiGbl_GedHandlerList; + + if (!GedInfo) { + AcpiOsPrintf ("No GED handling present\n"); + } + + GsivNumber = strtoul (GsivArg, NULL, 0); + + while (GedInfo) { + + if (GedInfo->IntId == GsivNumber) { + ACPI_OBJECT_LIST ArgList; + ACPI_OBJECT Arg0; + ACPI_HANDLE EvtHandle = GedInfo->EvtMethod; + ACPI_STATUS Status; + + AcpiOsPrintf ("Evaluate GED _EVT (GSIV=%d)\n", GsivNumber); + + if (!EvtHandle) { + AcpiOsPrintf ("Undefined _EVT method\n"); + return; + } + + Arg0.Integer.Type = ACPI_TYPE_INTEGER; + Arg0.Integer.Value = GsivNumber; + + ArgList.Count = 1; + ArgList.Pointer = &Arg0; + + Status = AcpiEvaluateObject (EvtHandle, NULL, &ArgList, NULL); + if (ACPI_FAILURE (Status)) + { + AcpiOsPrintf ("Could not evaluate _EVT\n"); + return; + } + + } + GedInfo = GedInfo->Next; + } +} + #if (!ACPI_REDUCED_HARDWARE) /******************************************************************************* * diff --git a/sys/contrib/dev/acpica/components/debugger/dbconvert.c b/sys/contrib/dev/acpica/components/debugger/dbconvert.c index 6ad7e5983d7e..ed464e25bdbe 100644 --- a/sys/contrib/dev/acpica/components/debugger/dbconvert.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -354,6 +354,8 @@ AcpiDbConvertToPackage ( Elements = ACPI_ALLOCATE_ZEROED ( DB_DEFAULT_PKG_ELEMENTS * sizeof (ACPI_OBJECT)); + if (!Elements) + return (AE_NO_MEMORY); This = String; for (i = 0; i < (DB_DEFAULT_PKG_ELEMENTS - 1); i++) diff --git a/sys/contrib/dev/acpica/components/debugger/dbdisply.c b/sys/contrib/dev/acpica/components/debugger/dbdisply.c index b0fe0cd8072b..c57a19d0dbdb 100644 --- a/sys/contrib/dev/acpica/components/debugger/dbdisply.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/debugger/dbexec.c b/sys/contrib/dev/acpica/components/debugger/dbexec.c index 05aecc3083d7..38c7496ebba1 100644 --- a/sys/contrib/dev/acpica/components/debugger/dbexec.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/debugger/dbfileio.c b/sys/contrib/dev/acpica/components/debugger/dbfileio.c index 49067168fac4..b006ac9d330b 100644 --- a/sys/contrib/dev/acpica/components/debugger/dbfileio.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/debugger/dbhistry.c b/sys/contrib/dev/acpica/components/debugger/dbhistry.c index 74922c2d6d18..45d44d11f315 100644 --- a/sys/contrib/dev/acpica/components/debugger/dbhistry.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/debugger/dbinput.c b/sys/contrib/dev/acpica/components/debugger/dbinput.c index 03981ec5c256..e38364448885 100644 --- a/sys/contrib/dev/acpica/components/debugger/dbinput.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -264,6 +264,7 @@ enum AcpiExDebuggerCommands CMD_THREADS, CMD_TEST, + CMD_INTERRUPT, #endif }; @@ -345,6 +346,7 @@ static const ACPI_DB_COMMAND_INFO AcpiGbl_DbCommands[] = {"THREADS", 3}, {"TEST", 1}, + {"INTERRUPT", 1}, #endif {NULL, 0} }; @@ -461,6 +463,7 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] = {1, " Gpes", "Display info on all GPE devices\n"}, {1, " Sci", "Generate an SCI\n"}, {1, " Sleep [SleepState]", "Simulate sleep/wake sequence(s) (0-5)\n"}, + {1, " Interrupt <GSIV>", "Simulate an interrupt\n"}, #endif {0, NULL, NULL} }; @@ -1263,6 +1266,11 @@ AcpiDbCommandDispatch ( AcpiOsPrintf ("Event command not implemented\n"); break; + case CMD_INTERRUPT: + + AcpiDbGenerateInterrupt (AcpiGbl_DbArgs[1]); + break; + case CMD_GPE: AcpiDbGenerateGpe (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]); diff --git a/sys/contrib/dev/acpica/components/debugger/dbmethod.c b/sys/contrib/dev/acpica/components/debugger/dbmethod.c index e53901ef3e37..27e572d5ad17 100644 --- a/sys/contrib/dev/acpica/components/debugger/dbmethod.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/debugger/dbnames.c b/sys/contrib/dev/acpica/components/debugger/dbnames.c index 410eb139dd62..fc6a26fe9cdc 100644 --- a/sys/contrib/dev/acpica/components/debugger/dbnames.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -774,7 +774,12 @@ AcpiDbWalkForFields ( ACPI_FREE (Buffer.Pointer); Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER; - AcpiEvaluateObject (ObjHandle, NULL, NULL, &Buffer); + Status = AcpiEvaluateObject (ObjHandle, NULL, NULL, &Buffer); + if (ACPI_FAILURE (Status)) + { + AcpiOsPrintf ("Could Not evaluate object %p\n", ObjHandle); + return (AE_OK); + } /* * Since this is a field unit, surround the output in braces @@ -884,6 +889,9 @@ AcpiDbDisplayObjects ( { ObjectInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_OBJECT_INFO)); + if (!ObjectInfo) + return (AE_NO_MEMORY); + /* Walk the namespace from the root */ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, diff --git a/sys/contrib/dev/acpica/components/debugger/dbobject.c b/sys/contrib/dev/acpica/components/debugger/dbobject.c index bd60776e05ea..0033b61ccab8 100644 --- a/sys/contrib/dev/acpica/components/debugger/dbobject.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/debugger/dbstats.c b/sys/contrib/dev/acpica/components/debugger/dbstats.c index 9c32ab631bdc..76295cadd337 100644 --- a/sys/contrib/dev/acpica/components/debugger/dbstats.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/debugger/dbtest.c b/sys/contrib/dev/acpica/components/debugger/dbtest.c index 960ad65b8c10..4e0eb486c35b 100644 --- a/sys/contrib/dev/acpica/components/debugger/dbtest.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/debugger/dbutils.c b/sys/contrib/dev/acpica/components/debugger/dbutils.c index a98a3a61eeb9..4a39f9aca9e0 100644 --- a/sys/contrib/dev/acpica/components/debugger/dbutils.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/debugger/dbxface.c b/sys/contrib/dev/acpica/components/debugger/dbxface.c index 4b932629db2b..2150abc16100 100644 --- a/sys/contrib/dev/acpica/components/debugger/dbxface.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c b/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c index 02571b019ff0..d9e2273712e5 100644 --- a/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c b/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c index 65b598569596..ce3aa09084df 100644 --- a/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/disassembler/dmdeferred.c b/sys/contrib/dev/acpica/components/disassembler/dmdeferred.c index e99813ba952a..3826f194d6fd 100644 --- a/sys/contrib/dev/acpica/components/disassembler/dmdeferred.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/disassembler/dmnames.c b/sys/contrib/dev/acpica/components/disassembler/dmnames.c index 674870b2bb22..447618b5bc52 100644 --- a/sys/contrib/dev/acpica/components/disassembler/dmnames.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/disassembler/dmopcode.c b/sys/contrib/dev/acpica/components/disassembler/dmopcode.c index 439af75769dc..1cb1c81d74eb 100644 --- a/sys/contrib/dev/acpica/components/disassembler/dmopcode.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/disassembler/dmresrc.c b/sys/contrib/dev/acpica/components/disassembler/dmresrc.c index 421e45a70dee..e5a859ed47b7 100644 --- a/sys/contrib/dev/acpica/components/disassembler/dmresrc.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -203,6 +203,7 @@ static ACPI_RESOURCE_HANDLER AcpiGbl_DmResourceDispatch [] = AcpiDmPinGroupDescriptor, /* 0x10, ACPI_RESOURCE_NAME_PIN_GROUP */ AcpiDmPinGroupFunctionDescriptor, /* 0x11, ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION */ AcpiDmPinGroupConfigDescriptor, /* 0x12, ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG */ + AcpiDmClockInputDescriptor, /* 0x13, ACPI_RESOURCE_NAME_CLOCK_INPUT */ }; diff --git a/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c b/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c index aa26b88e5f76..b50766bcdf20 100644 --- a/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c b/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c index 83e1c1a48629..551cf8178d94 100644 --- a/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -525,6 +525,46 @@ AcpiDmGpioDescriptor ( } } +void +AcpiDmClockInputDescriptor ( + ACPI_OP_WALK_INFO *Info, + AML_RESOURCE *Resource, + UINT32 Length, + UINT32 Level) +{ + char *DeviceName = NULL; + UINT8 *ResourceIndex = NULL; + AcpiDmIndent (Level); + + AcpiOsPrintf ("ClockInput ("); + + AcpiOsPrintf ("0x%8.8X, ", Resource->ClockInput.FrequencyNumerator); + + AcpiOsPrintf ("0x%4.4X, ", Resource->ClockInput.FrequencyDivisor); + + AcpiOsPrintf ("%s, ", + AcpiGbl_ClockInputScale [ACPI_EXTRACT_2BIT_FLAG (Resource->ClockInput.Flags, 1)]); + + AcpiOsPrintf ("%s, ", + AcpiGbl_ClockInputMode [ACPI_GET_1BIT_FLAG (Resource->ClockInput.Flags)]); + + if (Length > sizeof(Resource->ClockInput)) + { + DeviceName = ACPI_ADD_PTR (char, + Resource, sizeof(Resource->ClockInput)+1), + AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX); + + AcpiOsPrintf (", "); + ResourceIndex = ACPI_ADD_PTR (UINT8, + Resource, sizeof(Resource->ClockInput)), + + AcpiOsPrintf ("0x%2.2X", *ResourceIndex); + } + + AcpiOsPrintf (")\n"); + +} + /******************************************************************************* * * FUNCTION: AcpiDmPinFunctionDescriptor @@ -738,7 +778,7 @@ AcpiDmCsi2SerialBusDescriptor ( AcpiOsPrintf (" 0x%2.2X, 0x%2.2X,\n", Resource->Csi2SerialBus.TypeSpecificFlags & 0x03, - Resource->Csi2SerialBus.TypeSpecificFlags & 0xFC); + (Resource->Csi2SerialBus.TypeSpecificFlags & 0xFC) >> 2); /* ResourceSource is a required field */ diff --git a/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c b/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c index 3f67a6f6e58c..1398462cecfc 100644 --- a/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/disassembler/dmutils.c b/sys/contrib/dev/acpica/components/disassembler/dmutils.c index fb04e8404e7a..41e26ee4b755 100644 --- a/sys/contrib/dev/acpica/components/disassembler/dmutils.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/disassembler/dmwalk.c b/sys/contrib/dev/acpica/components/disassembler/dmwalk.c index ae1ac5dd873d..36f6def2bba5 100644 --- a/sys/contrib/dev/acpica/components/disassembler/dmwalk.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -969,8 +969,6 @@ AcpiDmDescendingOp ( AcpiDmPredefinedDescription (Op->Asl.Parent); } - AcpiDmPredefinedDescription (Op->Asl.Parent); - AcpiOsPrintf ("\n"); AcpiDmIndent (Info->Level); AcpiOsPrintf ("{\n"); diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsargs.c b/sys/contrib/dev/acpica/components/dispatcher/dsargs.c index 5f2de2f52c87..4a60cde8a15a 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dsargs.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c b/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c index 946d8daa1ce8..fcf10cf4e856 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c b/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c index 662318ea2bcd..feb7f58a95de 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsfield.c b/sys/contrib/dev/acpica/components/dispatcher/dsfield.c index 730616ac2951..baa6a2eef262 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dsfield.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsinit.c b/sys/contrib/dev/acpica/components/dispatcher/dsinit.c index bd096b1451cd..bcf2d4f112c8 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dsinit.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c b/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c index 1fe1983c476f..becdb95f8b83 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -646,8 +646,6 @@ AcpiDsCallControlMethod ( ACPI_WALK_STATE *NextWalkState = NULL; ACPI_OPERAND_OBJECT *ObjDesc; ACPI_EVALUATE_INFO *Info; - UINT32 i; - ACPI_FUNCTION_TRACE_PTR (DsCallControlMethod, ThisWalkState); @@ -670,6 +668,23 @@ AcpiDsCallControlMethod ( return_ACPI_STATUS (AE_NULL_OBJECT); } + if (ThisWalkState->NumOperands < ObjDesc->Method.ParamCount) + { + ACPI_ERROR ((AE_INFO, "Missing argument(s) for method [%4.4s]", + AcpiUtGetNodeName (MethodNode))); + + return_ACPI_STATUS (AE_AML_TOO_FEW_ARGUMENTS); + } + + else if (ThisWalkState->NumOperands > ObjDesc->Method.ParamCount) + { + ACPI_ERROR ((AE_INFO, "Too many arguments for method [%4.4s]", + AcpiUtGetNodeName (MethodNode))); + + return_ACPI_STATUS (AE_AML_TOO_MANY_ARGUMENTS); + } + + /* Init for new method, possibly wait on method mutex */ Status = AcpiDsBeginMethodExecution ( @@ -705,7 +720,7 @@ AcpiDsCallControlMethod ( if (!Info) { Status = AE_NO_MEMORY; - goto Cleanup; + goto PopWalkState; } Info->Parameters = &ThisWalkState->Operands[0]; @@ -717,7 +732,7 @@ AcpiDsCallControlMethod ( ACPI_FREE (Info); if (ACPI_FAILURE (Status)) { - goto Cleanup; + goto PopWalkState; } NextWalkState->MethodNestingDepth = ThisWalkState->MethodNestingDepth + 1; @@ -726,15 +741,7 @@ AcpiDsCallControlMethod ( * Delete the operands on the previous walkstate operand stack * (they were copied to new objects) */ - for (i = 0; i < ObjDesc->Method.ParamCount; i++) - { - AcpiUtRemoveReference (ThisWalkState->Operands [i]); - ThisWalkState->Operands [i] = NULL; - } - - /* Clear the operand stack */ - - ThisWalkState->NumOperands = 0; + AcpiDsClearOperands (ThisWalkState); ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "**** Begin nested execution of [%4.4s] **** WalkState=%p\n", @@ -764,6 +771,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/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c b/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c index 0600012bc519..2c45e8c91f57 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -357,6 +357,7 @@ AcpiDsMethodDataInitArgs ( Index++; } + AcpiExTraceArgs(Params, Index); ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%u args passed to method\n", Index)); return_ACPI_STATUS (AE_OK); diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsobject.c b/sys/contrib/dev/acpica/components/dispatcher/dsobject.c index e05ba16aeb25..cd9921e59261 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dsobject.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c b/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c index 0a1dc053ec59..23c7065bec5a 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c b/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c index 013c565c32dd..6365ab4b0f20 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsutils.c b/sys/contrib/dev/acpica/components/dispatcher/dsutils.c index 821b75d118d3..04b65326b51c 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dsutils.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -867,6 +867,8 @@ AcpiDsCreateOperands ( ACPI_PARSE_OBJECT *Arguments[ACPI_OBJ_NUM_OPERANDS]; UINT32 ArgCount = 0; UINT32 Index = WalkState->NumOperands; + UINT32 PrevNumOperands = WalkState->NumOperands; + UINT32 NewNumOperands; UINT32 i; @@ -899,6 +901,7 @@ AcpiDsCreateOperands ( /* Create the interpreter arguments, in reverse order */ + NewNumOperands = Index; Index--; for (i = 0; i < ArgCount; i++) { @@ -926,7 +929,11 @@ Cleanup: * pop everything off of the operand stack and delete those * objects */ - AcpiDsObjStackPopAndDelete (ArgCount, WalkState); + WalkState->NumOperands = (UINT8) (i); + AcpiDsObjStackPopAndDelete (NewNumOperands, WalkState); + + /* Restore operand count */ + WalkState->NumOperands = (UINT8) (PrevNumOperands); ACPI_EXCEPTION ((AE_INFO, Status, "While creating Arg %u", Index)); return_ACPI_STATUS (Status); diff --git a/sys/contrib/dev/acpica/components/dispatcher/dswexec.c b/sys/contrib/dev/acpica/components/dispatcher/dswexec.c index 9b1f1cb80eb0..1e287fae9977 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dswexec.c +++ b/sys/contrib/dev/acpica/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 - 2025, 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/sys/contrib/dev/acpica/components/dispatcher/dswload.c b/sys/contrib/dev/acpica/components/dispatcher/dswload.c index 81f7986b2d82..8c9969de14f7 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dswload.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/dispatcher/dswload2.c b/sys/contrib/dev/acpica/components/dispatcher/dswload2.c index 30f5d116a485..8ef7ff4090d1 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dswload2.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/dispatcher/dswscope.c b/sys/contrib/dev/acpica/components/dispatcher/dswscope.c index 851f8472ca43..faf08bcfb399 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dswscope.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/dispatcher/dswstate.c b/sys/contrib/dev/acpica/components/dispatcher/dswstate.c index 7089694890f2..f353951961b2 100644 --- a/sys/contrib/dev/acpica/components/dispatcher/dswstate.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -310,8 +310,8 @@ AcpiDsResultPush ( if (!Object) { ACPI_ERROR ((AE_INFO, - "Null Object! Obj=%p State=%p Num=%u", - Object, WalkState, WalkState->ResultCount)); + "Null Object! State=%p Num=%u", + WalkState, WalkState->ResultCount)); return (AE_BAD_PARAMETER); } @@ -785,9 +785,14 @@ AcpiDsInitAmlWalk ( WalkState->ParserState.Aml = - WalkState->ParserState.AmlStart = AmlStart; + WalkState->ParserState.AmlStart = WalkState->ParserState.AmlEnd = - WalkState->ParserState.PkgEnd = AmlStart + AmlLength; + WalkState->ParserState.PkgEnd = AmlStart; + /* Avoid undefined behavior: applying zero offset to null pointer */ + if (AmlLength != 0) { + WalkState->ParserState.AmlEnd += AmlLength; + WalkState->ParserState.PkgEnd += AmlLength; + } /* The NextOp of the NextWalk will be the beginning of the method */ diff --git a/sys/contrib/dev/acpica/components/events/evevent.c b/sys/contrib/dev/acpica/components/events/evevent.c index e230ceff01e1..da5e633e5909 100644 --- a/sys/contrib/dev/acpica/components/events/evevent.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/events/evglock.c b/sys/contrib/dev/acpica/components/events/evglock.c index 99869b49ce6e..395ca14fb315 100644 --- a/sys/contrib/dev/acpica/components/events/evglock.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -195,6 +195,11 @@ AcpiEvInitGlobalLockHandler ( return_ACPI_STATUS (AE_OK); } + if (!AcpiGbl_UseGlobalLock) + { + return_ACPI_STATUS (AE_OK); + } + /* Attempt installation of the global lock handler */ Status = AcpiInstallFixedEventHandler (ACPI_EVENT_GLOBAL, diff --git a/sys/contrib/dev/acpica/components/events/evgpe.c b/sys/contrib/dev/acpica/components/events/evgpe.c index 90fa88c16b62..2ce159c46be2 100644 --- a/sys/contrib/dev/acpica/components/events/evgpe.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/events/evgpeblk.c b/sys/contrib/dev/acpica/components/events/evgpeblk.c index 0d93307871a7..d30f31c641a1 100644 --- a/sys/contrib/dev/acpica/components/events/evgpeblk.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/events/evgpeinit.c b/sys/contrib/dev/acpica/components/events/evgpeinit.c index 9e7ef53b65de..0ae8bb700369 100644 --- a/sys/contrib/dev/acpica/components/events/evgpeinit.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -564,6 +564,7 @@ AcpiEvMatchGpeMethod ( GpeEventInfo->Flags &= ~(ACPI_GPE_DISPATCH_MASK); GpeEventInfo->Flags |= (UINT8) (Type | ACPI_GPE_DISPATCH_METHOD); GpeEventInfo->Dispatch.MethodNode = MethodNode; + WalkInfo->Count++; ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Registered GPE method %s as GPE number 0x%.2X\n", diff --git a/sys/contrib/dev/acpica/components/events/evgpeutil.c b/sys/contrib/dev/acpica/components/events/evgpeutil.c index e667cb03547d..0dc2fdf01b52 100644 --- a/sys/contrib/dev/acpica/components/events/evgpeutil.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/events/evhandler.c b/sys/contrib/dev/acpica/components/events/evhandler.c index 03cfcf81d65f..9c69d69b524a 100644 --- a/sys/contrib/dev/acpica/components/events/evhandler.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/events/evmisc.c b/sys/contrib/dev/acpica/components/events/evmisc.c index 399ff1b864b3..1b8688dd872d 100644 --- a/sys/contrib/dev/acpica/components/events/evmisc.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/events/evregion.c b/sys/contrib/dev/acpica/components/events/evregion.c index 5ce29c95881a..385ac1845da1 100644 --- a/sys/contrib/dev/acpica/components/events/evregion.c +++ b/sys/contrib/dev/acpica/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 - 2025, 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/sys/contrib/dev/acpica/components/events/evrgnini.c b/sys/contrib/dev/acpica/components/events/evrgnini.c index 4797fa1f45ba..1f16655195e1 100644 --- a/sys/contrib/dev/acpica/components/events/evrgnini.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/events/evsci.c b/sys/contrib/dev/acpica/components/events/evsci.c index 4ea125b4f1d6..cd1dc4da6317 100644 --- a/sys/contrib/dev/acpica/components/events/evsci.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/events/evxface.c b/sys/contrib/dev/acpica/components/events/evxface.c index 04c7ad85369e..54634c61e517 100644 --- a/sys/contrib/dev/acpica/components/events/evxface.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/events/evxfevnt.c b/sys/contrib/dev/acpica/components/events/evxfevnt.c index eda4dee711ce..60837084e86f 100644 --- a/sys/contrib/dev/acpica/components/events/evxfevnt.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/events/evxfgpe.c b/sys/contrib/dev/acpica/components/events/evxfgpe.c index fca21acacbcb..1ffcff259a2b 100644 --- a/sys/contrib/dev/acpica/components/events/evxfgpe.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -636,7 +636,7 @@ AcpiSetupGpeForWake ( * permanently enabled and clear its ACPI_GPE_AUTO_ENABLED flag. */ (void) AcpiEvRemoveGpeReference (GpeEventInfo); - GpeEventInfo->Flags &= ~~ACPI_GPE_AUTO_ENABLED; + GpeEventInfo->Flags &= ~ACPI_GPE_AUTO_ENABLED; } /* diff --git a/sys/contrib/dev/acpica/components/events/evxfregn.c b/sys/contrib/dev/acpica/components/events/evxfregn.c index d2b84e1f1c5f..bbdf4352b415 100644 --- a/sys/contrib/dev/acpica/components/events/evxfregn.c +++ b/sys/contrib/dev/acpica/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 - 2025, 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) + /******************************************************************************* * @@ -362,7 +392,6 @@ AcpiRemoveAddressSpaceHandler ( /* Now we can delete the handler object */ - AcpiOsReleaseMutex (HandlerObj->AddressSpace.ContextMutex); AcpiUtRemoveReference (HandlerObj); goto UnlockAndExit; } @@ -387,3 +416,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/sys/contrib/dev/acpica/components/executer/exconcat.c b/sys/contrib/dev/acpica/components/executer/exconcat.c index 6cd32ed38689..060dbf946d87 100644 --- a/sys/contrib/dev/acpica/components/executer/exconcat.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exconfig.c b/sys/contrib/dev/acpica/components/executer/exconfig.c index 9ace33cf3c17..6f3f8d24baca 100644 --- a/sys/contrib/dev/acpica/components/executer/exconfig.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exconvrt.c b/sys/contrib/dev/acpica/components/executer/exconvrt.c index 039c73d3a0fe..9c091864d7ef 100644 --- a/sys/contrib/dev/acpica/components/executer/exconvrt.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -165,7 +165,8 @@ AcpiExConvertToAscii ( UINT64 Integer, UINT16 Base, UINT8 *String, - UINT8 MaxLength); + UINT8 MaxLength, + BOOLEAN LeadingZeros); /******************************************************************************* @@ -387,7 +388,7 @@ AcpiExConvertToBuffer ( /* Copy the string to the buffer */ NewBuf = ReturnDesc->Buffer.Pointer; - strncpy ((char *) NewBuf, (char *) ObjDesc->String.Pointer, + memcpy ((char *) NewBuf, (char *) ObjDesc->String.Pointer, ObjDesc->String.Length); break; @@ -412,6 +413,7 @@ AcpiExConvertToBuffer ( * Base - ACPI_STRING_DECIMAL or ACPI_STRING_HEX * String - Where the string is returned * DataWidth - Size of data item to be converted, in bytes + * LeadingZeros - Allow leading zeros * * RETURN: Actual string length * @@ -424,7 +426,8 @@ AcpiExConvertToAscii ( UINT64 Integer, UINT16 Base, UINT8 *String, - UINT8 DataWidth) + UINT8 DataWidth, + BOOLEAN LeadingZeros) { UINT64 Digit; UINT32 i; @@ -433,7 +436,8 @@ AcpiExConvertToAscii ( UINT32 HexLength; UINT32 DecimalLength; UINT32 Remainder; - BOOLEAN SupressZeros; + BOOLEAN SupressZeros = !LeadingZeros; + UINT8 HexChar; ACPI_FUNCTION_ENTRY (); @@ -464,7 +468,6 @@ AcpiExConvertToAscii ( break; } - SupressZeros = TRUE; /* No leading zeros */ Remainder = 0; for (i = DecimalLength; i > 0; i--) @@ -501,8 +504,18 @@ AcpiExConvertToAscii ( { /* Get one hex digit, most significant digits first */ - String[k] = (UINT8) + HexChar = (UINT8) AcpiUtHexToAsciiChar (Integer, ACPI_MUL_4 (j)); + + /* Supress leading zeros until the first non-zero character */ + + if (HexChar == ACPI_ASCII_ZERO && SupressZeros) + { + continue; + } + + SupressZeros = FALSE; + String[k] = HexChar; k++; } break; @@ -556,6 +569,7 @@ AcpiExConvertToString ( UINT32 StringLength = 0; UINT16 Base = 16; UINT8 Separator = ','; + BOOLEAN LeadingZeros; ACPI_FUNCTION_TRACE_PTR (ExConvertToString, ObjDesc); @@ -581,14 +595,25 @@ AcpiExConvertToString ( * Make room for the maximum decimal number size */ StringLength = ACPI_MAX_DECIMAL_DIGITS; + LeadingZeros = FALSE; Base = 10; break; + case ACPI_EXPLICIT_CONVERT_HEX: + /* + * From ToHexString. + * + * Supress leading zeros and append "0x" + */ + StringLength = ACPI_MUL_2 (AcpiGbl_IntegerByteWidth) + 2; + LeadingZeros = FALSE; + break; default: /* Two hex string characters for each integer byte */ StringLength = ACPI_MUL_2 (AcpiGbl_IntegerByteWidth); + LeadingZeros = TRUE; break; } @@ -603,15 +628,29 @@ AcpiExConvertToString ( } NewBuf = ReturnDesc->Buffer.Pointer; + if (Type == ACPI_EXPLICIT_CONVERT_HEX) + { + /* Append "0x" prefix for explicit hex conversion */ + + *NewBuf++ = '0'; + *NewBuf++ = 'x'; + } /* Convert integer to string */ StringLength = AcpiExConvertToAscii ( - ObjDesc->Integer.Value, Base, NewBuf, AcpiGbl_IntegerByteWidth); + ObjDesc->Integer.Value, Base, NewBuf, AcpiGbl_IntegerByteWidth, LeadingZeros); /* Null terminate at the correct place */ ReturnDesc->String.Length = StringLength; + if (Type == ACPI_EXPLICIT_CONVERT_HEX) + { + /* Take "0x" prefix into account */ + + ReturnDesc->String.Length += 2; + } + NewBuf [StringLength] = 0; break; @@ -628,6 +667,7 @@ AcpiExConvertToString ( * From ACPI: "If the input is a buffer, it is converted to a * a string of decimal values separated by commas." */ + LeadingZeros = FALSE; Base = 10; /* @@ -661,6 +701,7 @@ AcpiExConvertToString ( * * Each hex number is prefixed with 0x (11/2018) */ + LeadingZeros = TRUE; Separator = ' '; StringLength = (ObjDesc->Buffer.Length * 5); break; @@ -674,6 +715,7 @@ AcpiExConvertToString ( * * Each hex number is prefixed with 0x (11/2018) */ + LeadingZeros = TRUE; Separator = ','; StringLength = (ObjDesc->Buffer.Length * 5); break; @@ -715,7 +757,7 @@ AcpiExConvertToString ( } NewBuf += AcpiExConvertToAscii ( - (UINT64) ObjDesc->Buffer.Pointer[i], Base, NewBuf, 1); + (UINT64) ObjDesc->Buffer.Pointer[i], Base, NewBuf, 1, LeadingZeros); /* Each digit is separated by either a comma or space */ diff --git a/sys/contrib/dev/acpica/components/executer/excreate.c b/sys/contrib/dev/acpica/components/executer/excreate.c index d78d4ef00014..75f1d631d110 100644 --- a/sys/contrib/dev/acpica/components/executer/excreate.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exdebug.c b/sys/contrib/dev/acpica/components/executer/exdebug.c index b4bd44d7b1ee..6a927eb26393 100644 --- a/sys/contrib/dev/acpica/components/executer/exdebug.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exdump.c b/sys/contrib/dev/acpica/components/executer/exdump.c index 2135e66fd16d..581d183d919f 100644 --- a/sys/contrib/dev/acpica/components/executer/exdump.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exfield.c b/sys/contrib/dev/acpica/components/executer/exfield.c index 6ed3d40b6035..6c27e7dfcb36 100644 --- a/sys/contrib/dev/acpica/components/executer/exfield.c +++ b/sys/contrib/dev/acpica/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 - 2025, 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/sys/contrib/dev/acpica/components/executer/exfldio.c b/sys/contrib/dev/acpica/components/executer/exfldio.c index faee3bce1e6b..b3d1d73c0960 100644 --- a/sys/contrib/dev/acpica/components/executer/exfldio.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exmisc.c b/sys/contrib/dev/acpica/components/executer/exmisc.c index e112af6e2f68..9b9b6b3005c2 100644 --- a/sys/contrib/dev/acpica/components/executer/exmisc.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exmutex.c b/sys/contrib/dev/acpica/components/executer/exmutex.c index 27474c0e4707..fe1220d6abfb 100644 --- a/sys/contrib/dev/acpica/components/executer/exmutex.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exnames.c b/sys/contrib/dev/acpica/components/executer/exnames.c index ab4908a5410e..105103f81f11 100644 --- a/sys/contrib/dev/acpica/components/executer/exnames.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exoparg1.c b/sys/contrib/dev/acpica/components/executer/exoparg1.c index 0d794cc697fa..13af957693b4 100644 --- a/sys/contrib/dev/acpica/components/executer/exoparg1.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exoparg2.c b/sys/contrib/dev/acpica/components/executer/exoparg2.c index d9edd41a4c89..4bc3cf79e1eb 100644 --- a/sys/contrib/dev/acpica/components/executer/exoparg2.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exoparg3.c b/sys/contrib/dev/acpica/components/executer/exoparg3.c index f1c9b107fab1..7c17e2868132 100644 --- a/sys/contrib/dev/acpica/components/executer/exoparg3.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exoparg6.c b/sys/contrib/dev/acpica/components/executer/exoparg6.c index 0a182f4ce0e4..a9092ba2e4e2 100644 --- a/sys/contrib/dev/acpica/components/executer/exoparg6.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exprep.c b/sys/contrib/dev/acpica/components/executer/exprep.c index 8caee66f6e05..dc04b77b7ea5 100644 --- a/sys/contrib/dev/acpica/components/executer/exprep.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -611,6 +611,10 @@ AcpiExPrepFieldValue ( if (Info->ConnectionNode) { SecondDesc = Info->ConnectionNode->Object; + if (SecondDesc == NULL) + { + break; + } if (!(SecondDesc->Common.Flags & AOPOBJ_DATA_VALID)) { Status = AcpiDsGetBufferArguments (SecondDesc); diff --git a/sys/contrib/dev/acpica/components/executer/exregion.c b/sys/contrib/dev/acpica/components/executer/exregion.c index c657659f8e44..4e9f535ef9ac 100644 --- a/sys/contrib/dev/acpica/components/executer/exregion.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -191,7 +191,6 @@ AcpiExSystemMemorySpaceHandler ( ACPI_MEM_MAPPING *Mm = MemInfo->CurMm; UINT32 Length; ACPI_SIZE MapLength; - ACPI_SIZE PageBoundaryMapLength; #ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED UINT32 Remainder; #endif @@ -298,27 +297,9 @@ AcpiExSystemMemorySpaceHandler ( MapLength = (ACPI_SIZE) ((MemInfo->Address + MemInfo->Length) - Address); - /* - * If mapping the entire remaining portion of the region will cross - * a page boundary, just map up to the page boundary, do not cross. - * On some systems, crossing a page boundary while mapping regions - * can cause warnings if the pages have different attributes - * due to resource management. - * - * This has the added benefit of constraining a single mapping to - * one page, which is similar to the original code that used a 4k - * maximum window. - */ - PageBoundaryMapLength = (ACPI_SIZE) - (ACPI_ROUND_UP (Address, ACPI_DEFAULT_PAGE_SIZE) - Address); - if (PageBoundaryMapLength == 0) - { - PageBoundaryMapLength = ACPI_DEFAULT_PAGE_SIZE; - } - - if (MapLength > PageBoundaryMapLength) + if (MapLength > ACPI_DEFAULT_PAGE_SIZE) { - MapLength = PageBoundaryMapLength; + MapLength = ACPI_DEFAULT_PAGE_SIZE; } /* Create a new mapping starting at the address given */ diff --git a/sys/contrib/dev/acpica/components/executer/exresnte.c b/sys/contrib/dev/acpica/components/executer/exresnte.c index b2731527dfbe..0c66f0b4d4f8 100644 --- a/sys/contrib/dev/acpica/components/executer/exresnte.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exresolv.c b/sys/contrib/dev/acpica/components/executer/exresolv.c index 7c7a7e6787c5..81d934418983 100644 --- a/sys/contrib/dev/acpica/components/executer/exresolv.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exresop.c b/sys/contrib/dev/acpica/components/executer/exresop.c index f50e33a0b202..0a89bc78d3e3 100644 --- a/sys/contrib/dev/acpica/components/executer/exresop.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exserial.c b/sys/contrib/dev/acpica/components/executer/exserial.c index fd6dea206450..6d17c29569e0 100644 --- a/sys/contrib/dev/acpica/components/executer/exserial.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -359,6 +359,12 @@ AcpiExReadSerialBus ( Function = ACPI_READ; break; + case ACPI_ADR_SPACE_FIXED_HARDWARE: + + BufferLength = ACPI_FFH_INPUT_BUFFER_SIZE; + Function = ACPI_READ; + break; + default: return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID); } @@ -484,6 +490,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); } @@ -499,8 +511,7 @@ AcpiExWriteSerialBus ( /* Copy the input buffer data to the transfer buffer */ Buffer = BufferDesc->Buffer.Pointer; - DataLength = (BufferLength < SourceDesc->Buffer.Length ? - BufferLength : SourceDesc->Buffer.Length); + DataLength = ACPI_MIN (BufferLength, SourceDesc->Buffer.Length); memcpy (Buffer, SourceDesc->Buffer.Pointer, DataLength); /* Lock entire transaction if requested */ diff --git a/sys/contrib/dev/acpica/components/executer/exstore.c b/sys/contrib/dev/acpica/components/executer/exstore.c index 1052b3cc2c53..ebe767abd637 100644 --- a/sys/contrib/dev/acpica/components/executer/exstore.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exstoren.c b/sys/contrib/dev/acpica/components/executer/exstoren.c index 3bbf620004af..ed9fa9a7f13b 100644 --- a/sys/contrib/dev/acpica/components/executer/exstoren.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exstorob.c b/sys/contrib/dev/acpica/components/executer/exstorob.c index 25a887ff60aa..e9ddabd6c25a 100644 --- a/sys/contrib/dev/acpica/components/executer/exstorob.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/executer/exsystem.c b/sys/contrib/dev/acpica/components/executer/exsystem.c index 0a48eeb174c8..f91d8d04b3ba 100644 --- a/sys/contrib/dev/acpica/components/executer/exsystem.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -296,17 +296,17 @@ AcpiExSystemDoStall ( * (ACPI specifies 100 usec as max, but this gives some slack in * order to support existing BIOSs) */ - ACPI_ERROR ((AE_INFO, + ACPI_ERROR_ONCE ((AE_INFO, "Time parameter is too large (%u)", HowLongUs)); Status = AE_AML_OPERAND_VALUE; } else { if (HowLongUs > 100) - { - ACPI_WARNING ((AE_INFO, + { + ACPI_WARNING_ONCE ((AE_INFO, "Time parameter %u us > 100 us violating ACPI spec, please fix the firmware.", HowLongUs)); - } + } AcpiOsStall (HowLongUs); } diff --git a/sys/contrib/dev/acpica/components/executer/extrace.c b/sys/contrib/dev/acpica/components/executer/extrace.c index 2184b5513b46..b48a5fcb289b 100644 --- a/sys/contrib/dev/acpica/components/executer/extrace.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -269,6 +269,68 @@ AcpiExGetTraceEventName ( #endif +/******************************************************************************* + * + * FUNCTION: AcpiExTraceArgs + * + * PARAMETERS: Params - AML method arguments + * Count - numer of method arguments + * + * RETURN: None + * + * DESCRIPTION: Trace any arguments + * + ******************************************************************************/ + +void +AcpiExTraceArgs(ACPI_OPERAND_OBJECT **Params, UINT32 Count) +{ + UINT32 i; + + ACPI_FUNCTION_NAME(ExTraceArgs); + + for (i = 0; i < Count; i++) + { + ACPI_OPERAND_OBJECT *obj_desc = Params[i]; + + if (!i) + { + ACPI_DEBUG_PRINT((ACPI_DB_TRACE_POINT, " ")); + } + + switch (obj_desc->Common.Type) + { + case ACPI_TYPE_INTEGER: + ACPI_DEBUG_PRINT_RAW((ACPI_DB_TRACE_POINT, "%jx", (uintmax_t)obj_desc->Integer.Value)); + break; + + case ACPI_TYPE_STRING: + if (!obj_desc->String.Length) + { + ACPI_DEBUG_PRINT_RAW((ACPI_DB_TRACE_POINT, "NULL")); + break; + } + if (ACPI_IS_DEBUG_ENABLED(ACPI_LV_TRACE_POINT, _COMPONENT)) + { + AcpiUtPrintString(obj_desc->String.Pointer, ACPI_UINT8_MAX); + } + break; + + default: + ACPI_DEBUG_PRINT_RAW((ACPI_DB_TRACE_POINT, "Unknown")); + break; + } + + if ((i + 1) == Count) + { + ACPI_DEBUG_PRINT_RAW((ACPI_DB_TRACE_POINT, "\n")); + } + else + { + ACPI_DEBUG_PRINT_RAW((ACPI_DB_TRACE_POINT, ", ")); + } + } +} /******************************************************************************* * @@ -299,9 +361,9 @@ AcpiExTracePoint ( if (Pathname) { ACPI_DEBUG_PRINT ((ACPI_DB_TRACE_POINT, - "%s %s [0x%p:%s] execution.\n", + "%s %s [%s] execution.\n", AcpiExGetTraceEventName (Type), Begin ? "Begin" : "End", - Aml, Pathname)); + Pathname)); } else { diff --git a/sys/contrib/dev/acpica/components/executer/exutils.c b/sys/contrib/dev/acpica/components/executer/exutils.c index 425cf6b0010a..995edbc5990e 100644 --- a/sys/contrib/dev/acpica/components/executer/exutils.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/hardware/hwacpi.c b/sys/contrib/dev/acpica/components/hardware/hwacpi.c index 1cdab7cda39f..74cfecfcc2a2 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwacpi.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/hardware/hwesleep.c b/sys/contrib/dev/acpica/components/hardware/hwesleep.c index 799a14e29150..329d8a20b4b7 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwesleep.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/hardware/hwgpe.c b/sys/contrib/dev/acpica/components/hardware/hwgpe.c index 6c371b4575de..681ca9a1b9de 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwgpe.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/hardware/hwpci.c b/sys/contrib/dev/acpica/components/hardware/hwpci.c index 0d7585d2d04f..a9fc5cba2fff 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwpci.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/hardware/hwregs.c b/sys/contrib/dev/acpica/components/hardware/hwregs.c index 1dfce0c9e04a..d0f47b874ead 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwregs.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/hardware/hwsleep.c b/sys/contrib/dev/acpica/components/hardware/hwsleep.c index 3ca352cd5d26..210f4ea62dee 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwsleep.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/hardware/hwtimer.c b/sys/contrib/dev/acpica/components/hardware/hwtimer.c index 17dbbe84ecf4..9a9602e04232 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwtimer.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/hardware/hwvalid.c b/sys/contrib/dev/acpica/components/hardware/hwvalid.c index b4f90ba3df3a..5c4df25d2c38 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwvalid.c +++ b/sys/contrib/dev/acpica/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 - 2025, 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/sys/contrib/dev/acpica/components/hardware/hwxface.c b/sys/contrib/dev/acpica/components/hardware/hwxface.c index 2001b6c33fbb..5f645617cbce 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwxface.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c b/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c index 2ed5a3a89c7d..1d79e908cf08 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -159,13 +159,11 @@ /* Local prototypes */ -#if (!ACPI_REDUCED_HARDWARE) static ACPI_STATUS AcpiHwSetFirmwareWakingVector ( ACPI_TABLE_FACS *Facs, ACPI_PHYSICAL_ADDRESS PhysicalAddress, ACPI_PHYSICAL_ADDRESS PhysicalAddress64); -#endif static ACPI_STATUS AcpiHwSleepDispatch ( @@ -199,13 +197,6 @@ static ACPI_SLEEP_FUNCTIONS AcpiSleepDispatch[] = }; -/* - * These functions are removed for the ACPI_REDUCED_HARDWARE case: - * AcpiSetFirmwareWakingVector - * AcpiEnterSleepStateS4bios - */ - -#if (!ACPI_REDUCED_HARDWARE) /******************************************************************************* * * FUNCTION: AcpiHwSetFirmwareWakingVector @@ -298,6 +289,12 @@ AcpiSetFirmwareWakingVector ( ACPI_EXPORT_SYMBOL (AcpiSetFirmwareWakingVector) +/* + * These functions are removed for the ACPI_REDUCED_HARDWARE case: + * AcpiEnterSleepStateS4bios + */ + +#if (!ACPI_REDUCED_HARDWARE) /******************************************************************************* * * FUNCTION: AcpiEnterSleepStateS4bios diff --git a/sys/contrib/dev/acpica/components/namespace/nsaccess.c b/sys/contrib/dev/acpica/components/namespace/nsaccess.c index 4a00dd702db5..35d30ded0a60 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsaccess.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -449,7 +449,9 @@ AcpiNsLookup ( ACPI_NAMESPACE_NODE *CurrentNode = NULL; ACPI_NAMESPACE_NODE *ThisNode = NULL; UINT32 NumSegments; +#ifdef ACPI_DEBUG_OUTPUT UINT32 NumCarats; +#endif ACPI_NAME SimpleName; ACPI_OBJECT_TYPE TypeToCheckFor; ACPI_OBJECT_TYPE ThisSearchType; @@ -573,7 +575,9 @@ AcpiNsLookup ( * the parent node for each prefix instance. */ ThisNode = PrefixNode; +#ifdef ACPI_DEBUG_OUTPUT NumCarats = 0; +#endif while (*Path == (UINT8) AML_PARENT_PREFIX) { /* Name is fully qualified, no search rules apply */ @@ -588,7 +592,9 @@ AcpiNsLookup ( /* Backup to the parent node */ +#ifdef ACPI_DEBUG_OUTPUT NumCarats++; +#endif ThisNode = ThisNode->Parent; if (!ThisNode) { @@ -611,12 +617,14 @@ AcpiNsLookup ( } } +#ifdef ACPI_DEBUG_OUTPUT if (SearchParentFlag == ACPI_NS_NO_UPSEARCH) { ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Search scope is [%4.4s], path has %u carat(s)\n", AcpiUtGetNodeName (ThisNode), NumCarats)); } +#endif } /* diff --git a/sys/contrib/dev/acpica/components/namespace/nsalloc.c b/sys/contrib/dev/acpica/components/namespace/nsalloc.c index a53c09fa3dc1..69d1d7fa053a 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsalloc.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/namespace/nsarguments.c b/sys/contrib/dev/acpica/components/namespace/nsarguments.c index afa888e0c160..8916484053b9 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsarguments.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/namespace/nsconvert.c b/sys/contrib/dev/acpica/components/namespace/nsconvert.c index 047146589a06..ad4890b591a3 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsconvert.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/namespace/nsdump.c b/sys/contrib/dev/acpica/components/namespace/nsdump.c index 01480aac78a7..bf4aa1455075 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsdump.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c b/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c index a0a5af3686e7..dc370a6e3018 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/namespace/nseval.c b/sys/contrib/dev/acpica/components/namespace/nseval.c index ef642ebadfeb..765b270ad2a1 100644 --- a/sys/contrib/dev/acpica/components/namespace/nseval.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/namespace/nsinit.c b/sys/contrib/dev/acpica/components/namespace/nsinit.c index abfa6bc003af..ed37aee82502 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsinit.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/namespace/nsload.c b/sys/contrib/dev/acpica/components/namespace/nsload.c index 1c92f3addd4a..bbd36a8a29a3 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsload.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/namespace/nsnames.c b/sys/contrib/dev/acpica/components/namespace/nsnames.c index 578efeb93ab4..a5aa1139792d 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsnames.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -368,7 +368,7 @@ AcpiNsBuildNormalizedPath ( BOOLEAN NoTrailing) { UINT32 Length = 0, i; - char Name[ACPI_NAMESEG_SIZE]; + char Name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING; BOOLEAN DoNoTrailing; char c, *Left, *Right; ACPI_NAMESPACE_NODE *NextNode; diff --git a/sys/contrib/dev/acpica/components/namespace/nsobject.c b/sys/contrib/dev/acpica/components/namespace/nsobject.c index 5713922d5d7e..fd6f0a524699 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsobject.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/namespace/nsparse.c b/sys/contrib/dev/acpica/components/namespace/nsparse.c index 098a59e8e35a..c5d35bac831c 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsparse.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/namespace/nspredef.c b/sys/contrib/dev/acpica/components/namespace/nspredef.c index 386f6835859b..5bb5d5bf67ca 100644 --- a/sys/contrib/dev/acpica/components/namespace/nspredef.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/namespace/nsprepkg.c b/sys/contrib/dev/acpica/components/namespace/nsprepkg.c index 3405e160328c..6fced55328bf 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsprepkg.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/namespace/nsrepair.c b/sys/contrib/dev/acpica/components/namespace/nsrepair.c index fe722a0cb79e..8d0e86932e1d 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsrepair.c +++ b/sys/contrib/dev/acpica/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 - 2025, 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/sys/contrib/dev/acpica/components/namespace/nsrepair2.c b/sys/contrib/dev/acpica/components/namespace/nsrepair2.c index 62df8b00da2c..0dddebda980b 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsrepair2.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -169,7 +169,7 @@ ACPI_STATUS (*ACPI_REPAIR_FUNCTION) ( typedef struct acpi_repair_info { - char Name[ACPI_NAMESEG_SIZE]; + char Name[ACPI_NAMESEG_SIZE] ACPI_NONSTRING; ACPI_REPAIR_FUNCTION RepairFunction; } ACPI_REPAIR_INFO; @@ -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/sys/contrib/dev/acpica/components/namespace/nssearch.c b/sys/contrib/dev/acpica/components/namespace/nssearch.c index 8b953c033fe6..d956358e8e35 100644 --- a/sys/contrib/dev/acpica/components/namespace/nssearch.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/namespace/nsutils.c b/sys/contrib/dev/acpica/components/namespace/nsutils.c index 67f2a512fcdd..bf400ed2370d 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsutils.c +++ b/sys/contrib/dev/acpica/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 - 2025, 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/sys/contrib/dev/acpica/components/namespace/nswalk.c b/sys/contrib/dev/acpica/components/namespace/nswalk.c index f458a8693b07..f3c37d7ac231 100644 --- a/sys/contrib/dev/acpica/components/namespace/nswalk.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/namespace/nsxfeval.c b/sys/contrib/dev/acpica/components/namespace/nsxfeval.c index 6c6b567c5886..f6a1ead7ddd5 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsxfeval.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/namespace/nsxfname.c b/sys/contrib/dev/acpica/components/namespace/nsxfname.c index 4dfef3e5f429..706bb36a4f84 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsxfname.c +++ b/sys/contrib/dev/acpica/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 - 2025, 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/sys/contrib/dev/acpica/components/namespace/nsxfobj.c b/sys/contrib/dev/acpica/components/namespace/nsxfobj.c index a01d7a7acac4..ea0654285a90 100644 --- a/sys/contrib/dev/acpica/components/namespace/nsxfobj.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/parser/psargs.c b/sys/contrib/dev/acpica/components/parser/psargs.c index 8606fbdd9cf0..d9110c09fcb5 100644 --- a/sys/contrib/dev/acpica/components/parser/psargs.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -170,6 +170,10 @@ static ACPI_PARSE_OBJECT * AcpiPsGetNextField ( ACPI_PARSE_STATE *ParserState); +static void +AcpiPsFreeFieldList ( + ACPI_PARSE_OBJECT *Start); + /******************************************************************************* * @@ -872,6 +876,43 @@ AcpiPsGetNextField ( return_PTR (Field); } +/******************************************************************************* + * + * FUNCTION: AcpiPsFreeFieldList + * + * PARAMETERS: Start - First Op in field list + * + * RETURN: None. + * + * DESCRIPTION: Free all Op objects inside a field list. + * + ******************************************************************************/ + +static void +AcpiPsFreeFieldList ( + ACPI_PARSE_OBJECT *Start) +{ + ACPI_PARSE_OBJECT *Current = Start; + ACPI_PARSE_OBJECT *Next; + ACPI_PARSE_OBJECT *Arg; + + while (Current) + { + Next = Current->Common.Next; + + /* AML_INT_CONNECTION_OP can have a single argument */ + + Arg = AcpiPsGetArg (Current, 0); + if (Arg) + { + AcpiPsFreeOp (Arg); + } + + AcpiPsFreeOp(Current); + Current = Next; + } +} + /******************************************************************************* * @@ -948,6 +989,11 @@ AcpiPsGetNextArg ( Field = AcpiPsGetNextField (ParserState); if (!Field) { + if (Arg) + { + AcpiPsFreeFieldList(Arg); + } + return_ACPI_STATUS (AE_NO_MEMORY); } @@ -1016,6 +1062,11 @@ AcpiPsGetNextArg ( Status = AcpiPsGetNextNamepath (WalkState, ParserState, Arg, ACPI_NOT_METHOD_CALL); + if (ACPI_FAILURE(Status)) + { + AcpiPsFreeOp (Arg); + return_ACPI_STATUS (Status); + } } else { @@ -1048,6 +1099,11 @@ AcpiPsGetNextArg ( Status = AcpiPsGetNextNamepath (WalkState, ParserState, Arg, ACPI_POSSIBLE_METHOD_CALL); + if (ACPI_FAILURE(Status)) + { + AcpiPsFreeOp (Arg); + return_ACPI_STATUS (Status); + } if (Arg->Common.AmlOpcode == AML_INT_METHODCALL_OP) { diff --git a/sys/contrib/dev/acpica/components/parser/psloop.c b/sys/contrib/dev/acpica/components/parser/psloop.c index 15d90553b324..f4cac83e6069 100644 --- a/sys/contrib/dev/acpica/components/parser/psloop.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/parser/psobject.c b/sys/contrib/dev/acpica/components/parser/psobject.c index 73fd060e0c6f..5457d9d0be7d 100644 --- a/sys/contrib/dev/acpica/components/parser/psobject.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -815,7 +815,8 @@ AcpiPsCompleteFinalOp ( ACPI_PARSE_OBJECT *Op, ACPI_STATUS Status) { - ACPI_STATUS Status2; + ACPI_STATUS ReturnStatus = Status; + BOOLEAN Ascending = TRUE; ACPI_FUNCTION_TRACE_PTR (PsCompleteFinalOp, WalkState); @@ -832,7 +833,7 @@ AcpiPsCompleteFinalOp ( { if (Op) { - if (WalkState->AscendingCallback != NULL) + if (Ascending && WalkState->AscendingCallback != NULL) { WalkState->Op = Op; WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); @@ -851,41 +852,28 @@ AcpiPsCompleteFinalOp ( if (Status == AE_CTRL_TERMINATE) { - Status = AE_OK; - - /* Clean up */ - do - { - if (Op) - { - Status2 = AcpiPsCompleteThisOp (WalkState, Op); - if (ACPI_FAILURE (Status2)) - { - return_ACPI_STATUS (Status2); - } - } - - AcpiPsPopScope (&(WalkState->ParserState), &Op, - &WalkState->ArgTypes, &WalkState->ArgCount); - - } while (Op); - - return_ACPI_STATUS (Status); + Ascending = FALSE; + ReturnStatus = AE_CTRL_TERMINATE; } else if (ACPI_FAILURE (Status)) { /* First error is most important */ - (void) AcpiPsCompleteThisOp (WalkState, Op); - return_ACPI_STATUS (Status); + Ascending = FALSE; + ReturnStatus = Status; } } - Status2 = AcpiPsCompleteThisOp (WalkState, Op); - if (ACPI_FAILURE (Status2)) + Status = AcpiPsCompleteThisOp (WalkState, Op); + if (ACPI_FAILURE (Status)) { - return_ACPI_STATUS (Status2); + Ascending = FALSE; + if (ACPI_SUCCESS (ReturnStatus) || + ReturnStatus == AE_CTRL_TERMINATE) + { + ReturnStatus = Status; + } } } @@ -894,5 +882,5 @@ AcpiPsCompleteFinalOp ( } while (Op); - return_ACPI_STATUS (Status); + return_ACPI_STATUS (ReturnStatus); } diff --git a/sys/contrib/dev/acpica/components/parser/psopcode.c b/sys/contrib/dev/acpica/components/parser/psopcode.c index 4616e28f0f91..a317fab3005e 100644 --- a/sys/contrib/dev/acpica/components/parser/psopcode.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -436,7 +436,7 @@ const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES] = /* ACPI 3.0 opcodes */ -/* 7E */ ACPI_OP ("Timer", ARGP_TIMER_OP, ARGI_TIMER_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_0A_0T_1R, AML_FLAGS_EXEC_0A_0T_1R), +/* 7E */ ACPI_OP ("Timer", ARGP_TIMER_OP, ARGI_TIMER_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_0A_0T_1R, AML_FLAGS_EXEC_0A_0T_1R | AML_NO_OPERAND_RESOLVE), /* ACPI 5.0 opcodes */ diff --git a/sys/contrib/dev/acpica/components/parser/psopinfo.c b/sys/contrib/dev/acpica/components/parser/psopinfo.c index 10a91a9154aa..1db32f4e8246 100644 --- a/sys/contrib/dev/acpica/components/parser/psopinfo.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -180,8 +180,8 @@ const ACPI_OPCODE_INFO * AcpiPsGetOpcodeInfo ( UINT16 Opcode) { -#ifdef ACPI_DEBUG_OUTPUT - const char *OpcodeName = "Unknown AML opcode"; +#if defined ACPI_ASL_COMPILER && defined ACPI_DEBUG_OUTPUT + const char *OpcodeName = "Unknown AML opcode"; #endif ACPI_FUNCTION_NAME (PsGetOpcodeInfo); @@ -207,7 +207,7 @@ AcpiPsGetOpcodeInfo ( #if defined ACPI_ASL_COMPILER && defined ACPI_DEBUG_OUTPUT #include <contrib/dev/acpica/compiler/asldefine.h> - + switch (Opcode) { case AML_RAW_DATA_BYTE: @@ -249,12 +249,12 @@ AcpiPsGetOpcodeInfo ( default: break; } -#endif /* Unknown AML opcode */ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s [%4.4X]\n", OpcodeName, Opcode)); +#endif return (&AcpiGbl_AmlOpInfo [_UNK]); } diff --git a/sys/contrib/dev/acpica/components/parser/psparse.c b/sys/contrib/dev/acpica/components/parser/psparse.c index ed9227a0481a..f294033a0039 100644 --- a/sys/contrib/dev/acpica/components/parser/psparse.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/parser/psscope.c b/sys/contrib/dev/acpica/components/parser/psscope.c index 31e3e58e685a..4f9f496f5018 100644 --- a/sys/contrib/dev/acpica/components/parser/psscope.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/parser/pstree.c b/sys/contrib/dev/acpica/components/parser/pstree.c index f7f79dbcc6f5..b561ba4b0721 100644 --- a/sys/contrib/dev/acpica/components/parser/pstree.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/parser/psutils.c b/sys/contrib/dev/acpica/components/parser/psutils.c index 5e4f6935eeb5..3c647940e287 100644 --- a/sys/contrib/dev/acpica/components/parser/psutils.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/parser/pswalk.c b/sys/contrib/dev/acpica/components/parser/pswalk.c index f221c9e82f9c..a0941d44cc03 100644 --- a/sys/contrib/dev/acpica/components/parser/pswalk.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/parser/psxface.c b/sys/contrib/dev/acpica/components/parser/psxface.c index 4d737748562a..08c1c2bb4f0d 100644 --- a/sys/contrib/dev/acpica/components/parser/psxface.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/resources/rsaddr.c b/sys/contrib/dev/acpica/components/resources/rsaddr.c index f1ae33784093..9074c6dbaa35 100644 --- a/sys/contrib/dev/acpica/components/resources/rsaddr.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -431,13 +431,13 @@ AcpiRsGetAddressCommon ( ACPI_RESOURCE *Resource, AML_RESOURCE *Aml) { - ACPI_FUNCTION_ENTRY (); - + ACPI_FUNCTION_ENTRY(); /* Validate the Resource Type */ if ((Aml->Address.ResourceType > 2) && - (Aml->Address.ResourceType < 0xC0)) + (Aml->Address.ResourceType < 0xC0) && + (Aml->Address.ResourceType != 0x0A)) { return (FALSE); } @@ -492,7 +492,6 @@ AcpiRsSetAddressCommon ( { ACPI_FUNCTION_ENTRY (); - /* Set the Resource Type and General Flags */ (void) AcpiRsConvertResourceToAml ( diff --git a/sys/contrib/dev/acpica/components/resources/rscalc.c b/sys/contrib/dev/acpica/components/resources/rscalc.c index 07ff54cec01f..fc7575c2ddfb 100644 --- a/sys/contrib/dev/acpica/components/resources/rscalc.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -480,6 +480,13 @@ AcpiRsGetAmlLength ( break; + case ACPI_RESOURCE_TYPE_CLOCK_INPUT: + + TotalSize = (ACPI_RS_LENGTH) (TotalSize + + Resource->Data.ClockInput.ResourceSource.StringLength); + + break; + case ACPI_RESOURCE_TYPE_SERIAL_BUS: @@ -733,7 +740,7 @@ AcpiRsGetListLength ( } break; - case ACPI_RESOURCE_NAME_SERIAL_BUS: + case ACPI_RESOURCE_NAME_SERIAL_BUS: { MinimumAmlResourceLength = AcpiGbl_ResourceAmlSerialBusSizes[ AmlResource->CommonSerialBus.Type]; @@ -741,6 +748,7 @@ AcpiRsGetListLength ( AmlResource->CommonSerialBus.ResourceLength - MinimumAmlResourceLength; break; + } case ACPI_RESOURCE_NAME_PIN_CONFIG: @@ -789,6 +797,12 @@ AcpiRsGetListLength ( break; + case ACPI_RESOURCE_NAME_CLOCK_INPUT: + ExtraStructBytes = AcpiRsStreamOptionLength ( + ResourceLength, MinimumAmlResourceLength); + + break; + default: break; diff --git a/sys/contrib/dev/acpica/components/resources/rscreate.c b/sys/contrib/dev/acpica/components/resources/rscreate.c index aa5c68edcc59..b930ced8396f 100644 --- a/sys/contrib/dev/acpica/components/resources/rscreate.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/resources/rsdump.c b/sys/contrib/dev/acpica/components/resources/rsdump.c index a7f16bed8fcd..2f3e996af9af 100644 --- a/sys/contrib/dev/acpica/components/resources/rsdump.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -230,6 +230,7 @@ AcpiRsDumpDescriptor ( ACPI_RSDUMP_INFO *Table); +#ifdef ACPI_DEBUGGER /******************************************************************************* * * FUNCTION: AcpiRsDumpResourceList @@ -359,7 +360,7 @@ AcpiRsDumpIrqList ( PrtElement, PrtElement->Length); } } - +#endif /******************************************************************************* * diff --git a/sys/contrib/dev/acpica/components/resources/rsdumpinfo.c b/sys/contrib/dev/acpica/components/resources/rsdumpinfo.c index f42a8e871fe6..293eeb596928 100644 --- a/sys/contrib/dev/acpica/components/resources/rsdumpinfo.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -374,6 +374,17 @@ ACPI_RSDUMP_INFO AcpiRsDumpPinFunction[10] = {ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (PinFunction.VendorData), "VendorData", NULL}, }; +ACPI_RSDUMP_INFO AcpiRsDumpClockInput[7] = +{ + {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpClockInput), "ClockInput", NULL}, + {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (ClockInput.RevisionId), "RevisionId", NULL}, + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (ClockInput.FrequencyNumerator), "FrequencyNumerator", NULL}, + {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (ClockInput.FrequencyDivisor), "FrequencyDivisor", NULL}, + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (ClockInput.Scale), "Scale", AcpiGbl_ClockInputScale}, + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (ClockInput.Mode), "Mode", AcpiGbl_ClockInputMode}, + {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (ClockInput.ResourceSource), "ResourceSource", NULL}, +}; + ACPI_RSDUMP_INFO AcpiRsDumpPinConfig[11] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpPinConfig), "PinConfig", NULL}, diff --git a/sys/contrib/dev/acpica/components/resources/rsinfo.c b/sys/contrib/dev/acpica/components/resources/rsinfo.c index cdcae0a8221c..7a1bb07abb94 100644 --- a/sys/contrib/dev/acpica/components/resources/rsinfo.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -197,6 +197,7 @@ ACPI_RSCONVERT_INFO *AcpiGbl_SetResourceDispatch[] = AcpiRsConvertPinGroup, /* 0x16, ACPI_RESOURCE_TYPE_PIN_GROUP */ AcpiRsConvertPinGroupFunction, /* 0x17, ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ AcpiRsConvertPinGroupConfig, /* 0x18, ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */ + AcpiRsConvertClockInput, /* 0x19, ACPI_RESOURCE_TYPE_CLOCK_INPUT */ }; /* Dispatch tables for AML-to-resource (Get Resource) conversion functions */ @@ -243,6 +244,7 @@ ACPI_RSCONVERT_INFO *AcpiGbl_GetResourceDispatch[] = AcpiRsConvertPinGroup, /* 0x10, ACPI_RESOURCE_NAME_PIN_GROUP */ AcpiRsConvertPinGroupFunction, /* 0x11, ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION */ AcpiRsConvertPinGroupConfig, /* 0x12, ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG */ + AcpiRsConvertClockInput, /* 0x13, ACPI_RESOURCE_NAME_CLOCK_INPUT */ }; /* Subtype table for SerialBus -- I2C, SPI, UART, and CSI2 */ @@ -288,6 +290,7 @@ ACPI_RSDUMP_INFO *AcpiGbl_DumpResourceDispatch[] = AcpiRsDumpPinGroup, /* ACPI_RESOURCE_TYPE_PIN_GROUP */ AcpiRsDumpPinGroupFunction, /* ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ AcpiRsDumpPinGroupConfig, /* ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */ + AcpiRsDumpClockInput, /* ACPI_RESOURCE_TYPE_CLOCK_INPUT */ }; ACPI_RSDUMP_INFO *AcpiGbl_DumpSerialBusDispatch[] = @@ -333,6 +336,7 @@ const UINT8 AcpiGbl_AmlResourceSizes[] = sizeof (AML_RESOURCE_PIN_GROUP), /* ACPI_RESOURCE_TYPE_PIN_GROUP */ sizeof (AML_RESOURCE_PIN_GROUP_FUNCTION), /* ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ sizeof (AML_RESOURCE_PIN_GROUP_CONFIG), /* ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */ + sizeof (AML_RESOURCE_CLOCK_INPUT), /* ACPI_RESOURCE_TYPE_CLOCK_INPUT */ }; @@ -378,6 +382,7 @@ const UINT8 AcpiGbl_ResourceStructSizes[] = ACPI_RS_SIZE (ACPI_RESOURCE_PIN_GROUP), ACPI_RS_SIZE (ACPI_RESOURCE_PIN_GROUP_FUNCTION), ACPI_RS_SIZE (ACPI_RESOURCE_PIN_GROUP_CONFIG), + ACPI_RS_SIZE (ACPI_RESOURCE_CLOCK_INPUT), }; const UINT8 AcpiGbl_AmlResourceSerialBusSizes[] = diff --git a/sys/contrib/dev/acpica/components/resources/rsio.c b/sys/contrib/dev/acpica/components/resources/rsio.c index 17cfb861ba47..46d9b2f8aa4b 100644 --- a/sys/contrib/dev/acpica/components/resources/rsio.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/resources/rsirq.c b/sys/contrib/dev/acpica/components/resources/rsirq.c index 9fe2f2bbb9e9..80482eb097d6 100644 --- a/sys/contrib/dev/acpica/components/resources/rsirq.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/resources/rslist.c b/sys/contrib/dev/acpica/components/resources/rslist.c index e9b4ef207680..2de70ad4fc58 100644 --- a/sys/contrib/dev/acpica/components/resources/rslist.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/resources/rsmemory.c b/sys/contrib/dev/acpica/components/resources/rsmemory.c index 28e22e8c7102..0430379a0f05 100644 --- a/sys/contrib/dev/acpica/components/resources/rsmemory.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/resources/rsmisc.c b/sys/contrib/dev/acpica/components/resources/rsmisc.c index 1e7338e747fc..725a130a2cec 100644 --- a/sys/contrib/dev/acpica/components/resources/rsmisc.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -349,7 +349,8 @@ AcpiRsConvertAmlToResource ( case ACPI_RSC_COUNT_SERIAL_VEN: - ItemCount = ACPI_GET16 (Source) - Info->Value; + ACPI_MOVE_16_TO_16(&Temp16, Source); + ItemCount = Temp16 - Info->Value; Resource->Length = Resource->Length + ItemCount; ACPI_SET16 (Destination, ItemCount); @@ -357,9 +358,10 @@ AcpiRsConvertAmlToResource ( case ACPI_RSC_COUNT_SERIAL_RES: + ACPI_MOVE_16_TO_16(&Temp16, Source); ItemCount = (AmlResourceLength + sizeof (AML_RESOURCE_LARGE_HEADER)) - - ACPI_GET16 (Source) - Info->Value; + Temp16 - Info->Value; Resource->Length = Resource->Length + ItemCount; ACPI_SET16 (Destination, ItemCount); @@ -437,8 +439,9 @@ AcpiRsConvertAmlToResource ( /* Copy the ResourceSource string */ + ACPI_MOVE_16_TO_16 (&Temp16, Source); Source = ACPI_ADD_PTR ( - void, Aml, (ACPI_GET16 (Source) + Info->Value)); + void, Aml, (Temp16 + Info->Value)); AcpiRsMoveData (Target, Source, ItemCount, Info->Opcode); break; diff --git a/sys/contrib/dev/acpica/components/resources/rsserial.c b/sys/contrib/dev/acpica/components/resources/rsserial.c index c32ad2dc2f88..ab09939850c0 100644 --- a/sys/contrib/dev/acpica/components/resources/rsserial.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -256,6 +256,50 @@ ACPI_RSCONVERT_INFO AcpiRsConvertGpio[18] = /******************************************************************************* * + * AcpiRsConvertClockInput + * + ******************************************************************************/ + +ACPI_RSCONVERT_INFO AcpiRsConvertClockInput[8] = +{ + {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_CLOCK_INPUT, + ACPI_RS_SIZE (ACPI_RESOURCE_CLOCK_INPUT), + ACPI_RSC_TABLE_SIZE (AcpiRsConvertClockInput)}, + + {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_CLOCK_INPUT, + sizeof (AML_RESOURCE_CLOCK_INPUT), + 0}, + + {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.ClockInput.RevisionId), + AML_OFFSET (ClockInput.RevisionId), + 1}, + + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.ClockInput.Mode), + AML_OFFSET (ClockInput.Flags), + 0}, + + {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.ClockInput.Scale), + AML_OFFSET (ClockInput.Flags), + 1}, + + {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.ClockInput.FrequencyDivisor), + AML_OFFSET (ClockInput.FrequencyDivisor), + 2}, + + {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.ClockInput.FrequencyNumerator), + AML_OFFSET (ClockInput.FrequencyNumerator), + 4}, + + /* Resource Source */ + {ACPI_RSC_SOURCE, ACPI_RS_OFFSET (Data.ClockInput.ResourceSource), + 0, + sizeof(AML_RESOURCE_CLOCK_INPUT)}, + +}; + + +/******************************************************************************* + * * AcpiRsConvertPinfunction * ******************************************************************************/ diff --git a/sys/contrib/dev/acpica/components/resources/rsutils.c b/sys/contrib/dev/acpica/components/resources/rsutils.c index 0b357979c9dc..cc89fcfbb356 100644 --- a/sys/contrib/dev/acpica/components/resources/rsutils.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/resources/rsxface.c b/sys/contrib/dev/acpica/components/resources/rsxface.c index 08ec4be5881d..89cc58864ead 100644 --- a/sys/contrib/dev/acpica/components/resources/rsxface.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/tables/tbdata.c b/sys/contrib/dev/acpica/components/tables/tbdata.c index 5067d2348c29..46c7724bdda4 100644 --- a/sys/contrib/dev/acpica/components/tables/tbdata.c +++ b/sys/contrib/dev/acpica/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 - 2025, 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/sys/contrib/dev/acpica/components/tables/tbfadt.c b/sys/contrib/dev/acpica/components/tables/tbfadt.c index 0572989db0af..70490b5d0e70 100644 --- a/sys/contrib/dev/acpica/components/tables/tbfadt.c +++ b/sys/contrib/dev/acpica/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 - 2025, 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 */ @@ -489,24 +489,19 @@ AcpiTbParseFadt ( ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE, &AcpiGbl_DsdtIndex); - /* If Hardware Reduced flag is set, there is no FACS */ - - if (!AcpiGbl_ReducedHardware) + if (AcpiGbl_FADT.Facs) { - if (AcpiGbl_FADT.Facs) - { - AcpiTbInstallStandardTable ( - (ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.Facs, - ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE, - &AcpiGbl_FacsIndex); - } - if (AcpiGbl_FADT.XFacs) - { - AcpiTbInstallStandardTable ( - (ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XFacs, - ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE, - &AcpiGbl_XFacsIndex); - } + AcpiTbInstallStandardTable ( + (ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.Facs, + ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE, + &AcpiGbl_FacsIndex); + } + if (AcpiGbl_FADT.XFacs) + { + AcpiTbInstallStandardTable ( + (ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XFacs, + ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE, + &AcpiGbl_XFacsIndex); } } diff --git a/sys/contrib/dev/acpica/components/tables/tbfind.c b/sys/contrib/dev/acpica/components/tables/tbfind.c index a714dc48f229..e497cca9b553 100644 --- a/sys/contrib/dev/acpica/components/tables/tbfind.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -208,8 +208,8 @@ AcpiTbFindTable ( memset (&Header, 0, sizeof (ACPI_TABLE_HEADER)); ACPI_COPY_NAMESEG (Header.Signature, Signature); - strncpy (Header.OemId, OemId, ACPI_OEM_ID_SIZE); - strncpy (Header.OemTableId, OemTableId, ACPI_OEM_TABLE_ID_SIZE); + memcpy (Header.OemId, OemId, ACPI_OEM_ID_SIZE); + memcpy (Header.OemTableId, OemTableId, ACPI_OEM_TABLE_ID_SIZE); /* Search for the table */ diff --git a/sys/contrib/dev/acpica/components/tables/tbinstal.c b/sys/contrib/dev/acpica/components/tables/tbinstal.c index 7fe98ea2f27e..309ec5b68472 100644 --- a/sys/contrib/dev/acpica/components/tables/tbinstal.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/tables/tbprint.c b/sys/contrib/dev/acpica/components/tables/tbprint.c index 0428968a2908..8b812a890a07 100644 --- a/sys/contrib/dev/acpica/components/tables/tbprint.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -152,6 +152,8 @@ #include <contrib/dev/acpica/include/acpi.h> #include <contrib/dev/acpica/include/accommon.h> #include <contrib/dev/acpica/include/actables.h> +#include <contrib/dev/acpica/include/acdisasm.h> +#include <contrib/dev/acpica/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 = '?'; } @@ -277,6 +279,14 @@ AcpiTbPrintTableHeader ( ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Revision, LocalHeader.OemId)); } + else if (AcpiGbl_CDAT && !AcpiUtValidNameseg (Header->Signature)) + { + /* CDAT does not use the common ACPI table header */ + + ACPI_INFO (("%-4.4s 0x%8.8X%8.8X %06X", + ACPI_SIG_CDAT, ACPI_FORMAT_UINT64 (Address), + ACPI_CAST_PTR (ACPI_TABLE_CDAT, Header)->Length)); + } else { /* Standard ACPI table with full common header */ @@ -292,90 +302,3 @@ AcpiTbPrintTableHeader ( LocalHeader.AslCompilerId, LocalHeader.AslCompilerRevision)); } } - - -/******************************************************************************* - * - * 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/sys/contrib/dev/acpica/components/tables/tbutils.c b/sys/contrib/dev/acpica/components/tables/tbutils.c index 7698297c5d92..61d8ac597afa 100644 --- a/sys/contrib/dev/acpica/components/tables/tbutils.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -165,7 +165,6 @@ AcpiTbGetRootTableEntry ( UINT32 TableEntrySize); -#if (!ACPI_REDUCED_HARDWARE) /******************************************************************************* * * FUNCTION: AcpiTbInitializeFacs @@ -185,15 +184,7 @@ AcpiTbInitializeFacs ( { ACPI_TABLE_FACS *Facs; - - /* If Hardware Reduced flag is set, there is no FACS */ - - if (AcpiGbl_ReducedHardware) - { - AcpiGbl_FACS = NULL; - return (AE_OK); - } - else if (AcpiGbl_FADT.XFacs && + if (AcpiGbl_FADT.XFacs && (!AcpiGbl_FADT.Facs || !AcpiGbl_Use32BitFacsAddresses)) { (void) AcpiGetTableByIndex (AcpiGbl_XFacsIndex, @@ -211,7 +202,6 @@ AcpiTbInitializeFacs ( return (AE_OK); } -#endif /* !ACPI_REDUCED_HARDWARE */ /******************************************************************************* @@ -323,6 +313,7 @@ AcpiTbGetRootTableEntry ( UINT8 *TableEntry, UINT32 TableEntrySize) { + UINT32 Address32; UINT64 Address64; @@ -336,8 +327,8 @@ AcpiTbGetRootTableEntry ( * 32-bit platform, RSDT: Return 32-bit table entry * 64-bit platform, RSDT: Expand 32-bit to 64-bit and return */ - return ((ACPI_PHYSICAL_ADDRESS) (*ACPI_CAST_PTR ( - UINT32, TableEntry))); + ACPI_MOVE_32_TO_32(&Address32, TableEntry); + return Address32; } else { @@ -471,7 +462,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/sys/contrib/dev/acpica/components/tables/tbxface.c b/sys/contrib/dev/acpica/components/tables/tbxface.c index 41eb3cfeb83f..0b16c0a9ebec 100644 --- a/sys/contrib/dev/acpica/components/tables/tbxface.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/tables/tbxfload.c b/sys/contrib/dev/acpica/components/tables/tbxfload.c index 714a6e055dd3..af49869d626c 100644 --- a/sys/contrib/dev/acpica/components/tables/tbxfload.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/tables/tbxfroot.c b/sys/contrib/dev/acpica/components/tables/tbxfroot.c index 39cf9ba32e8b..7c444bda9c8c 100644 --- a/sys/contrib/dev/acpica/components/tables/tbxfroot.c +++ b/sys/contrib/dev/acpica/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 - 2025, 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/sys/contrib/dev/acpica/components/utilities/utaddress.c b/sys/contrib/dev/acpica/components/utilities/utaddress.c index c1a76098f645..7ea0ff3e91b7 100644 --- a/sys/contrib/dev/acpica/components/utilities/utaddress.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utalloc.c b/sys/contrib/dev/acpica/components/utilities/utalloc.c index 98b1c48e39ec..0dfdec633c2f 100644 --- a/sys/contrib/dev/acpica/components/utilities/utalloc.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utascii.c b/sys/contrib/dev/acpica/components/utilities/utascii.c index 747bcdf2e7af..cf64bdee02df 100644 --- a/sys/contrib/dev/acpica/components/utilities/utascii.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utbuffer.c b/sys/contrib/dev/acpica/components/utilities/utbuffer.c index 795e3090c312..b22530412b2f 100644 --- a/sys/contrib/dev/acpica/components/utilities/utbuffer.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utcache.c b/sys/contrib/dev/acpica/components/utilities/utcache.c index 068059e80d94..232154696307 100644 --- a/sys/contrib/dev/acpica/components/utilities/utcache.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -433,9 +433,9 @@ AcpiOsAcquireObject ( { /* The cache is empty, create a new object */ - ACPI_MEM_TRACKING (Cache->TotalAllocated++); - #ifdef ACPI_DBG_TRACK_ALLOCATIONS + ACPI_MEM_TRACKING (Cache->TotalAllocated++); + if ((Cache->TotalAllocated - Cache->TotalFreed) > Cache->MaxOccupied) { Cache->MaxOccupied = Cache->TotalAllocated - Cache->TotalFreed; diff --git a/sys/contrib/dev/acpica/components/utilities/utcksum.c b/sys/contrib/dev/acpica/components/utilities/utcksum.c new file mode 100644 index 000000000000..50f8f80570ef --- /dev/null +++ b/sys/contrib/dev/acpica/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 - 2025, 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 <contrib/dev/acpica/include/acpi.h> +#include <contrib/dev/acpica/include/accommon.h> +#include <contrib/dev/acpica/include/acdisasm.h> +#include <contrib/dev/acpica/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/sys/contrib/dev/acpica/components/utilities/utcopy.c b/sys/contrib/dev/acpica/components/utilities/utcopy.c index bf34bbb4a34d..fd4d6922a1f2 100644 --- a/sys/contrib/dev/acpica/components/utilities/utcopy.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utdebug.c b/sys/contrib/dev/acpica/components/utilities/utdebug.c index eafaae4e6544..90b8e246a1a9 100644 --- a/sys/contrib/dev/acpica/components/utilities/utdebug.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -185,7 +185,12 @@ AcpiUtInitStackPtrTrace ( ACPI_SIZE CurrentSp; +#pragma GCC diagnostic push +#if defined(__GNUC__) && __GNUC__ >= 12 +#pragma GCC diagnostic ignored "-Wdangling-pointer=" +#endif AcpiGbl_EntryStackPointer = &CurrentSp; +#pragma GCC diagnostic pop } @@ -210,7 +215,12 @@ AcpiUtTrackStackPtr ( if (&CurrentSp < AcpiGbl_LowestStackPointer) { +#pragma GCC diagnostic push +#if defined(__GNUC__) && __GNUC__ >= 12 +#pragma GCC diagnostic ignored "-Wdangling-pointer=" +#endif AcpiGbl_LowestStackPointer = &CurrentSp; +#pragma GCC diagnostic pop } if (AcpiGbl_NestingLevel > AcpiGbl_DeepestNesting) diff --git a/sys/contrib/dev/acpica/components/utilities/utdecode.c b/sys/contrib/dev/acpica/components/utilities/utdecode.c index 4c7e5d342d25..00a2de9e9a5d 100644 --- a/sys/contrib/dev/acpica/components/utilities/utdecode.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utdelete.c b/sys/contrib/dev/acpica/components/utilities/utdelete.c index ea61d9998674..e88cc736990b 100644 --- a/sys/contrib/dev/acpica/components/utilities/utdelete.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -293,7 +293,7 @@ AcpiUtDeleteInternalObj ( /* Global Lock has extra semaphore */ (void) AcpiOsDeleteSemaphore (AcpiGbl_GlobalLockSemaphore); - AcpiGbl_GlobalLockSemaphore = NULL; + AcpiGbl_GlobalLockSemaphore = ACPI_SEMAPHORE_NULL; AcpiOsDeleteMutex (Object->Mutex.OsMutex); AcpiGbl_GlobalLockMutex = NULL; @@ -312,7 +312,7 @@ AcpiUtDeleteInternalObj ( Object, Object->Event.OsSemaphore)); (void) AcpiOsDeleteSemaphore (Object->Event.OsSemaphore); - Object->Event.OsSemaphore = NULL; + Object->Event.OsSemaphore = ACPI_SEMAPHORE_NULL; break; case ACPI_TYPE_METHOD: @@ -574,7 +574,7 @@ AcpiUtUpdateRefCount ( "Obj %p Type %.2X [%s] Refs %.2X [Incremented]\n", Object, Object->Common.Type, AcpiUtGetObjectTypeName (Object), NewCount)); - Message = "Incremement"; + Message = "Increment"; break; case REF_DECREMENT: diff --git a/sys/contrib/dev/acpica/components/utilities/uterror.c b/sys/contrib/dev/acpica/components/utilities/uterror.c index e9eb3d6fd46a..1537f69a2a2b 100644 --- a/sys/contrib/dev/acpica/components/utilities/uterror.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/uteval.c b/sys/contrib/dev/acpica/components/utilities/uteval.c index 4c5e6fbec98d..53f843062179 100644 --- a/sys/contrib/dev/acpica/components/utilities/uteval.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utexcep.c b/sys/contrib/dev/acpica/components/utilities/utexcep.c index 57101529783d..b3e606ceef57 100644 --- a/sys/contrib/dev/acpica/components/utilities/utexcep.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utglobal.c b/sys/contrib/dev/acpica/components/utilities/utglobal.c index 2a121dfcca3c..95d679a20746 100644 --- a/sys/contrib/dev/acpica/components/utilities/utglobal.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/uthex.c b/sys/contrib/dev/acpica/components/utilities/uthex.c index 9aedc9224805..2806f1c48148 100644 --- a/sys/contrib/dev/acpica/components/utilities/uthex.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utids.c b/sys/contrib/dev/acpica/components/utilities/utids.c index d4d62f019c28..3dfb908302c6 100644 --- a/sys/contrib/dev/acpica/components/utilities/utids.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utinit.c b/sys/contrib/dev/acpica/components/utilities/utinit.c index 3c9e8c71fd35..b5a4b7e7d936 100644 --- a/sys/contrib/dev/acpica/components/utilities/utinit.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -316,7 +316,7 @@ AcpiUtInitGlobals ( /* Global Lock support */ - AcpiGbl_GlobalLockSemaphore = NULL; + AcpiGbl_GlobalLockSemaphore = ACPI_SEMAPHORE_NULL; AcpiGbl_GlobalLockMutex = NULL; AcpiGbl_GlobalLockAcquired = FALSE; AcpiGbl_GlobalLockHandle = 0; diff --git a/sys/contrib/dev/acpica/components/utilities/utlock.c b/sys/contrib/dev/acpica/components/utilities/utlock.c index 6f7e6be97c6e..a06b27525cc3 100644 --- a/sys/contrib/dev/acpica/components/utilities/utlock.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utmath.c b/sys/contrib/dev/acpica/components/utilities/utmath.c index 18aa1707b139..48bbe8f3d8c8 100644 --- a/sys/contrib/dev/acpica/components/utilities/utmath.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utmisc.c b/sys/contrib/dev/acpica/components/utilities/utmisc.c index 44b0ca48f73e..13dffc6674d3 100644 --- a/sys/contrib/dev/acpica/components/utilities/utmisc.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utmutex.c b/sys/contrib/dev/acpica/components/utilities/utmutex.c index ec25202c9789..b0b26458818e 100644 --- a/sys/contrib/dev/acpica/components/utilities/utmutex.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utnonansi.c b/sys/contrib/dev/acpica/components/utilities/utnonansi.c index 3c724bf01339..f8b3a29e3283 100644 --- a/sys/contrib/dev/acpica/components/utilities/utnonansi.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utobject.c b/sys/contrib/dev/acpica/components/utilities/utobject.c index 287a1cde2179..046b6c2531b6 100644 --- a/sys/contrib/dev/acpica/components/utilities/utobject.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utosi.c b/sys/contrib/dev/acpica/components/utilities/utosi.c index 0b3774e181f8..8a2d5093f563 100644 --- a/sys/contrib/dev/acpica/components/utilities/utosi.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -222,6 +222,7 @@ static ACPI_INTERFACE_INFO AcpiDefaultSupportedInterfaces[] = {"Windows 2019", NULL, 0, ACPI_OSI_WIN_10_19H1}, /* Windows 10 version 1903 - Added 08/2019 */ {"Windows 2020", NULL, 0, ACPI_OSI_WIN_10_20H1}, /* Windows 10 version 2004 - Added 08/2021 */ {"Windows 2021", NULL, 0, ACPI_OSI_WIN_11}, /* Windows 11 - Added 01/2022 */ + {"Windows 2022", NULL, 0, ACPI_OSI_WIN_11_22H2}, /* Windows 11 version 22H2 - Added 04/2024 */ /* Feature Group Strings */ diff --git a/sys/contrib/dev/acpica/components/utilities/utownerid.c b/sys/contrib/dev/acpica/components/utilities/utownerid.c index 11853e48c271..7e39b7851af4 100644 --- a/sys/contrib/dev/acpica/components/utilities/utownerid.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utpredef.c b/sys/contrib/dev/acpica/components/utilities/utpredef.c index 5c3562846235..23e6606d167c 100644 --- a/sys/contrib/dev/acpica/components/utilities/utpredef.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utresdecode.c b/sys/contrib/dev/acpica/components/utilities/utresdecode.c index 54452852300d..d14259911a07 100644 --- a/sys/contrib/dev/acpica/components/utilities/utresdecode.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -467,4 +467,17 @@ const char *AcpiGbl_PtypDecode[] = "Input Schmitt Trigger", }; +const char *AcpiGbl_ClockInputMode[] = +{ + "Fixed", + "Variable", +}; + +const char *AcpiGbl_ClockInputScale[] = +{ + "Hz", + "KHz", + "MHz", +}; + #endif diff --git a/sys/contrib/dev/acpica/components/utilities/utresrc.c b/sys/contrib/dev/acpica/components/utilities/utresrc.c index ec4afc7649e8..109395435d45 100644 --- a/sys/contrib/dev/acpica/components/utilities/utresrc.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -204,6 +204,8 @@ const UINT8 AcpiGbl_ResourceAmlSizes[] = ACPI_AML_SIZE_LARGE (AML_RESOURCE_PIN_GROUP), ACPI_AML_SIZE_LARGE (AML_RESOURCE_PIN_GROUP_FUNCTION), ACPI_AML_SIZE_LARGE (AML_RESOURCE_PIN_GROUP_CONFIG), + ACPI_AML_SIZE_LARGE (AML_RESOURCE_CLOCK_INPUT), + }; const UINT8 AcpiGbl_ResourceAmlSerialBusSizes[] = @@ -264,6 +266,7 @@ static const UINT8 AcpiGbl_ResourceTypes[] = ACPI_VARIABLE_LENGTH, /* 10 PinGroup */ ACPI_VARIABLE_LENGTH, /* 11 PinGroupFunction */ ACPI_VARIABLE_LENGTH, /* 12 PinGroupConfig */ + ACPI_VARIABLE_LENGTH, /* 13 ClockInput */ }; diff --git a/sys/contrib/dev/acpica/components/utilities/utstate.c b/sys/contrib/dev/acpica/components/utilities/utstate.c index 22b988fed224..02fec7d15bf5 100644 --- a/sys/contrib/dev/acpica/components/utilities/utstate.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utstring.c b/sys/contrib/dev/acpica/components/utilities/utstring.c index dcbdc6d9edc6..59e34e7c8a79 100644 --- a/sys/contrib/dev/acpica/components/utilities/utstring.c +++ b/sys/contrib/dev/acpica/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 - 2025, 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/sys/contrib/dev/acpica/components/utilities/utstrsuppt.c b/sys/contrib/dev/acpica/components/utilities/utstrsuppt.c index 3ca780ea0b33..1537d8a02949 100644 --- a/sys/contrib/dev/acpica/components/utilities/utstrsuppt.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utstrtoul64.c b/sys/contrib/dev/acpica/components/utilities/utstrtoul64.c index e726c41bab0b..2683c37c35db 100644 --- a/sys/contrib/dev/acpica/components/utilities/utstrtoul64.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/uttrack.c b/sys/contrib/dev/acpica/components/utilities/uttrack.c index 5343b3074364..2c60c1c7b1f1 100644 --- a/sys/contrib/dev/acpica/components/utilities/uttrack.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utuuid.c b/sys/contrib/dev/acpica/components/utilities/utuuid.c index c13e3ea917ec..669cce69b1f3 100644 --- a/sys/contrib/dev/acpica/components/utilities/utuuid.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utxface.c b/sys/contrib/dev/acpica/components/utilities/utxface.c index 9631bb7c8922..9b5f8b3c9d84 100644 --- a/sys/contrib/dev/acpica/components/utilities/utxface.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utxferror.c b/sys/contrib/dev/acpica/components/utilities/utxferror.c index e30c2b751f56..08a3ab986c3f 100644 --- a/sys/contrib/dev/acpica/components/utilities/utxferror.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License diff --git a/sys/contrib/dev/acpica/components/utilities/utxfinit.c b/sys/contrib/dev/acpica/components/utilities/utxfinit.c index 4cd977ebdaa1..f295471031d0 100644 --- a/sys/contrib/dev/acpica/components/utilities/utxfinit.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License @@ -276,6 +276,20 @@ AcpiEnableSubsystem ( */ AcpiGbl_EarlyInitialization = FALSE; + /* + * Obtain a permanent mapping for the FACS. This is required for the + * Global Lock and the Firmware Waking Vector + */ + if (!(Flags & ACPI_NO_FACS_INIT)) + { + Status = AcpiTbInitializeFacs (); + if (ACPI_FAILURE (Status)) + { + ACPI_WARNING ((AE_INFO, "Could not map the FACS table")); + return_ACPI_STATUS (Status); + } + } + #if (!ACPI_REDUCED_HARDWARE) /* Enable ACPI mode */ @@ -295,20 +309,6 @@ AcpiEnableSubsystem ( } /* - * Obtain a permanent mapping for the FACS. This is required for the - * Global Lock and the Firmware Waking Vector - */ - if (!(Flags & ACPI_NO_FACS_INIT)) - { - Status = AcpiTbInitializeFacs (); - if (ACPI_FAILURE (Status)) - { - ACPI_WARNING ((AE_INFO, "Could not map the FACS table")); - return_ACPI_STATUS (Status); - } - } - - /* * Initialize ACPI Event handling (Fixed and General Purpose) * * Note1: We must have the hardware and events initialized before we can diff --git a/sys/contrib/dev/acpica/components/utilities/utxfmutex.c b/sys/contrib/dev/acpica/components/utilities/utxfmutex.c index 104c4ebb0f43..595904977f23 100644 --- a/sys/contrib/dev/acpica/components/utilities/utxfmutex.c +++ b/sys/contrib/dev/acpica/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 - 2025, Intel Corp. * All rights reserved. * * 2. License |