dptsig.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. /* BSDI dptsig.h,v 1.7 1998/06/03 19:15:00 karels Exp */
  2. /*
  3. * Copyright (c) 1996-1999 Distributed Processing Technology Corporation
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source form, with or without modification, are
  7. * permitted provided that redistributions of source code must retain the
  8. * above copyright notice, this list of conditions and the following disclaimer.
  9. *
  10. * This software is provided `as is' by Distributed Processing Technology and
  11. * any express or implied warranties, including, but not limited to, the
  12. * implied warranties of merchantability and fitness for a particular purpose,
  13. * are disclaimed. In no event shall Distributed Processing Technology be
  14. * liable for any direct, indirect, incidental, special, exemplary or
  15. * consequential damages (including, but not limited to, procurement of
  16. * substitute goods or services; loss of use, data, or profits; or business
  17. * interruptions) however caused and on any theory of liability, whether in
  18. * contract, strict liability, or tort (including negligence or otherwise)
  19. * arising in any way out of the use of this driver software, even if advised
  20. * of the possibility of such damage.
  21. *
  22. */
  23. #ifndef __DPTSIG_H_
  24. #define __DPTSIG_H_
  25. #ifdef _SINIX_ADDON
  26. #include "dpt.h"
  27. #endif
  28. /* DPT SIGNATURE SPEC AND HEADER FILE */
  29. /* Signature Version 1 (sorry no 'A') */
  30. /* to make sure we are talking the same size under all OS's */
  31. typedef unsigned char sigBYTE;
  32. typedef unsigned short sigWORD;
  33. typedef unsigned int sigINT;
  34. /*
  35. * use sigWORDLittleEndian for:
  36. * dsCapabilities
  37. * dsDeviceSupp
  38. * dsAdapterSupp
  39. * dsApplication
  40. * use sigLONGLittleEndian for:
  41. * dsOS
  42. * so that the sig can be standardised to Little Endian
  43. */
  44. #if (defined(_DPT_BIG_ENDIAN))
  45. # define sigWORDLittleEndian(x) ((((x)&0xFF)<<8)|(((x)>>8)&0xFF))
  46. # define sigLONGLittleEndian(x) \
  47. ((((x)&0xFF)<<24) | \
  48. (((x)&0xFF00)<<8) | \
  49. (((x)&0xFF0000L)>>8) | \
  50. (((x)&0xFF000000L)>>24))
  51. #else
  52. # define sigWORDLittleEndian(x) (x)
  53. # define sigLONGLittleEndian(x) (x)
  54. #endif
  55. /* must make sure the structure is not word or double-word aligned */
  56. /* --------------------------------------------------------------- */
  57. /* Borland will ignore the following pragma: */
  58. /* Word alignment is OFF by default. If in the, IDE make */
  59. /* sure that Options | Compiler | Code Generation | Word Alignment */
  60. /* is not checked. If using BCC, do not use the -a option. */
  61. #ifndef NO_PACK
  62. #if defined (_DPT_AIX)
  63. #pragma options align=packed
  64. #else
  65. #pragma pack(1)
  66. #endif /* aix */
  67. #endif
  68. /* For the Macintosh */
  69. #ifdef STRUCTALIGNMENTSUPPORTED
  70. #pragma options align=mac68k
  71. #endif
  72. /* Current Signature Version - sigBYTE dsSigVersion; */
  73. /* ------------------------------------------------------------------ */
  74. #define SIG_VERSION 1
  75. /* Processor Family - sigBYTE dsProcessorFamily; DISTINCT VALUES */
  76. /* ------------------------------------------------------------------ */
  77. /* What type of processor the file is meant to run on. */
  78. /* This will let us know whether to read sigWORDs as high/low or low/high. */
  79. #define PROC_INTEL 0x00 /* Intel 80x86/ia64 */
  80. #define PROC_MOTOROLA 0x01 /* Motorola 68K */
  81. #define PROC_MIPS4000 0x02 /* MIPS RISC 4000 */
  82. #define PROC_ALPHA 0x03 /* DEC Alpha */
  83. #define PROC_POWERPC 0x04 /* IBM Power PC */
  84. #define PROC_i960 0x05 /* Intel i960 */
  85. #define PROC_ULTRASPARC 0x06 /* SPARC processor */
  86. /* Specific Minimim Processor - sigBYTE dsProcessor; FLAG BITS */
  87. /* ------------------------------------------------------------------ */
  88. /* Different bit definitions dependent on processor_family */
  89. /* PROC_INTEL: */
  90. #define PROC_8086 0x01 /* Intel 8086 */
  91. #define PROC_286 0x02 /* Intel 80286 */
  92. #define PROC_386 0x04 /* Intel 80386 */
  93. #define PROC_486 0x08 /* Intel 80486 */
  94. #define PROC_PENTIUM 0x10 /* Intel 586 aka P5 aka Pentium */
  95. #define PROC_SEXIUM 0x20 /* Intel 686 aka P6 aka Pentium Pro or MMX */
  96. #define PROC_IA64 0x40 /* Intel IA64 processor */
  97. /* PROC_i960: */
  98. #define PROC_960RX 0x01 /* Intel 80960RC/RD */
  99. #define PROC_960HX 0x02 /* Intel 80960HA/HD/HT */
  100. /* PROC_MOTOROLA: */
  101. #define PROC_68000 0x01 /* Motorola 68000 */
  102. #define PROC_68010 0x02 /* Motorola 68010 */
  103. #define PROC_68020 0x04 /* Motorola 68020 */
  104. #define PROC_68030 0x08 /* Motorola 68030 */
  105. #define PROC_68040 0x10 /* Motorola 68040 */
  106. /* PROC_POWERPC */
  107. #define PROC_PPC601 0x01 /* PowerPC 601 */
  108. #define PROC_PPC603 0x02 /* PowerPC 603 */
  109. #define PROC_PPC604 0x04 /* PowerPC 604 */
  110. /* PROC_MIPS4000: */
  111. #define PROC_R4000 0x01 /* MIPS R4000 */
  112. /* Filetype - sigBYTE dsFiletype; DISTINCT VALUES */
  113. /* ------------------------------------------------------------------ */
  114. #define FT_EXECUTABLE 0 /* Executable Program */
  115. #define FT_SCRIPT 1 /* Script/Batch File??? */
  116. #define FT_HBADRVR 2 /* HBA Driver */
  117. #define FT_OTHERDRVR 3 /* Other Driver */
  118. #define FT_IFS 4 /* Installable Filesystem Driver */
  119. #define FT_ENGINE 5 /* DPT Engine */
  120. #define FT_COMPDRVR 6 /* Compressed Driver Disk */
  121. #define FT_LANGUAGE 7 /* Foreign Language file */
  122. #define FT_FIRMWARE 8 /* Downloadable or actual Firmware */
  123. #define FT_COMMMODL 9 /* Communications Module */
  124. #define FT_INT13 10 /* INT 13 style HBA Driver */
  125. #define FT_HELPFILE 11 /* Help file */
  126. #define FT_LOGGER 12 /* Event Logger */
  127. #define FT_INSTALL 13 /* An Install Program */
  128. #define FT_LIBRARY 14 /* Storage Manager Real-Mode Calls */
  129. #define FT_RESOURCE 15 /* Storage Manager Resource File */
  130. #define FT_MODEM_DB 16 /* Storage Manager Modem Database */
  131. /* Filetype flags - sigBYTE dsFiletypeFlags; FLAG BITS */
  132. /* ------------------------------------------------------------------ */
  133. #define FTF_DLL 0x01 /* Dynamic Link Library */
  134. #define FTF_NLM 0x02 /* Netware Loadable Module */
  135. #define FTF_OVERLAYS 0x04 /* Uses overlays */
  136. #define FTF_DEBUG 0x08 /* Debug version */
  137. #define FTF_TSR 0x10 /* TSR */
  138. #define FTF_SYS 0x20 /* DOS Loadable driver */
  139. #define FTF_PROTECTED 0x40 /* Runs in protected mode */
  140. #define FTF_APP_SPEC 0x80 /* Application Specific */
  141. #define FTF_ROM (FTF_SYS|FTF_TSR) /* Special Case */
  142. /* OEM - sigBYTE dsOEM; DISTINCT VALUES */
  143. /* ------------------------------------------------------------------ */
  144. #define OEM_DPT 0 /* DPT */
  145. #define OEM_ATT 1 /* ATT */
  146. #define OEM_NEC 2 /* NEC */
  147. #define OEM_ALPHA 3 /* Alphatronix */
  148. #define OEM_AST 4 /* AST */
  149. #define OEM_OLIVETTI 5 /* Olivetti */
  150. #define OEM_SNI 6 /* Siemens/Nixdorf */
  151. #define OEM_SUN 7 /* SUN Microsystems */
  152. /* Operating System - sigLONG dsOS; FLAG BITS */
  153. /* ------------------------------------------------------------------ */
  154. #define OS_DOS 0x00000001 /* PC/MS-DOS */
  155. #define OS_WINDOWS 0x00000002 /* Microsoft Windows 3.x */
  156. #define OS_WINDOWS_NT 0x00000004 /* Microsoft Windows NT */
  157. #define OS_OS2M 0x00000008 /* OS/2 1.2.x,MS 1.3.0,IBM 1.3.x - Monolithic */
  158. #define OS_OS2L 0x00000010 /* Microsoft OS/2 1.301 - LADDR */
  159. #define OS_OS22x 0x00000020 /* IBM OS/2 2.x */
  160. #define OS_NW286 0x00000040 /* Novell NetWare 286 */
  161. #define OS_NW386 0x00000080 /* Novell NetWare 386 */
  162. #define OS_GEN_UNIX 0x00000100 /* Generic Unix */
  163. #define OS_SCO_UNIX 0x00000200 /* SCO Unix */
  164. #define OS_ATT_UNIX 0x00000400 /* ATT Unix */
  165. #define OS_UNIXWARE 0x00000800 /* USL Unix */
  166. #define OS_INT_UNIX 0x00001000 /* Interactive Unix */
  167. #define OS_SOLARIS 0x00002000 /* SunSoft Solaris */
  168. #define OS_QNX 0x00004000 /* QNX for Tom Moch */
  169. #define OS_NEXTSTEP 0x00008000 /* NeXTSTEP/OPENSTEP/MACH */
  170. #define OS_BANYAN 0x00010000 /* Banyan Vines */
  171. #define OS_OLIVETTI_UNIX 0x00020000/* Olivetti Unix */
  172. #define OS_MAC_OS 0x00040000 /* Mac OS */
  173. #define OS_WINDOWS_95 0x00080000 /* Microsoft Windows '95 */
  174. #define OS_NW4x 0x00100000 /* Novell Netware 4.x */
  175. #define OS_BSDI_UNIX 0x00200000 /* BSDi Unix BSD/OS 2.0 and up */
  176. #define OS_AIX_UNIX 0x00400000 /* AIX Unix */
  177. #define OS_FREE_BSD 0x00800000 /* FreeBSD Unix */
  178. #define OS_LINUX 0x01000000 /* Linux */
  179. #define OS_DGUX_UNIX 0x02000000 /* Data General Unix */
  180. #define OS_SINIX_N 0x04000000 /* SNI SINIX-N */
  181. #define OS_PLAN9 0x08000000 /* ATT Plan 9 */
  182. #define OS_TSX 0x10000000 /* SNH TSX-32 */
  183. #define OS_OTHER 0x80000000 /* Other */
  184. /* Capabilities - sigWORD dsCapabilities; FLAG BITS */
  185. /* ------------------------------------------------------------------ */
  186. #define CAP_RAID0 0x0001 /* RAID-0 */
  187. #define CAP_RAID1 0x0002 /* RAID-1 */
  188. #define CAP_RAID3 0x0004 /* RAID-3 */
  189. #define CAP_RAID5 0x0008 /* RAID-5 */
  190. #define CAP_SPAN 0x0010 /* Spanning */
  191. #define CAP_PASS 0x0020 /* Provides passthrough */
  192. #define CAP_OVERLAP 0x0040 /* Passthrough supports overlapped commands */
  193. #define CAP_ASPI 0x0080 /* Supports ASPI Command Requests */
  194. #define CAP_ABOVE16MB 0x0100 /* ISA Driver supports greater than 16MB */
  195. #define CAP_EXTEND 0x8000 /* Extended info appears after description */
  196. #ifdef SNI_MIPS
  197. #define CAP_CACHEMODE 0x1000 /* dpt_force_cache is set in driver */
  198. #endif
  199. /* Devices Supported - sigWORD dsDeviceSupp; FLAG BITS */
  200. /* ------------------------------------------------------------------ */
  201. #define DEV_DASD 0x0001 /* DASD (hard drives) */
  202. #define DEV_TAPE 0x0002 /* Tape drives */
  203. #define DEV_PRINTER 0x0004 /* Printers */
  204. #define DEV_PROC 0x0008 /* Processors */
  205. #define DEV_WORM 0x0010 /* WORM drives */
  206. #define DEV_CDROM 0x0020 /* CD-ROM drives */
  207. #define DEV_SCANNER 0x0040 /* Scanners */
  208. #define DEV_OPTICAL 0x0080 /* Optical Drives */
  209. #define DEV_JUKEBOX 0x0100 /* Jukebox */
  210. #define DEV_COMM 0x0200 /* Communications Devices */
  211. #define DEV_OTHER 0x0400 /* Other Devices */
  212. #define DEV_ALL 0xFFFF /* All SCSI Devices */
  213. /* Adapters Families Supported - sigWORD dsAdapterSupp; FLAG BITS */
  214. /* ------------------------------------------------------------------ */
  215. #define ADF_2001 0x0001 /* PM2001 */
  216. #define ADF_2012A 0x0002 /* PM2012A */
  217. #define ADF_PLUS_ISA 0x0004 /* PM2011,PM2021 */
  218. #define ADF_PLUS_EISA 0x0008 /* PM2012B,PM2022 */
  219. #define ADF_SC3_ISA 0x0010 /* PM2021 */
  220. #define ADF_SC3_EISA 0x0020 /* PM2022,PM2122, etc */
  221. #define ADF_SC3_PCI 0x0040 /* SmartCache III PCI */
  222. #define ADF_SC4_ISA 0x0080 /* SmartCache IV ISA */
  223. #define ADF_SC4_EISA 0x0100 /* SmartCache IV EISA */
  224. #define ADF_SC4_PCI 0x0200 /* SmartCache IV PCI */
  225. #define ADF_SC5_PCI 0x0400 /* Fifth Generation I2O products */
  226. /*
  227. * Combinations of products
  228. */
  229. #define ADF_ALL_2000 (ADF_2001|ADF_2012A)
  230. #define ADF_ALL_PLUS (ADF_PLUS_ISA|ADF_PLUS_EISA)
  231. #define ADF_ALL_SC3 (ADF_SC3_ISA|ADF_SC3_EISA|ADF_SC3_PCI)
  232. #define ADF_ALL_SC4 (ADF_SC4_ISA|ADF_SC4_EISA|ADF_SC4_PCI)
  233. #define ADF_ALL_SC5 (ADF_SC5_PCI)
  234. /* All EATA Cacheing Products */
  235. #define ADF_ALL_CACHE (ADF_ALL_PLUS|ADF_ALL_SC3|ADF_ALL_SC4)
  236. /* All EATA Bus Mastering Products */
  237. #define ADF_ALL_MASTER (ADF_2012A|ADF_ALL_CACHE)
  238. /* All EATA Adapter Products */
  239. #define ADF_ALL_EATA (ADF_2001|ADF_ALL_MASTER)
  240. #define ADF_ALL ADF_ALL_EATA
  241. /* Application - sigWORD dsApplication; FLAG BITS */
  242. /* ------------------------------------------------------------------ */
  243. #define APP_DPTMGR 0x0001 /* DPT Storage Manager */
  244. #define APP_ENGINE 0x0002 /* DPT Engine */
  245. #define APP_SYTOS 0x0004 /* Sytron Sytos Plus */
  246. #define APP_CHEYENNE 0x0008 /* Cheyenne ARCServe + ARCSolo */
  247. #define APP_MSCDEX 0x0010 /* Microsoft CD-ROM extensions */
  248. #define APP_NOVABACK 0x0020 /* NovaStor Novaback */
  249. #define APP_AIM 0x0040 /* Archive Information Manager */
  250. /* Requirements - sigBYTE dsRequirements; FLAG BITS */
  251. /* ------------------------------------------------------------------ */
  252. #define REQ_SMARTROM 0x01 /* Requires SmartROM to be present */
  253. #define REQ_DPTDDL 0x02 /* Requires DPTDDL.SYS to be loaded */
  254. #define REQ_HBA_DRIVER 0x04 /* Requires an HBA driver to be loaded */
  255. #define REQ_ASPI_TRAN 0x08 /* Requires an ASPI Transport Modules */
  256. #define REQ_ENGINE 0x10 /* Requires a DPT Engine to be loaded */
  257. #define REQ_COMM_ENG 0x20 /* Requires a DPT Communications Engine */
  258. /*
  259. * You may adjust dsDescription_size with an override to a value less than
  260. * 50 so that the structure allocates less real space.
  261. */
  262. #if (!defined(dsDescription_size))
  263. # define dsDescription_size 50
  264. #endif
  265. typedef struct dpt_sig {
  266. char dsSignature[6]; /* ALWAYS "dPtSiG" */
  267. sigBYTE dsSigVersion; /* signature version (currently 1) */
  268. sigBYTE dsProcessorFamily; /* what type of processor */
  269. sigBYTE dsProcessor; /* precise processor */
  270. sigBYTE dsFiletype; /* type of file */
  271. sigBYTE dsFiletypeFlags; /* flags to specify load type, etc. */
  272. sigBYTE dsOEM; /* OEM file was created for */
  273. sigINT dsOS; /* which Operating systems */
  274. sigWORD dsCapabilities; /* RAID levels, etc. */
  275. sigWORD dsDeviceSupp; /* Types of SCSI devices supported */
  276. sigWORD dsAdapterSupp; /* DPT adapter families supported */
  277. sigWORD dsApplication; /* applications file is for */
  278. sigBYTE dsRequirements; /* Other driver dependencies */
  279. sigBYTE dsVersion; /* 1 */
  280. sigBYTE dsRevision; /* 'J' */
  281. sigBYTE dsSubRevision; /* '9' ' ' if N/A */
  282. sigBYTE dsMonth; /* creation month */
  283. sigBYTE dsDay; /* creation day */
  284. sigBYTE dsYear; /* creation year since 1980 (1993=13) */
  285. /* description (NULL terminated) */
  286. char dsDescription[dsDescription_size];
  287. } dpt_sig_S;
  288. /* 32 bytes minimum - with no description. Put NULL at description[0] */
  289. /* 81 bytes maximum - with 49 character description plus NULL. */
  290. /* This line added at Roycroft's request */
  291. /* Microsoft's NT compiler gets confused if you do a pack and don't */
  292. /* restore it. */
  293. #ifndef NO_UNPACK
  294. #if defined (_DPT_AIX)
  295. #pragma options align=reset
  296. #elif defined (UNPACK_FOUR)
  297. #pragma pack(4)
  298. #else
  299. #pragma pack()
  300. #endif /* aix */
  301. #endif
  302. /* For the Macintosh */
  303. #ifdef STRUCTALIGNMENTSUPPORTED
  304. #pragma options align=reset
  305. #endif
  306. #endif