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.

226 lines
8.0 KiB

  1. ;** DevSym.inc - Device Symbols
  2. ;
  3. ; Revision History:
  4. ;
  5. ; M018 - defined bit 11 of DOS34_FLAG. See M041 in dos.tag for
  6. ; explanation.
  7. ;
  8. ; THE DEVICE TABLE LIST HAS THE FORM:
  9. SYSDEV STRUC
  10. SDEVNEXT DD ? ;POINTER TO NEXT DEVICE HEADER
  11. SDEVATT DW ? ;ATTRIBUTES OF THE DEVICE
  12. SDEVSTRAT DW ? ;STRATEGY ENTRY POINT
  13. SDEVINT DW ? ;INTERRUPT ENTRY POINT
  14. SDEVNAME DB ' ' ;NAME OF DEVICE (ONLY FIRST BYTE USED FOR BLOCK)
  15. SYSDEV ENDS
  16. ;
  17. ; ATTRIBUTE BIT MASKS
  18. ;
  19. ; CHARACTER DEVICES:
  20. ;
  21. ; BIT 15 -> MUST BE 1
  22. ; 14 -> 1 IF THE DEVICE UNDERSTANDS IOCTL CONTROL STRINGS
  23. ; 13 -> 1 IF THE DEVICE SUPPORTS OUTPUT-UNTIL-BUSY
  24. ; 12 -> UNUSED
  25. ; 11 -> 1 IF THE DEVICE UNDERSTANDS OPEN/CLOSE
  26. ; 10 -> MUST BE 0
  27. ; 9 -> MUST BE 0
  28. ; 8 -> UNUSED - Must be 0 to support current versions of Mace Utilities
  29. ; 7 -> SUPPORTS DEVICE QUERY
  30. ; 6 -> UNUSED
  31. ; 5 -> UNUSED
  32. ; 4 -> 1 IF DEVICE IS RECIPIENT OF INT 29H
  33. ; 3 -> 1 IF DEVICE IS CLOCK DEVICE
  34. ; 2 -> 1 IF DEVICE IS NULL DEVICE
  35. ; 1 -> 1 IF DEVICE IS CONSOLE OUTPUT
  36. ; 0 -> 1 IF DEVICE IS CONSOLE INPUT
  37. ;
  38. ; BLOCK DEVICES:
  39. ;
  40. ; BIT 15 -> MUST BE 0
  41. ; 14 -> 1 IF THE DEVICE UNDERSTANDS IOCTL CONTROL STRINGS
  42. ; 13 -> 1 IF THE DEVICE DETERMINES MEDIA BY EXAMINING THE FAT ID BYTE.
  43. ; THIS REQUIRES THE FIRST SECTOR OF THE FAT TO *ALWAYS* RESIDE IN
  44. ; THE SAME PLACE.
  45. ; 12 -> UNUSED
  46. ; 11 -> 1 IF THE DEVICE UNDERSTANDS OPEN/CLOSE/REMOVABLE MEDIA
  47. ; 10 -> MUST BE 0
  48. ; 9 -> MUST BE 0
  49. ; 8 -> UNUSED - Must be 0 to support current versionso of Mace Utilities
  50. ; 7 -> SUPPORTS DEVICE QUERY
  51. ; 6 -> IF DEVICE HAS SUPPORT FOR GETMAP/SETMAP OF LOGICAL DRIVES.
  52. ; IF THE DEVICE UNDERSTANDS GENERIC IOCTL FUNCTION CALLS.
  53. ; 5 -> UNUSED
  54. ; 4 -> UNUSED
  55. ; 3 -> UNUSED
  56. ; 2 -> UNUSED
  57. ; 1 -> UNUSED
  58. ; 0 -> UNUSED
  59. ;
  60. DEVTYP EQU 8000H ; BIT 15 - 1 IF CHAR, 0 IF BLOCK
  61. CHARDEV EQU 8000H
  62. DEVIOCTL EQU 4000H ; BIT 14 - CONTROL MODE BIT
  63. ISFATBYDEV EQU 2000H ; BIT 13 - DEVICE USES FAT ID BYTES,
  64. ; COMP MEDIA.
  65. OUTTILBUSY EQU 2000H ; OUTPUT UNTIL BUSY IS ENABLED
  66. ISNET EQU 1000H ; BIT 12 - 1 IF A NET DEVICE, 0 IF
  67. ; NOT. CURRENTLY BLOCK ONLY.
  68. DEVOPCL EQU 0800H ; BIT 11 - 1 IF THIS DEVICE HAS
  69. ; OPEN,CLOSE AND REMOVABLE MEDIA
  70. ; ENTRY POINTS, 0 IF NOT
  71. EXTENTBIT EQU 0400H ; BIT 10 - CURRENTLY 0 ON ALL DEVS
  72. ; THIS BIT IS RESERVED FOR FUTURE USE
  73. ; TO EXTEND THE DEVICE HEADER BEYOND
  74. ; ITS CURRENT FORM.
  75. ; NOTE BIT 9 IS CURRENTLY USED ON IBM SYSTEMS TO INDICATE "DRIVE IS SHARED".
  76. ; SEE IOCTL FUNCTION 9. THIS USE IS NOT DOCUMENTED, IT IS USED BY SOME
  77. ; OF THE UTILITIES WHICH ARE SUPPOSED TO FAIL ON SHARED DRIVES ON SERVER
  78. ; MACHINES (FORMAT,CHKDSK,RECOVER,..).
  79. ; M017 IOQUERY EQU 0100H ;Bit 8 - Supports generic IOCtl query
  80. IOQUERY EQU 080H ;Bit 7 - Supports generic IOCtl query M017
  81. DEV320 EQU 0040H ;BIT 6 - FOR BLOCK DEVICES, THIS
  82. ;DEVICE SUPPORTS SET/GET MAP OF
  83. ;LOGICAL DRIVES, AND SUPPORTS
  84. ;GENERIC IOCTL CALLS.
  85. ;FOR CHARACTER DEVICES, THIS
  86. ;DEVICE SUPPORTS GENERIC IOCTL.
  87. ;THIS IS A DOS 3.2 DEVICE DRIVER.
  88. ISSPEC EQU 0010H ;BIT 4 - THIS DEVICE IS SPECIAL
  89. ISCLOCK EQU 0008H ;BIT 3 - THIS DEVICE IS THE CLOCK DEVICE.
  90. ISNULL EQU 0004H ;BIT 2 - THIS DEVICE IS THE NULL DEVICE.
  91. ISCOUT EQU 0002H ;BIT 1 - THIS DEVICE IS THE CONSOLE OUTPUT.
  92. ISCIN EQU 0001H ;BIT 0 - THIS DEVICE IS THE CONSOLE INPUT.
  93. EXTDRVR EQU 0002H ;BIT 1 - BLOCK DEVICE EXTNDED DRIVER
  94. ;STATIC REQUEST HEADER
  95. SRHEAD STRUC
  96. REQLEN DB ? ;LENGTH IN BYTES OF REQUEST BLOCK
  97. REQUNIT DB ? ;DEVICE UNIT NUMBER
  98. REQFUNC DB ? ;TYPE OF REQUEST
  99. REQSTAT DW ? ;STATUS WORD
  100. DB 8 DUP(?) ;RESERVED FOR QUEUE LINKS
  101. SRHEAD ENDS
  102. ;STATUS WORD MASKS
  103. STERR EQU 8000H ;BIT 15 - ERROR
  104. STBUI EQU 0200H ;BIT 9 - BUISY
  105. STDON EQU 0100H ;BIT 8 - DONE
  106. STECODE EQU 00FFH ;ERROR CODE
  107. ; 2/12/KK
  108. ; Interim character identifier 2/12/KK
  109. Ddkey EQU 0000010000000000B ; 2/12/KK
  110. ;FUNCTION CODES
  111. DINITHL EQU 26 ;SIZE OF INIT HEADER
  112. DMEDHL EQU 15 ;SIZE OF MEDIA CHECK HEADER
  113. DBPBHL EQU 22 ;SIZE OF GET BPB HEADER
  114. DRDWRHL EQU 22 ;SIZE OF RD/WR HEADER
  115. DRDNDHL EQU 14 ;SIZE OF NON DESTRUCTIVE READ HEADER
  116. DSTATHL EQU 13 ;SIZE OF STATUS HEADER
  117. DFLSHL EQU 15 ;SIZE OF FLUSH HEADER
  118. DEVINIT EQU 0 ;INITIALIZATION
  119. DEVMDCH EQU 1 ;MEDIA CHECK
  120. DEVBPB EQU 2 ;GET BPB
  121. DEVRDIOCTL EQU 3 ;IOCTL READ
  122. DEVRD EQU 4 ;READ
  123. DEVRDND EQU 5 ;NON DESTRUCTIVE READ NO WAIT (CHARACTER DEVS)
  124. DEVIST EQU 6 ;INPUT STATUS
  125. DEVIFL EQU 7 ;INPUT FLUSH
  126. DEVWRT EQU 8 ;WRITE
  127. DEVWRTV EQU 9 ;WRITE WITH VERIFY
  128. DEVOST EQU 10 ;OUTPUT STATUS
  129. DEVOFL EQU 11 ;OUTPUT FLUSH
  130. DEVWRIOCTL EQU 12 ;IOCTL WRITE
  131. DEVOPN EQU 13 ;DEVICE OPEN
  132. DEVCLS EQU 14 ;DEVICE CLOSE
  133. DOPCLHL EQU 13 ;SIZE OF OPEN/CLOSE HEADER
  134. DEVRMD EQU 15 ;REMOVABLE MEDIA
  135. REMHL EQU 13 ;SIZE OF REMOVABLE MEDIA HEADER
  136. GENIOCTL EQU 19
  137. ; THE NEXT THREE ARE USED IN DOS 4.0
  138. ; 20
  139. ; 21
  140. ; 22
  141. DEVGETOWN EQU 23 ;GET DEVICE OWNER
  142. DEVSETOWN EQU 24 ;SET DEVICE OWNER
  143. IOCTL_QUERY EQU 25 ;Query generic ioctl support
  144. OWNHL EQU 13 ;SIZE OF DEVICE OWNER HEADER
  145. DEVOUT EQU 16 ; OUTPUT UNTIL BUSY.
  146. DEVOUTL EQU DEVWRT ; LENGTH OF OUTPUT UNTIL BUSY
  147. ; ADDED FOR DOS 5.00
  148. ;
  149. ; GENERIC IOCTL REQUEST STRUCTURE
  150. ; SEE THE DOS 4.0 DEVICE DRIVER SPEC FOR FURTHER ELABORATION.
  151. ;
  152. IOCTL_REQ STRUC
  153. DB (SIZE SRHEAD) DUP(?)
  154. ; GENERIC IOCTL ADDITION.
  155. MAJORFUNCTION DB ? ;FUNCTION CODE
  156. MINORFUNCTION DB ? ;FUNCTION CATEGORY
  157. REG_SI DW ?
  158. REG_DI DW ?
  159. GENERICIOCTL_PACKET DD ? ; POINTER TO DATA BUFFER
  160. IOCTL_REQ ENDS
  161. ; DEFINITIONS FOR IOCTL_REQ.MINORFUNCTION
  162. GEN_IOCTL_WRT_TRK EQU 40H
  163. GEN_IOCTL_RD_TRK EQU 60H
  164. GEN_IOCTL_FN_TST EQU 20H ; USED TO DIFF. BET READS AND WRTS
  165. ;; 32-bit absolute read/write input list structure
  166. ABS_32RW STRUC
  167. SECTOR_RBA DD ? ; relative block address
  168. ABS_RW_COUNT DW ? ; number of sectors to be transferred
  169. BUFFER_ADDR DD ? ; data addrress
  170. ABS_32RW ENDS
  171. ;; media ID info
  172. MEDIA_ID_INFO STRUC
  173. MEDIA_level DW 0 ; info level
  174. MEDIA_Serial DD 0 ; serial #
  175. MEDIA_Label DB 11 dup (' ') ;volume label
  176. MEDIA_System DB 8 dup (' ') ;system type
  177. MEDIA_ID_INFO ENDS
  178. ;; equates for DOS34_FLAG
  179. ;
  180. ; BUGBUG: why are bits 0,1,3 and 4 not defined.
  181. ;
  182. FROM_DISK_RESET EQU 000000000100b ;from disk reset
  183. Force_I24_Fail EQU 000000100000b ;form IFS CALL BACK
  184. Disable_EOF_I24 EQU 000001000000b ;disable EOF int24 for input status
  185. DBCS_VOLID EQU 000010000000b ;indicate from volume id
  186. DBCS_VOLID2 EQU 000100000000b ;indicate 8th char is DBCS
  187. CTRL_BREAK_FLAG EQU 001000000000b ;indicate control break is input
  188. SEARCH_FASTOPEN EQU 010000000000b ;set fastopen flag for search
  189. EXEC_AWARE_REDIR EQU 100000000000b ;M018: this bit is set by a redir
  190. ;M018: that knows how to handle
  191. ;M018: open for exec
  192. NO_FROM_DISK_RESET EQU NOT FROM_DISK_RESET ;not from disk reset
  193. NO_Force_I24_Fail EQU NOT Force_I24_Fail ;not form IFS CALL BACK
  194. NO_Disable_EOF_I24 EQU NOT Disable_EOF_I24
  195.