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.2 1998/08/31 21:10:43 msmith Exp $
| 26 * $Id: libi386.h,v 1.3 1998/09/03 02:10:09 msmith 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, char *devspec, 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 */ 67extern void vpbcopy(void *src, vm_offset_t dest, size_t size); 68extern void pvbcopy(vm_offset_t src, void *dest, size_t size); 69extern void pbzero(vm_offset_t dest, size_t size); 70extern vm_offset_t vtophys(void *addr); 71 72extern int i386_copyin(void *src, vm_offset_t dest, size_t len); 73extern int i386_copyout(vm_offset_t src, void *dest, size_t len); 74extern int i386_readin(int fd, vm_offset_t dest, size_t len); 75 76extern void startprog(vm_offset_t entry, int argc, u_int32_t *argv, vm_offset_t stack); 77
| 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, char *devspec, 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 */ 67extern void vpbcopy(void *src, vm_offset_t dest, size_t size); 68extern void pvbcopy(vm_offset_t src, void *dest, size_t size); 69extern void pbzero(vm_offset_t dest, size_t size); 70extern vm_offset_t vtophys(void *addr); 71 72extern int i386_copyin(void *src, vm_offset_t dest, size_t len); 73extern int i386_copyout(vm_offset_t src, void *dest, size_t len); 74extern int i386_readin(int fd, vm_offset_t dest, size_t len); 75 76extern void startprog(vm_offset_t entry, int argc, u_int32_t *argv, vm_offset_t stack); 77
|
78extern void delay(int delay);
| |
79extern int getbasemem(void); 80extern int getextmem(void); 81 82extern void reboot(void); 83extern void gateA20(void); 84 85extern int i386_autoload(void); 86 87extern int bi_getboothowto(char *kargs); 88extern vm_offset_t bi_copyenv(vm_offset_t addr);
| 78extern int getbasemem(void); 79extern int getextmem(void); 80 81extern void reboot(void); 82extern void gateA20(void); 83 84extern int i386_autoload(void); 85 86extern int bi_getboothowto(char *kargs); 87extern vm_offset_t bi_copyenv(vm_offset_t addr);
|