[ACPICA] Update to version 20181213. CORE-15593

This commit is contained in:
Thomas Faber 2019-01-12 13:21:22 +01:00
parent bc002f1708
commit ecbd6353cc
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
35 changed files with 227 additions and 91 deletions

View file

@ -612,6 +612,8 @@ AcpiDsCallControlMethod (
goto Cleanup;
}
NextWalkState->MethodNestingDepth = ThisWalkState->MethodNestingDepth + 1;
/*
* Delete the operands on the previous walkstate operand stack
* (they were copied to new objects)
@ -630,6 +632,16 @@ AcpiDsCallControlMethod (
"**** Begin nested execution of [%4.4s] **** WalkState=%p\n",
MethodNode->Name.Ascii, NextWalkState));
ThisWalkState->MethodPathname = AcpiNsGetNormalizedPathname (MethodNode, TRUE);
ThisWalkState->MethodIsNested = TRUE;
/* Optional object evaluation log */
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EVALUATION,
"%-26s: %*s%s\n", " Nested method call",
NextWalkState->MethodNestingDepth * 3, " ",
&ThisWalkState->MethodPathname[1]));
/* Invoke an internal method if necessary */
if (ObjDesc->Method.InfoFlags & ACPI_METHOD_INTERNAL_ONLY)

View file

@ -53,7 +53,6 @@
ACPI_MODULE_NAME ("dsobject")
#ifndef ACPI_NO_METHOD_EXECUTION
/*******************************************************************************
*
* FUNCTION: AcpiDsBuildInternalObject
@ -352,7 +351,6 @@ AcpiDsCreateNode (
return_ACPI_STATUS (Status);
}
#endif /* ACPI_NO_METHOD_EXECUTION */
/*******************************************************************************
@ -463,9 +461,7 @@ AcpiDsInitObjectFromOp (
/* Truncate value if we are executing from a 32-bit ACPI table */
#ifndef ACPI_NO_METHOD_EXECUTION
(void) AcpiExTruncateFor32bitTable (ObjDesc);
#endif
break;
case AML_REVISION_OP:
@ -486,7 +482,6 @@ AcpiDsInitObjectFromOp (
ObjDesc->Integer.Value = Op->Common.Value.Integer;
#ifndef ACPI_NO_METHOD_EXECUTION
if (AcpiExTruncateFor32bitTable (ObjDesc))
{
/* Warn if we found a 64-bit constant in a 32-bit table */
@ -496,7 +491,6 @@ AcpiDsInitObjectFromOp (
ACPI_FORMAT_UINT64 (Op->Common.Value.Integer),
(UINT32) ObjDesc->Integer.Value));
}
#endif
break;
default:
@ -534,12 +528,10 @@ AcpiDsInitObjectFromOp (
ObjDesc->Reference.Value = ((UINT32) Opcode) - AML_FIRST_LOCAL_OP;
ObjDesc->Reference.Class = ACPI_REFCLASS_LOCAL;
#ifndef ACPI_NO_METHOD_EXECUTION
Status = AcpiDsMethodDataGetNode (ACPI_REFCLASS_LOCAL,
ObjDesc->Reference.Value, WalkState,
ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE,
&ObjDesc->Reference.Object));
#endif
break;
case AML_TYPE_METHOD_ARGUMENT:
@ -549,12 +541,10 @@ AcpiDsInitObjectFromOp (
ObjDesc->Reference.Value = ((UINT32) Opcode) - AML_FIRST_ARG_OP;
ObjDesc->Reference.Class = ACPI_REFCLASS_ARG;
#ifndef ACPI_NO_METHOD_EXECUTION
Status = AcpiDsMethodDataGetNode (ACPI_REFCLASS_ARG,
ObjDesc->Reference.Value, WalkState,
ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE,
&ObjDesc->Reference.Object));
#endif
break;
default: /* Object name or Debug object */

View file

@ -478,6 +478,9 @@ AcpiDsEvalRegionOperands (
ObjDesc, ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
ObjDesc->Region.Length));
Status = AcpiUtAddAddressRange (ObjDesc->Region.SpaceId,
ObjDesc->Region.Address, ObjDesc->Region.Length, Node);
/* Now the address and length are valid for this opregion */
ObjDesc->Region.Flags |= AOPOBJ_DATA_VALID;

View file

@ -200,6 +200,32 @@ AcpiDsBuildInternalPackageObj (
{
if (Arg->Common.AmlOpcode == AML_INT_RETURN_VALUE_OP)
{
if (!Arg->Common.Node)
{
/*
* This is the case where an expression has returned a value.
* The use of expressions (TermArgs) within individual
* package elements is not supported by the AML interpreter,
* even though the ASL grammar supports it. Example:
*
* Name (INT1, 0x1234)
*
* Name (PKG3, Package () {
* Add (INT1, 0xAAAA0000)
* })
*
* 1) No known AML interpreter supports this type of construct
* 2) This fixes a fault if the construct is encountered
*/
ACPI_EXCEPTION ((AE_INFO, AE_SUPPORT,
"Expressions within package elements are not supported"));
/* Cleanup the return object, it is not needed */
AcpiUtRemoveReference (WalkState->Results->Results.ObjDesc[0]);
return_ACPI_STATUS (AE_SUPPORT);
}
if (Arg->Common.Node->Type == ACPI_TYPE_METHOD)
{
/*

View file

@ -101,7 +101,6 @@ AcpiDsClearImplicitReturn (
}
#ifndef ACPI_NO_METHOD_EXECUTION
/*******************************************************************************
*
* FUNCTION: AcpiDsDoImplicitReturn
@ -475,7 +474,6 @@ AcpiDsClearOperands (
WalkState->NumOperands = 0;
return_VOID;
}
#endif
/*******************************************************************************

View file

@ -113,12 +113,10 @@ AcpiDsInitCallbacks (
/* Execution pass */
#ifndef ACPI_NO_METHOD_EXECUTION
WalkState->ParseFlags |= ACPI_PARSE_EXECUTE |
ACPI_PARSE_DELETE_TREE;
WalkState->DescendingCallback = AcpiDsExecBeginOp;
WalkState->AscendingCallback = AcpiDsExecEndOp;
#endif
break;
default:
@ -409,7 +407,7 @@ AcpiDsLoad1BeginOp (
/* Initialize the op */
#if (defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY))
#ifdef ACPI_CONSTANT_EVAL_ONLY
Op->Named.Path = Path;
#endif
@ -472,7 +470,6 @@ AcpiDsLoad1EndOp (
ObjectType = WalkState->OpInfo->ObjectType;
#ifndef ACPI_NO_METHOD_EXECUTION
if (WalkState->OpInfo->Flags & AML_FIELD)
{
/*
@ -518,7 +515,6 @@ AcpiDsLoad1EndOp (
}
}
}
#endif
if (Op->Common.AmlOpcode == AML_NAME_OP)
{

View file

@ -340,6 +340,15 @@ AcpiDsLoad2BeginOp (
}
#endif
/*
* For name creation opcodes, the full namepath prefix must
* exist, except for the final (new) nameseg.
*/
if (WalkState->OpInfo->Flags & AML_NAMED)
{
Flags |= ACPI_NS_PREFIX_MUST_EXIST;
}
/* Add new entry or lookup existing entry */
Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, ObjectType,
@ -412,10 +421,8 @@ AcpiDsLoad2EndOp (
ACPI_NAMESPACE_NODE *Node;
ACPI_PARSE_OBJECT *Arg;
ACPI_NAMESPACE_NODE *NewNode;
#ifndef ACPI_NO_METHOD_EXECUTION
UINT32 i;
UINT8 RegionSpace;
#endif
ACPI_FUNCTION_TRACE (DsLoad2EndOp);
@ -505,7 +512,6 @@ AcpiDsLoad2EndOp (
switch (WalkState->OpInfo->Type)
{
#ifndef ACPI_NO_METHOD_EXECUTION
case AML_TYPE_CREATE_FIELD:
/*
@ -601,13 +607,11 @@ AcpiDsLoad2EndOp (
}
break;
#endif /* ACPI_NO_METHOD_EXECUTION */
case AML_TYPE_NAMED_COMPLEX:
switch (Op->Common.AmlOpcode)
{
#ifndef ACPI_NO_METHOD_EXECUTION
case AML_REGION_OP:
case AML_DATA_REGION_OP:
@ -692,7 +696,6 @@ AcpiDsLoad2EndOp (
}
break;
#endif /* ACPI_NO_METHOD_EXECUTION */
default:

View file

@ -625,7 +625,7 @@ AcpiDsCreateWalkState (
/* Init the method args/local */
#if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY))
#ifndef ACPI_CONSTANT_EVAL_ONLY
AcpiDsMethodDataInit (WalkState);
#endif

View file

@ -388,7 +388,7 @@ AcpiExConvertToAscii (
/* HexLength: 2 ascii hex chars per data byte */
HexLength = ACPI_MUL_2 (DataWidth);
HexLength = (DataWidth * 2);
for (i = 0, j = (HexLength-1); i < HexLength; i++, j--)
{
/* Get one hex digit, most significant digits first */
@ -431,7 +431,8 @@ AcpiExConvertToAscii (
*
* RETURN: Status
*
* DESCRIPTION: Convert an ACPI Object to a string
* DESCRIPTION: Convert an ACPI Object to a string. Supports both implicit
* and explicit conversions and related rules.
*
******************************************************************************/
@ -466,9 +467,11 @@ AcpiExConvertToString (
switch (Type)
{
case ACPI_EXPLICIT_CONVERT_DECIMAL:
/* Make room for maximum decimal number */
/*
* From ToDecimalString, integer source.
*
* Make room for the maximum decimal number size
*/
StringLength = ACPI_MAX_DECIMAL_DIGITS;
Base = 10;
break;
@ -512,8 +515,10 @@ AcpiExConvertToString (
{
case ACPI_EXPLICIT_CONVERT_DECIMAL: /* Used by ToDecimalString */
/*
* From ACPI: "If Data is a buffer, it is converted to a string of
* decimal values separated by commas."
* Explicit conversion from the ToDecimalString ASL operator.
*
* From ACPI: "If the input is a buffer, it is converted to a
* a string of decimal values separated by commas."
*/
Base = 10;
@ -540,20 +545,29 @@ AcpiExConvertToString (
case ACPI_IMPLICIT_CONVERT_HEX:
/*
* Implicit buffer-to-string conversion
*
* From the ACPI spec:
*"The entire contents of the buffer are converted to a string of
* "The entire contents of the buffer are converted to a string of
* two-character hexadecimal numbers, each separated by a space."
*
* Each hex number is prefixed with 0x (11/2018)
*/
Separator = ' ';
StringLength = (ObjDesc->Buffer.Length * 3);
StringLength = (ObjDesc->Buffer.Length * 5);
break;
case ACPI_EXPLICIT_CONVERT_HEX: /* Used by ToHexString */
case ACPI_EXPLICIT_CONVERT_HEX:
/*
* Explicit conversion from the ToHexString ASL operator.
*
* From ACPI: "If Data is a buffer, it is converted to a string of
* hexadecimal values separated by commas."
*
* Each hex number is prefixed with 0x (11/2018)
*/
StringLength = (ObjDesc->Buffer.Length * 3);
Separator = ',';
StringLength = (ObjDesc->Buffer.Length * 5);
break;
default:
@ -584,9 +598,20 @@ AcpiExConvertToString (
*/
for (i = 0; i < ObjDesc->Buffer.Length; i++)
{
if (Base == 16)
{
/* Emit 0x prefix for explict/implicit hex conversion */
*NewBuf++ = '0';
*NewBuf++ = 'x';
}
NewBuf += AcpiExConvertToAscii (
(UINT64) ObjDesc->Buffer.Pointer[i], Base, NewBuf, 1);
*NewBuf++ = Separator; /* each separated by a comma or space */
/* Each digit is separated by either a comma or space */
*NewBuf++ = Separator;
}
/*

View file

@ -52,7 +52,6 @@
ACPI_MODULE_NAME ("excreate")
#ifndef ACPI_NO_METHOD_EXECUTION
/*******************************************************************************
*
* FUNCTION: AcpiExCreateAlias
@ -464,7 +463,6 @@ AcpiExCreatePowerResource (
AcpiUtRemoveReference (ObjDesc);
return_ACPI_STATUS (Status);
}
#endif
/*******************************************************************************

View file

@ -352,9 +352,9 @@ AcpiExOpcode_2A_1T_1R (
* NOTE: A length of zero is ok, and will create a zero-length, null
* terminated string.
*/
while ((Length < Operand[0]->Buffer.Length) &&
(Length < Operand[1]->Integer.Value) &&
(Operand[0]->Buffer.Pointer[Length]))
while ((Length < Operand[0]->Buffer.Length) && /* Length of input buffer */
(Length < Operand[1]->Integer.Value) && /* Length operand */
(Operand[0]->Buffer.Pointer[Length])) /* Null terminator */
{
Length++;
}

View file

@ -337,14 +337,12 @@ AcpiExWriteSerialBus (
case ACPI_ADR_SPACE_SMBUS:
BufferLength = ACPI_SMBUS_BUFFER_SIZE;
DataLength = ACPI_SMBUS_DATA_SIZE;
Function = ACPI_WRITE | (ObjDesc->Field.Attribute << 16);
break;
case ACPI_ADR_SPACE_IPMI:
BufferLength = ACPI_IPMI_BUFFER_SIZE;
DataLength = ACPI_IPMI_DATA_SIZE;
Function = ACPI_WRITE;
break;
@ -363,7 +361,6 @@ AcpiExWriteSerialBus (
/* Add header length to get the full size of the buffer */
BufferLength += ACPI_SERIAL_HEADER_SIZE;
DataLength = SourceDesc->Buffer.Pointer[1];
Function = ACPI_WRITE | (AccessorType << 16);
break;
@ -371,21 +368,6 @@ AcpiExWriteSerialBus (
return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
}
#if 0
OBSOLETE?
/* Check for possible buffer overflow */
if (DataLength > SourceDesc->Buffer.Length)
{
ACPI_ERROR ((AE_INFO,
"Length in buffer header (%u)(%u) is greater than "
"the physical buffer length (%u) and will overflow",
DataLength, BufferLength, SourceDesc->Buffer.Length));
return_ACPI_STATUS (AE_AML_BUFFER_LIMIT);
}
#endif
/* Create the transfer/bidirectional/return buffer */
BufferDesc = AcpiUtCreateBufferObject (BufferLength);
@ -397,6 +379,8 @@ OBSOLETE?
/* Copy the input buffer data to the transfer buffer */
Buffer = BufferDesc->Buffer.Pointer;
DataLength = (BufferLength < SourceDesc->Buffer.Length ?
BufferLength : SourceDesc->Buffer.Length);
memcpy (Buffer, SourceDesc->Buffer.Pointer, DataLength);
/* Lock entire transaction if requested */

View file

@ -73,7 +73,6 @@ AcpiExDigitsNeeded (
UINT32 Base);
#ifndef ACPI_NO_METHOD_EXECUTION
/*******************************************************************************
*
* FUNCTION: AcpiExEnterInterpreter
@ -507,4 +506,3 @@ AcpiIsValidSpaceId (
return (TRUE);
}
#endif

View file

@ -453,6 +453,8 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaServer[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm211[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm23[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm23a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoUefi[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc0[];

View file

@ -209,11 +209,7 @@ ACPI_GLOBAL (BOOLEAN, AcpiGbl_DisableMemTracking);
*
****************************************************************************/
#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
#define NUM_PREDEFINED_NAMES 10
#else
#define NUM_PREDEFINED_NAMES 9
#endif
ACPI_GLOBAL (ACPI_NAMESPACE_NODE, AcpiGbl_RootNodeStruct);
ACPI_GLOBAL (ACPI_NAMESPACE_NODE *, AcpiGbl_RootNode);

View file

@ -69,6 +69,7 @@
#define ACPI_NS_TEMPORARY 0x0040
#define ACPI_NS_OVERRIDE_IF_FOUND 0x0080
#define ACPI_NS_EARLY_INIT 0x0100
#define ACPI_NS_PREFIX_MUST_EXIST 0x0200
/* Flags for AcpiNsWalkNamespace */

View file

@ -108,7 +108,8 @@
#define ACPI_LV_RESOURCES 0x00010000
#define ACPI_LV_USER_REQUESTS 0x00020000
#define ACPI_LV_PACKAGE 0x00040000
#define ACPI_LV_VERBOSITY1 0x0007FF40 | ACPI_LV_ALL_EXCEPTIONS
#define ACPI_LV_EVALUATION 0x00080000
#define ACPI_LV_VERBOSITY1 0x000FFF40 | ACPI_LV_ALL_EXCEPTIONS
/* Trace verbosity level 2 [Function tracing and memory allocation] */
@ -177,6 +178,7 @@
#define ACPI_DB_INTERRUPTS ACPI_DEBUG_LEVEL (ACPI_LV_INTERRUPTS)
#define ACPI_DB_USER_REQUESTS ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS)
#define ACPI_DB_PACKAGE ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE)
#define ACPI_DB_EVALUATION ACPI_DEBUG_LEVEL (ACPI_LV_EVALUATION)
#define ACPI_DB_MUTEX ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX)
#define ACPI_DB_EVENTS ACPI_DEBUG_LEVEL (ACPI_LV_EVENTS)
@ -184,7 +186,7 @@
/* Defaults for DebugLevel, debug and normal */
#define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_REPAIR)
#define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_EVALUATION | ACPI_LV_REPAIR)
#define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT | ACPI_LV_REPAIR)
#define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL)

View file

@ -46,7 +46,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20181003
#define ACPI_CA_VERSION 0x20181213
#include "acconfig.h"
#include "actypes.h"
@ -192,13 +192,6 @@ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CopyDsdtLocally, FALSE);
*/
ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DoNotUseXsdt, FALSE);
/*
* Optionally support group module level code.
* NOTE, this is essentially obsolete and will be removed soon
* (01/2018).
*/
ACPI_INIT_GLOBAL (UINT8, AcpiGbl_GroupModuleLevelCode, FALSE);
/*
* Optionally support module level code by parsing an entire table as
* a method as it is loaded. Default is TRUE.

View file

@ -97,6 +97,8 @@ typedef struct acpi_walk_state
ACPI_PARSE_STATE ParserState; /* Current state of parser */
UINT32 PrevArgTypes;
UINT32 ArgCount; /* push for fixed or var args */
UINT16 MethodNestingDepth;
UINT8 MethodIsNested;
struct acpi_namespace_node Arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */
struct acpi_namespace_node LocalVariables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
@ -111,7 +113,8 @@ typedef struct acpi_walk_state
struct acpi_namespace_node *MethodCallNode; /* Called method Node*/
ACPI_PARSE_OBJECT *MethodCallOp; /* MethodCall Op if running a method */
union acpi_operand_object *MethodDesc; /* Method descriptor if running a method */
struct acpi_namespace_node *MethodNode; /* Method node if running a method. */
struct acpi_namespace_node *MethodNode; /* Method node if running a method */
char *MethodPathname; /* Full pathname of running method */
ACPI_PARSE_OBJECT *Op; /* Current parser op */
const ACPI_OPCODE_INFO *OpInfo; /* Info on current opcode */
ACPI_PARSE_OBJECT *Origin; /* Start of walk [Obsolete] */

View file

@ -86,6 +86,7 @@
#define ACPI_STAO_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_STAO,f)
#define ACPI_TCPA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_HDR,f)
#define ACPI_TPM2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM2,f)
#define ACPI_TPM23_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM23,f)
#define ACPI_UEFI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_UEFI,f)
#define ACPI_WAET_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WAET,f)
#define ACPI_WDAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDAT,f)
@ -229,6 +230,7 @@
#define ACPI_TCPA_SERVER_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_SERVER,f)
#define ACPI_TPM2A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TPM2_TRAILER,f)
#define ACPI_TPM211_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TPM2_ARM_SMC,f)
#define ACPI_TPM23A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TPM23_TRAILER,f)
#define ACPI_VRTC0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VRTC_ENTRY,f)
#define ACPI_WDAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WDAT_ENTRY,f)

View file

@ -74,6 +74,7 @@
#define ACPI_SIG_XSDT "XSDT" /* Extended System Description Table */
#define ACPI_SIG_SSDT "SSDT" /* Secondary System Description Table */
#define ACPI_RSDP_NAME "RSDP" /* Short name for RSDP, not signature */
#define ACPI_OEM_NAME "OEM" /* Short name for OEM, not signature */
/*

View file

@ -444,6 +444,34 @@ typedef struct acpi_table_tcpa_server
*
******************************************************************************/
/* Revision 3 */
typedef struct acpi_table_tpm23
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT32 Reserved;
UINT64 ControlAddress;
UINT32 StartMethod;
} ACPI_TABLE_TPM23;
/* Value for StartMethod above */
#define ACPI_TPM23_ACPI_START_METHOD 2
/*
* Optional trailer for revision 3. If start method is 2, there is a 4 byte
* reserved area of all zeros.
*/
typedef struct acpi_tmp23_trailer
{
UINT32 Reserved;
} ACPI_TPM23_TRAILER;
/* Revision 4 */
typedef struct acpi_table_tpm2
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */

View file

@ -570,6 +570,10 @@ typedef UINT64 ACPI_INTEGER;
#define ACPI_VALIDATE_RSDP_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_SIG_RSDP, 8))
#define ACPI_MAKE_RSDP_SIG(dest) (memcpy (ACPI_CAST_PTR (char, (dest)), ACPI_SIG_RSDP, 8))
/* Support for OEMx signature (x can be any character) */
#define ACPI_IS_OEM_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_OEM_NAME, 3) &&\
strnlen (a, ACPI_NAME_SIZE) == ACPI_NAME_SIZE)
/*
* Algorithm to obtain access bit width.
* Can be used with AccessWidth of ACPI_GENERIC_ADDRESS and AccessSize of
@ -1404,6 +1408,8 @@ typedef enum
#define ACPI_OSI_WIN_10_RS1 0x0E
#define ACPI_OSI_WIN_10_RS2 0x0F
#define ACPI_OSI_WIN_10_RS3 0x10
#define ACPI_OSI_WIN_10_RS4 0x11
#define ACPI_OSI_WIN_10_RS5 0x12
/* Definitions of getopt */

View file

@ -313,6 +313,7 @@ AcpiNsLookup (
ACPI_OBJECT_TYPE ThisSearchType;
UINT32 SearchParentFlag = ACPI_NS_SEARCH_PARENT;
UINT32 LocalFlags;
ACPI_INTERPRETER_MODE LocalInterpreterMode;
ACPI_FUNCTION_TRACE (NsLookup);
@ -562,6 +563,7 @@ AcpiNsLookup (
*/
ThisSearchType = ACPI_TYPE_ANY;
CurrentNode = ThisNode;
while (NumSegments && CurrentNode)
{
NumSegments--;
@ -596,6 +598,16 @@ AcpiNsLookup (
}
}
/* Handle opcodes that create a new NameSeg via a full NamePath */
LocalInterpreterMode = InterpreterMode;
if ((Flags & ACPI_NS_PREFIX_MUST_EXIST) && (NumSegments > 0))
{
/* Every element of the path must exist (except for the final NameSeg) */
LocalInterpreterMode = ACPI_IMODE_EXECUTE;
}
/* Extract one ACPI name from the front of the pathname */
ACPI_MOVE_32_TO_32 (&SimpleName, Path);
@ -603,11 +615,18 @@ AcpiNsLookup (
/* Try to find the single (4 character) ACPI name */
Status = AcpiNsSearchAndEnter (SimpleName, WalkState, CurrentNode,
InterpreterMode, ThisSearchType, LocalFlags, &ThisNode);
LocalInterpreterMode, ThisSearchType, LocalFlags, &ThisNode);
if (ACPI_FAILURE (Status))
{
if (Status == AE_NOT_FOUND)
{
#if !defined ACPI_ASL_COMPILER /* Note: iASL reports this error by itself, not needed here */
if (Flags & ACPI_NS_PREFIX_MUST_EXIST)
{
AcpiOsPrintf (ACPI_MSG_BIOS_ERROR
"Object does not exist: %4.4s\n", &SimpleName);
}
#endif
/* Name not found in ACPI namespace */
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,

View file

@ -150,6 +150,12 @@ AcpiNsEvaluate (
return_ACPI_STATUS (AE_NO_MEMORY);
}
/* Optional object evaluation log */
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EVALUATION,
"%-26s: %s (%s)\n", " Enter evaluation",
&Info->FullPathname[1], AcpiUtGetTypeName (Info->Node->Type)));
/* Count the number of arguments being passed in */
Info->ParamCount = 0;
@ -336,6 +342,12 @@ AcpiNsEvaluate (
Info->RelativePathname));
Cleanup:
/* Optional object evaluation log */
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EVALUATION,
"%-26s: %s\n", " Exit evaluation",
&Info->FullPathname[1]));
/*
* Namespace was unlocked by the handling AcpiNs* function, so we
* just free the pathname and return

View file

@ -65,7 +65,6 @@ AcpiNsDeleteSubtree (
#endif
#ifndef ACPI_NO_METHOD_EXECUTION
/*******************************************************************************
*
* FUNCTION: AcpiNsLoadTable
@ -369,4 +368,3 @@ AcpiNsUnloadNamespace (
return_ACPI_STATUS (Status);
}
#endif
#endif

View file

@ -153,8 +153,18 @@ AcpiNsExecuteTable (
goto Cleanup;
}
/* Optional object evaluation log */
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EVALUATION,
"%-26s: (Definition Block level)\n", "Module-level evaluation"));
Status = AcpiPsExecuteTable (Info);
/* Optional object evaluation log */
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EVALUATION,
"%-26s: (Definition Block level)\n", "Module-level complete"));
Cleanup:
if (Info)
{

View file

@ -190,7 +190,7 @@ AcpiPsGetArguments (
* future. Use of this option can cause problems with AML code that
* depends upon in-order immediate execution of module-level code.
*/
if (AcpiGbl_GroupModuleLevelCode &&
if (!AcpiGbl_ExecuteTablesAsMethods &&
(WalkState->PassNumber <= ACPI_IMODE_LOAD_PASS2) &&
((WalkState->ParseFlags & ACPI_PARSE_DISASSEMBLE) == 0))
{
@ -458,6 +458,7 @@ AcpiPsParseLoop (
ACPI_PARSE_OBJECT *Op = NULL; /* current op */
ACPI_PARSE_STATE *ParserState;
UINT8 *AmlOpStart = NULL;
UINT8 OpcodeLength;
ACPI_FUNCTION_TRACE_PTR (PsParseLoop, WalkState);
@ -471,7 +472,7 @@ AcpiPsParseLoop (
ParserState = &WalkState->ParserState;
WalkState->ArgTypes = 0;
#if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY))
#ifndef ACPI_CONSTANT_EVAL_ONLY
if (WalkState->WalkType & ACPI_WALK_METHOD_RESTART)
{
@ -546,7 +547,7 @@ AcpiPsParseLoop (
* status to AE_OK to proceed with the table load.
*/
if ((WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL) &&
Status == AE_ALREADY_EXISTS)
((Status == AE_ALREADY_EXISTS) || (Status == AE_NOT_FOUND)))
{
Status = AE_OK;
}
@ -578,9 +579,20 @@ AcpiPsParseLoop (
* the scope op because the parse failure indicates that
* the device may not exist.
*/
ACPI_ERROR ((AE_INFO, "Skip parsing opcode %s",
AcpiPsGetOpcodeName (WalkState->Opcode)));
WalkState->ParserState.Aml = WalkState->Aml + 1;
ACPI_INFO (("Skipping parse of AML opcode: %s (0x%4.4X)",
AcpiPsGetOpcodeName (WalkState->Opcode), WalkState->Opcode));
/*
* Determine the opcode length before skipping the opcode.
* An opcode can be 1 byte or 2 bytes in length.
*/
OpcodeLength = 1;
if ((WalkState->Opcode & 0xFF00) == AML_EXTENDED_OPCODE)
{
OpcodeLength = 2;
}
WalkState->ParserState.Aml = WalkState->Aml + OpcodeLength;
WalkState->ParserState.Aml =
AcpiPsGetNextPackageEnd(&WalkState->ParserState);
WalkState->Aml = WalkState->ParserState.Aml;

View file

@ -665,7 +665,7 @@ AcpiPsCompleteOp (
* because there could be correct AML beyond the parts that caused
* the runtime error.
*/
ACPI_ERROR ((AE_INFO, "Ignore error and continue table load"));
ACPI_INFO (("Ignoring error and continuing table load"));
return_ACPI_STATUS (AE_OK);
}
return_ACPI_STATUS (Status);

View file

@ -529,6 +529,18 @@ AcpiPsParseAml (
"Completed one call to walk loop, %s State=%p\n",
AcpiFormatException (Status), WalkState));
if (WalkState->MethodPathname && WalkState->MethodIsNested)
{
/* Optional object evaluation log */
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EVALUATION, "%-26s: %*s%s\n",
" Exit nested method",
(WalkState->MethodNestingDepth + 1) * 3, " ",
&WalkState->MethodPathname[1]));
ACPI_FREE (WalkState->MethodPathname);
WalkState->MethodIsNested = FALSE;
}
if (Status == AE_CTRL_TRANSFER)
{
/*

View file

@ -199,6 +199,9 @@ AcpiPsExecuteMethod (
goto Cleanup;
}
WalkState->MethodPathname = Info->FullPathname;
WalkState->MethodIsNested = FALSE;
if (Info->ObjDesc->Method.InfoFlags & ACPI_METHOD_MODULE_LEVEL)
{
WalkState->ParseFlags |= ACPI_PARSE_MODULE_LEVEL;
@ -329,6 +332,9 @@ AcpiPsExecuteTable (
goto Cleanup;
}
WalkState->MethodPathname = Info->FullPathname;
WalkState->MethodIsNested = FALSE;
if (Info->ObjDesc->Method.InfoFlags & ACPI_METHOD_MODULE_LEVEL)
{
WalkState->ParseFlags |= ACPI_PARSE_MODULE_LEVEL;

View file

@ -111,7 +111,7 @@ AcpiLoadTables (
"While loading namespace from ACPI tables"));
}
if (AcpiGbl_ExecuteTablesAsMethods || !AcpiGbl_GroupModuleLevelCode)
if (AcpiGbl_ExecuteTablesAsMethods)
{
/*
* If the module-level code support is enabled, initialize the objects

View file

@ -127,10 +127,7 @@ const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] =
{"_REV", ACPI_TYPE_INTEGER, ACPI_CAST_PTR (char, 2)},
{"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME},
{"_GL_", ACPI_TYPE_MUTEX, ACPI_CAST_PTR (char, 1)},
#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
{"_OSI", ACPI_TYPE_METHOD, ACPI_CAST_PTR (char, 1)},
#endif
/* Table terminator */

View file

@ -109,7 +109,8 @@ AcpiUtIsAmlTable (
if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT) ||
ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_PSDT) ||
ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_SSDT) ||
ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_OSDT))
ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_OSDT) ||
ACPI_IS_OEM_SIG (Table->Signature))
{
return (TRUE);
}

View file

@ -109,6 +109,8 @@ static ACPI_INTERFACE_INFO AcpiDefaultSupportedInterfaces[] =
{"Windows 2016", NULL, 0, ACPI_OSI_WIN_10_RS1}, /* Windows 10 version 1607 - Added 12/2017 */
{"Windows 2017", NULL, 0, ACPI_OSI_WIN_10_RS2}, /* Windows 10 version 1703 - Added 12/2017 */
{"Windows 2017.2", NULL, 0, ACPI_OSI_WIN_10_RS3}, /* Windows 10 version 1709 - Added 02/2018 */
{"Windows 2018", NULL, 0, ACPI_OSI_WIN_10_RS4}, /* Windows 10 version 1803 - Added 11/2018 */
{"Windows 2018.2", NULL, 0, ACPI_OSI_WIN_10_RS5}, /* Windows 10 version 1809 - Added 11/2018 */
/* Feature Group Strings */