xref: /netbsd-src/sys/arch/vax/include/rpb.h (revision 6a6027692662ba623e7bf5274322989a7b5d1440)
1*6a602769Sragge /*	$NetBSD: rpb.h,v 1.10 2017/05/22 17:12:11 ragge Exp $ */
2215feb7aSragge /*
3215feb7aSragge  * Copyright (c) 1995 Ludd, University of Lule}, Sweden.
4215feb7aSragge  * All rights reserved.
5215feb7aSragge  *
6215feb7aSragge  * This code is derived from software contributed to Ludd by Bertram Barth.
7215feb7aSragge  *
8215feb7aSragge  * Redistribution and use in source and binary forms, with or without
9215feb7aSragge  * modification, are permitted provided that the following conditions
10215feb7aSragge  * are met:
11215feb7aSragge  * 1. Redistributions of source code must retain the above copyright
12215feb7aSragge  *    notice, this list of conditions and the following disclaimer.
13215feb7aSragge  * 2. Redistributions in binary form must reproduce the above copyright
14215feb7aSragge  *    notice, this list of conditions and the following disclaimer in the
15215feb7aSragge  *    documentation and/or other materials provided with the distribution.
16215feb7aSragge  *
17215feb7aSragge  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18215feb7aSragge  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19215feb7aSragge  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20215feb7aSragge  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21215feb7aSragge  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22215feb7aSragge  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23215feb7aSragge  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24215feb7aSragge  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25215feb7aSragge  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26215feb7aSragge  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27215feb7aSragge  */
2856effcf2Smatt #ifndef _VAX_RPB_H_
2956effcf2Smatt #define _VAX_RPB_H_
30215feb7aSragge 
31215feb7aSragge /*
32215feb7aSragge  * Look at "VAX/VMS Internals and Data Structures" around page 907
33215feb7aSragge  * to get more info about RPB.
34215feb7aSragge  */
35215feb7aSragge 
36215feb7aSragge struct rpb {		/* size		description */
37215feb7aSragge 	struct rpb *rpb_base;	/* 4  physical base address of block */
38dfba8166Smatt 	void  (*rpb_restart)(void);/* 4  physical address of restart routine */
39215feb7aSragge 	long	rpb_chksum;/* 4  checksum of first 31 longwords of restart */
40215feb7aSragge 	long	rpb_rstflg;	/* 4  Restart in progress flag */
41215feb7aSragge 	long	rpb_haltpc;	/* 4  PC at HALT/restart */
42215feb7aSragge 			/* offset: 20 */
43215feb7aSragge 	long	rpb_haltpsl;/* 4  PSL at HALT/restart */
44215feb7aSragge 	long	rpb_haltcode;/* 4  reason for restart */
45215feb7aSragge 	long	rpb_bootr0;/* 24  Saved bootstrap parameters (R0 through R5) */
46215feb7aSragge 	long	rpb_bootr1;
47215feb7aSragge 	long	rpb_bootr2;
48215feb7aSragge 	long	rpb_bootr3;
49215feb7aSragge 	long	rpb_bootr4;
50215feb7aSragge 	long	rpb_bootr5;
51215feb7aSragge 	long	iovec;	/* 4  Address of bootstrap driver */
52215feb7aSragge 	long	iovecsz;/* 4  Size (in bytes) of bootstrap driver */
53215feb7aSragge 			/* offset: 60 */
54215feb7aSragge 	long	fillbn;	/* 4  LBN of seconday bootstrap file */
55215feb7aSragge 	long	filsiz;	/* 4  Size (in blocks) of seconday bootstrap file */
56215feb7aSragge 	long	pfnmap[2];	/* 8  Descriptor of PFN bitmap */
57215feb7aSragge 	long	pfncnt;	/* 4  Count of physical pages */
58215feb7aSragge 			/* offset: 80 */
59215feb7aSragge 	long	svaspt;	/* 4  system virtual address of system page table */
60215feb7aSragge 	long	csrphy;	/* 4  Physical Address of UBA device CSR */
61215feb7aSragge 	long	csrvir;	/* 4  Virtual Address of UBA device CSR */
62215feb7aSragge 	long	adpphy;	/* 4  Physical Address of adapter configurate reg. */
63215feb7aSragge 	long	adpvir;	/* 4  Virtual Address of adapter configurate reg. */
64215feb7aSragge 			/* offset: 100 */
65215feb7aSragge 	short	unit;	/* 2  Bootstrap device unit number */
66215feb7aSragge 	u_char	devtyp;	/* 1  Bootstrap device type code */
67215feb7aSragge 	u_char	slave;	/* 1  Bootstrap device slave unit number */
68215feb7aSragge 	char	file[40];	/* 40  Secondary bootstrap file name */
69215feb7aSragge 	u_char	confreg[16];	/* 16  Byte array of adapter types */
70215feb7aSragge 			/* offset: 160 */
71215feb7aSragge #if 0
72215feb7aSragge 	u_char	hdrpgcnt; /* 1  Count of header pages in 2nd bootstrap image */
73215feb7aSragge 	short	bootndt;/* 2  Type of boot adapter */
74215feb7aSragge 	u_char	flags;	/* 1  Miscellaneous flag bits */
75215feb7aSragge #else
76215feb7aSragge 	long	align;	/* if the compiler doesnt proper alignment */
77215feb7aSragge #endif
78215feb7aSragge 	long	max_pfn;/* 4  Absolute highest PFN */
79215feb7aSragge 	long	sptep;	/* 4  System space PTE prototype register */
80215feb7aSragge 	long	sbr;	/* 4  Saved system base register */
81215feb7aSragge 	long	cpudbvec;/* 4  Physical address of per-CPU database vector */
82215feb7aSragge 			/* offset: 180 */
83215feb7aSragge 	long	cca_addr;	/* 4  Physical address of CCA */
84215feb7aSragge 	long	slr;	/* 4  Saved system length register */
85215feb7aSragge 	long	memdesc[16];	/* 64  Longword array of memory descriptors */
86215feb7aSragge 	long	smp_pc;	/* 4  SMP boot page physical address */
87215feb7aSragge 	long	wait;	/* 4  Bugcheck loop code for attached processor */
88215feb7aSragge 			/* offset: 260 */
89215feb7aSragge 	long	badpgs;	/* 4  Number of bad pages found in memory scan */
90215feb7aSragge 	u_char	ctrlltr;/* 1  Controller letter designation */
91215feb7aSragge 	u_char	scbpagct;	/* 1  SCB page count */
92215feb7aSragge 	u_char	reserved[6];	/* 6  -- */
93215feb7aSragge 	long	vmb_revision;	/* 4  VMB revision label */
94215feb7aSragge };
95215feb7aSragge 
961d90a0a5Sragge /*
971d90a0a5Sragge  * Bootstrap device number encoding.
981d90a0a5Sragge  */
991d90a0a5Sragge #define	BDEV_HP		0
1001d90a0a5Sragge #define	BDEV_RK		1
1011d90a0a5Sragge #define	BDEV_RL		2
1021d90a0a5Sragge #define	BDEV_IDC	3
1031d90a0a5Sragge #define	BDEV_UDA	17
1041d90a0a5Sragge #define	BDEV_TK		18
1051d90a0a5Sragge #define	BDEV_HSC	32
1061d90a0a5Sragge #define	BDEV_KDB	33
1071d90a0a5Sragge #define	BDEV_KRB	34
1081d90a0a5Sragge #define	BDEV_NK		35
1099412f1c4Sragge #define	BDEV_RD		36	/* ST506/MFM disk on HDC9224 */
1109412f1c4Sragge #define	BDEV_ST		37	/* SCSI tape on NCR5380 */
1119412f1c4Sragge #define	BDEV_SD		42	/* SCSI disk on NCR5380 */
11286d5f2d6Sragge #define	BDEV_SDN	46	/* SCSI disk on NCR5394 (VS4000) */
1131d90a0a5Sragge #define	BDEV_CNSL	64
1141d90a0a5Sragge #define	BDEV_QE		96
1151d90a0a5Sragge #define	BDEV_DE		97
1161d90a0a5Sragge #define	BDEV_NI		98
1171d90a0a5Sragge #define	BDEV_LE		99
1187b2ca7e1Sragge #define	BDEV_ZE		100
1191d90a0a5Sragge 
120b57ff30aSragge #ifdef _KERNEL
121215feb7aSragge extern struct rpb rpb;
122b57ff30aSragge #endif
12356effcf2Smatt 
12456effcf2Smatt #endif /* _VAX_RPB_H_ */
125