Print this page
update to acpica-unix2-20130927
acpica-unix2-20130823
PANKOVs restructure
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/intel/sys/acpi/acutils.h
+++ new/usr/src/common/acpica/include/acutils.h
1 1 /******************************************************************************
2 2 *
3 3 * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
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,
↓ open down ↓ |
20 lines elided |
↑ open up ↑ |
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 _ACUTILS_H
45 45 #define _ACUTILS_H
46 46
47 47
48 48 extern const UINT8 AcpiGbl_ResourceAmlSizes[];
49 +extern const UINT8 AcpiGbl_ResourceAmlSerialBusSizes[];
49 50
50 51 /* Strings used by the disassembler and debugger resource dump routines */
51 52
52 53 #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
53 54
54 55 extern const char *AcpiGbl_BmDecode[];
55 56 extern const char *AcpiGbl_ConfigDecode[];
56 57 extern const char *AcpiGbl_ConsumeDecode[];
57 58 extern const char *AcpiGbl_DecDecode[];
58 59 extern const char *AcpiGbl_HeDecode[];
59 60 extern const char *AcpiGbl_IoDecode[];
60 61 extern const char *AcpiGbl_LlDecode[];
61 62 extern const char *AcpiGbl_MaxDecode[];
↓ open down ↓ |
3 lines elided |
↑ open up ↑ |
62 63 extern const char *AcpiGbl_MemDecode[];
63 64 extern const char *AcpiGbl_MinDecode[];
64 65 extern const char *AcpiGbl_MtpDecode[];
65 66 extern const char *AcpiGbl_RngDecode[];
66 67 extern const char *AcpiGbl_RwDecode[];
67 68 extern const char *AcpiGbl_ShrDecode[];
68 69 extern const char *AcpiGbl_SizDecode[];
69 70 extern const char *AcpiGbl_TrsDecode[];
70 71 extern const char *AcpiGbl_TtpDecode[];
71 72 extern const char *AcpiGbl_TypDecode[];
73 +extern const char *AcpiGbl_PpcDecode[];
74 +extern const char *AcpiGbl_IorDecode[];
75 +extern const char *AcpiGbl_DtsDecode[];
76 +extern const char *AcpiGbl_CtDecode[];
77 +extern const char *AcpiGbl_SbtDecode[];
78 +extern const char *AcpiGbl_AmDecode[];
79 +extern const char *AcpiGbl_SmDecode[];
80 +extern const char *AcpiGbl_WmDecode[];
81 +extern const char *AcpiGbl_CphDecode[];
82 +extern const char *AcpiGbl_CpoDecode[];
83 +extern const char *AcpiGbl_DpDecode[];
84 +extern const char *AcpiGbl_EdDecode[];
85 +extern const char *AcpiGbl_BpbDecode[];
86 +extern const char *AcpiGbl_SbDecode[];
87 +extern const char *AcpiGbl_FcDecode[];
88 +extern const char *AcpiGbl_PtDecode[];
72 89 #endif
73 90
91 +/*
92 + * For the iASL compiler case, the output is redirected to stderr so that
93 + * any of the various ACPI errors and warnings do not appear in the output
94 + * files, for either the compiler or disassembler portions of the tool.
95 + */
96 +#ifdef ACPI_ASL_COMPILER
97 +
98 +#include <stdio.h>
99 +extern FILE *AcpiGbl_OutputFile;
100 +
101 +#define ACPI_MSG_REDIRECT_BEGIN \
102 + FILE *OutputFile = AcpiGbl_OutputFile; \
103 + AcpiOsRedirectOutput (stderr);
104 +
105 +#define ACPI_MSG_REDIRECT_END \
106 + AcpiOsRedirectOutput (OutputFile);
107 +
108 +#else
109 +/*
110 + * non-iASL case - no redirection, nothing to do
111 + */
112 +#define ACPI_MSG_REDIRECT_BEGIN
113 +#define ACPI_MSG_REDIRECT_END
114 +#endif
115 +
116 +/*
117 + * Common error message prefixes
118 + */
119 +#define ACPI_MSG_ERROR "ACPI Error: "
120 +#define ACPI_MSG_EXCEPTION "ACPI Exception: "
121 +#define ACPI_MSG_WARNING "ACPI Warning: "
122 +#define ACPI_MSG_INFO "ACPI: "
123 +
124 +#define ACPI_MSG_BIOS_ERROR "ACPI BIOS Error (bug): "
125 +#define ACPI_MSG_BIOS_WARNING "ACPI BIOS Warning (bug): "
126 +
127 +/*
128 + * Common message suffix
129 + */
130 +#define ACPI_MSG_SUFFIX \
131 + AcpiOsPrintf (" (%8.8X/%s-%u)\n", ACPI_CA_VERSION, ModuleName, LineNumber)
132 +
133 +
74 134 /* Types for Resource descriptor entries */
75 135
76 136 #define ACPI_INVALID_RESOURCE 0
77 137 #define ACPI_FIXED_LENGTH 1
78 138 #define ACPI_VARIABLE_LENGTH 2
79 139 #define ACPI_SMALL_VARIABLE_LENGTH 3
80 140
81 141 typedef
82 142 ACPI_STATUS (*ACPI_WALK_AML_CALLBACK) (
83 143 UINT8 *Aml,
84 144 UINT32 Length,
85 145 UINT32 Offset,
86 146 UINT8 ResourceIndex,
87 - void *Context);
147 + void **Context);
88 148
89 149 typedef
90 150 ACPI_STATUS (*ACPI_PKG_CALLBACK) (
91 151 UINT8 ObjectType,
92 152 ACPI_OPERAND_OBJECT *SourceObject,
93 153 ACPI_GENERIC_STATE *State,
94 154 void *Context);
95 155
96 156 typedef struct acpi_pkg_info
97 157 {
98 158 UINT8 *FreeSpace;
99 159 ACPI_SIZE Length;
100 160 UINT32 ObjectSpace;
101 161 UINT32 NumPackages;
102 162
103 163 } ACPI_PKG_INFO;
104 164
165 +/* Object reference counts */
166 +
105 167 #define REF_INCREMENT (UINT16) 0
106 168 #define REF_DECREMENT (UINT16) 1
107 -#define REF_FORCE_DELETE (UINT16) 2
108 169
109 170 /* AcpiUtDumpBuffer */
110 171
111 172 #define DB_BYTE_DISPLAY 1
112 173 #define DB_WORD_DISPLAY 2
113 174 #define DB_DWORD_DISPLAY 4
114 175 #define DB_QWORD_DISPLAY 8
115 176
116 -
117 177 /*
118 178 * utglobal - Global data structures and procedures
119 179 */
120 180 ACPI_STATUS
121 181 AcpiUtInitGlobals (
122 182 void);
123 183
124 184 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
125 185
126 186 char *
127 187 AcpiUtGetMutexName (
128 188 UINT32 MutexId);
129 189
130 190 const char *
131 191 AcpiUtGetNotifyName (
132 192 UINT32 NotifyValue);
133 193
134 194 #endif
135 195
136 196 char *
137 197 AcpiUtGetTypeName (
138 198 ACPI_OBJECT_TYPE Type);
139 199
140 200 char *
141 201 AcpiUtGetNodeName (
142 202 void *Object);
143 203
144 204 char *
145 205 AcpiUtGetDescriptorName (
146 206 void *Object);
147 207
148 208 const char *
149 209 AcpiUtGetReferenceName (
150 210 ACPI_OPERAND_OBJECT *Object);
151 211
152 212 char *
153 213 AcpiUtGetObjectTypeName (
154 214 ACPI_OPERAND_OBJECT *ObjDesc);
155 215
156 216 char *
157 217 AcpiUtGetRegionName (
158 218 UINT8 SpaceId);
159 219
160 220 char *
161 221 AcpiUtGetEventName (
162 222 UINT32 EventId);
163 223
164 224 char
165 225 AcpiUtHexToAsciiChar (
166 226 UINT64 Integer,
167 227 UINT32 Position);
168 228
169 229 BOOLEAN
170 230 AcpiUtValidObjectType (
171 231 ACPI_OBJECT_TYPE Type);
172 232
173 233
174 234 /*
175 235 * utinit - miscellaneous initialization and shutdown
176 236 */
177 237 ACPI_STATUS
178 238 AcpiUtHardwareInitialize (
179 239 void);
180 240
181 241 void
182 242 AcpiUtSubsystemShutdown (
183 243 void);
184 244
185 245
186 246 /*
187 247 * utclib - Local implementations of C library functions
188 248 */
189 249 #ifndef ACPI_USE_SYSTEM_CLIBRARY
190 250
191 251 ACPI_SIZE
192 252 AcpiUtStrlen (
193 253 const char *String);
194 254
195 255 char *
196 256 AcpiUtStrcpy (
197 257 char *DstString,
198 258 const char *SrcString);
199 259
200 260 char *
201 261 AcpiUtStrncpy (
202 262 char *DstString,
203 263 const char *SrcString,
204 264 ACPI_SIZE Count);
205 265
206 266 int
207 267 AcpiUtMemcmp (
208 268 const char *Buffer1,
209 269 const char *Buffer2,
210 270 ACPI_SIZE Count);
211 271
212 272 int
213 273 AcpiUtStrncmp (
214 274 const char *String1,
215 275 const char *String2,
216 276 ACPI_SIZE Count);
217 277
218 278 int
219 279 AcpiUtStrcmp (
220 280 const char *String1,
221 281 const char *String2);
222 282
223 283 char *
224 284 AcpiUtStrcat (
225 285 char *DstString,
226 286 const char *SrcString);
227 287
228 288 char *
229 289 AcpiUtStrncat (
230 290 char *DstString,
231 291 const char *SrcString,
232 292 ACPI_SIZE Count);
233 293
234 294 UINT32
235 295 AcpiUtStrtoul (
236 296 const char *String,
237 297 char **Terminator,
238 298 UINT32 Base);
239 299
240 300 char *
241 301 AcpiUtStrstr (
242 302 char *String1,
243 303 char *String2);
244 304
245 305 void *
246 306 AcpiUtMemcpy (
247 307 void *Dest,
248 308 const void *Src,
249 309 ACPI_SIZE Count);
250 310
251 311 void *
252 312 AcpiUtMemset (
253 313 void *Dest,
254 314 UINT8 Value,
255 315 ACPI_SIZE Count);
256 316
257 317 int
258 318 AcpiUtToUpper (
259 319 int c);
260 320
261 321 int
262 322 AcpiUtToLower (
263 323 int c);
264 324
265 325 extern const UINT8 _acpi_ctype[];
266 326
267 327 #define _ACPI_XA 0x00 /* extra alphabetic - not supported */
268 328 #define _ACPI_XS 0x40 /* extra space */
269 329 #define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */
270 330 #define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */
271 331 #define _ACPI_DI 0x04 /* '0'-'9' */
272 332 #define _ACPI_LO 0x02 /* 'a'-'z' */
273 333 #define _ACPI_PU 0x10 /* punctuation */
274 334 #define _ACPI_SP 0x08 /* space */
275 335 #define _ACPI_UP 0x01 /* 'A'-'Z' */
276 336 #define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */
277 337
278 338 #define ACPI_IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
279 339 #define ACPI_IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
280 340 #define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
281 341 #define ACPI_IS_UPPER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
282 342 #define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
283 343 #define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU))
284 344 #define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
285 345
286 346 #endif /* !ACPI_USE_SYSTEM_CLIBRARY */
287 347
288 348 #define ACPI_IS_ASCII(c) ((c) < 0x80)
289 349
290 350
291 351 /*
292 352 * utcopy - Object construction and conversion interfaces
293 353 */
294 354 ACPI_STATUS
295 355 AcpiUtBuildSimpleObject(
296 356 ACPI_OPERAND_OBJECT *Obj,
297 357 ACPI_OBJECT *UserObj,
298 358 UINT8 *DataSpace,
299 359 UINT32 *BufferSpaceUsed);
300 360
301 361 ACPI_STATUS
302 362 AcpiUtBuildPackageObject (
303 363 ACPI_OPERAND_OBJECT *Obj,
304 364 UINT8 *Buffer,
305 365 UINT32 *SpaceUsed);
306 366
307 367 ACPI_STATUS
308 368 AcpiUtCopyIobjectToEobject (
309 369 ACPI_OPERAND_OBJECT *Obj,
310 370 ACPI_BUFFER *RetBuffer);
311 371
312 372 ACPI_STATUS
313 373 AcpiUtCopyEobjectToIobject (
314 374 ACPI_OBJECT *Obj,
315 375 ACPI_OPERAND_OBJECT **InternalObj);
316 376
317 377 ACPI_STATUS
318 378 AcpiUtCopyISimpleToIsimple (
319 379 ACPI_OPERAND_OBJECT *SourceObj,
320 380 ACPI_OPERAND_OBJECT *DestObj);
321 381
322 382 ACPI_STATUS
323 383 AcpiUtCopyIobjectToIobject (
324 384 ACPI_OPERAND_OBJECT *SourceDesc,
325 385 ACPI_OPERAND_OBJECT **DestDesc,
326 386 ACPI_WALK_STATE *WalkState);
327 387
328 388
329 389 /*
330 390 * utcreate - Object creation
331 391 */
332 392 ACPI_STATUS
333 393 AcpiUtUpdateObjectReference (
334 394 ACPI_OPERAND_OBJECT *Object,
335 395 UINT16 Action);
336 396
337 397
338 398 /*
339 399 * utdebug - Debug interfaces
340 400 */
341 401 void
342 402 AcpiUtInitStackPtrTrace (
343 403 void);
344 404
345 405 void
346 406 AcpiUtTrackStackPtr (
347 407 void);
348 408
349 409 void
350 410 AcpiUtTrace (
351 411 UINT32 LineNumber,
352 412 const char *FunctionName,
353 413 const char *ModuleName,
354 414 UINT32 ComponentId);
355 415
356 416 void
357 417 AcpiUtTracePtr (
358 418 UINT32 LineNumber,
359 419 const char *FunctionName,
360 420 const char *ModuleName,
361 421 UINT32 ComponentId,
362 422 void *Pointer);
363 423
364 424 void
365 425 AcpiUtTraceU32 (
366 426 UINT32 LineNumber,
367 427 const char *FunctionName,
368 428 const char *ModuleName,
369 429 UINT32 ComponentId,
370 430 UINT32 Integer);
371 431
372 432 void
373 433 AcpiUtTraceStr (
374 434 UINT32 LineNumber,
375 435 const char *FunctionName,
376 436 const char *ModuleName,
377 437 UINT32 ComponentId,
378 438 char *String);
379 439
380 440 void
381 441 AcpiUtExit (
382 442 UINT32 LineNumber,
383 443 const char *FunctionName,
384 444 const char *ModuleName,
385 445 UINT32 ComponentId);
386 446
387 447 void
388 448 AcpiUtStatusExit (
389 449 UINT32 LineNumber,
390 450 const char *FunctionName,
391 451 const char *ModuleName,
392 452 UINT32 ComponentId,
393 453 ACPI_STATUS Status);
394 454
395 455 void
396 456 AcpiUtValueExit (
397 457 UINT32 LineNumber,
398 458 const char *FunctionName,
399 459 const char *ModuleName,
400 460 UINT32 ComponentId,
401 461 UINT64 Value);
↓ open down ↓ |
275 lines elided |
↑ open up ↑ |
402 462
403 463 void
404 464 AcpiUtPtrExit (
405 465 UINT32 LineNumber,
406 466 const char *FunctionName,
407 467 const char *ModuleName,
408 468 UINT32 ComponentId,
409 469 UINT8 *Ptr);
410 470
411 471 void
412 -AcpiUtDumpBuffer (
472 +AcpiUtDebugDumpBuffer (
413 473 UINT8 *Buffer,
414 474 UINT32 Count,
415 475 UINT32 Display,
416 - UINT32 componentId);
476 + UINT32 ComponentId);
417 477
418 478 void
419 -AcpiUtDumpBuffer2 (
479 +AcpiUtDumpBuffer (
420 480 UINT8 *Buffer,
421 481 UINT32 Count,
422 - UINT32 Display);
482 + UINT32 Display,
483 + UINT32 Offset);
423 484
424 485 void
425 486 AcpiUtReportError (
426 487 char *ModuleName,
427 488 UINT32 LineNumber);
428 489
429 490 void
430 491 AcpiUtReportInfo (
431 492 char *ModuleName,
432 493 UINT32 LineNumber);
433 494
434 495 void
435 496 AcpiUtReportWarning (
436 497 char *ModuleName,
437 498 UINT32 LineNumber);
438 499
439 500 /*
440 501 * utdelete - Object deletion and reference counts
441 502 */
442 503 void
443 504 AcpiUtAddReference (
444 505 ACPI_OPERAND_OBJECT *Object);
445 506
446 507 void
447 508 AcpiUtRemoveReference (
448 509 ACPI_OPERAND_OBJECT *Object);
449 510
450 511 void
451 512 AcpiUtDeleteInternalPackageObject (
452 513 ACPI_OPERAND_OBJECT *Object);
453 514
454 515 void
455 516 AcpiUtDeleteInternalSimpleObject (
456 517 ACPI_OPERAND_OBJECT *Object);
457 518
458 519 void
459 520 AcpiUtDeleteInternalObjectList (
460 521 ACPI_OPERAND_OBJECT **ObjList);
461 522
462 523
463 524 /*
464 525 * uteval - object evaluation
465 526 */
466 527 ACPI_STATUS
467 528 AcpiUtEvaluateObject (
468 529 ACPI_NAMESPACE_NODE *PrefixNode,
469 530 char *Path,
470 531 UINT32 ExpectedReturnBtypes,
471 532 ACPI_OPERAND_OBJECT **ReturnDesc);
472 533
473 534 ACPI_STATUS
474 535 AcpiUtEvaluateNumericObject (
475 536 char *ObjectName,
476 537 ACPI_NAMESPACE_NODE *DeviceNode,
477 538 UINT64 *Value);
478 539
479 540 ACPI_STATUS
480 541 AcpiUtExecute_STA (
481 542 ACPI_NAMESPACE_NODE *DeviceNode,
482 543 UINT32 *StatusFlags);
483 544
484 545 ACPI_STATUS
485 546 AcpiUtExecutePowerMethods (
486 547 ACPI_NAMESPACE_NODE *DeviceNode,
487 548 const char **MethodNames,
↓ open down ↓ |
55 lines elided |
↑ open up ↑ |
488 549 UINT8 MethodCount,
489 550 UINT8 *OutValues);
490 551
491 552
492 553 /*
493 554 * utids - device ID support
494 555 */
495 556 ACPI_STATUS
496 557 AcpiUtExecute_HID (
497 558 ACPI_NAMESPACE_NODE *DeviceNode,
498 - ACPI_DEVICE_ID **ReturnId);
559 + ACPI_PNP_DEVICE_ID **ReturnId);
499 560
500 561 ACPI_STATUS
501 562 AcpiUtExecute_UID (
502 563 ACPI_NAMESPACE_NODE *DeviceNode,
503 - ACPI_DEVICE_ID **ReturnId);
564 + ACPI_PNP_DEVICE_ID **ReturnId);
504 565
505 566 ACPI_STATUS
567 +AcpiUtExecute_SUB (
568 + ACPI_NAMESPACE_NODE *DeviceNode,
569 + ACPI_PNP_DEVICE_ID **ReturnId);
570 +
571 +ACPI_STATUS
506 572 AcpiUtExecute_CID (
507 573 ACPI_NAMESPACE_NODE *DeviceNode,
508 - ACPI_DEVICE_ID_LIST **ReturnCidList);
574 + ACPI_PNP_DEVICE_ID_LIST **ReturnCidList);
509 575
510 576
511 577 /*
512 578 * utlock - reader/writer locks
513 579 */
514 580 ACPI_STATUS
515 581 AcpiUtCreateRwLock (
516 582 ACPI_RW_LOCK *Lock);
517 583
518 584 void
519 585 AcpiUtDeleteRwLock (
520 586 ACPI_RW_LOCK *Lock);
521 587
522 588 ACPI_STATUS
523 589 AcpiUtAcquireReadLock (
524 590 ACPI_RW_LOCK *Lock);
525 591
526 592 ACPI_STATUS
527 593 AcpiUtReleaseReadLock (
528 594 ACPI_RW_LOCK *Lock);
529 595
530 596 ACPI_STATUS
531 597 AcpiUtAcquireWriteLock (
532 598 ACPI_RW_LOCK *Lock);
533 599
534 600 void
535 601 AcpiUtReleaseWriteLock (
536 602 ACPI_RW_LOCK *Lock);
537 603
538 604
539 605 /*
540 606 * utobject - internal object create/delete/cache routines
541 607 */
542 608 ACPI_OPERAND_OBJECT *
543 609 AcpiUtCreateInternalObjectDbg (
544 610 const char *ModuleName,
545 611 UINT32 LineNumber,
546 612 UINT32 ComponentId,
547 613 ACPI_OBJECT_TYPE Type);
548 614
549 615 void *
550 616 AcpiUtAllocateObjectDescDbg (
551 617 const char *ModuleName,
552 618 UINT32 LineNumber,
553 619 UINT32 ComponentId);
554 620
555 621 #define AcpiUtCreateInternalObject(t) AcpiUtCreateInternalObjectDbg (_AcpiModuleName,__LINE__,_COMPONENT,t)
556 622 #define AcpiUtAllocateObjectDesc() AcpiUtAllocateObjectDescDbg (_AcpiModuleName,__LINE__,_COMPONENT)
557 623
558 624 void
559 625 AcpiUtDeleteObjectDesc (
560 626 ACPI_OPERAND_OBJECT *Object);
561 627
562 628 BOOLEAN
563 629 AcpiUtValidInternalObject (
564 630 void *Object);
565 631
566 632 ACPI_OPERAND_OBJECT *
567 633 AcpiUtCreatePackageObject (
568 634 UINT32 Count);
569 635
570 636 ACPI_OPERAND_OBJECT *
571 637 AcpiUtCreateIntegerObject (
572 638 UINT64 Value);
573 639
574 640 ACPI_OPERAND_OBJECT *
575 641 AcpiUtCreateBufferObject (
576 642 ACPI_SIZE BufferSize);
577 643
578 644 ACPI_OPERAND_OBJECT *
579 645 AcpiUtCreateStringObject (
580 646 ACPI_SIZE StringSize);
581 647
582 648 ACPI_STATUS
583 649 AcpiUtGetObjectSize(
584 650 ACPI_OPERAND_OBJECT *Obj,
↓ open down ↓ |
66 lines elided |
↑ open up ↑ |
585 651 ACPI_SIZE *ObjLength);
586 652
587 653
588 654 /*
589 655 * utosi - Support for the _OSI predefined control method
590 656 */
591 657 ACPI_STATUS
592 658 AcpiUtInitializeInterfaces (
593 659 void);
594 660
595 -void
661 +ACPI_STATUS
596 662 AcpiUtInterfaceTerminate (
597 663 void);
598 664
599 665 ACPI_STATUS
600 666 AcpiUtInstallInterface (
601 667 ACPI_STRING InterfaceName);
602 668
603 669 ACPI_STATUS
604 670 AcpiUtRemoveInterface (
605 671 ACPI_STRING InterfaceName);
606 672
673 +ACPI_STATUS
674 +AcpiUtUpdateInterfaces (
675 + UINT8 Action);
676 +
607 677 ACPI_INTERFACE_INFO *
608 678 AcpiUtGetInterface (
609 679 ACPI_STRING InterfaceName);
610 680
611 681 ACPI_STATUS
612 682 AcpiUtOsiImplementation (
613 683 ACPI_WALK_STATE *WalkState);
614 684
615 685
616 686 /*
687 + * utpredef - support for predefined names
688 + */
689 +const ACPI_PREDEFINED_INFO *
690 +AcpiUtGetNextPredefinedMethod (
691 + const ACPI_PREDEFINED_INFO *ThisName);
692 +
693 +const ACPI_PREDEFINED_INFO *
694 +AcpiUtMatchPredefinedMethod (
695 + char *Name);
696 +
697 +const ACPI_PREDEFINED_INFO *
698 +AcpiUtMatchResourceName (
699 + char *Name);
700 +
701 +void
702 +AcpiUtDisplayPredefinedMethod (
703 + char *Buffer,
704 + const ACPI_PREDEFINED_INFO *ThisName,
705 + BOOLEAN MultiLine);
706 +
707 +void
708 +AcpiUtGetExpectedReturnTypes (
709 + char *Buffer,
710 + UINT32 ExpectedBtypes);
711 +
712 +UINT32
713 +AcpiUtGetResourceBitWidth (
714 + char *Buffer,
715 + UINT16 Types);
716 +
717 +
718 +/*
617 719 * utstate - Generic state creation/cache routines
618 720 */
619 721 void
620 722 AcpiUtPushGenericState (
621 723 ACPI_GENERIC_STATE **ListHead,
622 724 ACPI_GENERIC_STATE *State);
623 725
624 726 ACPI_GENERIC_STATE *
625 727 AcpiUtPopGenericState (
626 728 ACPI_GENERIC_STATE **ListHead);
627 729
628 730
629 731 ACPI_GENERIC_STATE *
630 732 AcpiUtCreateGenericState (
631 733 void);
632 734
633 735 ACPI_THREAD_STATE *
634 736 AcpiUtCreateThreadState (
635 737 void);
636 738
637 739 ACPI_GENERIC_STATE *
638 740 AcpiUtCreateUpdateState (
639 741 ACPI_OPERAND_OBJECT *Object,
640 742 UINT16 Action);
641 743
642 744 ACPI_GENERIC_STATE *
643 745 AcpiUtCreatePkgState (
644 746 void *InternalObject,
645 747 void *ExternalObject,
646 748 UINT16 Index);
647 749
648 750 ACPI_STATUS
649 751 AcpiUtCreateUpdateStateAndPush (
650 752 ACPI_OPERAND_OBJECT *Object,
651 753 UINT16 Action,
652 754 ACPI_GENERIC_STATE **StateList);
653 755
654 756 ACPI_STATUS
655 757 AcpiUtCreatePkgStateAndPush (
656 758 void *InternalObject,
657 759 void *ExternalObject,
658 760 UINT16 Index,
659 761 ACPI_GENERIC_STATE **StateList);
660 762
661 763 ACPI_GENERIC_STATE *
662 764 AcpiUtCreateControlState (
663 765 void);
664 766
665 767 void
666 768 AcpiUtDeleteGenericState (
667 769 ACPI_GENERIC_STATE *State);
668 770
669 771
670 772 /*
671 773 * utmath
672 774 */
673 775 ACPI_STATUS
674 776 AcpiUtDivide (
675 777 UINT64 InDividend,
676 778 UINT64 InDivisor,
↓ open down ↓ |
50 lines elided |
↑ open up ↑ |
677 779 UINT64 *OutQuotient,
678 780 UINT64 *OutRemainder);
679 781
680 782 ACPI_STATUS
681 783 AcpiUtShortDivide (
682 784 UINT64 InDividend,
683 785 UINT32 Divisor,
684 786 UINT64 *OutQuotient,
685 787 UINT32 *OutRemainder);
686 788
789 +
687 790 /*
688 791 * utmisc
689 792 */
690 -const char *
793 +const ACPI_EXCEPTION_INFO *
691 794 AcpiUtValidateException (
692 795 ACPI_STATUS Status);
693 796
694 797 BOOLEAN
695 798 AcpiUtIsPciRootBridge (
696 799 char *Id);
697 800
698 801 BOOLEAN
699 802 AcpiUtIsAmlTable (
700 803 ACPI_TABLE_HEADER *Table);
701 804
702 805 ACPI_STATUS
703 -AcpiUtAllocateOwnerId (
704 - ACPI_OWNER_ID *OwnerId);
705 -
706 -void
707 -AcpiUtReleaseOwnerId (
708 - ACPI_OWNER_ID *OwnerId);
709 -
710 -ACPI_STATUS
711 806 AcpiUtWalkPackageTree (
712 807 ACPI_OPERAND_OBJECT *SourceObject,
713 808 void *TargetObject,
714 809 ACPI_PKG_CALLBACK WalkCallback,
715 810 void *Context);
716 811
717 -void
718 -AcpiUtStrupr (
719 - char *SrcString);
720 812
721 -void
722 -AcpiUtStrlwr (
723 - char *SrcString);
724 -
725 -void
726 -AcpiUtPrintString (
727 - char *String,
728 - UINT8 MaxLength);
729 -
730 -BOOLEAN
731 -AcpiUtValidAcpiName (
732 - UINT32 Name);
733 -
734 -void
735 -AcpiUtRepairName (
736 - char *Name);
737 -
738 -BOOLEAN
739 -AcpiUtValidAcpiChar (
740 - char Character,
741 - UINT32 Position);
742 -
743 -ACPI_STATUS
744 -AcpiUtStrtoul64 (
745 - char *String,
746 - UINT32 Base,
747 - UINT64 *RetInteger);
748 -
749 813 /* Values for Base above (16=Hex, 10=Decimal) */
750 814
751 815 #define ACPI_ANY_BASE 0
752 816
753 817 UINT32
754 818 AcpiUtDwordByteSwap (
755 819 UINT32 Value);
756 820
757 821 void
758 822 AcpiUtSetIntegerWidth (
759 823 UINT8 Revision);
760 824
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
761 825 #ifdef ACPI_DEBUG_OUTPUT
762 826 void
763 827 AcpiUtDisplayInitPathname (
764 828 UINT8 Type,
765 829 ACPI_NAMESPACE_NODE *ObjHandle,
766 830 char *Path);
767 831 #endif
768 832
769 833
770 834 /*
835 + * utownerid - Support for Table/Method Owner IDs
836 + */
837 +ACPI_STATUS
838 +AcpiUtAllocateOwnerId (
839 + ACPI_OWNER_ID *OwnerId);
840 +
841 +void
842 +AcpiUtReleaseOwnerId (
843 + ACPI_OWNER_ID *OwnerId);
844 +
845 +
846 +/*
771 847 * utresrc
772 848 */
773 849 ACPI_STATUS
774 850 AcpiUtWalkAmlResources (
851 + ACPI_WALK_STATE *WalkState,
775 852 UINT8 *Aml,
776 853 ACPI_SIZE AmlLength,
777 854 ACPI_WALK_AML_CALLBACK UserFunction,
778 - void *Context);
855 + void **Context);
779 856
780 857 ACPI_STATUS
781 858 AcpiUtValidateResource (
859 + ACPI_WALK_STATE *WalkState,
782 860 void *Aml,
783 861 UINT8 *ReturnIndex);
784 862
785 863 UINT32
786 864 AcpiUtGetDescriptorLength (
787 865 void *Aml);
788 866
789 867 UINT16
790 868 AcpiUtGetResourceLength (
791 869 void *Aml);
792 870
793 871 UINT8
794 872 AcpiUtGetResourceHeaderLength (
795 873 void *Aml);
796 874
797 875 UINT8
↓ open down ↓ |
6 lines elided |
↑ open up ↑ |
798 876 AcpiUtGetResourceType (
799 877 void *Aml);
800 878
801 879 ACPI_STATUS
802 880 AcpiUtGetResourceEndTag (
803 881 ACPI_OPERAND_OBJECT *ObjDesc,
804 882 UINT8 **EndTag);
805 883
806 884
807 885 /*
886 + * utstring - String and character utilities
887 + */
888 +void
889 +AcpiUtStrupr (
890 + char *SrcString);
891 +
892 +void
893 +AcpiUtStrlwr (
894 + char *SrcString);
895 +
896 +int
897 +AcpiUtStricmp (
898 + char *String1,
899 + char *String2);
900 +
901 +ACPI_STATUS
902 +AcpiUtStrtoul64 (
903 + char *String,
904 + UINT32 Base,
905 + UINT64 *RetInteger);
906 +
907 +void
908 +AcpiUtPrintString (
909 + char *String,
910 + UINT16 MaxLength);
911 +
912 +void
913 +UtConvertBackslashes (
914 + char *Pathname);
915 +
916 +BOOLEAN
917 +AcpiUtValidAcpiName (
918 + char *Name);
919 +
920 +BOOLEAN
921 +AcpiUtValidAcpiChar (
922 + char Character,
923 + UINT32 Position);
924 +
925 +void
926 +AcpiUtRepairName (
927 + char *Name);
928 +
929 +#if defined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION)
930 +BOOLEAN
931 +AcpiUtSafeStrcpy (
932 + char *Dest,
933 + ACPI_SIZE DestSize,
934 + char *Source);
935 +
936 +BOOLEAN
937 +AcpiUtSafeStrcat (
938 + char *Dest,
939 + ACPI_SIZE DestSize,
940 + char *Source);
941 +
942 +BOOLEAN
943 +AcpiUtSafeStrncat (
944 + char *Dest,
945 + ACPI_SIZE DestSize,
946 + char *Source,
947 + ACPI_SIZE MaxTransferLength);
948 +#endif
949 +
950 +
951 +/*
808 952 * utmutex - mutex support
809 953 */
810 954 ACPI_STATUS
811 955 AcpiUtMutexInitialize (
812 956 void);
813 957
814 958 void
815 959 AcpiUtMutexTerminate (
816 960 void);
817 961
818 962 ACPI_STATUS
819 963 AcpiUtAcquireMutex (
820 964 ACPI_MUTEX_HANDLE MutexId);
821 965
822 966 ACPI_STATUS
823 967 AcpiUtReleaseMutex (
824 968 ACPI_MUTEX_HANDLE MutexId);
825 969
826 970
827 971 /*
828 972 * utalloc - memory allocation and object caching
829 973 */
830 974 ACPI_STATUS
831 975 AcpiUtCreateCaches (
832 976 void);
833 977
834 978 ACPI_STATUS
835 979 AcpiUtDeleteCaches (
836 980 void);
↓ open down ↓ |
19 lines elided |
↑ open up ↑ |
837 981
838 982 ACPI_STATUS
839 983 AcpiUtValidateBuffer (
840 984 ACPI_BUFFER *Buffer);
841 985
842 986 ACPI_STATUS
843 987 AcpiUtInitializeBuffer (
844 988 ACPI_BUFFER *Buffer,
845 989 ACPI_SIZE RequiredLength);
846 990
847 -void *
848 -AcpiUtAllocate (
849 - ACPI_SIZE Size,
850 - UINT32 Component,
851 - const char *Module,
852 - UINT32 Line);
853 -
854 -void *
855 -AcpiUtAllocateZeroed (
856 - ACPI_SIZE Size,
857 - UINT32 Component,
858 - const char *Module,
859 - UINT32 Line);
860 -
861 991 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
862 992 void *
863 993 AcpiUtAllocateAndTrack (
864 994 ACPI_SIZE Size,
865 995 UINT32 Component,
866 996 const char *Module,
867 997 UINT32 Line);
868 998
869 999 void *
870 1000 AcpiUtAllocateZeroedAndTrack (
871 1001 ACPI_SIZE Size,
872 1002 UINT32 Component,
873 1003 const char *Module,
874 1004 UINT32 Line);
875 1005
876 1006 void
877 1007 AcpiUtFreeAndTrack (
878 1008 void *Address,
879 1009 UINT32 Component,
880 1010 const char *Module,
881 1011 UINT32 Line);
882 1012
883 1013 void
884 1014 AcpiUtDumpAllocationInfo (
885 1015 void);
886 1016
887 1017 void
888 1018 AcpiUtDumpAllocations (
889 1019 UINT32 Component,
↓ open down ↓ |
19 lines elided |
↑ open up ↑ |
890 1020 const char *Module);
891 1021
892 1022 ACPI_STATUS
893 1023 AcpiUtCreateList (
894 1024 char *ListName,
895 1025 UINT16 ObjectSize,
896 1026 ACPI_MEMORY_LIST **ReturnCache);
897 1027
898 1028 #endif /* ACPI_DBG_TRACK_ALLOCATIONS */
899 1029
1030 +/*
1031 + * utaddress - address range check
1032 + */
1033 +ACPI_STATUS
1034 +AcpiUtAddAddressRange (
1035 + ACPI_ADR_SPACE_TYPE SpaceId,
1036 + ACPI_PHYSICAL_ADDRESS Address,
1037 + UINT32 Length,
1038 + ACPI_NAMESPACE_NODE *RegionNode);
900 1039
1040 +void
1041 +AcpiUtRemoveAddressRange (
1042 + ACPI_ADR_SPACE_TYPE SpaceId,
1043 + ACPI_NAMESPACE_NODE *RegionNode);
1044 +
1045 +UINT32
1046 +AcpiUtCheckAddressRange (
1047 + ACPI_ADR_SPACE_TYPE SpaceId,
1048 + ACPI_PHYSICAL_ADDRESS Address,
1049 + UINT32 Length,
1050 + BOOLEAN Warn);
1051 +
1052 +void
1053 +AcpiUtDeleteAddressLists (
1054 + void);
1055 +
901 1056 /*
902 1057 * utxferror - various error/warning output functions
903 1058 */
904 1059 void ACPI_INTERNAL_VAR_XFACE
905 1060 AcpiUtPredefinedWarning (
906 1061 const char *ModuleName,
907 1062 UINT32 LineNumber,
908 1063 char *Pathname,
909 1064 UINT8 NodeFlags,
910 1065 const char *Format,
911 1066 ...);
912 1067
913 1068 void ACPI_INTERNAL_VAR_XFACE
914 1069 AcpiUtPredefinedInfo (
915 1070 const char *ModuleName,
916 1071 UINT32 LineNumber,
1072 + char *Pathname,
1073 + UINT8 NodeFlags,
1074 + const char *Format,
1075 + ...);
1076 +
1077 +void ACPI_INTERNAL_VAR_XFACE
1078 +AcpiUtPredefinedBiosError (
1079 + const char *ModuleName,
1080 + UINT32 LineNumber,
917 1081 char *Pathname,
918 1082 UINT8 NodeFlags,
919 1083 const char *Format,
920 1084 ...);
921 1085
922 1086 void
923 1087 AcpiUtNamespaceError (
924 1088 const char *ModuleName,
925 1089 UINT32 LineNumber,
926 1090 const char *InternalName,
927 1091 ACPI_STATUS LookupStatus);
928 1092
929 1093 void
930 1094 AcpiUtMethodError (
931 1095 const char *ModuleName,
932 1096 UINT32 LineNumber,
933 1097 const char *Message,
934 1098 ACPI_NAMESPACE_NODE *Node,
935 1099 const char *Path,
936 1100 ACPI_STATUS LookupStatus);
937 1101
938 1102 #endif /* _ACUTILS_H */
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX