Source code of Windows XP (NT5)
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.

188 lines
6.8 KiB

  1. /****************************************************************************
  2. ** COPYRIGHT (C) 1994-1997 INTEL CORPORATION **
  3. ** DEVELOPED FOR MICROSOFT BY INTEL CORP., HILLSBORO, OREGON **
  4. ** HTTP://WWW.INTEL.COM/ **
  5. ** THIS FILE IS PART OF THE INTEL ETHEREXPRESS PRO/100B(TM) AND **
  6. ** ETHEREXPRESS PRO/100+(TM) NDIS 5.0 MINIPORT SAMPLE DRIVER **
  7. ****************************************************************************/
  8. /****************************************************************************
  9. Module Name:
  10. e100_equ.h (equates.h)
  11. This driver runs on the following hardware:
  12. - 82558 based PCI 10/100Mb ethernet adapters
  13. (aka Intel EtherExpress(TM) PRO Adapters)
  14. Environment:
  15. Kernel Mode - Or whatever is the equivalent on WinNT
  16. Revision History
  17. - JCB 8/14/97 Example Driver Created
  18. - Dchen 11-01-99 Modified for the new sample driver
  19. *****************************************************************************/
  20. #ifndef _E100_EQU_H
  21. #define _E100_EQU_H
  22. //-------------------------------------------------------------------------
  23. // OEM Message Tags
  24. //-------------------------------------------------------------------------
  25. #define stringTag 0xFEFA // Length Byte After String
  26. #define lStringTag 0xFEFB // Length Byte Before String
  27. #define zStringTag 0xFEFC // Zero-Terminated String Tag
  28. #define nStringTag 0xFEFD // No Length Byte Or 0-Term
  29. //-------------------------------------------------------------------------
  30. // Adapter Types Supported
  31. //-------------------------------------------------------------------------
  32. #define FLASH32_EISA (0 * 4)
  33. #define FLASH32_PCI (1 * 4)
  34. #define D29C_EISA (2 * 4)
  35. #define D29C_PCI (3 * 4)
  36. #define D100_PCI (4 * 4)
  37. //-------------------------------------------------------------------------
  38. // Phy related constants
  39. //-------------------------------------------------------------------------
  40. #define PHY_503 0
  41. #define PHY_100_A 0x000003E0
  42. #define PHY_100_C 0x035002A8
  43. #define PHY_TX_ID 0x015002A8
  44. #define PHY_NSC_TX 0x5c002000
  45. #define PHY_OTHER 0xFFFF
  46. #define PHY_MODEL_REV_ID_MASK 0xFFF0FFFF
  47. #define PARALLEL_DETECT 0
  48. #define N_WAY 1
  49. #define RENEGOTIATE_TIME 35 // (3.5 Seconds)
  50. #define CONNECTOR_AUTO 0
  51. #define CONNECTOR_TPE 1
  52. #define CONNECTOR_MII 2
  53. //-------------------------------------------------------------------------
  54. // Ethernet Frame Sizes
  55. //-------------------------------------------------------------------------
  56. #define ETHERNET_ADDRESS_LENGTH 6
  57. #define ETHERNET_HEADER_SIZE 14
  58. #define MINIMUM_ETHERNET_PACKET_SIZE 60
  59. #define MAXIMUM_ETHERNET_PACKET_SIZE 1514
  60. #define MAX_MULTICAST_ADDRESSES 32
  61. #define TCB_BUFFER_SIZE 0XE0 // 224
  62. #define COALESCE_BUFFER_SIZE 2048
  63. #define ETH_MAX_COPY_LENGTH 0x80 // 128
  64. // Make receive area 1536 for 16 bit alignment.
  65. //#define RCB_BUFFER_SIZE MAXIMUM_ETHERNET_PACKET_SIZE
  66. #define RCB_BUFFER_SIZE 1520 // 0x5F0
  67. //- Area reserved for all Non Transmit command blocks
  68. #define MAX_NON_TX_CB_AREA 512
  69. //-------------------------------------------------------------------------
  70. // Ndis/Adapter driver constants
  71. //-------------------------------------------------------------------------
  72. #define MAX_PHYS_DESC 16
  73. #define MAX_RECEIVE_DESCRIPTORS 1024 // 0x400
  74. #define NUM_RMD 10
  75. //--------------------------------------------------------------------------
  76. // System wide Equates
  77. //--------------------------------------------------------------------------
  78. #define MAX_NUMBER_OF_EISA_SLOTS 15
  79. #define MAX_NUMBER_OF_PCI_SLOTS 15
  80. //--------------------------------------------------------------------------
  81. // Equates Added for NDIS 4
  82. //--------------------------------------------------------------------------
  83. #define NUM_BYTES_PROTOCOL_RESERVED_SECTION 16
  84. #define MAX_NUM_ALLOCATED_RFDS 64
  85. #define MIN_NUM_RFD 4
  86. #define MAX_ARRAY_SEND_PACKETS 8
  87. // limit our receive routine to indicating this many at a time
  88. #define MAX_ARRAY_RECEIVE_PACKETS 16
  89. #define MAC_RESERVED_SWRFDPTR 0
  90. #define MAX_PACKETS_TO_ADD 32
  91. //-------------------------------------------------------------------------
  92. //- Miscellaneous Equates
  93. //-------------------------------------------------------------------------
  94. #define CR 0x0D // Carriage Return
  95. #define LF 0x0A // Line Feed
  96. #ifndef FALSE
  97. #define FALSE 0
  98. #define TRUE 1
  99. #endif
  100. #define DRIVER_NULL ((ULONG)0xffffffff)
  101. #define DRIVER_ZERO 0
  102. //-------------------------------------------------------------------------
  103. // Bit Mask definitions
  104. //-------------------------------------------------------------------------
  105. #define BIT_0 0x0001
  106. #define BIT_1 0x0002
  107. #define BIT_2 0x0004
  108. #define BIT_3 0x0008
  109. #define BIT_4 0x0010
  110. #define BIT_5 0x0020
  111. #define BIT_6 0x0040
  112. #define BIT_7 0x0080
  113. #define BIT_8 0x0100
  114. #define BIT_9 0x0200
  115. #define BIT_10 0x0400
  116. #define BIT_11 0x0800
  117. #define BIT_12 0x1000
  118. #define BIT_13 0x2000
  119. #define BIT_14 0x4000
  120. #define BIT_15 0x8000
  121. #define BIT_24 0x01000000
  122. #define BIT_28 0x10000000
  123. #define BIT_0_2 0x0007
  124. #define BIT_0_3 0x000F
  125. #define BIT_0_4 0x001F
  126. #define BIT_0_5 0x003F
  127. #define BIT_0_6 0x007F
  128. #define BIT_0_7 0x00FF
  129. #define BIT_0_8 0x01FF
  130. #define BIT_0_13 0x3FFF
  131. #define BIT_0_15 0xFFFF
  132. #define BIT_1_2 0x0006
  133. #define BIT_1_3 0x000E
  134. #define BIT_2_5 0x003C
  135. #define BIT_3_4 0x0018
  136. #define BIT_4_5 0x0030
  137. #define BIT_4_6 0x0070
  138. #define BIT_4_7 0x00F0
  139. #define BIT_5_7 0x00E0
  140. #define BIT_5_9 0x03E0
  141. #define BIT_5_12 0x1FE0
  142. #define BIT_5_15 0xFFE0
  143. #define BIT_6_7 0x00c0
  144. #define BIT_7_11 0x0F80
  145. #define BIT_8_10 0x0700
  146. #define BIT_9_13 0x3E00
  147. #define BIT_12_15 0xF000
  148. #define BIT_16_20 0x001F0000
  149. #define BIT_21_25 0x03E00000
  150. #define BIT_26_27 0x0C000000
  151. // in order to make our custom oids hopefully somewhat unique
  152. // we will use 0xFF (indicating implementation specific OID)
  153. // A0 (first byte of non zero intel unique identifier)
  154. // C9 (second byte of non zero intel unique identifier)
  155. // XX (the custom OID number - providing 255 possible custom oids)
  156. #define OID_CUSTOM_DRIVER_SET 0xFFA0C901
  157. #define OID_CUSTOM_DRIVER_QUERY 0xFFA0C902
  158. #define OID_CUSTOM_ARRAY 0xFFA0C903
  159. #define OID_CUSTOM_STRING 0xFFA0C904
  160. #define CMD_BUS_MASTER BIT_2
  161. #endif // _E100_EQU_H