xref: /csrg-svn/sys/vax/stand/savax.h (revision 25440)
123241Smckusick /*
223241Smckusick  * Copyright (c) 1982 Regents of the University of California.
323241Smckusick  * All rights reserved.  The Berkeley software License Agreement
423241Smckusick  * specifies the terms and conditions for redistribution.
523241Smckusick  *
6*25440Skarels  *	@(#)savax.h	6.4 (Berkeley) 11/08/85
723241Smckusick  */
83266Swnj 
93266Swnj /*
103266Swnj  * Standalone definitions peculiar to vaxen
113266Swnj  * The mba devices in the standalone system are addressed as
123266Swnj  *	xx(unit,section)
133266Swnj  * where unit is
143266Swnj  *	8*mbanum+drive
153266Swnj  * The mbadrv macro gives the address of the device registers
163266Swnj  * for the specified unit; the mbamba macro gives the address of the
173266Swnj  * mba registers themselves.
183266Swnj  *
193266Swnj  * The uba devices are also addressed by giving, as unit,
203266Swnj  *	8*ubanum+drive
213266Swnj  * The ubamem macro converts a specified unibus address (ala pdp-11)
223266Swnj  * into a unibus memory address space address.
233266Swnj  */
243266Swnj 
253266Swnj int	cpu;		/* see <sys/cpu.h> */
263266Swnj 
273266Swnj #define	MAXNMBA	4
2816854Skarels #define	MAXNUBA	4
293266Swnj struct	mba_regs **mbaddr;
303266Swnj int	mbaact;
313266Swnj caddr_t	*umaddr;
323266Swnj struct	uba_regs **ubaddr;
333266Swnj 
343266Swnj #define	UNITTOMBA(unit)		((unit)>>3)
353266Swnj #define	UNITTODRIVE(unit)	((unit)&07)
363266Swnj 
373266Swnj #define	mbamba(unit)		(mbaddr[UNITTOMBA(unit)])
383266Swnj #define	mbadrv(unit) 		(&mbamba(unit)->mba_drv[UNITTODRIVE(unit)])
393266Swnj 
403266Swnj #define	UNITTOUBA(unit)		((unit)>>3)
413266Swnj #define	ubauba(unit)		(ubaddr[UNITTOUBA(unit)])
427446Sroot #define	ubamem(unit, off)	((umaddr[UNITTOUBA(unit)]+ubdevreg(off)))
4311364Ssam 
4411364Ssam #define	PHYSUBA0	0x20006000
4511364Ssam #define	PHYSMBA0	0x20010000
4611364Ssam #define	PHYSMBA1	0x20012000
4711364Ssam #define	PHYSUMEM	0x2013e000
48*25440Skarels 
49*25440Skarels /*
50*25440Skarels  * RM03/5 (4-byte header plus CRC) format information:
51*25440Skarels  * codes for sector header word 1
52*25440Skarels  */
53*25440Skarels #define	HDR1_FMT22	0x1000	/* standard 16 bit format */
54*25440Skarels #define	HDR1_OKSCT	0xc000	/* sector ok */
55*25440Skarels #define	HDR1_SSF	0x2000	/* skip sector flag */
56