From b28e481ae9b051dab150e9b5a89730cdc1103a9c Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Wed, 2 Jan 2013 19:01:21 +0000 Subject: Import ACPICA 20121220. --- source/components/dispatcher/dsmethod.c | 1 + source/components/dispatcher/dsobject.c | 13 +++++++++++-- source/components/dispatcher/dsutils.c | 10 +++++----- source/components/dispatcher/dswexec.c | 4 ++-- 4 files changed, 19 insertions(+), 9 deletions(-) (limited to 'source/components/dispatcher') diff --git a/source/components/dispatcher/dsmethod.c b/source/components/dispatcher/dsmethod.c index 97d52b87f4ebe..fbec94b991cbf 100644 --- a/source/components/dispatcher/dsmethod.c +++ b/source/components/dispatcher/dsmethod.c @@ -163,6 +163,7 @@ AcpiDsCreateMethodMutex ( Status = AcpiOsCreateMutex (&MutexDesc->Mutex.OsMutex); if (ACPI_FAILURE (Status)) { + AcpiUtDeleteObjectDesc (MutexDesc); return_ACPI_STATUS (Status); } diff --git a/source/components/dispatcher/dsobject.c b/source/components/dispatcher/dsobject.c index 24a5c09bc045c..c3fa608c7db07 100644 --- a/source/components/dispatcher/dsobject.c +++ b/source/components/dispatcher/dsobject.c @@ -734,7 +734,7 @@ AcpiDsInitObjectFromOp ( /* Truncate value if we are executing from a 32-bit ACPI table */ #ifndef ACPI_NO_METHOD_EXECUTION - AcpiExTruncateFor32bitTable (ObjDesc); + (void) AcpiExTruncateFor32bitTable (ObjDesc); #endif break; @@ -756,8 +756,17 @@ AcpiDsInitObjectFromOp ( case AML_TYPE_LITERAL: ObjDesc->Integer.Value = Op->Common.Value.Integer; + #ifndef ACPI_NO_METHOD_EXECUTION - AcpiExTruncateFor32bitTable (ObjDesc); + if (AcpiExTruncateFor32bitTable (ObjDesc)) + { + /* Warn if we found a 64-bit constant in a 32-bit table */ + + ACPI_WARNING ((AE_INFO, + "Truncated 64-bit constant found in 32-bit table: %8.8X%8.8X => %8.8X", + ACPI_FORMAT_UINT64 (Op->Common.Value.Integer), + (UINT32) ObjDesc->Integer.Value)); + } #endif break; diff --git a/source/components/dispatcher/dsutils.c b/source/components/dispatcher/dsutils.c index 2cabdc680badf..545ca8fbb97c4 100644 --- a/source/components/dispatcher/dsutils.c +++ b/source/components/dispatcher/dsutils.c @@ -201,7 +201,7 @@ AcpiDsIsResultUsed ( if (!Op) { ACPI_ERROR ((AE_INFO, "Null Op")); - return_UINT8 (TRUE); + return_VALUE (TRUE); } /* @@ -231,7 +231,7 @@ AcpiDsIsResultUsed ( ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "At Method level, result of [%s] not used\n", AcpiPsGetOpcodeName (Op->Common.AmlOpcode))); - return_UINT8 (FALSE); + return_VALUE (FALSE); } /* Get info on the parent. The RootOp is AML_SCOPE */ @@ -241,7 +241,7 @@ AcpiDsIsResultUsed ( { ACPI_ERROR ((AE_INFO, "Unknown parent opcode Op=%p", Op)); - return_UINT8 (FALSE); + return_VALUE (FALSE); } /* @@ -331,7 +331,7 @@ ResultUsed: AcpiPsGetOpcodeName (Op->Common.AmlOpcode), AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode), Op)); - return_UINT8 (TRUE); + return_VALUE (TRUE); ResultNotUsed: @@ -340,7 +340,7 @@ ResultNotUsed: AcpiPsGetOpcodeName (Op->Common.AmlOpcode), AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode), Op)); - return_UINT8 (FALSE); + return_VALUE (FALSE); } diff --git a/source/components/dispatcher/dswexec.c b/source/components/dispatcher/dswexec.c index 0d38b739eee4d..a51a85b84f4fd 100644 --- a/source/components/dispatcher/dswexec.c +++ b/source/components/dispatcher/dswexec.c @@ -164,7 +164,7 @@ AcpiDsGetPredicateValue ( /* Truncate the predicate to 32-bits if necessary */ - AcpiExTruncateFor32bitTable (LocalObjDesc); + (void) AcpiExTruncateFor32bitTable (LocalObjDesc); /* * Save the result of the predicate evaluation on @@ -739,7 +739,7 @@ AcpiDsExecEndOp ( * ACPI 2.0 support for 64-bit integers: Truncate numeric * result value if we are executing from a 32-bit ACPI table */ - AcpiExTruncateFor32bitTable (WalkState->ResultObj); + (void) AcpiExTruncateFor32bitTable (WalkState->ResultObj); /* * Check if we just completed the evaluation of a -- cgit v1.2.3