xxboot.h revision 1.4 1 /* $NetBSD: xxboot.h,v 1.4 1996/12/28 23:37:53 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 _v_bas_ad 0x044e
46 #define _hz_200 0x04ba
47 #define _drvbits 0x04c2
48 #define _sysbase 0x04f2
49 #define pun_ptr 0x0516
50
51 #define daccess 0x8604
52 #define dmodus 0x8606
53 #define dmahi 0x8609
54 #define gpip 0xfa01
55
56 #define rtcrnr 0x8961
57 #define rtcdat 0x8963
58 #define BOOTPREF 15
59
60 #define idesdh 0xfff00019
61 #define idedor 0xfff00005
62 #define idedr 0xfff00000
63 #define idecr 0xfff0001d
64 #define idesr 0xfff0001d
65 #define idesc 0xfff00009
66 #define idesn 0xfff0000d
67 #define idecl 0xfff00011
68 #define idech 0xfff00015
69
70 /*
71 * Boot block format (16 * 512 bytes)
72 *
73 * - first-stage loader : 512 bytes
74 * - magic number : 4 bytes
75 * - disk pack label : 1020 bytes
76 * - second-stage loader: 6656 bytes
77 *
78 * The boot code in ROM loads the first-stage loader, which
79 * in turn loads the remaining 15 sectors and executes the
80 * second-stage loader, which runs at address LOADADDR.
81 */
82 #define NSEC 15
83 #define LBLSZ 1020
84 #define BXXSZ 6656
85
86 #define BXXST (LOADADDR)
87 #define LBLST (BXXST-LBLSZ)
88
89 /*
90 * Miminum/maximum value for the top/bottom of the memory area
91 * provided by the BIOS. The 1MB minimum memory limit is enough
92 * to load a NetBSD kernel, not to run it. ;-) However, memory
93 * reserved by the BIOS is not available to the boot loaders,
94 * but will be claimed by the NetBSD kernel.
95 */
96 #define MAXBOT (LBLST-4)
97 #define MINTOP (MAXBOT+0x100000)
98