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.

180 lines
5.2 KiB

  1. /*++
  2. Copyright (c) 1998-2001 Microsoft Corporation
  3. Module Name:
  4. ntkd1394.h
  5. Abstract:
  6. Header file for 1394 Debugging
  7. Author:
  8. George Chrysanthakopoulos (georgioc) 31-October-1999
  9. Revision History:
  10. Date Who What
  11. ---------- --------- ------------------------------------------------------------
  12. 06/19/2001 pbinder cleanup
  13. --*/
  14. // {66f250d6-7801-4a64-b139-eea80a450b24}
  15. DEFINE_GUID(GUID_1394DBG, 0x66f250d6, 0x7801, 0x4a64, 0xb1, 0x39, 0xee, 0xa8, 0x0a, 0x45, 0x0b, 0x24);
  16. #define DEBUG_1394_MAJOR_VERSION 0x1
  17. #define DEBUG_1394_MINOR_VERSION 0x0
  18. #define DEBUG_1394_CONFIG_TAG 0xBABABABA
  19. #define INSTANCE_DEVICE_SYMLINK_NAME L"\\DosDevices\\DBG1394_INSTANCE"
  20. #define INSTANCE_DEVICE_NAME L"\\Device\\Dbg1394_Instance"
  21. #define DEBUG_BUS1394_MAX_PACKET_SIZE 4000
  22. typedef struct _DEBUG_1394_SEND_PACKET {
  23. ULONG TransferStatus;
  24. ULONG PacketHeader[4];
  25. ULONG Length;
  26. UCHAR Packet[DEBUG_BUS1394_MAX_PACKET_SIZE];
  27. } DEBUG_1394_SEND_PACKET, *PDEBUG_1394_SEND_PACKET;
  28. typedef struct _DEBUG_1394_RECEIVE_PACKET {
  29. ULONG TransferStatus;
  30. ULONG Length;
  31. UCHAR Packet[DEBUG_BUS1394_MAX_PACKET_SIZE];
  32. } DEBUG_1394_RECEIVE_PACKET, *PDEBUG_1394_RECEIVE_PACKET;
  33. // exists on target. client uses to match for id.
  34. typedef struct _DEBUG_1394_CONFIG {
  35. ULONG Tag;
  36. USHORT MajorVersion;
  37. USHORT MinorVersion;
  38. ULONG Id;
  39. ULONG BusPresent;
  40. PHYSICAL_ADDRESS SendPacket;
  41. PHYSICAL_ADDRESS ReceivePacket;
  42. } DEBUG_1394_CONFIG, *PDEBUG_1394_CONFIG;
  43. //
  44. // Various definitions
  45. //
  46. #define IOCTL_V1394DBG_API_REQUEST CTL_CODE( FILE_DEVICE_UNKNOWN, \
  47. 0x200, \
  48. METHOD_BUFFERED, \
  49. FILE_ANY_ACCESS)
  50. //
  51. // Debug 1394 Request Packets
  52. //
  53. typedef struct _VDBG1394_API_CONFIGURATION {
  54. ULONG OperationMode;
  55. ULONG fulFlags;
  56. ULARGE_INTEGER HostControllerInstanceId;
  57. ULONG PhySpeed;
  58. } VDBG1394_API_CONFIGURATION, *PVDBG1394_API_CONFIGURATION;
  59. typedef struct _VDBG1394_API_IO_PARAMETERS {
  60. ULONG fulFlags;
  61. PHYSICAL_ADDRESS StartingMemoryOffset;
  62. } VDBG1394_API_IO_PARAMETERS, *PVDBG1394_IO_PARAMETERS;
  63. #ifndef _1394_H_
  64. //
  65. // 1394 Node Address format
  66. //
  67. typedef struct _NODE_ADDRESS {
  68. USHORT NA_Node_Number:6; // Bits 10-15
  69. USHORT NA_Bus_Number:10; // Bits 0-9
  70. } NODE_ADDRESS, *PNODE_ADDRESS;
  71. //
  72. // 1394 Address Offset format (48 bit addressing)
  73. //
  74. typedef struct _ADDRESS_OFFSET {
  75. USHORT Off_High;
  76. ULONG Off_Low;
  77. } ADDRESS_OFFSET, *PADDRESS_OFFSET;
  78. //
  79. // 1394 I/O Address format
  80. //
  81. typedef struct _IO_ADDRESS {
  82. NODE_ADDRESS IA_Destination_ID;
  83. ADDRESS_OFFSET IA_Destination_Offset;
  84. } IO_ADDRESS, *PIO_ADDRESS;
  85. #endif
  86. typedef struct _V1394DBG_API_ASYNC_READ {
  87. IO_ADDRESS DestinationAddress;
  88. ULONG DataLength;
  89. UCHAR Data[1];
  90. } VDBG1394_API_ASYNC_READ, *PVDBG1394_API_ASYNC_READ;
  91. typedef struct _V1394DBG_API_REQUEST {
  92. //
  93. // Holds the zero based Function number that corresponds to the request
  94. // that device drivers are asking the sbp2 port driver to carry out.
  95. //
  96. ULONG RequestNumber;
  97. //
  98. // Holds Flags that may be unique to this particular operation
  99. //
  100. ULONG Flags;
  101. //
  102. // Holds the structures used in performing the various 1394 APIs
  103. //
  104. union {
  105. VDBG1394_API_CONFIGURATION SetConfiguration;
  106. VDBG1394_API_CONFIGURATION GetConfiguration;
  107. VDBG1394_API_IO_PARAMETERS SetIoParameters;
  108. VDBG1394_API_IO_PARAMETERS GetIoParameters;
  109. VDBG1394_API_ASYNC_READ AsyncRead;
  110. } u;
  111. } V1394DBG_API_REQUEST, *PV1394DBG_API_REQUEST;
  112. //
  113. // Request Number
  114. //
  115. #define V1394DBG_API_SET_CONFIGURATION 0x00000001
  116. #define V1394DBG_API_GET_CONFIGURATION 0x00000002
  117. #define V1394DBG_API_SET_IO_PARAMETERS 0x00000003
  118. #define V1394DBG_API_GET_IO_PARAMETERS 0x00000004
  119. #define V1394DBG_API_SET_DEBUG_MODE 0x00000005
  120. #define V1394DBG_API_ASYNC_READ 0x00000006
  121. #define V1394DBG_API_CONFIGURATION_MODE_DEBUG 0x00000000
  122. #define V1394DBG_API_CONFIGURATION_MODE_RAW_MEMORY_ACCESS 0x00000001
  123. #define V1394DBG_API_FLAG_WRITE_IO 0x00000001
  124. #define V1394DBG_API_FLAG_READ_IO 0x00000002
  125. // 3 different debug modes flags
  126. #define V1394DBG_API_MODE_KD_CLIENT 0x00000001
  127. #define V1394DBG_API_MODE_USER_CLIENT 0x00000002
  128. #define V1394DBG_API_MODE_USER_SERVER 0x00000003