Initial import from FreeBSD RELENG_4:
[dragonfly.git] / sys / boot / pc98 / boot2 / 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/boot/pc98/boot2/boot.h,v 1.2 1999/08/28 00:40:25 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
66 /* boot.c */
67 void boot(int drive);
68
69 /* boot2.S */
70 void boot2(void);
71
72 /* disk.c */
73 int devopen(void);
74 void devread(char *iodest, int sector, int cnt);
75
76 /* io.c */
77 void gateA20(void);
78 void printf(const char *format, ...);
79 void putchar(int c);
80 void delay1ms(void);
81 int gets(char *buf);
82 int strcmp(const char *s1, const char *s2);
83 #ifdef CDBOOT
84 int strcasecmp(const char *s1, const char *s2);
85 #endif /* !CDBOOT */
86 void bcopy(const void *from, void *to, size_t len);
87 void twiddle(void);
88 #ifdef PC98
89 void machine_check(void);
90 #endif
91
92 /* probe_keyboard.c */
93 int probe_keyboard(void);
94
95 /* serial.S */
96 void serial_putc(int ch);
97 int serial_getc(void);
98 int serial_ischar(void);
99 void init_serial(void);
100
101 /* sys.c */
102 void xread(char *addr, int size);
103 void read(char *buffer, int count);
104 int openrd(void);
105
106 #ifdef PC98
107 #define V(ra)   (ra - BOOTSEG * 0x10)
108 #endif
109