1 /* $OpenBSD: biosdev.h,v 1.5 2015/09/02 01:52:26 yasuoka 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 struct diskinfo; 45 46 /* biosdev.c */ 47 extern const char *biosdevs[]; 48 int biosstrategy(void *, int, daddr32_t, size_t, void *, size_t *); 49 int biosopen(struct open_file *, ...); 50 int biosclose(struct open_file *); 51 int biosioctl(struct open_file *, u_long, void *); 52 int bios_getdiskinfo(int, bios_diskinfo_t *); 53 int biosd_diskio(int, struct diskinfo *, u_int, int, void *); 54 const char * bios_getdisklabel(bios_diskinfo_t *, struct disklabel *); 55 56 /* diskprobe.c */ 57 struct diskinfo *dklookup(int); 58 bios_diskinfo_t *bios_dklookup(int); 59 60 /* bioscons.c */ 61 void pc_probe(struct consdev *); 62 void pc_init(struct consdev *); 63 int pc_getc(dev_t); 64 int pc_getshifts(dev_t); 65 void pc_putc(dev_t, int); 66 void pc_pollc(dev_t, int); 67 void com_probe(struct consdev *); 68 void com_init(struct consdev *); 69 int comspeed(dev_t, int); 70 int com_getc(dev_t); 71 void com_putc(dev_t, int); 72 void com_pollc(dev_t, int); 73