2 * Mach Operating System
3 * Copyright (c) 1992, 1991 Carnegie Mellon University
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.
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.
16 * Carnegie Mellon requests users of this software to return to
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
26 * from: Mach, Revision 2.2 92/04/04 11:35:03 rpd
27 * $FreeBSD: src/sys/i386/boot/cdboot/boot.h,v 1.3 1999/08/28 00:43:17 peter Exp $
30 * Extensions for El Torito CD-ROM booting:
32 * Copyright © 1997 Pluto Technologies International, Inc. Boulder CO
33 * Copyright © 1997 interface business GmbH, Dresden.
34 * All rights reserved.
36 * This code has been written by Jörg Wunsch, Dresden.
37 * Direct comments to <joerg_wunsch@interface-business.de>.
39 * Redistribution and use in source and binary forms, with or without
40 * modification, are permitted provided that the following conditions
42 * 1. Redistributions of source code must retain the above copyright
43 * notice, this list of conditions and the following disclaimer.
44 * 2. Redistributions in binary form must reproduce the above copyright
45 * notice, this list of conditions and the following disclaimer in the
46 * documentation and/or other materials provided with the distribution.
48 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
49 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
50 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
51 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
52 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
53 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
54 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
55 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
56 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
57 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
58 * POSSIBILITY OF SUCH DAMAGE.
61 #include <sys/param.h>
65 * Specification packet per El Torito, BIOS int 0x13 fn 0x4b00/0x4b01
69 u_char size; /* must be 0x13 */
77 u_char drvno; /* emulated drive number */
78 u_char ctrlindx; /* controller index, see El Torito */
79 u_int32_t lba; /* LBA of emulated disk drive */
80 u_int16_t devspec; /* device specification, see El Torito */
81 u_int16_t ubufseg; /* user buffer segment */
82 u_int16_t loadseg; /* load segment; 0 => use BIOS default 0x7c0 */
83 u_int16_t seccnt; /* number of auto-loaded (virtual) sectors */
84 u_char cyls; /* same values as in int 0x13, fn 8 */
90 * Disk address packet for extended BIOS int 0x13 fn's 0x41...0x48.
94 u_char size; /* size of daddrpacket, must be 0x10 */
97 * number of 512-byte blocks to transfer,
101 u_int16_t boffs; /* bseg:boffs denominate the transfer buffer */
103 u_int32_t lba; /* actually a 64-bit type, but 64-bit arith */
104 u_int32_t lbahigh; /* is expensive, and we don't really need it */
108 # define DPRINTF(x) printf x
116 void real_to_prot(void);
117 void prot_to_real(void);
119 void startprog(unsigned int physaddr, int howto, int bootdev,
120 /* XXX struct bootinfo * */ unsigned int bootinfo);
121 void pbzero(void *dst, size_t count);
122 void pcpy(const void *src, void *dst, size_t count);
126 int biosread(int dev, int cyl, int head, int sec, int nsec, void *offset);
127 int getbootspec(struct specpacket *offset);
128 int biosreadlba(struct daddrpacket *daddr);
132 int get_diskinfo(int drive);
133 int memsize(int extended);
136 extern int loadflags;
138 void boot(int drive);
144 extern u_int32_t sessionstart;
146 int devopen(u_int32_t session);
147 void seek(u_int32_t offs);
148 int read(u_char *addr, size_t size);
149 int xread(u_char *addr, size_t size);
150 int openrd(char *name);
154 void printf(const char *format, ...);
158 int strcasecmp(const char *s1, const char *s2);
159 int strcmp(const char *s1, const char *s2);
160 void bcopy(const void *from, void *to, size_t len);
163 /* probe_keyboard.c */
164 int probe_keyboard(void);
167 void serial_putc(int ch);
168 int serial_getc(void);
169 int serial_ischar(void);
170 void init_serial(void);
174 extern unsigned long tw_chars;
177 void *malloc(size_t size);
178 void free(void *chunk);