Annotation of Net2/arch/amiga/dev/rdb.h, revision 1.1

1.1     ! root        1: #ifndef _amiga_rdb_h
        !             2: #define _amiga_rdb_h
        !             3: 
        !             4: #define ULONG  u_long
        !             5: #define LONG   long
        !             6: #define UBYTE  u_char
        !             7: 
        !             8: /* definitions for the Amiga RigidDiskBlock layout, which always starts in 
        !             9:    cylinder 0 of a medium. Taken from page 254f of the RKM: Devices */
        !            10: 
        !            11: struct RigidDiskBlock {
        !            12:     ULONG   rdb_ID;            /* 4 character identifier */
        !            13:     ULONG   rdb_SummedLongs;   /* size of this checksummed structure */
        !            14:     LONG    rdb_ChkSum;                /* block checksum (longword sum to zero) */
        !            15:     ULONG   rdb_HostID;                /* SCSI Target ID of host */
        !            16:     ULONG   rdb_BlockBytes;    /* size of disk blocks */
        !            17:     ULONG   rdb_Flags;         /* see below for defines */
        !            18:     /* block list heads */
        !            19:     ULONG   rdb_BadBlockList;  /* optional bad block list */
        !            20:     ULONG   rdb_PartitionList; /* optional first partition block */
        !            21:     ULONG   rdb_FileSysHeaderList; /* optional file system header block */
        !            22:     ULONG   rdb_DriveInit;     /* optional drive-specific init code */
        !            23:                                /* DriveInit(lun,rdb,ior): "C" stk & d0/a0/a1 */
        !            24:     ULONG   rdb_Reserved1[6];  /* set to $ffffffff */
        !            25:     /* physical drive characteristics */
        !            26:     ULONG   rdb_Cylinders;     /* number of drive cylinders */
        !            27:     ULONG   rdb_Sectors;       /* sectors per track */
        !            28:     ULONG   rdb_Heads;         /* number of drive heads */
        !            29:     ULONG   rdb_Interleave;    /* interleave */
        !            30:     ULONG   rdb_Park;          /* landing zone cylinder */
        !            31:     ULONG   rdb_Reserved2[3];
        !            32:     ULONG   rdb_WritePreComp;  /* starting cylinder: write precompensation */
        !            33:     ULONG   rdb_ReducedWrite;  /* starting cylinder: reduced write current */
        !            34:     ULONG   rdb_StepRate;      /* drive step rate */
        !            35:     ULONG   rdb_Reserved3[5];
        !            36:     /* logical drive characteristics */
        !            37:     ULONG   rdb_RDBBlocksLo;   /* low block of range reserved for hardblocks */
        !            38:     ULONG   rdb_RDBBlocksHi;   /* high block of range for these hardblocks */
        !            39:     ULONG   rdb_LoCylinder;    /* low cylinder of partitionable disk area */
        !            40:     ULONG   rdb_HiCylinder;    /* high cylinder of partitionable data area */
        !            41:     ULONG   rdb_CylBlocks;     /* number of blocks available per cylinder */
        !            42:     ULONG   rdb_AutoParkSeconds; /* zero for no auto park */
        !            43:     ULONG   rdb_HighRDSKBlock; /* highest block used by RDSK */
        !            44:                                /* (not including replacement bad blocks) */
        !            45:     ULONG   rdb_Reserved4;
        !            46:     /* drive identification */
        !            47:     char    rdb_DiskVendor[8];
        !            48:     char    rdb_DiskProduct[16];
        !            49:     char    rdb_DiskRevision[4];
        !            50:     char    rdb_ControllerVendor[8];
        !            51:     char    rdb_ControllerProduct[16];
        !            52:     char    rdb_ControllerRevision[4];
        !            53:     ULONG   rdb_Reserved5[10];
        !            54: };
        !            55: 
        !            56: #define        IDNAME_RIGIDDISK        0x5244534B      /* 'RDSK' */
        !            57: 
        !            58: #define        RDB_LOCATION_LIMIT      16
        !            59: 
        !            60: #define        RDBFB_LAST      0       /* no disks exist to be configured after */
        !            61: #define        RDBFF_LAST      0x01L   /*   this one on this controller */
        !            62: #define        RDBFB_LASTLUN   1       /* no LUNs exist to be configured greater */
        !            63: #define        RDBFF_LASTLUN   0x02L   /*   than this one at this SCSI Target ID */
        !            64: #define        RDBFB_LASTTID   2       /* no Target IDs exist to be configured */
        !            65: #define        RDBFF_LASTTID   0x04L   /*   greater than this one on this SCSI bus */
        !            66: #define        RDBFB_NORESELECT 3      /* don't bother trying to perform reselection */
        !            67: #define        RDBFF_NORESELECT 0x08L  /*   when talking to this drive */
        !            68: #define        RDBFB_DISKID    4       /* rdb_Disk... identification valid */
        !            69: #define        RDBFF_DISKID    0x10L
        !            70: #define        RDBFB_CTRLRID   5       /* rdb_Controller... identification valid */
        !            71: #define        RDBFF_CTRLRID   0x20L
        !            72:                                /* added 7/20/89 by commodore: */
        !            73: #define RDBFB_SYNCH    6       /* drive supports scsi synchronous mode */
        !            74: #define RDBFF_SYNCH    0x40L   /* CAN BE DANGEROUS TO USE IF IT DOESN'T! */
        !            75: 
        !            76: struct PartitionBlock {
        !            77:     ULONG   pb_ID;             /* 4 character identifier */
        !            78:     ULONG   pb_SummedLongs;    /* size of this checksummed structure */
        !            79:     LONG    pb_ChkSum;         /* block checksum (longword sum to zero) */
        !            80:     ULONG   pb_HostID;         /* SCSI Target ID of host */
        !            81:     ULONG   pb_Next;           /* block number of the next PartitionBlock */
        !            82:     ULONG   pb_Flags;          /* see below for defines */
        !            83:     ULONG   pb_Reserved1[2];
        !            84:     ULONG   pb_DevFlags;       /* preferred flags for OpenDevice */
        !            85:     UBYTE   pb_DriveName[32];  /* preferred DOS device name: BSTR form */
        !            86:                                /* (not used if this name is in use) */
        !            87:     ULONG   pb_Reserved2[15];  /* filler to 32 longwords */
        !            88:     ULONG   pb_Environment[17];        /* environment vector for this partition */
        !            89:     ULONG   pb_EReserved[15];  /* reserved for future environment vector */
        !            90: };
        !            91: 
        !            92: #define        IDNAME_PARTITION        0x50415254      /* 'PART' */
        !            93: 
        !            94: #define        PBFB_BOOTABLE   0       /* this partition is intended to be bootable */
        !            95: #define        PBFF_BOOTABLE   1L      /*   (expected directories and files exist) */
        !            96: #define        PBFB_NOMOUNT    1       /* do not mount this partition (e.g. manually */
        !            97: #define        PBFF_NOMOUNT    2L      /*   mounted, but space reserved here) */
        !            98: 
        !            99: /* this is from <dos/filehandler.h>
        !           100: 
        !           101: #define DE_TABLESIZE   0       /* minimum value is 11 (includes NumBuffers) */
        !           102: #define DE_SIZEBLOCK   1       /* in longwords: standard value is 128 */
        !           103: #define DE_SECORG      2       /* not used; must be 0 */
        !           104: #define DE_NUMHEADS    3       /* # of heads (surfaces). drive specific */
        !           105: #define DE_SECSPERBLK  4       /* not used; must be 1 */
        !           106: #define DE_BLKSPERTRACK 5      /* blocks per track. drive specific */
        !           107: #define DE_RESERVEDBLKS 6      /* unavailable blocks at start.  usually 2 */
        !           108: #define DE_PREFAC      7       /* not used; must be 0 */
        !           109: #define DE_INTERLEAVE  8       /* usually 0 */
        !           110: #define DE_LOWCYL      9       /* starting cylinder. typically 0 */
        !           111: #define DE_UPPERCYL    10      /* max cylinder.  drive specific */
        !           112: #define DE_NUMBUFFERS  11      /* starting # of buffers.  typically 5 */
        !           113: #define DE_MEMBUFTYPE  12      /* type of mem to allocate for buffers. */
        !           114: #define DE_BUFMEMTYPE  12      /* same as above, better name
        !           115:                                 * 1 is public, 3 is chip, 5 is fast */
        !           116: #define DE_MAXTRANSFER 13      /* Max number bytes to transfer at a time */
        !           117: #define DE_MASK                14      /* Address Mask to block out certain memory */
        !           118: #define DE_BOOTPRI     15      /* Boot priority for autoboot */
        !           119: #define DE_DOSTYPE     16      /* ASCII (HEX) string showing filesystem type;
        !           120:                                 * 0X444F5300 is old filesystem,
        !           121:                                 * 0X444F5301 is fast file system */
        !           122: #define DE_BAUD                17      /* Baud rate for serial handler */
        !           123: #define DE_CONTROL     18      /* Control word for handler/filesystem */
        !           124: #define DE_BOOTBLOCKS  19      /* Number of blocks containing boot code */
        !           125: 
        !           126: 
        !           127: /* NEW ! BSD PARTITION TYPES. 
        !           128: 
        !           129:    These are chosen to more or less resemble the original BSD partition
        !           130:    layout, but they don't come too close (we're much more flexible!)
        !           131:    
        !           132:    there's
        !           133:    - a root-partition
        !           134:    - a swap-partition
        !           135:    - user-partitions
        !           136:    
        !           137:    This gives the following layout for the 8 BSD partitions A-H:
        !           138:    
        !           139:    A:  root            (first one found with DOSTYPE_BSD_ROOT)
        !           140:    B:  swap            (first one found with DOSTYPE_BSD_SWAP)
        !           141:    C:  whole disk      (the traditional way to nuke your whole harddisk...)
        !           142:    D-H:        user            (DOSTYPE_BSD_D TO DOSTYPE_BSD_H) */
        !           143: 
        !           144: #define DOSTYPE_BSD_ROOT   'BSDR'
        !           145: #define DOSTYPE_BSD_SWAP   'BSDS'
        !           146: #define DOSTYPE_BSD_D     'BSDD'
        !           147: #define DOSTYPE_BSD_E     'BSDE'
        !           148: #define DOSTYPE_BSD_F     'BSDF'
        !           149: #define DOSTYPE_BSD_G     'BSDG'
        !           150: #define DOSTYPE_BSD_H     'BSDH'
        !           151: 
        !           152: #endif _amiga_rdb_h

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.