xref: /netbsd-src/sys/dev/dec/dec_boot.h (revision 95e1ffb15694e54f29f8baaa4232152b703c2a5a)
1*95e1ffb1Schristos /*	$NetBSD: dec_boot.h,v 1.7 2005/12/11 12:21:20 christos Exp $	*/
2bd24eacfSmatt 
3bd24eacfSmatt /*
4bd24eacfSmatt  * Copyright (c) 1992, 1993
5bd24eacfSmatt  *	The Regents of the University of California.  All rights reserved.
6bd24eacfSmatt  *
7bd24eacfSmatt  * This code is derived from software contributed to Berkeley by
8bd24eacfSmatt  * Ralph Campbell.
9bd24eacfSmatt  *
10bd24eacfSmatt  * Redistribution and use in source and binary forms, with or without
11bd24eacfSmatt  * modification, are permitted provided that the following conditions
12bd24eacfSmatt  * are met:
13bd24eacfSmatt  * 1. Redistributions of source code must retain the above copyright
14bd24eacfSmatt  *    notice, this list of conditions and the following disclaimer.
15bd24eacfSmatt  * 2. Redistributions in binary form must reproduce the above copyright
16bd24eacfSmatt  *    notice, this list of conditions and the following disclaimer in the
17bd24eacfSmatt  *    documentation and/or other materials provided with the distribution.
18aad01611Sagc  * 3. Neither the name of the University nor the names of its contributors
19bd24eacfSmatt  *    may be used to endorse or promote products derived from this software
20bd24eacfSmatt  *    without specific prior written permission.
21bd24eacfSmatt  *
22bd24eacfSmatt  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23bd24eacfSmatt  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24bd24eacfSmatt  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25bd24eacfSmatt  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26bd24eacfSmatt  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27bd24eacfSmatt  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28bd24eacfSmatt  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29bd24eacfSmatt  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30bd24eacfSmatt  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31bd24eacfSmatt  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32bd24eacfSmatt  * SUCH DAMAGE.
33bd24eacfSmatt  *
34bd24eacfSmatt  *	@(#)dec_boot.h	8.1 (Berkeley) 6/10/93
35bd24eacfSmatt  *
36bd24eacfSmatt  * from: Header: /sprite/src/kernel/dev/RCS/devDiskLabel.h,
37bd24eacfSmatt  *	v 9.4 90/03/01 12:22:36 jhh Exp  SPRITE (Berkeley)
38bd24eacfSmatt  */
39bd24eacfSmatt 
40bd24eacfSmatt #ifndef _DEV_DEC_DEC_BOOT_H_
41bd24eacfSmatt #define _DEV_DEC_DEC_BOOT_H_
42bd24eacfSmatt 
43bd24eacfSmatt /* The following describes the ULTRIX partition tables.
44bd24eacfSmatt  */
45bd24eacfSmatt /*
46bd24eacfSmatt  * DEC_NUM_DISK_PARTS is the number of partitions that are recorded in
47bd24eacfSmatt  * the label information.  The size of the padding in the Dec_DiskLabel
48bd24eacfSmatt  * type is dependent on this number...
49bd24eacfSmatt  */
50bd24eacfSmatt #define DEC_NUM_DISK_PARTS	8
51bd24eacfSmatt 
52bd24eacfSmatt /*
53bd24eacfSmatt  * A disk is divided into partitions and this type specifies where a
54bd24eacfSmatt  * partition starts and how many bytes it contains.
55bd24eacfSmatt  */
56bd24eacfSmatt typedef struct dec_disk_map {
57bd24eacfSmatt 	int32_t	num_blocks;	/* Number of 512 byte blocks in partition. */
58bd24eacfSmatt 	int32_t	start_block;	/* Start of partition in blocks. */
59bd24eacfSmatt } dec_disk_map;
60bd24eacfSmatt 
61bd24eacfSmatt /*
62bd24eacfSmatt  * Label information on the 31st (DEC_LABEL_SECTOR) sector.
63bd24eacfSmatt  */
64bd24eacfSmatt typedef struct dec_disklabel {
65bd24eacfSmatt     u_int8_t	pad0[440];		/* DIFFERENT from sprite!!! */
66bd24eacfSmatt     int32_t	magic;			/* DEC_LABEL_MAGIC */
67bd24eacfSmatt     int32_t	is_partitioned;		/* 1 if disk is partitioned. */
68bd24eacfSmatt     dec_disk_map map[DEC_NUM_DISK_PARTS]; /* Indicates disk partitions. */
69bd24eacfSmatt } dec_disklabel;
70bd24eacfSmatt 
71bd24eacfSmatt #define DEC_LABEL_MAGIC		0x00032957
72bd24eacfSmatt #define DEC_LABEL_SECTOR	31
73bd24eacfSmatt 
74bd24eacfSmatt #endif	/* !_DEV_DEC_DEC_BOOT_H_ */
75