dsobject.c (67754) | dsobject.c (69450) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: dsobject - Dispatcher object management routines | 1/****************************************************************************** 2 * 3 * Module Name: dsobject - Dispatcher object management routines |
4 * $Revision: 48 $ | 4 * $Revision: 51 $ |
5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights --- 139 unchanged lines hidden (view full) --- 152 ACPI_HANDLE ObjHandle, 153 UINT32 Level, 154 void *Context, 155 void **ReturnValue) 156{ 157 OBJECT_TYPE_INTERNAL Type; 158 ACPI_STATUS Status; 159 ACPI_INIT_WALK_INFO *Info = (ACPI_INIT_WALK_INFO *) Context; | 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights --- 139 unchanged lines hidden (view full) --- 152 ACPI_HANDLE ObjHandle, 153 UINT32 Level, 154 void *Context, 155 void **ReturnValue) 156{ 157 OBJECT_TYPE_INTERNAL Type; 158 ACPI_STATUS Status; 159 ACPI_INIT_WALK_INFO *Info = (ACPI_INIT_WALK_INFO *) Context; |
160 UINT8 TableRevision; |
|
160 161 162 Info->ObjectCount++; | 161 162 163 Info->ObjectCount++; |
164 TableRevision = Info->TableDesc->Pointer->Revision; |
|
163 164 /* 165 * We are only interested in objects owned by the table that 166 * was just loaded 167 */ 168 169 if (((ACPI_NAMESPACE_NODE *) ObjHandle)->OwnerId != 170 Info->TableDesc->TableId) --- 18 unchanged lines hidden (view full) --- 189 190 191 case ACPI_TYPE_METHOD: 192 193 Info->MethodCount++; 194 195 DEBUG_PRINT_RAW (ACPI_OK, (".")); 196 | 165 166 /* 167 * We are only interested in objects owned by the table that 168 * was just loaded 169 */ 170 171 if (((ACPI_NAMESPACE_NODE *) ObjHandle)->OwnerId != 172 Info->TableDesc->TableId) --- 18 unchanged lines hidden (view full) --- 191 192 193 case ACPI_TYPE_METHOD: 194 195 Info->MethodCount++; 196 197 DEBUG_PRINT_RAW (ACPI_OK, (".")); 198 |
199 /* 200 * Set the execution data width (32 or 64) based upon the 201 * revision number of the parent ACPI table. 202 */ |
|
197 | 203 |
204 if (TableRevision == 1) 205 { 206 ((ACPI_NAMESPACE_NODE *)ObjHandle)->Flags |= ANOBJ_DATA_WIDTH_32; 207 } 208 |
|
198 /* 199 * Always parse methods to detect errors, we may delete 200 * the parse tree below 201 */ 202 203 Status = AcpiDsParseMethod (ObjHandle); 204 205 /* TBD: [Errors] what do we do with an error? */ 206 207 if (ACPI_FAILURE (Status)) 208 { 209 DEBUG_PRINT (ACPI_ERROR, 210 ("DsInitOneObject: Method %p [%4.4s] parse failed! %s\n", 211 ObjHandle, &((ACPI_NAMESPACE_NODE *)ObjHandle)->Name, 212 AcpiCmFormatException (Status))); 213 break; 214 } 215 216 /* | 209 /* 210 * Always parse methods to detect errors, we may delete 211 * the parse tree below 212 */ 213 214 Status = AcpiDsParseMethod (ObjHandle); 215 216 /* TBD: [Errors] what do we do with an error? */ 217 218 if (ACPI_FAILURE (Status)) 219 { 220 DEBUG_PRINT (ACPI_ERROR, 221 ("DsInitOneObject: Method %p [%4.4s] parse failed! %s\n", 222 ObjHandle, &((ACPI_NAMESPACE_NODE *)ObjHandle)->Name, 223 AcpiCmFormatException (Status))); 224 break; 225 } 226 227 /* |
217 * Keep the parse tree only if we are parsing all methods 218 * at init time (versus just-in-time) | 228 * Delete the parse tree. We simple re-parse the method 229 * for every execution since there isn't much overhead |
219 */ | 230 */ |
220 221 if (AcpiGbl_WhenToParseMethods != METHOD_PARSE_AT_INIT) 222 { 223 AcpiNsDeleteNamespaceSubtree (ObjHandle); 224 } 225 | 231 AcpiNsDeleteNamespaceSubtree (ObjHandle); |
226 break; 227 228 default: 229 break; 230 } 231 232 /* 233 * We ignore errors from above, and always return OK, since --- 28 unchanged lines hidden (view full) --- 262 FUNCTION_TRACE ("DsInitializeObjects"); 263 264 265 DEBUG_PRINT (TRACE_DISPATCH, 266 ("DsInitializeObjects: **** Starting initialization of namespace objects ****\n")); 267 DEBUG_PRINT_RAW (ACPI_OK, ("Parsing Methods:")); 268 269 | 232 break; 233 234 default: 235 break; 236 } 237 238 /* 239 * We ignore errors from above, and always return OK, since --- 28 unchanged lines hidden (view full) --- 268 FUNCTION_TRACE ("DsInitializeObjects"); 269 270 271 DEBUG_PRINT (TRACE_DISPATCH, 272 ("DsInitializeObjects: **** Starting initialization of namespace objects ****\n")); 273 DEBUG_PRINT_RAW (ACPI_OK, ("Parsing Methods:")); 274 275 |
270 Info.MethodCount = 0; 271 Info.OpRegionCount = 0; 272 Info.ObjectCount = 0; 273 Info.TableDesc = TableDesc; | 276 Info.MethodCount = 0; 277 Info.OpRegionCount = 0; 278 Info.ObjectCount = 0; 279 Info.TableDesc = TableDesc; |
274 275 276 /* Walk entire namespace from the supplied root */ 277 278 Status = AcpiWalkNamespace (ACPI_TYPE_ANY, StartNode, 279 ACPI_UINT32_MAX, AcpiDsInitOneObject, 280 &Info, NULL); 281 if (ACPI_FAILURE (Status)) --- 224 unchanged lines hidden (view full) --- 506 * 507 * RETURN: Status 508 * 509 * DESCRIPTION: Translate a parser Op object to the equivalent namespace object 510 * Simple objects are any objects other than a package object! 511 * 512 ****************************************************************************/ 513 | 280 281 282 /* Walk entire namespace from the supplied root */ 283 284 Status = AcpiWalkNamespace (ACPI_TYPE_ANY, StartNode, 285 ACPI_UINT32_MAX, AcpiDsInitOneObject, 286 &Info, NULL); 287 if (ACPI_FAILURE (Status)) --- 224 unchanged lines hidden (view full) --- 512 * 513 * RETURN: Status 514 * 515 * DESCRIPTION: Translate a parser Op object to the equivalent namespace object 516 * Simple objects are any objects other than a package object! 517 * 518 ****************************************************************************/ 519 |
514ACPI_STATUS | 520static ACPI_STATUS |
515AcpiDsBuildInternalSimpleObj ( 516 ACPI_WALK_STATE *WalkState, 517 ACPI_PARSE_OBJECT *Op, 518 ACPI_OPERAND_OBJECT **ObjDescPtr) 519{ 520 ACPI_OPERAND_OBJECT *ObjDesc; 521 OBJECT_TYPE_INTERNAL Type; 522 ACPI_STATUS Status; --- 35 unchanged lines hidden (view full) --- 558 AcpiCmFree (Name); 559 } 560 else 561 { 562 REPORT_WARNING (("Reference %s AML 0x%X not found\n", 563 Op->Value.String, Op->AmlOffset)); 564 } 565 *ObjDescPtr = NULL; | 521AcpiDsBuildInternalSimpleObj ( 522 ACPI_WALK_STATE *WalkState, 523 ACPI_PARSE_OBJECT *Op, 524 ACPI_OPERAND_OBJECT **ObjDescPtr) 525{ 526 ACPI_OPERAND_OBJECT *ObjDesc; 527 OBJECT_TYPE_INTERNAL Type; 528 ACPI_STATUS Status; --- 35 unchanged lines hidden (view full) --- 564 AcpiCmFree (Name); 565 } 566 else 567 { 568 REPORT_WARNING (("Reference %s AML 0x%X not found\n", 569 Op->Value.String, Op->AmlOffset)); 570 } 571 *ObjDescPtr = NULL; |
566 return_ACPI_STATUS (AE_OK); | |
567 } 568 569 return_ACPI_STATUS (Status); 570 } 571 } 572 573 /* 574 * The reference will be a Reference --- 231 unchanged lines hidden --- | 572 } 573 574 return_ACPI_STATUS (Status); 575 } 576 } 577 578 /* 579 * The reference will be a Reference --- 231 unchanged lines hidden --- |