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.

128 lines
2.7 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation All Rights Reserved
  3. Module Name:
  4. hpsim.h
  5. Abstract:
  6. This header file contains the structure and function declarations
  7. for the hotplugsim driver that must be accessible outside of hps.sys,
  8. either by the hotplug driver or by the user mode slot simulator
  9. Environment:
  10. Kernel Mode
  11. Revision History:
  12. Davis Walker (dwalker) Sept 8 2000
  13. --*/
  14. #ifndef _HPSIM_H
  15. #define _HPSIM_H
  16. //
  17. // The following two structures are used for communication between
  18. // the controller and slots that originates at the slot.
  19. //
  20. typedef enum _HPS_SLOT_EVENT_TYPE {
  21. IsolatedPowerFault,
  22. AttentionButton,
  23. MRLOpen,
  24. MRLClose
  25. } HPS_SLOT_EVENT_TYPE;
  26. typedef struct _HPS_SLOT_EVENT {
  27. UCHAR SlotNum;
  28. HPS_SLOT_EVENT_TYPE EventType;
  29. } HPS_SLOT_EVENT, *PHPS_SLOT_EVENT;
  30. //
  31. // The following two structures are used for communication between
  32. // the controller and slots that originates at the controller.
  33. //
  34. typedef union _HPS_SLOT_OPERATION_COMMAND {
  35. struct {
  36. UCHAR SlotState:2;
  37. UCHAR PowerIndicator:2;
  38. UCHAR AttentionIndicator:2;
  39. UCHAR CommandCode:2;
  40. } SlotOperation;
  41. UCHAR AsUchar;
  42. } HPS_SLOT_OPERATION_COMMAND;
  43. //
  44. // SlotNums - a bitmask indicating which slots this event applies to
  45. // SERRAsserted - the controller has detected an SERR condition. Instead
  46. // of bugchecking the machine, we just inform usermode
  47. // ControllerReset - A controller reset has been issued.
  48. // Command - The slot operation command to execute.
  49. //
  50. typedef struct _HPS_CONTROLLER_EVENT {
  51. ULONG SlotNums;
  52. UCHAR SERRAsserted;
  53. HPS_SLOT_OPERATION_COMMAND Command;
  54. } HPS_CONTROLLER_EVENT, *PHPS_CONTROLLER_EVENT;
  55. //
  56. // User-mode initialization interface
  57. //
  58. typedef struct _HPS_HWINIT_DESCRIPTOR {
  59. ULONG BarSelect;
  60. ULONG NumSlots33Conv:5;
  61. ULONG NumSlots66PciX:5;
  62. ULONG NumSlots100PciX:5;
  63. ULONG NumSlots133PciX:5;
  64. ULONG NumSlots66Conv:5;
  65. ULONG NumSlots:5;
  66. ULONG:2;
  67. UCHAR FirstDeviceID:5;
  68. UCHAR UpDown:1;
  69. UCHAR AttentionButtonImplemented:1;
  70. UCHAR MRLSensorsImplemented:1;
  71. UCHAR FirstSlotLabelNumber;
  72. UCHAR ProgIF;
  73. } HPS_HWINIT_DESCRIPTOR, *PHPS_HWINIT_DESCRIPTOR;
  74. #define HPS_HWINIT_CAPABILITY_ID 0xD
  75. typedef struct _HPTEST_BRIDGE_INFO {
  76. UCHAR PrimaryBus;
  77. UCHAR DeviceSelect;
  78. UCHAR FunctionNumber;
  79. UCHAR SecondaryBus;
  80. } HPTEST_BRIDGE_INFO, *PHPTEST_BRIDGE_INFO;
  81. typedef struct _HPTEST_BRIDGE_DESCRIPTOR {
  82. HANDLE Handle;
  83. HPTEST_BRIDGE_INFO BridgeInfo;
  84. } HPTEST_BRIDGE_DESCRIPTOR, *PHPTEST_BRIDGE_DESCRIPTOR;
  85. #endif