1 /** $MirOS: src/sys/arch/i386/stand/libsa/biosdev.h,v 1.5 2009/01/11 13:58:07 tg Exp $ */ 2 /* $OpenBSD: biosdev.h,v 1.31 2007/04/27 10:08:34 tom Exp $ */ 3 4 /* 5 * Copyright (c) 1996 Michael Shalayeff 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 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 */ 30 31 #ifndef _MACHINE_LIBSA_BIOSDEV_H 32 #define _MACHINE_LIBSA_BIOSDEV_H 33 34 struct consdev; 35 struct open_file; 36 37 /* biosdev.c */ 38 extern const char *biosdevs[]; 39 int biosstrategy(void *, int, daddr_t, size_t, void *, size_t *); 40 int biosopen(struct open_file *, ...); 41 int biosclose(struct open_file *); 42 int biosioctl(struct open_file *, u_long, void *); 43 int bios_getdiskinfo(int, bios_diskinfo_t *); 44 int biosd_io(int, bios_diskinfo_t *, daddr_t, int, void *); 45 const char * bios_getdisklabel(bios_diskinfo_t *, struct disklabel *); 46 47 /* bioscons.c */ 48 void pc_probe(struct consdev *); 49 void pc_init(struct consdev *); 50 int pc_getc(dev_t); 51 int pc_getshifts(dev_t); 52 void pc_putc(dev_t, int); 53 void pc_pollc(dev_t, int); 54 void com_probe(struct consdev *); 55 void com_init(struct consdev *); 56 int comspeed(dev_t, int); 57 int com_getc(dev_t); 58 void com_putc(dev_t, int); 59 void com_pollc(dev_t, int); 60 61 #endif 62