Import ACPICA 20160930.
This commit is contained in:
parent
be99e84498
commit
7600ac2283
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor-sys/acpica/dist/; revision=306523 svn path=/vendor-sys/acpica/20160930/; revision=306524; tag=vendor/acpica/20160930
79
changes.txt
79
changes.txt
@ -1,3 +1,82 @@
|
|||||||
|
----------------------------------------
|
||||||
|
30 September 2016. Summary of changes for version 20160930:
|
||||||
|
|
||||||
|
|
||||||
|
1) ACPICA kernel-resident subsystem:
|
||||||
|
|
||||||
|
Fixed a regression in the internal AcpiTbFindTable function where a non
|
||||||
|
AE_OK exception could inadvertently be returned even if the function did
|
||||||
|
not fail. This problem affects the following operators:
|
||||||
|
DataTableRegion
|
||||||
|
LoadTable
|
||||||
|
|
||||||
|
Fixed a regression in the LoadTable operator where a load to any
|
||||||
|
namespace location other than the root no longer worked properly.
|
||||||
|
|
||||||
|
Increased the maximum loop count value that will result in the
|
||||||
|
AE_AML_INFINITE_LOOP exception. This is a mechanism that is intended to
|
||||||
|
prevent infinite loops within the AML interpreter and thus the host OS
|
||||||
|
kernel. The value is increased from 0xFFFF to 0xFFFFF loops (65,535 to
|
||||||
|
1,048,575).
|
||||||
|
|
||||||
|
Moved the AcpiGbl_MaxLoopIterations configuration variable to the public
|
||||||
|
acpixf.h file. This allows hosts to easily configure the maximum loop
|
||||||
|
count at runtime.
|
||||||
|
|
||||||
|
Removed an illegal character in the strtoul64.c file. This character
|
||||||
|
caused errors with some C compilers.
|
||||||
|
|
||||||
|
Example Code and Data Size: These are the sizes for the OS-independent
|
||||||
|
acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The
|
||||||
|
debug version of the code includes the debug output trace mechanism and
|
||||||
|
has a much larger code and data size.
|
||||||
|
|
||||||
|
Current Release:
|
||||||
|
Non-Debug Version: 140.4K Code, 58.1K Data, 198.5K Total
|
||||||
|
Debug Version: 200.7K Code, 82.1K Data, 282.8K Total
|
||||||
|
Previous Release:
|
||||||
|
Non-Debug Version: 140.0K Code, 58.1K Data, 198.1K Total
|
||||||
|
Debug Version: 200.3K Code, 82.1K Data, 282.4K Total
|
||||||
|
|
||||||
|
|
||||||
|
2) iASL Compiler/Disassembler and Tools:
|
||||||
|
|
||||||
|
Disassembler: Fixed a problem with the conversion of Else{If{ blocks into
|
||||||
|
the simpler ASL ElseIf keyword. During the conversion, a trailing If
|
||||||
|
block could be lost and missing from the disassembled output.
|
||||||
|
|
||||||
|
iASL: Fixed a missing parser rule for the ObjectType operator. For ASL+,
|
||||||
|
the missing rule caused a parse error when using the Index operator as an
|
||||||
|
operand to ObjectType. This construct now compiles properly. Example:
|
||||||
|
ObjectType(PKG1[4]).
|
||||||
|
|
||||||
|
iASL: Correctly handle unresolved symbols in the hardware map file (-lm
|
||||||
|
option). Previously, unresolved symbols could cause a protection fault.
|
||||||
|
Such symbols are now marked as unresolved in the map file.
|
||||||
|
|
||||||
|
iASL: Implemented support to allow control method invocations as an
|
||||||
|
operand to the ASL DeRefOf operator. Example:
|
||||||
|
DeRefOf(MTH1(Local0))
|
||||||
|
|
||||||
|
Disassembler: Improved support for the ToPLD ASL macro. Detection of a
|
||||||
|
possible _PLD buffer now includes examination of both the normal buffer
|
||||||
|
length (16 or 20) as well as the surrounding AML package length.
|
||||||
|
|
||||||
|
Disassembler: Fixed a problem with the decoding of complex expressions
|
||||||
|
within the Divide operator for ASL+. For the case where both the quotient
|
||||||
|
and remainder targets are specified, the entire statement cannot be
|
||||||
|
disassembled. Previously, the output incorrectly contained a mix of ASL-
|
||||||
|
and ASL+ operators. This mixed statement causes a syntax error when
|
||||||
|
compiled. Example:
|
||||||
|
Divide (Add (INT1, 6), 128, RSLT, QUOT) // was incorrectly
|
||||||
|
disassembled to:
|
||||||
|
Divide (INT1 + 6, 128, RSLT, QUOT)
|
||||||
|
|
||||||
|
iASL/Tools: Added support to process AML and non-AML ACPI tables
|
||||||
|
consistently. For the disassembler and AcpiExec, allow all types of ACPI
|
||||||
|
tables (AML and data tables). For the iASL -e option, allow only AML
|
||||||
|
tables (DSDT/SSDT).
|
||||||
|
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
31 August 2016. Summary of changes for version 20160831:
|
31 August 2016. Summary of changes for version 20160831:
|
||||||
|
|
||||||
|
@ -262,12 +262,14 @@ AcGetOneTableFromFile (
|
|||||||
return (Status);
|
return (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (GetOnlyAmlTables)
|
if (GetOnlyAmlTables)
|
||||||
{
|
{
|
||||||
/* Table must be an AML table (DSDT/SSDT) or FADT */
|
/*
|
||||||
|
* Table must be an AML table (DSDT/SSDT).
|
||||||
if (!ACPI_COMPARE_NAME (TableHeader.Signature, ACPI_SIG_FADT) &&
|
* Used for iASL -e option only.
|
||||||
!AcpiUtIsAmlTable (&TableHeader))
|
*/
|
||||||
|
if (!AcpiUtIsAmlTable (&TableHeader))
|
||||||
{
|
{
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
" %s: Table [%4.4s] is not an AML table - ignoring\n",
|
" %s: Table [%4.4s] is not an AML table - ignoring\n",
|
||||||
|
@ -80,6 +80,12 @@ MpGetHidFromParseTree (
|
|||||||
|
|
||||||
|
|
||||||
Op = HidNode->Op;
|
Op = HidNode->Op;
|
||||||
|
if (!Op)
|
||||||
|
{
|
||||||
|
/* Object is not resolved, probably an External */
|
||||||
|
|
||||||
|
return ("Unresolved Symbol - referenced but not defined in this table");
|
||||||
|
}
|
||||||
|
|
||||||
switch (Op->Asl.ParseOpcode)
|
switch (Op->Asl.ParseOpcode)
|
||||||
{
|
{
|
||||||
|
@ -351,6 +351,20 @@ OpnDoFieldCommon (
|
|||||||
NewBitOffset = (UINT32) PkgLengthNode->Asl.Value.Integer;
|
NewBitOffset = (UINT32) PkgLengthNode->Asl.Value.Integer;
|
||||||
CurrentBitOffset += NewBitOffset;
|
CurrentBitOffset += NewBitOffset;
|
||||||
|
|
||||||
|
if ((NewBitOffset == 0) &&
|
||||||
|
(Next->Asl.ParseOpcode == PARSEOP_RESERVED_BYTES))
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Unnamed field with a bit length of zero. We can
|
||||||
|
* safely just ignore this. However, we will not ignore
|
||||||
|
* a named field of zero length, we don't want to just
|
||||||
|
* toss out a name.
|
||||||
|
*/
|
||||||
|
Next->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
|
||||||
|
PkgLengthNode->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* Save the current AccessAs value for error checking later */
|
/* Save the current AccessAs value for error checking later */
|
||||||
|
|
||||||
switch (AccessType)
|
switch (AccessType)
|
||||||
|
@ -561,6 +561,13 @@ AslDoOptions (
|
|||||||
Gbl_CompileTimesFlag = TRUE;
|
Gbl_CompileTimesFlag = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'd':
|
||||||
|
|
||||||
|
/* Disable disassembler code optimizations */
|
||||||
|
|
||||||
|
AcpiGbl_DoDisassemblerOptimizations = FALSE;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'e':
|
case 'e':
|
||||||
|
|
||||||
/* iASL: Disable External opcode generation */
|
/* iASL: Disable External opcode generation */
|
||||||
|
@ -530,7 +530,7 @@ ObjectTypeName
|
|||||||
| RefOfTerm {}
|
| RefOfTerm {}
|
||||||
| DerefOfTerm {}
|
| DerefOfTerm {}
|
||||||
| IndexTerm {}
|
| IndexTerm {}
|
||||||
|
| IndexExpTerm {}
|
||||||
/* | MethodInvocationTerm {} */ /* Caused reduce/reduce with Type6Opcode->MethodInvocationTerm */
|
/* | MethodInvocationTerm {} */ /* Caused reduce/reduce with Type6Opcode->MethodInvocationTerm */
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -826,16 +826,18 @@ XfNamespaceLocateBegin (
|
|||||||
/*
|
/*
|
||||||
* A reference to a method within one of these opcodes is not an
|
* A reference to a method within one of these opcodes is not an
|
||||||
* invocation of the method, it is simply a reference to the method.
|
* invocation of the method, it is simply a reference to the method.
|
||||||
|
*
|
||||||
|
* September 2016: Removed DeRefOf from this list
|
||||||
*/
|
*/
|
||||||
if ((Op->Asl.Parent) &&
|
if ((Op->Asl.Parent) &&
|
||||||
((Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_REFOF) ||
|
((Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_REFOF) ||
|
||||||
(Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_DEREFOF) ||
|
|
||||||
(Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_PACKAGE) ||
|
(Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_PACKAGE) ||
|
||||||
(Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_VAR_PACKAGE)||
|
(Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_VAR_PACKAGE)||
|
||||||
(Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_OBJECTTYPE)))
|
(Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_OBJECTTYPE)))
|
||||||
{
|
{
|
||||||
return_ACPI_STATUS (AE_OK);
|
return_ACPI_STATUS (AE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* There are two types of method invocation:
|
* There are two types of method invocation:
|
||||||
* 1) Invocation with arguments -- the parser recognizes this
|
* 1) Invocation with arguments -- the parser recognizes this
|
||||||
|
@ -529,7 +529,8 @@ AcpiDmIsStringBuffer (
|
|||||||
*
|
*
|
||||||
* PARAMETERS: Op - Buffer Object to be examined
|
* PARAMETERS: Op - Buffer Object to be examined
|
||||||
*
|
*
|
||||||
* RETURN: TRUE if buffer contains a ASCII string, FALSE otherwise
|
* RETURN: TRUE if buffer appears to contain data produced via the
|
||||||
|
* ToPLD macro, FALSE otherwise
|
||||||
*
|
*
|
||||||
* DESCRIPTION: Determine if a buffer Op contains a _PLD structure
|
* DESCRIPTION: Determine if a buffer Op contains a _PLD structure
|
||||||
*
|
*
|
||||||
@ -541,12 +542,60 @@ AcpiDmIsPldBuffer (
|
|||||||
{
|
{
|
||||||
ACPI_NAMESPACE_NODE *Node;
|
ACPI_NAMESPACE_NODE *Node;
|
||||||
ACPI_PARSE_OBJECT *SizeOp;
|
ACPI_PARSE_OBJECT *SizeOp;
|
||||||
|
ACPI_PARSE_OBJECT *ByteListOp;
|
||||||
ACPI_PARSE_OBJECT *ParentOp;
|
ACPI_PARSE_OBJECT *ParentOp;
|
||||||
|
UINT64 BufferSize;
|
||||||
|
UINT64 InitializerSize;
|
||||||
|
|
||||||
|
|
||||||
/* Buffer size is the buffer argument */
|
/*
|
||||||
|
* Get the BufferSize argument - Buffer(BufferSize)
|
||||||
|
* If the buffer was generated by the ToPld macro, it must
|
||||||
|
* be a BYTE constant.
|
||||||
|
*/
|
||||||
SizeOp = Op->Common.Value.Arg;
|
SizeOp = Op->Common.Value.Arg;
|
||||||
|
if (SizeOp->Common.AmlOpcode != AML_BYTE_OP)
|
||||||
|
{
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Check the declared BufferSize, two possibilities */
|
||||||
|
|
||||||
|
BufferSize = SizeOp->Common.Value.Integer;
|
||||||
|
if ((BufferSize != ACPI_PLD_REV1_BUFFER_SIZE) &&
|
||||||
|
(BufferSize != ACPI_PLD_REV2_BUFFER_SIZE))
|
||||||
|
{
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check the initializer list length. This is the actual
|
||||||
|
* number of bytes in the buffer as counted by the AML parser.
|
||||||
|
* The declared BufferSize can be larger than the actual length.
|
||||||
|
* However, for the ToPLD macro, the BufferSize will be the same
|
||||||
|
* as the initializer list length.
|
||||||
|
*/
|
||||||
|
ByteListOp = SizeOp->Common.Next;
|
||||||
|
if (!ByteListOp)
|
||||||
|
{
|
||||||
|
return (FALSE); /* Zero-length buffer case */
|
||||||
|
}
|
||||||
|
|
||||||
|
InitializerSize = ByteListOp->Common.Value.Integer;
|
||||||
|
if ((InitializerSize != ACPI_PLD_REV1_BUFFER_SIZE) &&
|
||||||
|
(InitializerSize != ACPI_PLD_REV2_BUFFER_SIZE))
|
||||||
|
{
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Final size check */
|
||||||
|
|
||||||
|
if (BufferSize != InitializerSize)
|
||||||
|
{
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Now examine the buffer parent */
|
||||||
|
|
||||||
ParentOp = Op->Common.Parent;
|
ParentOp = Op->Common.Parent;
|
||||||
if (!ParentOp)
|
if (!ParentOp)
|
||||||
@ -571,8 +620,17 @@ AcpiDmIsPldBuffer (
|
|||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for proper form: Name(_PLD, Package() {Buffer() {}}) */
|
/*
|
||||||
|
* Check for proper form: Name(_PLD, Package() {ToPLD()})
|
||||||
|
*
|
||||||
|
* Note: All other forms such as
|
||||||
|
* Return (Package() {ToPLD()})
|
||||||
|
* Local0 = ToPLD()
|
||||||
|
* etc. are not converted back to the ToPLD macro, because
|
||||||
|
* there is really no deterministic way to disassemble the buffer
|
||||||
|
* back to the ToPLD macro, other than trying to find the "_PLD"
|
||||||
|
* name
|
||||||
|
*/
|
||||||
if (ParentOp->Common.AmlOpcode == AML_PACKAGE_OP)
|
if (ParentOp->Common.AmlOpcode == AML_PACKAGE_OP)
|
||||||
{
|
{
|
||||||
ParentOp = ParentOp->Common.Parent;
|
ParentOp = ParentOp->Common.Parent;
|
||||||
|
@ -98,6 +98,9 @@ AcpiDmCheckForSymbolicOpcode (
|
|||||||
ACPI_PARSE_OBJECT *Child1;
|
ACPI_PARSE_OBJECT *Child1;
|
||||||
ACPI_PARSE_OBJECT *Child2;
|
ACPI_PARSE_OBJECT *Child2;
|
||||||
ACPI_PARSE_OBJECT *Target;
|
ACPI_PARSE_OBJECT *Target;
|
||||||
|
ACPI_PARSE_OBJECT *GrandChild1;
|
||||||
|
ACPI_PARSE_OBJECT *GrandChild2;
|
||||||
|
ACPI_PARSE_OBJECT *GrandTarget = NULL;
|
||||||
|
|
||||||
|
|
||||||
/* Exit immediately if ASL+ not enabled */
|
/* Exit immediately if ASL+ not enabled */
|
||||||
@ -107,6 +110,14 @@ AcpiDmCheckForSymbolicOpcode (
|
|||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check for a non-ASL+ statement, propagate the flag */
|
||||||
|
|
||||||
|
if (Op->Common.Parent->Common.DisasmFlags & ACPI_PARSEOP_LEGACY_ASL_ONLY)
|
||||||
|
{
|
||||||
|
Op->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY;
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
/* Get the first operand */
|
/* Get the first operand */
|
||||||
|
|
||||||
Child1 = AcpiPsGetArg (Op, 0);
|
Child1 = AcpiPsGetArg (Op, 0);
|
||||||
@ -323,6 +334,7 @@ AcpiDmCheckForSymbolicOpcode (
|
|||||||
if (AcpiDmIsValidTarget (Target))
|
if (AcpiDmIsValidTarget (Target))
|
||||||
{
|
{
|
||||||
Child1->Common.OperatorSymbol = NULL;
|
Child1->Common.OperatorSymbol = NULL;
|
||||||
|
Op->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY;
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -339,6 +351,13 @@ AcpiDmCheckForSymbolicOpcode (
|
|||||||
|
|
||||||
if (!AcpiDmIsValidTarget (Target))
|
if (!AcpiDmIsValidTarget (Target))
|
||||||
{
|
{
|
||||||
|
if (Op->Common.Parent->Common.AmlOpcode == AML_STORE_OP)
|
||||||
|
{
|
||||||
|
Op->Common.DisasmFlags = 0;
|
||||||
|
Child1->Common.OperatorSymbol = NULL;
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
/* Not a valid target (placeholder only, from parser) */
|
/* Not a valid target (placeholder only, from parser) */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -478,6 +497,69 @@ AcpiDmCheckForSymbolicOpcode (
|
|||||||
/*
|
/*
|
||||||
* Target is the 2nd operand.
|
* Target is the 2nd operand.
|
||||||
* We know the target is valid, it is not optional.
|
* We know the target is valid, it is not optional.
|
||||||
|
*
|
||||||
|
* The following block implements "Ignore conversion if a store
|
||||||
|
* is followed by a math/bit operator that has no target". Used
|
||||||
|
* only for the ASL test suite.
|
||||||
|
*/
|
||||||
|
if (!AcpiGbl_DoDisassemblerOptimizations)
|
||||||
|
{
|
||||||
|
switch (Child1->Common.AmlOpcode)
|
||||||
|
{
|
||||||
|
/* This operator has two operands and two targets */
|
||||||
|
|
||||||
|
case AML_DIVIDE_OP:
|
||||||
|
|
||||||
|
GrandChild1 = Child1->Common.Value.Arg;
|
||||||
|
GrandChild2 = GrandChild1->Common.Next;
|
||||||
|
GrandTarget = GrandChild2->Common.Next;
|
||||||
|
|
||||||
|
if (GrandTarget && !AcpiDmIsValidTarget (GrandTarget))
|
||||||
|
{
|
||||||
|
Op->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY;
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
GrandTarget = GrandTarget->Common.Next;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AML_ADD_OP:
|
||||||
|
case AML_SUBTRACT_OP:
|
||||||
|
case AML_MULTIPLY_OP:
|
||||||
|
case AML_MOD_OP:
|
||||||
|
case AML_SHIFT_LEFT_OP:
|
||||||
|
case AML_SHIFT_RIGHT_OP:
|
||||||
|
case AML_BIT_AND_OP:
|
||||||
|
case AML_BIT_OR_OP:
|
||||||
|
case AML_BIT_XOR_OP:
|
||||||
|
case AML_INDEX_OP:
|
||||||
|
|
||||||
|
/* These operators have two operands and a target */
|
||||||
|
|
||||||
|
GrandChild1 = Child1->Common.Value.Arg;
|
||||||
|
GrandChild2 = GrandChild1->Common.Next;
|
||||||
|
GrandTarget = GrandChild2->Common.Next;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AML_BIT_NOT_OP:
|
||||||
|
|
||||||
|
/* This operator has one operand and a target */
|
||||||
|
|
||||||
|
GrandChild1 = Child1->Common.Value.Arg;
|
||||||
|
GrandTarget = GrandChild1->Common.Next;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GrandTarget && !AcpiDmIsValidTarget (GrandTarget))
|
||||||
|
{
|
||||||
|
Op->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY;
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
* In the parse tree, simply swap the target with the
|
* In the parse tree, simply swap the target with the
|
||||||
* source so that the target is processed first.
|
* source so that the target is processed first.
|
||||||
*/
|
*/
|
||||||
@ -563,6 +645,7 @@ AcpiDmCloseOperator (
|
|||||||
{
|
{
|
||||||
BOOLEAN IsCStyleOp = FALSE;
|
BOOLEAN IsCStyleOp = FALSE;
|
||||||
|
|
||||||
|
|
||||||
/* Always emit paren if ASL+ disassembly disabled */
|
/* Always emit paren if ASL+ disassembly disabled */
|
||||||
|
|
||||||
if (!AcpiGbl_CstyleDisassembly)
|
if (!AcpiGbl_CstyleDisassembly)
|
||||||
@ -571,6 +654,14 @@ AcpiDmCloseOperator (
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check for a non-ASL+ statement */
|
||||||
|
|
||||||
|
if (Op->Common.DisasmFlags & ACPI_PARSEOP_LEGACY_ASL_ONLY)
|
||||||
|
{
|
||||||
|
AcpiOsPrintf (")");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Check if we need to add an additional closing paren */
|
/* Check if we need to add an additional closing paren */
|
||||||
|
|
||||||
switch (Op->Common.AmlOpcode)
|
switch (Op->Common.AmlOpcode)
|
||||||
|
@ -64,6 +64,10 @@ static void
|
|||||||
AcpiDmConvertToElseIf (
|
AcpiDmConvertToElseIf (
|
||||||
ACPI_PARSE_OBJECT *Op);
|
ACPI_PARSE_OBJECT *Op);
|
||||||
|
|
||||||
|
static void
|
||||||
|
AcpiDmPromoteSubtree (
|
||||||
|
ACPI_PARSE_OBJECT *StartOp);
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
@ -1067,16 +1071,26 @@ AcpiDmConvertToElseIf (
|
|||||||
* be the only blocks under the original Else.
|
* be the only blocks under the original Else.
|
||||||
*/
|
*/
|
||||||
IfOp = OriginalElseOp->Common.Value.Arg;
|
IfOp = OriginalElseOp->Common.Value.Arg;
|
||||||
|
|
||||||
if (!IfOp ||
|
if (!IfOp ||
|
||||||
(IfOp->Common.AmlOpcode != AML_IF_OP) ||
|
(IfOp->Common.AmlOpcode != AML_IF_OP) ||
|
||||||
(IfOp->Asl.Next && (IfOp->Asl.Next->Common.AmlOpcode != AML_ELSE_OP)))
|
(IfOp->Asl.Next && (IfOp->Asl.Next->Common.AmlOpcode != AML_ELSE_OP)))
|
||||||
{
|
{
|
||||||
/* Not an Else..If sequence, cannot convert to ElseIf */
|
/* Not a proper Else..If sequence, cannot convert to ElseIf */
|
||||||
|
|
||||||
AcpiOsPrintf ("%s", "Else");
|
AcpiOsPrintf ("%s", "Else");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Cannot have anything following the If...Else block */
|
||||||
|
|
||||||
|
ElseOp = IfOp->Common.Next;
|
||||||
|
if (ElseOp && ElseOp->Common.Next)
|
||||||
|
{
|
||||||
|
AcpiOsPrintf ("%s", "Else");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Emit ElseIf, mark the IF as now an ELSEIF */
|
/* Emit ElseIf, mark the IF as now an ELSEIF */
|
||||||
|
|
||||||
AcpiOsPrintf ("%s", "ElseIf");
|
AcpiOsPrintf ("%s", "ElseIf");
|
||||||
@ -1100,7 +1114,10 @@ AcpiDmConvertToElseIf (
|
|||||||
/* If an ELSE matches the IF, promote it also */
|
/* If an ELSE matches the IF, promote it also */
|
||||||
|
|
||||||
ElseOp->Common.Parent = OriginalElseOp->Common.Parent;
|
ElseOp->Common.Parent = OriginalElseOp->Common.Parent;
|
||||||
ElseOp->Common.Next = OriginalElseOp->Common.Next;
|
|
||||||
|
/* Promote the entire block under the ElseIf (All Next OPs) */
|
||||||
|
|
||||||
|
AcpiDmPromoteSubtree (OriginalElseOp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1122,3 +1139,48 @@ AcpiDmConvertToElseIf (
|
|||||||
|
|
||||||
OriginalElseOp->Common.Next = IfOp;
|
OriginalElseOp->Common.Next = IfOp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: AcpiDmPromoteSubtree
|
||||||
|
*
|
||||||
|
* PARAMETERS: StartOpOp - Original parent of the entire subtree
|
||||||
|
*
|
||||||
|
* RETURN: None
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Promote an entire parse subtree up one level.
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
static void
|
||||||
|
AcpiDmPromoteSubtree (
|
||||||
|
ACPI_PARSE_OBJECT *StartOp)
|
||||||
|
{
|
||||||
|
ACPI_PARSE_OBJECT *Op;
|
||||||
|
ACPI_PARSE_OBJECT *ParentOp;
|
||||||
|
|
||||||
|
|
||||||
|
/* New parent for subtree elements */
|
||||||
|
|
||||||
|
ParentOp = StartOp->Common.Parent;
|
||||||
|
|
||||||
|
/* First child starts the subtree */
|
||||||
|
|
||||||
|
Op = StartOp->Common.Value.Arg;
|
||||||
|
|
||||||
|
/* Walk the top-level elements of the subtree */
|
||||||
|
|
||||||
|
while (Op)
|
||||||
|
{
|
||||||
|
Op->Common.Parent = ParentOp;
|
||||||
|
if (!Op->Common.Next)
|
||||||
|
{
|
||||||
|
/* Last Op in list, update its next field */
|
||||||
|
|
||||||
|
Op->Common.Next = StartOp->Common.Next;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Op = Op->Common.Next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -443,16 +443,17 @@ AcpiDmIoFlags2 (
|
|||||||
UINT8 SpecificFlags)
|
UINT8 SpecificFlags)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/* _TTP */
|
||||||
|
|
||||||
AcpiOsPrintf (", %s",
|
AcpiOsPrintf (", %s",
|
||||||
AcpiGbl_TtpDecode [ACPI_EXTRACT_1BIT_FLAG (SpecificFlags, 4)]);
|
AcpiGbl_TtpDecode [ACPI_EXTRACT_1BIT_FLAG (SpecificFlags, 4)]);
|
||||||
|
|
||||||
/* TRS is only used if TTP is TypeTranslation */
|
/*
|
||||||
|
* TRS is only used if TTP is TypeTranslation. However, the disassembler
|
||||||
if (SpecificFlags & 0x10)
|
* always emits exactly what is in the AML.
|
||||||
{
|
*/
|
||||||
AcpiOsPrintf (", %s",
|
AcpiOsPrintf (", %s",
|
||||||
AcpiGbl_TrsDecode [ACPI_EXTRACT_1BIT_FLAG (SpecificFlags, 5)]);
|
AcpiGbl_TrsDecode [ACPI_EXTRACT_1BIT_FLAG (SpecificFlags, 5)]);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -581,11 +581,18 @@ AcpiExUnloadTable (
|
|||||||
|
|
||||||
TableIndex = TableDesc->Reference.Value;
|
TableIndex = TableDesc->Reference.Value;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Release the interpreter lock so that the table lock won't have
|
||||||
|
* strict order requirement against it.
|
||||||
|
*/
|
||||||
|
AcpiExExitInterpreter ();
|
||||||
|
|
||||||
/* Ensure the table is still loaded */
|
/* Ensure the table is still loaded */
|
||||||
|
|
||||||
if (!AcpiTbIsTableLoaded (TableIndex))
|
if (!AcpiTbIsTableLoaded (TableIndex))
|
||||||
{
|
{
|
||||||
return_ACPI_STATUS (AE_NOT_EXIST);
|
Status = AE_NOT_EXIST;
|
||||||
|
goto LockAndExit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Invoke table handler if present */
|
/* Invoke table handler if present */
|
||||||
@ -605,16 +612,25 @@ AcpiExUnloadTable (
|
|||||||
Status = AcpiTbDeleteNamespaceByOwner (TableIndex);
|
Status = AcpiTbDeleteNamespaceByOwner (TableIndex);
|
||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
{
|
{
|
||||||
return_ACPI_STATUS (Status);
|
goto LockAndExit;
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) AcpiTbReleaseOwnerId (TableIndex);
|
(void) AcpiTbReleaseOwnerId (TableIndex);
|
||||||
AcpiTbSetTableLoadedFlag (TableIndex, FALSE);
|
AcpiTbSetTableLoadedFlag (TableIndex, FALSE);
|
||||||
|
|
||||||
|
LockAndExit:
|
||||||
|
|
||||||
|
/* Re-acquire the interpreter lock */
|
||||||
|
|
||||||
|
AcpiExEnterInterpreter ();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Invalidate the handle. We do this because the handle may be stored
|
* Invalidate the handle. We do this because the handle may be stored
|
||||||
* in a named object and may not be actually deleted until much later.
|
* in a named object and may not be actually deleted until much later.
|
||||||
*/
|
*/
|
||||||
DdbHandle->Common.Flags &= ~AOPOBJ_DATA_VALID;
|
if (ACPI_SUCCESS (Status))
|
||||||
return_ACPI_STATUS (AE_OK);
|
{
|
||||||
|
DdbHandle->Common.Flags &= ~AOPOBJ_DATA_VALID;
|
||||||
|
}
|
||||||
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
@ -334,6 +334,18 @@ AcpiPsExecuteTable (
|
|||||||
WalkState->ParseFlags |= ACPI_PARSE_MODULE_LEVEL;
|
WalkState->ParseFlags |= ACPI_PARSE_MODULE_LEVEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Info->Node is the default location to load the table */
|
||||||
|
|
||||||
|
if (Info->Node && Info->Node != AcpiGbl_RootNode)
|
||||||
|
{
|
||||||
|
Status = AcpiDsScopeStackPush (
|
||||||
|
Info->Node, ACPI_TYPE_METHOD, WalkState);
|
||||||
|
if (ACPI_FAILURE (Status))
|
||||||
|
{
|
||||||
|
goto Cleanup;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse the AML, WalkState will be deleted by ParseAml
|
* Parse the AML, WalkState will be deleted by ParseAml
|
||||||
*/
|
*/
|
||||||
|
@ -681,18 +681,13 @@ AcpiTbDeleteNamespaceByOwner (
|
|||||||
* lock may block, and also since the execution of a namespace walk
|
* lock may block, and also since the execution of a namespace walk
|
||||||
* must be allowed to use the interpreter.
|
* must be allowed to use the interpreter.
|
||||||
*/
|
*/
|
||||||
(void) AcpiUtReleaseMutex (ACPI_MTX_INTERPRETER);
|
|
||||||
Status = AcpiUtAcquireWriteLock (&AcpiGbl_NamespaceRwLock);
|
Status = AcpiUtAcquireWriteLock (&AcpiGbl_NamespaceRwLock);
|
||||||
|
|
||||||
AcpiNsDeleteNamespaceByOwner (OwnerId);
|
|
||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
{
|
{
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
AcpiNsDeleteNamespaceByOwner (OwnerId);
|
||||||
AcpiUtReleaseWriteLock (&AcpiGbl_NamespaceRwLock);
|
AcpiUtReleaseWriteLock (&AcpiGbl_NamespaceRwLock);
|
||||||
|
|
||||||
Status = AcpiUtAcquireMutex (ACPI_MTX_INTERPRETER);
|
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,5 +156,5 @@ AcpiTbFindTable (
|
|||||||
|
|
||||||
UnlockAndExit:
|
UnlockAndExit:
|
||||||
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
|
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
|
||||||
return_ACPI_STATUS (AE_NOT_FOUND);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
@ -262,7 +262,7 @@ AcpiTbLoadNamespace (
|
|||||||
if (!TablesFailed)
|
if (!TablesFailed)
|
||||||
{
|
{
|
||||||
ACPI_INFO ((
|
ACPI_INFO ((
|
||||||
"%u ACPI AML tables successfully acquired and loaded\n",
|
"%u ACPI AML tables successfully acquired and loaded",
|
||||||
TablesLoaded));
|
TablesLoaded));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -276,6 +276,11 @@ AcpiTbLoadNamespace (
|
|||||||
Status = AE_CTRL_TERMINATE;
|
Status = AE_CTRL_TERMINATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ACPI_APPLICATION
|
||||||
|
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "\n"));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
UnlockAndExit:
|
UnlockAndExit:
|
||||||
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
|
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
@ -423,9 +428,9 @@ AcpiUnloadParentTable (
|
|||||||
return_ACPI_STATUS (AE_TYPE);
|
return_ACPI_STATUS (AE_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Must acquire the interpreter lock during this operation */
|
/* Must acquire the table lock during this operation */
|
||||||
|
|
||||||
Status = AcpiUtAcquireMutex (ACPI_MTX_INTERPRETER);
|
Status = AcpiUtAcquireMutex (ACPI_MTX_TABLES);
|
||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
{
|
{
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
@ -456,9 +461,11 @@ AcpiUnloadParentTable (
|
|||||||
|
|
||||||
/* Ensure the table is actually loaded */
|
/* Ensure the table is actually loaded */
|
||||||
|
|
||||||
|
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
|
||||||
if (!AcpiTbIsTableLoaded (i))
|
if (!AcpiTbIsTableLoaded (i))
|
||||||
{
|
{
|
||||||
Status = AE_NOT_EXIST;
|
Status = AE_NOT_EXIST;
|
||||||
|
(void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -485,10 +492,11 @@ AcpiUnloadParentTable (
|
|||||||
|
|
||||||
Status = AcpiTbReleaseOwnerId (i);
|
Status = AcpiTbReleaseOwnerId (i);
|
||||||
AcpiTbSetTableLoadedFlag (i, FALSE);
|
AcpiTbSetTableLoadedFlag (i, FALSE);
|
||||||
|
(void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) AcpiUtReleaseMutex (ACPI_MTX_INTERPRETER);
|
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ AcpiUtStrtoulBase16 (
|
|||||||
* The integer is initialized to the value zero.
|
* The integer is initialized to the value zero.
|
||||||
* The ASCII string is interpreted as a hexadecimal constant.
|
* The ASCII string is interpreted as a hexadecimal constant.
|
||||||
*
|
*
|
||||||
* 1) A “0x” prefix is not allowed. However, ACPICA allows this for
|
* 1) A "0x" prefix is not allowed. However, ACPICA allows this for
|
||||||
* compatibility with previous ACPICA. (NO ERROR)
|
* compatibility with previous ACPICA. (NO ERROR)
|
||||||
*
|
*
|
||||||
* 2) Terminates when the size of an integer is reached (32 or 64 bits).
|
* 2) Terminates when the size of an integer is reached (32 or 64 bits).
|
||||||
|
@ -148,7 +148,7 @@
|
|||||||
|
|
||||||
/* Maximum number of While() loops before abort */
|
/* Maximum number of While() loops before abort */
|
||||||
|
|
||||||
#define ACPI_MAX_LOOP_COUNT 0xFFFF
|
#define ACPI_MAX_LOOP_COUNT 0x000FFFFF
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -245,10 +245,6 @@ ACPI_INIT_GLOBAL (UINT32, AcpiGbl_NestingLevel, 0);
|
|||||||
|
|
||||||
ACPI_GLOBAL (ACPI_THREAD_STATE *, AcpiGbl_CurrentWalkList);
|
ACPI_GLOBAL (ACPI_THREAD_STATE *, AcpiGbl_CurrentWalkList);
|
||||||
|
|
||||||
/* Maximum number of While() loop iterations before forced abort */
|
|
||||||
|
|
||||||
ACPI_GLOBAL (UINT16, AcpiGbl_MaxLoopIterations);
|
|
||||||
|
|
||||||
/* Control method single step flag */
|
/* Control method single step flag */
|
||||||
|
|
||||||
ACPI_GLOBAL (UINT8, AcpiGbl_CmSingleStep);
|
ACPI_GLOBAL (UINT8, AcpiGbl_CmSingleStep);
|
||||||
@ -322,6 +318,7 @@ ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_CstyleDisassembly, TRUE);
|
|||||||
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ForceAmlDisassembly, FALSE);
|
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ForceAmlDisassembly, FALSE);
|
||||||
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Verbose, TRUE);
|
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Verbose, TRUE);
|
||||||
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DmEmitExternalOpcodes, FALSE);
|
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DmEmitExternalOpcodes, FALSE);
|
||||||
|
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DoDisassemblerOptimizations, TRUE);
|
||||||
|
|
||||||
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Disasm);
|
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Disasm);
|
||||||
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Listing);
|
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Listing);
|
||||||
|
@ -917,7 +917,7 @@ typedef union acpi_parse_value
|
|||||||
ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\
|
ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\
|
||||||
UINT8 ArgListLength; /* Number of elements in the arg list */\
|
UINT8 ArgListLength; /* Number of elements in the arg list */\
|
||||||
ACPI_DISASM_ONLY_MEMBERS (\
|
ACPI_DISASM_ONLY_MEMBERS (\
|
||||||
UINT8 DisasmFlags; /* Used during AML disassembly */\
|
UINT16 DisasmFlags; /* Used during AML disassembly */\
|
||||||
UINT8 DisasmOpcode; /* Subtype used for disassembly */\
|
UINT8 DisasmOpcode; /* Subtype used for disassembly */\
|
||||||
char *OperatorSymbol;/* Used for C-style operator name strings */\
|
char *OperatorSymbol;/* Used for C-style operator name strings */\
|
||||||
char AmlOpName[16]) /* Op name (debug only) */
|
char AmlOpName[16]) /* Op name (debug only) */
|
||||||
@ -1037,14 +1037,15 @@ typedef struct acpi_parse_state
|
|||||||
|
|
||||||
/* Parse object DisasmFlags */
|
/* Parse object DisasmFlags */
|
||||||
|
|
||||||
#define ACPI_PARSEOP_IGNORE 0x01
|
#define ACPI_PARSEOP_IGNORE 0x0001
|
||||||
#define ACPI_PARSEOP_PARAMETER_LIST 0x02
|
#define ACPI_PARSEOP_PARAMETER_LIST 0x0002
|
||||||
#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04
|
#define ACPI_PARSEOP_EMPTY_TERMLIST 0x0004
|
||||||
#define ACPI_PARSEOP_PREDEFINED_CHECKED 0x08
|
#define ACPI_PARSEOP_PREDEFINED_CHECKED 0x0008
|
||||||
#define ACPI_PARSEOP_CLOSING_PAREN 0x10
|
#define ACPI_PARSEOP_CLOSING_PAREN 0x0010
|
||||||
#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT 0x20
|
#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT 0x0020
|
||||||
#define ACPI_PARSEOP_ASSIGNMENT 0x40
|
#define ACPI_PARSEOP_ASSIGNMENT 0x0040
|
||||||
#define ACPI_PARSEOP_ELSEIF 0x80
|
#define ACPI_PARSEOP_ELSEIF 0x0080
|
||||||
|
#define ACPI_PARSEOP_LEGACY_ASL_ONLY 0x0100
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||||
|
|
||||||
#define ACPI_CA_VERSION 0x20160831
|
#define ACPI_CA_VERSION 0x20160930
|
||||||
|
|
||||||
#include "acconfig.h"
|
#include "acconfig.h"
|
||||||
#include "actypes.h"
|
#include "actypes.h"
|
||||||
@ -260,6 +260,13 @@ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_OsiData, 0);
|
|||||||
*/
|
*/
|
||||||
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ReducedHardware, FALSE);
|
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ReducedHardware, FALSE);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Maximum number of While() loop iterations before forced method abort.
|
||||||
|
* This mechanism is intended to prevent infinite loops during interpreter
|
||||||
|
* execution within a host kernel.
|
||||||
|
*/
|
||||||
|
ACPI_INIT_GLOBAL (UINT32, AcpiGbl_MaxLoopIterations, ACPI_MAX_LOOP_COUNT);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This mechanism is used to trace a specified AML method. The method is
|
* This mechanism is used to trace a specified AML method. The method is
|
||||||
* traced each time it is executed.
|
* traced each time it is executed.
|
||||||
|
@ -47,7 +47,6 @@
|
|||||||
#include "aclinux.h"
|
#include "aclinux.h"
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#define sem_destroy sem_close
|
|
||||||
#define ACPI_USE_ALTERNATE_TIMEOUT
|
#define ACPI_USE_ALTERNATE_TIMEOUT
|
||||||
#endif /* __APPLE__ */
|
#endif /* __APPLE__ */
|
||||||
|
|
||||||
|
@ -754,8 +754,12 @@ AcpiOsCreateSemaphore (
|
|||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
{
|
{
|
||||||
char *SemaphoreName = tmpnam (NULL);
|
static int SemaphoreCount = 0;
|
||||||
|
char SemaphoreName[32];
|
||||||
|
|
||||||
|
snprintf (SemaphoreName, sizeof (SemaphoreName), "acpi_sem_%d",
|
||||||
|
SemaphoreCount++);
|
||||||
|
printf ("%s\n", SemaphoreName);
|
||||||
Sem = sem_open (SemaphoreName, O_EXCL|O_CREAT, 0755, InitialUnits);
|
Sem = sem_open (SemaphoreName, O_EXCL|O_CREAT, 0755, InitialUnits);
|
||||||
if (!Sem)
|
if (!Sem)
|
||||||
{
|
{
|
||||||
@ -807,10 +811,17 @@ AcpiOsDeleteSemaphore (
|
|||||||
return (AE_BAD_PARAMETER);
|
return (AE_BAD_PARAMETER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
if (sem_close (Sem) == -1)
|
||||||
|
{
|
||||||
|
return (AE_BAD_PARAMETER);
|
||||||
|
}
|
||||||
|
#else
|
||||||
if (sem_destroy (Sem) == -1)
|
if (sem_destroy (Sem) == -1)
|
||||||
{
|
{
|
||||||
return (AE_BAD_PARAMETER);
|
return (AE_BAD_PARAMETER);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
}
|
}
|
||||||
|
@ -433,7 +433,7 @@ AbCompareAmlFiles (
|
|||||||
{
|
{
|
||||||
if (Char1 != Char2)
|
if (Char1 != Char2)
|
||||||
{
|
{
|
||||||
printf ("Error - Byte mismatch at offset %8.8X: 0x%2.2X 0x%2.2X\n",
|
printf ("Error - Byte mismatch at offset %8.4X: 0x%2.2X 0x%2.2X\n",
|
||||||
Offset, Char1, Char2);
|
Offset, Char1, Char2);
|
||||||
Mismatches++;
|
Mismatches++;
|
||||||
if (Mismatches > 100)
|
if (Mismatches > 100)
|
||||||
@ -471,7 +471,10 @@ AbCompareAmlFiles (
|
|||||||
}
|
}
|
||||||
|
|
||||||
printf ("%u Mismatches found\n", Mismatches);
|
printf ("%u Mismatches found\n", Mismatches);
|
||||||
Status = 0;
|
if (Mismatches == 0)
|
||||||
|
{
|
||||||
|
Status = 0;
|
||||||
|
}
|
||||||
|
|
||||||
Exit2:
|
Exit2:
|
||||||
fclose (File2);
|
fclose (File2);
|
||||||
|
@ -542,7 +542,7 @@ main (
|
|||||||
/* Get all ACPI AML tables in this file */
|
/* Get all ACPI AML tables in this file */
|
||||||
|
|
||||||
Status = AcGetAllTablesFromFile (argv[AcpiGbl_Optind],
|
Status = AcGetAllTablesFromFile (argv[AcpiGbl_Optind],
|
||||||
ACPI_GET_ONLY_AML_TABLES, &ListHead);
|
ACPI_GET_ALL_TABLES, &ListHead);
|
||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
{
|
{
|
||||||
ExitCode = -1;
|
ExitCode = -1;
|
||||||
|
@ -176,7 +176,7 @@ main (
|
|||||||
/* Get all ACPI AML tables in this file */
|
/* Get all ACPI AML tables in this file */
|
||||||
|
|
||||||
Status = AcGetAllTablesFromFile (argv[AcpiGbl_Optind],
|
Status = AcGetAllTablesFromFile (argv[AcpiGbl_Optind],
|
||||||
ACPI_GET_ONLY_AML_TABLES, &ListHead);
|
ACPI_GET_ALL_TABLES, &ListHead);
|
||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
{
|
{
|
||||||
return (-1);
|
return (-1);
|
||||||
|
@ -321,7 +321,7 @@ AsConvertFile (
|
|||||||
ConditionalTable = ConversionTable->SourceConditionalTable;
|
ConditionalTable = ConversionTable->SourceConditionalTable;
|
||||||
StructTable = ConversionTable->SourceStructTable;
|
StructTable = ConversionTable->SourceStructTable;
|
||||||
SpecialMacroTable = ConversionTable->SourceSpecialMacroTable;
|
SpecialMacroTable = ConversionTable->SourceSpecialMacroTable;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FILE_TYPE_HEADER:
|
case FILE_TYPE_HEADER:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user