4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 1995 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #ifndef _SYS_FDMEDIA_H
28 #define _SYS_FDMEDIA_H
30 #pragma ident "%W% %E% SMI"
37 * Default names for label
39 static char deflabel_35
[] = {
40 "3.5\" floppy cyl %d alt 0 hd %d sec %d"
42 static char deflabel_525
[] = {
43 "5.25\" floppy cyl %d alt 0 hd %d sec %d"
47 * default characteristics
49 static struct fdattr fdtypes
[] = {
50 { /* [0] = struct fdattr fdattr_5H */
51 360, /* rotational speed */
52 1, /* interleave factor */
53 0x1B, /* gap 3 length */
54 0x54 /* format gap 3 length */
56 { /* [1] = struct fdattr fdattr_5Q */
57 300, /* rotational speed */
58 1, /* interleave factor */
59 0x1B, /* gap 3 length */
60 0x54 /* format gap 3 length */
62 { /* [2] = struct fdattr fdattr_5D9 */
63 300, /* rotational speed */
64 1, /* interleave factor */
65 0x2A, /* gap 3 length */
66 0x50 /* format gap 3 length */
68 { /* [3] = struct fdattr fdattr_5D8 */
69 300, /* rotational speed */
70 1, /* interleave factor */
71 0x2A, /* gap 3 length */
72 0x50 /* format gap 3 length */
74 { /* [4] = struct fdattr fdattr_5D4 */
75 300, /* rotational speed */
76 1, /* interleave factor */
77 0x80, /* gap 3 length */
78 0xF0 /* format gap 3 length */
80 { /* [5] = struct fdattr fdattr_5D16 */
81 300, /* rotational speed */
82 1, /* interleave factor */
83 0x20, /* gap 3 length */
84 0x32 /* format gap 3 length */
86 { /* [6] = struct fdattr fdattr_3E */
87 300, /* rotational speed */
88 1, /* interleave factor */
89 0x1B, /* gap 3 length */
90 0x53 /* format gap 3 length */
92 { /* [7] = struct fdattr fdattr_3H */
93 300, /* rotational speed */
94 1, /* interleave factor */
95 0x1B, /* gap 3 length */
96 0x6C /* format gap 3 length */
98 { /* [8] = struct fdattr fdattr_3I */
99 300, /* rotational speed */
100 1, /* interleave factor */
101 4, /* gap 3 length */
102 12 /* format gap 3 length */
104 { /* [9] = struct fdattr fdattr_3M */
105 360, /* rotational speed */
106 1, /* interleave factor */
107 0x35, /* gap 3 length */
108 0x74 /* format gap 3 length */
110 { /* [10] = struct fdattr fdattr_3D */
111 300, /* rotational speed */
112 1, /* interleave factor */
113 0x1B, /* gap 3 length */
114 0x50 /* format gap 3 length */
118 static int nfdtypes
= sizeof (fdtypes
) / sizeof (fdtypes
[0]);
121 static struct fd_char dfc_80x36
= {
123 1000, /* transfer rate */
124 80, /* number of cylinders */
125 2, /* number of heads */
126 512, /* sector size */
127 36, /* sectors per track */
128 1, /* # steps per data track */
130 static struct fd_char dfc_80x21
= {
132 500, /* transfer rate */
133 80, /* number of cylinders */
134 2, /* number of heads */
135 512, /* sector size */
136 21, /* sectors per track */
137 1, /* # steps per data track */
139 static struct fd_char dfc_80x18
= {
141 500, /* transfer rate */
142 80, /* number of cylinders */
143 2, /* number of heads */
144 512, /* sector size */
145 18, /* sectors per track */
146 1, /* # steps per data track */
148 static struct fd_char dfc_80x15
= {
150 500, /* transfer rate */
151 80, /* number of cylinders */
152 2, /* number of heads */
153 512, /* sector size */
154 15, /* sectors per track */
155 1, /* # steps per data track */
157 static struct fd_char dfc_80x9
= {
159 250, /* transfer rate */
160 80, /* number of cylinders */
161 2, /* number of heads */
162 512, /* sector size */
163 9, /* sectors per track */
164 1, /* # steps per data track */
166 static struct fd_char dfc_77x8
= {
168 500, /* transfer rate */
169 77, /* number of cylinders */
170 2, /* number of heads */
171 1024, /* sector size */
172 8, /* sectors per track */
173 1, /* # steps per data track */
175 static struct fd_char dfc_40x16
= {
177 250, /* transfer rate */
178 40, /* number of cylinders */
179 2, /* number of heads */
180 256, /* sector size */
181 16, /* sectors per track */
182 1, /* # steps per data track */
184 static struct fd_char dfc_40x9
= {
186 250, /* transfer rate */
187 40, /* number of cylinders */
188 2, /* number of heads */
189 512, /* sector size */
190 9, /* sectors per track */
191 1, /* # steps per data track */
193 static struct fd_char dfc_40x8
= {
195 250, /* transfer rate */
196 40, /* number of cylinders */
197 2, /* number of heads */
198 512, /* sector size */
199 8, /* sectors per track */
200 1, /* # steps per data track */
202 static struct fd_char dfc_40x4
= {
204 250, /* transfer rate */
205 40, /* number of cylinders */
206 2, /* number of heads */
207 1024, /* sector size */
208 4, /* sectors per track */
209 1, /* # steps per data track */
212 static struct fd_char
*defchar
[] = {
213 &dfc_80x15
, /* FMT_5H */
214 &dfc_80x9
, /* FMT_5Q */
215 &dfc_40x9
, /* FMT_5D9 */
216 &dfc_40x8
, /* FMT_5D8 */
217 &dfc_40x4
, /* FMT_5D4 */
218 &dfc_40x16
, /* FMT_5D16 */
219 &dfc_80x36
, /* FMT_3E */
220 &dfc_80x18
, /* FMT_3H */
221 &dfc_80x21
, /* FMT_3I */
222 &dfc_77x8
, /* FMT_3M */
223 &dfc_80x9
/* FMT_3D */
227 static struct fd_drive dfd_350ED
= {
228 0, /* ejectable, does the drive support eject? */
229 4, /* maxsearch, size of per-unit search table */
230 0, /* cyl to start write precompensation */
231 80, /* cyl to start reducing write current */
232 1, /* step width pulse in 1 us units */
233 30, /* step rate in 100 us units */
234 150, /* head settle delay, in 100 us units */
235 150, /* head load delay, in 100 us units */
236 2560, /* head unload delay, in 100 us units */
237 3, /* motor on delay, in 100 ms units */
238 20, /* motor off delay, in 100 ms units */
239 65, /* precomp level, bit shift, in nano-secs */
240 0, /* pins, defines meaning of pin 1, 2, 4, and 34 */
241 0, /* flags, TRUE READY, Starting Sector #, & Motor On */
243 static struct fd_drive dfd_350HD
= {
244 0, /* ejectable, does the drive support eject? */
245 4, /* maxsearch, size of per-unit search table */
246 0, /* cyl to start write prcompensation */
247 80, /* cyl to start reducing write current */
248 1, /* step width pulse in 1 us units */
249 30, /* step rate in 100 us units */
250 150, /* head settle delay, in 100 us units */
251 150, /* head load delay, in 100 us units */
252 2560, /* head unload delay, in 100 us units */
253 3, /* motor on delay, in 100 ms units */
254 20, /* motor off delay, in 100 ms units */
255 125, /* precomp level, bit shift, in nano-secs */
256 0, /* pins, defines meaning of pin 1, 2, 4, and 34 */
257 0, /* flags, TRUE READY, Starting Sector #, & Motor On */
259 static struct fd_drive dfd_525HD
= {
260 0, /* ejectable, does the drive support eject? */
261 6, /* maxsearch, size of per-unit search table */
262 43, /* cyl to start write prcompensation */
263 80, /* cyl to start reducing write current */
264 1, /* step width pulse in 1 us units */
265 30, /* step rate in 100 us units */
266 150, /* head settle delay, in 100 us units */
267 150, /* head load delay, in 100 us units */
268 2560, /* head unload delay, in 100 us units */
269 5, /* motor on delay, in 100 ms units */
270 20, /* motor off delay, in 100 ms units */
271 175, /* precomp level, bit shift, in nano-secs */
272 0, /* pins, defines meaning of pin 1, 2, 4, and 34 */
273 0, /* flags, TRUE READY, Starting Sector #, & Motor On */
275 static struct fd_drive dfd_525DD
= {
276 0, /* ejectable, does the drive support eject? */
277 4, /* maxsearch, size of per-unit search table */
278 22, /* cyl to start write prcompensation */
279 40, /* cyl to start reducing write current */
280 1, /* step width pulse in 1 us units */
281 60, /* step rate in 100 us units */
282 150, /* head settle delay, in 100 us units */
283 150, /* head load delay, in 100 us units */
284 2560, /* head unload delay, in 100 us units */
285 5, /* motor on delay, in 100 ms units */
286 20, /* motor off delay, in 100 ms units */
287 250, /* precomp level, bit shift, in nano-secs */
288 0, /* pins, defines meaning of pin 1, 2, 4, and 34 */
289 0, /* flags, TRUE READY, Starting Sector #, & Motor On */
293 * Default partition maps
295 static struct partition dpt_80x36
[NDKMAP
] = {
296 { 0, 0, 0, 79*2*36 }, /* part 0 - all but last cyl */
297 { 0, 0, 79*2*36, 1*2*36 }, /* part 1 - just the last cyl */
298 { 0, 0, 0, 80*2*36 }, /* part 2 - "the whole thing" */
299 { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
300 { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }
302 static struct partition dpt_80x21
[NDKMAP
] = {
303 { 0, 0, 0, 79*2*21 }, /* part 0 - all but last cyl */
304 { 0, 0, 79*2*21, 1*2*21 }, /* part 1 - just the last cyl */
305 { 0, 0, 0, 80*2*21 }, /* part 2 - "the whole thing" */
306 { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
307 { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }
309 static struct partition dpt_80x18
[NDKMAP
] = {
310 { 0, 0, 0, 79*2*18 }, /* part 0 - all but last cyl */
311 { 0, 0, 79*2*18, 1*2*18 }, /* part 1 - just the last cyl */
312 { 0, 0, 0, 80*2*18 }, /* part 2 - "the whole thing" */
313 { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
314 { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }
316 static struct partition dpt_80x15
[NDKMAP
] = {
317 { 0, 0, 0, 79*2*15 }, /* part 0 - all but last cyl */
318 { 0, 0, 79*2*15, 1*2*15 }, /* part 1 - just the last cyl */
319 { 0, 0, 0, 80*2*15 }, /* part 2 - "the whole thing" */
320 { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
321 { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }
323 static struct partition dpt_80x9
[NDKMAP
] = {
324 { 0, 0, 0, 79*2*9 }, /* part 0 - all but last cyl */
325 { 0, 0, 79*2*9, 1*2*9 }, /* part 1 - just the last cyl */
326 { 0, 0, 0, 80*2*9 }, /* part 2 - "the whole thing" */
327 { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
328 { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }
330 static struct partition dpt_77x8
[NDKMAP
] = {
331 /* double number of blocks since sector size is 1024 */
332 { 0, 0, 0, 76*2*8*2 }, /* part 0 - all but last cyl */
333 { 0, 0, 76*2*8*2, 1*2*8*2 }, /* part 1 - just the last cyl */
334 { 0, 0, 0, 77*2*8*2 }, /* part 2 - "the whole thing" */
335 { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
336 { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }
338 static struct partition dpt_40x16
[NDKMAP
] = {
339 /* halve number of blocks since sector size is 256 */
340 { 0, 0, 0, 39*2*16/2 }, /* part 0 - all but last cyl */
341 { 0, 0, 39*2*16/2, 1*2*16/2 }, /* part 1 - just the last cyl */
342 { 0, 0, 0, 40*2*16/2 }, /* part 2 - "the whole thing" */
343 { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
344 { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }
346 static struct partition dpt_40x9
[NDKMAP
] = {
347 { 0, 0, 0, 39*2*9 }, /* part 0 - all but last cyl */
348 { 0, 0, 39*2*9, 1*2*9 }, /* part 1 - just the last cyl */
349 { 0, 0, 0, 40*2*9 }, /* part 2 - "the whole thing" */
350 { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
351 { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }
353 static struct partition dpt_40x8
[NDKMAP
] = {
354 /* double number of blocks since sector size is 1024 */
355 { 0, 0, 0, 39*2*8*2 }, /* part 0 - all but last cyl */
356 { 0, 0, 39*2*8*2, 1*2*8*2 }, /* part 1 - just the last cyl */
357 { 0, 0, 0, 40*2*8*2 }, /* part 2 - "the whole thing" */
358 { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
359 { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }
361 static struct partition dpt_40x4
[NDKMAP
] = {
362 { 0, 0, 0, 39*2*4 }, /* part 0 - all but last cyl */
363 { 0, 0, 39*2*4, 1*2*4 }, /* part 1 - just the last cyl */
364 { 0, 0, 0, 40*2*4 }, /* part 2 - "the whole thing" */
365 { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
366 { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }
369 static struct partition
*fdparts
[] = {
370 dpt_80x15
, /* FMT_5H */
371 dpt_80x9
, /* FMT_5Q */
372 dpt_40x9
, /* FMT_5D9 */
373 dpt_40x8
, /* FMT_5D8 */
374 dpt_40x4
, /* FMT_5D4 */
375 dpt_40x16
, /* FMT_5D16 */
376 dpt_80x36
, /* FMT_3E */
377 dpt_80x18
, /* FMT_3H */
378 dpt_80x21
, /* FMT_3I */
379 dpt_77x8
, /* FMT_3M */
380 dpt_80x9
/* FMT_3D */
387 #endif /* !_SYS_FDMEDIA_H */