dswload.c (114237) | dswload.c (123315) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: dswload - Dispatcher namespace load callbacks | 1/****************************************************************************** 2 * 3 * Module Name: dswload - Dispatcher namespace load callbacks |
4 * $Revision: 83 $ | 4 * $Revision: 85 $ |
5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. --- 228 unchanged lines hidden (view full) --- 241 242 Path = AcpiPsGetNextNamestring (&WalkState->ParserState); 243 244 /* Map the raw opcode into an internal object type */ 245 246 ObjectType = WalkState->OpInfo->ObjectType; 247 248 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, | 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp. --- 228 unchanged lines hidden (view full) --- 241 242 Path = AcpiPsGetNextNamestring (&WalkState->ParserState); 243 244 /* Map the raw opcode into an internal object type */ 245 246 ObjectType = WalkState->OpInfo->ObjectType; 247 248 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, |
249 "State=%p Op=%p [%s] ", WalkState, Op, AcpiUtGetTypeName (ObjectType))); | 249 "State=%p Op=%p [%s]\n", WalkState, Op, AcpiUtGetTypeName (ObjectType))); |
250 251 switch (WalkState->Opcode) 252 { 253 case AML_SCOPE_OP: 254 255 /* 256 * The target name of the Scope() operator must exist at this point so 257 * that we can actually open the scope to enter new names underneath it. --- 67 unchanged lines hidden (view full) --- 325 * There are only two conditions where it is acceptable that the name 326 * already exists: 327 * 1) the Scope() operator can reopen a scoping object that was 328 * previously defined (Scope, Method, Device, etc.) 329 * 2) Whenever we are parsing a deferred opcode (OpRegion, Buffer, 330 * BufferField, or Package), the name of the object is already 331 * in the namespace. 332 */ | 250 251 switch (WalkState->Opcode) 252 { 253 case AML_SCOPE_OP: 254 255 /* 256 * The target name of the Scope() operator must exist at this point so 257 * that we can actually open the scope to enter new names underneath it. --- 67 unchanged lines hidden (view full) --- 325 * There are only two conditions where it is acceptable that the name 326 * already exists: 327 * 1) the Scope() operator can reopen a scoping object that was 328 * previously defined (Scope, Method, Device, etc.) 329 * 2) Whenever we are parsing a deferred opcode (OpRegion, Buffer, 330 * BufferField, or Package), the name of the object is already 331 * in the namespace. 332 */ |
333 if (WalkState->DeferredNode) 334 { 335 /* This name is already in the namespace, get the node */ 336 337 Node = WalkState->DeferredNode; 338 Status = AE_OK; 339 break; 340 } 341 |
|
333 Flags = ACPI_NS_NO_UPSEARCH; 334 if ((WalkState->Opcode != AML_SCOPE_OP) && 335 (!(WalkState->ParseFlags & ACPI_PARSE_DEFERRED_OP))) 336 { 337 Flags |= ACPI_NS_ERROR_IF_FOUND; | 342 Flags = ACPI_NS_NO_UPSEARCH; 343 if ((WalkState->Opcode != AML_SCOPE_OP) && 344 (!(WalkState->ParseFlags & ACPI_PARSE_DEFERRED_OP))) 345 { 346 Flags |= ACPI_NS_ERROR_IF_FOUND; |
338 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DISPATCH, "Cannot already exist\n")); | 347 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "[%s] Cannot already exist\n", 348 AcpiUtGetTypeName (ObjectType))); |
339 } 340 else 341 { | 349 } 350 else 351 { |
342 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DISPATCH, "Both Find or Create allowed\n")); | 352 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "[%s] Both Find or Create allowed\n", 353 AcpiUtGetTypeName (ObjectType))); |
343 } 344 345 /* 346 * Enter the named type into the internal namespace. We enter the name 347 * as we go downward in the parse tree. Any necessary subobjects that involve 348 * arguments to the opcode must be created as we go back up the parse tree later. 349 */ 350 Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType, --- 344 unchanged lines hidden (view full) --- 695 } 696 return_ACPI_STATUS (AE_OK); 697 } 698 699 /* 700 * Enter the named type into the internal namespace. We enter the name 701 * as we go downward in the parse tree. Any necessary subobjects that involve 702 * arguments to the opcode must be created as we go back up the parse tree later. | 354 } 355 356 /* 357 * Enter the named type into the internal namespace. We enter the name 358 * as we go downward in the parse tree. Any necessary subobjects that involve 359 * arguments to the opcode must be created as we go back up the parse tree later. 360 */ 361 Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType, --- 344 unchanged lines hidden (view full) --- 706 } 707 return_ACPI_STATUS (AE_OK); 708 } 709 710 /* 711 * Enter the named type into the internal namespace. We enter the name 712 * as we go downward in the parse tree. Any necessary subobjects that involve 713 * arguments to the opcode must be created as we go back up the parse tree later. |
714 * 715 * Note: Name may already exist if we are executing a deferred opcode. |
|
703 */ | 716 */ |
717 if (WalkState->DeferredNode) 718 { 719 /* This name is already in the namespace, get the node */ 720 721 Node = WalkState->DeferredNode; 722 Status = AE_OK; 723 break; 724 } 725 |
|
704 Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, ObjectType, 705 ACPI_IMODE_EXECUTE, ACPI_NS_NO_UPSEARCH, WalkState, &(Node)); 706 break; 707 } 708 709 if (ACPI_FAILURE (Status)) 710 { 711 ACPI_REPORT_NSERROR (BufferPtr, Status); --- 352 unchanged lines hidden --- | 726 Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, ObjectType, 727 ACPI_IMODE_EXECUTE, ACPI_NS_NO_UPSEARCH, WalkState, &(Node)); 728 break; 729 } 730 731 if (ACPI_FAILURE (Status)) 732 { 733 ACPI_REPORT_NSERROR (BufferPtr, Status); --- 352 unchanged lines hidden --- |