[ACPICA] Update to version 20191213. CORE-16559

This commit is contained in:
Thomas Faber 2019-12-14 09:04:07 +01:00
parent d495a4fceb
commit be617cf987
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
8 changed files with 50 additions and 5 deletions

View file

@ -305,7 +305,7 @@ Cleanup:
* FUNCTION: AcpiDsGetFieldNames * FUNCTION: AcpiDsGetFieldNames
* *
* PARAMETERS: Info - CreateField info structure * PARAMETERS: Info - CreateField info structure
* ` WalkState - Current method state * WalkState - Current method state
* Arg - First parser arg for the field name list * Arg - First parser arg for the field name list
* *
* RETURN: Status * RETURN: Status

View file

@ -266,6 +266,7 @@ AcpiDsInitBufferField (
} }
ObjDesc->BufferField.BufferObj = BufferDesc; ObjDesc->BufferField.BufferObj = BufferDesc;
ObjDesc->BufferField.IsCreateField = AmlOpcode == AML_CREATE_FIELD_OP;
/* Reference count for BufferDesc inherits ObjDesc count */ /* Reference count for BufferDesc inherits ObjDesc count */

View file

@ -459,6 +459,28 @@ AcpiDsLoad1EndOp (
Op = WalkState->Op; Op = WalkState->Op;
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op=%p State=%p\n", Op, WalkState)); 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 */ /* We are only interested in opcodes that have an associated name */
if (!(WalkState->OpInfo->Flags & (AML_NAMED | AML_FIELD))) if (!(WalkState->OpInfo->Flags & (AML_NAMED | AML_FIELD)))

View file

@ -138,7 +138,8 @@ AcpiExGetProtocolBufferLength (
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: Read from a named field. Returns either an Integer or a * 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.
* *
******************************************************************************/ ******************************************************************************/
@ -202,12 +203,17 @@ AcpiExReadDataFromField (
* the use of arithmetic operators on the returned value if the * the use of arithmetic operators on the returned value if the
* field size is equal or smaller than an Integer. * 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. * Note: Field.length is in bits.
*/ */
BufferLength = (ACPI_SIZE) ACPI_ROUND_BITS_UP_TO_BYTES ( BufferLength = (ACPI_SIZE) ACPI_ROUND_BITS_UP_TO_BYTES (
ObjDesc->Field.BitLength); 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 */ /* Field is too large for an Integer, create a Buffer instead */

View file

@ -84,7 +84,7 @@ static ACPI_SLEEP_FUNCTIONS AcpiSleepDispatch[] =
ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWakePrep)), ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWakePrep)),
ACPI_STRUCT_INIT (ExtendedFunction, ACPI_STRUCT_INIT (ExtendedFunction,
AcpiHwExtendedWakePrep) }, AcpiHwExtendedWakePrep) },
{ACPI_STRUCT_INIT (Legacy_function, {ACPI_STRUCT_INIT (LegacyFunction,
ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWake)), ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWake)),
ACPI_STRUCT_INIT (ExtendedFunction, ACPI_STRUCT_INIT (ExtendedFunction,
AcpiHwExtendedWake) } AcpiHwExtendedWake) }

View file

@ -381,6 +381,7 @@ typedef struct acpi_object_buffer_field
{ {
ACPI_OBJECT_COMMON_HEADER ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO ACPI_COMMON_FIELD_INFO
BOOLEAN IsCreateField; /* Special case for objects created by CreateField() */
union acpi_operand_object *BufferObj; /* Containing Buffer object */ union acpi_operand_object *BufferObj; /* Containing Buffer object */
} ACPI_OBJECT_BUFFER_FIELD; } ACPI_OBJECT_BUFFER_FIELD;

View file

@ -46,7 +46,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */ /* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20191018 #define ACPI_CA_VERSION 0x20191213
#include "acconfig.h" #include "acconfig.h"
#include "actypes.h" #include "actypes.h"

View file

@ -162,6 +162,21 @@
#define ACPI_DISASSEMBLER 1 #define ACPI_DISASSEMBLER 1
#endif #endif
/*
* acpisrc CR\LF support
* Unix file line endings do not include the carriage return.
* If the acpisrc utility is being built using a microsoft compiler, it means
* that it will be running on a windows machine which means that the output is
* expected to have CR/LF newlines. If the acpisrc utility is built with
* anything else, it will likely run on a system with LF newlines. This flag
* tells the acpisrc utility that newlines will be in the LF format.
*/
#if defined(ACPI_SRC_APP) && !defined(_MSC_VER)
#define ACPI_SRC_OS_LF_ONLY 1
#else
#define ACPI_SRC_OS_LF_ONLY 0
#endif
/*! [Begin] no source code translation */ /*! [Begin] no source code translation */
/****************************************************************************** /******************************************************************************