xxboot.h revision 1.1 1 /* $NetBSD: xxboot.h,v 1.1 1996/02/29 11:36:49 leo Exp $ */
2
3 /*
4 * Copyright (c) 1995 Waldi Ravens
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by Waldi Ravens.
18 * 4. The name of the author may not be used to endorse or promote products
19 * derived from this software without specific prior written permission
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33 #define BIOS 13
34 #define Bconin 0x02
35 #define Bconout 0x03
36 #define Kbshift 0x0b
37 #define XBIOS 14
38 #define Floprd 0x08
39 #define DMAread 0x2a
40
41 #define _membot 0x0432
42 #define _memtop 0x0436
43 #define flock 0x043e
44 #define _bootdev 0x0446
45 #define _hz_200 0x04ba
46 #define _drvbits 0x04c2
47 #define _sysbase 0x04f2
48 #define pun_ptr 0x0516
49
50 #define daccess 0x8604
51 #define dmodus 0x8606
52 #define dmahi 0x8609
53 #define gpip 0xfa01
54
55 #define idesdh 0xfff00019
56 #define idedor 0xfff00005
57 #define idedr 0xfff00000
58 #define idecr 0xfff0001d
59 #define idesr 0xfff0001d
60 #define idesc 0xfff00009
61 #define idesn 0xfff0000d
62 #define idecl 0xfff00011
63 #define idech 0xfff00015
64
65 /*
66 * Boot block format (16 * 512 bytes)
67 *
68 * - first-stage loader : 512 bytes
69 * - magic number : 4 bytes
70 * - disk pack label : 1020 bytes
71 * - second-stage loader: 6656 bytes
72 *
73 * The boot code in ROM loads the first-stage loader, which
74 * in turn loads the remaining 15 sectors and executes the
75 * second-stage loader, which runs at address LOADADDR.
76 */
77 #define NSEC 15
78 #define LBLSZ 1020
79 #define BXXSZ 6656
80
81 #define BXXST (LOADADDR)
82 #define LBLST (BXXST-LBLSZ)
83
84 /*
85 * Miminum/maximum value for the top/bottom of the memory area
86 * provided by the BIOS. The 1MB minimum memory limit is enough
87 * to load a NetBSD kernel, not to run it. ;-) However, memory
88 * reserved by the BIOS is not available to the boot loaders,
89 * but will be claimed by the NetBSD kernel.
90 */
91 #define MAXBOT (LBLST-4)
92 #define MINTOP (MAXBOT+0x100000)
93