1*55140Storek /* 2*55140Storek * Copyright (c) 1992 The Regents of the University of California. 3*55140Storek * All rights reserved. 4*55140Storek * 5*55140Storek * This software was developed by the Computer Systems Engineering group 6*55140Storek * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 7*55140Storek * contributed to Berkeley. 8*55140Storek * 9*55140Storek * %sccs.include.redist.c% 10*55140Storek * 11*55140Storek * @(#)sbusreg.h 7.1 (Berkeley) 07/13/92 12*55140Storek * 13*55140Storek * from: $Header: sbusreg.h,v 1.5 92/06/17 06:59:44 torek Exp $ (LBL) 14*55140Storek */ 15*55140Storek 16*55140Storek /* 17*55140Storek * Sun-4c S-bus definitions. (Should be made generic!) 18*55140Storek * 19*55140Storek * Sbus slot 0 is not a separate slot; it talks to the onboard I/O devices. 20*55140Storek * It is, however, addressed just like any `real' Sbus. 21*55140Storek * 22*55140Storek * Sbus device addresses are obtained from the FORTH PROMs. They come 23*55140Storek * in `absolute' and `relative' address flavors, so we have to handle both. 24*55140Storek * Relative addresses do *not* include the slot number. 25*55140Storek */ 26*55140Storek #define SBUS_BASE 0xf8000000 27*55140Storek #define SBUS_ADDR(slot, off) (SBUS_BASE + ((slot) << 25) + (off)) 28*55140Storek #define SBUS_ABS(a) ((unsigned)(a) >= SBUS_BASE) 29*55140Storek #define SBUS_ABS_TO_SLOT(a) (((a) - SBUS_BASE) >> 25) 30*55140Storek #define SBUS_ABS_TO_OFFSET(a) (((a) - SBUS_BASE) & 0x1ffffff) 31