[BACK]Return to disklabel.h CVS log [TXT][DIR] Up to [local] / sys / arch / mvme68k / include

Annotation of sys/arch/mvme68k/include/disklabel.h, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: disklabel.h,v 1.11 2007/06/20 18:15:45 deraadt Exp $  */
                      2:
                      3: /*
                      4:  * Copyright (c) 1996 Nivas Madhur
                      5:  * Copyright (c) 1995 Dale Rahn.
                      6:  * All rights reserved.
                      7:  *
                      8:  * Redistribution and use in source and binary forms, with or without
                      9:  * modification, are permitted provided that the following conditions
                     10:  * are met:
                     11:  * 1. Redistributions of source code must retain the above copyright
                     12:  *    notice, this list of conditions and the following disclaimer.
                     13:  * 2. Redistributions in binary form must reproduce the above copyright
                     14:  *    notice, this list of conditions and the following disclaimer in the
                     15:  *    documentation and/or other materials provided with the distribution.
                     16:  * 3. The name of the author may not be used to endorse or promote products
                     17:  *    derived from this software without specific prior written permission.
                     18:  *
                     19:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
                     20:  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
                     21:  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
                     22:  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
                     23:  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
                     24:  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
                     25:  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
                     26:  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     27:  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
                     28:  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
                     29:  */
                     30:
                     31: #ifndef _MVME68K_DISKLABEL_H_
                     32: #define _MVME68K_DISKLABEL_H_
                     33:
                     34: #define LABELSECTOR     0                       /* sector containing label */
                     35: #define LABELOFFSET    0                       /* offset of label in sector */
                     36: #define MAXPARTITIONS  16                      /* number of partitions */
                     37:
                     38: /*
                     39:  * a mvmedisklabel is a disklabel that the bug (prom) can understand
                     40:  * and live with.   the bug works in terms of 256 byte blocks.   in our
                     41:  * case the first two bug blocks make up the mvmedisklabel (which is 512
                     42:  * bytes [i.e. one sector] in length).
                     43:  *
                     44:  * we use a fixed layout the BSD disk structure (in 256 byte blocks):
                     45:  *   block 0  = the volume ID block  (part of mvmedisklabel)
                     46:  *   block 1  = media configuration area (part of mvmedisklabel)
                     47:  *   block 2  = start of first level OS bootstrap (continues ...)
                     48:  *   block 31 = end of OS bootstrap
                     49:  *   block 32 = BSD filesystem superblock
                     50:  *
                     51:  * this gives us 30 blocks (30*256 = 7680 bytes) for the bootstrap's text+data
                     52:  *
                     53:  * disksubr.c translates between mvmedisklabel and BSD disklabel.
                     54:  *
                     55:  * Note: this structure is exactly 512 bytes in size. If you move fields
                     56:  * around, make sure the various members are properly aligned and the
                     57:  * compiler won't do any additional padding.
                     58:  */
                     59: struct mvmedisklabel {
                     60:        /* VID */
                     61:        u_char          vid_id[4];
                     62:        u_char          vid_0[16];
                     63:        u_int           vid_oss;
                     64:        u_short         vid_osl;
                     65:        u_char          vid_1[4];
                     66:        u_short         vid_osa_u;
                     67:        u_short         vid_osa_l;
                     68:        u_char          version;
                     69:        u_char          vid_2[1];
                     70:        u_short         checksum;       /* 2 */
                     71:        u_short         partitions;
                     72:        u_char          vid_vd[16];
                     73:        u_long          bbsize;
                     74:        u_long          magic1;         /* 4 */
                     75:        u_short         type;           /* 2 */
                     76:        u_short         subtype;        /* 2 */
                     77:        u_char          packname[16];   /* 16 */
                     78:        u_long          flags;          /* 4 */
                     79:        u_long          drivedata[5];   /* 4 */
                     80:        u_long          spare[5];       /* 4 */
                     81:
                     82:        u_long          secpercyl;      /* 4 */
                     83:        u_long          secperunit;     /* 4 */
                     84:        u_long          headswitch;     /* 4 */
                     85:
                     86:        u_char          vid_3[4];
                     87:        u_int           vid_cas;
                     88:        u_char          vid_cal;
                     89:        u_char          vid_4_0[3];
                     90:        u_char          vid_4[64];
                     91:        u_char          vid_4_1[28];
                     92:        u_long          sbsize;
                     93:        u_char          vid_mot[8];
                     94:
                     95:        /* CFG */
                     96:        u_char          cfg_0[4];
                     97:        u_short         cfg_atm;
                     98:        u_short         cfg_prm;
                     99:        u_short         cfg_atw;
                    100:        u_short         cfg_rec;
                    101:
                    102:        u_short         sparespertrack;
                    103:        u_short         sparespercyl;
                    104:        u_long          acylinders;
                    105:        u_short         rpm;
                    106:        u_short         cylskew;
                    107:
                    108:        u_char          cfg_spt;
                    109:        u_char          cfg_hds;
                    110:        u_short         cfg_trk;
                    111:        u_char          cfg_ilv;
                    112:        u_char          cfg_sof;
                    113:        u_short         cfg_psm;
                    114:        u_short         cfg_shd;
                    115:        u_char          cfg_2[2];
                    116:        u_short         cfg_pcom;
                    117:        u_char          cfg_3;
                    118:        u_char          cfg_ssr;
                    119:        u_short         cfg_rwcc;
                    120:        u_short         cfg_ecc;
                    121:        u_short         cfg_eatm;
                    122:        u_short         cfg_eprm;
                    123:        u_short         cfg_eatw;
                    124:        u_char          cfg_gpb1;
                    125:        u_char          cfg_gpb2;
                    126:        u_char          cfg_gpb3;
                    127:        u_char          cfg_gpb4;
                    128:        u_char          cfg_ssc;
                    129:        u_char          cfg_runit;
                    130:        u_short         cfg_rsvc1;
                    131:        u_short         cfg_rsvc2;
                    132:        u_long          magic2;
                    133:        u_char          cfg_4[192];
                    134: };
                    135: #endif /* _MVME68K_DISKLABEL_H_ */

CVSweb