diff options
Diffstat (limited to 'source/components')
189 files changed, 522 insertions, 264 deletions
diff --git a/source/components/debugger/dbcmds.c b/source/components/debugger/dbcmds.c index 6f55147633b5..b8c2b4228013 100644 --- a/source/components/debugger/dbcmds.c +++ b/source/components/debugger/dbcmds.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbconvert.c b/source/components/debugger/dbconvert.c index 9d1e1dddc9c6..0b852261d274 100644 --- a/source/components/debugger/dbconvert.c +++ b/source/components/debugger/dbconvert.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbdisply.c b/source/components/debugger/dbdisply.c index 276217f58ef3..ad69737f544b 100644 --- a/source/components/debugger/dbdisply.c +++ b/source/components/debugger/dbdisply.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbexec.c b/source/components/debugger/dbexec.c index eed0aa35cd4c..73759c882991 100644 --- a/source/components/debugger/dbexec.c +++ b/source/components/debugger/dbexec.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbfileio.c b/source/components/debugger/dbfileio.c index 09f8f2271d39..8fc11da8f211 100644 --- a/source/components/debugger/dbfileio.c +++ b/source/components/debugger/dbfileio.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbhistry.c b/source/components/debugger/dbhistry.c index 31bfc3c56a37..ecdfaeba993f 100644 --- a/source/components/debugger/dbhistry.c +++ b/source/components/debugger/dbhistry.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c index 0f21b731c67b..5e5c62893bf6 100644 --- a/source/components/debugger/dbinput.c +++ b/source/components/debugger/dbinput.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbmethod.c b/source/components/debugger/dbmethod.c index 82202e8e2cbe..5060bf6ddbcc 100644 --- a/source/components/debugger/dbmethod.c +++ b/source/components/debugger/dbmethod.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c index 963f81251e8d..040fed248821 100644 --- a/source/components/debugger/dbnames.c +++ b/source/components/debugger/dbnames.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -884,6 +884,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/source/components/debugger/dbobject.c b/source/components/debugger/dbobject.c index b8bade432f62..fe38be909837 100644 --- a/source/components/debugger/dbobject.c +++ b/source/components/debugger/dbobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbstats.c b/source/components/debugger/dbstats.c index 30a686dc6d42..a30d9948df46 100644 --- a/source/components/debugger/dbstats.c +++ b/source/components/debugger/dbstats.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbtest.c b/source/components/debugger/dbtest.c index 23690ed67bc7..a4d48c7a4a1e 100644 --- a/source/components/debugger/dbtest.c +++ b/source/components/debugger/dbtest.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbutils.c b/source/components/debugger/dbutils.c index ef649b2c12d1..70664ee2dc64 100644 --- a/source/components/debugger/dbutils.c +++ b/source/components/debugger/dbutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbxface.c b/source/components/debugger/dbxface.c index c44e1d0d5e49..667e90e5f3d9 100644 --- a/source/components/debugger/dbxface.c +++ b/source/components/debugger/dbxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmbuffer.c b/source/components/disassembler/dmbuffer.c index d5d813c83bc8..79f5a3ccf88c 100644 --- a/source/components/disassembler/dmbuffer.c +++ b/source/components/disassembler/dmbuffer.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmcstyle.c b/source/components/disassembler/dmcstyle.c index f0bef68ef982..0af72d1e1efc 100644 --- a/source/components/disassembler/dmcstyle.c +++ b/source/components/disassembler/dmcstyle.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmdeferred.c b/source/components/disassembler/dmdeferred.c index 82ce2bec3bf8..3a1ca550d4e6 100644 --- a/source/components/disassembler/dmdeferred.c +++ b/source/components/disassembler/dmdeferred.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmnames.c b/source/components/disassembler/dmnames.c index 8852921f9478..356af85f7f26 100644 --- a/source/components/disassembler/dmnames.c +++ b/source/components/disassembler/dmnames.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmopcode.c b/source/components/disassembler/dmopcode.c index 1cfe710d7c05..8f201d218785 100644 --- a/source/components/disassembler/dmopcode.c +++ b/source/components/disassembler/dmopcode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c index 0a183e9c5b87..644c8a99d07c 100644 --- a/source/components/disassembler/dmresrc.c +++ b/source/components/disassembler/dmresrc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -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/source/components/disassembler/dmresrcl.c b/source/components/disassembler/dmresrcl.c index 9aa6ac1fbe5f..88d19036ad73 100644 --- a/source/components/disassembler/dmresrcl.c +++ b/source/components/disassembler/dmresrcl.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -1112,7 +1112,7 @@ AcpiDmInterruptDescriptor ( { AcpiDmIndent (Level + 1); AcpiOsPrintf ("0x%8.8X,\n", - (UINT32) Resource->ExtendedIrq.Interrupts[i]); + (UINT32) Resource->ExtendedIrq.u.Interrupts[i]); } AcpiDmIndent (Level); diff --git a/source/components/disassembler/dmresrcl2.c b/source/components/disassembler/dmresrcl2.c index 59d00f6c3967..1d732e21f98c 100644 --- a/source/components/disassembler/dmresrcl2.c +++ b/source/components/disassembler/dmresrcl2.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -523,6 +523,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 diff --git a/source/components/disassembler/dmresrcs.c b/source/components/disassembler/dmresrcs.c index db5ce5db984f..3588362567d6 100644 --- a/source/components/disassembler/dmresrcs.c +++ b/source/components/disassembler/dmresrcs.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmutils.c b/source/components/disassembler/dmutils.c index 2a7b7b330e55..b6c133f51ae2 100644 --- a/source/components/disassembler/dmutils.c +++ b/source/components/disassembler/dmutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmwalk.c b/source/components/disassembler/dmwalk.c index 7d2429b721e6..beaa5f0a7ebe 100644 --- a/source/components/disassembler/dmwalk.c +++ b/source/components/disassembler/dmwalk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsargs.c b/source/components/dispatcher/dsargs.c index 52246693997d..6b9e4a35da59 100644 --- a/source/components/dispatcher/dsargs.c +++ b/source/components/dispatcher/dsargs.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dscontrol.c b/source/components/dispatcher/dscontrol.c index 1d7d676c2c30..205b9b55be59 100644 --- a/source/components/dispatcher/dscontrol.c +++ b/source/components/dispatcher/dscontrol.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsdebug.c b/source/components/dispatcher/dsdebug.c index 9111a215696e..06f7ec8165e6 100644 --- a/source/components/dispatcher/dsdebug.c +++ b/source/components/dispatcher/dsdebug.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsfield.c b/source/components/dispatcher/dsfield.c index 2d3851ff9d7d..37cc25a945a3 100644 --- a/source/components/dispatcher/dsfield.c +++ b/source/components/dispatcher/dsfield.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsinit.c b/source/components/dispatcher/dsinit.c index 5f941f0c94cc..79e55719083a 100644 --- a/source/components/dispatcher/dsinit.c +++ b/source/components/dispatcher/dsinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsmethod.c b/source/components/dispatcher/dsmethod.c index d5fc3038f643..02d9c6beaac0 100644 --- a/source/components/dispatcher/dsmethod.c +++ b/source/components/dispatcher/dsmethod.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -705,7 +705,7 @@ AcpiDsCallControlMethod ( if (!Info) { Status = AE_NO_MEMORY; - goto Cleanup; + goto PopWalkState; } Info->Parameters = &ThisWalkState->Operands[0]; @@ -717,7 +717,7 @@ AcpiDsCallControlMethod ( ACPI_FREE (Info); if (ACPI_FAILURE (Status)) { - goto Cleanup; + goto PopWalkState; } NextWalkState->MethodNestingDepth = ThisWalkState->MethodNestingDepth + 1; @@ -764,6 +764,12 @@ AcpiDsCallControlMethod ( return_ACPI_STATUS (Status); +PopWalkState: + + /* On error, pop the walk state to be deleted from thread */ + + AcpiDsPopWalkState(Thread); + Cleanup: /* On error, we must terminate the method properly */ diff --git a/source/components/dispatcher/dsmthdat.c b/source/components/dispatcher/dsmthdat.c index af156790166d..1461af5d9dc9 100644 --- a/source/components/dispatcher/dsmthdat.c +++ b/source/components/dispatcher/dsmthdat.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsobject.c b/source/components/dispatcher/dsobject.c index 5ffd198ba0bd..147edc29c1ca 100644 --- a/source/components/dispatcher/dsobject.c +++ b/source/components/dispatcher/dsobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsopcode.c b/source/components/dispatcher/dsopcode.c index 190be1b3f7d1..7689df633aa0 100644 --- a/source/components/dispatcher/dsopcode.c +++ b/source/components/dispatcher/dsopcode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dspkginit.c b/source/components/dispatcher/dspkginit.c index bd2bf2e32a63..a159d769c0cc 100644 --- a/source/components/dispatcher/dspkginit.c +++ b/source/components/dispatcher/dspkginit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsutils.c b/source/components/dispatcher/dsutils.c index b159b34c3fa4..059e05596f8e 100644 --- a/source/components/dispatcher/dsutils.c +++ b/source/components/dispatcher/dsutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dswexec.c b/source/components/dispatcher/dswexec.c index 686f03c8cc59..5ae0ad716608 100644 --- a/source/components/dispatcher/dswexec.c +++ b/source/components/dispatcher/dswexec.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -569,9 +569,11 @@ AcpiDsExecEndOp ( /* * All opcodes require operand resolution, with the only exceptions - * being the ObjectType and SizeOf operators. + * being the ObjectType and SizeOf operators as well as opcodes that + * take no arguments. */ - if (!(WalkState->OpInfo->Flags & AML_NO_OPERAND_RESOLVE)) + if (!(WalkState->OpInfo->Flags & AML_NO_OPERAND_RESOLVE) && + (WalkState->OpInfo->Flags & AML_HAS_ARGS)) { /* Resolve all operands */ diff --git a/source/components/dispatcher/dswload.c b/source/components/dispatcher/dswload.c index 4fdf955a5a61..74071c2e647f 100644 --- a/source/components/dispatcher/dswload.c +++ b/source/components/dispatcher/dswload.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dswload2.c b/source/components/dispatcher/dswload2.c index 496ee91fbc06..c48b555ac8e2 100644 --- a/source/components/dispatcher/dswload2.c +++ b/source/components/dispatcher/dswload2.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dswscope.c b/source/components/dispatcher/dswscope.c index dad0c4974a48..bce120c1792a 100644 --- a/source/components/dispatcher/dswscope.c +++ b/source/components/dispatcher/dswscope.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dswstate.c b/source/components/dispatcher/dswstate.c index 68b7f3d10378..cc648e3aeb75 100644 --- a/source/components/dispatcher/dswstate.c +++ b/source/components/dispatcher/dswstate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -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/source/components/events/evevent.c b/source/components/events/evevent.c index b92646a4e5d7..913cbd143a1a 100644 --- a/source/components/events/evevent.c +++ b/source/components/events/evevent.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -438,7 +438,7 @@ AcpiEvFixedEventDispatch ( (void) AcpiWriteBitRegister ( AcpiGbl_FixedEventInfo[Event].EnableRegisterId, (Event == ACPI_EVENT_PCIE_WAKE) ? - ACPI_ENABLE_EVENT : ACPI_DISABLE_EVENT); + ACPI_ENABLE_EVENT : ACPI_DISABLE_EVENT); ACPI_ERROR ((AE_INFO, "No installed handler for fixed event - %s (%u), disabling", diff --git a/source/components/events/evglock.c b/source/components/events/evglock.c index 79b519a0f75d..5992671bd795 100644 --- a/source/components/events/evglock.c +++ b/source/components/events/evglock.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evgpe.c b/source/components/events/evgpe.c index b246567d34c5..d7dcc3ea8acc 100644 --- a/source/components/events/evgpe.c +++ b/source/components/events/evgpe.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evgpeblk.c b/source/components/events/evgpeblk.c index 4dac205ee1c4..7317f6e0f4c1 100644 --- a/source/components/events/evgpeblk.c +++ b/source/components/events/evgpeblk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evgpeinit.c b/source/components/events/evgpeinit.c index 6f0472cf1963..adbe86eb4ebf 100644 --- a/source/components/events/evgpeinit.c +++ b/source/components/events/evgpeinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evgpeutil.c b/source/components/events/evgpeutil.c index 1f66717df278..23f6369f3406 100644 --- a/source/components/events/evgpeutil.c +++ b/source/components/events/evgpeutil.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evhandler.c b/source/components/events/evhandler.c index e0859c30a599..47393a7d0966 100644 --- a/source/components/events/evhandler.c +++ b/source/components/events/evhandler.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evmisc.c b/source/components/events/evmisc.c index b6c6eb6ad33e..40548b50316b 100644 --- a/source/components/events/evmisc.c +++ b/source/components/events/evmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evregion.c b/source/components/events/evregion.c index fb0cc4361ef6..73db629f6f39 100644 --- a/source/components/events/evregion.c +++ b/source/components/events/evregion.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evrgnini.c b/source/components/events/evrgnini.c index 7cbbe30c069b..6d329cb20ceb 100644 --- a/source/components/events/evrgnini.c +++ b/source/components/events/evrgnini.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evsci.c b/source/components/events/evsci.c index 26891925293c..bb850e4d1e75 100644 --- a/source/components/events/evsci.c +++ b/source/components/events/evsci.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evxface.c b/source/components/events/evxface.c index 245ca8a41fb5..ef2fbcc49208 100644 --- a/source/components/events/evxface.c +++ b/source/components/events/evxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evxfevnt.c b/source/components/events/evxfevnt.c index 3384e0982e82..2b95395d9f3f 100644 --- a/source/components/events/evxfevnt.c +++ b/source/components/events/evxfevnt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evxfgpe.c b/source/components/events/evxfgpe.c index 87dab0f8119f..fe354d219e25 100644 --- a/source/components/events/evxfgpe.c +++ b/source/components/events/evxfgpe.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evxfregn.c b/source/components/events/evxfregn.c index ee44e10d5784..00fe86209f27 100644 --- a/source/components/events/evxfregn.c +++ b/source/components/events/evxfregn.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -163,13 +163,14 @@ /******************************************************************************* * - * FUNCTION: AcpiInstallAddressSpaceHandler + * FUNCTION: AcpiInstallAddressSpaceHandlerInternal * * PARAMETERS: Device - Handle for the device * SpaceId - The address space ID * Handler - Address of the handler * Setup - Address of the setup function * Context - Value passed to the handler on each access + * Run_Reg - Run _REG methods for this address space? * * RETURN: Status * @@ -180,16 +181,19 @@ * are executed here, and these methods can only be safely executed after * the default handlers have been installed and the hardware has been * initialized (via AcpiEnableSubsystem.) + * To avoid this problem pass FALSE for Run_Reg and later on call + * AcpiExecuteRegMethods() to execute _REG. * ******************************************************************************/ -ACPI_STATUS -AcpiInstallAddressSpaceHandler ( +static ACPI_STATUS +AcpiInstallAddressSpaceHandlerInternal ( ACPI_HANDLE Device, ACPI_ADR_SPACE_TYPE SpaceId, ACPI_ADR_SPACE_HANDLER Handler, ACPI_ADR_SPACE_SETUP Setup, - void *Context) + void *Context, + BOOLEAN Run_Reg) { ACPI_NAMESPACE_NODE *Node; ACPI_STATUS Status; @@ -231,16 +235,42 @@ AcpiInstallAddressSpaceHandler ( /* Run all _REG methods for this address space */ - AcpiEvExecuteRegMethods (Node, SpaceId, ACPI_REG_CONNECT); - + if (Run_Reg) + { + AcpiEvExecuteRegMethods (Node, SpaceId, ACPI_REG_CONNECT); + } UnlockAndExit: (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); return_ACPI_STATUS (Status); } +ACPI_STATUS +AcpiInstallAddressSpaceHandler ( + ACPI_HANDLE Device, + ACPI_ADR_SPACE_TYPE SpaceId, + ACPI_ADR_SPACE_HANDLER Handler, + ACPI_ADR_SPACE_SETUP Setup, + void *Context) +{ + return AcpiInstallAddressSpaceHandlerInternal (Device, SpaceId, Handler, Setup, Context, TRUE); +} + ACPI_EXPORT_SYMBOL (AcpiInstallAddressSpaceHandler) +ACPI_STATUS +AcpiInstallAddressSpaceHandlerNo_Reg ( + ACPI_HANDLE Device, + ACPI_ADR_SPACE_TYPE SpaceId, + ACPI_ADR_SPACE_HANDLER Handler, + ACPI_ADR_SPACE_SETUP Setup, + void *Context) +{ + return AcpiInstallAddressSpaceHandlerInternal (Device, SpaceId, Handler, Setup, Context, FALSE); +} + +ACPI_EXPORT_SYMBOL (AcpiInstallAddressSpaceHandlerNo_Reg) + /******************************************************************************* * @@ -387,3 +417,62 @@ UnlockAndExit: } ACPI_EXPORT_SYMBOL (AcpiRemoveAddressSpaceHandler) + + +/******************************************************************************* + * + * FUNCTION: AcpiExecuteRegMethods + * + * PARAMETERS: Device - Handle for the device + * SpaceId - The address space ID + * + * RETURN: Status + * + * DESCRIPTION: Execute _REG for all OpRegions of a given SpaceId. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiExecuteRegMethods ( + ACPI_HANDLE Device, + ACPI_ADR_SPACE_TYPE SpaceId) +{ + ACPI_NAMESPACE_NODE *Node; + ACPI_STATUS Status; + + + ACPI_FUNCTION_TRACE (AcpiExecuteRegMethods); + + + /* Parameter validation */ + + if (!Device) + { + return_ACPI_STATUS (AE_BAD_PARAMETER); + } + + Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + + /* Convert and validate the device handle */ + + Node = AcpiNsValidateHandle (Device); + if (Node) + { + /* Run all _REG methods for this address space */ + + AcpiEvExecuteRegMethods (Node, SpaceId, ACPI_REG_CONNECT); + } + else + { + Status = AE_BAD_PARAMETER; + } + + (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); + return_ACPI_STATUS (Status); +} + +ACPI_EXPORT_SYMBOL (AcpiExecuteRegMethods) diff --git a/source/components/executer/exconcat.c b/source/components/executer/exconcat.c index 335d78f19671..f504bc0c7c36 100644 --- a/source/components/executer/exconcat.c +++ b/source/components/executer/exconcat.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exconfig.c b/source/components/executer/exconfig.c index 11c8ba64b509..ae95a9200c76 100644 --- a/source/components/executer/exconfig.c +++ b/source/components/executer/exconfig.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exconvrt.c b/source/components/executer/exconvrt.c index c9572e90bbb7..3382b520fdca 100644 --- a/source/components/executer/exconvrt.c +++ b/source/components/executer/exconvrt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/excreate.c b/source/components/executer/excreate.c index e83810810e36..563557263375 100644 --- a/source/components/executer/excreate.c +++ b/source/components/executer/excreate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exdebug.c b/source/components/executer/exdebug.c index 88f75966d848..5ccfccdb29c6 100644 --- a/source/components/executer/exdebug.c +++ b/source/components/executer/exdebug.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exdump.c b/source/components/executer/exdump.c index e72ac01fc0a5..7a2c4a81bf9f 100644 --- a/source/components/executer/exdump.c +++ b/source/components/executer/exdump.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exfield.c b/source/components/executer/exfield.c index 4175b8eedcea..f7d092064c74 100644 --- a/source/components/executer/exfield.c +++ b/source/components/executer/exfield.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exfldio.c b/source/components/executer/exfldio.c index 30d17c196be4..c29cd0e89b38 100644 --- a/source/components/executer/exfldio.c +++ b/source/components/executer/exfldio.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exmisc.c b/source/components/executer/exmisc.c index 4a1e2ff25239..9b6608ba8944 100644 --- a/source/components/executer/exmisc.c +++ b/source/components/executer/exmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exmutex.c b/source/components/executer/exmutex.c index 8b335680dc30..3abac6a8ec5f 100644 --- a/source/components/executer/exmutex.c +++ b/source/components/executer/exmutex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exnames.c b/source/components/executer/exnames.c index 6045bc6b3176..af68c82fadc8 100644 --- a/source/components/executer/exnames.c +++ b/source/components/executer/exnames.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exoparg1.c b/source/components/executer/exoparg1.c index 2d9bbddf271f..82250ff65c2b 100644 --- a/source/components/executer/exoparg1.c +++ b/source/components/executer/exoparg1.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exoparg2.c b/source/components/executer/exoparg2.c index 8b63d615fa51..29d9dc7e205b 100644 --- a/source/components/executer/exoparg2.c +++ b/source/components/executer/exoparg2.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exoparg3.c b/source/components/executer/exoparg3.c index 7b74d32ef374..a22b72579b34 100644 --- a/source/components/executer/exoparg3.c +++ b/source/components/executer/exoparg3.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exoparg6.c b/source/components/executer/exoparg6.c index 5506b2c1a75b..ad69405eecc8 100644 --- a/source/components/executer/exoparg6.c +++ b/source/components/executer/exoparg6.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exprep.c b/source/components/executer/exprep.c index 6d239d7a78f6..678ee8a1d44e 100644 --- a/source/components/executer/exprep.c +++ b/source/components/executer/exprep.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exregion.c b/source/components/executer/exregion.c index 01d49065ddd4..858d31feb19a 100644 --- a/source/components/executer/exregion.c +++ b/source/components/executer/exregion.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exresnte.c b/source/components/executer/exresnte.c index 6801b25beef9..b5dc24c60278 100644 --- a/source/components/executer/exresnte.c +++ b/source/components/executer/exresnte.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exresolv.c b/source/components/executer/exresolv.c index af5202ab8e05..460c6d77306e 100644 --- a/source/components/executer/exresolv.c +++ b/source/components/executer/exresolv.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exresop.c b/source/components/executer/exresop.c index 4abe93766ae7..f4734d892227 100644 --- a/source/components/executer/exresop.c +++ b/source/components/executer/exresop.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exserial.c b/source/components/executer/exserial.c index c92a895ad7f7..6d57e3761ef4 100644 --- a/source/components/executer/exserial.c +++ b/source/components/executer/exserial.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exstore.c b/source/components/executer/exstore.c index ba1a05d94561..95bb19afa9f0 100644 --- a/source/components/executer/exstore.c +++ b/source/components/executer/exstore.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exstoren.c b/source/components/executer/exstoren.c index df4a6f405cea..628592f26ef1 100644 --- a/source/components/executer/exstoren.c +++ b/source/components/executer/exstoren.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exstorob.c b/source/components/executer/exstorob.c index 56d048a7e5c6..f318f0274d60 100644 --- a/source/components/executer/exstorob.c +++ b/source/components/executer/exstorob.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exsystem.c b/source/components/executer/exsystem.c index 44d3a00ba9f0..68a074be3bca 100644 --- a/source/components/executer/exsystem.c +++ b/source/components/executer/exsystem.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -303,10 +303,10 @@ AcpiExSystemDoStall ( else { if (HowLongUs > 100) - { + { ACPI_WARNING ((AE_INFO, "Time parameter %u us > 100 us violating ACPI spec, please fix the firmware.", HowLongUs)); - } + } AcpiOsStall (HowLongUs); } diff --git a/source/components/executer/extrace.c b/source/components/executer/extrace.c index a677393f18a7..e574e489096e 100644 --- a/source/components/executer/extrace.c +++ b/source/components/executer/extrace.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exutils.c b/source/components/executer/exutils.c index e27f567b6e39..3d9dd4fa7612 100644 --- a/source/components/executer/exutils.c +++ b/source/components/executer/exutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwacpi.c b/source/components/hardware/hwacpi.c index 8b3222099db4..1772e79545b3 100644 --- a/source/components/hardware/hwacpi.c +++ b/source/components/hardware/hwacpi.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwesleep.c b/source/components/hardware/hwesleep.c index 85e4cb950192..ec03e5ed1ee6 100644 --- a/source/components/hardware/hwesleep.c +++ b/source/components/hardware/hwesleep.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwgpe.c b/source/components/hardware/hwgpe.c index 7f9a5f052fa3..994fc47569a1 100644 --- a/source/components/hardware/hwgpe.c +++ b/source/components/hardware/hwgpe.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwpci.c b/source/components/hardware/hwpci.c index b8e8aa9f3b2b..745f9c81e7e8 100644 --- a/source/components/hardware/hwpci.c +++ b/source/components/hardware/hwpci.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwregs.c b/source/components/hardware/hwregs.c index 7b4ae88af8dd..c499c111d0ef 100644 --- a/source/components/hardware/hwregs.c +++ b/source/components/hardware/hwregs.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwsleep.c b/source/components/hardware/hwsleep.c index 6667c27eca0e..d9bb8ae03aa4 100644 --- a/source/components/hardware/hwsleep.c +++ b/source/components/hardware/hwsleep.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -476,13 +476,14 @@ AcpiHwLegacyWake ( ACPI_CLEAR_STATUS); /* Enable pcie wake event if support */ - if ((AcpiGbl_FADT.Flags & ACPI_FADT_PCI_EXPRESS_WAKE)) { + if ((AcpiGbl_FADT.Flags & ACPI_FADT_PCI_EXPRESS_WAKE)) + { (void) AcpiWriteBitRegister ( - AcpiGbl_FixedEventInfo[ACPI_EVENT_PCIE_WAKE].EnableRegisterId, - ACPI_DISABLE_EVENT); + AcpiGbl_FixedEventInfo[ACPI_EVENT_PCIE_WAKE].EnableRegisterId, + ACPI_DISABLE_EVENT); (void) AcpiWriteBitRegister ( - AcpiGbl_FixedEventInfo[ACPI_EVENT_PCIE_WAKE].StatusRegisterId, - ACPI_CLEAR_STATUS); + AcpiGbl_FixedEventInfo[ACPI_EVENT_PCIE_WAKE].StatusRegisterId, + ACPI_CLEAR_STATUS); } AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING); diff --git a/source/components/hardware/hwtimer.c b/source/components/hardware/hwtimer.c index 829e2a35340e..504f84d0339e 100644 --- a/source/components/hardware/hwtimer.c +++ b/source/components/hardware/hwtimer.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwvalid.c b/source/components/hardware/hwvalid.c index d297905b79a0..80f0f5709f97 100644 --- a/source/components/hardware/hwvalid.c +++ b/source/components/hardware/hwvalid.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -169,8 +169,8 @@ AcpiHwValidateIoRequest ( * * The table is used to implement the Microsoft port access rules that * first appeared in Windows XP. Some ports are always illegal, and some - * ports are only illegal if the BIOS calls _OSI with a WinXP string or - * later (meaning that the BIOS itelf is post-XP.) + * ports are only illegal if the BIOS calls _OSI with nothing newer than + * the specific _OSI strings. * * This provides ACPICA with the desired port protections and * Microsoft compatibility. @@ -301,8 +301,8 @@ AcpiHwValidateIoRequest ( if ((Address <= PortInfo->End) && (LastAddress >= PortInfo->Start)) { /* Port illegality may depend on the _OSI calls made by the BIOS */ - - if (AcpiGbl_OsiData >= PortInfo->OsiDependency) + if (PortInfo->OsiDependency == ACPI_ALWAYS_ILLEGAL || + AcpiGbl_OsiData == PortInfo->OsiDependency) { ACPI_DEBUG_PRINT ((ACPI_DB_VALUES, "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)\n", diff --git a/source/components/hardware/hwxface.c b/source/components/hardware/hwxface.c index 8fd3561a05ff..febe90de565e 100644 --- a/source/components/hardware/hwxface.c +++ b/source/components/hardware/hwxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwxfsleep.c b/source/components/hardware/hwxfsleep.c index 5f8b7db0a2fa..4cd7eba86a7f 100644 --- a/source/components/hardware/hwxfsleep.c +++ b/source/components/hardware/hwxfsleep.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsaccess.c b/source/components/namespace/nsaccess.c index 2b810facb035..b6d9d8490248 100644 --- a/source/components/namespace/nsaccess.c +++ b/source/components/namespace/nsaccess.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsalloc.c b/source/components/namespace/nsalloc.c index 560f6f3635d9..706270771e66 100644 --- a/source/components/namespace/nsalloc.c +++ b/source/components/namespace/nsalloc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsarguments.c b/source/components/namespace/nsarguments.c index 2da06f2f6103..bb081b75427d 100644 --- a/source/components/namespace/nsarguments.c +++ b/source/components/namespace/nsarguments.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsconvert.c b/source/components/namespace/nsconvert.c index 2971f08ecd6b..ed2fa03e72dd 100644 --- a/source/components/namespace/nsconvert.c +++ b/source/components/namespace/nsconvert.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsdump.c b/source/components/namespace/nsdump.c index 36cfbdf6b172..731c32d92560 100644 --- a/source/components/namespace/nsdump.c +++ b/source/components/namespace/nsdump.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsdumpdv.c b/source/components/namespace/nsdumpdv.c index 0cc9b5a5e09c..af0b29656e4c 100644 --- a/source/components/namespace/nsdumpdv.c +++ b/source/components/namespace/nsdumpdv.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nseval.c b/source/components/namespace/nseval.c index 1cb07615d52f..23ed486c8b23 100644 --- a/source/components/namespace/nseval.c +++ b/source/components/namespace/nseval.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsinit.c b/source/components/namespace/nsinit.c index c523035f1d0a..5ca332eb7717 100644 --- a/source/components/namespace/nsinit.c +++ b/source/components/namespace/nsinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsload.c b/source/components/namespace/nsload.c index c3423e55ba01..0e93791bf051 100644 --- a/source/components/namespace/nsload.c +++ b/source/components/namespace/nsload.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsnames.c b/source/components/namespace/nsnames.c index c8412c2edf29..ea3d7d571a04 100644 --- a/source/components/namespace/nsnames.c +++ b/source/components/namespace/nsnames.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsobject.c b/source/components/namespace/nsobject.c index 82d735eb186e..842a36a5f2dc 100644 --- a/source/components/namespace/nsobject.c +++ b/source/components/namespace/nsobject.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsparse.c b/source/components/namespace/nsparse.c index 0ac5efb428b5..86afef097fee 100644 --- a/source/components/namespace/nsparse.c +++ b/source/components/namespace/nsparse.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nspredef.c b/source/components/namespace/nspredef.c index e28d689670b9..04c3012a483a 100644 --- a/source/components/namespace/nspredef.c +++ b/source/components/namespace/nspredef.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsprepkg.c b/source/components/namespace/nsprepkg.c index e6959dacaaf2..2bfc89a7d7b6 100644 --- a/source/components/namespace/nsprepkg.c +++ b/source/components/namespace/nsprepkg.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsrepair.c b/source/components/namespace/nsrepair.c index 59f7aa33f32a..7aa02a80fc10 100644 --- a/source/components/namespace/nsrepair.c +++ b/source/components/namespace/nsrepair.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -328,9 +328,10 @@ AcpiNsSimpleRepair ( */ if (!ReturnObject) { - if (ExpectedBtypes && (!(ExpectedBtypes & ACPI_RTYPE_NONE))) + if (ExpectedBtypes) { - if (PackageIndex != ACPI_NOT_PACKAGE_ELEMENT) + if (!(ExpectedBtypes & ACPI_RTYPE_NONE) && + PackageIndex != ACPI_NOT_PACKAGE_ELEMENT) { ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, ACPI_WARN_ALWAYS, "Found unexpected NULL package element")); @@ -342,13 +343,14 @@ AcpiNsSimpleRepair ( return (AE_OK); /* Repair was successful */ } } - else + + if (ExpectedBtypes != ACPI_RTYPE_NONE) { ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, - ACPI_WARN_ALWAYS, "Missing expected return value")); + ACPI_WARN_ALWAYS, + "Missing expected return value")); + return (AE_AML_NO_RETURN_VALUE); } - - return (AE_AML_NO_RETURN_VALUE); } } diff --git a/source/components/namespace/nsrepair2.c b/source/components/namespace/nsrepair2.c index bf76b7dd7ba3..7f50c05f49d8 100644 --- a/source/components/namespace/nsrepair2.c +++ b/source/components/namespace/nsrepair2.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -565,13 +565,6 @@ AcpiNsRepair_CID ( (*ElementPtr)->Common.ReferenceCount = OriginalRefCount; - - /* - * The OriginalElement holds a reference from the package object - * that represents _HID. Since a new element was created by _HID, - * remove the reference from the _CID package. - */ - AcpiUtRemoveReference (OriginalElement); } ElementPtr++; @@ -702,7 +695,7 @@ AcpiNsRepair_HID ( char *Dest; - ACPI_FUNCTION_NAME (NsRepair_HID); + ACPI_FUNCTION_TRACE (NsRepair_HID); /* We only care about string _HID objects (not integers) */ diff --git a/source/components/namespace/nssearch.c b/source/components/namespace/nssearch.c index 706963c49633..a992a7e4cf30 100644 --- a/source/components/namespace/nssearch.c +++ b/source/components/namespace/nssearch.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsutils.c b/source/components/namespace/nsutils.c index f4208179bc41..1162fca73568 100644 --- a/source/components/namespace/nsutils.c +++ b/source/components/namespace/nsutils.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -500,7 +500,7 @@ AcpiNsBuildInternalName ( * * PARAMETERS: *ExternalName - External representation of name * **Converted Name - Where to return the resulting - * internal represention of the name + * internal representation of the name * * RETURN: Status * diff --git a/source/components/namespace/nswalk.c b/source/components/namespace/nswalk.c index 3d0fc639f65b..7abc6b81e9c7 100644 --- a/source/components/namespace/nswalk.c +++ b/source/components/namespace/nswalk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsxfeval.c b/source/components/namespace/nsxfeval.c index 9724d02427be..a4213f2809ee 100644 --- a/source/components/namespace/nsxfeval.c +++ b/source/components/namespace/nsxfeval.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsxfname.c b/source/components/namespace/nsxfname.c index 7d52330f6629..c19b02442c6d 100644 --- a/source/components/namespace/nsxfname.c +++ b/source/components/namespace/nsxfname.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -192,7 +192,7 @@ AcpiNsCopyDeviceId ( ACPI_STATUS AcpiGetHandle ( ACPI_HANDLE Parent, - ACPI_STRING Pathname, + const char *Pathname, ACPI_HANDLE *RetHandle) { ACPI_STATUS Status; diff --git a/source/components/namespace/nsxfobj.c b/source/components/namespace/nsxfobj.c index 2aa1fc17b9cc..50ca5b2e6b56 100644 --- a/source/components/namespace/nsxfobj.c +++ b/source/components/namespace/nsxfobj.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psargs.c b/source/components/parser/psargs.c index f510623ebbb7..ff0780c6507d 100644 --- a/source/components/parser/psargs.c +++ b/source/components/parser/psargs.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psloop.c b/source/components/parser/psloop.c index 2b4c1f2a8d78..e759e081f3c3 100644 --- a/source/components/parser/psloop.c +++ b/source/components/parser/psloop.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psobject.c b/source/components/parser/psobject.c index 18a32ef36d3f..ff1069d0a59d 100644 --- a/source/components/parser/psobject.c +++ b/source/components/parser/psobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psopcode.c b/source/components/parser/psopcode.c index 540716af5b08..db0c2e4758cb 100644 --- a/source/components/parser/psopcode.c +++ b/source/components/parser/psopcode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psopinfo.c b/source/components/parser/psopinfo.c index fcb080cacab2..99fada1010fc 100644 --- a/source/components/parser/psopinfo.c +++ b/source/components/parser/psopinfo.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psparse.c b/source/components/parser/psparse.c index e0cd5915b6ad..f7e584b91bc5 100644 --- a/source/components/parser/psparse.c +++ b/source/components/parser/psparse.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psscope.c b/source/components/parser/psscope.c index 269410a6acf7..9fe84e387062 100644 --- a/source/components/parser/psscope.c +++ b/source/components/parser/psscope.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/pstree.c b/source/components/parser/pstree.c index 92f623046cf0..cbcb35994906 100644 --- a/source/components/parser/pstree.c +++ b/source/components/parser/pstree.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psutils.c b/source/components/parser/psutils.c index a9ea353641d9..f10179369d15 100644 --- a/source/components/parser/psutils.c +++ b/source/components/parser/psutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/pswalk.c b/source/components/parser/pswalk.c index 31232fd46a7b..4a5fd986f2e7 100644 --- a/source/components/parser/pswalk.c +++ b/source/components/parser/pswalk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psxface.c b/source/components/parser/psxface.c index 295da1af6988..d44cb9f64cb8 100644 --- a/source/components/parser/psxface.c +++ b/source/components/parser/psxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsaddr.c b/source/components/resources/rsaddr.c index 93d45ca35718..beee83803c57 100644 --- a/source/components/resources/rsaddr.c +++ b/source/components/resources/rsaddr.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -431,13 +431,17 @@ AcpiRsGetAddressCommon ( ACPI_RESOURCE *Resource, AML_RESOURCE *Aml) { - ACPI_FUNCTION_ENTRY (); + /* Avoid undefined behavior: member access within misaligned address */ + + AML_RESOURCE_ADDRESS Address; + memcpy(&Address, Aml, sizeof(Address)); + ACPI_FUNCTION_ENTRY(); /* Validate the Resource Type */ - if ((Aml->Address.ResourceType > 2) && - (Aml->Address.ResourceType < 0xC0)) + if ((Address.ResourceType > 2) && + (Address.ResourceType < 0xC0)) { return (FALSE); } @@ -464,7 +468,7 @@ AcpiRsGetAddressCommon ( /* Generic resource type, just grab the TypeSpecific byte */ Resource->Data.Address.Info.TypeSpecific = - Aml->Address.SpecificFlags; + Address.SpecificFlags; } return (TRUE); diff --git a/source/components/resources/rscalc.c b/source/components/resources/rscalc.c index c966636b6afe..55694f1ecddf 100644 --- a/source/components/resources/rscalc.c +++ b/source/components/resources/rscalc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -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,14 +740,19 @@ AcpiRsGetListLength ( } break; - case ACPI_RESOURCE_NAME_SERIAL_BUS: + case ACPI_RESOURCE_NAME_SERIAL_BUS: { + /* Avoid undefined behavior: member access within misaligned address */ + + AML_RESOURCE_COMMON_SERIALBUS CommonSerialBus; + memcpy(&CommonSerialBus, AmlResource, sizeof(CommonSerialBus)); MinimumAmlResourceLength = AcpiGbl_ResourceAmlSerialBusSizes[ - AmlResource->CommonSerialBus.Type]; + CommonSerialBus.Type]; ExtraStructBytes += - AmlResource->CommonSerialBus.ResourceLength - + CommonSerialBus.ResourceLength - MinimumAmlResourceLength; break; + } case ACPI_RESOURCE_NAME_PIN_CONFIG: @@ -789,6 +801,12 @@ AcpiRsGetListLength ( break; + case ACPI_RESOURCE_NAME_CLOCK_INPUT: + ExtraStructBytes = AcpiRsStreamOptionLength ( + ResourceLength, MinimumAmlResourceLength); + + break; + default: break; @@ -803,8 +821,13 @@ AcpiRsGetListLength ( if (AcpiUtGetResourceType (AmlBuffer) == ACPI_RESOURCE_NAME_SERIAL_BUS) { + /* Avoid undefined behavior: member access within misaligned address */ + + AML_RESOURCE_COMMON_SERIALBUS CommonSerialBus; + memcpy(&CommonSerialBus, AmlResource, sizeof(CommonSerialBus)); + BufferSize = AcpiGbl_ResourceStructSerialBusSizes[ - AmlResource->CommonSerialBus.Type] + ExtraStructBytes; + CommonSerialBus.Type] + ExtraStructBytes; } else { diff --git a/source/components/resources/rscreate.c b/source/components/resources/rscreate.c index 6c230bce0ee5..583abe1a75ca 100644 --- a/source/components/resources/rscreate.c +++ b/source/components/resources/rscreate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -475,9 +475,9 @@ AcpiRsCreatePciRoutingTable ( /* Use *remaining* length of the buffer as max for pathname */ PathBuffer.Length = OutputBuffer->Length - - (UINT32) ((UINT8 *) UserPrt->Source - + (UINT32) ((UINT8 *) UserPrt->u.Source - (UINT8 *) OutputBuffer->Pointer); - PathBuffer.Pointer = UserPrt->Source; + PathBuffer.Pointer = UserPrt->u.Source; Status = AcpiNsHandleToPathname ( (ACPI_HANDLE) Node, &PathBuffer, FALSE); @@ -488,12 +488,12 @@ AcpiRsCreatePciRoutingTable ( /* +1 to include null terminator */ - UserPrt->Length += (UINT32) strlen (UserPrt->Source) + 1; + UserPrt->Length += (UINT32) strlen (UserPrt->u.Source) + 1; break; case ACPI_TYPE_STRING: - strcpy (UserPrt->Source, ObjDesc->String.Pointer); + strcpy (UserPrt->u.Source, ObjDesc->String.Pointer); /* * Add to the Length field the length of the string diff --git a/source/components/resources/rsdump.c b/source/components/resources/rsdump.c index e8f13724c90c..02fc37ca4b5e 100644 --- a/source/components/resources/rsdump.c +++ b/source/components/resources/rsdump.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsdumpinfo.c b/source/components/resources/rsdumpinfo.c index 83b22caa62f9..2801e0d778d0 100644 --- a/source/components/resources/rsdumpinfo.c +++ b/source/components/resources/rsdumpinfo.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -182,7 +182,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpIrq[7] = {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Irq.Polarity), "Polarity", AcpiGbl_LlDecode}, {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Irq.Shareable), "Sharing", AcpiGbl_ShrDecode}, {ACPI_RSD_UINT8 , ACPI_RSD_OFFSET (Irq.InterruptCount), "Interrupt Count", NULL}, - {ACPI_RSD_SHORTLIST,ACPI_RSD_OFFSET (Irq.Interrupts[0]), "Interrupt List", NULL} + {ACPI_RSD_SHORTLIST,ACPI_RSD_OFFSET (Irq.u.Interrupts[0]), "Interrupt List", NULL} }; ACPI_RSDUMP_INFO AcpiRsDumpDma[6] = @@ -192,7 +192,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpDma[6] = {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Dma.BusMaster), "Mastering", AcpiGbl_BmDecode}, {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Dma.Transfer), "Transfer Type", AcpiGbl_SizDecode}, {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (Dma.ChannelCount), "Channel Count", NULL}, - {ACPI_RSD_SHORTLIST,ACPI_RSD_OFFSET (Dma.Channels[0]), "Channel List", NULL} + {ACPI_RSD_SHORTLIST,ACPI_RSD_OFFSET (Dma.u.Channels[0]), "Channel List", NULL} }; ACPI_RSDUMP_INFO AcpiRsDumpStartDpf[4] = @@ -327,7 +327,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpExtIrq[8] = {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (ExtendedIrq.Shareable), "Sharing", AcpiGbl_ShrDecode}, {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (ExtendedIrq.ResourceSource), NULL, NULL}, {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (ExtendedIrq.InterruptCount), "Interrupt Count", NULL}, - {ACPI_RSD_DWORDLIST,ACPI_RSD_OFFSET (ExtendedIrq.Interrupts[0]), "Interrupt List", NULL} + {ACPI_RSD_DWORDLIST,ACPI_RSD_OFFSET (ExtendedIrq.u.Interrupts[0]), "Interrupt List", NULL} }; ACPI_RSDUMP_INFO AcpiRsDumpGenericReg[6] = @@ -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}, @@ -544,7 +555,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpPrt[5] = {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpPrt), NULL, NULL}, {ACPI_RSD_UINT64, ACPI_PRT_OFFSET (Address), "Address", NULL}, {ACPI_RSD_UINT32, ACPI_PRT_OFFSET (Pin), "Pin", NULL}, - {ACPI_RSD_STRING, ACPI_PRT_OFFSET (Source[0]), "Source", NULL}, + {ACPI_RSD_STRING, ACPI_PRT_OFFSET (u.Source[0]), "Source", NULL}, {ACPI_RSD_UINT32, ACPI_PRT_OFFSET (SourceIndex), "Source Index", NULL} }; diff --git a/source/components/resources/rsinfo.c b/source/components/resources/rsinfo.c index b9d4df46b432..551b647b795a 100644 --- a/source/components/resources/rsinfo.c +++ b/source/components/resources/rsinfo.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -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/source/components/resources/rsio.c b/source/components/resources/rsio.c index 299326232bec..1640cdb2141e 100644 --- a/source/components/resources/rsio.c +++ b/source/components/resources/rsio.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsirq.c b/source/components/resources/rsirq.c index 9a8fc18fc568..10256c50b54a 100644 --- a/source/components/resources/rsirq.c +++ b/source/components/resources/rsirq.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -171,7 +171,7 @@ ACPI_RSCONVERT_INFO AcpiRsGetIrq[9] = /* Get the IRQ mask (bytes 1:2) */ - {ACPI_RSC_BITMASK16,ACPI_RS_OFFSET (Data.Irq.Interrupts[0]), + {ACPI_RSC_BITMASK16,ACPI_RS_OFFSET (Data.Irq.u.Interrupts[0]), AML_OFFSET (Irq.IrqMask), ACPI_RS_OFFSET (Data.Irq.InterruptCount)}, @@ -227,7 +227,7 @@ ACPI_RSCONVERT_INFO AcpiRsSetIrq[14] = /* Convert interrupt list to 16-bit IRQ bitmask */ - {ACPI_RSC_BITMASK16,ACPI_RS_OFFSET (Data.Irq.Interrupts[0]), + {ACPI_RSC_BITMASK16,ACPI_RS_OFFSET (Data.Irq.u.Interrupts[0]), AML_OFFSET (Irq.IrqMask), ACPI_RS_OFFSET (Data.Irq.InterruptCount)}, @@ -345,14 +345,14 @@ ACPI_RSCONVERT_INFO AcpiRsConvertExtIrq[10] = /* Copy every IRQ in the table, each is 32 bits */ - {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.ExtendedIrq.Interrupts[0]), - AML_OFFSET (ExtendedIrq.Interrupts[0]), + {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.ExtendedIrq.u.Interrupts[0]), + AML_OFFSET (ExtendedIrq.u.Interrupts[0]), 0}, /* Optional ResourceSource (Index and String) */ {ACPI_RSC_SOURCEX, ACPI_RS_OFFSET (Data.ExtendedIrq.ResourceSource), - ACPI_RS_OFFSET (Data.ExtendedIrq.Interrupts[0]), + ACPI_RS_OFFSET (Data.ExtendedIrq.u.Interrupts[0]), sizeof (AML_RESOURCE_EXTENDED_IRQ)} }; @@ -389,7 +389,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertDma[6] = /* DMA channel mask bits */ - {ACPI_RSC_BITMASK, ACPI_RS_OFFSET (Data.Dma.Channels[0]), + {ACPI_RSC_BITMASK, ACPI_RS_OFFSET (Data.Dma.u.Channels[0]), AML_OFFSET (Dma.DmaChannelMask), ACPI_RS_OFFSET (Data.Dma.ChannelCount)} }; diff --git a/source/components/resources/rslist.c b/source/components/resources/rslist.c index fdd24688c2d5..cb408197e576 100644 --- a/source/components/resources/rslist.c +++ b/source/components/resources/rslist.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -209,7 +209,12 @@ AcpiRsConvertAmlToResources ( if (AcpiUtGetResourceType (Aml) == ACPI_RESOURCE_NAME_SERIAL_BUS) { - if (AmlResource->CommonSerialBus.Type > + /* Avoid undefined behavior: member access within misaligned address */ + + AML_RESOURCE_COMMON_SERIALBUS CommonSerialBus; + memcpy(&CommonSerialBus, AmlResource, sizeof(CommonSerialBus)); + + if (CommonSerialBus.Type > AML_RESOURCE_MAX_SERIALBUSTYPE) { ConversionTable = NULL; @@ -219,7 +224,7 @@ AcpiRsConvertAmlToResources ( /* This is an I2C, SPI, UART, or CSI2 SerialBus descriptor */ ConversionTable = AcpiGbl_ConvertResourceSerialBusDispatch [ - AmlResource->CommonSerialBus.Type]; + CommonSerialBus.Type]; } } else diff --git a/source/components/resources/rsmemory.c b/source/components/resources/rsmemory.c index e527bad7bf0c..170bb6799221 100644 --- a/source/components/resources/rsmemory.c +++ b/source/components/resources/rsmemory.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsmisc.c b/source/components/resources/rsmisc.c index 16c52134ed8c..6d11442d95a1 100644 --- a/source/components/resources/rsmisc.c +++ b/source/components/resources/rsmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -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/source/components/resources/rsserial.c b/source/components/resources/rsserial.c index 3075b4c47dcc..4c19f890865f 100644 --- a/source/components/resources/rsserial.c +++ b/source/components/resources/rsserial.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -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/source/components/resources/rsutils.c b/source/components/resources/rsutils.c index 7110406f4e9e..e6889f86cece 100644 --- a/source/components/resources/rsutils.c +++ b/source/components/resources/rsutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsxface.c b/source/components/resources/rsxface.c index d3aaf1d0fd88..f46ff346b758 100644 --- a/source/components/resources/rsxface.c +++ b/source/components/resources/rsxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbdata.c b/source/components/tables/tbdata.c index d974d951b62d..e003763762ba 100644 --- a/source/components/tables/tbdata.c +++ b/source/components/tables/tbdata.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbfadt.c b/source/components/tables/tbfadt.c index 97876614bd1c..d2bd1eb32aba 100644 --- a/source/components/tables/tbfadt.c +++ b/source/components/tables/tbfadt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbfind.c b/source/components/tables/tbfind.c index 81ed2d97a66e..4adf09e22eda 100644 --- a/source/components/tables/tbfind.c +++ b/source/components/tables/tbfind.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbinstal.c b/source/components/tables/tbinstal.c index 9253bd1db0a3..eda1d0a73033 100644 --- a/source/components/tables/tbinstal.c +++ b/source/components/tables/tbinstal.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbprint.c b/source/components/tables/tbprint.c index cdad69af46ea..9fd5c7aac4b5 100644 --- a/source/components/tables/tbprint.c +++ b/source/components/tables/tbprint.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -294,4 +294,3 @@ AcpiTbPrintTableHeader ( LocalHeader.AslCompilerId, LocalHeader.AslCompilerRevision)); } } - diff --git a/source/components/tables/tbutils.c b/source/components/tables/tbutils.c index 5188d26da3c8..680a69d9f2cf 100644 --- a/source/components/tables/tbutils.c +++ b/source/components/tables/tbutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -323,6 +323,7 @@ AcpiTbGetRootTableEntry ( UINT8 *TableEntry, UINT32 TableEntrySize) { + UINT32 Address32; UINT64 Address64; @@ -336,8 +337,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 { diff --git a/source/components/tables/tbxface.c b/source/components/tables/tbxface.c index 919ad13813d6..b37377efd205 100644 --- a/source/components/tables/tbxface.c +++ b/source/components/tables/tbxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbxfload.c b/source/components/tables/tbxfload.c index ddd9b795e50a..7ae42346eae7 100644 --- a/source/components/tables/tbxfload.c +++ b/source/components/tables/tbxfload.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbxfroot.c b/source/components/tables/tbxfroot.c index 97cb65c79277..923d05fb7cd0 100644 --- a/source/components/tables/tbxfroot.c +++ b/source/components/tables/tbxfroot.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utaddress.c b/source/components/utilities/utaddress.c index 5aa12832bd41..e3a502890571 100644 --- a/source/components/utilities/utaddress.c +++ b/source/components/utilities/utaddress.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utalloc.c b/source/components/utilities/utalloc.c index aa06339cb8c7..d4a7e501c68e 100644 --- a/source/components/utilities/utalloc.c +++ b/source/components/utilities/utalloc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utascii.c b/source/components/utilities/utascii.c index db2389024d02..6f6d92298ed6 100644 --- a/source/components/utilities/utascii.c +++ b/source/components/utilities/utascii.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utbuffer.c b/source/components/utilities/utbuffer.c index 2cf097bf5ceb..be1082e8cd01 100644 --- a/source/components/utilities/utbuffer.c +++ b/source/components/utilities/utbuffer.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utcache.c b/source/components/utilities/utcache.c index 2ff1540c1662..32c527d573ea 100644 --- a/source/components/utilities/utcache.c +++ b/source/components/utilities/utcache.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utcksum.c b/source/components/utilities/utcksum.c index b8ea869bac5f..de97d15ff9fa 100644 --- a/source/components/utilities/utcksum.c +++ b/source/components/utilities/utcksum.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -172,7 +172,7 @@ * * 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 + * 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. * diff --git a/source/components/utilities/utclib.c b/source/components/utilities/utclib.c index 42f8d171401c..9c49163d4894 100644 --- a/source/components/utilities/utclib.c +++ b/source/components/utilities/utclib.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utcopy.c b/source/components/utilities/utcopy.c index e725d55b5ef2..e9024bdd1afa 100644 --- a/source/components/utilities/utcopy.c +++ b/source/components/utilities/utcopy.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utdebug.c b/source/components/utilities/utdebug.c index f789e686da20..b0c3640f2f72 100644 --- a/source/components/utilities/utdebug.c +++ b/source/components/utilities/utdebug.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utdecode.c b/source/components/utilities/utdecode.c index 2a49cbd8d83c..b100c61bf1d8 100644 --- a/source/components/utilities/utdecode.c +++ b/source/components/utilities/utdecode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utdelete.c b/source/components/utilities/utdelete.c index b36c4bb3a77a..1227b21154ee 100644 --- a/source/components/utilities/utdelete.c +++ b/source/components/utilities/utdelete.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/uterror.c b/source/components/utilities/uterror.c index 2aee4d54f9c4..c88081f9e44d 100644 --- a/source/components/utilities/uterror.c +++ b/source/components/utilities/uterror.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/uteval.c b/source/components/utilities/uteval.c index f4ccea68bd9c..bccbdda5aef6 100644 --- a/source/components/utilities/uteval.c +++ b/source/components/utilities/uteval.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utexcep.c b/source/components/utilities/utexcep.c index 279d33fcde5d..094df3ab4481 100644 --- a/source/components/utilities/utexcep.c +++ b/source/components/utilities/utexcep.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utglobal.c b/source/components/utilities/utglobal.c index 43de5c0a7747..28e4c341d9a7 100644 --- a/source/components/utilities/utglobal.c +++ b/source/components/utilities/utglobal.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/uthex.c b/source/components/utilities/uthex.c index c64d3def8839..801627e2dbe5 100644 --- a/source/components/utilities/uthex.c +++ b/source/components/utilities/uthex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utids.c b/source/components/utilities/utids.c index 498338a10b68..3df4d97dbf59 100644 --- a/source/components/utilities/utids.c +++ b/source/components/utilities/utids.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utinit.c b/source/components/utilities/utinit.c index 0f2cf48907a9..37ec63bc6667 100644 --- a/source/components/utilities/utinit.c +++ b/source/components/utilities/utinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utlock.c b/source/components/utilities/utlock.c index 9357279b3653..e56b74843017 100644 --- a/source/components/utilities/utlock.c +++ b/source/components/utilities/utlock.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utmath.c b/source/components/utilities/utmath.c index b534bb3e070b..b854368e6283 100644 --- a/source/components/utilities/utmath.c +++ b/source/components/utilities/utmath.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utmisc.c b/source/components/utilities/utmisc.c index 1efe0afc99bf..64e33672fcde 100644 --- a/source/components/utilities/utmisc.c +++ b/source/components/utilities/utmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utmutex.c b/source/components/utilities/utmutex.c index 1f1c1d82d055..2ce621fa3c5c 100644 --- a/source/components/utilities/utmutex.c +++ b/source/components/utilities/utmutex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utnonansi.c b/source/components/utilities/utnonansi.c index e3c2f460d869..5db704223e49 100644 --- a/source/components/utilities/utnonansi.c +++ b/source/components/utilities/utnonansi.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utobject.c b/source/components/utilities/utobject.c index 52e02beb9596..f53f316370cc 100644 --- a/source/components/utilities/utobject.c +++ b/source/components/utilities/utobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utosi.c b/source/components/utilities/utosi.c index 700f30a686d3..b6431c8832d2 100644 --- a/source/components/utilities/utosi.c +++ b/source/components/utilities/utosi.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utownerid.c b/source/components/utilities/utownerid.c index 30ba6b7500a7..ad2796be373f 100644 --- a/source/components/utilities/utownerid.c +++ b/source/components/utilities/utownerid.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utpredef.c b/source/components/utilities/utpredef.c index 7f97ee7c4e10..6afc655947c9 100644 --- a/source/components/utilities/utpredef.c +++ b/source/components/utilities/utpredef.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utprint.c b/source/components/utilities/utprint.c index 4d9252ac5a87..7d8611b0327b 100644 --- a/source/components/utilities/utprint.c +++ b/source/components/utilities/utprint.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utresdecode.c b/source/components/utilities/utresdecode.c index 12ab687588cc..667f12f8eb1e 100644 --- a/source/components/utilities/utresdecode.c +++ b/source/components/utilities/utresdecode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -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/source/components/utilities/utresrc.c b/source/components/utilities/utresrc.c index 26c382d879a9..f47b29246f6e 100644 --- a/source/components/utilities/utresrc.c +++ b/source/components/utilities/utresrc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License @@ -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 */ }; @@ -529,16 +532,21 @@ AcpiUtValidateResource ( AmlResource = ACPI_CAST_PTR (AML_RESOURCE, Aml); if (ResourceType == ACPI_RESOURCE_NAME_SERIAL_BUS) { + /* Avoid undefined behavior: member access within misaligned address */ + + AML_RESOURCE_COMMON_SERIALBUS CommonSerialBus; + memcpy(&CommonSerialBus, AmlResource, sizeof(CommonSerialBus)); + /* Validate the BusType field */ - if ((AmlResource->CommonSerialBus.Type == 0) || - (AmlResource->CommonSerialBus.Type > AML_RESOURCE_MAX_SERIALBUSTYPE)) + if ((CommonSerialBus.Type == 0) || + (CommonSerialBus.Type > AML_RESOURCE_MAX_SERIALBUSTYPE)) { if (WalkState) { ACPI_ERROR ((AE_INFO, "Invalid/unsupported SerialBus resource descriptor: BusType 0x%2.2X", - AmlResource->CommonSerialBus.Type)); + CommonSerialBus.Type)); } return (AE_AML_INVALID_RESOURCE_TYPE); } diff --git a/source/components/utilities/utstate.c b/source/components/utilities/utstate.c index f089ffeaa66b..ec13a07aa6b1 100644 --- a/source/components/utilities/utstate.c +++ b/source/components/utilities/utstate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utstring.c b/source/components/utilities/utstring.c index 770f3078767a..aed0d10c7815 100644 --- a/source/components/utilities/utstring.c +++ b/source/components/utilities/utstring.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utstrsuppt.c b/source/components/utilities/utstrsuppt.c index 0487a4f63fdc..31e720c94144 100644 --- a/source/components/utilities/utstrsuppt.c +++ b/source/components/utilities/utstrsuppt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utstrtoul64.c b/source/components/utilities/utstrtoul64.c index 1ef50eac07cf..1aee5d02a062 100644 --- a/source/components/utilities/utstrtoul64.c +++ b/source/components/utilities/utstrtoul64.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/uttrack.c b/source/components/utilities/uttrack.c index 7791fe9b7f73..77e1b659a348 100644 --- a/source/components/utilities/uttrack.c +++ b/source/components/utilities/uttrack.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utuuid.c b/source/components/utilities/utuuid.c index 8fd85d62960e..055086f12042 100644 --- a/source/components/utilities/utuuid.c +++ b/source/components/utilities/utuuid.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxface.c b/source/components/utilities/utxface.c index 74a8ff485bc5..d335bb1a2b5f 100644 --- a/source/components/utilities/utxface.c +++ b/source/components/utilities/utxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxferror.c b/source/components/utilities/utxferror.c index 77701dfec99a..6534e1a1f4bd 100644 --- a/source/components/utilities/utxferror.c +++ b/source/components/utilities/utxferror.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxfinit.c b/source/components/utilities/utxfinit.c index 865fe9d2dee8..0ccaf5caae7d 100644 --- a/source/components/utilities/utxfinit.c +++ b/source/components/utilities/utxfinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxfmutex.c b/source/components/utilities/utxfmutex.c index 2e77fc95ab65..cec55dfc2915 100644 --- a/source/components/utilities/utxfmutex.c +++ b/source/components/utilities/utxfmutex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp. * All rights reserved. * * 2. License |
