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