Home | History | Annotate | Line # | Download | only in xxboot
      1 /*	$NetBSD: xxboot.h,v 1.6 2025/11/19 09:43:28 nia 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. The name of the author may not be used to endorse or promote products
     16  *    derived from this software without specific prior written permission
     17  *
     18  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     19  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     20  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     21  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     22  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     23  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     24  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     25  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     26  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     27  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     28  */
     29 
     30 #define	BIOS		13
     31 #define	Bconin		0x02
     32 #define	Bconout		0x03
     33 #define	Kbshift		0x0b
     34 #define	XBIOS		14
     35 #define	Floprd		0x08
     36 #define	DMAread		0x2a
     37 #define	NVMaccess	0x2e
     38 
     39 #define	_membot		0x0432
     40 #define	_memtop		0x0436
     41 #define	flock		0x043e
     42 #define	_bootdev	0x0446
     43 #define	_v_bas_ad	0x044e
     44 #define	_hz_200		0x04ba
     45 #define	_drvbits	0x04c2
     46 #define	_sysbase	0x04f2
     47 #define	pun_ptr		0x0516
     48 
     49 #define	daccess		0x8604
     50 #define	dmodus		0x8606
     51 #define	dmahi		0x8609
     52 #define	gpip		0xfa01
     53 
     54 #define	rtcrnr		0x8961
     55 #define	rtcdat		0x8963
     56 #define	BOOTPREF	15
     57 
     58 #define	idesdh		0xfff00019
     59 #define	idedor		0xfff00005
     60 #define	idedr		0xfff00000
     61 #define	idecr		0xfff0001d
     62 #define	idesr		0xfff0001d
     63 #define	idesc		0xfff00009
     64 #define	idesn		0xfff0000d
     65 #define	idecl		0xfff00011
     66 #define	idech		0xfff00015
     67 
     68 /*
     69  * Boot block format (16 * 512 bytes)
     70  *
     71  * - first-stage loader	:  512 bytes
     72  * - magic number	:    4 bytes
     73  * - disk pack label	: 1020 bytes
     74  * - second-stage loader: 6656 bytes
     75  *
     76  * The boot code in ROM loads the first-stage loader, which
     77  * in turn loads the remaining 15 sectors and executes the
     78  * second-stage loader, which runs at address LOADADDR.
     79  */
     80 #define	NSEC		15
     81 #define	LBLSZ		1020
     82 #define	BXXSZ		6656
     83 
     84 #define	BXXST		(LOADADDR)
     85 #define	LBLST		(BXXST-LBLSZ)
     86 
     87 /*
     88  * Miminum/maximum value for the top/bottom  of the memory area
     89  * provided by the BIOS. The 1MB minimum memory limit is enough
     90  * to load a NetBSD kernel, not to run it. ;-) However, memory
     91  * reserved by the BIOS is not available to the boot loaders,
     92  * but will be claimed by the NetBSD kernel.
     93  */
     94 #define	MAXBOT		(LBLST-4)
     95 #define	MINTOP		(MAXBOT+0x100000)
     96