dswload.c (198237) | dswload.c (200553) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: dswload - Dispatcher namespace load callbacks 4 * 5 *****************************************************************************/ 6 7/****************************************************************************** 8 * --- 282 unchanged lines hidden (view full) --- 291 /* These are acceptable types */ 292 break; 293 294 case ACPI_TYPE_INTEGER: 295 case ACPI_TYPE_STRING: 296 case ACPI_TYPE_BUFFER: 297 298 /* | 1/****************************************************************************** 2 * 3 * Module Name: dswload - Dispatcher namespace load callbacks 4 * 5 *****************************************************************************/ 6 7/****************************************************************************** 8 * --- 282 unchanged lines hidden (view full) --- 291 /* These are acceptable types */ 292 break; 293 294 case ACPI_TYPE_INTEGER: 295 case ACPI_TYPE_STRING: 296 case ACPI_TYPE_BUFFER: 297 298 /* |
299 * These types we will allow, but we will change the type. This 300 * enables some existing code of the form: | 299 * These types we will allow, but we will change the type. 300 * This enables some existing code of the form: |
301 * 302 * Name (DEB, 0) 303 * Scope (DEB) { ... } 304 * | 301 * 302 * Name (DEB, 0) 303 * Scope (DEB) { ... } 304 * |
305 * Note: silently change the type here. On the second pass, we will report 306 * a warning | 305 * Note: silently change the type here. On the second pass, 306 * we will report a warning |
307 */ 308 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, | 307 */ 308 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, |
309 "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n", 310 Path, AcpiUtGetTypeName (Node->Type))); | 309 "Type override - [%4.4s] had invalid type (%s) " 310 "for Scope operator, changed to type ANY\n", 311 AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type))); |
311 312 Node->Type = ACPI_TYPE_ANY; 313 WalkState->ScopeInfo->Common.Value = ACPI_TYPE_ANY; 314 break; 315 316 default: 317 318 /* All other types are an error */ 319 320 ACPI_ERROR ((AE_INFO, | 312 313 Node->Type = ACPI_TYPE_ANY; 314 WalkState->ScopeInfo->Common.Value = ACPI_TYPE_ANY; 315 break; 316 317 default: 318 319 /* All other types are an error */ 320 321 ACPI_ERROR ((AE_INFO, |
321 "Invalid type (%s) for target of Scope operator [%4.4s] (Cannot override)", 322 AcpiUtGetTypeName (Node->Type), Path)); | 322 "Invalid type (%s) for target of " 323 "Scope operator [%4.4s] (Cannot override)", 324 AcpiUtGetTypeName (Node->Type), AcpiUtGetNodeName (Node))); |
323 324 return_ACPI_STATUS (AE_AML_OPERAND_TYPE); 325 } 326 break; 327 328 329 default: 330 /* --- 458 unchanged lines hidden (view full) --- 789 /* These are acceptable types */ 790 break; 791 792 case ACPI_TYPE_INTEGER: 793 case ACPI_TYPE_STRING: 794 case ACPI_TYPE_BUFFER: 795 796 /* | 325 326 return_ACPI_STATUS (AE_AML_OPERAND_TYPE); 327 } 328 break; 329 330 331 default: 332 /* --- 458 unchanged lines hidden (view full) --- 791 /* These are acceptable types */ 792 break; 793 794 case ACPI_TYPE_INTEGER: 795 case ACPI_TYPE_STRING: 796 case ACPI_TYPE_BUFFER: 797 798 /* |
797 * These types we will allow, but we will change the type. This 798 * enables some existing code of the form: | 799 * These types we will allow, but we will change the type. 800 * This enables some existing code of the form: |
799 * 800 * Name (DEB, 0) 801 * Scope (DEB) { ... } 802 */ 803 ACPI_WARNING ((AE_INFO, | 801 * 802 * Name (DEB, 0) 803 * Scope (DEB) { ... } 804 */ 805 ACPI_WARNING ((AE_INFO, |
804 "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)", 805 BufferPtr, AcpiUtGetTypeName (Node->Type))); | 806 "Type override - [%4.4s] had invalid type (%s) " 807 "for Scope operator, changed to type ANY\n", 808 AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type))); |
806 807 Node->Type = ACPI_TYPE_ANY; 808 WalkState->ScopeInfo->Common.Value = ACPI_TYPE_ANY; 809 break; 810 811 default: 812 813 /* All other types are an error */ 814 815 ACPI_ERROR ((AE_INFO, | 809 810 Node->Type = ACPI_TYPE_ANY; 811 WalkState->ScopeInfo->Common.Value = ACPI_TYPE_ANY; 812 break; 813 814 default: 815 816 /* All other types are an error */ 817 818 ACPI_ERROR ((AE_INFO, |
816 "Invalid type (%s) for target of Scope operator [%4.4s]", 817 AcpiUtGetTypeName (Node->Type), BufferPtr)); | 819 "Invalid type (%s) for target of " 820 "Scope operator [%4.4s] (Cannot override)", 821 AcpiUtGetTypeName (Node->Type), AcpiUtGetNodeName (Node))); |
818 819 return (AE_AML_OPERAND_TYPE); 820 } 821 break; 822 823 default: 824 825 /* All other opcodes */ --- 323 unchanged lines hidden (view full) --- 1149 ((Op->Common.Value.Arg)->Common.Value.Integer); 1150 } 1151 else 1152 { 1153 RegionSpace = REGION_DATA_TABLE; 1154 } 1155 1156 /* | 822 823 return (AE_AML_OPERAND_TYPE); 824 } 825 break; 826 827 default: 828 829 /* All other opcodes */ --- 323 unchanged lines hidden (view full) --- 1153 ((Op->Common.Value.Arg)->Common.Value.Integer); 1154 } 1155 else 1156 { 1157 RegionSpace = REGION_DATA_TABLE; 1158 } 1159 1160 /* |
1157 * If we are executing a method, initialize the region | 1161 * The OpRegion is not fully parsed at this time. The only valid 1162 * argument is the SpaceId. (We must save the address of the 1163 * AML of the address and length operands) 1164 * 1165 * If we have a valid region, initialize it. The namespace is 1166 * unlocked at this point. 1167 * 1168 * Need to unlock interpreter if it is locked (if we are running 1169 * a control method), in order to allow _REG methods to be run 1170 * during AcpiEvInitializeRegion. |
1158 */ 1159 if (WalkState->MethodNode) 1160 { | 1171 */ 1172 if (WalkState->MethodNode) 1173 { |
1174 /* 1175 * Executing a method: initialize the region and unlock 1176 * the interpreter 1177 */ |
|
1161 Status = AcpiExCreateRegion (Op->Named.Data, Op->Named.Length, 1162 RegionSpace, WalkState); 1163 if (ACPI_FAILURE (Status)) 1164 { 1165 return (Status); 1166 } | 1178 Status = AcpiExCreateRegion (Op->Named.Data, Op->Named.Length, 1179 RegionSpace, WalkState); 1180 if (ACPI_FAILURE (Status)) 1181 { 1182 return (Status); 1183 } |
1184 1185 AcpiExExitInterpreter (); |
|
1167 } 1168 | 1186 } 1187 |
1169 /* 1170 * The OpRegion is not fully parsed at this time. Only valid 1171 * argument is the SpaceId. (We must save the address of the 1172 * AML of the address and length operands) 1173 */ 1174 1175 /* 1176 * If we have a valid region, initialize it 1177 * Namespace is NOT locked at this point. 1178 * 1179 * TBD: need to unlock interpreter if it is locked, in order 1180 * to allow _REG methods to be run. 1181 */ | |
1182 Status = AcpiEvInitializeRegion (AcpiNsGetAttachedObject (Node), 1183 FALSE); | 1188 Status = AcpiEvInitializeRegion (AcpiNsGetAttachedObject (Node), 1189 FALSE); |
1190 if (WalkState->MethodNode) 1191 { 1192 AcpiExEnterInterpreter (); 1193 } 1194 |
|
1184 if (ACPI_FAILURE (Status)) 1185 { 1186 /* 1187 * If AE_NOT_EXIST is returned, it is not fatal 1188 * because many regions get created before a handler 1189 * is installed for said region. 1190 */ 1191 if (AE_NOT_EXIST == Status) --- 114 unchanged lines hidden --- | 1195 if (ACPI_FAILURE (Status)) 1196 { 1197 /* 1198 * If AE_NOT_EXIST is returned, it is not fatal 1199 * because many regions get created before a handler 1200 * is installed for said region. 1201 */ 1202 if (AE_NOT_EXIST == Status) --- 114 unchanged lines hidden --- |