123241Smckusick /* 229309Smckusick * Copyright (c) 1982, 1986 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*30547Skarels * @(#)savax.h 7.2 (Berkeley) 02/21/87 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 27*30547Skarels #define MAXNMBA 8 28*30547Skarels #define MAXNUBA 8 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)]) 42*30547Skarels #define ubamem(unit, off) (umaddr[UNITTOUBA(unit)] + \ 43*30547Skarels (0760000 | ubdevreg(off))) 4411364Ssam 4525440Skarels /* 4625440Skarels * RM03/5 (4-byte header plus CRC) format information: 4725440Skarels * codes for sector header word 1 4825440Skarels */ 4925440Skarels #define HDR1_FMT22 0x1000 /* standard 16 bit format */ 5025440Skarels #define HDR1_OKSCT 0xc000 /* sector ok */ 5125440Skarels #define HDR1_SSF 0x2000 /* skip sector flag */ 52