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.

805 lines
23 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. acpiosnt.h
  5. Abstract:
  6. This contains information that is specific to the NT ACPI module
  7. Author:
  8. Stephane Plante (splante)
  9. Environment:
  10. NT Kernel Model Driver only
  11. --*/
  12. #ifndef _ACPIOSNT_H_
  13. #define _ACPIOSNT_H_
  14. //
  15. // Additonal status bits
  16. //
  17. #define PM1_GPE_PENDING 0x00010000
  18. #define PM1_DPC_IN_PROGRESS 0x80000000
  19. //
  20. // Define the Maximum number of ACPI suffixes that we should try
  21. //
  22. #define ACPI_MAX_SUFFIX_LENGTH 99
  23. typedef
  24. VOID
  25. (*PDEVICE_WORKER) (
  26. IN struct _DEVICE_EXTENSION *DevExt,
  27. IN ULONG Events
  28. );
  29. typedef struct {
  30. PDRIVER_DISPATCH CreateClose;
  31. PDRIVER_DISPATCH DeviceControl;
  32. PDRIVER_DISPATCH PnpStartDevice;
  33. PDRIVER_DISPATCH *Pnp;
  34. PDRIVER_DISPATCH *Power;
  35. PDRIVER_DISPATCH SystemControl;
  36. PDRIVER_DISPATCH Other;
  37. PDEVICE_WORKER Worker;
  38. } IRP_DISPATCH_TABLE, *PIRP_DISPATCH_TABLE;
  39. typedef struct {
  40. PUCHAR PnPId;
  41. PIRP_DISPATCH_TABLE DispatchTable;
  42. } INTERNAL_DEVICE_TABLE, *PINTERNAL_DEVICE_TABLE;
  43. typedef struct {
  44. PUCHAR PnPId;
  45. ULONGLONG Flags;
  46. } INTERNAL_DEVICE_FLAG_TABLE, *PINTERNAL_DEVICE_FLAG_TABLE;
  47. struct _DEVICE_EXTENSION ;
  48. typedef struct _DEVICE_EXTENSION DEVICE_EXTENSION, *PDEVICE_EXTENSION ;
  49. //
  50. // Some bits to realize what state the device is in
  51. //
  52. typedef enum _ACPI_DEVICE_STATE {
  53. Stopped = 0,
  54. Inactive,
  55. Started,
  56. Removed,
  57. SurpriseRemoved,
  58. Invalid
  59. } ACPI_DEVICE_STATE;
  60. //
  61. // For START_DEVICE's we want to drop from DISPATCH_LEVEL (the level that the
  62. // Power Management Engine runs at) to PASSIVE_LEVEL so that we can either
  63. // a) pass the irp along, or b) run some code was designed to run at passive
  64. // level
  65. //
  66. typedef struct {
  67. //
  68. // Pointer to the work item that we will queue up.
  69. //
  70. WORK_QUEUE_ITEM Item;
  71. //
  72. // The device object --- we need to have a reference back to ourself
  73. //
  74. PDEVICE_OBJECT DeviceObject;
  75. //
  76. // The Start Irp
  77. //
  78. PIRP Irp;
  79. } WORK_QUEUE_CONTEXT, *PWORK_QUEUE_CONTEXT;
  80. typedef struct _FDO_DEVICE_EXTENSION {
  81. //
  82. // Must be first. Must match up with the structure that we will put in the
  83. // Union that will allow the driver to "know" where the item is, regardless
  84. // of what the device extension type is
  85. //
  86. WORK_QUEUE_CONTEXT WorkContext;
  87. //
  88. // Location of our Interrupt Object
  89. //
  90. PKINTERRUPT InterruptObject;
  91. //
  92. // Pending PM1 status bits which need handled
  93. //
  94. union {
  95. ULONG Pm1Status;
  96. struct {
  97. ULONG Tmr_Sts:1;
  98. ULONG Reserved1:3;
  99. ULONG Bm_Sts:1;
  100. ULONG Gbl_Sts:1;
  101. ULONG Reserved2:2;
  102. ULONG PwrBtn_Sts:1;
  103. ULONG SlpBtn_Sts:1;
  104. ULONG Rtc_Sts:1;
  105. ULONG Reserved3:4;
  106. ULONG Wak_Sts:1;
  107. ULONG Gpe_Sts:1;
  108. ULONG Reserved4:14;
  109. ULONG Dpc_Sts:1;
  110. } UPm1Status;
  111. };
  112. //
  113. // The storage for our DPC object
  114. //
  115. KDPC InterruptDpc;
  116. } FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION;
  117. typedef struct _PDO_DEVICE_EXTENSION {
  118. //
  119. // Must be first. Must match up with the structure that we will put in the
  120. // Union that will allow the driver to "know" where the item is, regardless
  121. // of what the device extension type is
  122. //
  123. WORK_QUEUE_CONTEXT WorkContext;
  124. } PDO_DEVICE_EXTENSION, *PPDO_DEVICE_EXTENSION;
  125. typedef struct _FILTER_DEVICE_EXTENSION {
  126. //
  127. // Must be first. Must match up with the structure that we will put in the
  128. // Union that will allow the driver to "know" where the item is, regardless
  129. // of what the device extension type is
  130. //
  131. WORK_QUEUE_CONTEXT WorkContext;
  132. //
  133. // The interfaces that we kick out
  134. //
  135. PBUS_INTERFACE_STANDARD Interface;
  136. } FILTER_DEVICE_EXTENSION, *PFILTER_DEVICE_EXTENSION;
  137. //
  138. // This is the structure that gets used when we want to pass events
  139. // to and from the worker queue
  140. //
  141. typedef struct {
  142. ULONG PendingEvents;
  143. LIST_ENTRY Link;
  144. } EXTENSION_WORKER, *PEXTENSION_WORKER;
  145. //
  146. // This is the extension that is used for button
  147. //
  148. typedef struct {
  149. //
  150. // Must be first to match up with the EXTENSION_WORKER that we put into
  151. // the UNION that this structure also goes in. Ensures that the worker
  152. // thread code knows where the WorkQueue for all of the subextensions
  153. //
  154. EXTENSION_WORKER WorkQueue;
  155. //
  156. // Lock to protect button accesses
  157. //
  158. KSPIN_LOCK SpinLock;
  159. //
  160. // Current Lid State (Pushed or Not)
  161. //
  162. BOOLEAN LidState;
  163. //
  164. // Current Events, Wake/Power/Sleep
  165. //
  166. union {
  167. ULONG Events;
  168. struct {
  169. ULONG Power_Button:1;
  170. ULONG Sleep_Button:1;
  171. ULONG Lid_Switch:1;
  172. ULONG Reserved:28;
  173. ULONG Wake_Capable:1;
  174. } UEvents;
  175. };
  176. //
  177. // What the button is capable of reporting
  178. //
  179. union {
  180. ULONG Capabilities;
  181. struct {
  182. ULONG Power_Button:1;
  183. ULONG Sleep_Button:1;
  184. ULONG Lid_Switch:1;
  185. ULONG Reserved:28;
  186. ULONG Wake_Capable:1;
  187. } UCapabilities;
  188. };
  189. } BUTTON_EXTENSION, *PBUTTON_EXTENSION;
  190. //
  191. // This is the structure that is used for Thermal Zones
  192. //
  193. typedef struct {
  194. //
  195. // Must be first to match up with the EXTENSION_WORKER that we put into
  196. // the UNION that this structure also goes in. Ensures that the worker
  197. // thread code knows where the WorkQueue for all of the subextensions
  198. //
  199. EXTENSION_WORKER WorkQueue;
  200. //
  201. // Lock to protect thermal zone accesses
  202. //
  203. KSPIN_LOCK SpinLock;
  204. //
  205. // Current State of the thermal zone
  206. //
  207. union {
  208. ULONG Flags;
  209. struct {
  210. ULONG Cooling:1;
  211. ULONG Temp:1;
  212. ULONG Trip:1;
  213. ULONG Mode:1;
  214. ULONG Init:1;
  215. ULONG Reserved:24;
  216. ULONG Wait:1;
  217. ULONG Busy:1;
  218. ULONG Loop:1;
  219. } UFlags;
  220. };
  221. //
  222. // Points to the Thermal Information Structure that contains the real
  223. // information
  224. //
  225. PVOID Info;
  226. //
  227. // WMI Context Information Pointer
  228. //
  229. PWMILIB_CONTEXT WmilibContext;
  230. } THERMAL_EXTENSION, *PTHERMAL_EXTENSION;
  231. //
  232. // This is the structure that is used for Link Nodes
  233. //
  234. typedef struct {
  235. //
  236. // Must be first to match up with the EXTENSION_WORKER that we put into
  237. // the UNION that this structure also goes in. Ensures that the worker
  238. // thread code knows where the WorkQueue for all of the subextensions
  239. //
  240. EXTENSION_WORKER WorkQueue; // must be first
  241. //
  242. // To quickly allow the link nodes to be searched, they are linked together
  243. // regardless of their real location in the tree
  244. //
  245. LIST_ENTRY List;
  246. //
  247. // Usage count on the link nodes
  248. //
  249. ULONG ReferenceCount;
  250. //
  251. // Working reference count
  252. //
  253. LONG TempRefCount;
  254. PNSOBJ NameSpaceObject; // Obsolete
  255. //
  256. // The IRQ that the link node is using
  257. //
  258. ULONGLONG CurrentIrq;
  259. //
  260. // State flags - Shared/Exclusive, Level/Edge
  261. //
  262. UCHAR Flags;
  263. } LINK_NODE_EXTENSION, *PLINK_NODE_EXTENSION;
  264. //
  265. // This enum covers the various states of a _DCK device.
  266. //
  267. typedef enum {
  268. IS_UNKNOWN,
  269. IS_ISOLATED,
  270. IS_ISOLATION_DROPPED
  271. } ISOLATION_STATE, *PISOLATION_STATE;
  272. //
  273. // This is the structure that is used for Dock's
  274. //
  275. typedef struct {
  276. //
  277. // Must be first to match up with the EXTENSION_WORKER that we put into
  278. // the UNION that this structure also goes in. Ensures that the worker
  279. // thread code knows where the WorkQueue for all of the subextensions
  280. //
  281. EXTENSION_WORKER WorkQueue;
  282. //
  283. // This is the corresponding ACPI extension for the device
  284. //
  285. PDEVICE_EXTENSION CorrospondingAcpiDevice;
  286. //
  287. // This is how (or more properly when) to handle profile changes
  288. //
  289. PROFILE_DEPARTURE_STYLE ProfileDepartureStyle;
  290. //
  291. // Reference count for the dock interface
  292. //
  293. ULONG InterfaceReferenceCount;
  294. //
  295. // Current state of isolation.
  296. //
  297. ISOLATION_STATE IsolationState;
  298. } DOCK_EXTENSION, *PDOCK_EXTENSION;
  299. typedef struct _PROCESSOR_DEVICE_EXTENSION {
  300. //
  301. // Must be first. Must match up with the structure that we will put in the
  302. // Union that will allow the driver to "know" where the item is, regardless
  303. // of what the device extension type is
  304. //
  305. EXTENSION_WORKER WorkQueue;
  306. //
  307. // Points to the Compatible ID of the device
  308. //
  309. PUCHAR CompatibleID;
  310. //
  311. // This is the index in the ProcessorList for this processor
  312. //
  313. ULONG ProcessorIndex;
  314. } PROCESSOR_DEVICE_EXTENSION, *PPROCESSOR_DEVICE_EXTENSION;
  315. //
  316. // The Device Extension Structure
  317. //
  318. struct _DEVICE_EXTENSION {
  319. //
  320. // Common flags
  321. //
  322. union {
  323. //
  324. // Make sure that these two elements stay in sync
  325. //
  326. ULONGLONG Flags;
  327. struct {
  328. ULONGLONG Type_Never_Present:1;
  329. ULONGLONG Type_Not_Present:1;
  330. ULONGLONG Type_Removed:1;
  331. ULONGLONG Type_Not_Found:1;
  332. ULONGLONG Type_Fdo:1;
  333. ULONGLONG Type_Pdo:1;
  334. ULONGLONG Type_Filter:1;
  335. ULONGLONG Type_Surprise_Removed:1;
  336. ULONGLONG Type_Not_Enumerated:1;
  337. ULONGLONG Reserved1:7;
  338. ULONGLONG Cap_Wake:1;
  339. ULONGLONG Cap_Raw:1;
  340. ULONGLONG Cap_Button:1;
  341. ULONGLONG Cap_Always_PS0:1;
  342. ULONGLONG Cap_No_Filter:1;
  343. ULONGLONG Cap_No_Stop:1;
  344. ULONGLONG Cap_No_Override:1;
  345. ULONGLONG Cap_ISA:1;
  346. ULONGLONG Cap_EIO:1;
  347. ULONGLONG Cap_PCI:1;
  348. ULONGLONG Cap_Serial:1;
  349. ULONGLONG Cap_Thermal_Zone:1;
  350. ULONGLONG Cap_LinkNode:1;
  351. ULONGLONG Cap_No_Show_in_UI:1;
  352. ULONGLONG Cap_Never_show_in_UI:1;
  353. ULONGLONG Cap_Start_in_D3:1;
  354. ULONGLONG Cap_PCI_Device:1;
  355. ULONGLONG Cap_PIC_Device:1;
  356. ULONGLONG Cap_Unattached_Dock:1;
  357. ULONGLONG Cap_No_Disable_Wake:1;
  358. ULONGLONG Cap_Processor:1;
  359. ULONGLONG Cap_Container:1;
  360. ULONGLONG Cap_PCI_Bar_Target:1;
  361. ULONGLONG Cap_No_Remove_or_Eject:1;
  362. ULONGLONG Reserved2:1;
  363. ULONGLONG Prop_Rebuild_Children:1;
  364. ULONGLONG Prop_Invalid_Relations:1;
  365. ULONGLONG Prop_Unloading:1;
  366. ULONGLONG Prop_Address:1;
  367. ULONGLONG Prop_HID:1;
  368. ULONGLONG Prop_UID:1;
  369. ULONGLONG Prop_Fixed_HID:1;
  370. ULONGLONG Prop_Fixed_UID:1;
  371. ULONGLONG Prop_Failed_Init:1;
  372. ULONGLONG Prop_Srs_Present:1;
  373. ULONGLONG Prop_No_Object:1;
  374. ULONGLONG Prop_Exclusive:1;
  375. ULONGLONG Prop_Ran_INI:1;
  376. ULONGLONG Prop_Device_Enabled:1;
  377. ULONGLONG Prop_Device_Failed:1;
  378. ULONGLONG Prop_Acpi_Power:1;
  379. ULONGLONG Prop_Dock:1;
  380. ULONGLONG Prop_Built_Power_Table:1;
  381. ULONGLONG Prop_Has_PME:1;
  382. ULONGLONG Prop_No_Lid_Action:1;
  383. ULONGLONG Prop_Fixed_Address:1;
  384. ULONGLONG Prop_Callback:1;
  385. ULONGLONG Prop_Fixed_CiD:1;
  386. } UFlags;
  387. };
  388. //
  389. // Signature Block
  390. //
  391. ULONG Signature;
  392. //
  393. // Debug Flags
  394. //
  395. ULONG DebugFlags;
  396. //
  397. // Primary irp handlers
  398. //
  399. PIRP_DISPATCH_TABLE DispatchTable;
  400. //
  401. // Note that we cannot have these 2 structures in the 2nd nameless union
  402. // because these structures are basically used by all devices
  403. //
  404. union {
  405. //
  406. // Start device context
  407. //
  408. WORK_QUEUE_CONTEXT WorkContext;
  409. //
  410. // Contains Fdo Specific information
  411. //
  412. FDO_DEVICE_EXTENSION Fdo;
  413. //
  414. // Contains Filter Specific information
  415. //
  416. FILTER_DEVICE_EXTENSION Filter;
  417. //
  418. // Contains PDO specific information
  419. //
  420. PDO_DEVICE_EXTENSION Pdo;
  421. };
  422. //
  423. // Union of those structures that are device type dependent
  424. //
  425. union {
  426. //
  427. // Common device worker queue structure for device types
  428. // which use them
  429. //
  430. EXTENSION_WORKER WorkQueue;
  431. //
  432. // Contains internal button device information
  433. //
  434. BUTTON_EXTENSION Button;
  435. //
  436. // Contains internal thermal device information
  437. //
  438. THERMAL_EXTENSION Thermal;
  439. //
  440. // Contains the information for a link node
  441. //
  442. LINK_NODE_EXTENSION LinkNode;
  443. //
  444. // Contains dock information (such as the extension of the acpi object
  445. // this node represents)
  446. //
  447. DOCK_EXTENSION Dock;
  448. //
  449. // Contains the information about the processor device
  450. //
  451. PROCESSOR_DEVICE_EXTENSION Processor;
  452. };
  453. //
  454. // Device State Flags
  455. //
  456. ACPI_DEVICE_STATE DeviceState;
  457. //
  458. // Previous State Flags (for the Cancel routines)
  459. //
  460. ACPI_DEVICE_STATE PreviousState;
  461. //
  462. // Power Information about the device
  463. //
  464. ACPI_POWER_INFO PowerInfo;
  465. //
  466. // Pointer to a built-up string that represents the
  467. // Device ID or the device address. The flags determine
  468. // which of the following should be used
  469. //
  470. union {
  471. PUCHAR DeviceID;
  472. ULONG Address;
  473. };
  474. //
  475. // The instance ID of this device
  476. //
  477. PUCHAR InstanceID;
  478. //
  479. // The resource list that received
  480. //
  481. PCM_RESOURCE_LIST ResourceList;
  482. //
  483. // The resource list that we output
  484. //
  485. POBJDATA PnpResourceList;
  486. //
  487. // Outstanding IRP Reference Counts ...
  488. //
  489. LONG OutstandingIrpCount;
  490. //
  491. // This is the number of outstanding references to this device extension
  492. // When this drops to zero, the memory may be freed. Each child object
  493. // counts for one reference, as does the associated device object and
  494. // name space object.
  495. //
  496. LONG ReferenceCount;
  497. //
  498. // This is the number of outstanding Hibernate Path notifications on the
  499. // the device
  500. //
  501. LONG HibernatePathCount;
  502. //
  503. // Synchronization Event for our use. Lets us know when a remove occurs.
  504. //
  505. PKEVENT RemoveEvent;
  506. //
  507. // Points to the associated ACPI-Name-space object
  508. //
  509. PNSOBJ AcpiObject;
  510. //
  511. // This is the device object that we are linked to
  512. //
  513. PDEVICE_OBJECT DeviceObject;
  514. //
  515. // This is the driver object we send requests onto
  516. //
  517. PDEVICE_OBJECT TargetDeviceObject;
  518. //
  519. // This is the driver object just below us.
  520. //
  521. PDEVICE_OBJECT PhysicalDeviceObject;
  522. //
  523. // This is our Parent
  524. //
  525. struct _DEVICE_EXTENSION *ParentExtension;
  526. //
  527. // This points to our first child
  528. //
  529. LIST_ENTRY ChildDeviceList;
  530. //
  531. // This points to our next sibling
  532. //
  533. LIST_ENTRY SiblingDeviceList;
  534. //
  535. // This is a list of devices that will be ejected when this device is
  536. //
  537. LIST_ENTRY EjectDeviceHead;
  538. //
  539. // The ejection list is threaded through this entry.
  540. //
  541. LIST_ENTRY EjectDeviceList;
  542. } ;
  543. //
  544. // DEVICE_EXTENSION.Flags
  545. // These are the ones that specify which type of object the current
  546. // extension represents. As you tell, they are not quite mutually exclusive
  547. //
  548. // The difference between the NOT_FOUND, NOT_PRESENT, and NEVER_PRESENT is
  549. //
  550. // NOT_FOUND is used to determine if we have build a PDO/FDO whatever.
  551. // the NOT_FOUND flag is set on an attach or devobj create, and
  552. // is cleared during a devobj delete or in response to a surprise
  553. // remove IRP.
  554. //
  555. // NOT_PRESENT means that the isn't currently present as determined by the
  556. // _STA method in the hardware.
  557. //
  558. // NEVER_PRESENT means that the device will always be NOT_PRESENT
  559. // regardless of what the _STA says
  560. //
  561. // The difference between an extension that has been REMOVED and one that has
  562. // been SURPRISE_REMOVED is that there is a dummy extension for the
  563. // SURPRISE_REMOVED case that replaces the original device extension pointer
  564. // in the device object. This new extension gets the SURPRISE_REMOVED flag, so
  565. // that people know that there is an original extension behind it.
  566. //
  567. //
  568. #define DEV_TYPE_NEVER_PRESENT 0x0000000000000001
  569. #define DEV_TYPE_NOT_PRESENT 0x0000000000000002
  570. #define DEV_TYPE_REMOVED 0x0000000000000004
  571. #define DEV_TYPE_NOT_FOUND 0x0000000000000008
  572. #define DEV_TYPE_FDO 0x0000000000000010
  573. #define DEV_TYPE_PDO 0x0000000000000020
  574. #define DEV_TYPE_FILTER 0x0000000000000040
  575. #define DEV_TYPE_SURPRISE_REMOVED 0x0000000000000080
  576. #define DEV_TYPE_NOT_ENUMERATED 0x0000000000000100
  577. //
  578. // These are the capabilities of the device
  579. //
  580. #define DEV_CAP_WAKE 0x0000000000010000
  581. #define DEV_CAP_RAW 0x0000000000020000
  582. #define DEV_CAP_BUTTON 0x0000000000040000
  583. #define DEV_CAP_ALWAYS_PS0 0x0000000000080000
  584. #define DEV_CAP_NO_FILTER 0x0000000000100000
  585. #define DEV_CAP_NO_STOP 0x0000000000200000
  586. #define DEV_CAP_NO_OVERRIDE 0x0000000000400000
  587. #define DEV_CAP_ISA 0x0000000000800000
  588. #define DEV_CAP_EIO 0x0000000001000000
  589. #define DEV_CAP_PCI 0x0000000002000000
  590. #define DEV_CAP_SERIAL 0x0000000004000000
  591. #define DEV_CAP_THERMAL_ZONE 0x0000000008000000
  592. #define DEV_CAP_LINK_NODE 0x0000000010000000
  593. #define DEV_CAP_NO_SHOW_IN_UI 0x0000000020000000
  594. #define DEV_CAP_NEVER_SHOW_IN_UI 0x0000000040000000
  595. #define DEV_CAP_START_IN_D3 0x0000000080000000
  596. #define DEV_CAP_PCI_DEVICE 0x0000000100000000
  597. #define DEV_CAP_PIC_DEVICE 0x0000000200000000
  598. #define DEV_CAP_UNATTACHED_DOCK 0x0000000400000000
  599. #define DEV_CAP_NO_DISABLE_WAKE 0x0000000800000000
  600. #define DEV_CAP_PROCESSOR 0x0000001000000000
  601. #define DEV_CAP_CONTAINER 0x0000002000000000
  602. #define DEV_CAP_PCI_BAR_TARGET 0x0000004000000000
  603. #define DEV_CAP_NO_REMOVE_OR_EJECT 0x0000008000000000
  604. //
  605. // These are the properties of the device
  606. //
  607. #define DEV_PROP_REBUILD_CHILDREN 0x0000020000000000
  608. #define DEV_PROP_INVALID_RELATIONS 0x0000040000000000
  609. #define DEV_PROP_UNLOADING 0x0000080000000000
  610. #define DEV_PROP_ADDRESS 0x0000100000000000
  611. #define DEV_PROP_HID 0x0000200000000000
  612. #define DEV_PROP_UID 0x0000400000000000
  613. #define DEV_PROP_FIXED_HID 0x0000800000000000
  614. #define DEV_PROP_FIXED_UID 0x0001000000000000
  615. #define DEV_PROP_FAILED_INIT 0x0002000000000000
  616. #define DEV_PROP_SRS_PRESENT 0x0004000000000000
  617. #define DEV_PROP_NO_OBJECT 0x0008000000000000
  618. #define DEV_PROP_EXCLUSIVE 0x0010000000000000
  619. #define DEV_PROP_RAN_INI 0x0020000000000000
  620. #define DEV_PROP_DEVICE_ENABLED 0x0040000000000000
  621. #define DEV_PROP_DEVICE_FAILED 0x0080000000000000
  622. #define DEV_PROP_ACPI_POWER 0x0100000000000000
  623. #define DEV_PROP_DOCK 0x0200000000000000
  624. #define DEV_PROP_BUILT_POWER_TABLE 0x0400000000000000
  625. #define DEV_PROP_HAS_PME 0x0800000000000000
  626. #define DEV_PROP_NO_LID_ACTION 0x1000000000000000
  627. #define DEV_PROP_FIXED_ADDRESS 0x2000000000000000
  628. #define DEV_PROP_CALLBACK 0x4000000000000000
  629. #define DEV_PROP_FIXED_CID 0x8000000000000000
  630. //
  631. // This mask should be used to obtain just unique type bytes
  632. //
  633. #define DEV_MASK_TYPE 0x00000000000001FF
  634. #define DEV_MASK_CAP 0xFFFFFFFFFFFF0000
  635. #define DEV_MASK_UID (DEV_PROP_UID | DEV_PROP_FIXED_UID)
  636. #define DEV_MASK_HID (DEV_PROP_HID | DEV_PROP_FIXED_HID)
  637. #define DEV_MASK_ADDRESS (DEV_PROP_ADDRESS | DEV_PROP_FIXED_ADDRESS)
  638. #define DEV_MASK_NOT_PRESENT (DEV_TYPE_NOT_PRESENT | DEV_PROP_FAILED_INIT)
  639. #define DEV_MASK_BUS (DEV_CAP_ISA | DEV_CAP_PCI | DEV_CAP_EIO)
  640. #define DEV_MASK_INTERNAL_DEVICE (DEV_CAP_NO_FILTER | DEV_CAP_NO_STOP | \
  641. DEV_PROP_EXCLUSIVE)
  642. #define DEV_MASK_THERMAL (DEV_CAP_NO_FILTER | DEV_PROP_EXCLUSIVE)
  643. #define DEV_MASK_INTERNAL_BUS (DEV_CAP_RAW | DEV_CAP_NO_FILTER)
  644. #define DEV_MASK_PCI (DEV_CAP_PCI | DEV_CAP_PCI_DEVICE)
  645. #define DEV_MASK_PRESERVE (DEV_CAP_PCI_BAR_TARGET)
  646. //
  647. // DEVICE_EXTENSION.DebugFlags
  648. //
  649. #define DEVDBG_EJECTOR_FOUND 0x00000001
  650. //
  651. // This is the acpi device extension signature
  652. //
  653. #define ACPI_SIGNATURE 0x5f534750
  654. //
  655. // These are the pooltag signatures
  656. //
  657. #define ACPI_ARBITER_POOLTAG 'ApcA'
  658. #define ACPI_BUFFER_POOLTAG 'BpcA'
  659. #define ACPI_DEVICE_POOLTAG 'DpcA'
  660. #define ACPI_INTERFACE_POOLTAG 'FpcA'
  661. #define ACPI_IRP_POOLTAG 'IpcA'
  662. #define ACPI_MISC_POOLTAG 'MpcA'
  663. #define ACPI_POWER_POOLTAG 'PpcA'
  664. #define ACPI_OBJECT_POOLTAG 'OpcA'
  665. #define ACPI_RESOURCE_POOLTAG 'RpcA'
  666. #define ACPI_STRING_POOLTAG 'SpcA'
  667. #define ACPI_THERMAL_POOLTAG 'TpcA'
  668. #define ACPI_TRANSLATE_POOLTAG 'XpcA'
  669. //
  670. // ACPI Override Attributes
  671. //
  672. #define ACPI_OVERRIDE_NVS_CHECK 0x00000001
  673. #define ACPI_OVERRIDE_STA_CHECK 0x00000002
  674. #define ACPI_OVERRIDE_MP_SLEEP 0x00000004
  675. #define ACPI_OVERRIDE_OPTIONAL_WAKE 0x00000008
  676. #define ACPI_OVERRIDE_DISABLE_S1 0x00000010
  677. #define ACPI_OVERRIDE_DISABLE_S2 0x00000020
  678. #define ACPI_OVERRIDE_DISABLE_S3 0x00000040
  679. #define ACPI_OVERRIDE_DELL_MAXULONG_BUGCHECK 0x00000080
  680. #endif