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