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