Annotation of sys/arch/i386/stand/libsa/biosdev.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: biosdev.h,v 1.31 2007/04/27 10:08:34 tom Exp $ */
2:
3: /*
4: * Copyright (c) 1996 Michael Shalayeff
5: * All rights reserved.
6: *
7: * Redistribution and use in source and binary forms, with or without
8: * modification, are permitted provided that the following conditions
9: * are met:
10: * 1. Redistributions of source code must retain the above copyright
11: * notice, this list of conditions and the following disclaimer.
12: * 2. Redistributions in binary form must reproduce the above copyright
13: * notice, this list of conditions and the following disclaimer in the
14: * documentation and/or other materials provided with the distribution.
15: *
16: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26: * SUCH DAMAGE.
27: *
28: */
29:
30: /*
31: * Extension support bitmap definition (returned by 41h)
32: */
33: #define EXT_BM_EDA 0x01 /* Extended disk access functions */
34: /* (42h-44h, 47h and 48h) supported. */
35: #define EXT_BM_RDC 0x02 /* Removable drive controller functions */
36: /* (45h, 46h, 48h, 49h and INT 15 52h) */
37: /* supported. */
38: #define EXT_BM_EDD 0x04 /* Enhanced disk drive functions */
39: /* (48h and 4eh) supported. */
40: #define EXT_BM_RSV 0xf8 /* Reserved (0) */
41:
42: struct consdev;
43: struct open_file;
44:
45: /* biosdev.c */
46: extern const char *biosdevs[];
47: int biosstrategy(void *, int, daddr_t, size_t, void *, size_t *);
48: int biosopen(struct open_file *, ...);
49: int biosclose(struct open_file *);
50: int biosioctl(struct open_file *, u_long, void *);
51: int bios_getdiskinfo(int, bios_diskinfo_t *);
52: int biosd_io(int, bios_diskinfo_t *, daddr_t, int, void *);
53: const char * bios_getdisklabel(bios_diskinfo_t *, struct disklabel *);
54:
55: /* diskprobe.c */
56: struct diskinfo *dklookup(int);
57: bios_diskinfo_t *bios_dklookup(int);
58:
59: /* bioscons.c */
60: void pc_probe(struct consdev *);
61: void pc_init(struct consdev *);
62: int pc_getc(dev_t);
63: int pc_getshifts(dev_t);
64: void pc_putc(dev_t, int);
65: void pc_pollc(dev_t, int);
66: void com_probe(struct consdev *);
67: void com_init(struct consdev *);
68: int comspeed(dev_t, int);
69: int com_getc(dev_t);
70: void com_putc(dev_t, int);
71: void com_pollc(dev_t, int);
CVSweb