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.

87 lines
2.4 KiB

  1. #ifndef _SOFTPCIDRV_
  2. #define _SOFTPCIDRV_
  3. //
  4. // Registry Path to driver's registry key
  5. //
  6. #define SOFTPCI_CONTROL L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\SoftPCI"
  7. #define SPCI_SIG 0xFFBBFFBB
  8. typedef const GUID * PGUID;
  9. //
  10. // These are the states FDO transition to upon
  11. // receiving a specific PnP Irp.
  12. //
  13. typedef enum _DEVICE_PNP_STATE {
  14. NotStarted = 0, // Not started yet
  15. Started, // Device has received the START_DEVICE IRP
  16. StopPending, // Device has received the QUERY_STOP IRP
  17. Stopped, // Device has received the STOP_DEVICE IRP
  18. RemovePending, // Device has received the QUERY_REMOVE IRP
  19. SurpriseRemovePending, // Device has received the SURPRISE_REMOVE IRP
  20. Deleted // Device has received the REMOVE_DEVICE IRP
  21. } DEVICE_PNP_STATE;
  22. //
  23. // Device Extension definitions.
  24. //
  25. typedef struct _SOFTPCI_DEVICE_EXTENSION *PSOFTPCI_DEVICE_EXTENSION;
  26. typedef struct _SOFTPCI_PCIBUS_INTERFACE{
  27. PCI_READ_WRITE_CONFIG ReadConfig;
  28. PCI_READ_WRITE_CONFIG WriteConfig;
  29. PVOID Context;
  30. } SOFTPCI_PCIBUS_INTERFACE, *PSOFTPCI_PCIBUS_INTERFACE;
  31. typedef struct _SOFTPCI_DEVICE_EXTENSION{
  32. ULONG Signature;
  33. BOOLEAN FilterDevObj;
  34. PDEVICE_OBJECT PDO;
  35. PDEVICE_OBJECT LowerDevObj;
  36. SINGLE_LIST_ENTRY ListEntry;
  37. #if 0 //enable these once we implement support for them
  38. SYSTEM_POWER_STATE SystemPowerState;
  39. DEVICE_POWER_STATE DevicePowerState;
  40. DEVICE_PNP_STATE DevicePnPState;
  41. DEVICE_PNP_STATE PreviousPnPState;
  42. #endif
  43. // PSOFTPCI_DEVICE Root;
  44. // ULONG DeviceCount;
  45. UNICODE_STRING SymbolicLinkName;
  46. BOOLEAN InterfaceRegistered;
  47. PCM_RESOURCE_LIST RawResources;
  48. PCM_RESOURCE_LIST TranslatedResources;
  49. BOOLEAN StopMsiSimulation;
  50. } SOFTPCI_DEVICE_EXTENSION;
  51. typedef struct _SOFTPCI_TREE{
  52. ULONG DeviceCount;
  53. PSOFTPCI_DEVICE RootDevice;
  54. PSOFTPCI_PCIBUS_INTERFACE BusInterface;
  55. SINGLE_LIST_ENTRY RootPciBusDevExtList;
  56. KSPIN_LOCK TreeLock;
  57. } SOFTPCI_TREE, *PSOFTPCI_TREE;
  58. //
  59. // Global pointer to DevExt in our Filter DO
  60. //
  61. //extern PSOFTPCI_DEVICE_EXTENSION SoftPciRootDevExt;
  62. extern SOFTPCI_TREE SoftPciTree;
  63. #endif