diff options
Diffstat (limited to 'source/components')
| -rw-r--r-- | source/components/debugger/dbinput.c | 2 | ||||
| -rw-r--r-- | source/components/debugger/dbnames.c | 1 | ||||
| -rw-r--r-- | source/components/dispatcher/dsfield.c | 2 | ||||
| -rw-r--r-- | source/components/dispatcher/dsopcode.c | 1 | ||||
| -rw-r--r-- | source/components/dispatcher/dswload.c | 22 | ||||
| -rw-r--r-- | source/components/executer/exfield.c | 10 | ||||
| -rw-r--r-- | source/components/hardware/hwxfsleep.c | 2 | ||||
| -rw-r--r-- | source/components/utilities/utids.c | 3 |
8 files changed, 35 insertions, 8 deletions
diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c index c854cb37a7fe..d498c9e0fec6 100644 --- a/source/components/debugger/dbinput.c +++ b/source/components/debugger/dbinput.c @@ -1019,7 +1019,7 @@ AcpiDbCommandDispatch ( if (ACPI_FAILURE (Status) || Temp64 >= ACPI_NUM_PREDEFINED_REGIONS) { AcpiOsPrintf ( - "Invalid adress space ID: must be between 0 and %u inclusive\n", + "Invalid address space ID: must be between 0 and %u inclusive\n", ACPI_NUM_PREDEFINED_REGIONS - 1); return (AE_OK); } diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c index ac366ab04ca2..5521562ab73b 100644 --- a/source/components/debugger/dbnames.c +++ b/source/components/debugger/dbnames.c @@ -807,7 +807,6 @@ AcpiDbWalkForFields ( } - /******************************************************************************* * * FUNCTION: AcpiDbWalkForSpecificObjects diff --git a/source/components/dispatcher/dsfield.c b/source/components/dispatcher/dsfield.c index 5477686f1b5c..b81aaeb97d02 100644 --- a/source/components/dispatcher/dsfield.c +++ b/source/components/dispatcher/dsfield.c @@ -413,7 +413,7 @@ Cleanup: * FUNCTION: AcpiDsGetFieldNames * * PARAMETERS: Info - CreateField info structure - * ` WalkState - Current method state + * WalkState - Current method state * Arg - First parser arg for the field name list * * RETURN: Status diff --git a/source/components/dispatcher/dsopcode.c b/source/components/dispatcher/dsopcode.c index acf1ff4e1d19..526fc8470f8e 100644 --- a/source/components/dispatcher/dsopcode.c +++ b/source/components/dispatcher/dsopcode.c @@ -374,6 +374,7 @@ AcpiDsInitBufferField ( } ObjDesc->BufferField.BufferObj = BufferDesc; + ObjDesc->BufferField.IsCreateField = AmlOpcode == AML_CREATE_FIELD_OP; /* Reference count for BufferDesc inherits ObjDesc count */ diff --git a/source/components/dispatcher/dswload.c b/source/components/dispatcher/dswload.c index b55794281798..fa6b80e9a7a4 100644 --- a/source/components/dispatcher/dswload.c +++ b/source/components/dispatcher/dswload.c @@ -567,6 +567,28 @@ AcpiDsLoad1EndOp ( Op = WalkState->Op; ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op=%p State=%p\n", Op, WalkState)); + /* + * Disassembler: handle create field operators here. + * + * CreateBufferField is a deferred op that is typically processed in load + * pass 2. However, disassembly of control method contents walk the parse + * tree with ACPI_PARSE_LOAD_PASS1 and AML_CREATE operators are processed + * in a later walk. This is a problem when there is a control method that + * has the same name as the AML_CREATE object. In this case, any use of the + * name segment will be detected as a method call rather than a reference + * to a buffer field. + * + * This earlier creation during disassembly solves this issue by inserting + * the named object in the ACPI namespace so that references to this name + * would be a name string rather than a method call. + */ + if ((WalkState->ParseFlags & ACPI_PARSE_DISASSEMBLE) && + (WalkState->OpInfo->Flags & AML_CREATE)) + { + Status = AcpiDsCreateBufferField (Op, WalkState); + return_ACPI_STATUS (Status); + } + /* We are only interested in opcodes that have an associated name */ if (!(WalkState->OpInfo->Flags & (AML_NAMED | AML_FIELD))) diff --git a/source/components/executer/exfield.c b/source/components/executer/exfield.c index b35e6a4ef4ae..dc97d40450eb 100644 --- a/source/components/executer/exfield.c +++ b/source/components/executer/exfield.c @@ -246,7 +246,8 @@ AcpiExGetProtocolBufferLength ( * RETURN: Status * * DESCRIPTION: Read from a named field. Returns either an Integer or a - * Buffer, depending on the size of the field. + * Buffer, depending on the size of the field and whether if a + * field is created by the CreateField() operator. * ******************************************************************************/ @@ -310,12 +311,17 @@ AcpiExReadDataFromField ( * the use of arithmetic operators on the returned value if the * field size is equal or smaller than an Integer. * + * However, all buffer fields created by CreateField operator needs to + * remain as a buffer to match other AML interpreter implementations. + * * Note: Field.length is in bits. */ BufferLength = (ACPI_SIZE) ACPI_ROUND_BITS_UP_TO_BYTES ( ObjDesc->Field.BitLength); - if (BufferLength > AcpiGbl_IntegerByteWidth) + if (BufferLength > AcpiGbl_IntegerByteWidth || + (ObjDesc->Common.Type == ACPI_TYPE_BUFFER_FIELD && + ObjDesc->BufferField.IsCreateField)) { /* Field is too large for an Integer, create a Buffer instead */ diff --git a/source/components/hardware/hwxfsleep.c b/source/components/hardware/hwxfsleep.c index 78dc19020334..6eff7f6adb76 100644 --- a/source/components/hardware/hwxfsleep.c +++ b/source/components/hardware/hwxfsleep.c @@ -192,7 +192,7 @@ static ACPI_SLEEP_FUNCTIONS AcpiSleepDispatch[] = ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWakePrep)), ACPI_STRUCT_INIT (ExtendedFunction, AcpiHwExtendedWakePrep) }, - {ACPI_STRUCT_INIT (Legacy_function, + {ACPI_STRUCT_INIT (LegacyFunction, ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWake)), ACPI_STRUCT_INIT (ExtendedFunction, AcpiHwExtendedWake) } diff --git a/source/components/utilities/utids.c b/source/components/utilities/utids.c index 513548c24a9e..5fcfbf66809e 100644 --- a/source/components/utilities/utids.c +++ b/source/components/utilities/utids.c @@ -466,8 +466,7 @@ AcpiUtExecute_CID ( { /* Copy the String CID from the returned object */ - AcpiUtSafeStrcpy (NextIdString, CidObjects[i]->String.Length + 1, - CidObjects[i]->String.Pointer); + strcpy (NextIdString, CidObjects[i]->String.Pointer); Length = CidObjects[i]->String.Length + 1; } |
