1/*- 2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 *
| 1/*- 2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 *
|
26 * $Id: libi386.h,v 1.5 1998/09/17 23:52:10 msmith Exp $
| 26 * $Id: libi386.h,v 1.6 1998/09/26 10:51:38 dfr Exp $
|
27 */ 28 29 30/* 31 * i386 fully-qualified device descriptor. 32 * Note, this must match the 'struct devdesc' declaration 33 * in bootstrap.h. 34 */ 35struct i386_devdesc 36{ 37 struct devsw *d_dev; 38 int d_type; 39 union 40 { 41 struct 42 { 43 int unit; 44 int slice; 45 int partition; 46 void *data; 47 } biosdisk; 48 struct 49 { 50 int unit; /* XXX net layer lives over these? */ 51 } netif; 52 } d_kind; 53}; 54 55extern int i386_getdev(void **vdev, const char *devspec, const char **path); 56extern char *i386_fmtdev(void *vdev); 57extern int i386_setcurrdev(struct env_var *ev, int flags, void *value); 58 59extern struct devdesc currdev; /* our current device */ 60 61#define MAXDEV 31 /* maximum number of distinct devices */ 62 63/* exported devices XXX rename? */ 64extern struct devsw biosdisk; 65
| 27 */ 28 29 30/* 31 * i386 fully-qualified device descriptor. 32 * Note, this must match the 'struct devdesc' declaration 33 * in bootstrap.h. 34 */ 35struct i386_devdesc 36{ 37 struct devsw *d_dev; 38 int d_type; 39 union 40 { 41 struct 42 { 43 int unit; 44 int slice; 45 int partition; 46 void *data; 47 } biosdisk; 48 struct 49 { 50 int unit; /* XXX net layer lives over these? */ 51 } netif; 52 } d_kind; 53}; 54 55extern int i386_getdev(void **vdev, const char *devspec, const char **path); 56extern char *i386_fmtdev(void *vdev); 57extern int i386_setcurrdev(struct env_var *ev, int flags, void *value); 58 59extern struct devdesc currdev; /* our current device */ 60 61#define MAXDEV 31 /* maximum number of distinct devices */ 62 63/* exported devices XXX rename? */ 64extern struct devsw biosdisk; 65
|
66/* from crt module */ 67#if 0 /* BTX */ 68extern void vpbcopy(void *src, vm_offset_t dest, size_t size); 69extern void pvbcopy(vm_offset_t src, void *dest, size_t size); 70extern void pbzero(vm_offset_t dest, size_t size); 71extern vm_offset_t vtophys(void *addr); 72#endif
| 66extern int bd_bios2unit(int biosdev); /* xlate BIOS device -> biosdisk unit */ 67extern int bd_unit2bios(int unit); /* xlate biosdisk unit -> BIOS device */ 68extern int bd_getdev(struct i386_devdesc *dev); /* return dev_t for (dev) */
|
73 74extern int i386_copyin(void *src, vm_offset_t dest, size_t len); 75extern int i386_copyout(vm_offset_t src, void *dest, size_t len); 76extern int i386_readin(int fd, vm_offset_t dest, size_t len); 77
| 69 70extern int i386_copyin(void *src, vm_offset_t dest, size_t len); 71extern int i386_copyout(vm_offset_t src, void *dest, size_t len); 72extern int i386_readin(int fd, vm_offset_t dest, size_t len); 73
|
78#if 0 /* BTX */ 79extern void startprog(vm_offset_t entry, int argc, u_int32_t *argv, vm_offset_t stack); 80#endif 81
| |
82extern int getbasemem(void); 83extern int getextmem(void); 84extern vm_offset_t memtop; 85 86extern void gateA20(void); 87 88extern int i386_autoload(void); 89 90extern int bi_getboothowto(char *kargs); 91extern vm_offset_t bi_copyenv(vm_offset_t addr); 92 93/* 94 * BIOS functions from bioscalls.c 95 */ 96extern int BIOS_cominit(int port); 97extern int BIOS_computc(int c, int port); 98extern int BIOS_comgetc(int port); 99extern int BIOS_comisc(int port); 100extern int BIOS_diskinfo_old(int drive, int *param); 101 102
| 74extern int getbasemem(void); 75extern int getextmem(void); 76extern vm_offset_t memtop; 77 78extern void gateA20(void); 79 80extern int i386_autoload(void); 81 82extern int bi_getboothowto(char *kargs); 83extern vm_offset_t bi_copyenv(vm_offset_t addr); 84 85/* 86 * BIOS functions from bioscalls.c 87 */ 88extern int BIOS_cominit(int port); 89extern int BIOS_computc(int c, int port); 90extern int BIOS_comgetc(int port); 91extern int BIOS_comisc(int port); 92extern int BIOS_diskinfo_old(int drive, int *param); 93 94
|