Deleted Added
sdiff udiff text old ( 151937 ) new ( 167802 )
full compact
1/******************************************************************************
2 *
3 * Module Name: dsinit - Object initialization namespace walk
4 * $Revision: 1.28 $
5 *
6 *****************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
13 * All rights reserved.
14 *
15 * 2. License
16 *
17 * 2.1. This is your license from Intel Corp. under its intellectual property
18 * rights. You may have additional license terms from the party that provided
19 * you this software, covering your right to use that party's intellectual
20 * property rights.

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

114 *
115 *****************************************************************************/
116
117#define __DSINIT_C__
118
119#include <contrib/dev/acpica/acpi.h>
120#include <contrib/dev/acpica/acdispat.h>
121#include <contrib/dev/acpica/acnamesp.h>
122#include <contrib/dev/acpica/actables.h>
123
124#define _COMPONENT ACPI_DISPATCHER
125 ACPI_MODULE_NAME ("dsinit")
126
127/* Local prototypes */
128
129static ACPI_STATUS
130AcpiDsInitOneObject (

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

162 void **ReturnValue)
163{
164 ACPI_INIT_WALK_INFO *Info = (ACPI_INIT_WALK_INFO *) Context;
165 ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
166 ACPI_OBJECT_TYPE Type;
167 ACPI_STATUS Status;
168
169
170 ACPI_FUNCTION_ENTRY ();
171
172
173 /*
174 * We are only interested in NS nodes owned by the table that
175 * was just loaded
176 */
177 if (Node->OwnerId != Info->OwnerId)
178 {
179 return (AE_OK);
180 }
181
182 Info->ObjectCount++;
183
184 /* And even then, we are only interested in a few object types */
185
186 Type = AcpiNsGetType (ObjHandle);
187
188 switch (Type)
189 {
190 case ACPI_TYPE_REGION:
191
192 Status = AcpiDsInitializeRegion (ObjHandle);
193 if (ACPI_FAILURE (Status))
194 {
195 ACPI_EXCEPTION ((AE_INFO, Status,
196 "During Region initialization %p [%4.4s]",
197 ObjHandle, AcpiUtGetNodeName (ObjHandle)));
198 }
199
200 Info->OpRegionCount++;
201 break;
202
203
204 case ACPI_TYPE_METHOD:
205
206 Info->MethodCount++;
207 break;
208
209
210 case ACPI_TYPE_DEVICE:
211
212 Info->DeviceCount++;
213 break;

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

236 *
237 * DESCRIPTION: Walk the namespace starting at "StartNode" and perform any
238 * necessary initialization on the objects found therein
239 *
240 ******************************************************************************/
241
242ACPI_STATUS
243AcpiDsInitializeObjects (
244 ACPI_NATIVE_UINT TableIndex,
245 ACPI_NAMESPACE_NODE *StartNode)
246{
247 ACPI_STATUS Status;
248 ACPI_INIT_WALK_INFO Info;
249 ACPI_TABLE_HEADER *Table;
250 ACPI_OWNER_ID OwnerId;
251
252
253 ACPI_FUNCTION_TRACE (DsInitializeObjects);
254
255
256 Status = AcpiTbGetOwnerId (TableIndex, &OwnerId);
257 if (ACPI_FAILURE (Status))
258 {
259 return_ACPI_STATUS (Status);
260 }
261
262 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
263 "**** Starting initialization of namespace objects ****\n"));
264 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "Parsing all Control Methods:"));
265
266 Info.MethodCount = 0;
267 Info.OpRegionCount = 0;
268 Info.ObjectCount = 0;
269 Info.DeviceCount = 0;
270 Info.TableIndex = TableIndex;
271 Info.OwnerId = OwnerId;
272
273 /* Walk entire namespace from the supplied root */
274
275 Status = AcpiWalkNamespace (ACPI_TYPE_ANY, StartNode, ACPI_UINT32_MAX,
276 AcpiDsInitOneObject, &Info, NULL);
277 if (ACPI_FAILURE (Status))
278 {
279 ACPI_EXCEPTION ((AE_INFO, Status, "During WalkNamespace"));
280 }
281
282 Status = AcpiGetTableByIndex (TableIndex, &Table);
283 if (ACPI_FAILURE (Status))
284 {
285 return_ACPI_STATUS (Status);
286 }
287
288 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
289 "\nTable [%4.4s](id %4.4X) - %hd Objects with %hd Devices %hd Methods %hd Regions\n",
290 Table->Signature, OwnerId, Info.ObjectCount,
291 Info.DeviceCount, Info.MethodCount, Info.OpRegionCount));
292
293 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
294 "%hd Methods, %hd Regions\n", Info.MethodCount, Info.OpRegionCount));
295
296 return_ACPI_STATUS (AE_OK);
297}
298
299