diff options
Diffstat (limited to 'source/components')
-rw-r--r-- | source/components/debugger/dbexec.c | 12 | ||||
-rw-r--r-- | source/components/debugger/dbinput.c | 18 | ||||
-rw-r--r-- | source/components/debugger/dbobject.c | 75 | ||||
-rw-r--r-- | source/components/debugger/dbxface.c | 46 | ||||
-rw-r--r-- | source/components/disassembler/dmcstyle.c | 33 | ||||
-rw-r--r-- | source/components/executer/exconvrt.c | 1 | ||||
-rw-r--r-- | source/components/executer/exresolv.c | 1 | ||||
-rw-r--r-- | source/components/executer/exresop.c | 2 | ||||
-rw-r--r-- | source/components/executer/exstore.c | 122 | ||||
-rw-r--r-- | source/components/executer/exstoren.c | 5 | ||||
-rw-r--r-- | source/components/namespace/nspredef.c | 2 | ||||
-rw-r--r-- | source/components/utilities/utdecode.c | 22 | ||||
-rw-r--r-- | source/components/utilities/utfileio.c | 7 | ||||
-rw-r--r-- | source/components/utilities/utmutex.c | 24 |
14 files changed, 265 insertions, 105 deletions
diff --git a/source/components/debugger/dbexec.c b/source/components/debugger/dbexec.c index ebd02b7..af01ca2 100644 --- a/source/components/debugger/dbexec.c +++ b/source/components/debugger/dbexec.c @@ -419,8 +419,20 @@ AcpiDbExecute ( #ifdef ACPI_DEBUG_OUTPUT UINT32 PreviousAllocations; UINT32 Allocations; +#endif + + /* + * Allow one execution to be performed by debugger or single step + * execution will be dead locked by the interpreter mutexes. + */ + if (AcpiGbl_MethodExecuting) + { + AcpiOsPrintf ("Only one debugger execution is allowed.\n"); + return; + } +#ifdef ACPI_DEBUG_OUTPUT /* Memory allocation tracking */ PreviousAllocations = AcpiDbGetOutstandingAllocations (); diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c index 981d7062..1b9a917 100644 --- a/source/components/debugger/dbinput.c +++ b/source/components/debugger/dbinput.c @@ -123,6 +123,7 @@ enum AcpiExDebuggerCommands CMD_OSI, CMD_OWNER, CMD_PATHS, + CMD_PREDEFINED, CMD_PREFIX, CMD_QUIT, CMD_REFERENCES, @@ -152,7 +153,6 @@ enum AcpiExDebuggerCommands CMD_TERMINATE, CMD_THREADS, - CMD_PREDEFINED, CMD_TEST, #endif }; @@ -201,6 +201,7 @@ static const ACPI_DB_COMMAND_INFO AcpiGbl_DbCommands[] = {"OSI", 0}, {"OWNER", 1}, {"PATHS", 0}, + {"PREDEFINED", 0}, {"PREFIX", 0}, {"QUIT", 0}, {"REFERENCES", 1}, @@ -230,7 +231,6 @@ static const ACPI_DB_COMMAND_INFO AcpiGbl_DbCommands[] = {"TERMINATE", 0}, {"THREADS", 3}, - {"PREDEFINED", 0}, {"TEST", 1}, #endif {NULL, 0} @@ -1229,7 +1229,8 @@ AcpiDbExecuteThread ( AcpiGbl_MethodExecuting = FALSE; AcpiGbl_StepToNextCall = FALSE; - MStatus = AcpiUtAcquireMutex (ACPI_MTX_DEBUG_CMD_READY); + MStatus = AcpiOsAcquireMutex (AcpiGbl_DbCommandReady, + ACPI_WAIT_FOREVER); if (ACPI_FAILURE (MStatus)) { return; @@ -1237,11 +1238,7 @@ AcpiDbExecuteThread ( Status = AcpiDbCommandDispatch (AcpiGbl_DbLineBuf, NULL, NULL); - MStatus = AcpiUtReleaseMutex (ACPI_MTX_DEBUG_CMD_COMPLETE); - if (ACPI_FAILURE (MStatus)) - { - return; - } + AcpiOsReleaseMutex (AcpiGbl_DbCommandComplete); } } @@ -1332,13 +1329,14 @@ AcpiDbUserCommands ( * Signal the debug thread that we have a command to execute, * and wait for the command to complete. */ - Status = AcpiUtReleaseMutex (ACPI_MTX_DEBUG_CMD_READY); + AcpiOsReleaseMutex (AcpiGbl_DbCommandReady); if (ACPI_FAILURE (Status)) { return (Status); } - Status = AcpiUtAcquireMutex (ACPI_MTX_DEBUG_CMD_COMPLETE); + Status = AcpiOsAcquireMutex (AcpiGbl_DbCommandComplete, + ACPI_WAIT_FOREVER); if (ACPI_FAILURE (Status)) { return (Status); diff --git a/source/components/debugger/dbobject.c b/source/components/debugger/dbobject.c index eef1b9e..019e811 100644 --- a/source/components/debugger/dbobject.c +++ b/source/components/debugger/dbobject.c @@ -445,6 +445,7 @@ AcpiDbDecodeLocals ( UINT32 i; ACPI_OPERAND_OBJECT *ObjDesc; ACPI_NAMESPACE_NODE *Node; + BOOLEAN DisplayLocals = FALSE; ObjDesc = WalkState->MethodDesc; @@ -463,14 +464,39 @@ AcpiDbDecodeLocals ( return; } - AcpiOsPrintf ("Local Variables for method [%4.4s]:\n", - AcpiUtGetNodeName (Node)); + /* Are any locals actually set? */ for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++) { ObjDesc = WalkState->LocalVariables[i].Object; - AcpiOsPrintf (" Local%X: ", i); - AcpiDbDisplayInternalObject (ObjDesc, WalkState); + if (ObjDesc) + { + DisplayLocals = TRUE; + break; + } + } + + /* If any are set, only display the ones that are set */ + + if (DisplayLocals) + { + AcpiOsPrintf ("\nInitialized Local Variables for method [%4.4s]:\n", + AcpiUtGetNodeName (Node)); + + for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++) + { + ObjDesc = WalkState->LocalVariables[i].Object; + if (ObjDesc) + { + AcpiOsPrintf (" Local%X: ", i); + AcpiDbDisplayInternalObject (ObjDesc, WalkState); + } + } + } + else + { + AcpiOsPrintf ("No Local Variables are initialized for method [%4.4s]\n", + AcpiUtGetNodeName (Node)); } } @@ -494,10 +520,11 @@ AcpiDbDecodeArguments ( UINT32 i; ACPI_OPERAND_OBJECT *ObjDesc; ACPI_NAMESPACE_NODE *Node; + BOOLEAN DisplayArgs = FALSE; + Node = WalkState->MethodNode; ObjDesc = WalkState->MethodDesc; - Node = WalkState->MethodNode; if (!Node) { @@ -512,16 +539,40 @@ AcpiDbDecodeArguments ( return; } - AcpiOsPrintf ( - "Arguments for Method [%4.4s]: " - "(%X arguments defined, max concurrency = %X)\n", - AcpiUtGetNodeName (Node), ObjDesc->Method.ParamCount, - ObjDesc->Method.SyncLevel); + /* Are any arguments actually set? */ for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++) { ObjDesc = WalkState->Arguments[i].Object; - AcpiOsPrintf (" Arg%u: ", i); - AcpiDbDisplayInternalObject (ObjDesc, WalkState); + if (ObjDesc) + { + DisplayArgs = TRUE; + break; + } + } + + /* If any are set, only display the ones that are set */ + + if (DisplayArgs) + { + AcpiOsPrintf ( + "Initialized Arguments for Method [%4.4s]: " + "(%X arguments defined for method invocation)\n", + AcpiUtGetNodeName (Node), ObjDesc->Method.ParamCount); + + for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++) + { + ObjDesc = WalkState->Arguments[i].Object; + if (ObjDesc) + { + AcpiOsPrintf (" Arg%u: ", i); + AcpiDbDisplayInternalObject (ObjDesc, WalkState); + } + } + } + else + { + AcpiOsPrintf ("No Arguments are initialized for method [%4.4s]\n", + AcpiUtGetNodeName (Node)); } } diff --git a/source/components/debugger/dbxface.c b/source/components/debugger/dbxface.c index a6a5a62..9e7c31d 100644 --- a/source/components/debugger/dbxface.c +++ b/source/components/debugger/dbxface.c @@ -101,12 +101,10 @@ AcpiDbStartCommand ( { /* Handshake with the front-end that gets user command lines */ - Status = AcpiUtReleaseMutex (ACPI_MTX_DEBUG_CMD_COMPLETE); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - Status = AcpiUtAcquireMutex (ACPI_MTX_DEBUG_CMD_READY); + AcpiOsReleaseMutex (AcpiGbl_DbCommandComplete); + + Status = AcpiOsAcquireMutex (AcpiGbl_DbCommandReady, + ACPI_WAIT_FOREVER); if (ACPI_FAILURE (Status)) { return (Status); @@ -450,14 +448,16 @@ AcpiInitializeDebugger ( { /* These were created with one unit, grab it */ - Status = AcpiUtAcquireMutex (ACPI_MTX_DEBUG_CMD_COMPLETE); + Status = AcpiOsAcquireMutex (AcpiGbl_DbCommandComplete, + ACPI_WAIT_FOREVER); if (ACPI_FAILURE (Status)) { AcpiOsPrintf ("Could not get debugger mutex\n"); return_ACPI_STATUS (Status); } - Status = AcpiUtAcquireMutex (ACPI_MTX_DEBUG_CMD_READY); + Status = AcpiOsAcquireMutex (AcpiGbl_DbCommandReady, + ACPI_WAIT_FOREVER); if (ACPI_FAILURE (Status)) { AcpiOsPrintf ("Could not get debugger mutex\n"); @@ -511,33 +511,3 @@ AcpiTerminateDebugger ( } ACPI_EXPORT_SYMBOL (AcpiTerminateDebugger) - - -#ifdef ACPI_OBSOLETE_FUNCTIONS -/******************************************************************************* - * - * FUNCTION: AcpiDbMethodEnd - * - * PARAMETERS: WalkState - Current walk - * - * RETURN: Status - * - * DESCRIPTION: Called at method termination - * - ******************************************************************************/ - -void -AcpiDbMethodEnd ( - ACPI_WALK_STATE *WalkState) -{ - - if (!AcpiGbl_CmSingleStep) - { - return; - } - - AcpiOsPrintf ("<Method Terminating>\n"); - - AcpiDbStartCommand (WalkState, NULL); -} -#endif diff --git a/source/components/disassembler/dmcstyle.c b/source/components/disassembler/dmcstyle.c index 04436a8..7616723 100644 --- a/source/components/disassembler/dmcstyle.c +++ b/source/components/disassembler/dmcstyle.c @@ -227,12 +227,27 @@ AcpiDmCheckForSymbolicOpcode ( Child2->Common.OperatorSymbol = OperatorSymbol; return (TRUE); -#ifdef INDEX_SUPPORT case AML_INDEX_OP: + /* + * Check for constant source operand. Note: although technically + * legal syntax, the iASL compiler does not support this with + * the symbolic operators for Index(). It doesn't make sense to + * use Index() with a constant anyway. + */ + if ((Child1->Common.AmlOpcode == AML_STRING_OP) || + (Child1->Common.AmlOpcode == AML_BUFFER_OP) || + (Child1->Common.AmlOpcode == AML_PACKAGE_OP) || + (Child1->Common.AmlOpcode == AML_VAR_PACKAGE_OP)) + { + Op->Common.DisasmFlags |= ACPI_PARSEOP_CLOSING_PAREN; + return (FALSE); + } + + /* Index operator is [] */ + Child1->Common.OperatorSymbol = " ["; Child2->Common.OperatorSymbol = "]"; break; -#endif /* Unary operators */ @@ -442,7 +457,6 @@ AcpiDmCheckForSymbolicOpcode ( case AML_INCREMENT_OP: return (TRUE); -#ifdef INDEX_SUPPORT case AML_INDEX_OP: /* Target is optional, 3rd operand */ @@ -458,7 +472,6 @@ AcpiDmCheckForSymbolicOpcode ( } } return (TRUE); -#endif case AML_STORE_OP: /* @@ -578,12 +591,18 @@ AcpiDmCloseOperator ( } break; + case AML_INDEX_OP: + + /* This is case for unsupported Index() source constants */ + + if (Op->Common.DisasmFlags & ACPI_PARSEOP_CLOSING_PAREN) + { + AcpiOsPrintf (")"); + } + return; /* No need for parens for these */ -#ifdef INDEX_SUPPORT - case AML_INDEX_OP: -#endif case AML_DECREMENT_OP: case AML_INCREMENT_OP: case AML_LNOT_OP: diff --git a/source/components/executer/exconvrt.c b/source/components/executer/exconvrt.c index b8f032c..c964217 100644 --- a/source/components/executer/exconvrt.c +++ b/source/components/executer/exconvrt.c @@ -673,6 +673,7 @@ AcpiExConvertToTargetType ( break; case ARGI_TARGETREF: + case ARGI_STORE_TARGET: switch (DestinationType) { diff --git a/source/components/executer/exresolv.c b/source/components/executer/exresolv.c index 868c90d..79878c6 100644 --- a/source/components/executer/exresolv.c +++ b/source/components/executer/exresolv.c @@ -225,7 +225,6 @@ AcpiExResolveObjectToValue ( * (i.e., dereference the package index) * Delete the ref object, increment the returned object */ - AcpiUtRemoveReference (StackDesc); AcpiUtAddReference (ObjDesc); *StackPtr = ObjDesc; } diff --git a/source/components/executer/exresop.c b/source/components/executer/exresop.c index e2262de..d4c5289 100644 --- a/source/components/executer/exresop.c +++ b/source/components/executer/exresop.c @@ -320,6 +320,8 @@ AcpiExResolveOperands ( case ARGI_TARGETREF: /* Allows implicit conversion rules before store */ case ARGI_FIXED_TARGET: /* No implicit conversion before store to target */ case ARGI_SIMPLE_TARGET: /* Name, Local, or Arg - no implicit conversion */ + case ARGI_STORE_TARGET: + /* * Need an operand of type ACPI_TYPE_LOCAL_REFERENCE * A Namespace Node is OK as-is diff --git a/source/components/executer/exstore.c b/source/components/executer/exstore.c index 6215ff3..1f2f912 100644 --- a/source/components/executer/exstore.c +++ b/source/components/executer/exstore.c @@ -147,7 +147,7 @@ AcpiExStore ( /* Destination is not a Reference object */ ACPI_ERROR ((AE_INFO, - "Target is not a Reference or Constant object - %s [%p]", + "Target is not a Reference or Constant object - [%s] %p", AcpiUtGetObjectTypeName (DestDesc), DestDesc)); return_ACPI_STATUS (AE_AML_OPERAND_TYPE); @@ -194,7 +194,7 @@ AcpiExStore ( * displayed and otherwise has no effect -- see ACPI Specification */ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, - "**** Write to Debug Object: Object %p %s ****:\n\n", + "**** Write to Debug Object: Object %p [%s] ****:\n\n", SourceDesc, AcpiUtGetObjectTypeName (SourceDesc))); ACPI_DEBUG_OBJECT (SourceDesc, 0, 0); @@ -356,7 +356,7 @@ AcpiExStoreObjectToIndex ( /* All other types are invalid */ ACPI_ERROR ((AE_INFO, - "Source must be Integer/Buffer/String type, not %s", + "Source must be type [Integer/Buffer/String], found [%s]", AcpiUtGetObjectTypeName (SourceDesc))); return_ACPI_STATUS (AE_AML_OPERAND_TYPE); } @@ -368,8 +368,8 @@ AcpiExStoreObjectToIndex ( default: ACPI_ERROR ((AE_INFO, - "Target is not a Package or BufferField")); - Status = AE_AML_OPERAND_TYPE; + "Target is not of type [Package/BufferField]")); + Status = AE_AML_TARGET_TYPE; break; } @@ -390,20 +390,20 @@ AcpiExStoreObjectToIndex ( * * DESCRIPTION: Store the object to the named object. * - * The Assignment of an object to a named object is handled here - * The value passed in will replace the current value (if any) - * with the input value. + * The assignment of an object to a named object is handled here. + * The value passed in will replace the current value (if any) + * with the input value. * - * When storing into an object the data is converted to the - * target object type then stored in the object. This means - * that the target object type (for an initialized target) will - * not be changed by a store operation. A CopyObject can change - * the target type, however. + * When storing into an object the data is converted to the + * target object type then stored in the object. This means + * that the target object type (for an initialized target) will + * not be changed by a store operation. A CopyObject can change + * the target type, however. * - * The ImplicitConversion flag is set to NO/FALSE only when - * storing to an ArgX -- as per the rules of the ACPI spec. + * The ImplicitConversion flag is set to NO/FALSE only when + * storing to an ArgX -- as per the rules of the ACPI spec. * - * Assumes parameters are already validated. + * Assumes parameters are already validated. * ******************************************************************************/ @@ -428,9 +428,74 @@ AcpiExStoreObjectToNode ( TargetType = AcpiNsGetType (Node); TargetDesc = AcpiNsGetAttachedObject (Node); - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Storing %p (%s) to node %p (%s)\n", + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Storing %p [%s] to node %p [%s]\n", SourceDesc, AcpiUtGetObjectTypeName (SourceDesc), - Node, AcpiUtGetTypeName (TargetType))); + Node, AcpiUtGetTypeName (TargetType))); + + /* Only limited target types possible for everything except CopyObject */ + + if (WalkState->Opcode != AML_COPY_OP) + { + /* + * Only CopyObject allows all object types to be overwritten. For + * TargetRef(s), there are restrictions on the object types that + * are allowed. + * + * Allowable operations/typing for Store: + * + * 1) Simple Store + * Integer --> Integer (Named/Local/Arg) + * String --> String (Named/Local/Arg) + * Buffer --> Buffer (Named/Local/Arg) + * Package --> Package (Named/Local/Arg) + * + * 2) Store with implicit conversion + * Integer --> String or Buffer (Named) + * String --> Integer or Buffer (Named) + * Buffer --> Integer or String (Named) + */ + switch (TargetType) + { + case ACPI_TYPE_PACKAGE: + /* + * Here, can only store a package to an existing package. + * Storing a package to a Local/Arg is OK, and handled + * elsewhere. + */ + if (WalkState->Opcode == AML_STORE_OP) + { + if (SourceDesc->Common.Type != ACPI_TYPE_PACKAGE) + { + ACPI_ERROR ((AE_INFO, + "Cannot assign type [%s] to [Package] " + "(source must be type Pkg)", + AcpiUtGetObjectTypeName (SourceDesc))); + + return_ACPI_STATUS (AE_AML_TARGET_TYPE); + } + break; + } + + /* Fallthrough */ + + case ACPI_TYPE_DEVICE: + case ACPI_TYPE_EVENT: + case ACPI_TYPE_MUTEX: + case ACPI_TYPE_REGION: + case ACPI_TYPE_POWER: + case ACPI_TYPE_PROCESSOR: + case ACPI_TYPE_THERMAL: + + ACPI_ERROR ((AE_INFO, + "Target must be [Buffer/Integer/String/Reference], found [%s] (%4.4s)", + AcpiUtGetTypeName (Node->Type), Node->Name.Ascii)); + + return_ACPI_STATUS (AE_AML_TARGET_TYPE); + + default: + break; + } + } /* * Resolve the source object to an actual value @@ -446,13 +511,13 @@ AcpiExStoreObjectToNode ( switch (TargetType) { - case ACPI_TYPE_INTEGER: - case ACPI_TYPE_STRING: - case ACPI_TYPE_BUFFER: /* * The simple data types all support implicit source operand * conversion before the store. */ + case ACPI_TYPE_INTEGER: + case ACPI_TYPE_STRING: + case ACPI_TYPE_BUFFER: if ((WalkState->Opcode == AML_COPY_OP) || !ImplicitConversion) @@ -491,7 +556,7 @@ AcpiExStoreObjectToNode ( NewDesc->Common.Type); ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, - "Store %s into %s via Convert/Attach\n", + "Store type [%s] into [%s] via Convert/Attach\n", AcpiUtGetObjectTypeName (SourceDesc), AcpiUtGetObjectTypeName (NewDesc))); } @@ -513,15 +578,12 @@ AcpiExStoreObjectToNode ( default: /* - * No conversions for all other types. Directly store a copy of - * the source object. This is the ACPI spec-defined behavior for - * the CopyObject operator. + * CopyObject operator: No conversions for all other types. + * Instead, directly store a copy of the source object. * - * NOTE: For the Store operator, this is a departure from the - * ACPI spec, which states "If conversion is impossible, abort - * the running control method". Instead, this code implements - * "If conversion is impossible, treat the Store operation as - * a CopyObject". + * This is the ACPI spec-defined behavior for the CopyObject + * operator. (Note, for this default case, all normal + * Store/Target operations exited above with an error). */ Status = AcpiExStoreDirectToNode (SourceDesc, Node, WalkState); diff --git a/source/components/executer/exstoren.c b/source/components/executer/exstoren.c index c14b30d..f584438 100644 --- a/source/components/executer/exstoren.c +++ b/source/components/executer/exstoren.c @@ -129,9 +129,10 @@ AcpiExResolveObject ( /* Conversion successful but still not a valid type */ ACPI_ERROR ((AE_INFO, - "Cannot assign type %s to %s (must be type Int/Str/Buf)", + "Cannot assign type [%s] to [%s] (must be type Int/Str/Buf)", AcpiUtGetObjectTypeName (SourceDesc), AcpiUtGetTypeName (TargetType))); + Status = AE_AML_OPERAND_TYPE; } break; @@ -284,7 +285,7 @@ AcpiExStoreObjectToObject ( /* * All other types come here. */ - ACPI_WARNING ((AE_INFO, "Store into type %s not implemented", + ACPI_WARNING ((AE_INFO, "Store into type [%s] not implemented", AcpiUtGetObjectTypeName (DestDesc))); Status = AE_NOT_IMPLEMENTED; diff --git a/source/components/namespace/nspredef.c b/source/components/namespace/nspredef.c index 1b3b082..7221c88 100644 --- a/source/components/namespace/nspredef.c +++ b/source/components/namespace/nspredef.c @@ -249,7 +249,7 @@ AcpiNsCheckObjectType ( { ACPI_OPERAND_OBJECT *ReturnObject = *ReturnObjectPtr; ACPI_STATUS Status = AE_OK; - char TypeBuffer[48]; /* Room for 5 types */ + char TypeBuffer[96]; /* Room for 10 types */ /* A Namespace node should not get here, but make sure */ diff --git a/source/components/utilities/utdecode.c b/source/components/utilities/utdecode.c index 849a1bc..fc21e20 100644 --- a/source/components/utilities/utdecode.c +++ b/source/components/utilities/utdecode.c @@ -261,13 +261,29 @@ char * AcpiUtGetObjectTypeName ( ACPI_OPERAND_OBJECT *ObjDesc) { + ACPI_FUNCTION_TRACE (UtGetObjectTypeName); + if (!ObjDesc) { - return ("[NULL Object Descriptor]"); + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Null Object Descriptor\n")); + return_PTR ("[NULL Object Descriptor]"); + } + + /* These descriptor types share a common area */ + + if ((ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND) && + (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_NAMED)) + { + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, + "Invalid object descriptor type: 0x%2.2X [%s] (%p)\n", + ACPI_GET_DESCRIPTOR_TYPE (ObjDesc), + AcpiUtGetDescriptorName (ObjDesc), ObjDesc)); + + return_PTR ("Invalid object"); } - return (AcpiUtGetTypeName (ObjDesc->Common.Type)); + return_PTR (AcpiUtGetTypeName (ObjDesc->Common.Type)); } @@ -461,8 +477,6 @@ static char *AcpiGbl_MutexNames[ACPI_NUM_MUTEX] = "ACPI_MTX_Events", "ACPI_MTX_Caches", "ACPI_MTX_Memory", - "ACPI_MTX_CommandComplete", - "ACPI_MTX_CommandReady" }; char * diff --git a/source/components/utilities/utfileio.c b/source/components/utilities/utfileio.c index 0180efe..8c50354 100644 --- a/source/components/utilities/utfileio.c +++ b/source/components/utilities/utfileio.c @@ -45,6 +45,7 @@ #include "accommon.h" #include "actables.h" #include "acapps.h" +#include "errno.h" #ifdef ACPI_ASL_COMPILER #include "aslcompiler.h" @@ -330,6 +331,12 @@ AcpiUtReadTableFromFile ( if (!File) { perror ("Could not open input file"); + + if (errno == ENOENT) + { + return (AE_NOT_EXIST); + } + return (Status); } diff --git a/source/components/utilities/utmutex.c b/source/components/utilities/utmutex.c index 4fe866e..60b94c1 100644 --- a/source/components/utilities/utmutex.c +++ b/source/components/utilities/utmutex.c @@ -124,6 +124,24 @@ AcpiUtMutexInitialize ( /* Create the reader/writer lock for namespace access */ Status = AcpiUtCreateRwLock (&AcpiGbl_NamespaceRwLock); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + +#ifdef ACPI_DEBUGGER + + /* Debugger Support */ + + Status = AcpiOsCreateMutex (&AcpiGbl_DbCommandReady); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + + Status = AcpiOsCreateMutex (&AcpiGbl_DbCommandComplete); +#endif + return_ACPI_STATUS (Status); } @@ -169,6 +187,12 @@ AcpiUtMutexTerminate ( /* Delete the reader/writer lock */ AcpiUtDeleteRwLock (&AcpiGbl_NamespaceRwLock); + +#ifdef ACPI_DEBUGGER + AcpiOsDeleteMutex (AcpiGbl_DbCommandReady); + AcpiOsDeleteMutex (AcpiGbl_DbCommandComplete); +#endif + return_VOID; } |