Initial import from FreeBSD RELENG_4:
[dragonfly.git] / sys / platform / pc32 / 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  */
29
30 #include <sys/param.h>
31 #include <sys/time.h>
32
33 #include <ufs/ffs/fs.h>
34 #include <ufs/ufs/quota.h>
35 #include <ufs/ufs/inode.h>
36
37 #define RB_DUAL         0x40000         /* XXX */
38 #define RB_PROBEKBD     0x80000         /* XXX */
39
40 extern char *devs[];
41 extern char *name;
42 extern struct fs *fs;
43 extern struct inode inode;
44 extern int dosdev, unit, slice, part, maj, boff, poff;
45 extern unsigned tw_chars;
46 extern int loadflags;
47 extern struct disklabel disklabel;
48
49 /* asm.S */
50 #if ASM_ONLY
51 void real_to_prot(void);
52 void prot_to_real(void);
53 #endif
54 void startprog(unsigned int physaddr, int howto, int bootdev,
55                /* XXX struct bootinfo * */ unsigned int bootinfo);
56 void pcpy(const void *src, void *dst, size_t count);
57
58 /* bios.S */
59 int biosread(int dev, int cyl, int head, int sec, int nsec, void *offset);
60 void putc(int c);
61 int getc(void);
62 int ischar(void);
63 int get_diskinfo(int drive);
64 int memsize(int extended);
65 void vesa_mode(int mode);
66
67 /* boot.c */
68 void boot(int drive);
69
70 /* boot2.S */
71 void boot2(void);
72
73 /* disk.c */
74 int devopen(void);
75 void devread(char *iodest, int sector, int cnt);
76
77 /* io.c */
78 void gateA20(void);
79 void printf(const char *format, ...);
80 void putchar(int c);
81 void delay1ms(void);
82 int gets(char *buf);
83 int strcmp(const char *s1, const char *s2);
84 #ifdef CDBOOT
85 int strcasecmp(const char *s1, const char *s2);
86 #endif /* !CDBOOT */
87 void bcopy(const void *from, void *to, size_t len);
88 void twiddle(void);
89
90 /* probe_keyboard.c */
91 int probe_keyboard(void);
92
93 /* serial.S */
94 void serial_putc(int ch);
95 int serial_getc(void);
96 int serial_ischar(void);
97 void init_serial(void);
98
99 /* sys.c */
100 void xread(char *addr, int size);
101 void read(char *buffer, int count);
102 int openrd(void);