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.

136 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 2000-2001 Microsoft Corporation
  3. Module Name:
  4. acpisim.h
  5. Abstract:
  6. ACPI BIOS Simulator / Generic 3rd Party Operation Region Provider
  7. Author(s):
  8. Vincent Geglia
  9. Michael T. Murphy
  10. Chris Burgess
  11. Environment:
  12. Kernel mode
  13. Notes:
  14. Revision History:
  15. --*/
  16. #if !defined(_ACPISIM_H_)
  17. #define _ACPISIM_H_
  18. //
  19. // includes
  20. //
  21. #include "asimlib.h"
  22. //
  23. // State definitions for PNP
  24. //
  25. typedef enum {
  26. PNP_STATE_INITIALIZING = 0,
  27. PNP_STATE_STARTED,
  28. PNP_STATE_STOPPED,
  29. PNP_STATE_REMOVED,
  30. PNP_STATE_SURPRISE_REMOVAL,
  31. PNP_STATE_STOP_PENDING,
  32. PNP_STATE_REMOVE_PENDING
  33. } PNP_STATE;
  34. //
  35. // State definitions for Power
  36. //
  37. typedef enum {
  38. POWER_STATE_WORKING = 0,
  39. POWER_STATE_POWER_PENDING,
  40. POWER_STATE_POWERED_DOWN
  41. } PWR_STATE;
  42. //
  43. // Device extension flag types
  44. //
  45. typedef enum {
  46. DE_FLAG_INTERFACE_REGISTERED = 1,
  47. DE_FLAG_INTERFACE_ENABLED = 2,
  48. DE_FLAG_OPREGION_REGISTERED = 4
  49. } DEV_EXT_FLAGS;
  50. //
  51. // Global driver object extension definition
  52. //
  53. typedef struct _DRIVER_OBJECT_EXTENSION {
  54. UNICODE_STRING RegistryPath;
  55. PDRIVER_OBJECT DriverObject;
  56. } DRIVER_OBJECT_EXTENSION, *PDRIVER_OBJECT_EXTENSION;
  57. //
  58. // Device extension definition
  59. //
  60. typedef struct _DEVICE_EXTENSION {
  61. ULONG Signature;
  62. PNP_STATE PnpState;
  63. PWR_STATE PowerState;
  64. DEVICE_POWER_STATE DevicePowerState;
  65. ULONG OperationsInProgress;
  66. ULONG OutstandingIrpCount;
  67. ULONG HandleCount;
  68. UNICODE_STRING InterfaceString;
  69. KEVENT IrpsCompleted;
  70. PDEVICE_OBJECT NextDevice;
  71. PDEVICE_OBJECT DeviceObject;
  72. PDEVICE_OBJECT Pdo;
  73. DEVICE_POWER_STATE PowerMappings [6];
  74. IO_REMOVE_LOCK RemoveLock;
  75. //
  76. // Project specific fields
  77. //
  78. DEV_EXT_FLAGS Flags;
  79. } DEVICE_EXTENSION, *PDEVICE_EXTENSION;
  80. //
  81. // Irp dispatch routine handler function prototype
  82. //
  83. typedef
  84. NTSTATUS
  85. (*PIRP_DISPATCH_ROUTINE) (
  86. IN PDEVICE_OBJECT DeviceObject,
  87. IN PIRP Irp
  88. );
  89. //
  90. // Irp dispatch table definition
  91. //
  92. typedef struct _IRP_DISPATCH_TABLE {
  93. ULONG IrpFunction;
  94. TCHAR IrpName[50];
  95. PIRP_DISPATCH_ROUTINE IrpHandler;
  96. } IRP_DISPATCH_TABLE, *PIRP_DISPATCH_TABLE;
  97. //
  98. // Public function prototypes
  99. //
  100. #endif // _ACPISIM_H_