Deleted Added
sdiff udiff text old ( 80062 ) new ( 82367 )
full compact
1/******************************************************************************
2 *
3 * Module Name: nsinit - namespace initialization
4 * $Revision: 28 $
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 DEBUG_PRINTP (TRACE_DISPATCH,
154 ("**** Starting initialization of namespace objects ****\n"));
155 DEBUG_PRINT_RAW (ACPI_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 DEBUG_PRINTP (ACPI_ERROR, ("WalkNamespace failed! %x\n", Status));
173 }
174
175 DEBUG_PRINT_RAW (ACPI_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 DEBUG_PRINTP (TRACE_DISPATCH,
180 ("%d Control Methods found\n", Info.MethodCount));
181 DEBUG_PRINTP (TRACE_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 DEBUG_PRINT_RAW (ACPI_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 DEBUG_PRINTP (ACPI_ERROR, ("WalkNamespace failed! %x\n", Status));
228 }
229
230
231 DEBUG_PRINT_RAW (ACPI_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 Info->ObjectCount++;
274
275
276 /* And even then, we are only interested in a few object types */
277
278 Type = AcpiNsGetType (ObjHandle);
279 ObjDesc = Node->Object;
280 if (!ObjDesc)

--- 27 unchanged lines hidden (view full) ---

308 {
309 break;
310 }
311
312 Info->OpRegionInit++;
313 Status = AcpiDsGetRegionArguments (ObjDesc);
314 if (ACPI_FAILURE (Status))
315 {
316 DEBUG_PRINT_RAW (ACPI_ERROR, ("\n"));
317 DEBUG_PRINT (ACPI_ERROR,
318 ("%s while getting region arguments [%4.4s]\n",
319 AcpiFormatException (Status), &Node->Name));
320 }
321
322 if (!(AcpiDbgLevel & TRACE_INIT))
323 {
324 DEBUG_PRINT_RAW (ACPI_OK, ("."));
325 }
326
327 break;
328
329
330 case ACPI_TYPE_BUFFER_FIELD:
331
332 Info->FieldCount++;
333 if (ObjDesc->Common.Flags & AOPOBJ_DATA_VALID)
334 {
335 break;
336 }
337
338 Info->FieldInit++;
339 Status = AcpiDsGetBufferFieldArguments (ObjDesc);
340 if (ACPI_FAILURE (Status))
341 {
342 DEBUG_PRINT_RAW (ACPI_ERROR, ("\n"));
343 DEBUG_PRINT (ACPI_ERROR,
344 ("%s while getting buffer field arguments [%4.4s]\n",
345 AcpiFormatException (Status), &Node->Name));
346 }
347 if (!(AcpiDbgLevel & TRACE_INIT))
348 {
349 DEBUG_PRINT_RAW (ACPI_OK, ("."));
350 }
351
352
353 break;
354
355 default:
356 break;
357 }

--- 33 unchanged lines hidden (view full) ---

391 ACPI_NAMESPACE_NODE *Node;
392 UINT32 Flags;
393 ACPI_DEVICE_WALK_INFO *Info = (ACPI_DEVICE_WALK_INFO *) Context;
394
395
396 FUNCTION_TRACE ("AcpiNsInitOneDevice");
397
398
399 if (!(AcpiDbgLevel & TRACE_INIT))
400 {
401 DEBUG_PRINT_RAW (ACPI_OK, ("."));
402 }
403
404 Info->DeviceCount++;
405
406 AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
407
408 Node = AcpiNsConvertHandleToEntry (ObjHandle);
409 if (!Node)

--- 41 unchanged lines hidden (view full) ---

451
452 else if (ACPI_FAILURE (Status))
453 {
454 /* Ignore error and move on to next device */
455
456#ifdef ACPI_DEBUG
457 NATIVE_CHAR *ScopeName = AcpiNsGetTablePathname (ObjHandle);
458
459 DEBUG_PRINTP (ACPI_WARN, ("%s._INI failed: %s\n",
460 ScopeName, AcpiFormatException (Status)));
461
462 ACPI_MEM_FREE (ScopeName);
463#endif
464 }
465
466 else
467 {
468 /* Count of successful INIs */
469
470 Info->Num_INI++;
471 }
472
473 return_ACPI_STATUS (AE_OK);
474}