Home | History | Annotate | Line # | Download | only in include
rpb.h revision 1.7.12.1
      1  1.7.12.1  thorpej /*	$NetBSD: rpb.h,v 1.7.12.1 2002/12/11 06:12:40 thorpej Exp $ */
      2       1.1    ragge /*
      3       1.1    ragge  * Copyright (c) 1995 Ludd, University of Lule}, Sweden.
      4       1.1    ragge  * All rights reserved.
      5       1.1    ragge  *
      6       1.1    ragge  * This code is derived from software contributed to Ludd by Bertram Barth.
      7       1.1    ragge  *
      8       1.1    ragge  * Redistribution and use in source and binary forms, with or without
      9       1.1    ragge  * modification, are permitted provided that the following conditions
     10       1.1    ragge  * are met:
     11       1.1    ragge  * 1. Redistributions of source code must retain the above copyright
     12       1.1    ragge  *    notice, this list of conditions and the following disclaimer.
     13       1.1    ragge  * 2. Redistributions in binary form must reproduce the above copyright
     14       1.1    ragge  *    notice, this list of conditions and the following disclaimer in the
     15       1.1    ragge  *    documentation and/or other materials provided with the distribution.
     16       1.1    ragge  * 3. All advertising materials mentioning features or use of this software
     17       1.1    ragge  *    must display the following acknowledgement:
     18       1.1    ragge  *      This product includes software developed at Ludd, University of
     19       1.1    ragge  *      Lule}, Sweden and its contributors.
     20       1.1    ragge  * 4. The name of the author may not be used to endorse or promote products
     21       1.1    ragge  *    derived from this software without specific prior written permission
     22       1.1    ragge  *
     23       1.1    ragge  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     24       1.1    ragge  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     25       1.1    ragge  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     26       1.1    ragge  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     27       1.1    ragge  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     28       1.1    ragge  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     29       1.1    ragge  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     30       1.1    ragge  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     31       1.1    ragge  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     32       1.1    ragge  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     33       1.1    ragge  */
     34  1.7.12.1  thorpej #ifndef _VAX_RPB_H_
     35  1.7.12.1  thorpej #define _VAX_RPB_H_
     36       1.1    ragge 
     37       1.1    ragge /*
     38       1.1    ragge  * Look at "VAX/VMS Internals and Data Structures" around page 907
     39       1.1    ragge  * to get more info about RPB.
     40       1.1    ragge  */
     41       1.1    ragge 
     42       1.1    ragge struct rpb {		/* size		description */
     43       1.1    ragge 	struct rpb *rpb_base;	/* 4  physical base address of block */
     44       1.5    ragge 	void	(*rpb_restart)/* 4  physical address of restart routine */
     45       1.5    ragge 			__P((void));
     46       1.1    ragge 	long	rpb_chksum;/* 4  checksum of first 31 longwords of restart */
     47       1.1    ragge 	long	rpb_rstflg;	/* 4  Restart in progress flag */
     48       1.1    ragge 	long	rpb_haltpc;	/* 4  PC at HALT/restart */
     49       1.1    ragge 			/* offset: 20 */
     50       1.1    ragge 	long	rpb_haltpsl;/* 4  PSL at HALT/restart */
     51       1.1    ragge 	long	rpb_haltcode;/* 4  reason for restart */
     52       1.1    ragge 	long	rpb_bootr0;/* 24  Saved bootstrap parameters (R0 through R5) */
     53       1.1    ragge 	long	rpb_bootr1;
     54       1.1    ragge 	long	rpb_bootr2;
     55       1.1    ragge 	long	rpb_bootr3;
     56       1.1    ragge 	long	rpb_bootr4;
     57       1.1    ragge 	long	rpb_bootr5;
     58       1.1    ragge 	long	iovec;	/* 4  Address of bootstrap driver */
     59       1.1    ragge 	long	iovecsz;/* 4  Size (in bytes) of bootstrap driver */
     60       1.1    ragge 			/* offset: 60 */
     61       1.1    ragge 	long	fillbn;	/* 4  LBN of seconday bootstrap file */
     62       1.1    ragge 	long	filsiz;	/* 4  Size (in blocks) of seconday bootstrap file */
     63       1.1    ragge 	long	pfnmap[2];	/* 8  Descriptor of PFN bitmap */
     64       1.1    ragge 	long	pfncnt;	/* 4  Count of physical pages */
     65       1.1    ragge 			/* offset: 80 */
     66       1.1    ragge 	long	svaspt;	/* 4  system virtual address of system page table */
     67       1.1    ragge 	long	csrphy;	/* 4  Physical Address of UBA device CSR */
     68       1.1    ragge 	long	csrvir;	/* 4  Virtual Address of UBA device CSR */
     69       1.1    ragge 	long	adpphy;	/* 4  Physical Address of adapter configurate reg. */
     70       1.1    ragge 	long	adpvir;	/* 4  Virtual Address of adapter configurate reg. */
     71       1.1    ragge 			/* offset: 100 */
     72       1.1    ragge 	short	unit;	/* 2  Bootstrap device unit number */
     73       1.1    ragge 	u_char	devtyp;	/* 1  Bootstrap device type code */
     74       1.1    ragge 	u_char	slave;	/* 1  Bootstrap device slave unit number */
     75       1.1    ragge 	char	file[40];	/* 40  Secondary bootstrap file name */
     76       1.1    ragge 	u_char	confreg[16];	/* 16  Byte array of adapter types */
     77       1.1    ragge 			/* offset: 160 */
     78       1.1    ragge #if 0
     79       1.1    ragge 	u_char	hdrpgcnt; /* 1  Count of header pages in 2nd bootstrap image */
     80       1.1    ragge 	short	bootndt;/* 2  Type of boot adapter */
     81       1.1    ragge 	u_char	flags;	/* 1  Miscellaneous flag bits */
     82       1.1    ragge #else
     83       1.1    ragge 	long	align;	/* if the compiler doesnt proper alignment */
     84       1.1    ragge #endif
     85       1.1    ragge 	long	max_pfn;/* 4  Absolute highest PFN */
     86       1.1    ragge 	long	sptep;	/* 4  System space PTE prototype register */
     87       1.1    ragge 	long	sbr;	/* 4  Saved system base register */
     88       1.1    ragge 	long	cpudbvec;/* 4  Physical address of per-CPU database vector */
     89       1.1    ragge 			/* offset: 180 */
     90       1.1    ragge 	long	cca_addr;	/* 4  Physical address of CCA */
     91       1.1    ragge 	long	slr;	/* 4  Saved system length register */
     92       1.1    ragge 	long	memdesc[16];	/* 64  Longword array of memory descriptors */
     93       1.1    ragge 	long	smp_pc;	/* 4  SMP boot page physical address */
     94       1.1    ragge 	long	wait;	/* 4  Bugcheck loop code for attached processor */
     95       1.1    ragge 			/* offset: 260 */
     96       1.1    ragge 	long	badpgs;	/* 4  Number of bad pages found in memory scan */
     97       1.1    ragge 	u_char	ctrlltr;/* 1  Controller letter designation */
     98       1.1    ragge 	u_char	scbpagct;	/* 1  SCB page count */
     99       1.1    ragge 	u_char	reserved[6];	/* 6  -- */
    100       1.1    ragge 	long	vmb_revision;	/* 4  VMB revision label */
    101       1.1    ragge };
    102       1.3    ragge 
    103       1.3    ragge /*
    104       1.3    ragge  * Bootstrap device number encoding.
    105       1.3    ragge  */
    106       1.3    ragge #define	BDEV_HP		0
    107       1.3    ragge #define	BDEV_RK		1
    108       1.3    ragge #define	BDEV_RL		2
    109       1.3    ragge #define	BDEV_IDC	3
    110       1.3    ragge #define	BDEV_UDA	17
    111       1.3    ragge #define	BDEV_TK		18
    112       1.3    ragge #define	BDEV_HSC	32
    113       1.3    ragge #define	BDEV_KDB	33
    114       1.3    ragge #define	BDEV_KRB	34
    115       1.3    ragge #define	BDEV_NK		35
    116       1.4    ragge #define	BDEV_RD		36	/* ST506/MFM disk on HDC9224 */
    117       1.4    ragge #define	BDEV_ST		37	/* SCSI tape on NCR5380 */
    118       1.4    ragge #define	BDEV_SD		42	/* SCSI disk on NCR5380 */
    119       1.7    ragge #define	BDEV_SDN	46	/* SCSI disk on NCR5394 (VS4000) */
    120       1.3    ragge #define	BDEV_CNSL	64
    121       1.3    ragge #define	BDEV_QE		96
    122       1.3    ragge #define	BDEV_DE		97
    123       1.3    ragge #define	BDEV_NI		98
    124       1.3    ragge #define	BDEV_LE		99
    125       1.6    ragge #define	BDEV_ZE		100
    126       1.1    ragge 
    127       1.2    ragge #ifdef _KERNEL
    128       1.1    ragge extern struct rpb rpb;
    129       1.2    ragge #endif
    130  1.7.12.1  thorpej 
    131  1.7.12.1  thorpej #endif /* _VAX_RPB_H_ */
    132