home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / os2tk20 / c / os2h / dasd / abios.h__ / ABIOS.H
Encoding:
C/C++ Source or Header  |  1992-08-04  |  50.1 KB  |  1,048 lines

  1. /*static char *SCCSID = "@(#)abios.h    6.4 92/05/08";*/
  2.  
  3. /************************************************************************/
  4. /*                                                                      */
  5. /* Driver Name: ADD/DM - Include Files                                  */
  6. /*              ----------------------                                  */
  7. /*                                                                      */
  8. /* Source File Name: ABIOS.H                                            */
  9. /*                                                                      */
  10. /* Descriptive Name: ABIOS Structures/Defines for Disk and Diskette     */
  11. /*                   and SCB Devices                                    */
  12. /*                                                                      */
  13. /* Function:                                                            */
  14. /*                                                                      */
  15. /*                                                                      */
  16. /*----------------------------------------------------------------------*/
  17. /*                                                                      */
  18. /* Copyright (C) 1992 IBM Corporation                                   */
  19. /*                                                                      */
  20. /* DISCLAIMER OF WARRANTIES.  The following [enclosed] code is          */
  21. /* provided to you solely for the purpose of assisting you in           */
  22. /* the development of your applications. The code is provided           */
  23. /* "AS IS", without warranty of any kind. IBM shall not be liable       */
  24. /* for any damages arising out of your use of this code, even if        */
  25. /* they have been advised of the possibility of such damages.           */
  26. /*                                                                      */
  27. /*----------------------------------------------------------------------*/
  28. /*                                                                      */
  29. /* Change Log                                                           */
  30. /*                                                                      */
  31. /* Mark    Date      Programmer  Comment                                */
  32. /* ----    ----      ----------  -------                                */
  33. /* @nnnn   mm/dd/yy  NNN                                                */
  34. /* 51531   08/04/92  MFA         Removable media control                */
  35. /*                                                                      */
  36. /*                                                                      */
  37. /************************************************************************/
  38.  
  39. /*******************************/
  40. /* ABIOS Entry Point Codes     */
  41. /*******************************/
  42.  
  43. #define ABIOS_EP_START               0x00
  44. #define ABIOS_EP_INTERRUPT           0x01
  45. #define ABIOS_EP_TIMEOUT             0x02
  46.  
  47. /*******************************/
  48. /* ABIOS Function Codes        */
  49. /*******************************/
  50.  
  51. /* ABIOS Function Codes Common to all devices */
  52.  
  53. #define ABFC_DEFAULT_INT_HANDLER     0x00
  54. #define ABFC_RET_LID_PARMS           0x01
  55. #define ABFC_READ_DEVICE_PARMS       0x03
  56. #define ABFC_SET_DEVICE_PARMS        0x04
  57. #define ABFC_RESET_DEVICE            0x05
  58.  
  59. /* ABIOS Function Codes Specific to Diskette - Device ID 0x01 */
  60.  
  61. #define ABFC_DSKT_RESET_INTERRUPT    0x07
  62. #define ABFC_DSKT_READ               0x08
  63. #define ABFC_DSKT_WRITE              0x09
  64. #define ABFC_DKST_FORMAT             0x0A
  65. #define ABFC_DSKT_VERIFY             0x0B
  66. #define ABFC_DSKT_READ_MEDIA_PARMS   0x0C
  67. #define ABFC_DSKT_SET_MEDIA_TYPE     0x0D
  68. #define ABFC_DSKT_READ_CHGSIGNAL     0x0E
  69. #define ABFC_DSKT_TURN_OFF_MOTOR     0x0F
  70. #define ABFC_DKST_INT_STATUS         0x10
  71. #define ABFC_DSKT_GET_MEDIA_TYPE     0x11
  72. #define ABFC_DSKT_LOCK               0x12   /* F26083 */
  73. #define ABFC_DSKT_UNLOCK             0x13   /* F26083 */
  74. #define ABFC_DSKT_EJECT              0x14   /* F26083 */
  75. #define ABFC_DSKT_STATUS             0x16   /* F26083 */
  76.  
  77. /* ABIOS Function Codes Specific to Fixed Disk - Device ID 0x02 */
  78.  
  79. #define ABFC_DISK_READ               0x08
  80. #define ABFC_DISK_WRITE              0x09
  81. #define ABFC_DISK_WRITE_VERIFY       0x0A
  82. #define ABFC_DISK_VERIFY             0x0B
  83. #define ABFC_DISK_INTERRUPT_STATUS   0x0C
  84. #define ABFC_DISK_SET_DMA_PACING     0x10
  85. #define ABFC_DISK_RET_DMA_PACING     0x11
  86. #define ABFC_DISK_TRANSFER_SCB       0x12
  87. #define ABFC_DISK_DEALLOC_LID        0x14
  88. #define ABFC_DISK_GET_SCSI_PARMS     0x1A
  89.  
  90. /* ABIOS Function Codes Specific to the SCSI Adapter - Device ID 0x17 */
  91.  
  92. #define ABFC_SCSIA_RET_DEVICE_CONFIG 0x0B
  93. #define ABFC_SCSIA_RET_INTERRUPT_LID 0x0C
  94. #define ABFC_SCSIA_ENABLE_CACHE      0x0D       /* ???? */
  95. #define ABFC_SCSIA_DISABLE_CACHE     0x0E       /* ???? */
  96. #define ABFC_SCSIA_CACHE_STATUS      0x0F       /* ???? */
  97. #define ABFC_SCSIA_SET_DMA_PACING    0x10
  98. #define ABFC_SCSIA_RET_DMA_PACING    0x11
  99. #define ABFC_SCSIA_TRANSFER_SCB      0x12
  100.  
  101. /* ABIOS Function Codes Specific to the SCSI Peripheral Type - Device ID 0x18 */
  102.  
  103. #define ABFC_SCSIP_SET_DEV_TIMEOUT   0x10
  104. #define ABFC_SCSIP_READ_DEV_TIMEOUT  0x11
  105. #define ABFC_SCSIP_TRANSFER_SCB      0x12
  106. #define ABFC_SCSIP_DEALLOC_SCSI_DEV  0x14
  107. #define ABFC_SCSIP_ALLOC_SCSI_DEV    0x15
  108. #define ABFC_SCSIP_RET_TYPE_COUNT    0x16
  109. #define ABFC_SCSIP_ABORT             0x17
  110.  
  111. /*************************************************************************/
  112. /*                                                                       */
  113. /*   ABIOS REQUEST BLOCK STRUCTURES                                      */
  114. /*                                                                       */
  115. /*************************************************************************/
  116.  
  117. /*******************************/
  118. /*  ABIOS Request Block Header */
  119. /*******************************/
  120.  
  121. typedef struct _ABRBH  {                /* ABH */
  122.  
  123.   USHORT        Length;                 /* 00H -  Request Block Length  */
  124.   USHORT        LID;                    /* 02H -  Logical ID            */
  125.   USHORT        Unit;                   /* 04H -  Unit                  */
  126.   USHORT        Function;               /* 06H -  Function              */
  127.   ULONG         Reserved_1;             /* 08H -  Reserved              */
  128.   USHORT        RC;                     /* 0CH -  Return Code           */
  129.   USHORT        Timeout;                /* 0EH -  Time-Out              */
  130.  
  131. } ABRBH;
  132.  
  133. typedef ABRBH near *NPABRBH;
  134.  
  135. /***************************************/
  136. /* Return LID Parms             - 0x01 */
  137. /***************************************/
  138.  
  139. typedef struct _ABRB_RETLIDPARMS  {     /* ABRLP */
  140.  
  141.   ABRBH         abrbh;                  /* 00H - Request Block Header     */
  142.   UCHAR         HwIntLevel;             /* 10H - Hardware Interrupt Level */
  143.   UCHAR         ArbLevel;               /* 11H - Arbitration Level        */
  144.   USHORT        DeviceID;               /* 12H - Device ID                */
  145.   USHORT        cUnits;                 /* 14H - Count of Units           */
  146.   USHORT        LIDFlags;               /* 16H - Logical ID Flags         */
  147.   USHORT        RBLength;               /* 18H - Request Block Length     */
  148.   UCHAR         SecDeviceID;            /* 1AH - Secondary Device ID      */
  149.   UCHAR         Revision;               /* 1BH - Revision                 */
  150.   ULONG         Reserved_1;             /* 1CH - Reserved, MBZ            */
  151.  
  152. } ABRB_RETLIDPARMS;
  153.  
  154. typedef ABRB_RETLIDPARMS near *NPABRB_RETLIDPARMS;
  155.  
  156. #define LF_16MB_SUPPORT         0x0020  /*????*/
  157. #define LF_CONCURRENT           0x0008
  158. #define LF_PHYSICAL_PTRS        0x0002
  159. #define LF_LOGICAL_PTRS         0x0001
  160.  
  161.  
  162. /******************************************************/
  163. /* Diagnostics                                        */
  164. /******************************************************/
  165.  
  166. typedef struct _ABRBDIAGS  {            /* ABD */
  167.  
  168.   UCHAR         Reserved_5;             /* Reserved                     */
  169.   UCHAR         ErrorLogLength;         /* Error log length             */
  170.   UCHAR         IntLevel;               /* Interrupt level              */
  171.   UCHAR         ArbLevel;               /* Arbitration level            */
  172.   USHORT        DeviceID;               /* Device ID                    */
  173.   UCHAR         CmdtoCtrlr;             /* Command to controller        */
  174.   UCHAR         St0;                    /*                              */
  175.   UCHAR         St1;                    /*                              */
  176.   UCHAR         St2;                    /*                              */
  177.   UCHAR         Cylinder;               /*                              */
  178.   UCHAR         Head;                   /*                              */
  179.   UCHAR         Sector;                 /*                              */
  180.   UCHAR         SectorSize;             /*                              */
  181. } ABRBDIAGS;
  182.  
  183.  
  184.  
  185. /***************************************/
  186. /* Read Device Parms (Diskette)   0x03 */
  187. /***************************************/
  188.  
  189. typedef struct _ABRB_DSKT_READDEVPARMS { /* AB1RDP */
  190.  
  191.   ABRBH         abrbh;                  /* 00H - Request Block Header     */
  192.   USHORT        SectorsPerTrack;        /* 10H - Sectors per track        */
  193.   USHORT        BlockSize;              /* 12H - Size of sector in bytes  */
  194.   USHORT        DevCtrlFlags;           /* 14H - Device Control Flags     */
  195.   USHORT        UnitType;               /* 16H - Diskette Unit Type       */
  196.   USHORT        Reserved_1;             /* 18H - Reserved, MBZ            */
  197.   USHORT        Undefined_1;            /* 1AH - Undefined                */
  198.   ULONG         MotorOffTime;           /* 1CH - Motor off time (usecs)   */
  199.   ULONG         MotorStartTime;         /* 20H - Motor start time (usecs) */
  200.   USHORT        Undefined_2;            /* 24H - Undefined                */
  201.   USHORT        cCylinders;             /* 26H - Max Cylinders for drive  */
  202.   USHORT        Undefined_3;            /* 28H - Undefined                */
  203.   UCHAR         cHeads;                 /* 2AH - Number of heads          */
  204.   UCHAR         RetryCount;             /* 2BH - Recommended retry count  */
  205.   UCHAR         FillByte;               /* 2CH - Fill byte for format     */
  206.   ULONG         HeadSettleTime;         /* 2DH - Head Settle Time         */
  207.   UCHAR         ReadGap;                /* 31H - Gap length for RWV       */
  208.   UCHAR         FormatGap;              /* 32H - Gap length for format    */
  209.   UCHAR         DataLen;                /* 33H - Data Length              */
  210.  
  211. } ABRB_DSKT_READDEVPARMS;
  212.  
  213. typedef ABRB_DSKT_READDEVPARMS near *NPABRB_DSKT_READDEVPARMS;
  214.  
  215. /* BlockSize equates in ABRB_DSKT_READDEVPARMS & ABRB_DSKT_SETDEVPARMS */
  216. #define DP_BLOCKSIZE_256        0x01    /* 256 bytes per sector        */
  217. #define DP_BLOCKSIZE_512        0x02    /* 512 bytes per sector        */
  218.  
  219. /* DevCtrlFlag equates in ABRB_DSKT_READDEVPARMS                       */
  220. #define DP_ABDEFGAPLEN          0x0040  /* ABIOS defines FORMAT GAP    */
  221. #define DP_RECALREQUIRED        0x0008  /* Recalibrate is required     */
  222. #define DP_CONCURRENT_DSKT      0x0004  /* Current diskette unit       */
  223. #define DP_FORMATSUPPORTED      0x0002  /* Format Unit supported       */
  224. #define DP_CHANGELINE_AVAIL     0x0001  /* Change line avail on drive  */
  225.  
  226. /* UnitType equates in ABRB_DSKT_READDEVPARMS                          */
  227. #define DP_DRIVENOTPRES         0x00    /* Drive not present           */
  228. #define DP_DRIVETYPE_360KB      0x01    /* 360  KB diskette drive      */
  229. #define DP_DRIVETYPE_12OOKB     0x02    /* 1.2  MB diskette drive      */
  230. #define DP_DRIVETYPE_720KB      0x03    /* 720  KB diskette drive      */
  231. #define DP_DRIVETYPE_144OKB     0x04    /* 1.44 MB diskette drive      */
  232. #define DP_DRIVETYPE_2880KB     0x06    /* 2.88 MB diskette drive      */
  233.  
  234. /***************************************/
  235. /* Set Device Parms (Diskette)    0x04 */
  236. /***************************************/
  237.  
  238. typedef struct _ABRB_DSKT_SETDEVPARMS { /* AB1SDP */
  239.  
  240.   ABRBH         abrbh;                  /* 00H - Request Block Header     */
  241.   USHORT        Reserved_1;             /* 10H - Reserved, MBZ            */
  242.   USHORT        BlockSize;              /* 12H - Block Size               */
  243.   UCHAR         Undefined_1[29];        /* 14H - Undefined                */
  244.   UCHAR         ReadGap;                /* 31H - Gap length for RWV       */
  245.   UCHAR         Undefined_2;            /* 32H - Undefined                */
  246.   UCHAR         DataLen;                /* 33H - Data Length              */
  247.  
  248. } ABRB_DSKT_SETDEVPARMS;
  249.  
  250. typedef ABRB_DSKT_SETDEVPARMS near *NPABRB_DSKT_SETDEVPARMS;
  251.  
  252.  
  253. /****************************************************/
  254. /* Reset/Initialize            (Diskette)     0x05  */
  255. /****************************************************/
  256. typedef struct _ABRB_DSKT_RESET  {      /* AB1RS */
  257.  
  258.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  259.   USHORT        Reserved_1;             /* 10H - Reserved, MBZ             */
  260.  
  261. } ABRB_DSKT_RESET;
  262.  
  263. typedef ABRB_DSKT_RESET near *NPABRB_DSKT_RESET;
  264.  
  265.  
  266. /****************************************************/
  267. /* Disable Interrupt           (Diskette)     0x07  */
  268. /****************************************************/
  269. typedef struct _ABRB_DISABLE  {         /* AB1DI */
  270.  
  271.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  272.   UCHAR         Undefined_1[8];         /* 10H - Undefined                 */
  273.   USHORT        Reserved_1;             /* 18H - Reserved, MBZ             */
  274.  
  275. } ABRB_DSKT_DISABLE;
  276.  
  277. typedef ABRB_DSKT_DISABLE near *NPABRB_DSKT_DISABLE;
  278.  
  279.  
  280. /******************************************************/
  281. /* Read, Write, Verify (Diskette)    0x08,0x09,0x0B   */
  282. /******************************************************/
  283.  
  284. typedef struct _ABRB_DSKT_RWV  {        /* AB1RWV */
  285.  
  286.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  287.   USHORT        Reserved_1;             /* 10H - Reserved, MBZ             */
  288.   ULONG         pIObuffer;              /* 12H - Logical ptr to I/O buffer */
  289.   ULONG         Reserved_2;             /* 16H - Reserved, MBZ             */
  290.   ULONG         ppIObuffer;             /* 1AH - Physical ptr to I/O buffer*/
  291.   USHORT        Reserved_3;             /* 1EH - Reserved, MBZ             */
  292.   ULONG         WaitTime;               /* 20H - Wait time before resuming */
  293.   USHORT        cSectors;               /* 24H - Count of sectors to xfer  */
  294.   USHORT        Cylinder;               /* 26H - Cylinder number (0-based) */
  295.   USHORT        Undefined_1;            /* 28H - Undefined                 */
  296.   UCHAR         Head;                   /* 2AH - Head number (0-based)     */
  297.   UCHAR         Undefined_2[6];         /* 2BH - Undefined                 */
  298.   USHORT        Sector;                 /* 31H - Sector number (1-based)   */
  299.   ABRBDIAGS     DiagS;                  /* 33H - Diagnostic status         */
  300. } ABRB_DSKT_RWV;
  301.  
  302. typedef ABRB_DSKT_RWV near *NPABRB_DSKT_RWV;
  303.  
  304.  
  305. /******************************************************/
  306. /* Format                        (Diskette)    0x0A   */
  307. /******************************************************/
  308.  
  309. typedef struct _ABRB_DSKT_FORMAT  {     /* AB1FMT */
  310.  
  311.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  312.   USHORT        Reserved_1;             /* 10H - Reserved, MBZ             */
  313.   ULONG         pFormatTable;           /* 12H - Log ptr to format table   */
  314.   ULONG         Reserved_2;             /* 16H - Reserved, MBZ             */
  315.   ULONG         ppFormatTable;          /* 1AH - Phys ptr to format table  */
  316.   USHORT        Reserved_3;             /* 1EH - Reserved, MBZ             */
  317.   ULONG         WaitTime;               /* 20H - Wait time before resuming */
  318.   USHORT        Subfunction;            /* 24H - Subfunction number        */
  319.   USHORT        Cylinder;               /* 26H - Cylinder number (0-based) */
  320.   USHORT        Undefined_1;            /* 28H - Undefined                 */
  321.   UCHAR         Head;                   /* 2AH - Head number (0-based)     */
  322. } ABRB_DSKT_FMT;
  323.  
  324. typedef ABRB_DSKT_FMT near *NPABRB_DSKT_FMT;
  325.  
  326. /***************************************/
  327. /* Read Media Parms (Diskette)    0x0C */
  328. /***************************************/
  329.  
  330. typedef struct _ABRB_DSKT_READMEDIAPARMS {   /* AB1RMP */
  331.  
  332.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  333.   USHORT        SectorsPerTrack;        /* 10H - Sectors per track         */
  334.   USHORT        BlockSize;              /* 12H - Size of sector in bytes   */
  335.   USHORT        Undefined_1;            /* 14H - Undefined                 */
  336.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ             */
  337.   UCHAR         Undefined_2[14];        /* 18H - Undefined                 */
  338.   USHORT        cCylinders;             /* 26H - Number of cylinders       */
  339.   USHORT        Undefined_3;            /* 28H - Undefined                 */
  340.   UCHAR         cHeads;                 /* 2AH - Number of heads           */
  341.   UCHAR         Undefined_4[6];         /* 2BH - Undefined                 */
  342.   UCHAR         ReadGap;                /* 31H - Gap length for RWV        */
  343.   UCHAR         FormatGap;              /* 32H - Gap length for format     */
  344.   UCHAR         DataLen;                /* 33H - Data Length               */
  345.  
  346. } ABRB_DSKT_READMEDIAPARMS;
  347.  
  348. typedef ABRB_DSKT_READMEDIAPARMS near *NPABRB_DSKT_READMEDIAPARMS;
  349.  
  350. /***********************************************/
  351. /* Set Media Type for Format (Diskette)   0x0D */
  352. /***********************************************/
  353.  
  354. typedef struct _ABRB_DSKT_SETMEDIATYPE {   /* AB1SMT */
  355.  
  356.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  357.   USHORT        SectorsPerTrack;        /* 10H - Sectors per track         */
  358.   USHORT        BlockSize;              /* 12H - Size of sector in bytes   */
  359.   USHORT        Undefined_1;            /* 14H - Undefined                 */
  360.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ             */
  361.   UCHAR         Undefined_2[8];         /* 18H - Undefined                 */
  362.   ULONG         WaitTime;               /* 20H - Wait time before resuming */
  363.   USHORT        Undefined_3;            /* 24H - Undefined                 */
  364.   USHORT        cTracks;                /* 26H - Number of tracks to format*/
  365.   ULONG         Undefined_4;            /* 28H - Undefined                 */
  366.   UCHAR         FillByte;               /* 2CH - Fill byte for format      */
  367.   UCHAR         Undefined_5[5];         /* 2DH - Undefined                 */
  368.   UCHAR         FormatGap;              /* 32H - Gap length for format     */
  369.  
  370. } ABRB_DSKT_SETMEDIATYPE;
  371.  
  372. typedef ABRB_DSKT_SETMEDIATYPE near *NPABRB_DSKT_SETMEDIATYPE;
  373.  
  374. /***********************************************/
  375. /* Read Change Line Status   (Diskette)   0x0E */
  376. /***********************************************/
  377.  
  378. typedef struct _ABRB_DSKT_READCHGLINE { /* AB1RCL */
  379.  
  380.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  381.   UCHAR         ChangeLineStatus;       /* 10H - Change Line status        */
  382.   UCHAR         Undefined_1[5];         /* 11H - Undefined                 */
  383.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ             */
  384.  
  385. } ABRB_DSKT_READCHGLINE;
  386.  
  387. typedef ABRB_DSKT_READCHGLINE near *NPABRB_DSKT_READCHGLINE;
  388.  
  389. /* ChangeLineStatus equates in ABRB_DSKT_REACHGLINE                       */
  390. #define CHANGELINE_INACTIVE     0x00    /* Change Line Inactive           */
  391. #define CHANGELINE_ACTIVE       0x06    /* Change Line Active             */
  392.  
  393.  
  394. /***********************************************/
  395. /* Turn Off Motor            (Diskette)   0x0F */
  396. /***********************************************/
  397.  
  398. typedef struct _ABRB_DSKT_MOTOROFF  {   /* AB1MO  */
  399.  
  400.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  401.   UCHAR         Undefined_1[6];         /* 10H - Undefined                 */
  402.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ             */
  403.  
  404. } ABRB_DSKT_MOTOROFF;
  405.  
  406. typedef ABRB_DSKT_MOTOROFF    near *NPABRB_DSKT_MOTOROFF;
  407.  
  408.  
  409. /***********************************************/
  410. /* Interrupt Status          (Diskette)   0x10 */
  411. /***********************************************/
  412.  
  413. typedef struct _ABRB_DSKT_INTRSTATUS {  /* AB1IS */
  414.  
  415.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  416.   UCHAR         InterruptStatus;        /* 10H - Interrupt Status          */
  417.   UCHAR         Undefined_1[5];         /* 11H - Undefined                 */
  418.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ             */
  419.  
  420. } ABRB_DSKT_INTRSTATUS;
  421.  
  422. typedef ABRB_DSKT_INTRSTATUS near *NPABRB_DSKT_INTRSTATUS;
  423.  
  424. /* InterruptStatus equates in ABRB_DSKT_INTRSTATUS                        */
  425. #define NO_INTERRUPT            0x00    /* No Interrupt                   */
  426. #define INTERRUPT_PENDING       0x01    /* Interrupt Pending              */
  427.  
  428.  
  429. /***********************************************/
  430. /* Get Media Type            (Diskette)   0x11 */
  431. /***********************************************/
  432.  
  433. typedef struct _ABRB_DSKT_GETMEDIATYPE { /* AB1GMT */
  434.  
  435.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  436.   UCHAR         MediaType;              /* 10H - Diskette Media Type       */
  437.   UCHAR         Undefined_1[5];         /* 11H - Undefined                 */
  438.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ             */
  439.  
  440. } ABRB_DSKT_GETMEDIATYPE;
  441.  
  442. typedef ABRB_DSKT_GETMEDIATYPE near *NPABRB_DSKT_GETMEDIATYPE;
  443.  
  444. /* MediaType equates in ABRB_DSKT_GETMEDIATYPE                            */
  445. #define MEDIA1MB                     0x03
  446. #define MEDIA2MB                     0x04
  447. #define MEDIA4MB                     0x06
  448.  
  449. /*********************************************************/      /* F26083 */
  450. /* Drive control Functions        (Diskette)   0x12 0x13 0x14 */ /* F26083 */
  451. /*********************************************************/      /* F26083 */
  452. #define AB_DRIVE_LOCKED   0x0001   /* 51531 */
  453.  
  454. typedef struct _ABRB_DSKT_CONTROL {    /* AB1GMT */       /* F26083 */
  455.  
  456.   ABRBH         abrbh;                  /* 00H - Request Block Header      */ /* F26083 */
  457.   UCHAR         LockStatus;             /* 10H - Reserved                  */ /* F26083 */
  458.   UCHAR         LockCount;              /* 11H - Reserved                  */ /* F26083 */
  459.  
  460. } ABRB_DSKT_CONTROL;                                      /* F26083 */
  461.  
  462. typedef ABRB_DSKT_CONTROL near *NPABRB_DSKT_CONTROL;     /* F26083 */
  463.  
  464.  
  465. /***************************************/
  466. /* Read Device Parms (Fixed Disk) 0x03 */
  467. /***************************************/
  468.  
  469. typedef struct _ABRB_DISK_READDEVPARMS {  /* AB2RDP */
  470.  
  471.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  472.   USHORT        SectorsPerTrack;        /* 10H - Sectors per track         */
  473.   USHORT        BlockSize;              /* 12H - Size of sector in bytes   */
  474.   USHORT        DevCtrlFlags;           /* 14H - Device Control Flags      */
  475.   UCHAR         LUN;                    /* 16H - Logical Unit Number (SCSI)*/
  476.   UCHAR         Undefined_1;            /* 17H - Undefined                 */
  477.   ULONG         cCylinders;             /* 18H - Count of cylinders        */
  478.   UCHAR         cHead;                  /* 1CH - Count of heads            */
  479.   UCHAR         RetryCount;             /* 1DH - Suggested retry count     */
  480.   USHORT        Undefined_2;            /* 1EH - Undefined                 */
  481.   ULONG         cRBA;                   /* 20H - Count of RBAs on this unit*/
  482.   ULONG         Reserved_1;             /* 24H - Reserved                  */
  483.   USHORT        Reserved_2;             /* 28H - Reserved                  */
  484.   USHORT        Undefined_3;            /* 2AH - Undefined                 */
  485.   USHORT        MaxXferCount;           /* 2CH - Max blocks per transfer   */
  486.  
  487. } ABRB_DISK_READDEVPARMS;
  488.  
  489. typedef ABRB_DISK_READDEVPARMS near *NPABRB_DISK_READDEVPARMS;
  490.  
  491. /* DevCtrlFlag equates in ABRB_DISK_READDEVPARMS                           */
  492. #define DP_SCBXFER              0x8000  /* SCB Transfer Function supported */
  493. #define DP_SCSI_DEVICE          0x4000  /* Drive is SCSI device            */
  494. #define DP_FORMAT_UNIT          0x1000  /* Format Unit supported           */
  495. #define DP_FORMAT_TRACK         0x0800  /* Format Track supported          */
  496. #define DP_ST506                0x0400  /* Drive is ST506 device           */
  497. #define DP_CONCURRENT_DISK      0x0200  /* Concurrent disk unit per LID    */
  498. #define DP_EJECTABLE            0x0100  /* Ejectable unit                  */
  499. #define DP_MEDIA_ORGANIZATION   0x0080  /* 0=Random, 1=Sequential          */
  500. #define DP_LOCKING_AVAIL        0x0040  /* Locking capability supported    */
  501. #define DP_READABLE             0x0020  /* Unit is readable                */
  502. #define DP_CACHE_AVAIL          0x0010  /* Caching is supported            */
  503. #define DP_WRITE_FREQUENCY      0x0008  /* 0=Write once, 1=Write many      */
  504. #define DP_CHGLINE_DISK         0x0004  /* Change line supported           */
  505. #define DP_POWER                0x0002  /* 0=Power on, 1=Power off         */
  506. #define DP_LOGDATAPTR           0x0001  /* Device needs logical data poineter */
  507.  
  508. /****************************************************/
  509. /* Reset/Initialize               (Disk)      0x05  */
  510. /****************************************************/
  511. typedef struct _ABRB_DISK_RESET  {      /* AB2RS */
  512.  
  513.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  514.   USHORT        Reserved_1;             /* 10H - Reserved, MBZ             */
  515.   UCHAR         Undefined_1[22];        /* 12H - Undefined                 */
  516.   ULONG         WaitTime;               /* 28H - Wait time before resuming */
  517.  
  518. } ABRB_DISK_RESET;
  519.  
  520. typedef ABRB_DISK_RESET near *NPABRB_DISK_RESET;
  521.  
  522.  
  523. /************************************************************************/
  524. /* Read, Write, WriteVerify, Verify (Fixed Disk)  0x08,0x09,0x0A,0x0B   */
  525. /************************************************************************/
  526.  
  527. typedef struct _ABRB_DISK_RWV  {        /* AB2RWV */
  528.  
  529.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  530.   USHORT        Reserved_1;             /* 10H - Reserved, MBZ             */
  531.   ULONG         pIObuffer;              /* 12H - Logical ptr to I/O buffer */
  532.   USHORT        Reserved_2;             /* 16H - Reserved, MBZ             */
  533.   USHORT        Reserved_3;             /* 18H - Reserved, MBZ             */
  534.   ULONG         ppIObuffer;             /* 1AH - Physical ptr to I/O buffer*/
  535.   USHORT        Reserved_4;             /* 1EH - Reserved, MBZ             */
  536.   ULONG         RBA;                    /* 20H - RBA                       */
  537.   ULONG         Reserved_5;             /* 24H - Reserved, MBZ             */
  538.   ULONG         WaitTime;               /* 28H - Wait time before resuming */
  539.   USHORT        cBlocks;                /* 2CH - Count of blocks to xfer   */
  540.   UCHAR         Flags;                  /* 2EH - Flags                     */
  541.   USHORT        SoftError;              /* 2FH - Soft error word           */
  542.  
  543. } ABRB_DISK_RWV;
  544.  
  545. typedef ABRB_DISK_RWV near *NPABRB_DISK_RWV;
  546.  
  547. /* Flags equates in ABRB_DSKT_RWV                                         */
  548. #define RW_DONT_CACHE           0x01    /* Dont cache this request        */
  549.  
  550. /***********************************************/
  551. /* Interrupt Status          (Disk)       0x0C */
  552. /***********************************************/
  553.  
  554. typedef struct _ABRB_DISK_INTRSTATUS  { /* AB2IS */
  555.  
  556.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  557.   UCHAR         InterruptStatus;        /* 10H - Interrupt Status          */
  558.   UCHAR         Undefined_1[5];         /* 11H - Undefined                 */
  559.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ             */
  560.  
  561. } ABRB_DISK_INTRSTATUS;
  562.  
  563. typedef ABRB_DISK_INTRSTATUS near *NPABRB_DISK_INTRSTATUS;
  564.  
  565. /* InterruptStatus equates in ABRB_DISK_INTRSTATUS                        */
  566. #define NO_INTERRUPT            0x00    /* No Interrupt                   */
  567. #define INTERRUPT_PENDING       0x01    /* Interrupt Pending              */
  568.  
  569.  
  570. /***********************************************/
  571. /* Set DMA Pacing            (Disk)       0x10 */
  572. /***********************************************/
  573.  
  574. typedef struct _ABRB_DISK_SETDMAPACING {  /* AB2SDMA */
  575.  
  576.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  577.   UCHAR         DMAPacing;              /* 10H - DMA Pacing value          */
  578.   UCHAR         Undefined_1[5];         /* 11H - Undefined                 */
  579.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ             */
  580.   UCHAR         Undefined_2[16];        /* 18H - Undefined                 */
  581.   ULONG         WaitTime;               /* 28H - Wait Time before resuming */
  582.  
  583. } ABRB_DISK_SETDMAPACING;
  584.  
  585. typedef ABRB_DISK_SETDMAPACING near *NPABRB_DISK_SETDMAPACING;
  586.  
  587.  
  588. /***********************************************/
  589. /* Return DMA Pacing         (Disk)       0x11 */
  590. /***********************************************/
  591.  
  592. typedef struct _ABRB_DISK_RETDMAPACING { /* AB2RDMA */
  593.  
  594.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  595.   UCHAR         DMAPacing;              /* 10H - Current DMA pacing value  */
  596.   UCHAR         Undefined_1[5];         /* 11H - Undefined                 */
  597.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ             */
  598.  
  599. } ABRB_DISK_RETDMAPACING;
  600.  
  601. typedef ABRB_DISK_RETDMAPACING near *NPABRB_DISK_RETDMAPACING;
  602.  
  603.  
  604. #ifndef INCL_NO_SCB
  605. /***********************************************/
  606. /*  Transfer SCB Request Block  (Disk)  0x12   */
  607. /***********************************************/
  608.  
  609. typedef struct _ABRB_DISK_XFERSCB  {    /* AB2XSCB */
  610.  
  611.   ABRBH         abrbh;                  /* 00H - Request Block Header       */
  612.   ULONG         ppSCB;                  /* 10H - physical pointer to SCB    */
  613.   USHORT        Reserved_1;             /* 14H - reserved, MBZ              */
  614.   PSCBHDR       pSCBHdr;                /* 16H - logical pointer to SCB hdr */
  615.   USHORT        Undefined_1;            /* 1AH - Undefined                  */
  616.   USHORT        Reserved_2;             /* 1CH - reserved, MBZ              */
  617.   PSCBHDR       pLastSCBHdr;            /* 1EH - logical ptr to last SCB hdr*/
  618.   ULONG         Undefined_2;            /* 22H - Undefined                  */
  619.   USHORT        Reserved_3;             /* 26H - reserved, MBZ              */
  620.   ULONG         WaitTime;               /* 28H - Wait time before resuming  */
  621.   USHORT        Reserved_4;             /* 2CH - reserved, MBZ              */
  622.   UCHAR         Flags;                  /* 2EH - bits 7-1 reserved          */
  623.                                         /* bit 0: 0-normal length SCB       */
  624.                                         /*        1-long SCB                */
  625.   USHORT        SoftError;              /* 2FH - Soft error word            */
  626.   UCHAR         Undefined_3;            /* 31H - Undefined                  */
  627.   UCHAR         Status;                 /* 32H - bits 7-1 reserved          */
  628.                                         /* bit 0: 0-last SCB field not valid*/
  629.                                         /*        1-last SCB field valid    */
  630.  
  631. } ABRB_DISK_XFERSCB;
  632.  
  633. typedef ABRB_DISK_XFERSCB near *NPABRB_DISK_XFERSCB;
  634.  
  635. #endif
  636. /***********************************************/
  637. /*  Deallocate LID              (Disk)  0x14   */
  638. /***********************************************/
  639.  
  640. typedef struct _ABRB_DISK_DEALLOCLID {  /* AB2DL */
  641.  
  642.   ABRBH         abrbh;                  /* 00H - Request Block Header     */
  643.   USHORT        Undefined_1;            /* 10H - Undefined                */
  644.   USHORT        SCSIdisknum;            /* 12H - SCSI disk number         */
  645.   USHORT        Undefined_2;            /* 14H - Undefined                */
  646.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ            */
  647.  
  648. } ABRB_DISK_DEALLOCLID;
  649.  
  650.  
  651. typedef ABRB_DISK_DEALLOCLID near *NPABRB_DISK_DEALLOCLID;
  652.  
  653. /***********************************************/
  654. /*  Get SCSI Parms              (Disk)  0x1A   */
  655. /***********************************************/
  656.  
  657. typedef struct _ABRB_DISK_GETSCSIPARMS { /* AB2GSP */
  658.  
  659.   ABRBH         abrbh;                  /* 00H - Request Block Header     */
  660.   USHORT        Reserved_1;             /* 10H - Reserved                 */
  661.   UCHAR         PUN;                    /* 12H - SCSI PUN                 */
  662.   UCHAR         LUN;                    /* 13H - SCSI LUN                 */
  663.   UCHAR         LDN;                    /* 14H - SCSI LDN                 */
  664.   UCHAR         AdapterIndex;           /* 15H - SCSI Adapter Index       */
  665.   USHORT        Port;                   /* 16H - SCSI base port address   */
  666.  
  667. } ABRB_DISK_GETSCSIPARMS;
  668.  
  669. typedef ABRB_DISK_GETSCSIPARMS near *NPABRB_DISK_GETSCSIPARMS;
  670.  
  671.  
  672. /****************************************************/
  673. /* Reset/Initialize Adapter           (SCSIA) 0x05  */
  674. /****************************************************/
  675.  
  676. typedef struct _ABRB_SCSIA_RESET_INIT  { /* AB17RSET */
  677.  
  678.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  679.   UCHAR         ResetType;              /* 10H - Reset type                */
  680.   UCHAR         Undefined_1[5];         /* 11H - Undefined                 */
  681.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ             */
  682.   UCHAR         Undefined_2[16];        /* 18H - Undefined fields          */
  683.   ULONG         WaitTime;               /* 28H - Wait time before resuming */
  684.   UCHAR         Undefined_3[6];         /* 2CH - Undefined                 */
  685.   UCHAR         Status;                 /* 32H - Status                    */
  686.  
  687. } ABRB_SCSIA_RESET_INIT;
  688.  
  689. typedef ABRB_SCSIA_RESET_INIT near *NPABRB_SCSIA_RESET_INIT;
  690.  
  691.  
  692. /****************************************************/
  693. /* Return Device Configuration Table  (SCSIA) 0x0B  */
  694. /****************************************************/
  695.  
  696. typedef struct _ABRB_SCSIA_RETDEVICECFGTBL { /* AB17RDCT */
  697.  
  698.   ABRBH         abrbh;                  /* 00H - Request Block Header     */
  699.   USHORT        Reserved_1;             /* 10H - Reserved                 */
  700.   PBYTE         pDevCfgTbl;             /* 12H - Logical ptr to table     */
  701.   USHORT        Reserved_2;             /* 16H - Reserved                 */
  702.  
  703. } ABRB_SCSIA_RETDEVICECFGTBL;
  704.  
  705. typedef ABRB_SCSIA_RETDEVICECFGTBL near *NPABRB_SCSIA_RETDEVICECFGTBL;
  706.  
  707.  
  708. /****************************************************/
  709. /* Return Interrupting Locical ID      (SCSIA) 0x0C */
  710. /****************************************************/
  711.  
  712. typedef struct _ABRB_RETINTRLID { /* AB17RIL */
  713.  
  714.   ABRBH         abrbh;                  /* 00H - Request Block Header     */
  715.   UCHAR         IntStatus;              /* 10H - Interrupt status         */
  716.   UCHAR         Undefined_1;            /* 11H - Undefined                */
  717.   USHORT        IntLID;                 /* 12H - Interrupting LID         */
  718.   USHORT        Undefined_2;            /* 14H - Undefined                */
  719.   USHORT        Reserved_1;             /* 16H - Reserved                 */
  720.  
  721. } ABRB_RETINTRLID;
  722.  
  723. typedef ABRB_RETINTRLID near *NPABRB_RETINTRLID;
  724.  
  725. /* Use the same equates for IntStatus as those defined for Interrupt   */
  726. /* status in the Return Interrupt Status Disk ABIOS RB.                */
  727.  
  728.  
  729. /****************************************************/
  730. /* Read Device Parms                 (SCSIP)  0x03  */
  731. /****************************************************/
  732.  
  733. typedef struct _ABRB_SCSIP_READDEVPARMS  {   /* AB18RDP */
  734.  
  735.   ABRBH         abrbh;                  /* 00H - Request Block Header     */
  736.   USHORT        Reserved_1;             /* 10H - Reserved, MBZ            */
  737.   UCHAR         SCB_Level;              /* 12H - SCB compatibility level  */
  738.   UCHAR         AdapterIndex;           /* 13H - Adapter Index            */
  739.   USHORT        DeviceFlags;            /* 14H - Device Flags             */
  740.   UCHAR         LUN;                    /* 16H - Logical Unit Number      */
  741.   UCHAR         PUN;                    /* 17H - Physical Unit Number     */
  742.   UCHAR         Undefined_1[16];        /* 18H - Undefined fields         */
  743.   USHORT        Reserved_2;             /* 28H - Reserved, MBZ            */
  744.  
  745. } ABRB_SCSIP_READDEVPARMS;
  746.  
  747. typedef ABRB_SCSIP_READDEVPARMS near *NPABRB_SCSIP_READDEVPARMS;
  748.  
  749. /* DeviceFlags equates in ABRB_SCSIP_READDEVPARMS                         */
  750. #define DEVDEFECTIVE          0x0001    /* device found defective by POST */
  751. #define POWEROFF              0x0002    /* device is currently powered off*/
  752. #define CACHESUPPORT          0x0010    /* Adpater card cache supported   */
  753.  
  754.  
  755. /****************************************************/
  756. /* Reset/Initialize                  (SCSIP)  0x05  */
  757. /****************************************************/
  758.  
  759. typedef struct _ABRB_SCSIP_RESET  {     /* AB18RS */
  760.  
  761.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  762.   UCHAR         Undefined_1[6];         /* 10H - Undefined                 */
  763.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ             */
  764.   UCHAR         Undefined_2[16];        /* 18H - Undefined fields          */
  765.   ULONG         WaitTime;               /* 28H - Wait time before resuming */
  766.   UCHAR         Undefined_3[6];         /* 2CH - Undefined                 */
  767.   UCHAR         Status;                 /* 32H - Status                    */
  768.  
  769. } ABRB_SCSIP_RESET;
  770.  
  771. typedef ABRB_SCSIP_RESET near *NPABRB_SCSIP_RESET;
  772.  
  773. /****************************************************/
  774. /* Set Device Time-Out               (SCSIP)  0x10  */
  775. /****************************************************/
  776.  
  777. typedef struct _ABRB_SCSIP_SETTIMEOUT  {     /* AB18STO */
  778.  
  779.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  780.   UCHAR         Timeout;                /* 10H - Time-out value            */
  781.   UCHAR         Reserved_1;             /* 11H - Reserved, MBZ             */
  782.   UCHAR         Undefined_1[4];         /* 12H - Undefined                 */
  783.   USHORT        Reserved_2;             /* 16H - Reserved, MBZ             */
  784.   UCHAR         Undefined_2[16];        /* 18H - Undefined fields          */
  785.   ULONG         WaitTime;               /* 28H - Wait time before resuming */
  786.   UCHAR         Undefined_3[6];         /* 2CH - Undefined                 */
  787.   UCHAR         Status;                 /* 32H - Status                    */
  788.  
  789. } ABRB_SCSIP_SETTIMEOUT;
  790.  
  791. typedef ABRB_SCSIP_SETTIMEOUT near *NPABRB_SCSIP_SETTIMEOUT;
  792.  
  793.  
  794. /****************************************************/
  795. /* Read Device Time-Out              (SCSIP)  0x11  */
  796. /****************************************************/
  797.  
  798. typedef struct _ABRB_SCSIP_READTIMEOUT  {   /* AB18RTO */
  799.  
  800.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  801.   UCHAR         Timeout;                /* 10H - Time-out value            */
  802.   UCHAR         Reserved_1;             /* 11H - Reserved, MBZ             */
  803.   UCHAR         Undefined_1[4];         /* 12H - Undefined                 */
  804.   USHORT        Reserved_2;             /* 16H - Reserved, MBZ             */
  805.  
  806. } ABRB_SCSIP_READTIMEOUT;
  807.  
  808. typedef ABRB_SCSIP_READTIMEOUT near *NPABRB_SCSIP_READTIMEOUT;
  809.  
  810.  
  811. /****************************************************/
  812. /* Transfer SCB                      (SCSIP)  0x12  */
  813. /****************************************************/
  814.  
  815. typedef struct _ABRB_SCSIP_TRANSFERSCB { /* AB18TSCB */
  816.  
  817.   ABRBH         abrbh;                  /* 00H - Request Block Header       */
  818.   ULONG         ppSCB;                  /* 10H - physical pointer to SCB    */
  819.   USHORT        Reserved_1;             /* 14H - reserved, MBZ              */
  820.   PSCBHDR       pSCBHdr;                /* 16H - logical pointer to SCB hdr */
  821.   USHORT        Undefined_1;            /* 1AH - Undefined                  */
  822.   USHORT        Reserved_2;             /* 1CH - reserved, MBZ              */
  823.   UCHAR         Undefined_2[8];         /* 1EH - Undefined                  */
  824.   USHORT        Reserved_3;             /* 26H - reserved, MBZ              */
  825.   ULONG         WaitTime;               /* 28H - Wait time before resuming  */
  826.   USHORT        Reserved_4;             /* 2CH - reserved, MBZ              */
  827.   UCHAR         Flags;                  /* 2EH - bits 7-1 reserved          */
  828.                                         /*       bit 0: 0-normal length SCB */
  829.                                         /*              1-long SCB          */
  830.   UCHAR         Undefined_3[3];         /* 2FH - Undefined                  */
  831.   UCHAR         Status;                 /* 32H - bits 7-2 & 0 reserved      */
  832.                                         /*       bit 1: 0 - CCSB not reqrd  */
  833.                                         /*              1 - CCSB needed     */
  834.  
  835. } ABRB_SCSIP_TRANSFERSCB;
  836.  
  837. typedef ABRB_SCSIP_TRANSFERSCB near *NPABRB_SCSIP_TRANSFERSCB;
  838.  
  839. #define  NORMAL_SCB  0x00               /* Flags - Normal length SCB        */
  840. #define  LONG_SCB    0x01               /* Flags - Long SCB                 */
  841.  
  842. #define  TSB_NOT_REQD   0x00            /* Status - TSB is not needed       */
  843. #define  TSB_NEEDED     0x02            /* Status - TSB is needed           */
  844.  
  845.  
  846. /****************************************************/
  847. /* Deallocate SCSI Peripheral Device (SCSIP)  0x14  */
  848. /****************************************************/
  849.  
  850. typedef struct _ABRB_SCSIP_DEALLOC      {   /* AB18DPD */
  851.  
  852.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  853.   UCHAR         Undefined_1[6];         /* 10H - Undefined                 */
  854.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ             */
  855.  
  856. } ABRB_SCSIP_DEALLOC;
  857.  
  858. typedef ABRB_SCSIP_DEALLOC  near *NPABRB_SCSIP_DEALLOC;
  859.  
  860.  
  861.  
  862. /****************************************************/
  863. /* Allocate SCSI Peripheral Device   (SCSIP)  0x15  */
  864. /****************************************************/
  865.  
  866. typedef struct _ABRB_SCSIP_ALLOC  {     /* AB18APD */
  867.  
  868.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  869.   UCHAR         DevType;                /* 10H - Device peripheral type    */
  870.   UCHAR         DevFlags;               /* 11H - Device type flags         */
  871.   USHORT        DevUnit;                /* 12H - nth device of this type   */
  872.   USHORT        Undefined_1;            /* 14H - Undefined                 */
  873.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ             */
  874. } ABRB_SCSIP_ALLOC;
  875.  
  876. typedef ABRB_SCSIP_ALLOC near *NPABRB_SCSIP_ALLOC;
  877.  
  878.  
  879. /* DevFlags equates in RB_SCSIP_ALLOC                                   */
  880. #define DEVTYPE_CDROM           0x05
  881. #define DEVTYPE_REMOVABLE       0x80    /* Device media is removable    */
  882.  
  883.  
  884. /****************************************************/
  885. /* Return Peripheral Type Count      (SCSIP)  0x16  */
  886. /****************************************************/
  887.  
  888. typedef struct _ABRB_SCSIP_RETCOUNT {   /* AB18RC  */
  889.  
  890.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  891.   UCHAR         DevType;                /* 10H - Device Peripheral type    */
  892.   UCHAR         DevFlags;               /* 11H - Device type flags         */
  893.   USHORT        Undefined_1;            /* 12H - Undefined                 */
  894.   USHORT        DevCount;               /* 14H - Count of device type      */
  895.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ             */
  896.  
  897. } ABRB_SCSIP_RETCOUNT;
  898.  
  899. typedef ABRB_SCSIP_RETCOUNT   near *NPABRB_SCSIP_RETCOUNT;
  900.  
  901.  
  902. /****************************************************/
  903. /* Abort                             (SCSIP)  0x17  */
  904. /****************************************************/
  905.  
  906. typedef struct _ABRB_SCSIP_ABORT  {     /* AB18AB */
  907.  
  908.   ABRBH         abrbh;                  /* 00H - Request Block Header      */
  909.   UCHAR         Undefined_1[6];         /* 10H - Undefined                 */
  910.   USHORT        Reserved_1;             /* 16H - Reserved, MBZ             */
  911.   UCHAR         Undefined_2[16];        /* 18H - Undefined fields          */
  912.   ULONG         WaitTime;               /* 28H - Wait time before resuming */
  913.   UCHAR         Undefined_3[6];         /* 2CH - Undefined                 */
  914.   UCHAR         Status;                 /* 32H - Status                    */
  915.  
  916. } ABRB_SCSIP_ABORT;
  917.  
  918. typedef ABRB_SCSIP_ABORT near *NPABRB_SCSIP_ABORT;
  919.  
  920.  
  921.  
  922.  
  923.  
  924. #define GENERIC_ABRB_SIZE  128
  925.  
  926. /*******************************/
  927. /* ABIOS Return Codes          */
  928. /*******************************/
  929.  
  930. /* ABIOS Return Codes Common to all Functions */
  931.  
  932. #define ABRC_COMPLETEOK              0x0000
  933. #define ABRC_STAGEONINTERRUPT        0x0001
  934. #define ABRC_STAGEONTIME             0x0002
  935. #define ABRC_NOTMYINTERRUPT          0x0005
  936. #define ABRC_ATTENTION               0x0009
  937. #define ABRC_SPURIOUSINTERRUPT       0x0081
  938. #define ABRC_BUSY                    0x8000
  939. #define ABRC_START                   0xFFFF
  940.  
  941. #define ABRC_UNSUPPORTED_LID         0xC000
  942. #define ABRC_UNSUPPORTED_FUNCTION    0xC001
  943. #define ABRC_UNSUPPORRTED_UNIT       0xC003
  944. #define ABRC_UNSUPPORTED_RB_LEN      0xC004
  945. #define ABRC_INVALID_PARM            0xC005
  946.  
  947. #define ABRC_ERRORBIT                0x8000
  948. #define ABRC_RETRYBIT                0x0100
  949. #define ABRC_ERRORMSK                0x00FF
  950.  
  951. /* ABIOS Return Codes Specific to Diskette - Device ID 0x01   */
  952.  
  953. #define ABRC_DSKT_WRITE_PROTECT      0x8003
  954. #define ABRC_DSKT_MEDIA_CHANGED      0x8006
  955. #define ABRC_DSKT_MEDIA_NOT_PRESENT  0x800D
  956. #define ABRC_DSKT_NOCHGSIG           0x800E
  957. #define ABRC_DSKT_INVALID_VALUE      0x800F
  958. #define ABRC_DSKT_MEDIA_NOTSUPPORTED 0x8010
  959. #define ABRC_DSKT_NO_MEDIA_SENSE     0x8011
  960. #define ABRC_DSKT_RESET_FAIL         0x9009
  961. #define ABRC_DSKT_ADDRMARK_NOTFND    0x9102
  962. #define ABRC_DSKT_SECTOR_NOTFND      0x9104
  963. #define ABRC_DSKT_DMA_IN_PROGRESS    0x9107
  964. #define ABRC_DSKT_DMA_OVERRUN        0x9108
  965. #define ABRC_DSKT_BAD_CRC            0x9110
  966. #define ABRC_DSKT_BAD_CONTROLLER     0x9120   /* A120,B020                 */
  967. #define ABRC_DSKT_BAD_SEEK           0x9140
  968. #define ABRC_DSKT_GENERAL_ERROR      0x9180
  969. #define ABRC_DSKT_UNKNOWN_MEDIA      0xC00C
  970.  
  971. /* ABIOS Return Codes Specific to Disk - Device ID 0x02   */
  972.  
  973. #define ABRC_DISK_DEV_NOT_POWERED_ON 0x8001   /*                           */
  974. #define ABRC_DISK_DEV_BLOCK_INIT_ERR 0x8002   /*                           */
  975. #define ABRC_DISK_DEV_NOT_ALLOCATED  0x8003   /*                           */
  976. #define ABRC_DISK_DMA_ARB_INVALID    0x800F   /*                           */
  977. #define ABRC_DISK_BAD_COMMAND        0x9001   /* 9101,A001,B001,B101       */
  978. #define ABRC_DISK_ADDRMARK_NOTFND    0x9002   /* 9102,A002                 */
  979. #define ABRC_DISK_WRITE_PROTECT      0x9003   /* 9103                      */
  980. #define ABRC_DISK_RECORD_NOTFND      0x9004   /* 9104,A004                 */
  981. #define ABRC_DISK_RESET_FAIL         0x9005   /* 9105,A005,A105            */
  982. #define ABRC_DISK_MEDIA_CHANGED      0x9006   /* 9106                      */
  983. #define ABRC_DISK_CTRL_PARM_FAIL     0x9007   /* 9107,A007,A107            */
  984. #define ABRC_DISK_DMA_FAIL           0x9008   /* 9108                      */
  985. #define ABRC_DISK_DEFECTIVE_SECTOR   0x900A   /*      A00A                 */
  986. #define ABRC_DISK_BAD_TRACK          0x900B   /*      A00B                 */
  987. #define ABRC_DISK_FORMAT_ERROR       0x900D   /*      A00D                 */
  988. #define ABRC_DISK_CAM_RV             0x900E   /*      A00E                 */
  989. #define ABRC_DISK_CRC                0x9010   /*      A010                 */
  990. #define ABRC_DISK_DEVICE_FAILED      0x9014   /* 9114                      */
  991. #define ABRC_DISK_BUS_FAULT          0x9015   /* 9115                      */
  992. #define ABRC_DISK_BAD_CONTROLLER     0x9020   /* 9120,A020,A120,B020,B120  */
  993. #define ABRC_DISK_EQUIP_CHECK        0x9021   /* 9121,A021,A121,B021,B121  */
  994. #define ABRC_DISK_BAD_SEEK           0x9040   /* 9140,A040,A140            */
  995. #define ABRC_DISK_DEVICE_NORESPONSE  0x9080   /* 9180,A080,A180,B080,B180  */
  996. #define ABRC_DISK_DRIVE_NOTREADY     0x90AA   /* 91AA,A0AA,A1AA            */
  997. #define ABRC_DISK_UNDEFINED_ERROR    0x90BB   /* 91BB,A0BB,A1BB,B0BB,B1BB  */
  998. #define ABRC_DISK_WRITE_FAULT        0x90CC   /* 91CC,A0CC,A1CC            */
  999. #define ABRC_DISK_STATUS_ERROR       0x90E0   /* 91E0                      */
  1000. #define ABRC_DISK_INCOMPLETE_SENSE   0x90FF   /* 91FF,A0FF,A1FF,B0FF,B1FF  */
  1001. #define ABRC_DISK_ECC_CORRECTED      0xA011   /*                           */
  1002.  
  1003. /****************************************************************/
  1004. /* Various diskette equates                                     */
  1005. /****************************************************************/
  1006.  
  1007. /* Equates specific to NEC Diskette Controller                              */
  1008. #define ABNEC                        0020     /* Level of NEC Controller    */
  1009. #define NEC_DSKT_READ                0xE6
  1010. #define NEC_DSKT_WRITE               0xC5
  1011. #define NEC_DSKT_FORMAT              0x4D
  1012.  
  1013. /* Other various diskette equates                                           */
  1014. #define ABDISKETTELID                0x0001
  1015. #define HW_CHANGELINE_ACTIVE         0x80
  1016. #define ABCHGLINEACTIVE              0x00FC
  1017.  
  1018.  
  1019. /****************************************************************/
  1020. /* Various Fixed Disk Equates                                   */
  1021. /****************************************************************/
  1022. #define ABRB_NOCACHE                 0x01  /* ABRB_Flags bit 0, set=dont cache*/
  1023. #define ABRETRYCOUNT                 0x05  /* Device Error Retry Limit        */
  1024.  
  1025.  
  1026. /*******************************/
  1027. /* ABIOS Device IDs            */
  1028. /*******************************/
  1029.  
  1030. #define DEVID_INTERNAL          0x00
  1031. #define DEVID_DISKETTE          0x01
  1032. #define DEVID_DISK              0x02
  1033. #define DEVID_VIDEO             0x03
  1034. #define DEVID_KEYBOARD          0x04
  1035. #define DEVID_PARALLEL          0x05
  1036. #define DEVID_ASYNC             0x06
  1037. #define DEVID_SYSTEMTIMER       0x07
  1038. #define DEVID_RTC               0x08
  1039. #define DEVID_SYSTEMSVCS        0x09
  1040. #define DEVID_NMI               0x0A
  1041. #define DEVID_MOUSE             0x0B
  1042. #define DEVID_NVRAM             0x0E
  1043. #define DEVID_DMA               0x0F
  1044. #define DEVID_POS               0x10
  1045. #define DEVID_SECURITY          0x16
  1046. #define DEVID_SCSIADAPTER       0x17
  1047. #define DEVID_GENERICSCSI       0x18
  1048.