4e3f75d9038bf79ec7f9fd203d6f5ab6828dcae6
[dragonfly.git] / sys / i386 / boot / biosboot / boot.h
1 /*
2  * Mach Operating System
3  * Copyright (c) 1992, 1991 Carnegie Mellon University
4  * All Rights Reserved.
5  *
6  * Permission to use, copy, modify and distribute this software and its
7  * documentation is hereby granted, provided that both the copyright
8  * notice and this permission notice appear in all copies of the
9  * software, derivative works or modified versions, and any portions
10  * thereof, and that both notices appear in supporting documentation.
11  *
12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15  *
16  * Carnegie Mellon requests users of this software to return to
17  *
18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
19  *  School of Computer Science
20  *  Carnegie Mellon University
21  *  Pittsburgh PA 15213-3890
22  *
23  * any improvements or extensions that they make and grant Carnegie Mellon
24  * the rights to redistribute these changes.
25  *
26  *      from: Mach, Revision 2.2  92/04/04  11:35:03  rpd
27  * $FreeBSD: src/sys/i386/boot/biosboot/boot.h,v 1.25 1999/08/28 00:43:12 peter Exp $
28  * $DragonFly: src/sys/i386/boot/biosboot/Attic/boot.h,v 1.3 2003/08/07 21:17:20 dillon Exp $
29  */
30
31 #include <sys/param.h>
32 #include <sys/time.h>
33
34 #include <vfs/ufs/fs.h>
35 #include <vfs/ufs/quota.h>
36 #include <vfs/ufs/inode.h>
37
38 #define RB_DUAL         0x40000         /* XXX */
39 #define RB_PROBEKBD     0x80000         /* XXX */
40
41 extern char *devs[];
42 extern char *name;
43 extern struct fs *fs;
44 extern struct inode inode;
45 extern int dosdev, unit, slice, part, maj, boff, poff;
46 extern unsigned tw_chars;
47 extern int loadflags;
48 extern struct disklabel disklabel;
49
50 /* asm.S */
51 #if ASM_ONLY
52 void real_to_prot(void);
53 void prot_to_real(void);
54 #endif
55 void startprog(unsigned int physaddr, int howto, int bootdev,
56                /* XXX struct bootinfo * */ unsigned int bootinfo);
57 void pcpy(const void *src, void *dst, size_t count);
58
59 /* bios.S */
60 int biosread(int dev, int cyl, int head, int sec, int nsec, void *offset);
61 void putc(int c);
62 int getc(void);
63 int ischar(void);
64 int get_diskinfo(int drive);
65 int memsize(int extended);
66 void vesa_mode(int mode);
67
68 /* boot.c */
69 void boot(int drive);
70
71 /* boot2.S */
72 void boot2(void);
73
74 /* disk.c */
75 int devopen(void);
76 void devread(char *iodest, int sector, int cnt);
77
78 /* io.c */
79 void gateA20(void);
80 void printf(const char *format, ...);
81 void putchar(int c);
82 void delay1ms(void);
83 int gets(char *buf);
84 int strcmp(const char *s1, const char *s2);
85 #ifdef CDBOOT
86 int strcasecmp(const char *s1, const char *s2);
87 #endif /* !CDBOOT */
88 void bcopy(const void *from, void *to, size_t len);
89 void twiddle(void);
90
91 /* probe_keyboard.c */
92 int probe_keyboard(void);
93
94 /* serial.S */
95 void serial_putc(int ch);
96 int serial_getc(void);
97 int serial_ischar(void);
98 void init_serial(void);
99
100 /* sys.c */
101 void xread(char *addr, int size);
102 void read(char *buffer, int count);
103 int openrd(void);