Print this page
acpica-unix2-20130823
PANKOVs restructure

*** 3,13 **** * Module Name: dswload2 - Dispatcher second pass namespace load callbacks * *****************************************************************************/ /* ! * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: --- 3,13 ---- * Module Name: dswload2 - Dispatcher second pass namespace load callbacks * *****************************************************************************/ /* ! * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
*** 234,260 **** * Name (DEB, 0) * Scope (DEB) { ... } */ ACPI_WARNING ((AE_INFO, "Type override - [%4.4s] had invalid type (%s) " ! "for Scope operator, changed to type ANY\n", AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type))); Node->Type = ACPI_TYPE_ANY; WalkState->ScopeInfo->Common.Value = ACPI_TYPE_ANY; break; default: /* All other types are an error */ ACPI_ERROR ((AE_INFO, "Invalid type (%s) for target of " "Scope operator [%4.4s] (Cannot override)", AcpiUtGetTypeName (Node->Type), AcpiUtGetNodeName (Node))); ! return (AE_AML_OPERAND_TYPE); } break; default: --- 234,274 ---- * Name (DEB, 0) * Scope (DEB) { ... } */ ACPI_WARNING ((AE_INFO, "Type override - [%4.4s] had invalid type (%s) " ! "for Scope operator, changed to type ANY", AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type))); Node->Type = ACPI_TYPE_ANY; WalkState->ScopeInfo->Common.Value = ACPI_TYPE_ANY; break; + case ACPI_TYPE_METHOD: + + /* + * Allow scope change to root during execution of module-level + * code. Root is typed METHOD during this time. + */ + if ((Node == AcpiGbl_RootNode) && + (WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL)) + { + break; + } + + /*lint -fallthrough */ + default: /* All other types are an error */ ACPI_ERROR ((AE_INFO, "Invalid type (%s) for target of " "Scope operator [%4.4s] (Cannot override)", AcpiUtGetTypeName (Node->Type), AcpiUtGetNodeName (Node))); ! return_ACPI_STATUS (AE_AML_OPERAND_TYPE); } break; default:
*** 480,490 **** * be evaluated later during the execution phase */ Status = AcpiDsCreateBufferField (Op, WalkState); break; - case AML_TYPE_NAMED_FIELD: /* * If we are executing a method, initialize the field */ if (WalkState->MethodNode) --- 494,503 ----
*** 509,524 **** Status = AcpiDsCreateField (Op, Arg->Common.Node, WalkState); break; default: /* All NAMED_FIELD opcodes must be handled above */ break; } break; - case AML_TYPE_NAMED_SIMPLE: Status = AcpiDsCreateOperands (WalkState, Arg); if (ACPI_FAILURE (Status)) { --- 522,537 ---- Status = AcpiDsCreateField (Op, Arg->Common.Node, WalkState); break; default: + /* All NAMED_FIELD opcodes must be handled above */ break; } break; case AML_TYPE_NAMED_SIMPLE: Status = AcpiDsCreateOperands (WalkState, Arg); if (ACPI_FAILURE (Status)) {
*** 545,561 **** case AML_EVENT_OP: Status = AcpiExCreateEvent (WalkState); break; - case AML_ALIAS_OP: Status = AcpiExCreateAlias (WalkState); break; default: /* Unknown opcode */ Status = AE_OK; goto Cleanup; } --- 558,574 ---- case AML_EVENT_OP: Status = AcpiExCreateEvent (WalkState); break; case AML_ALIAS_OP: Status = AcpiExCreateAlias (WalkState); break; default: + /* Unknown opcode */ Status = AE_OK; goto Cleanup; }
*** 609,619 **** */ Status = AcpiExCreateRegion (Op->Named.Data, Op->Named.Length, RegionSpace, WalkState); if (ACPI_FAILURE (Status)) { ! return (Status); } AcpiExExitInterpreter (); } --- 622,632 ---- */ Status = AcpiExCreateRegion (Op->Named.Data, Op->Named.Length, RegionSpace, WalkState); if (ACPI_FAILURE (Status)) { ! return_ACPI_STATUS (Status); } AcpiExExitInterpreter (); }
*** 636,652 **** Status = AE_OK; } } break; - case AML_NAME_OP: Status = AcpiDsCreateNode (WalkState, Node, Op); break; - case AML_METHOD_OP: /* * MethodOp PkgLength NameString MethodFlags TermList * * Note: We must create the method node/object pair as soon as we --- 649,663 ----
*** 680,701 **** break; #endif /* ACPI_NO_METHOD_EXECUTION */ default: /* All NAMED_COMPLEX opcodes must be handled above */ break; } break; - case AML_CLASS_INTERNAL: /* case AML_INT_NAMEPATH_OP: */ break; - case AML_CLASS_METHOD_CALL: ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "RESOLVING-MethodCall: State=%p Op=%p NamedObj=%p\n", WalkState, Op, Node)); --- 691,711 ---- break; #endif /* ACPI_NO_METHOD_EXECUTION */ default: + /* All NAMED_COMPLEX opcodes must be handled above */ break; } break; case AML_CLASS_INTERNAL: /* case AML_INT_NAMEPATH_OP: */ break; case AML_CLASS_METHOD_CALL: ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "RESOLVING-MethodCall: State=%p Op=%p NamedObj=%p\n", WalkState, Op, Node));
*** 731,740 **** --- 741,751 ---- } break; default: + break; } Cleanup:
*** 742,747 **** WalkState->Operands[0] = NULL; WalkState->NumOperands = 0; return_ACPI_STATUS (Status); } - --- 753,757 ----