home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / alt_os / mint / mfs6011 / source / minixfs / pun.h < prev    next >
C/C++ Source or Header  |  1993-11-25  |  1KB  |  37 lines

  1. /* This file defines the pun_info structure used in several kinds of hard disk
  2.  * driver software. Basically it gives info for the first 16 bios drives.
  3.  * Since it gives physical partition starts it's rather useful. Only snag is
  4.  * the 'first 16 bios drives' bit.
  5.  */
  6.  
  7. #define        MAXUNITS    16
  8.  
  9. struct    pun_info {
  10.     unsigned short    puns;            /* Number of HD's */
  11.     unsigned char    pun[MAXUNITS];        /* AND with masks below: */
  12. #define PUN_DEV        0x1f            /* device number of HD */
  13.  
  14. /* Note: I think this is right. It is a bit mask for the bits of 'pun' which
  15.  * refer to a device. Bits 0-2 are unit number, bit 3=0 for ACSI bus and 1 for
  16.  * TT SCSI bus. Device numbers 0x10, (and possibly 0x11) are for Falcon IDE
  17.  * bus and maybe third party IDE interfaces too. So it looks like bits 0-4 are
  18.  * used for now; so a mask of 0x1f is used. Bit 6 means 'removable'.
  19.  */
  20.  
  21. #define PUN_UNIT    0x7            /* Unit number */
  22. #define PUN_SCSI    0x8            /* 1=SCSI 0=ACSI */
  23. #define PUN_IDE        0x10            /* Falcon IDE */
  24. #define PUN_REMOVABLE    0x40            /* Removable media */
  25.  
  26. #define PUN_VALID    0x80            /* zero if valid */
  27.  
  28.     long        partition_start[MAXUNITS];
  29.     long        cookie;            /* 'AHDI' if following valid */
  30.     long        *cookie_ptr;        /* Points to 'cookie' */
  31.     unsigned short    version_num;        /* AHDI version */
  32.     unsigned short    max_sect_siz;        /* Max logical sec size */
  33.     long        reserved[16];        /* Reserved */
  34. };
  35.  
  36. #define PUN_PTR (*((struct pun_info **)0x516))
  37.