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