1/****************************************************************************** 2 * 3 * Module Name: nsinit - namespace initialization |
4 * $Revision: 29 $ |
5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp. --- 132 unchanged lines hidden (view full) --- 145{ 146 ACPI_STATUS Status; 147 ACPI_INIT_WALK_INFO Info; 148 149 150 FUNCTION_TRACE ("NsInitializeObjects"); 151 152 |
153 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, 154 "**** Starting initialization of namespace objects ****\n")); 155 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "Completing Region and Field initialization:")); |
156 157 158 Info.FieldCount = 0; 159 Info.FieldInit = 0; 160 Info.OpRegionCount = 0; 161 Info.OpRegionInit = 0; 162 Info.ObjectCount = 0; 163 164 165 /* Walk entire namespace from the supplied root */ 166 167 Status = AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, 168 ACPI_UINT32_MAX, AcpiNsInitOneObject, 169 &Info, NULL); 170 if (ACPI_FAILURE (Status)) 171 { |
172 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "WalkNamespace failed! %x\n", Status)); |
173 } 174 |
175 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, 176 "\n%d/%d Regions, %d/%d Fields initialized (%d nodes total)\n", |
177 Info.OpRegionInit, Info.OpRegionCount, Info.FieldInit, 178 Info.FieldCount, Info.ObjectCount)); |
179 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, 180 "%d Control Methods found\n", Info.MethodCount)); 181 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, 182 "%d Op Regions found\n", Info.OpRegionCount)); |
183 184 return_ACPI_STATUS (AE_OK); 185} 186 187 188/******************************************************************************* 189 * 190 * FUNCTION: AcpiNsInitializeDevices --- 21 unchanged lines hidden (view full) --- 212 FUNCTION_TRACE ("NsInitializeDevices"); 213 214 215 Info.DeviceCount = 0; 216 Info.Num_STA = 0; 217 Info.Num_INI = 0; 218 219 |
220 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, "Executing device _INI methods:")); |
221 222 Status = AcpiNsWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, 223 ACPI_UINT32_MAX, FALSE, AcpiNsInitOneDevice, &Info, NULL); 224 225 if (ACPI_FAILURE (Status)) 226 { |
227 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "WalkNamespace failed! %x\n", Status)); |
228 } 229 230 |
231 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, 232 "\n%d Devices found: %d _STA, %d _INI\n", |
233 Info.DeviceCount, Info.Num_STA, Info.Num_INI)); 234 235 return_ACPI_STATUS (Status); 236} 237 238 239/******************************************************************************* 240 * --- 24 unchanged lines hidden (view full) --- 265{ 266 ACPI_OBJECT_TYPE8 Type; 267 ACPI_STATUS Status; 268 ACPI_INIT_WALK_INFO *Info = (ACPI_INIT_WALK_INFO *) Context; 269 ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle; 270 ACPI_OPERAND_OBJECT *ObjDesc; 271 272 |
273 PROC_NAME ("AcpiNsInitOneObject"); 274 275 |
276 Info->ObjectCount++; 277 278 279 /* And even then, we are only interested in a few object types */ 280 281 Type = AcpiNsGetType (ObjHandle); 282 ObjDesc = Node->Object; 283 if (!ObjDesc) --- 27 unchanged lines hidden (view full) --- 311 { 312 break; 313 } 314 315 Info->OpRegionInit++; 316 Status = AcpiDsGetRegionArguments (ObjDesc); 317 if (ACPI_FAILURE (Status)) 318 { |
319 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_ERROR, "\n")); 320 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 321 "%s while getting region arguments [%4.4s]\n", |
322 AcpiFormatException (Status), &Node->Name)); 323 } 324 |
325 if (!(AcpiDbgLevel & ACPI_LV_INIT)) |
326 { |
327 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, ".")); |
328 } 329 330 break; 331 332 333 case ACPI_TYPE_BUFFER_FIELD: 334 335 Info->FieldCount++; 336 if (ObjDesc->Common.Flags & AOPOBJ_DATA_VALID) 337 { 338 break; 339 } 340 341 Info->FieldInit++; 342 Status = AcpiDsGetBufferFieldArguments (ObjDesc); 343 if (ACPI_FAILURE (Status)) 344 { |
345 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_ERROR, "\n")); 346 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 347 "%s while getting buffer field arguments [%4.4s]\n", |
348 AcpiFormatException (Status), &Node->Name)); 349 } |
350 if (!(AcpiDbgLevel & ACPI_LV_INIT)) |
351 { |
352 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, ".")); |
353 } 354 355 356 break; 357 358 default: 359 break; 360 } --- 33 unchanged lines hidden (view full) --- 394 ACPI_NAMESPACE_NODE *Node; 395 UINT32 Flags; 396 ACPI_DEVICE_WALK_INFO *Info = (ACPI_DEVICE_WALK_INFO *) Context; 397 398 399 FUNCTION_TRACE ("AcpiNsInitOneDevice"); 400 401 |
402 if (!(AcpiDbgLevel & ACPI_LV_INIT)) |
403 { |
404 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OK, ".")); |
405 } 406 407 Info->DeviceCount++; 408 409 AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); 410 411 Node = AcpiNsConvertHandleToEntry (ObjHandle); 412 if (!Node) --- 41 unchanged lines hidden (view full) --- 454 455 else if (ACPI_FAILURE (Status)) 456 { 457 /* Ignore error and move on to next device */ 458 459#ifdef ACPI_DEBUG 460 NATIVE_CHAR *ScopeName = AcpiNsGetTablePathname (ObjHandle); 461 |
462 ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "%s._INI failed: %s\n", |
463 ScopeName, AcpiFormatException (Status))); 464 465 ACPI_MEM_FREE (ScopeName); 466#endif 467 } 468 469 else 470 { 471 /* Count of successful INIs */ 472 473 Info->Num_INI++; 474 } 475 476 return_ACPI_STATUS (AE_OK); 477} |