Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1798 lines
67 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. get.h
  5. Abstract:
  6. This contains some some high-level routines to access data from
  7. the interpreter and do some processing upon the result. The result
  8. requires some manipulation to be useful to the OS. An example would
  9. be reading the _HID and turning that into a DeviceID
  10. Author:
  11. Stephane Plante (splante)
  12. Environment:
  13. NT Kernel Model Driver only
  14. --*/
  15. #ifndef _GET_H_
  16. #define _GET_H_
  17. #define ISDIGIT(c) (((c) >= '0') && ((c) <= '9'))
  18. typedef struct _ACPI_GET_REQUEST {
  19. //
  20. // See below for what the bits within the flags mean. They are to
  21. // be exclusively used by the completion routine to determine what
  22. // the original request intended
  23. //
  24. union {
  25. ULONG Flags;
  26. struct {
  27. ULONG TypePackage:1;
  28. ULONG TypeInteger:1;
  29. ULONG TypeString:1;
  30. ULONG TypeBuffer:1;
  31. ULONG ConvertToWidestring:1;
  32. ULONG ConvertToDeviceId:1;
  33. ULONG ConvertToHardwareId:1;
  34. ULONG ConvertToInstanceId:1;
  35. ULONG ConvertToCompatibleId:1;
  36. ULONG ConvertToPnpId:1;
  37. ULONG ConvertToAddress:1;
  38. ULONG ConvertToDevicePresense:1;
  39. ULONG ConvertIgnoreOverride:1;
  40. ULONG ConvertToSerialId:1;
  41. ULONG ConvertValidateInteger:1;
  42. ULONG Reserved1:1;
  43. ULONG RequestBuffer:1;
  44. ULONG RequestData:1;
  45. ULONG RequestInteger:1;
  46. ULONG RequestString:1;
  47. ULONG RequestNothing:1;
  48. ULONG Reserved2:3;
  49. ULONG EvalSimpleInteger:1;
  50. ULONG EvalSimpleString:1;
  51. ULONG EvalSimpleBuff:1;
  52. ULONG PropNsObjInterface:1;
  53. ULONG PropAllocateNonPaged:1;
  54. ULONG PropSkipCallback:1;
  55. ULONG PropAsynchronous:1;
  56. ULONG PropNoErrors:1;
  57. } UFlags;
  58. };
  59. //
  60. // This is the name of the control method to execute
  61. //
  62. ULONG ObjectID;
  63. //
  64. // This is the list entry that keeps all of these requests
  65. //
  66. LIST_ENTRY ListEntry;
  67. //
  68. // This is the device extension of the method that owns the method
  69. //
  70. PDEVICE_EXTENSION DeviceExtension;
  71. //
  72. // Likewise, we should remember what the corresponding acpi nsobj
  73. // for this request is
  74. //
  75. PNSOBJ AcpiObject;
  76. //
  77. // This is the callback routine to execute when the request has been
  78. // completed. This is specified by the person who created the request
  79. //
  80. PFNACB CallBackRoutine;
  81. //
  82. // This is the context to the callback
  83. //
  84. PVOID CallBackContext;
  85. //
  86. // This is where the user wants his data to be stored
  87. //
  88. PVOID *Buffer;
  89. //
  90. // This the size of the data
  91. //
  92. ULONG *BufferSize;
  93. //
  94. // This is where the result of the operation is stored
  95. //
  96. NTSTATUS Status;
  97. //
  98. // This is the structure used to store the result from the
  99. // interpreter
  100. //
  101. OBJDATA ResultData;
  102. } ACPI_GET_REQUEST, *PACPI_GET_REQUEST;
  103. //
  104. // This is the list entry where we queue up the requests
  105. //
  106. LIST_ENTRY AcpiGetListEntry;
  107. //
  108. // This is the spin lock that we use to protect the List
  109. //
  110. KSPIN_LOCK AcpiGetLock;
  111. //
  112. // The various flag defines
  113. //
  114. #define GET_TYPE_PACKAGE 0x00000001
  115. #define GET_TYPE_INTEGER 0x00000002
  116. #define GET_TYPE_STRING 0x00000004
  117. #define GET_TYPE_BUFFER 0x00000008
  118. #define GET_CONVERT_TO_WIDESTRING 0x00000010
  119. #define GET_CONVERT_TO_DEVICEID 0x00000020
  120. #define GET_CONVERT_TO_HARDWAREID 0x00000040
  121. #define GET_CONVERT_TO_INSTANCEID 0x00000080
  122. #define GET_CONVERT_TO_COMPATIBLEID 0x00000100
  123. #define GET_CONVERT_TO_PNPID 0x00000200
  124. #define GET_CONVERT_TO_ADDRESS 0x00000400
  125. #define GET_CONVERT_TO_DEVICE_PRESENCE 0x00000800
  126. #define GET_CONVERT_IGNORE_OVERRIDES 0x00001000
  127. #define GET_CONVERT_TO_SERIAL_ID 0x00002000
  128. #define GET_CONVERT_VALIDATE_INTEGER 0x00004000
  129. #define GET_REQUEST_BUFFER 0x00010000
  130. #define GET_REQUEST_DATA 0x00020000
  131. #define GET_REQUEST_INTEGER 0x00040000
  132. #define GET_REQUEST_STRING 0x00080000
  133. #define GET_REQUEST_NOTHING 0x00100000
  134. #define GET_EVAL_SIMPLE_INTEGER 0x01000000
  135. #define GET_EVAL_SIMPLE_STRING 0x02000000
  136. #define GET_EVAL_SIMPLE_BUFFER 0x04000000
  137. #define GET_PROP_NSOBJ_INTERFACE 0x08000000
  138. #define GET_PROP_ALLOCATE_NON_PAGED 0x10000000
  139. #define GET_PROP_SKIP_CALLBACK 0x20000000
  140. #define GET_PROP_ASYNCHRONOUS 0x40000000
  141. #define GET_PROP_NO_ERRORS 0x80000000
  142. //
  143. // This is the mask for the requests
  144. //
  145. #define GET_REQUEST_MASK (GET_REQUEST_BUFFER | \
  146. GET_REQUEST_DATA | \
  147. GET_REQUEST_INTEGER | \
  148. GET_REQUEST_STRING | \
  149. GET_REQUEST_NOTHING)
  150. //
  151. // This is the mask for the evals
  152. //
  153. #define GET_EVAL_MASK (GET_EVAL_SIMPLE_INTEGER | \
  154. GET_EVAL_SIMPLE_STRING | \
  155. GET_EVAL_SIMPLE_BUFFER)
  156. //
  157. // This macro is used to get an integer. It allows for the most flexible
  158. // arguments by the caller
  159. //
  160. #define ACPIGetAddress( \
  161. DeviceExtension, \
  162. Flags, \
  163. CallBack, \
  164. Context, \
  165. Buffer, \
  166. BufferSize \
  167. ) \
  168. ACPIGet( \
  169. DeviceExtension, \
  170. PACKED_ADR, \
  171. (GET_REQUEST_INTEGER | \
  172. GET_CONVERT_TO_ADDRESS | \
  173. GET_TYPE_INTEGER | \
  174. Flags), \
  175. NULL, \
  176. 0, \
  177. CallBack, \
  178. Context, \
  179. (PVOID *) Buffer, \
  180. (PULONG) BufferSize \
  181. )
  182. //
  183. // This macro is used to get an integer asynchronously
  184. //
  185. #define ACPIGetAddressAsync( \
  186. DeviceExtension, \
  187. CallBack, \
  188. Context, \
  189. Buffer, \
  190. BufferSize \
  191. ) \
  192. ACPIGetAddress( \
  193. DeviceExtension, \
  194. GET_PROP_ASYNCHRONOUS, \
  195. CallBack, \
  196. Context, \
  197. Buffer, \
  198. BufferSize \
  199. )
  200. //
  201. // This macro is used to get an integer synchronously
  202. //
  203. #define ACPIGetAddressSync( \
  204. DeviceExtension, \
  205. Buffer, \
  206. BufferSize \
  207. ) \
  208. ACPIGetAddress( \
  209. DeviceExtension, \
  210. GET_PROP_SKIP_CALLBACK, \
  211. NULL, \
  212. NULL, \
  213. Buffer, \
  214. BufferSize \
  215. )
  216. //
  217. // This macro is used to get an integer asynchronously, using only
  218. // an nsobj
  219. //
  220. #define ACPIGetNSAddressAsync( \
  221. DeviceExtension, \
  222. CallBack, \
  223. Context, \
  224. Buffer, \
  225. BufferSize \
  226. ) \
  227. ACPIGetAddress( \
  228. DeviceExtension, \
  229. (GET_PROP_ASYNCHRONOUS | \
  230. GET_PROP_NSOBJ_INTERFACE), \
  231. CallBack, \
  232. Context, \
  233. Buffer, \
  234. BufferSize \
  235. )
  236. //
  237. // This macro is used to get an integer synchronously, using only
  238. // an nsobj
  239. //
  240. #define ACPIGetNSAddressSync( \
  241. DeviceExtension, \
  242. Buffer, \
  243. BufferSize \
  244. ) \
  245. ACPIGetAddress( \
  246. DeviceExtension, \
  247. (GET_PROP_SKIP_CALLBACK | \
  248. GET_PROP_NSOBJ_INTERFACE), \
  249. NULL, \
  250. NULL, \
  251. Buffer, \
  252. BufferSize \
  253. )
  254. //
  255. // This macro is used to get a buffer. It allows for the use of the most
  256. // possible arguments by the caller
  257. //
  258. #define ACPIGetBuffer( \
  259. DeviceExtension, \
  260. ObjectID, \
  261. Flags, \
  262. CallBack, \
  263. Context, \
  264. Buffer, \
  265. BufferSize \
  266. ) \
  267. ACPIGet( \
  268. DeviceExtension, \
  269. ObjectID, \
  270. (GET_REQUEST_BUFFER | \
  271. GET_TYPE_BUFFER | \
  272. Flags), \
  273. NULL, \
  274. 0, \
  275. CallBack, \
  276. Context, \
  277. Buffer, \
  278. (PULONG) BufferSize \
  279. )
  280. //
  281. // This macro is used to get a buffer asynchronously
  282. //
  283. #define ACPIGetBufferAsync( \
  284. DeviceExtension, \
  285. ObjectID, \
  286. CallBack, \
  287. Context, \
  288. Buffer, \
  289. BufferSize \
  290. ) \
  291. ACPIGetBuffer( \
  292. DeviceExtension, \
  293. ObjectID, \
  294. (GET_PROP_ASYNCHRONOUS | \
  295. GET_PROP_ALLOCATE_NON_PAGED), \
  296. CallBack, \
  297. Context, \
  298. Buffer, \
  299. BufferSize \
  300. )
  301. //
  302. // This macro is used to get a buffer synchronously
  303. //
  304. #define ACPIGetBufferSync( \
  305. DeviceExtension, \
  306. ObjectID, \
  307. Buffer, \
  308. BufferSize \
  309. ) \
  310. ACPIGetBuffer( \
  311. DeviceExtension, \
  312. ObjectID, \
  313. GET_PROP_SKIP_CALLBACK, \
  314. NULL, \
  315. NULL, \
  316. Buffer, \
  317. BufferSize \
  318. )
  319. //
  320. // This macro is used to get a buffer asynchronously only trhough an nsobject
  321. //
  322. #define ACPIGetNSBufferAsync( \
  323. DeviceExtension, \
  324. ObjectID, \
  325. CallBack, \
  326. Context, \
  327. Buffer, \
  328. BufferSize \
  329. ) \
  330. ACPIGetBuffer( \
  331. DeviceExtension, \
  332. ObjectID, \
  333. (GET_PROP_ASYNCHRONOUS | \
  334. GET_PROP_NSOBJ_INTERFACE | \
  335. GET_PROP_ALLOCATE_NON_PAGED), \
  336. CallBack, \
  337. Context, \
  338. Buffer, \
  339. BufferSize \
  340. )
  341. //
  342. // This macro is used to get a buffer synchronously only through an nsobject
  343. //
  344. #define ACPIGetNSBufferSync( \
  345. DeviceExtension, \
  346. ObjectID, \
  347. Buffer, \
  348. BufferSize \
  349. ) \
  350. ACPIGetBuffer( \
  351. DeviceExtension, \
  352. ObjectID, \
  353. (GET_PROP_SKIP_CALLBACK | \
  354. GET_PROP_NSOBJ_INTERFACE), \
  355. NULL, \
  356. NULL, \
  357. Buffer, \
  358. BufferSize \
  359. )
  360. //
  361. // This macro is used to get a compatible id. It allows for the use of the
  362. // most possible arguments by the caller
  363. //
  364. #define ACPIGetCompatibleID( \
  365. DeviceExtension, \
  366. Flags, \
  367. CallBack, \
  368. Context, \
  369. Buffer, \
  370. BufferSize \
  371. ) \
  372. ACPIGet( \
  373. DeviceExtension, \
  374. PACKED_CID, \
  375. (GET_CONVERT_TO_COMPATIBLEID | \
  376. GET_REQUEST_STRING | \
  377. GET_TYPE_INTEGER | \
  378. GET_TYPE_STRING | \
  379. GET_TYPE_PACKAGE | \
  380. Flags ), \
  381. NULL, \
  382. 0, \
  383. CallBack, \
  384. Context, \
  385. Buffer, \
  386. (PULONG) BufferSize \
  387. )
  388. //
  389. // This macro is used to get a compatible id asynchronously
  390. //
  391. #define ACPIGetCompatibleIDAsync( \
  392. DeviceExtension, \
  393. CallBack, \
  394. Context, \
  395. Buffer, \
  396. BufferSize \
  397. ) \
  398. ACPIGetCompatibleID( \
  399. DeviceExtension, \
  400. (GET_PROP_ASYNCHRONOUS | \
  401. GET_PROP_ALLOCATE_NON_PAGED), \
  402. CallBack, \
  403. Context, \
  404. Buffer, \
  405. BufferSize \
  406. )
  407. //
  408. // This macro is used to get a compatible id, in wide string format,
  409. // asynchronously
  410. //
  411. #define ACPIGetCompatibleIDAsyncWide( \
  412. DeviceExtension, \
  413. CallBack, \
  414. Context, \
  415. Buffer, \
  416. BufferSize \
  417. ) \
  418. ACPIGetCompatibleID( \
  419. DeviceExtension, \
  420. (GET_PROP_ASYNCHRONOUS | \
  421. GET_PROP_ALLOCATE_NON_PAGED | \
  422. GET_CONVERT_TO_WIDESTRING), \
  423. CallBack, \
  424. Context, \
  425. Buffer, \
  426. BufferSize \
  427. )
  428. //
  429. // This macro is used to get a compatible id asynchronously
  430. //
  431. #define ACPIGetNSCompatibleIDAsync( \
  432. DeviceExtension, \
  433. CallBack, \
  434. Context, \
  435. Buffer, \
  436. BufferSize \
  437. ) \
  438. ACPIGetCompatibleID( \
  439. DeviceExtension, \
  440. (GET_PROP_ASYNCHRONOUS | \
  441. GET_PROP_NSOBJ_INTERFACE | \
  442. GET_PROP_ALLOCATE_NON_PAGED), \
  443. CallBack, \
  444. Context, \
  445. Buffer, \
  446. BufferSize \
  447. )
  448. //
  449. // This macro is used to get a compatible id, in wide string format,
  450. // asynchronously
  451. //
  452. #define ACPIGetNSCompatibleIDAsyncWide( \
  453. DeviceExtension, \
  454. CallBack, \
  455. Context, \
  456. Buffer, \
  457. BufferSize \
  458. ) \
  459. ACPIGetCompatibleID( \
  460. DeviceExtension, \
  461. (GET_PROP_ASYNCHRONOUS | \
  462. GET_PROP_NSOBJ_INTERFACE | \
  463. GET_PROP_ALLOCATE_NON_PAGED | \
  464. GET_CONVERT_TO_WIDESTRING), \
  465. CallBack, \
  466. Context, \
  467. Buffer, \
  468. BufferSize \
  469. )
  470. //
  471. // This macro is used to get a compatible ID synchronously
  472. //
  473. #define ACPIGetCompatibleIDSync( \
  474. DeviceExtension, \
  475. Buffer, \
  476. BufferSize \
  477. ) \
  478. ACPIGetCompatibleID( \
  479. DeviceExtension, \
  480. GET_PROP_SKIP_CALLBACK, \
  481. NULL, \
  482. NULL, \
  483. Buffer, \
  484. BufferSize \
  485. )
  486. //
  487. // This macro is used to get a compatible ID, in wide string format,
  488. // asynchronously
  489. //
  490. #define ACPIGetCompatibleIDSyncWide( \
  491. DeviceExtension, \
  492. Buffer, \
  493. BufferSize \
  494. ) \
  495. ACPIGetCompatibleID( \
  496. DeviceExtension, \
  497. (GET_PROP_SKIP_CALLBACK | \
  498. GET_CONVERT_TO_WIDESTRING), \
  499. NULL, \
  500. NULL, \
  501. Buffer, \
  502. BufferSize \
  503. )
  504. //
  505. // This macro is used to get a compatible ID synchronously
  506. //
  507. #define ACPIGetNSCompatibleIDSync( \
  508. DeviceExtension, \
  509. Buffer, \
  510. BufferSize \
  511. ) \
  512. ACPIGetCompatibleID( \
  513. DeviceExtension, \
  514. (GET_PROP_SKIP_CALLBACK | \
  515. GET_PROP_NSOBJ_INTERFACE), \
  516. NULL, \
  517. NULL, \
  518. Buffer, \
  519. BufferSize \
  520. )
  521. //
  522. // This macro is used to get a compatible ID, in wide string format,
  523. // asynchronously
  524. //
  525. #define ACPIGetNSCompatibleIDSyncWide( \
  526. DeviceExtension, \
  527. Buffer, \
  528. BufferSize \
  529. ) \
  530. ACPIGetCompatibleID( \
  531. DeviceExtension, \
  532. (GET_PROP_SKIP_CALLBACK | \
  533. GET_PROP_NSOBJ_INTERFACE | \
  534. GET_CONVERT_TO_WIDESTRING), \
  535. NULL, \
  536. NULL, \
  537. Buffer, \
  538. BufferSize \
  539. )
  540. //
  541. // This macro is used to get a data element. It is allows for the use of
  542. // the most possible arguments by the caller
  543. //
  544. #define ACPIGetData( \
  545. DeviceExtension, \
  546. ObjectID, \
  547. Flags, \
  548. CallBack, \
  549. Context, \
  550. Buffer) \
  551. ACPIGet( \
  552. DeviceExtension, \
  553. ObjectID, \
  554. (GET_REQUEST_DATA | \
  555. Flags), \
  556. NULL, \
  557. 0, \
  558. CallBack, \
  559. Context, \
  560. (PVOID *) Buffer, \
  561. (PULONG) NULL \
  562. )
  563. //
  564. // This macro is used to get a data element asynchronously
  565. //
  566. #define ACPIGetDataAsync( \
  567. DeviceExtension, \
  568. ObjectID, \
  569. CallBack, \
  570. Context, \
  571. Buffer \
  572. ) \
  573. ACPIGetData( \
  574. DeviceExtension, \
  575. ObjectID, \
  576. GET_PROP_ASYNCHRONOUS, \
  577. CallBack, \
  578. Context, \
  579. Buffer \
  580. )
  581. //
  582. // This macro is used to get a data element synchronously
  583. //
  584. #define ACPIGetDataSync( \
  585. DeviceExtension, \
  586. ObjectID, \
  587. Buffer \
  588. ) \
  589. ACPIGetData( \
  590. DeviceExtension, \
  591. ObjectID, \
  592. GET_PROP_SKIP_CALLBACK, \
  593. NULL, \
  594. NULL, \
  595. Buffer \
  596. )
  597. //
  598. // This macro is used to get a device id. It allows for the use of the most
  599. // possible arguments by the caller
  600. //
  601. #define ACPIGetDeviceID( \
  602. DeviceExtension, \
  603. Flags, \
  604. CallBack, \
  605. Context, \
  606. Buffer, \
  607. BufferSize \
  608. ) \
  609. ACPIGet( \
  610. DeviceExtension, \
  611. PACKED_HID, \
  612. (GET_CONVERT_TO_DEVICEID | \
  613. GET_REQUEST_STRING | \
  614. GET_TYPE_INTEGER | \
  615. GET_TYPE_STRING | \
  616. Flags ), \
  617. NULL, \
  618. 0, \
  619. CallBack, \
  620. Context, \
  621. Buffer, \
  622. (PULONG) BufferSize \
  623. )
  624. //
  625. // This macro is used to get the device ID asynchronously
  626. //
  627. #define ACPIGetDeviceIDAsync( \
  628. DeviceExtension, \
  629. CallBack, \
  630. Context, \
  631. Buffer, \
  632. BufferSize \
  633. ) \
  634. ACPIGetDeviceID( \
  635. DeviceExtension, \
  636. (GET_PROP_ASYNCHRONOUS | \
  637. GET_PROP_ALLOCATE_NON_PAGED), \
  638. CallBack, \
  639. Context, \
  640. Buffer, \
  641. BufferSize \
  642. )
  643. //
  644. // This is used to get the device ID as a wide string, asynchronously
  645. //
  646. #define ACPIGetDeviceIDAsyncWide( \
  647. DeviceExtension, \
  648. CallBack, \
  649. Context, \
  650. Buffer, \
  651. BufferSize \
  652. ) \
  653. ACPIGetDeviceID( \
  654. DeviceExtension, \
  655. (GET_PROP_ASYNCHRONOUS | \
  656. GET_PROP_ALLOCATE_NON_PAGED | \
  657. GET_CONVERT_TO_WIDESTRING), \
  658. CallBack, \
  659. Context, \
  660. Buffer, \
  661. BufferSize \
  662. )
  663. //
  664. // This macro is used to get the device ID synchronously
  665. //
  666. #define ACPIGetDeviceIDSync( \
  667. DeviceExtension, \
  668. Buffer, \
  669. BufferSize \
  670. ) \
  671. ACPIGetDeviceID( \
  672. DeviceExtension, \
  673. GET_PROP_SKIP_CALLBACK, \
  674. NULL, \
  675. NULL, \
  676. Buffer, \
  677. BufferSize \
  678. )
  679. //
  680. // This is used to get the device ID as a wide string, synchronously
  681. //
  682. #define ACPIGetDeviceIDSyncWide( \
  683. DeviceExtension, \
  684. Buffer, \
  685. BufferSize \
  686. ) \
  687. ACPIGetDeviceID( \
  688. DeviceExtension, \
  689. (GET_PROP_SKIP_CALLBACK | \
  690. GET_CONVERT_TO_WIDESTRING), \
  691. NULL, \
  692. NULL, \
  693. Buffer, \
  694. BufferSize \
  695. )
  696. //
  697. // This macro is used to get the device presence
  698. //
  699. #define ACPIGetDevicePresence( \
  700. DeviceExtension, \
  701. Flags, \
  702. CallBack, \
  703. Context, \
  704. Buffer, \
  705. BufferSize \
  706. ) \
  707. ACPIGet( \
  708. DeviceExtension, \
  709. PACKED_STA, \
  710. (GET_REQUEST_INTEGER | \
  711. GET_TYPE_INTEGER | \
  712. GET_CONVERT_TO_DEVICE_PRESENCE | \
  713. Flags ), \
  714. NULL, \
  715. 0, \
  716. CallBack, \
  717. Context, \
  718. (PVOID *) Buffer, \
  719. (PULONG) BufferSize \
  720. )
  721. //
  722. // This macro is used to get the device status asynchronously
  723. //
  724. #define ACPIGetDevicePresenceAsync( \
  725. DeviceExtension, \
  726. CallBack, \
  727. Context, \
  728. Buffer, \
  729. BufferSize \
  730. ) \
  731. ACPIGetDevicePresence( \
  732. DeviceExtension, \
  733. GET_PROP_ASYNCHRONOUS, \
  734. CallBack, \
  735. Context, \
  736. Buffer, \
  737. BufferSize \
  738. )
  739. //
  740. // This macro is used to get the device status synchronously
  741. //
  742. #define ACPIGetDevicePresenceSync( \
  743. DeviceExtension, \
  744. Buffer, \
  745. BufferSize \
  746. ) \
  747. ACPIGetDevicePresence( \
  748. DeviceExtension, \
  749. GET_PROP_SKIP_CALLBACK, \
  750. NULL, \
  751. NULL, \
  752. Buffer, \
  753. BufferSize \
  754. )
  755. //
  756. // This macro is used to run a _STA. It differs from ACPIGetDevicePresence
  757. // in that overrides are ignored.
  758. //
  759. #define ACPIGetDeviceHardwarePresence( \
  760. DeviceExtension, \
  761. Flags, \
  762. CallBack, \
  763. Context, \
  764. Buffer, \
  765. BufferSize \
  766. ) \
  767. ACPIGet( \
  768. DeviceExtension, \
  769. PACKED_STA, \
  770. (GET_REQUEST_INTEGER | \
  771. GET_TYPE_INTEGER | \
  772. GET_CONVERT_TO_DEVICE_PRESENCE | \
  773. GET_CONVERT_IGNORE_OVERRIDES | \
  774. Flags ), \
  775. NULL, \
  776. 0, \
  777. CallBack, \
  778. Context, \
  779. (PVOID *) Buffer, \
  780. (PULONG) BufferSize \
  781. )
  782. //
  783. // This macro is used to run a _STA asynchronously. It differs from
  784. // ACPIGetDevicePresenceAsync in that overrides is ignored.
  785. //
  786. #define ACPIGetDeviceHardwarePresenceAsync( \
  787. DeviceExtension, \
  788. CallBack, \
  789. Context, \
  790. Buffer, \
  791. BufferSize \
  792. ) \
  793. ACPIGetDeviceHardwarePresence( \
  794. DeviceExtension, \
  795. GET_PROP_ASYNCHRONOUS, \
  796. CallBack, \
  797. Context, \
  798. Buffer, \
  799. BufferSize \
  800. )
  801. //
  802. // This macro is used to run a _STA synchronously. It differs from
  803. // ACPIGetDevicePresenceSync in that overrides is ignored.
  804. //
  805. #define ACPIGetDeviceHardwarePresenceSync( \
  806. DeviceExtension, \
  807. Buffer, \
  808. BufferSize \
  809. ) \
  810. ACPIGetDeviceHardwarePresence( \
  811. DeviceExtension, \
  812. GET_PROP_SKIP_CALLBACK, \
  813. NULL, \
  814. NULL, \
  815. Buffer, \
  816. BufferSize \
  817. )
  818. //
  819. //
  820. // This macro is used to get a string ID, which is stored as either
  821. // a string or a packed integer
  822. //
  823. #define ACPIGetHardwareID( \
  824. DeviceExtension, \
  825. Flags, \
  826. CallBack, \
  827. Context, \
  828. Buffer, \
  829. BufferSize \
  830. ) \
  831. ACPIGet( \
  832. DeviceExtension, \
  833. PACKED_HID, \
  834. (GET_REQUEST_STRING | \
  835. GET_CONVERT_TO_HARDWAREID | \
  836. GET_TYPE_INTEGER | \
  837. GET_TYPE_STRING | \
  838. Flags ), \
  839. NULL, \
  840. 0, \
  841. CallBack, \
  842. Context, \
  843. Buffer, \
  844. (PULONG) BufferSize \
  845. )
  846. //
  847. // This macro is used to get an string ID asynchronously
  848. //
  849. #define ACPIGetHardwareIDAsync( \
  850. DeviceExtension, \
  851. CallBack, \
  852. Context, \
  853. Buffer, \
  854. BufferSize \
  855. ) \
  856. ACPIGetHardwareID( \
  857. DeviceExtension, \
  858. (GET_PROP_ASYNCHRONOUS | \
  859. GET_PROP_ALLOCATE_NON_PAGED), \
  860. CallBack, \
  861. Context, \
  862. Buffer, \
  863. BufferSize \
  864. )
  865. //
  866. // This macro is used to get an instance ID, in wide format, async
  867. //
  868. #define ACPIGetHardwareIDAsyncWide( \
  869. DeviceExtension, \
  870. CallBack, \
  871. Context, \
  872. Buffer, \
  873. BufferSize \
  874. ) \
  875. ACPIGetHardwareID( \
  876. DeviceExtension, \
  877. (GET_PROP_ASYNCHRONOUS | \
  878. GET_PROP_ALLOCATE_NON_PAGED | \
  879. GET_CONVERT_TO_WIDESTRING ), \
  880. CallBack, \
  881. Context, \
  882. Buffer, \
  883. BufferSize \
  884. )
  885. //
  886. // This macro is used to get an instance ID, synchronously
  887. //
  888. #define ACPIGetHardwareIDSync( \
  889. DeviceExtension, \
  890. Buffer, \
  891. BufferSize \
  892. ) \
  893. ACPIGetHardwareID( \
  894. DeviceExtension, \
  895. GET_PROP_SKIP_CALLBACK, \
  896. NULL, \
  897. NULL, \
  898. Buffer, \
  899. BufferSize \
  900. )
  901. //
  902. // This macro is used to get an instance ID, in the wide format, sync
  903. //
  904. #define ACPIGetHardwareIDSyncWide( \
  905. DeviceExtension, \
  906. Buffer, \
  907. BufferSize \
  908. ) \
  909. ACPIGetHardwareID( \
  910. DeviceExtension, \
  911. (GET_PROP_SKIP_CALLBACK | \
  912. GET_CONVERT_TO_WIDESTRING), \
  913. NULL, \
  914. NULL, \
  915. Buffer, \
  916. BufferSize \
  917. )
  918. //
  919. // This macro is used to get the instance ID. It allows for the use of the
  920. // most flexible arguments by the caller
  921. //
  922. #define ACPIGetInstanceID( \
  923. DeviceExtension, \
  924. Flags, \
  925. CallBack, \
  926. Context, \
  927. Buffer, \
  928. BufferSize \
  929. ) \
  930. ACPIGet( \
  931. DeviceExtension, \
  932. PACKED_UID, \
  933. (GET_REQUEST_STRING | \
  934. GET_TYPE_INTEGER | \
  935. GET_TYPE_STRING | \
  936. GET_CONVERT_TO_INSTANCEID | \
  937. Flags ), \
  938. NULL, \
  939. 0, \
  940. CallBack, \
  941. Context, \
  942. Buffer, \
  943. (PULONG) BufferSize \
  944. )
  945. //
  946. // This macro is used to get an instance ID asynchronously
  947. //
  948. #define ACPIGetInstanceIDAsync( \
  949. DeviceExtension, \
  950. CallBack, \
  951. Context, \
  952. Buffer, \
  953. BufferSize \
  954. ) \
  955. ACPIGetInstanceID( \
  956. DeviceExtension, \
  957. (GET_PROP_ASYNCHRONOUS | \
  958. GET_PROP_ALLOCATE_NON_PAGED), \
  959. CallBack, \
  960. Context, \
  961. Buffer, \
  962. BufferSize \
  963. )
  964. //
  965. // This macro is used to get an instance ID, in wide format, async
  966. //
  967. #define ACPIGetInstanceIDAsyncWide( \
  968. DeviceExtension, \
  969. CallBack, \
  970. Context, \
  971. Buffer, \
  972. BufferSize \
  973. ) \
  974. ACPIGetInstanceID( \
  975. DeviceExtension, \
  976. (GET_PROP_ASYNCHRONOUS | \
  977. GET_PROP_ALLOCATE_NON_PAGED | \
  978. GET_CONVERT_TO_WIDESTRING ), \
  979. CallBack, \
  980. Context, \
  981. Buffer, \
  982. BufferSize \
  983. )
  984. //
  985. // This macro is used to get an instance ID, synchronously
  986. //
  987. #define ACPIGetInstanceIDSync( \
  988. DeviceExtension, \
  989. Buffer, \
  990. BufferSize \
  991. ) \
  992. ACPIGetInstanceID( \
  993. DeviceExtension, \
  994. GET_PROP_SKIP_CALLBACK, \
  995. NULL, \
  996. NULL, \
  997. Buffer, \
  998. BufferSize \
  999. )
  1000. //
  1001. // This macro is used to get an instance ID, in the wide format, sync
  1002. //
  1003. #define ACPIGetInstanceIDSyncWide( \
  1004. DeviceExtension, \
  1005. Buffer, \
  1006. BufferSize \
  1007. ) \
  1008. ACPIGetInstanceID( \
  1009. DeviceExtension, \
  1010. (GET_PROP_SKIP_CALLBACK | \
  1011. GET_CONVERT_TO_WIDESTRING), \
  1012. NULL, \
  1013. NULL, \
  1014. Buffer, \
  1015. BufferSize \
  1016. )
  1017. //
  1018. // This macro is used to get an integer. It allows for the most flexible
  1019. // arguments by the caller
  1020. //
  1021. #define ACPIGetInteger( \
  1022. DeviceExtension, \
  1023. ObjectID, \
  1024. Flags, \
  1025. CallBack, \
  1026. Context, \
  1027. Buffer, \
  1028. BufferSize \
  1029. ) \
  1030. ACPIGet( \
  1031. DeviceExtension, \
  1032. ObjectID, \
  1033. (GET_REQUEST_INTEGER | \
  1034. GET_TYPE_INTEGER | \
  1035. Flags), \
  1036. NULL, \
  1037. 0, \
  1038. CallBack, \
  1039. Context, \
  1040. (PVOID *) Buffer, \
  1041. (PULONG) BufferSize \
  1042. )
  1043. //
  1044. // This macro is used to get an integer asynchronously
  1045. //
  1046. #define ACPIGetIntegerAsync( \
  1047. DeviceExtension, \
  1048. ObjectID, \
  1049. CallBack, \
  1050. Context, \
  1051. Buffer, \
  1052. BufferSize \
  1053. ) \
  1054. ACPIGetInteger( \
  1055. DeviceExtension, \
  1056. ObjectID, \
  1057. GET_PROP_ASYNCHRONOUS, \
  1058. CallBack, \
  1059. Context, \
  1060. Buffer, \
  1061. BufferSize \
  1062. )
  1063. //
  1064. // This macro is used to get an integer synchronously.
  1065. //
  1066. // If an invalid value is returned, 0 is substituted for the result.
  1067. //
  1068. #define ACPIGetIntegerSync( \
  1069. DeviceExtension, \
  1070. ObjectID, \
  1071. Buffer, \
  1072. BufferSize \
  1073. ) \
  1074. ACPIGetInteger( \
  1075. DeviceExtension, \
  1076. ObjectID, \
  1077. GET_PROP_SKIP_CALLBACK, \
  1078. NULL, \
  1079. NULL, \
  1080. Buffer, \
  1081. BufferSize \
  1082. )
  1083. //
  1084. // This macro is used to get an integer synchronously.
  1085. //
  1086. // If an invalid value is returned, STATUS_ACPI_INVALID_DATA is returned.
  1087. //
  1088. #define ACPIGetIntegerSyncValidate( \
  1089. DeviceExtension, \
  1090. ObjectID, \
  1091. Buffer, \
  1092. BufferSize \
  1093. ) \
  1094. ACPIGetInteger( \
  1095. DeviceExtension, \
  1096. ObjectID, \
  1097. GET_PROP_SKIP_CALLBACK | \
  1098. GET_CONVERT_VALIDATE_INTEGER, \
  1099. NULL, \
  1100. NULL, \
  1101. Buffer, \
  1102. BufferSize \
  1103. )
  1104. //
  1105. // This macro is used to get an integer asynchronously, using only
  1106. // an NSOBJ
  1107. //
  1108. #define ACPIGetNSIntegerAsync( \
  1109. DeviceExtension, \
  1110. ObjectID, \
  1111. CallBack, \
  1112. Context, \
  1113. Buffer, \
  1114. BufferSize \
  1115. ) \
  1116. ACPIGetInteger( \
  1117. DeviceExtension, \
  1118. ObjectID, \
  1119. (GET_PROP_NSOBJ_INTERFACE | \
  1120. GET_PROP_ASYNCHRONOUS), \
  1121. CallBack, \
  1122. Context, \
  1123. Buffer, \
  1124. BufferSize \
  1125. )
  1126. //
  1127. // This macro is used to get an integer synchronously, using only
  1128. // an NSOBJ
  1129. //
  1130. #define ACPIGetNSIntegerSync( \
  1131. DeviceExtension, \
  1132. ObjectID, \
  1133. Buffer, \
  1134. BufferSize \
  1135. ) \
  1136. ACPIGetInteger( \
  1137. DeviceExtension, \
  1138. ObjectID, \
  1139. (GET_PROP_SKIP_CALLBACK | \
  1140. GET_PROP_NSOBJ_INTERFACE), \
  1141. NULL, \
  1142. NULL, \
  1143. Buffer, \
  1144. BufferSize \
  1145. )
  1146. //
  1147. // This macro is used to get an integer. It allows for the most flexible
  1148. // arguments by the caller
  1149. //
  1150. #define ACPIGetIntegerEvalInteger( \
  1151. DeviceExtension, \
  1152. ObjectID, \
  1153. Flags, \
  1154. Integer, \
  1155. CallBack, \
  1156. Context, \
  1157. Buffer \
  1158. ) \
  1159. ACPIGet( \
  1160. DeviceExtension, \
  1161. ObjectID, \
  1162. (GET_REQUEST_INTEGER | \
  1163. GET_EVAL_SIMPLE_INTEGER | \
  1164. GET_TYPE_INTEGER | \
  1165. Flags), \
  1166. (PVOID) Integer, \
  1167. sizeof(ULONG), \
  1168. CallBack, \
  1169. Context, \
  1170. (PVOID *) Buffer, \
  1171. (PULONG) NULL \
  1172. )
  1173. //
  1174. // This macro is used to get an integer asynchronously
  1175. //
  1176. #define ACPIGetIntegerEvalIntegerAsync( \
  1177. DeviceExtension, \
  1178. ObjectID, \
  1179. Integer, \
  1180. CallBack, \
  1181. Context, \
  1182. Buffer \
  1183. ) \
  1184. ACPIGetIntegerEvalInteger( \
  1185. DeviceExtension, \
  1186. ObjectID, \
  1187. GET_PROP_ASYNCHRONOUS, \
  1188. Integer, \
  1189. CallBack, \
  1190. Context, \
  1191. Buffer \
  1192. )
  1193. //
  1194. // This macro is used to get an integer synchronously
  1195. //
  1196. #define ACPIGetIntegerEvalIntegerSync( \
  1197. DeviceExtension, \
  1198. ObjectID, \
  1199. Integer, \
  1200. Buffer \
  1201. ) \
  1202. ACPIGetIntegerEvalInteger( \
  1203. DeviceExtension, \
  1204. ObjectID, \
  1205. GET_PROP_SKIP_CALLBACK, \
  1206. Integer, \
  1207. NULL, \
  1208. NULL, \
  1209. Buffer \
  1210. )
  1211. //
  1212. // This macro is used to get an integer. It allows for the most flexible
  1213. // arguments by the caller
  1214. //
  1215. #define ACPIGetNothingEvalInteger( \
  1216. DeviceExtension, \
  1217. ObjectID, \
  1218. Flags, \
  1219. Integer, \
  1220. CallBack, \
  1221. Context \
  1222. ) \
  1223. ACPIGet( \
  1224. DeviceExtension, \
  1225. ObjectID, \
  1226. (GET_REQUEST_NOTHING | \
  1227. GET_EVAL_SIMPLE_INTEGER | \
  1228. Flags), \
  1229. UlongToPtr(Integer), \
  1230. sizeof(ULONG), \
  1231. CallBack, \
  1232. Context, \
  1233. NULL, \
  1234. (PULONG) NULL \
  1235. )
  1236. //
  1237. // This macro is used to get an integer asynchronously
  1238. //
  1239. #define ACPIGetNothingEvalIntegerAsync( \
  1240. DeviceExtension, \
  1241. ObjectID, \
  1242. Integer, \
  1243. CallBack, \
  1244. Context \
  1245. ) \
  1246. ACPIGetNothingEvalInteger( \
  1247. DeviceExtension, \
  1248. ObjectID, \
  1249. GET_PROP_ASYNCHRONOUS, \
  1250. Integer, \
  1251. CallBack, \
  1252. Context \
  1253. )
  1254. //
  1255. // This macro is used to get an integer synchronously
  1256. //
  1257. #define ACPIGetNothingEvalIntegerSync( \
  1258. DeviceExtension, \
  1259. ObjectID, \
  1260. Integer \
  1261. ) \
  1262. ACPIGetNothingEvalInteger( \
  1263. DeviceExtension, \
  1264. ObjectID, \
  1265. GET_PROP_SKIP_CALLBACK, \
  1266. Integer, \
  1267. NULL, \
  1268. NULL \
  1269. )
  1270. //
  1271. // This macro is used to get a string ID, which is stored as either
  1272. // a string or a packed integer
  1273. //
  1274. #define ACPIGetPnpID( \
  1275. DeviceExtension, \
  1276. Flags, \
  1277. CallBack, \
  1278. Context, \
  1279. Buffer, \
  1280. BufferSize \
  1281. ) \
  1282. ACPIGet( \
  1283. DeviceExtension, \
  1284. PACKED_HID, \
  1285. (GET_REQUEST_STRING | \
  1286. GET_CONVERT_TO_PNPID | \
  1287. GET_TYPE_INTEGER | \
  1288. GET_TYPE_STRING | \
  1289. Flags ), \
  1290. NULL, \
  1291. 0, \
  1292. CallBack, \
  1293. Context, \
  1294. Buffer, \
  1295. (PULONG) BufferSize \
  1296. )
  1297. //
  1298. // This macro is used to get an string ID asynchronously
  1299. //
  1300. #define ACPIGetPnpIDAsync( \
  1301. DeviceExtension, \
  1302. CallBack, \
  1303. Context, \
  1304. Buffer, \
  1305. BufferSize \
  1306. ) \
  1307. ACPIGetPnpID( \
  1308. DeviceExtension, \
  1309. (GET_PROP_ASYNCHRONOUS | \
  1310. GET_PROP_ALLOCATE_NON_PAGED), \
  1311. CallBack, \
  1312. Context, \
  1313. Buffer, \
  1314. BufferSize \
  1315. )
  1316. //
  1317. // This macro is used to get an instance ID, in wide format, async
  1318. //
  1319. #define ACPIGetPnpIDAsyncWide( \
  1320. DeviceExtension, \
  1321. CallBack, \
  1322. Context, \
  1323. Buffer, \
  1324. BufferSize \
  1325. ) \
  1326. ACPIGetPnpID( \
  1327. DeviceExtension, \
  1328. (GET_PROP_ASYNCHRONOUS | \
  1329. GET_PROP_ALLOCATE_NON_PAGED | \
  1330. GET_CONVERT_TO_WIDESTRING ), \
  1331. CallBack, \
  1332. Context, \
  1333. Buffer, \
  1334. BufferSize \
  1335. )
  1336. //
  1337. // This macro is used to get an string ID asynchronously, using only an
  1338. // nsobject.
  1339. //
  1340. #define ACPIGetNSPnpIDAsync( \
  1341. DeviceExtension, \
  1342. CallBack, \
  1343. Context, \
  1344. Buffer, \
  1345. BufferSize \
  1346. ) \
  1347. ACPIGetPnpID( \
  1348. DeviceExtension, \
  1349. (GET_PROP_ASYNCHRONOUS | \
  1350. GET_PROP_NSOBJ_INTERFACE | \
  1351. GET_PROP_ALLOCATE_NON_PAGED), \
  1352. CallBack, \
  1353. Context, \
  1354. Buffer, \
  1355. BufferSize \
  1356. )
  1357. //
  1358. // This macro is used to get an instance ID, in wide format, async, using
  1359. // only an nsobject.
  1360. //
  1361. #define ACPIGetNSPnpIDAsyncWide( \
  1362. DeviceExtension, \
  1363. CallBack, \
  1364. Context, \
  1365. Buffer, \
  1366. BufferSize \
  1367. ) \
  1368. ACPIGetPnpID( \
  1369. DeviceExtension, \
  1370. (GET_PROP_ASYNCHRONOUS | \
  1371. GET_PROP_ALLOCATE_NON_PAGED | \
  1372. GET_PROP_NSOBJ_INTERFACE | \
  1373. GET_CONVERT_TO_WIDESTRING ), \
  1374. CallBack, \
  1375. Context, \
  1376. Buffer, \
  1377. BufferSize \
  1378. )
  1379. //
  1380. // This macro is used to get an instance ID, synchronously
  1381. //
  1382. #define ACPIGetPnpIDSync( \
  1383. DeviceExtension, \
  1384. Buffer, \
  1385. BufferSize \
  1386. ) \
  1387. ACPIGetPnpID( \
  1388. DeviceExtension, \
  1389. GET_PROP_SKIP_CALLBACK, \
  1390. NULL, \
  1391. NULL, \
  1392. Buffer, \
  1393. BufferSize \
  1394. )
  1395. //
  1396. // This macro is used to get an instance ID, in the wide format, sync
  1397. //
  1398. #define ACPIGetPnpIDSyncWide( \
  1399. DeviceExtension, \
  1400. Buffer, \
  1401. BufferSize \
  1402. ) \
  1403. ACPIGetPnpID( \
  1404. DeviceExtension, \
  1405. (GET_PROP_SKIP_CALLBACK | \
  1406. GET_CONVERT_TO_WIDESTRING), \
  1407. NULL, \
  1408. NULL, \
  1409. Buffer, \
  1410. BufferSize \
  1411. )
  1412. //
  1413. // This macro is used to get an instance ID, synchronously, using only
  1414. // an nsobject
  1415. //
  1416. #define ACPIGetNSPnpIDSync( \
  1417. DeviceExtension, \
  1418. Buffer, \
  1419. BufferSize \
  1420. ) \
  1421. ACPIGetPnpID( \
  1422. DeviceExtension, \
  1423. (GET_PROP_SKIP_CALLBACK | \
  1424. GET_PROP_NSOBJ_INTERFACE), \
  1425. NULL, \
  1426. NULL, \
  1427. Buffer, \
  1428. BufferSize \
  1429. )
  1430. //
  1431. // This macro is used to get an instance ID, in the wide format, sync,
  1432. // using only an nsobject
  1433. //
  1434. #define ACPIGetNSPnpIDSyncWide( \
  1435. DeviceExtension, \
  1436. Buffer, \
  1437. BufferSize \
  1438. ) \
  1439. ACPIGetPnpID( \
  1440. DeviceExtension, \
  1441. (GET_PROP_SKIP_CALLBACK | \
  1442. GET_PROP_NSOBJ_INTERFACE | \
  1443. GET_CONVERT_TO_WIDESTRING), \
  1444. NULL, \
  1445. NULL, \
  1446. Buffer, \
  1447. BufferSize \
  1448. )
  1449. #define ACPIGetSerialIDWide( \
  1450. DeviceExtension, \
  1451. Buffer, \
  1452. BufferSize \
  1453. ) \
  1454. ACPIGet( \
  1455. DeviceExtension, \
  1456. PACKED_UID, \
  1457. (GET_REQUEST_STRING | \
  1458. GET_CONVERT_TO_SERIAL_ID | \
  1459. GET_CONVERT_TO_WIDESTRING | \
  1460. GET_TYPE_INTEGER | \
  1461. GET_TYPE_STRING), \
  1462. NULL, \
  1463. 0, \
  1464. NULL, \
  1465. NULL, \
  1466. Buffer, \
  1467. BufferSize \
  1468. )
  1469. NTSTATUS
  1470. ACPIGet(
  1471. IN PVOID Target,
  1472. IN ULONG ObjectID,
  1473. IN ULONG Flags,
  1474. IN PVOID SimpleArgument,
  1475. IN ULONG SimpleArgumentSize,
  1476. IN PFNACB CallBackRoutine OPTIONAL,
  1477. IN PVOID CallBackContext OPTIONAL,
  1478. OUT PVOID *Buffer,
  1479. OUT ULONG *BufferSize OPTIONAL
  1480. );
  1481. NTSTATUS
  1482. ACPIGetConvertToAddress(
  1483. IN PDEVICE_EXTENSION DeviceExtension,
  1484. IN NTSTATUS Status,
  1485. IN POBJDATA Result,
  1486. IN ULONG Flags,
  1487. OUT PVOID *Buffer,
  1488. OUT ULONG *BufferSize
  1489. );
  1490. NTSTATUS
  1491. ACPIGetConvertToCompatibleID(
  1492. IN PDEVICE_EXTENSION DeviceExtension,
  1493. IN NTSTATUS Status,
  1494. IN POBJDATA Result,
  1495. IN ULONG Flags,
  1496. OUT PVOID *Buffer,
  1497. OUT ULONG *BufferSize
  1498. );
  1499. NTSTATUS
  1500. ACPIGetConvertToCompatibleIDWide(
  1501. IN PDEVICE_EXTENSION DeviceExtension,
  1502. IN NTSTATUS Status,
  1503. IN POBJDATA Result,
  1504. IN ULONG Flags,
  1505. OUT PVOID *Buffer,
  1506. OUT ULONG *BufferSize
  1507. );
  1508. NTSTATUS
  1509. ACPIGetConvertToDeviceID(
  1510. IN PDEVICE_EXTENSION DeviceExtension,
  1511. IN NTSTATUS Status,
  1512. IN POBJDATA Result,
  1513. IN ULONG Flags,
  1514. OUT PVOID *Buffer,
  1515. OUT ULONG *BufferSize
  1516. );
  1517. NTSTATUS
  1518. ACPIGetConvertToDeviceIDWide(
  1519. IN PDEVICE_EXTENSION DeviceExtension,
  1520. IN NTSTATUS Status,
  1521. IN POBJDATA Result,
  1522. IN ULONG Flags,
  1523. OUT PVOID *Buffer,
  1524. OUT ULONG *BufferSize
  1525. );
  1526. NTSTATUS
  1527. ACPIGetConvertToDevicePresence(
  1528. IN PDEVICE_EXTENSION DeviceExtension,
  1529. IN NTSTATUS Status,
  1530. IN POBJDATA Result,
  1531. IN ULONG Flags,
  1532. OUT PVOID *Buffer,
  1533. OUT ULONG *BufferSize
  1534. );
  1535. NTSTATUS
  1536. ACPIGetConvertToHardwareID(
  1537. IN PDEVICE_EXTENSION DeviceExtension,
  1538. IN NTSTATUS Status,
  1539. IN POBJDATA Result,
  1540. IN ULONG Flags,
  1541. OUT PVOID *Buffer,
  1542. OUT ULONG *BufferSize
  1543. );
  1544. NTSTATUS
  1545. ACPIGetConvertToHardwareIDWide(
  1546. IN PDEVICE_EXTENSION DeviceExtension,
  1547. IN NTSTATUS Status,
  1548. IN POBJDATA Result,
  1549. IN ULONG Flags,
  1550. OUT PVOID *Buffer,
  1551. OUT ULONG *BufferSize
  1552. );
  1553. NTSTATUS
  1554. ACPIGetConvertToInstanceID(
  1555. IN PDEVICE_EXTENSION DeviceExtension,
  1556. IN NTSTATUS Status,
  1557. IN POBJDATA Result,
  1558. IN ULONG Flags,
  1559. OUT PVOID *Buffer,
  1560. OUT ULONG *BufferSize
  1561. );
  1562. NTSTATUS
  1563. ACPIGetConvertToInstanceIDWide(
  1564. IN PDEVICE_EXTENSION DeviceExtension,
  1565. IN NTSTATUS Status,
  1566. IN POBJDATA Result,
  1567. IN ULONG Flags,
  1568. OUT PVOID *Buffer,
  1569. OUT ULONG *BufferSize
  1570. );
  1571. NTSTATUS
  1572. ACPIGetConvertToPnpID(
  1573. IN PDEVICE_EXTENSION DeviceExtension,
  1574. IN NTSTATUS Status,
  1575. IN POBJDATA Result,
  1576. IN ULONG Flags,
  1577. OUT PVOID *Buffer,
  1578. OUT ULONG *BufferSize
  1579. );
  1580. NTSTATUS
  1581. ACPIGetConvertToPnpIDWide(
  1582. IN PDEVICE_EXTENSION DeviceExtension,
  1583. IN NTSTATUS Status,
  1584. IN POBJDATA Result,
  1585. IN ULONG Flags,
  1586. OUT PVOID *Buffer,
  1587. OUT ULONG *BufferSize
  1588. );
  1589. NTSTATUS
  1590. ACPIGetConvertToSerialIDWide(
  1591. IN PDEVICE_EXTENSION DeviceExtension,
  1592. IN NTSTATUS Status,
  1593. IN POBJDATA Result,
  1594. IN ULONG Flags,
  1595. OUT PVOID *Buffer,
  1596. OUT ULONG *BufferSize OPTIONAL
  1597. );
  1598. NTSTATUS
  1599. ACPIGetConvertToString(
  1600. IN PDEVICE_EXTENSION DeviceExtension,
  1601. IN NTSTATUS Status,
  1602. IN POBJDATA Result,
  1603. IN ULONG Flags,
  1604. OUT PVOID *Buffer,
  1605. OUT ULONG *BufferSize
  1606. );
  1607. NTSTATUS
  1608. ACPIGetConvertToStringWide(
  1609. IN PDEVICE_EXTENSION DeviceExtension,
  1610. IN NTSTATUS Status,
  1611. IN POBJDATA Result,
  1612. IN ULONG Flags,
  1613. OUT PVOID *Buffer,
  1614. OUT ULONG *BufferSize OPTIONAL
  1615. );
  1616. NTSTATUS
  1617. ACPIGetProcessorID(
  1618. IN PDEVICE_EXTENSION DeviceExtension,
  1619. IN NTSTATUS Status,
  1620. IN POBJDATA Result,
  1621. IN ULONG Flags,
  1622. OUT PVOID *Buffer,
  1623. OUT ULONG *BufferSize
  1624. );
  1625. NTSTATUS
  1626. ACPIGetProcessorIDWide(
  1627. IN PDEVICE_EXTENSION DeviceExtension,
  1628. IN NTSTATUS Status,
  1629. IN POBJDATA Result,
  1630. IN ULONG Flags,
  1631. OUT PVOID *Buffer,
  1632. OUT ULONG *BufferSize
  1633. );
  1634. NTSTATUS
  1635. ACPIGetProcessorStatus(
  1636. IN PDEVICE_EXTENSION DeviceExtension,
  1637. IN ULONG Flags,
  1638. OUT PULONG DeviceStatus
  1639. );
  1640. VOID
  1641. EXPORT
  1642. ACPIGetWorkerForBuffer(
  1643. IN PNSOBJ AcpiObject,
  1644. IN NTSTATUS Status,
  1645. IN POBJDATA Result,
  1646. IN PVOID Context
  1647. );
  1648. VOID
  1649. EXPORT
  1650. ACPIGetWorkerForData(
  1651. IN PNSOBJ AcpiObject,
  1652. IN NTSTATUS Status,
  1653. IN POBJDATA Result,
  1654. IN PVOID Context
  1655. );
  1656. VOID
  1657. EXPORT
  1658. ACPIGetWorkerForInteger(
  1659. IN PNSOBJ AcpiObject,
  1660. IN NTSTATUS Status,
  1661. IN POBJDATA Result,
  1662. IN PVOID Context
  1663. );
  1664. VOID
  1665. EXPORT
  1666. ACPIGetWorkerForNothing(
  1667. IN PNSOBJ AcpiObject,
  1668. IN NTSTATUS Status,
  1669. IN POBJDATA Result,
  1670. IN PVOID Context
  1671. );
  1672. VOID
  1673. EXPORT
  1674. ACPIGetWorkerForString(
  1675. IN PNSOBJ AcpiObject,
  1676. IN NTSTATUS Status,
  1677. IN POBJDATA Result,
  1678. IN PVOID Context
  1679. );
  1680. #endif