xref: /original-bsd/sys/vax/stand/savax.h (revision d6141097)
1 /*	savax.h	4.3	82/07/15	*/
2 
3 /*
4  * Standalone definitions peculiar to vaxen
5  * The mba devices in the standalone system are addressed as
6  *	xx(unit,section)
7  * where unit is
8  *	8*mbanum+drive
9  * The mbadrv macro gives the address of the device registers
10  * for the specified unit; the mbamba macro gives the address of the
11  * mba registers themselves.
12  *
13  * The uba devices are also addressed by giving, as unit,
14  *	8*ubanum+drive
15  * The ubamem macro converts a specified unibus address (ala pdp-11)
16  * into a unibus memory address space address.
17  */
18 
19 int	cpu;		/* see <sys/cpu.h> */
20 
21 #define	MAXNMBA	4
22 struct	mba_regs **mbaddr;
23 int	mbaact;
24 caddr_t	*umaddr;
25 struct	uba_regs **ubaddr;
26 
27 #define	UNITTOMBA(unit)		((unit)>>3)
28 #define	UNITTODRIVE(unit)	((unit)&07)
29 
30 #define	mbamba(unit)		(mbaddr[UNITTOMBA(unit)])
31 #define	mbadrv(unit) 		(&mbamba(unit)->mba_drv[UNITTODRIVE(unit)])
32 
33 #define	UNITTOUBA(unit)		((unit)>>3)
34 #define	ubauba(unit)		(ubaddr[UNITTOUBA(unit)])
35 #define	ubamem(unit, off)	((umaddr[UNITTOUBA(unit)]+ubdevreg(off)))
36