Print this page
acpica-unix2-20130823
PANKOVs restructure
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/intel/sys/acpi/acnamesp.h
+++ new/usr/src/common/acpica/include/acnamesp.h
1 1 /******************************************************************************
2 2 *
3 3 * Name: acnamesp.h - Namespace subcomponent prototypes and defines
4 4 *
5 5 *****************************************************************************/
6 6
7 7 /*
8 - * Copyright (C) 2000 - 2011, Intel Corp.
8 + * Copyright (C) 2000 - 2013, Intel Corp.
9 9 * All rights reserved.
10 10 *
11 11 * Redistribution and use in source and binary forms, with or without
12 12 * modification, are permitted provided that the following conditions
13 13 * are met:
14 14 * 1. Redistributions of source code must retain the above copyright
15 15 * notice, this list of conditions, and the following disclaimer,
16 16 * without modification.
17 17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 18 * substantially similar to the "NO WARRANTY" disclaimer below
19 19 * ("Disclaimer") and any redistribution must be conditioned upon
20 20 * including a substantially similar Disclaimer requirement for further
21 21 * binary redistribution.
22 22 * 3. Neither the names of the above-listed copyright holders nor the names
23 23 * of any contributors may be used to endorse or promote products derived
24 24 * from this software without specific prior written permission.
25 25 *
26 26 * Alternatively, this software may be distributed under the terms of the
27 27 * GNU General Public License ("GPL") version 2 as published by the Free
28 28 * Software Foundation.
29 29 *
30 30 * NO WARRANTY
31 31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 41 * POSSIBILITY OF SUCH DAMAGES.
42 42 */
43 43
44 44 #ifndef __ACNAMESP_H__
45 45 #define __ACNAMESP_H__
46 46
47 47
48 48 /* To search the entire name space, pass this as SearchBase */
49 49
50 50 #define ACPI_NS_ALL ((ACPI_HANDLE)0)
51 51
52 52 /*
53 53 * Elements of AcpiNsProperties are bit significant
54 54 * and should be one-to-one with values of ACPI_OBJECT_TYPE
55 55 */
56 56 #define ACPI_NS_NORMAL 0
57 57 #define ACPI_NS_NEWSCOPE 1 /* a definition of this type opens a name scope */
58 58 #define ACPI_NS_LOCAL 2 /* suppress search of enclosing scopes */
59 59
60 60 /* Flags for AcpiNsLookup, AcpiNsSearchAndEnter */
61 61
62 62 #define ACPI_NS_NO_UPSEARCH 0
63 63 #define ACPI_NS_SEARCH_PARENT 0x01
64 64 #define ACPI_NS_DONT_OPEN_SCOPE 0x02
65 65 #define ACPI_NS_NO_PEER_SEARCH 0x04
66 66 #define ACPI_NS_ERROR_IF_FOUND 0x08
67 67 #define ACPI_NS_PREFIX_IS_SCOPE 0x10
68 68 #define ACPI_NS_EXTERNAL 0x20
69 69 #define ACPI_NS_TEMPORARY 0x40
70 70
71 71 /* Flags for AcpiNsWalkNamespace */
72 72
73 73 #define ACPI_NS_WALK_NO_UNLOCK 0
74 74 #define ACPI_NS_WALK_UNLOCK 0x01
75 75 #define ACPI_NS_WALK_TEMP_NODES 0x02
76 76
77 77 /* Object is not a package element */
78 78
79 79 #define ACPI_NOT_PACKAGE_ELEMENT ACPI_UINT32_MAX
80 80
81 81 /* Always emit warning message, not dependent on node flags */
82 82
83 83 #define ACPI_WARN_ALWAYS 0
84 84
85 85
86 86 /*
87 87 * nsinit - Namespace initialization
88 88 */
89 89 ACPI_STATUS
90 90 AcpiNsInitializeObjects (
91 91 void);
92 92
93 93 ACPI_STATUS
94 94 AcpiNsInitializeDevices (
95 95 void);
96 96
97 97
98 98 /*
99 99 * nsload - Namespace loading
100 100 */
101 101 ACPI_STATUS
102 102 AcpiNsLoadNamespace (
103 103 void);
104 104
105 105 ACPI_STATUS
106 106 AcpiNsLoadTable (
107 107 UINT32 TableIndex,
108 108 ACPI_NAMESPACE_NODE *Node);
109 109
↓ open down ↓ |
91 lines elided |
↑ open up ↑ |
110 110
111 111 /*
112 112 * nswalk - walk the namespace
113 113 */
114 114 ACPI_STATUS
115 115 AcpiNsWalkNamespace (
116 116 ACPI_OBJECT_TYPE Type,
117 117 ACPI_HANDLE StartObject,
118 118 UINT32 MaxDepth,
119 119 UINT32 Flags,
120 - ACPI_WALK_CALLBACK PreOrderVisit,
121 - ACPI_WALK_CALLBACK PostOrderVisit,
120 + ACPI_WALK_CALLBACK DescendingCallback,
121 + ACPI_WALK_CALLBACK AscendingCallback,
122 122 void *Context,
123 123 void **ReturnValue);
124 124
125 125 ACPI_NAMESPACE_NODE *
126 126 AcpiNsGetNextNode (
127 127 ACPI_NAMESPACE_NODE *Parent,
128 128 ACPI_NAMESPACE_NODE *Child);
129 129
130 130 ACPI_NAMESPACE_NODE *
131 131 AcpiNsGetNextNodeTyped (
132 132 ACPI_OBJECT_TYPE Type,
133 133 ACPI_NAMESPACE_NODE *Parent,
134 134 ACPI_NAMESPACE_NODE *Child);
135 135
136 136 /*
137 137 * nsparse - table parsing
138 138 */
139 139 ACPI_STATUS
140 140 AcpiNsParseTable (
141 141 UINT32 TableIndex,
142 142 ACPI_NAMESPACE_NODE *StartNode);
143 143
144 144 ACPI_STATUS
145 145 AcpiNsOneCompleteParse (
146 146 UINT32 PassNumber,
147 147 UINT32 TableIndex,
148 148 ACPI_NAMESPACE_NODE *StartNode);
149 149
150 150
151 151 /*
152 152 * nsaccess - Top-level namespace access
153 153 */
154 154 ACPI_STATUS
155 155 AcpiNsRootInitialize (
156 156 void);
157 157
158 158 ACPI_STATUS
159 159 AcpiNsLookup (
160 160 ACPI_GENERIC_STATE *ScopeInfo,
161 161 char *Name,
162 162 ACPI_OBJECT_TYPE Type,
163 163 ACPI_INTERPRETER_MODE InterpreterMode,
164 164 UINT32 Flags,
165 165 ACPI_WALK_STATE *WalkState,
166 166 ACPI_NAMESPACE_NODE **RetNode);
167 167
168 168
169 169 /*
170 170 * nsalloc - Named object allocation/deallocation
171 171 */
172 172 ACPI_NAMESPACE_NODE *
173 173 AcpiNsCreateNode (
174 174 UINT32 Name);
175 175
176 176 void
177 177 AcpiNsDeleteNode (
178 178 ACPI_NAMESPACE_NODE *Node);
179 179
180 180 void
181 181 AcpiNsRemoveNode (
182 182 ACPI_NAMESPACE_NODE *Node);
183 183
184 184 void
185 185 AcpiNsDeleteNamespaceSubtree (
186 186 ACPI_NAMESPACE_NODE *ParentHandle);
187 187
188 188 void
189 189 AcpiNsDeleteNamespaceByOwner (
190 190 ACPI_OWNER_ID OwnerId);
191 191
192 192 void
193 193 AcpiNsDetachObject (
194 194 ACPI_NAMESPACE_NODE *Node);
195 195
196 196 void
↓ open down ↓ |
65 lines elided |
↑ open up ↑ |
197 197 AcpiNsDeleteChildren (
198 198 ACPI_NAMESPACE_NODE *Parent);
199 199
200 200 int
201 201 AcpiNsCompareNames (
202 202 char *Name1,
203 203 char *Name2);
204 204
205 205
206 206 /*
207 + * nsconvert - Dynamic object conversion routines
208 + */
209 +ACPI_STATUS
210 +AcpiNsConvertToInteger (
211 + ACPI_OPERAND_OBJECT *OriginalObject,
212 + ACPI_OPERAND_OBJECT **ReturnObject);
213 +
214 +ACPI_STATUS
215 +AcpiNsConvertToString (
216 + ACPI_OPERAND_OBJECT *OriginalObject,
217 + ACPI_OPERAND_OBJECT **ReturnObject);
218 +
219 +ACPI_STATUS
220 +AcpiNsConvertToBuffer (
221 + ACPI_OPERAND_OBJECT *OriginalObject,
222 + ACPI_OPERAND_OBJECT **ReturnObject);
223 +
224 +ACPI_STATUS
225 +AcpiNsConvertToUnicode (
226 + ACPI_OPERAND_OBJECT *OriginalObject,
227 + ACPI_OPERAND_OBJECT **ReturnObject);
228 +
229 +ACPI_STATUS
230 +AcpiNsConvertToResource (
231 + ACPI_OPERAND_OBJECT *OriginalObject,
232 + ACPI_OPERAND_OBJECT **ReturnObject);
233 +
234 +
235 +/*
207 236 * nsdump - Namespace dump/print utilities
208 237 */
209 238 void
210 239 AcpiNsDumpTables (
211 240 ACPI_HANDLE SearchBase,
212 241 UINT32 MaxDepth);
213 242
214 243 void
215 244 AcpiNsDumpEntry (
216 245 ACPI_HANDLE Handle,
217 246 UINT32 DebugLevel);
218 247
219 248 void
220 249 AcpiNsDumpPathname (
221 250 ACPI_HANDLE Handle,
222 251 char *Msg,
223 252 UINT32 Level,
224 253 UINT32 Component);
225 254
226 255 void
227 256 AcpiNsPrintPathname (
228 257 UINT32 NumSegments,
229 258 char *Pathname);
230 259
231 260 ACPI_STATUS
232 261 AcpiNsDumpOneObject (
233 262 ACPI_HANDLE ObjHandle,
234 263 UINT32 Level,
235 264 void *Context,
↓ open down ↓ |
19 lines elided |
↑ open up ↑ |
236 265 void **ReturnValue);
237 266
238 267 void
239 268 AcpiNsDumpObjects (
240 269 ACPI_OBJECT_TYPE Type,
241 270 UINT8 DisplayType,
242 271 UINT32 MaxDepth,
243 272 ACPI_OWNER_ID OwnerId,
244 273 ACPI_HANDLE StartHandle);
245 274
275 +void
276 +AcpiNsDumpObjectPaths (
277 + ACPI_OBJECT_TYPE Type,
278 + UINT8 DisplayType,
279 + UINT32 MaxDepth,
280 + ACPI_OWNER_ID OwnerId,
281 + ACPI_HANDLE StartHandle);
246 282
283 +
247 284 /*
248 285 * nseval - Namespace evaluation functions
249 286 */
250 287 ACPI_STATUS
251 288 AcpiNsEvaluate (
252 289 ACPI_EVALUATE_INFO *Info);
253 290
254 291 void
255 292 AcpiNsExecModuleCodeList (
256 293 void);
257 294
258 295
259 296 /*
260 - * nspredef - Support for predefined/reserved names
297 + * nsarguments - Argument count/type checking for predefined/reserved names
261 298 */
262 -ACPI_STATUS
263 -AcpiNsCheckPredefinedNames (
264 - ACPI_NAMESPACE_NODE *Node,
265 - UINT32 UserParamCount,
266 - ACPI_STATUS ReturnStatus,
267 - ACPI_OPERAND_OBJECT **ReturnObject);
268 -
269 -const ACPI_PREDEFINED_INFO *
270 -AcpiNsCheckForPredefinedName (
271 - ACPI_NAMESPACE_NODE *Node);
272 -
273 299 void
274 -AcpiNsCheckParameterCount (
300 +AcpiNsCheckArgumentCount (
275 301 char *Pathname,
276 302 ACPI_NAMESPACE_NODE *Node,
277 303 UINT32 UserParamCount,
278 304 const ACPI_PREDEFINED_INFO *Info);
279 305
306 +void
307 +AcpiNsCheckAcpiCompliance (
308 + char *Pathname,
309 + ACPI_NAMESPACE_NODE *Node,
310 + const ACPI_PREDEFINED_INFO *Predefined);
280 311
312 +void
313 +AcpiNsCheckArgumentTypes (
314 + ACPI_EVALUATE_INFO *Info);
315 +
316 +
281 317 /*
318 + * nspredef - Return value checking for predefined/reserved names
319 + */
320 +ACPI_STATUS
321 +AcpiNsCheckReturnValue (
322 + ACPI_NAMESPACE_NODE *Node,
323 + ACPI_EVALUATE_INFO *Info,
324 + UINT32 UserParamCount,
325 + ACPI_STATUS ReturnStatus,
326 + ACPI_OPERAND_OBJECT **ReturnObject);
327 +
328 +ACPI_STATUS
329 +AcpiNsCheckObjectType (
330 + ACPI_EVALUATE_INFO *Info,
331 + ACPI_OPERAND_OBJECT **ReturnObjectPtr,
332 + UINT32 ExpectedBtypes,
333 + UINT32 PackageIndex);
334 +
335 +
336 +/*
337 + * nsprepkg - Validation of predefined name packages
338 + */
339 +ACPI_STATUS
340 +AcpiNsCheckPackage (
341 + ACPI_EVALUATE_INFO *Info,
342 + ACPI_OPERAND_OBJECT **ReturnObjectPtr);
343 +
344 +
345 +/*
282 346 * nsnames - Name and Scope manipulation
283 347 */
284 348 UINT32
285 349 AcpiNsOpensScope (
286 350 ACPI_OBJECT_TYPE Type);
287 351
288 352 ACPI_STATUS
289 353 AcpiNsBuildExternalPath (
290 354 ACPI_NAMESPACE_NODE *Node,
291 355 ACPI_SIZE Size,
292 356 char *NameBuffer);
293 357
294 358 char *
295 359 AcpiNsGetExternalPathname (
296 360 ACPI_NAMESPACE_NODE *Node);
297 361
298 362 char *
299 363 AcpiNsNameOfCurrentScope (
300 364 ACPI_WALK_STATE *WalkState);
301 365
302 366 ACPI_STATUS
303 367 AcpiNsHandleToPathname (
304 368 ACPI_HANDLE TargetHandle,
305 369 ACPI_BUFFER *Buffer);
306 370
307 371 BOOLEAN
308 372 AcpiNsPatternMatch (
309 373 ACPI_NAMESPACE_NODE *ObjNode,
310 374 char *SearchFor);
311 375
312 376 ACPI_STATUS
313 377 AcpiNsGetNode (
314 378 ACPI_NAMESPACE_NODE *PrefixNode,
315 379 const char *ExternalPathname,
316 380 UINT32 Flags,
317 381 ACPI_NAMESPACE_NODE **OutNode);
318 382
319 383 ACPI_SIZE
320 384 AcpiNsGetPathnameLength (
321 385 ACPI_NAMESPACE_NODE *Node);
322 386
323 387
324 388 /*
325 389 * nsobject - Object management for namespace nodes
326 390 */
327 391 ACPI_STATUS
328 392 AcpiNsAttachObject (
329 393 ACPI_NAMESPACE_NODE *Node,
330 394 ACPI_OPERAND_OBJECT *Object,
331 395 ACPI_OBJECT_TYPE Type);
332 396
333 397 ACPI_OPERAND_OBJECT *
334 398 AcpiNsGetAttachedObject (
335 399 ACPI_NAMESPACE_NODE *Node);
336 400
337 401 ACPI_OPERAND_OBJECT *
338 402 AcpiNsGetSecondaryObject (
339 403 ACPI_OPERAND_OBJECT *ObjDesc);
340 404
341 405 ACPI_STATUS
342 406 AcpiNsAttachData (
343 407 ACPI_NAMESPACE_NODE *Node,
344 408 ACPI_OBJECT_HANDLER Handler,
345 409 void *Data);
346 410
347 411 ACPI_STATUS
348 412 AcpiNsDetachData (
349 413 ACPI_NAMESPACE_NODE *Node,
350 414 ACPI_OBJECT_HANDLER Handler);
351 415
352 416 ACPI_STATUS
353 417 AcpiNsGetAttachedData (
↓ open down ↓ |
62 lines elided |
↑ open up ↑ |
354 418 ACPI_NAMESPACE_NODE *Node,
355 419 ACPI_OBJECT_HANDLER Handler,
356 420 void **Data);
357 421
358 422
359 423 /*
360 424 * nsrepair - General return object repair for all
361 425 * predefined methods/objects
362 426 */
363 427 ACPI_STATUS
364 -AcpiNsRepairObject (
365 - ACPI_PREDEFINED_DATA *Data,
428 +AcpiNsSimpleRepair (
429 + ACPI_EVALUATE_INFO *Info,
366 430 UINT32 ExpectedBtypes,
367 431 UINT32 PackageIndex,
368 432 ACPI_OPERAND_OBJECT **ReturnObjectPtr);
369 433
370 434 ACPI_STATUS
371 -AcpiNsRepairPackageList (
372 - ACPI_PREDEFINED_DATA *Data,
435 +AcpiNsWrapWithPackage (
436 + ACPI_EVALUATE_INFO *Info,
437 + ACPI_OPERAND_OBJECT *OriginalObject,
373 438 ACPI_OPERAND_OBJECT **ObjDescPtr);
374 439
375 440 ACPI_STATUS
376 441 AcpiNsRepairNullElement (
377 - ACPI_PREDEFINED_DATA *Data,
442 + ACPI_EVALUATE_INFO *Info,
378 443 UINT32 ExpectedBtypes,
379 444 UINT32 PackageIndex,
380 445 ACPI_OPERAND_OBJECT **ReturnObjectPtr);
381 446
382 447 void
383 448 AcpiNsRemoveNullElements (
384 - ACPI_PREDEFINED_DATA *Data,
449 + ACPI_EVALUATE_INFO *Info,
385 450 UINT8 PackageType,
386 451 ACPI_OPERAND_OBJECT *ObjDesc);
387 452
388 453
389 454 /*
390 455 * nsrepair2 - Return object repair for specific
391 456 * predefined methods/objects
392 457 */
393 458 ACPI_STATUS
394 459 AcpiNsComplexRepairs (
395 - ACPI_PREDEFINED_DATA *Data,
460 + ACPI_EVALUATE_INFO *Info,
396 461 ACPI_NAMESPACE_NODE *Node,
397 462 ACPI_STATUS ValidateStatus,
398 463 ACPI_OPERAND_OBJECT **ReturnObjectPtr);
399 464
400 465
401 466 /*
402 467 * nssearch - Namespace searching and entry
403 468 */
404 469 ACPI_STATUS
405 470 AcpiNsSearchAndEnter (
406 471 UINT32 EntryName,
407 472 ACPI_WALK_STATE *WalkState,
408 473 ACPI_NAMESPACE_NODE *Node,
409 474 ACPI_INTERPRETER_MODE InterpreterMode,
410 475 ACPI_OBJECT_TYPE Type,
411 476 UINT32 Flags,
412 477 ACPI_NAMESPACE_NODE **RetNode);
413 478
414 479 ACPI_STATUS
415 480 AcpiNsSearchOneScope (
416 481 UINT32 EntryName,
417 482 ACPI_NAMESPACE_NODE *Node,
418 483 ACPI_OBJECT_TYPE Type,
419 484 ACPI_NAMESPACE_NODE **RetNode);
420 485
421 486 void
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
422 487 AcpiNsInstallNode (
423 488 ACPI_WALK_STATE *WalkState,
424 489 ACPI_NAMESPACE_NODE *ParentNode,
425 490 ACPI_NAMESPACE_NODE *Node,
426 491 ACPI_OBJECT_TYPE Type);
427 492
428 493
429 494 /*
430 495 * nsutils - Utility functions
431 496 */
432 -BOOLEAN
433 -AcpiNsValidRootPrefix (
434 - char Prefix);
435 -
436 497 ACPI_OBJECT_TYPE
437 498 AcpiNsGetType (
438 499 ACPI_NAMESPACE_NODE *Node);
439 500
440 501 UINT32
441 502 AcpiNsLocal (
442 503 ACPI_OBJECT_TYPE Type);
443 504
444 505 void
445 506 AcpiNsPrintNodePathname (
446 507 ACPI_NAMESPACE_NODE *Node,
447 508 const char *Msg);
448 509
449 510 ACPI_STATUS
450 511 AcpiNsBuildInternalName (
451 512 ACPI_NAMESTRING_INFO *Info);
452 513
453 514 void
454 515 AcpiNsGetInternalNameLength (
455 516 ACPI_NAMESTRING_INFO *Info);
456 517
457 518 ACPI_STATUS
458 519 AcpiNsInternalizeName (
459 520 const char *DottedName,
460 521 char **ConvertedName);
461 522
462 523 ACPI_STATUS
463 524 AcpiNsExternalizeName (
464 525 UINT32 InternalNameLength,
465 526 const char *InternalName,
466 527 UINT32 *ConvertedNameLength,
467 528 char **ConvertedName);
468 529
469 530 ACPI_NAMESPACE_NODE *
470 531 AcpiNsValidateHandle (
471 532 ACPI_HANDLE Handle);
472 533
473 534 void
474 535 AcpiNsTerminate (
475 536 void);
476 537
477 538 #endif /* __ACNAMESP_H__ */
↓ open down ↓ |
32 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX