home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddrivers.zip / MCA / MCA.H < prev   
Text File  |  1992-07-06  |  3KB  |  80 lines

  1. /*
  2.   ABIOS specific includes
  3. */
  4.  
  5. #define  POS_BASE 0x100             /* MCA adapter base       */
  6. #define  NUM_POS_BYTES 64           /* maximum num POS bytes  */
  7. #define  MAX_NUM_SLOTS 8            /* model 80 8 slots       */
  8. #define  POS_PORT 0x96              /* use this to enable POS */
  9. #define  POS_BASE 0x100             /* all POS regs start here*/
  10.                
  11. /* Constants used by ABIOS calls */
  12.  
  13. #define GET_LID_BLOCK_SIZE  0x01    /* ABIOS command          */
  14. #define POS_LID             0x10    /* get POS LID from ABIOS */
  15. #define READ_POS_REGS_RAM   0x0B    /* read POS from NVRAM    */
  16. #define WRITE_POS_REGS_RAM  0x0C    /* write NVRAM POS data   */
  17. #define READ_POS_REGS_CARD  0x0D    /* read POS data from card*/
  18. #define WRITE_POS_REGS_CARD 0x0E    /* write POS data to card */
  19.  
  20. /* ABIOS request function parameters */
  21.  
  22. typedef struct function_parms_def {
  23.    USHORT    req_blk_len;           /* length, must be init.  */
  24.    USHORT    LID;                   /* the LID                */
  25.    USHORT    unit;                  /* unit within a LID      */
  26.    USHORT    function;              /* category of request    */
  27.    USHORT    resvd1;                /* reserved               */
  28.    USHORT    resvd2;                /* reserved               */
  29.    USHORT    ret_code;              /* return code            */
  30.    USHORT    time_out;              /* timeout in seconds     */
  31.    } function_parms_type;
  32.  
  33. typedef struct service_parms_def {
  34.    UCHAR     slot_num;              /* 10h slot number        */
  35.    UCHAR     resvd3;                /* 11h reserved           */
  36.    USHORT    card_ID;               /* 12h card ID            */
  37.    USHORT    resvd4;                /* 14h reserved           */
  38.    UCHAR     far *pos_buf;          /* 16h address of buffer  */
  39.    USHORT    resvd5;                /* 1Ah reserved           */
  40.    USHORT    resvd6;                /* 1Ch reserved           */
  41.    UCHAR     resvd7[40];            /* 1Eh work area          */
  42.    } service_parms_type;
  43.  
  44. /* LID request parameters */
  45.  
  46. typedef struct lid_service_parms_def {
  47.    UCHAR     irpt_level;            /* 10h interrupt level    */
  48.    UCHAR     arb_level;             /* 11h arbitration level  */
  49.    USHORT    device_id;             /* 12h device ID          */
  50.    USHORT    unit_count;            /* 14h count of units     */
  51.    USHORT    flags;                 /* 16h LID flags          */
  52.    USHORT    blk_size;              /* 18h req blk length     */
  53.    USHORT    secnd_id;              /* 1Ah secondary dev ID   */
  54.    USHORT    resvd6;                /* 1Ch reserved           */
  55.    USHORT    resvd7;                /* 1Eh reserved           */
  56.    } lid_service_parms_type;
  57.  
  58. /* complete request block */
  59.  
  60. typedef struct req_block_def {
  61.    function_parms_type f_parms;
  62.    service_parms_type  s_parms;
  63.    } REQBLK;
  64.  
  65. /* complete LID block */
  66.  
  67. typedef struct lid_block_def {
  68.    function_parms_type     f_parms;
  69.    lid_service_parms_type  s_parms;
  70.    } LIDBLK;
  71.  
  72. /* card struct, contains ID and POS reg data */
  73.  
  74. typedef struct card_def {
  75.   USHORT     card_ID;               /* ID of the card slot    */
  76.   UCHAR      pos_regs[NUM_POS_BYTES];
  77.   } CARD;
  78.  
  79.  
  80.