diff options
Diffstat (limited to 'source/components')
36 files changed, 257 insertions, 407 deletions
diff --git a/source/components/debugger/dbdisply.c b/source/components/debugger/dbdisply.c index d0583fc7498f..539ff5af117d 100644 --- a/source/components/debugger/dbdisply.c +++ b/source/components/debugger/dbdisply.c @@ -410,7 +410,7 @@ AcpiDbDecodeAndDisplayObject ( default: - /* Is not a recognizeable object */ + /* Is not a recognizable object */ AcpiOsPrintf ( "Not a known ACPI internal object, descriptor type %2.2X\n", @@ -866,7 +866,7 @@ AcpiDbDisplayObjectType ( * * DESCRIPTION: Display the result of an AML opcode * - * Note: Curently only displays the result object if we are single stepping. + * Note: Currently only displays the result object if we are single stepping. * However, this output may be useful in other contexts and could be enabled * to do so if needed. * diff --git a/source/components/debugger/dbexec.c b/source/components/debugger/dbexec.c index 03ea9bf2eadc..49d1180fba58 100644 --- a/source/components/debugger/dbexec.c +++ b/source/components/debugger/dbexec.c @@ -331,12 +331,12 @@ AcpiDbExecuteMethod ( } ACPI_EXCEPTION ((AE_INFO, Status, - "while executing %s from debugger", Info->Pathname)); + "while executing %s from AML Debugger", Info->Pathname)); if (Status == AE_BUFFER_OVERFLOW) { ACPI_ERROR ((AE_INFO, - "Possible overflow of internal debugger " + "Possible buffer overflow within AML Debugger " "buffer (size 0x%X needed 0x%X)", ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length)); } diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c index 781e3a981cb5..3c01e8088651 100644 --- a/source/components/debugger/dbnames.c +++ b/source/components/debugger/dbnames.c @@ -1175,7 +1175,7 @@ AcpiDbBusWalk ( * * RETURN: None * - * DESCRIPTION: Display info about system busses. + * DESCRIPTION: Display info about system buses. * ******************************************************************************/ diff --git a/source/components/debugger/dbobject.c b/source/components/debugger/dbobject.c index c54394def601..f9dc6687cd1b 100644 --- a/source/components/debugger/dbobject.c +++ b/source/components/debugger/dbobject.c @@ -420,7 +420,7 @@ AcpiDbDisplayInternalObject ( AcpiOsPrintf ("[%s] ", AcpiUtGetReferenceName (ObjDesc)); - /* Decode the refererence */ + /* Decode the reference */ switch (ObjDesc->Reference.Class) { diff --git a/source/components/debugger/dbtest.c b/source/components/debugger/dbtest.c index 560fb86f8697..67b9cbea22a8 100644 --- a/source/components/debugger/dbtest.c +++ b/source/components/debugger/dbtest.c @@ -154,6 +154,7 @@ #include "acdebug.h" #include "acnamesp.h" #include "acpredef.h" +#include "acinterp.h" #define _COMPONENT ACPI_CA_DEBUGGER @@ -193,6 +194,10 @@ AcpiDbTestPackageType ( ACPI_NAMESPACE_NODE *Node); static ACPI_STATUS +AcpiDbTestFieldUnitType ( + ACPI_OPERAND_OBJECT *ObjDesc); + +static ACPI_STATUS AcpiDbReadFromObject ( ACPI_NAMESPACE_NODE *Node, ACPI_OBJECT_TYPE ExpectedType, @@ -241,7 +246,7 @@ static ACPI_DB_ARGUMENT_INFO AcpiDbTestTypes [] = static ACPI_HANDLE ReadHandle = NULL; static ACPI_HANDLE WriteHandle = NULL; -/* ASL Definitions of the debugger read/write control methods */ +/* ASL Definitions of the debugger read/write control methods. AML below. */ #if 0 DefinitionBlock ("ssdt.aml", "SSDT", 2, "Intel", "DEBUG", 0x00000001) @@ -407,10 +412,8 @@ AcpiDbTestAllObjects ( * RETURN: Status * * DESCRIPTION: Test one namespace object. Supported types are Integer, - * String, Buffer, BufferField, and FieldUnit. All other object - * types are simply ignored. - * - * Note: Support for Packages is not implemented. + * String, Buffer, Package, BufferField, and FieldUnit. + * All other object types are simply ignored. * ******************************************************************************/ @@ -423,7 +426,6 @@ AcpiDbTestOneObject ( { ACPI_NAMESPACE_NODE *Node; ACPI_OPERAND_OBJECT *ObjDesc; - ACPI_OPERAND_OBJECT *RegionObj; ACPI_OBJECT_TYPE LocalType; UINT32 BitLength = 0; UINT32 ByteLength = 0; @@ -466,19 +468,22 @@ AcpiDbTestOneObject ( break; case ACPI_TYPE_FIELD_UNIT: - case ACPI_TYPE_BUFFER_FIELD: case ACPI_TYPE_LOCAL_REGION_FIELD: case ACPI_TYPE_LOCAL_INDEX_FIELD: case ACPI_TYPE_LOCAL_BANK_FIELD: + LocalType = ACPI_TYPE_FIELD_UNIT; + break; + + case ACPI_TYPE_BUFFER_FIELD: + /* + * The returned object will be a Buffer if the field length + * is larger than the size of an Integer (32 or 64 bits + * depending on the DSDT version). + */ LocalType = ACPI_TYPE_INTEGER; if (ObjDesc) { - /* - * Returned object will be a Buffer if the field length - * is larger than the size of an Integer (32 or 64 bits - * depending on the DSDT version). - */ BitLength = ObjDesc->CommonField.BitLength; ByteLength = ACPI_ROUND_BITS_UP_TO_BYTES (BitLength); if (BitLength > AcpiGbl_IntegerBitWidth) @@ -488,9 +493,9 @@ AcpiDbTestOneObject ( } break; - default: +default: - /* Ignore all other types */ + /* Ignore all non-data types - Methods, Devices, Scopes, etc. */ return (AE_OK); } @@ -502,40 +507,10 @@ AcpiDbTestOneObject ( if (!ObjDesc) { - AcpiOsPrintf (" Ignoring, no attached object\n"); + AcpiOsPrintf (" No attached sub-object, ignoring\n"); return (AE_OK); } - /* - * Check for unsupported region types. Note: AcpiExec simulates - * access to SystemMemory, SystemIO, PCI_Config, and EC. - */ - switch (Node->Type) - { - case ACPI_TYPE_LOCAL_REGION_FIELD: - - RegionObj = ObjDesc->Field.RegionObj; - switch (RegionObj->Region.SpaceId) - { - case ACPI_ADR_SPACE_SYSTEM_MEMORY: - case ACPI_ADR_SPACE_SYSTEM_IO: - case ACPI_ADR_SPACE_PCI_CONFIG: - - break; - - default: - - AcpiOsPrintf (" %s space is not supported in this command [%4.4s]\n", - AcpiUtGetRegionName (RegionObj->Region.SpaceId), - RegionObj->Region.Node->Name.Ascii); - return (AE_OK); - } - break; - - default: - break; - } - /* At this point, we have resolved the object to one of the major types */ switch (LocalType) @@ -560,6 +535,11 @@ AcpiDbTestOneObject ( Status = AcpiDbTestPackageType (Node); break; + case ACPI_TYPE_FIELD_UNIT: + + Status = AcpiDbTestFieldUnitType (ObjDesc); + break; + default: AcpiOsPrintf (" Ignoring, type not implemented (%2.2X)", @@ -572,24 +552,8 @@ AcpiDbTestOneObject ( if (ACPI_FAILURE (Status)) { Status = AE_OK; - goto Exit; - } - - switch (Node->Type) - { - case ACPI_TYPE_LOCAL_REGION_FIELD: - - RegionObj = ObjDesc->Field.RegionObj; - AcpiOsPrintf (" (%s)", - AcpiUtGetRegionName (RegionObj->Region.SpaceId)); - - break; - - default: - break; } -Exit: AcpiOsPrintf ("\n"); return (Status); } @@ -639,7 +603,7 @@ AcpiDbTestIntegerType ( return (Status); } - AcpiOsPrintf (" (%4.4X/%3.3X) %8.8X%8.8X", + AcpiOsPrintf (ACPI_DEBUG_LENGTH_FORMAT " %8.8X%8.8X", BitLength, ACPI_ROUND_BITS_UP_TO_BYTES (BitLength), ACPI_FORMAT_UINT64 (Temp1->Integer.Value)); @@ -761,8 +725,8 @@ AcpiDbTestBufferType ( /* Emit a few bytes of the buffer */ - AcpiOsPrintf (" (%4.4X/%3.3X)", BitLength, Temp1->Buffer.Length); - for (i = 0; ((i < 4) && (i < ByteLength)); i++) + AcpiOsPrintf (ACPI_DEBUG_LENGTH_FORMAT, BitLength, Temp1->Buffer.Length); + for (i = 0; ((i < 8) && (i < ByteLength)); i++) { AcpiOsPrintf (" %2.2X", Temp1->Buffer.Pointer[i]); } @@ -876,7 +840,7 @@ AcpiDbTestStringType ( return (Status); } - AcpiOsPrintf (" (%4.4X/%3.3X) \"%s\"", (Temp1->String.Length * 8), + AcpiOsPrintf (ACPI_DEBUG_LENGTH_FORMAT " \"%s\"", (Temp1->String.Length * 8), Temp1->String.Length, Temp1->String.Pointer); /* Write a new value */ @@ -966,7 +930,7 @@ AcpiDbTestPackageType ( return (Status); } - AcpiOsPrintf (" %8.8X Elements", Temp1->Package.Count); + AcpiOsPrintf (" %.2X Elements", Temp1->Package.Count); AcpiOsFree (Temp1); return (Status); } @@ -974,6 +938,73 @@ AcpiDbTestPackageType ( /******************************************************************************* * + * FUNCTION: AcpiDbTestFieldUnitType + * + * PARAMETERS: ObjDesc - A field unit object + * + * RETURN: Status + * + * DESCRIPTION: Test read/write on a named field unit. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDbTestFieldUnitType ( + ACPI_OPERAND_OBJECT *ObjDesc) +{ + ACPI_OPERAND_OBJECT *RegionObj; + UINT32 BitLength = 0; + UINT32 ByteLength = 0; + ACPI_STATUS Status = AE_OK; + ACPI_OPERAND_OBJECT *RetBufferDesc; + + + /* Supported spaces are memory/io/pci_config */ + + RegionObj = ObjDesc->Field.RegionObj; + switch (RegionObj->Region.SpaceId) + { + case ACPI_ADR_SPACE_SYSTEM_MEMORY: + case ACPI_ADR_SPACE_SYSTEM_IO: + case ACPI_ADR_SPACE_PCI_CONFIG: + + /* Need the interpreter to execute */ + + AcpiUtAcquireMutex (ACPI_MTX_INTERPRETER); + AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); + + /* Exercise read-then-write */ + + Status = AcpiExReadDataFromField (NULL, ObjDesc, &RetBufferDesc); + if (Status == AE_OK) + { + AcpiExWriteDataToField (RetBufferDesc, ObjDesc, NULL); + AcpiUtRemoveReference (RetBufferDesc); + } + + AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); + AcpiUtReleaseMutex (ACPI_MTX_INTERPRETER); + + BitLength = ObjDesc->CommonField.BitLength; + ByteLength = ACPI_ROUND_BITS_UP_TO_BYTES (BitLength); + + AcpiOsPrintf (ACPI_DEBUG_LENGTH_FORMAT " [%s]", BitLength, + ByteLength, AcpiUtGetRegionName (RegionObj->Region.SpaceId)); + return (Status); + + default: + + AcpiOsPrintf ( + " %s address space is not supported in this command [%4.4s]", + AcpiUtGetRegionName (RegionObj->Region.SpaceId), + RegionObj->Region.Node->Name.Ascii); + return (AE_OK); + } +} + + +/******************************************************************************* + * * FUNCTION: AcpiDbReadFromObject * * PARAMETERS: Node - Parent NS node for the object diff --git a/source/components/disassembler/dmbuffer.c b/source/components/disassembler/dmbuffer.c index db56365d2c02..a58ff2f5212a 100644 --- a/source/components/disassembler/dmbuffer.c +++ b/source/components/disassembler/dmbuffer.c @@ -1053,7 +1053,7 @@ AcpiDmGetHardwareIdType ( } } - /* Mark this node as convertable to an EISA ID string */ + /* Mark this node as convertible to an EISA ID string */ Op->Common.DisasmOpcode = ACPI_DASM_EISAID; break; diff --git a/source/components/disassembler/dmcstyle.c b/source/components/disassembler/dmcstyle.c index c74d13dd0c92..30ae3a5b228a 100644 --- a/source/components/disassembler/dmcstyle.c +++ b/source/components/disassembler/dmcstyle.c @@ -1075,7 +1075,7 @@ AcpiDmIsValidTarget ( * * DESCRIPTION: Determine if the Target duplicates the operand, in order to * detect if the expression can be converted to a compound - * assigment. (+=, *=, etc.) + * assignment. (+=, *=, etc.) * ******************************************************************************/ @@ -1131,7 +1131,7 @@ AcpiDmIsTargetAnOperand ( } } - /* Supress the duplicate operand at the top-level */ + /* Suppress the duplicate operand at the top-level */ if (TopLevel) { diff --git a/source/components/disassembler/dmnames.c b/source/components/disassembler/dmnames.c index 0866bdf26adb..bbff3e0a6988 100644 --- a/source/components/disassembler/dmnames.c +++ b/source/components/disassembler/dmnames.c @@ -232,7 +232,7 @@ AcpiDmDumpName ( * * RETURN: Status * - * DESCRIPTION: Diplay the pathname associated with a named object. Two + * DESCRIPTION: Display the pathname associated with a named object. Two * versions. One searches the parse tree (for parser-only * applications suchas AcpiDump), and the other searches the * ACPI namespace (the parse tree is probably deleted) diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c index 8deac42c5eb4..bb36b7349581 100644 --- a/source/components/disassembler/dmresrc.c +++ b/source/components/disassembler/dmresrc.c @@ -342,7 +342,7 @@ AcpiDmBitList ( * * FUNCTION: AcpiDmResourceTemplate * - * PARAMETERS: Info - Curent parse tree walk info + * PARAMETERS: Info - Current parse tree walk info * ByteData - Pointer to the byte list data * ByteCount - Length of the byte list * @@ -555,7 +555,7 @@ AcpiDmIsResourceTemplate ( /* * Not a template if declared buffer length != actual length of the - * intialization byte list. Because the resource macros will create + * initialization byte list. Because the resource macros will create * a buffer of the exact required length (buffer length will be equal * to the actual length). * diff --git a/source/components/disassembler/dmresrcs.c b/source/components/disassembler/dmresrcs.c index baf24488b479..72bbc331f470 100644 --- a/source/components/disassembler/dmresrcs.c +++ b/source/components/disassembler/dmresrcs.c @@ -388,7 +388,7 @@ AcpiDmFixedIoDescriptor ( * * RETURN: None * - * DESCRIPTION: Decode a Start Dependendent functions descriptor + * DESCRIPTION: Decode a Start Dependent functions descriptor * ******************************************************************************/ diff --git a/source/components/dispatcher/dsfield.c b/source/components/dispatcher/dsfield.c index f54fcee6db99..cc0a271e41d0 100644 --- a/source/components/dispatcher/dsfield.c +++ b/source/components/dispatcher/dsfield.c @@ -685,6 +685,12 @@ AcpiDsCreateField ( Info.RegionNode = RegionNode; Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next); + if (Info.RegionNode->Type == ACPI_ADR_SPACE_PLATFORM_COMM && + !(RegionNode->Object->Field.InternalPccBuffer + = ACPI_ALLOCATE_ZEROED(Info.RegionNode->Object->Region.Length))) + { + return_ACPI_STATUS (AE_NO_MEMORY); + } return_ACPI_STATUS (Status); } diff --git a/source/components/dispatcher/dsopcode.c b/source/components/dispatcher/dsopcode.c index 8b9a30aa76c3..acf1ff4e1d19 100644 --- a/source/components/dispatcher/dsopcode.c +++ b/source/components/dispatcher/dsopcode.c @@ -521,6 +521,7 @@ AcpiDsEvalRegionOperands ( ACPI_OPERAND_OBJECT *OperandDesc; ACPI_NAMESPACE_NODE *Node; ACPI_PARSE_OBJECT *NextOp; + ACPI_ADR_SPACE_TYPE SpaceId; ACPI_FUNCTION_TRACE_PTR (DsEvalRegionOperands, Op); @@ -530,11 +531,12 @@ AcpiDsEvalRegionOperands ( * This is where we evaluate the address and length fields of the * OpRegion declaration */ - Node = Op->Common.Node; + Node = Op->Common.Node; /* NextOp points to the op that holds the SpaceID */ NextOp = Op->Common.Value.Arg; + SpaceId = (ACPI_ADR_SPACE_TYPE) NextOp->Common.Value.Integer; /* NextOp points to address op */ @@ -572,6 +574,15 @@ AcpiDsEvalRegionOperands ( ObjDesc->Region.Length = (UINT32) OperandDesc->Integer.Value; AcpiUtRemoveReference (OperandDesc); + /* A zero-length operation region is unusable. Just warn */ + + if (!ObjDesc->Region.Length && (SpaceId < ACPI_NUM_PREDEFINED_REGIONS)) + { + ACPI_WARNING ((AE_INFO, + "Operation Region [%4.4s] has zero length (SpaceId %X)", + Node->Name.Ascii, SpaceId)); + } + /* * Get the address and save it * (at top of stack - 1) diff --git a/source/components/dispatcher/dswload2.c b/source/components/dispatcher/dswload2.c index f22067486c31..3a9e374eb602 100644 --- a/source/components/dispatcher/dswload2.c +++ b/source/components/dispatcher/dswload2.c @@ -167,7 +167,7 @@ * FUNCTION: AcpiDsLoad2BeginOp * * PARAMETERS: WalkState - Current state of the parse tree walk - * OutOp - Wher to return op if a new one is created + * OutOp - Where to return op if a new one is created * * RETURN: Status * diff --git a/source/components/events/evgpe.c b/source/components/events/evgpe.c index 1dcd0fc74b25..f5ea992a270b 100644 --- a/source/components/events/evgpe.c +++ b/source/components/events/evgpe.c @@ -1012,7 +1012,7 @@ AcpiEvGpeDispatch ( GpeDevice, GpeNumber, GpeEventInfo->Dispatch.Handler->Context); - /* If requested, clear (if level-triggered) and reenable the GPE */ + /* If requested, clear (if level-triggered) and re-enable the GPE */ if (ReturnValue & ACPI_REENABLE_GPE) { diff --git a/source/components/events/evregion.c b/source/components/events/evregion.c index 2b7780658ecd..6f6d7ccc8b50 100644 --- a/source/components/events/evregion.c +++ b/source/components/events/evregion.c @@ -409,7 +409,7 @@ AcpiEvAddressSpaceDispatch ( /* * For handlers other than the default (supplied) handlers, we must * exit the interpreter because the handler *might* block -- we don't - * know what it will do, so we can't hold the lock on the intepreter. + * know what it will do, so we can't hold the lock on the interpreter. */ AcpiExExitInterpreter(); } diff --git a/source/components/events/evrgnini.c b/source/components/events/evrgnini.c index a5234a21c30c..718e2e87d933 100644 --- a/source/components/events/evrgnini.c +++ b/source/components/events/evrgnini.c @@ -724,24 +724,6 @@ AcpiEvInitializeRegion ( HandlerObj = ObjDesc->CommonNotify.Handler; break; - case ACPI_TYPE_METHOD: - /* - * If we are executing module level code, the original - * Node's object was replaced by this Method object and we - * saved the handler in the method object. - * - * Note: Only used for the legacy MLC support. Will - * be removed in the future. - * - * See AcpiNsExecModuleCode - */ - if (!AcpiGbl_ExecuteTablesAsMethods && - ObjDesc->Method.InfoFlags & ACPI_METHOD_MODULE_LEVEL) - { - HandlerObj = ObjDesc->Method.Dispatch.Handler; - } - break; - default: /* Ignore other objects */ diff --git a/source/components/events/evxfgpe.c b/source/components/events/evxfgpe.c index 546faa6e8b44..52061db190cc 100644 --- a/source/components/events/evxfgpe.c +++ b/source/components/events/evxfgpe.c @@ -885,9 +885,9 @@ ACPI_EXPORT_SYMBOL (AcpiGetGpeStatus) * * RETURN: Status * - * DESCRIPTION: Clear and conditionally reenable a GPE. This completes the GPE + * DESCRIPTION: Clear and conditionally re-enable a GPE. This completes the GPE * processing. Intended for use by asynchronous host-installed - * GPE handlers. The GPE is only reenabled if the EnableForRun bit + * GPE handlers. The GPE is only re-enabled if the EnableForRun bit * is set in the GPE info. * ******************************************************************************/ diff --git a/source/components/executer/exconvrt.c b/source/components/executer/exconvrt.c index 7a15387f7eef..c4fda4c1cc21 100644 --- a/source/components/executer/exconvrt.c +++ b/source/components/executer/exconvrt.c @@ -708,7 +708,7 @@ AcpiExConvertToString ( { if (Base == 16) { - /* Emit 0x prefix for explict/implicit hex conversion */ + /* Emit 0x prefix for explicit/implicit hex conversion */ *NewBuf++ = '0'; *NewBuf++ = 'x'; diff --git a/source/components/executer/exfield.c b/source/components/executer/exfield.c index 5ef9bd31a0e4..b35e6a4ef4ae 100644 --- a/source/components/executer/exfield.c +++ b/source/components/executer/exfield.c @@ -187,6 +187,17 @@ const UINT8 AcpiProtocolLengths[] = 0xFF /* F - ATTRIB_RAW_PROCESS_BYTES */ }; +#define PCC_MASTER_SUBSPACE 3 + +/* + * The following macros determine a given offset is a COMD field. + * According to the specification, generic subspaces (types 0-2) contains a + * 2-byte COMD field at offset 4 and master subspaces (type 3) contains a 4-byte + * COMD field starting at offset 12. + */ +#define GENERIC_SUBSPACE_COMMAND(a) (4 == a || a == 5) +#define MASTER_SUBSPACE_COMMAND(a) (12 <= a && a <= 15) + /******************************************************************************* * @@ -337,6 +348,23 @@ AcpiExReadDataFromField ( Status = AcpiExReadGpio (ObjDesc, Buffer); goto Exit; } + else if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) && + (ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM)) + { + /* + * Reading from a PCC field unit does not require the handler because + * it only requires reading from the InternalPccBuffer. + */ + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + "PCC FieldRead bits %u\n", ObjDesc->Field.BitLength)); + + memcpy (Buffer, ObjDesc->Field.RegionObj->Field.InternalPccBuffer + + ObjDesc->Field.BaseByteOffset, (ACPI_SIZE) ACPI_ROUND_BITS_UP_TO_BYTES ( + ObjDesc->Field.BitLength)); + + *RetBufferDesc = BufferDesc; + return AE_OK; + } ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "FieldRead [TO]: Obj %p, Type %X, Buf %p, ByteLen %X\n", @@ -393,6 +421,7 @@ AcpiExWriteDataToField ( { ACPI_STATUS Status; UINT32 BufferLength; + UINT32 DataLength; void *Buffer; @@ -439,6 +468,39 @@ AcpiExWriteDataToField ( Status = AcpiExWriteSerialBus (SourceDesc, ObjDesc, ResultDesc); return_ACPI_STATUS (Status); } + else if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) && + (ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM)) + { + /* + * According to the spec a write to the COMD field will invoke the + * region handler. Otherwise, write to the PccInternal buffer. This + * implementation will use the offsets specified rather than the name + * of the field. This is considered safer because some firmware tools + * are known to obfiscate named objects. + */ + DataLength = (ACPI_SIZE) ACPI_ROUND_BITS_UP_TO_BYTES ( + ObjDesc->Field.BitLength); + memcpy (ObjDesc->Field.RegionObj->Field.InternalPccBuffer + + ObjDesc->Field.BaseByteOffset, + SourceDesc->Buffer.Pointer, DataLength); + + if ((ObjDesc->Field.RegionObj->Region.Address == PCC_MASTER_SUBSPACE && + MASTER_SUBSPACE_COMMAND (ObjDesc->Field.BaseByteOffset)) || + GENERIC_SUBSPACE_COMMAND (ObjDesc->Field.BaseByteOffset)) + { + /* Perform the write */ + + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + "PCC COMD field has been written. Invoking PCC handler now.\n")); + + Status = AcpiExAccessRegion ( + ObjDesc, 0, (UINT64 *) ObjDesc->Field.RegionObj->Field.InternalPccBuffer, + ACPI_WRITE); + return_ACPI_STATUS (Status); + } + return (AE_OK); + } + /* Get a pointer to the data to be written */ diff --git a/source/components/executer/exserial.c b/source/components/executer/exserial.c index 0b05fbce963b..07b42880b940 100644 --- a/source/components/executer/exserial.c +++ b/source/components/executer/exserial.c @@ -165,7 +165,7 @@ * FUNCTION: AcpiExReadGpio * * PARAMETERS: ObjDesc - The named field to read - * Buffer - Where the return data is returnd + * Buffer - Where the return data is returned * * RETURN: Status * diff --git a/source/components/executer/exutils.c b/source/components/executer/exutils.c index 795c94428d42..653777b70a87 100644 --- a/source/components/executer/exutils.c +++ b/source/components/executer/exutils.c @@ -325,7 +325,7 @@ AcpiExTruncateFor32bitTable ( * RETURN: None * * DESCRIPTION: Obtain the ACPI hardware Global Lock, only if the field - * flags specifiy that it is to be obtained before field access. + * flags specify that it is to be obtained before field access. * ******************************************************************************/ diff --git a/source/components/namespace/nsload.c b/source/components/namespace/nsload.c index fc93604d8779..f5a82347af92 100644 --- a/source/components/namespace/nsload.c +++ b/source/components/namespace/nsload.c @@ -233,7 +233,7 @@ AcpiNsLoadTable ( /* * On error, delete any namespace objects created by this table. * We cannot initialize these objects, so delete them. There are - * a couple of expecially bad cases: + * a couple of especially bad cases: * AE_ALREADY_EXISTS - namespace collision. * AE_NOT_FOUND - the target of a Scope operator does not * exist. This target of Scope must already exist in the diff --git a/source/components/namespace/nsparse.c b/source/components/namespace/nsparse.c index 1aa568cb637c..e559223a1b45 100644 --- a/source/components/namespace/nsparse.c +++ b/source/components/namespace/nsparse.c @@ -422,66 +422,18 @@ AcpiNsParseTable ( ACPI_FUNCTION_TRACE (NsParseTable); - if (AcpiGbl_ExecuteTablesAsMethods) - { - /* - * This case executes the AML table as one large control method. - * The point of this is to execute any module-level code in-place - * as the table is parsed. Some AML code depends on this behavior. - * - * It is a run-time option at this time, but will eventually become - * the default. - * - * Note: This causes the table to only have a single-pass parse. - * However, this is compatible with other ACPI implementations. - */ - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_PARSE, - "%s: **** Start table execution pass\n", ACPI_GET_FUNCTION_NAME)); - - Status = AcpiNsExecuteTable (TableIndex, StartNode); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - } - else - { - /* - * AML Parse, pass 1 - * - * In this pass, we load most of the namespace. Control methods - * are not parsed until later. A parse tree is not created. - * Instead, each Parser Op subtree is deleted when it is finished. - * This saves a great deal of memory, and allows a small cache of - * parse objects to service the entire parse. The second pass of - * the parse then performs another complete parse of the AML. - */ - ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Start pass 1\n")); - - Status = AcpiNsOneCompleteParse (ACPI_IMODE_LOAD_PASS1, - TableIndex, StartNode); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } + /* + * Executes the AML table as one large control method. + * The point of this is to execute any module-level code in-place + * as the table is parsed. Some AML code depends on this behavior. + * + * Note: This causes the table to only have a single-pass parse. + * However, this is compatible with other ACPI implementations. + */ + ACPI_DEBUG_PRINT_RAW ((ACPI_DB_PARSE, + "%s: **** Start table execution pass\n", ACPI_GET_FUNCTION_NAME)); - /* - * AML Parse, pass 2 - * - * In this pass, we resolve forward references and other things - * that could not be completed during the first pass. - * Another complete parse of the AML is performed, but the - * overhead of this is compensated for by the fact that the - * parse objects are all cached. - */ - ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Start pass 2\n")); - Status = AcpiNsOneCompleteParse (ACPI_IMODE_LOAD_PASS2, - TableIndex, StartNode); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - } + Status = AcpiNsExecuteTable (TableIndex, StartNode); return_ACPI_STATUS (Status); } diff --git a/source/components/namespace/nsutils.c b/source/components/namespace/nsutils.c index 78ba42abd0bf..4a9f0313dda0 100644 --- a/source/components/namespace/nsutils.c +++ b/source/components/namespace/nsutils.c @@ -561,7 +561,7 @@ AcpiNsInternalizeName ( * * FUNCTION: AcpiNsExternalizeName * - * PARAMETERS: InternalNameLength - Lenth of the internal name below + * PARAMETERS: InternalNameLength - Length of the internal name below * InternalName - Internal representation of name * ConvertedNameLength - Where the length is returned * ConvertedName - Where the resulting external name diff --git a/source/components/parser/psloop.c b/source/components/parser/psloop.c index 127850a636c9..7398c3df2a91 100644 --- a/source/components/parser/psloop.c +++ b/source/components/parser/psloop.c @@ -178,13 +178,6 @@ AcpiPsGetArguments ( UINT8 *AmlOpStart, ACPI_PARSE_OBJECT *Op); -static void -AcpiPsLinkModuleCode ( - ACPI_PARSE_OBJECT *ParentOp, - UINT8 *AmlStart, - UINT32 AmlLength, - ACPI_OWNER_ID OwnerId); - /******************************************************************************* * @@ -208,7 +201,6 @@ AcpiPsGetArguments ( { ACPI_STATUS Status = AE_OK; ACPI_PARSE_OBJECT *Arg = NULL; - const ACPI_OPCODE_INFO *OpInfo; ACPI_FUNCTION_TRACE_PTR (PsGetArguments, WalkState); @@ -287,82 +279,6 @@ AcpiPsGetArguments ( "Final argument count: %8.8X pass %u\n", WalkState->ArgCount, WalkState->PassNumber)); - /* - * This case handles the legacy option that groups all module-level - * code blocks together and defers execution until all of the tables - * are loaded. Execute all of these blocks at this time. - * Execute any module-level code that was detected during the table - * load phase. - * - * Note: this option is deprecated and will be eliminated in the - * future. Use of this option can cause problems with AML code that - * depends upon in-order immediate execution of module-level code. - */ - if (!AcpiGbl_ExecuteTablesAsMethods && - (WalkState->PassNumber <= ACPI_IMODE_LOAD_PASS2) && - ((WalkState->ParseFlags & ACPI_PARSE_DISASSEMBLE) == 0)) - { - /* - * We want to skip If/Else/While constructs during Pass1 because we - * want to actually conditionally execute the code during Pass2. - * - * Except for disassembly, where we always want to walk the - * If/Else/While packages - */ - switch (Op->Common.AmlOpcode) - { - case AML_IF_OP: - case AML_ELSE_OP: - case AML_WHILE_OP: - /* - * Currently supported module-level opcodes are: - * IF/ELSE/WHILE. These appear to be the most common, - * and easiest to support since they open an AML - * package. - */ - if (WalkState->PassNumber == ACPI_IMODE_LOAD_PASS1) - { - AcpiPsLinkModuleCode (Op->Common.Parent, AmlOpStart, - (UINT32) (WalkState->ParserState.PkgEnd - AmlOpStart), - WalkState->OwnerId); - } - - ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, - "Pass1: Skipping an If/Else/While body\n")); - - /* Skip body of if/else/while in pass 1 */ - - WalkState->ParserState.Aml = WalkState->ParserState.PkgEnd; - WalkState->ArgCount = 0; - break; - - default: - /* - * Check for an unsupported executable opcode at module - * level. We must be in PASS1, the parent must be a SCOPE, - * The opcode class must be EXECUTE, and the opcode must - * not be an argument to another opcode. - */ - if ((WalkState->PassNumber == ACPI_IMODE_LOAD_PASS1) && - (Op->Common.Parent->Common.AmlOpcode == AML_SCOPE_OP)) - { - OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); - if ((OpInfo->Class == AML_CLASS_EXECUTE) && - (!Arg)) - { - ACPI_WARNING ((AE_INFO, - "Unsupported module-level executable opcode " - "0x%.2X at table offset 0x%.4X", - Op->Common.AmlOpcode, - (UINT32) (ACPI_PTR_DIFF (AmlOpStart, - WalkState->ParserState.AmlStart) + - sizeof (ACPI_TABLE_HEADER)))); - } - } - break; - } - } - /* Special processing for certain opcodes */ switch (Op->Common.AmlOpcode) @@ -436,117 +352,6 @@ AcpiPsGetArguments ( /******************************************************************************* * - * FUNCTION: AcpiPsLinkModuleCode - * - * PARAMETERS: ParentOp - Parent parser op - * AmlStart - Pointer to the AML - * AmlLength - Length of executable AML - * OwnerId - OwnerId of module level code - * - * RETURN: None. - * - * DESCRIPTION: Wrap the module-level code with a method object and link the - * object to the global list. Note, the mutex field of the method - * object is used to link multiple module-level code objects. - * - * NOTE: In this legacy option, each block of detected executable AML - * code that is outside of any control method is wrapped with a temporary - * control method object and placed on a global list below. - * - * This function executes the module-level code for all tables only after - * all of the tables have been loaded. It is a legacy option and is - * not compatible with other ACPI implementations. See AcpiNsLoadTable. - * - * This function will be removed when the legacy option is removed. - * - ******************************************************************************/ - -static void -AcpiPsLinkModuleCode ( - ACPI_PARSE_OBJECT *ParentOp, - UINT8 *AmlStart, - UINT32 AmlLength, - ACPI_OWNER_ID OwnerId) -{ - ACPI_OPERAND_OBJECT *Prev; - ACPI_OPERAND_OBJECT *Next; - ACPI_OPERAND_OBJECT *MethodObj; - ACPI_NAMESPACE_NODE *ParentNode; - - - ACPI_FUNCTION_TRACE (PsLinkModuleCode); - - - /* Get the tail of the list */ - - Prev = Next = AcpiGbl_ModuleCodeList; - while (Next) - { - Prev = Next; - Next = Next->Method.Mutex; - } - - /* - * Insert the module level code into the list. Merge it if it is - * adjacent to the previous element. - */ - if (!Prev || - ((Prev->Method.AmlStart + Prev->Method.AmlLength) != AmlStart)) - { - /* Create, initialize, and link a new temporary method object */ - - MethodObj = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD); - if (!MethodObj) - { - return_VOID; - } - - ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, - "Create/Link new code block: %p\n", MethodObj)); - - if (ParentOp->Common.Node) - { - ParentNode = ParentOp->Common.Node; - } - else - { - ParentNode = AcpiGbl_RootNode; - } - - MethodObj->Method.AmlStart = AmlStart; - MethodObj->Method.AmlLength = AmlLength; - MethodObj->Method.OwnerId = OwnerId; - MethodObj->Method.InfoFlags |= ACPI_METHOD_MODULE_LEVEL; - - /* - * Save the parent node in NextObject. This is cheating, but we - * don't want to expand the method object. - */ - MethodObj->Method.NextObject = - ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, ParentNode); - - if (!Prev) - { - AcpiGbl_ModuleCodeList = MethodObj; - } - else - { - Prev->Method.Mutex = MethodObj; - } - } - else - { - ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, - "Appending to existing code block: %p\n", Prev)); - - Prev->Method.AmlLength += AmlLength; - } - - return_VOID; -} - -/******************************************************************************* - * * FUNCTION: AcpiPsParseLoop * * PARAMETERS: WalkState - Current state diff --git a/source/components/parser/psparse.c b/source/components/parser/psparse.c index db3bbaba6860..68e83aa84f4a 100644 --- a/source/components/parser/psparse.c +++ b/source/components/parser/psparse.c @@ -680,12 +680,12 @@ AcpiPsParseAml ( if (Status == AE_ABORT_METHOD) { AcpiNsPrintNodePathname ( - WalkState->MethodNode, "Method aborted:"); + WalkState->MethodNode, "Aborting method"); AcpiOsPrintf ("\n"); } else { - ACPI_ERROR_METHOD ("Method parse/execution failed", + ACPI_ERROR_METHOD ("Aborting method", WalkState->MethodNode, NULL, Status); } AcpiExEnterInterpreter (); diff --git a/source/components/resources/rsdumpinfo.c b/source/components/resources/rsdumpinfo.c index c807e285f869..d55bf63bad50 100644 --- a/source/components/resources/rsdumpinfo.c +++ b/source/components/resources/rsdumpinfo.c @@ -180,7 +180,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpIrq[7] = {ACPI_RSD_UINT8 , ACPI_RSD_OFFSET (Irq.DescriptorLength), "Descriptor Length", NULL}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Irq.Triggering), "Triggering", AcpiGbl_HeDecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Irq.Polarity), "Polarity", AcpiGbl_LlDecode}, - {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Irq.Sharable), "Sharing", AcpiGbl_ShrDecode}, + {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} }; @@ -324,7 +324,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpExtIrq[8] = {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (ExtendedIrq.ProducerConsumer), "Type", AcpiGbl_ConsumeDecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (ExtendedIrq.Triggering), "Triggering", AcpiGbl_HeDecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (ExtendedIrq.Polarity), "Polarity", AcpiGbl_LlDecode}, - {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (ExtendedIrq.Sharable), "Sharing", AcpiGbl_ShrDecode}, + {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} @@ -347,7 +347,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpGpio[16] = {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (Gpio.ConnectionType), "ConnectionType", AcpiGbl_CtDecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Gpio.ProducerConsumer), "ProducerConsumer", AcpiGbl_ConsumeDecode}, {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (Gpio.PinConfig), "PinConfig", AcpiGbl_PpcDecode}, - {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Gpio.Sharable), "Sharing", AcpiGbl_ShrDecode}, + {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Gpio.Shareable), "Sharing", AcpiGbl_ShrDecode}, {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Gpio.IoRestriction), "IoRestriction", AcpiGbl_IorDecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Gpio.Triggering), "Triggering", AcpiGbl_HeDecode}, {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Gpio.Polarity), "Polarity", AcpiGbl_LlDecode}, @@ -365,7 +365,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpPinFunction[10] = {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpPinFunction), "PinFunction", NULL}, {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (PinFunction.RevisionId), "RevisionId", NULL}, {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (PinFunction.PinConfig), "PinConfig", AcpiGbl_PpcDecode}, - {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinFunction.Sharable), "Sharing", AcpiGbl_ShrDecode}, + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinFunction.Shareable), "Sharing", AcpiGbl_ShrDecode}, {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (PinFunction.FunctionNumber), "FunctionNumber", NULL}, {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (PinFunction.ResourceSource), "ResourceSource", NULL}, {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (PinFunction.PinTableLength), "PinTableLength", NULL}, @@ -379,7 +379,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpPinConfig[11] = {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpPinConfig), "PinConfig", NULL}, {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (PinConfig.RevisionId), "RevisionId", NULL}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinConfig.ProducerConsumer), "ProducerConsumer", AcpiGbl_ConsumeDecode}, - {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinConfig.Sharable), "Sharing", AcpiGbl_ShrDecode}, + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinConfig.Shareable), "Sharing", AcpiGbl_ShrDecode}, {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (PinConfig.PinConfigType), "PinConfigType", NULL}, {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (PinConfig.PinConfigValue), "PinConfigValue", NULL}, {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (PinConfig.ResourceSource), "ResourceSource", NULL}, @@ -406,7 +406,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpPinGroupFunction[9] = {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpPinGroupFunction), "PinGroupFunction", NULL}, {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (PinGroupFunction.RevisionId), "RevisionId", NULL}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinGroupFunction.ProducerConsumer), "ProducerConsumer", AcpiGbl_ConsumeDecode}, - {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinGroupFunction.Sharable), "Sharing", AcpiGbl_ShrDecode}, + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinGroupFunction.Shareable), "Sharing", AcpiGbl_ShrDecode}, {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (PinGroupFunction.FunctionNumber), "FunctionNumber", NULL}, {ACPI_RSD_SOURCE_LABEL, ACPI_RSD_OFFSET (PinGroupFunction.ResourceSourceLabel), "ResourceSourceLabel", NULL}, {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (PinGroupFunction.ResourceSource), "ResourceSource", NULL}, @@ -419,7 +419,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpPinGroupConfig[10] = {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpPinGroupConfig), "PinGroupConfig", NULL}, {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (PinGroupConfig.RevisionId), "RevisionId", NULL}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinGroupConfig.ProducerConsumer), "ProducerConsumer", AcpiGbl_ConsumeDecode}, - {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinGroupConfig.Sharable), "Sharing", AcpiGbl_ShrDecode}, + {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinGroupConfig.Shareable), "Sharing", AcpiGbl_ShrDecode}, {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (PinGroupConfig.PinConfigType), "PinConfigType", NULL}, {ACPI_RSD_UINT32, ACPI_RSD_OFFSET (PinGroupConfig.PinConfigValue), "PinConfigValue", NULL}, {ACPI_RSD_SOURCE_LABEL, ACPI_RSD_OFFSET (PinGroupConfig.ResourceSourceLabel), "ResourceSourceLabel", NULL}, diff --git a/source/components/resources/rsirq.c b/source/components/resources/rsirq.c index 70ae3a1db3ec..d2f3cfbcd6cb 100644 --- a/source/components/resources/rsirq.c +++ b/source/components/resources/rsirq.c @@ -201,7 +201,7 @@ ACPI_RSCONVERT_INFO AcpiRsGetIrq[9] = AML_OFFSET (Irq.Flags), 3}, - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Irq.Sharable), + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Irq.Shareable), AML_OFFSET (Irq.Flags), 4}, @@ -241,7 +241,7 @@ ACPI_RSCONVERT_INFO AcpiRsSetIrq[14] = AML_OFFSET (Irq.Flags), 3}, - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Irq.Sharable), + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Irq.Shareable), AML_OFFSET (Irq.Flags), 4}, @@ -288,7 +288,7 @@ ACPI_RSCONVERT_INFO AcpiRsSetIrq[14] = ACPI_ACTIVE_HIGH}, {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_VALUE, - ACPI_RS_OFFSET (Data.Irq.Sharable), + ACPI_RS_OFFSET (Data.Irq.Shareable), ACPI_EXCLUSIVE}, /* We can optimize to a 2-byte IrqNoFlags() descriptor */ @@ -329,7 +329,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertExtIrq[10] = AML_OFFSET (ExtendedIrq.Flags), 2}, - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.ExtendedIrq.Sharable), + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.ExtendedIrq.Shareable), AML_OFFSET (ExtendedIrq.Flags), 3}, diff --git a/source/components/resources/rsserial.c b/source/components/resources/rsserial.c index f543f4393913..eaed2a3709de 100644 --- a/source/components/resources/rsserial.c +++ b/source/components/resources/rsserial.c @@ -186,7 +186,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertGpio[18] = AML_OFFSET (Gpio.Flags), 0}, - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Sharable), + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Shareable), AML_OFFSET (Gpio.IntFlags), 3}, @@ -274,7 +274,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertPinFunction[13] = AML_OFFSET (PinFunction.RevisionId), 1}, - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinFunction.Sharable), + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinFunction.Shareable), AML_OFFSET (PinFunction.Flags), 0}, @@ -639,7 +639,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertPinConfig[14] = AML_OFFSET (PinConfig.RevisionId), 1}, - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinConfig.Sharable), + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinConfig.Shareable), AML_OFFSET (PinConfig.Flags), 0}, @@ -775,7 +775,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertPinGroupFunction[13] = AML_OFFSET (PinGroupFunction.RevisionId), 1}, - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinGroupFunction.Sharable), + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinGroupFunction.Shareable), AML_OFFSET (PinGroupFunction.Flags), 0}, @@ -842,7 +842,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertPinGroupConfig[14] = AML_OFFSET (PinGroupConfig.RevisionId), 1}, - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinGroupConfig.Sharable), + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinGroupConfig.Shareable), AML_OFFSET (PinGroupConfig.Flags), 0}, diff --git a/source/components/tables/tbfadt.c b/source/components/tables/tbfadt.c index 9691b2cd522f..aad5a626ad89 100644 --- a/source/components/tables/tbfadt.c +++ b/source/components/tables/tbfadt.c @@ -740,7 +740,7 @@ AcpiTbConvertFadt ( * 64-bit X length field. * Note: If the legacy length field is > 0xFF bits, ignore * this check. (GPE registers can be larger than the - * 64-bit GAS structure can accomodate, 0xFF bits). + * 64-bit GAS structure can accommodate, 0xFF bits). */ if ((ACPI_MUL_8 (Length) <= ACPI_UINT8_MAX) && (Address64->BitWidth != ACPI_MUL_8 (Length))) diff --git a/source/components/tables/tbxface.c b/source/components/tables/tbxface.c index bc6eea307e90..097e535df8c3 100644 --- a/source/components/tables/tbxface.c +++ b/source/components/tables/tbxface.c @@ -263,7 +263,7 @@ AcpiInitializeTables ( /* * Get the root table (RSDT or XSDT) and extract all entries to the local * Root Table Array. This array contains the information of the RSDT/XSDT - * in a common, more useable format. + * in a common, more usable format. */ Status = AcpiTbParseRootTable (RsdpAddress); return_ACPI_STATUS (Status); @@ -334,7 +334,7 @@ AcpiReallocateRootTable ( { /* * Now it's safe to do full table validation. We can do deferred - * table initilization here once the flag is set. + * table initialization here once the flag is set. */ AcpiGbl_EnableTableValidation = TRUE; for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i) diff --git a/source/components/tables/tbxfload.c b/source/components/tables/tbxfload.c index a3168c5c0ef7..bda55ea2ac74 100644 --- a/source/components/tables/tbxfload.c +++ b/source/components/tables/tbxfload.c @@ -219,25 +219,19 @@ AcpiLoadTables ( "While loading namespace from ACPI tables")); } - if (AcpiGbl_ExecuteTablesAsMethods) + /* + * Initialize the objects in the namespace that remain uninitialized. + * This runs the executable AML that may be part of the declaration of + * these name objects: + * OperationRegions, BufferFields, Buffers, and Packages. + * + */ + Status = AcpiNsInitializeObjects (); + if (ACPI_SUCCESS (Status)) { - /* - * If the module-level code support is enabled, initialize the objects - * in the namespace that remain uninitialized. This runs the executable - * AML that may be part of the declaration of these name objects: - * OperationRegions, BufferFields, Buffers, and Packages. - * - * Note: The module-level code is optional at this time, but will - * become the default in the future. - */ - Status = AcpiNsInitializeObjects (); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } + AcpiGbl_NamespaceInitialized = TRUE; } - AcpiGbl_NamespaceInitialized = TRUE; return_ACPI_STATUS (Status); } diff --git a/source/components/utilities/utclib.c b/source/components/utilities/utclib.c index e03dee130fd4..1e62de13bd1b 100644 --- a/source/components/utilities/utclib.c +++ b/source/components/utilities/utclib.c @@ -399,7 +399,7 @@ strlen ( * PARAMETERS: String - Null terminated string * Delimiters - Delimiters to match * - * RETURN: The first occurance in the string of any of the bytes in the + * RETURN: The first occurrence in the string of any of the bytes in the * delimiters * * DESCRIPTION: Search a string for any of a set of the delimiters @@ -789,7 +789,7 @@ strstr ( * FUNCTION: strtoul * * PARAMETERS: String - Null terminated string - * Terminater - Where a pointer to the terminating byte is + * Terminator - Where a pointer to the terminating byte is * returned * Base - Radix of the string * diff --git a/source/components/utilities/utdecode.c b/source/components/utilities/utdecode.c index 5460de2ace26..e470dfc41688 100644 --- a/source/components/utilities/utdecode.c +++ b/source/components/utilities/utdecode.c @@ -633,6 +633,7 @@ static const char *AcpiGbl_GenericNotify[ACPI_GENERIC_NOTIFY_MAX + 1] /* 0C */ "Reserved (was previously Shutdown Request)", /* Reserved in ACPI 6.0 */ /* 0D */ "System Resource Affinity Update", /* 0E */ "Heterogeneous Memory Attributes Update" /* ACPI 6.2 */ + /* 0F */ "Error Disconnect Recover" /* ACPI 6.3 */ }; static const char *AcpiGbl_DeviceNotify[5] = @@ -669,14 +670,14 @@ AcpiUtGetNotifyName ( ACPI_OBJECT_TYPE Type) { - /* 00 - 0D are "common to all object types" (from ACPI Spec) */ + /* 00 - 0F are "common to all object types" (from ACPI Spec) */ if (NotifyValue <= ACPI_GENERIC_NOTIFY_MAX) { return (AcpiGbl_GenericNotify[NotifyValue]); } - /* 0E - 7F are reserved */ + /* 10 - 7F are reserved */ if (NotifyValue <= ACPI_MAX_SYS_NOTIFY) { diff --git a/source/components/utilities/utdelete.c b/source/components/utilities/utdelete.c index 3fbd0fd10ddd..332e2dec7c19 100644 --- a/source/components/utilities/utdelete.c +++ b/source/components/utilities/utdelete.c @@ -412,6 +412,11 @@ AcpiUtDeleteInternalObj ( AcpiUtDeleteObjectDesc (SecondDesc); } + if (Object->Field.InternalPccBuffer) + { + ACPI_FREE(Object->Field.InternalPccBuffer); + } + break; case ACPI_TYPE_BUFFER_FIELD: diff --git a/source/components/utilities/uterror.c b/source/components/utilities/uterror.c index 0d356e59a461..624c034cedf3 100644 --- a/source/components/utilities/uterror.c +++ b/source/components/utilities/uterror.c @@ -353,19 +353,19 @@ AcpiUtPrefixedNamespaceError ( case AE_ALREADY_EXISTS: AcpiOsPrintf (ACPI_MSG_BIOS_ERROR); - Message = "Failure creating"; + Message = "Failure creating named object"; break; case AE_NOT_FOUND: AcpiOsPrintf (ACPI_MSG_BIOS_ERROR); - Message = "Could not resolve"; + Message = "Could not resolve symbol"; break; default: AcpiOsPrintf (ACPI_MSG_ERROR); - Message = "Failure resolving"; + Message = "Failure resolving symbol"; break; } @@ -500,7 +500,8 @@ AcpiUtMethodError ( } AcpiNsPrintNodePathname (Node, Message); - AcpiOsPrintf (", %s", AcpiFormatException (MethodStatus)); + AcpiOsPrintf (" due to previous error (%s)", + AcpiFormatException (MethodStatus)); ACPI_MSG_SUFFIX; ACPI_MSG_REDIRECT_END; |
