Home | History | Annotate | Line # | Download | only in xxboot
xxboot.h revision 1.3
      1 /*	$NetBSD: xxboot.h,v 1.3 1996/12/26 14:55:16 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	idesdh		0xfff00019
     57 #define	idedor		0xfff00005
     58 #define	idedr		0xfff00000
     59 #define	idecr		0xfff0001d
     60 #define	idesr		0xfff0001d
     61 #define	idesc		0xfff00009
     62 #define	idesn		0xfff0000d
     63 #define	idecl		0xfff00011
     64 #define	idech		0xfff00015
     65 
     66 /*
     67  * Boot block format (16 * 512 bytes)
     68  *
     69  * - first-stage loader	:  512 bytes
     70  * - magic number	:    4 bytes
     71  * - disk pack label	: 1020 bytes
     72  * - second-stage loader: 6656 bytes
     73  *
     74  * The boot code in ROM loads the first-stage loader, which
     75  * in turn loads the remaining 15 sectors and executes the
     76  * second-stage loader, which runs at address LOADADDR.
     77  */
     78 #define	NSEC		15
     79 #define	LBLSZ		1020
     80 #define	BXXSZ		6656
     81 
     82 #define	BXXST		(LOADADDR)
     83 #define	LBLST		(BXXST-LBLSZ)
     84 
     85 /*
     86  * Miminum/maximum value for the top/bottom  of the memory area
     87  * provided by the BIOS. The 1MB minimum memory limit is enough
     88  * to load a NetBSD kernel, not to run it. ;-) However, memory
     89  * reserved by the BIOS is not available to the boot loaders,
     90  * but will be claimed by the NetBSD kernel.
     91  */
     92 #define	MAXBOT		(LBLST-4)
     93 #define	MINTOP		(MAXBOT+0x100000)
     94