Home | History | Annotate | Line # | Download | only in dev
sbusreg.h revision 1.1
      1  1.1  eeh /*	$NetBSD: sbusreg.h,v 1.1 1998/06/20 04:58:51 eeh Exp $ */
      2  1.1  eeh 
      3  1.1  eeh /*
      4  1.1  eeh  * Copyright (c) 1992, 1993
      5  1.1  eeh  *	The Regents of the University of California.  All rights reserved.
      6  1.1  eeh  *
      7  1.1  eeh  * This software was developed by the Computer Systems Engineering group
      8  1.1  eeh  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
      9  1.1  eeh  * contributed to Berkeley.
     10  1.1  eeh  *
     11  1.1  eeh  * All advertising materials mentioning features or use of this software
     12  1.1  eeh  * must display the following acknowledgement:
     13  1.1  eeh  *	This product includes software developed by the University of
     14  1.1  eeh  *	California, Lawrence Berkeley Laboratory.
     15  1.1  eeh  *
     16  1.1  eeh  * Redistribution and use in source and binary forms, with or without
     17  1.1  eeh  * modification, are permitted provided that the following conditions
     18  1.1  eeh  * are met:
     19  1.1  eeh  * 1. Redistributions of source code must retain the above copyright
     20  1.1  eeh  *    notice, this list of conditions and the following disclaimer.
     21  1.1  eeh  * 2. Redistributions in binary form must reproduce the above copyright
     22  1.1  eeh  *    notice, this list of conditions and the following disclaimer in the
     23  1.1  eeh  *    documentation and/or other materials provided with the distribution.
     24  1.1  eeh  * 3. All advertising materials mentioning features or use of this software
     25  1.1  eeh  *    must display the following acknowledgement:
     26  1.1  eeh  *	This product includes software developed by the University of
     27  1.1  eeh  *	California, Berkeley and its contributors.
     28  1.1  eeh  * 4. Neither the name of the University nor the names of its contributors
     29  1.1  eeh  *    may be used to endorse or promote products derived from this software
     30  1.1  eeh  *    without specific prior written permission.
     31  1.1  eeh  *
     32  1.1  eeh  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     33  1.1  eeh  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     34  1.1  eeh  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     35  1.1  eeh  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     36  1.1  eeh  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     37  1.1  eeh  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     38  1.1  eeh  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     39  1.1  eeh  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     40  1.1  eeh  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     41  1.1  eeh  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     42  1.1  eeh  * SUCH DAMAGE.
     43  1.1  eeh  *
     44  1.1  eeh  *	@(#)sbusreg.h	8.1 (Berkeley) 6/11/93
     45  1.1  eeh  */
     46  1.1  eeh 
     47  1.1  eeh /*
     48  1.1  eeh  * Sun-4c S-bus definitions.  (Should be made generic!)
     49  1.1  eeh  *
     50  1.1  eeh  * Sbus slot 0 is not a separate slot; it talks to the onboard I/O devices.
     51  1.1  eeh  * It is, however, addressed just like any `real' Sbus.
     52  1.1  eeh  *
     53  1.1  eeh  * Sbus device addresses are obtained from the FORTH PROMs.  They come
     54  1.1  eeh  * in `absolute' and `relative' address flavors, so we have to handle both.
     55  1.1  eeh  * Relative addresses do *not* include the slot number.
     56  1.1  eeh  */
     57  1.1  eeh #define	SBUS_BASE		0xf8000000
     58  1.1  eeh #define	SBUS_ADDR(slot, off)	(SBUS_BASE + ((slot) << 25) + (off))
     59  1.1  eeh #define	SBUS_ABS(a)		((unsigned)(a) >= SBUS_BASE)
     60  1.1  eeh #define	SBUS_ABS_TO_SLOT(a)	(((a) - SBUS_BASE) >> 25)
     61  1.1  eeh #define	SBUS_ABS_TO_OFFSET(a)	(((a) - SBUS_BASE) & 0x1ffffff)
     62  1.1  eeh 
     63  1.1  eeh /*
     64  1.1  eeh  * Sun4u S-bus definitions.  Here's where we deal w/the machine
     65  1.1  eeh  * dependencies of sysio.
     66  1.1  eeh  *
     67  1.1  eeh  * SYSIO implements or is the interface to several things:
     68  1.1  eeh  *
     69  1.1  eeh  * o The SBUS interface itself
     70  1.1  eeh  * o The IOMMU
     71  1.1  eeh  * o The DVMA units
     72  1.1  eeh  * o The interrupt controller
     73  1.1  eeh  * o The counter/timers
     74  1.1  eeh  *
     75  1.1  eeh  * Since it has registers to control lots of different things
     76  1.1  eeh  * as well as several on-board SBUS devices and external SBUS
     77  1.1  eeh  * slots scattered throughout its address space, it's a pain.
     78  1.1  eeh  *
     79  1.1  eeh  * One good point, however, is that all registers are 64-bit.
     80  1.1  eeh  */
     81  1.1  eeh 
     82  1.1  eeh struct sysioreg {
     83  1.1  eeh 	struct upareg {
     84  1.1  eeh 		u_int64_t	upa_portid;		/* UPA port ID register */		/* 1fe.0000.0000 */
     85  1.1  eeh 		u_int64_t	upa_config;		/* UPA config register */		/* 1fe.0000.0008 */
     86  1.1  eeh 	} sys_upa;
     87  1.1  eeh 
     88  1.1  eeh 	u_int64_t	sys_csr;		/* SYSIO control/status register */	/* 1fe.0000.0010 */
     89  1.1  eeh 	u_int64_t	pad0;
     90  1.1  eeh 	u_int64_t	sys_ecccr;		/* ECC control register */		/* 1fe.0000.0020 */
     91  1.1  eeh 	u_int64_t	reserved;							/* 1fe.0000.0028 */
     92  1.1  eeh 	u_int64_t	sys_ue_afsr;		/* Uncorrectable Error AFSR */		/* 1fe.0000.0030 */
     93  1.1  eeh 	u_int64_t	sys_ue_afar;		/* Uncorrectable Error AFAR */		/* 1fe.0000.0038 */
     94  1.1  eeh 	u_int64_t	sys_ce_afsr;		/* Correctable Error AFSR */		/* 1fe.0000.0040 */
     95  1.1  eeh 	u_int64_t	sys_ce_afar;		/* Correctable Error AFAR */		/* 1fe.0000.0048 */
     96  1.1  eeh 
     97  1.1  eeh 	u_int64_t	pad1[22];
     98  1.1  eeh 
     99  1.1  eeh 	struct perfmon {
    100  1.1  eeh 		u_int64_t	pm_cr;			/* Performance monitor control reg */	/* 1fe.0000.0100 */
    101  1.1  eeh 		u_int64_t	pm_count;		/* Performance monitor counter reg */	/* 1fe.0000.0108 */
    102  1.1  eeh 	} sys_pm;
    103  1.1  eeh 
    104  1.1  eeh 	u_int64_t	pad2[990];
    105  1.1  eeh 
    106  1.1  eeh 	struct sbusreg {
    107  1.1  eeh 		u_int64_t	sbus_cr;		/* SBUS Control Register */		/* 1fe.0000.2000 */
    108  1.1  eeh 		u_int64_t	reserved;							/* 1fe.0000.2008 */
    109  1.1  eeh 		u_int64_t	sbus_afsr;		/* SBUS AFSR */				/* 1fe.0000.2010 */
    110  1.1  eeh 		u_int64_t	sbus_afar;		/* SBUS AFAR */				/* 1fe.0000.2018 */
    111  1.1  eeh 		u_int64_t	sbus_config0;	/* SBUS Slot 0 config register */	/* 1fe.0000.2020 */
    112  1.1  eeh 		u_int64_t	sbus_config1;	/* SBUS Slot 1 config register */	/* 1fe.0000.2028 */
    113  1.1  eeh 		u_int64_t	sbus_config2;	/* SBUS Slot 2 config register */	/* 1fe.0000.2030 */
    114  1.1  eeh 		u_int64_t	sbus_config3;	/* SBUS Slot 3 config register */	/* 1fe.0000.2038 */
    115  1.1  eeh 		u_int64_t	sbus_config13;	/* Slot 13 config register <audio> */	/* 1fe.0000.2040 */
    116  1.1  eeh 		u_int64_t	sbus_config14;	/* Slot 14 config register <macio> */	/* 1fe.0000.2048 */
    117  1.1  eeh 		u_int64_t	sbus_config15;	/* Slot 15 config register <slavio> */	/* 1fe.0000.2050 */
    118  1.1  eeh 	} sys_sbus;
    119  1.1  eeh 
    120  1.1  eeh 	u_int64_t	pad3[117];
    121  1.1  eeh 
    122  1.1  eeh 	struct iommureg {
    123  1.1  eeh 		u_int64_t	iommu_cr;	/* IOMMU control register */		/* 1fe.0000.2400 */
    124  1.1  eeh #define IOMMUCR_TSB1K		0x000000000000000000LL	/* Nummber of entries in IOTSB */
    125  1.1  eeh #define IOMMUCR_TSB2K		0x000000000000010000LL
    126  1.1  eeh #define IOMMUCR_TSB4K		0x000000000000020000LL
    127  1.1  eeh #define IOMMUCR_TSB8K		0x000000000000030000LL
    128  1.1  eeh #define IOMMUCR_TSB16K		0x000000000000040000LL
    129  1.1  eeh #define IOMMUCR_TSB32K		0x000000000000050000LL
    130  1.1  eeh #define IOMMUCR_TSB64K		0x000000000000060000LL
    131  1.1  eeh #define IOMMUCR_TSB128K		0x000000000000070000LL
    132  1.1  eeh #define IOMMUCR_8KPG		0x000000000000000000LL	/* 8K iommu page size */
    133  1.1  eeh #define IOMMUCR_64KPG		0x000000000000000004LL	/* 64K iommu page size */
    134  1.1  eeh #define IOMMUCR_DE		0x000000000000000002LL	/* Diag enable */
    135  1.1  eeh #define IOMMUCR_EN		0x000000000000000001LL	/* Enable IOMMU */
    136  1.1  eeh 		u_int64_t	iommu_tsb;	/* IOMMU TSB base register */		/* 1fe.0000.2408 */
    137  1.1  eeh 		u_int64_t	iommu_flush;	/* IOMMU flush register */		/* 1fe.0000.2410 */
    138  1.1  eeh 	} sys_iommu;
    139  1.1  eeh 
    140  1.1  eeh 	u_int64_t	pad4[125];
    141  1.1  eeh 
    142  1.1  eeh 	struct strbuf {
    143  1.1  eeh 		u_int64_t	strbuf_ctl;		/* streaming buffer control reg */	/* 1fe.0000.2800 */
    144  1.1  eeh #define STRBUF_EN		0x000000000000000001LL
    145  1.1  eeh #define STRBUF_D		0x000000000000000002LL
    146  1.1  eeh 		u_int64_t	strbuf_pgflush;		/* streaming buffer page flush */	/* 1fe.0000.2808 */
    147  1.1  eeh 		u_int64_t	strbuf_flushsync;	/* streaming buffer flush sync */	/* 1fe.0000.2810 */
    148  1.1  eeh 	} sys_strbuf;
    149  1.1  eeh 
    150  1.1  eeh 	u_int64_t	pad5[125];
    151  1.1  eeh 
    152  1.1  eeh 	u_int64_t	sbus_slot0_int;		/* SBUS slot 0 interrupt map reg */	/* 1fe.0000.2c00 */
    153  1.1  eeh 	u_int64_t	sbus_slot1_int;		/* SBUS slot 1 interrupt map reg */	/* 1fe.0000.2c08 */
    154  1.1  eeh 	u_int64_t	sbus_slot2_int;		/* SBUS slot 2 interrupt map reg */	/* 1fe.0000.2c10 */
    155  1.1  eeh 	u_int64_t	sbus_slot3_int;		/* SBUS slot 3 interrupt map reg */	/* 1fe.0000.2c18 */
    156  1.1  eeh 	u_int64_t	intr_retry;		/* interrupt retry timer reg */		/* 1fe.0000.2c20 */
    157  1.1  eeh 
    158  1.1  eeh 	u_int64_t	pad6[123];
    159  1.1  eeh 
    160  1.1  eeh 	u_int64_t	scsi_int_map;		/* SCSI interrupt map reg */		/* 1fe.0000.3000 */
    161  1.1  eeh 	u_int64_t	ether_int_map;		/* ethernet interrupt map reg */	/* 1fe.0000.3008 */
    162  1.1  eeh 	u_int64_t	bpp_int_map;		/* parallel interrupt map reg */	/* 1fe.0000.3010 */
    163  1.1  eeh 	u_int64_t	audio_int_map;		/* audio interrupt map reg */		/* 1fe.0000.3018 */
    164  1.1  eeh 	u_int64_t	power_int_map;		/* power fail interrupt map reg */	/* 1fe.0000.3020 */
    165  1.1  eeh 	u_int64_t	ser_kbd_ms_int_map;	/* serial/kbd/mouse interrupt map reg *//* 1fe.0000.3028 */
    166  1.1  eeh 	u_int64_t	fd_int_map;		/* floppy interrupt map reg */		/* 1fe.0000.3030 */
    167  1.1  eeh 	u_int64_t	therm_int_map;		/* thermal warn interrupt map reg */	/* 1fe.0000.3038 */
    168  1.1  eeh 	u_int64_t	kbd_int_map;		/* kbd [unused] interrupt map reg */	/* 1fe.0000.3040 */
    169  1.1  eeh 	u_int64_t	mouse_int_map;		/* mouse [unused] interrupt map reg */	/* 1fe.0000.3048 */
    170  1.1  eeh 	u_int64_t	serial_int_map;		/* second serial interrupt map reg */	/* 1fe.0000.3050 */
    171  1.1  eeh 	u_int64_t	pad7;
    172  1.1  eeh 	u_int64_t	timer0_int_map;		/* timer 0 interrupt map reg */		/* 1fe.0000.3060 */
    173  1.1  eeh 	u_int64_t	timer1_int_map;		/* timer 1 interrupt map reg */		/* 1fe.0000.3068 */
    174  1.1  eeh 	u_int64_t	ue_int_map;		/* UE interrupt map reg */		/* 1fe.0000.3070 */
    175  1.1  eeh 	u_int64_t	ce_int_map;		/* CE interrupt map reg */		/* 1fe.0000.3078 */
    176  1.1  eeh 	u_int64_t	sbus_async_int_map;	/* SBUS error interrupt map reg */	/* 1fe.0000.3080 */
    177  1.1  eeh 	u_int64_t	pwrmgt_int_map;		/* power mgmt wake interrupt map reg */	/* 1fe.0000.3088 */
    178  1.1  eeh 	u_int64_t	upagr_int_map;		/* UPA graphics interrupt map reg */	/* 1fe.0000.3090 */
    179  1.1  eeh 	u_int64_t	reserved_int_map;	/* reserved interrupt map reg */	/* 1fe.0000.3098 */
    180  1.1  eeh 
    181  1.1  eeh 	u_int64_t	pad8[108];
    182  1.1  eeh 
    183  1.1  eeh 	/* Note: clear interrupt 0 registers are not really used */
    184  1.1  eeh 	u_int64_t	sbus0_clr_int[8];	/* SBUS slot 0 clear int regs 0..7 */	/* 1fe.0000.3400-3438 */
    185  1.1  eeh 	u_int64_t	sbus1_clr_int[8];	/* SBUS slot 1 clear int regs 0..7 */	/* 1fe.0000.3440-3478 */
    186  1.1  eeh 	u_int64_t	sbus2_clr_int[8];	/* SBUS slot 2 clear int regs 0..7 */	/* 1fe.0000.3480-34b8 */
    187  1.1  eeh 	u_int64_t	sbus3_clr_int[8];	/* SBUS slot 3 clear int regs 0..7 */	/* 1fe.0000.34c0-34f8 */
    188  1.1  eeh 
    189  1.1  eeh 	u_int64_t	pad9[96];
    190  1.1  eeh 
    191  1.1  eeh 	u_int64_t	scsi_clr_int;		/* SCSI clear int reg */		/* 1fe.0000.3800 */
    192  1.1  eeh 	u_int64_t	ether_clr_int;		/* ethernet clear int reg */		/* 1fe.0000.3808 */
    193  1.1  eeh 	u_int64_t	bpp_clr_int;		/* parallel clear int reg */		/* 1fe.0000.3810 */
    194  1.1  eeh 	u_int64_t	audio_clr_int;		/* audio clear int reg */		/* 1fe.0000.3818 */
    195  1.1  eeh 	u_int64_t	power_clr_int;		/* power fail clear int reg */		/* 1fe.0000.3820 */
    196  1.1  eeh 	u_int64_t	ser_kb_ms_clr_int;	/* serial/kbd/mouse clear int reg */	/* 1fe.0000.3828 */
    197  1.1  eeh 	u_int64_t	fd_clr_int;		/* floppy clear int reg */		/* 1fe.0000.3830 */
    198  1.1  eeh 	u_int64_t	therm_clr_int;		/* thermal warn clear int reg */	/* 1fe.0000.3838 */
    199  1.1  eeh 	u_int64_t	kbd_clr_int;		/* kbd [unused] clear int reg */	/* 1fe.0000.3840 */
    200  1.1  eeh 	u_int64_t	mouse_clr_int;		/* mouse [unused] clear int reg */	/* 1fe.0000.3848 */
    201  1.1  eeh 	u_int64_t	serial_clr_int;		/* second serial clear int reg */	/* 1fe.0000.3850 */
    202  1.1  eeh 	u_int64_t	pad10;
    203  1.1  eeh 	u_int64_t	timer0_clr_int;		/* timer 0 clear int reg */		/* 1fe.0000.3860 */
    204  1.1  eeh 	u_int64_t	timer1_clr_int;		/* timer 1 clear int reg */		/* 1fe.0000.3868 */
    205  1.1  eeh 	u_int64_t	ue_clr_int;		/* UE clear int reg */			/* 1fe.0000.3870 */
    206  1.1  eeh 	u_int64_t	ce_clr_int;		/* CE clear int reg */			/* 1fe.0000.3878 */
    207  1.1  eeh 	u_int64_t	sbus_clr_async_int;	/* SBUS error clr interrupt reg */	/* 1fe.0000.3880 */
    208  1.1  eeh 	u_int64_t	pwrmgt_clr_int;		/* power mgmt wake clr interrupt reg */	/* 1fe.0000.3888 */
    209  1.1  eeh 
    210  1.1  eeh 	u_int64_t	pad11[110];
    211  1.1  eeh 
    212  1.1  eeh 	struct timer_counter {
    213  1.1  eeh 		u_int64_t	tc_count;	/* timer/counter 0/1 count register */	/* ife.0000.3c00,3c10 */
    214  1.1  eeh 		u_int64_t	tc_limit;	/* timer/counter 0/1 limit register */	/* ife.0000.3c08,3c18 */
    215  1.1  eeh 	} tc[2];
    216  1.1  eeh 
    217  1.1  eeh 	u_int64_t	pad12[252];
    218  1.1  eeh 
    219  1.1  eeh 	u_int64_t	sys_svadiag;		/* SBUS virtual addr diag reg */	/* 1fe.0000.4400 */
    220  1.1  eeh 
    221  1.1  eeh 	u_int64_t	pad13[31];
    222  1.1  eeh 
    223  1.1  eeh 	u_int64_t	iommu_queue_diag[16];	/* IOMMU LRU queue diag */		/* 1fe.0000.4500-457f */
    224  1.1  eeh 	u_int64_t	tlb_tag_diag[16];	/* TLB tag diag */			/* 1fe.0000.4580-45ff */
    225  1.1  eeh 	u_int64_t	tlb_data_diag[32];	/* TLB data RAM diag */			/* 1fe.0000.4600-46ff */
    226  1.1  eeh 
    227  1.1  eeh 	u_int64_t	pad14[32];
    228  1.1  eeh 
    229  1.1  eeh 	u_int64_t	sbus_int_diag;		/* SBUS int state diag reg */		/* 1fe.0000.4800 */
    230  1.1  eeh 	u_int64_t	obio_int_diag;		/* OBIO and misc int state diag reg */	/* 1fe.0000.4808 */
    231  1.1  eeh 
    232  1.1  eeh 	u_int64_t	pad15[254];
    233  1.1  eeh 
    234  1.1  eeh 	u_int64_t	strbuf_data_diag[128];	/* streaming buffer data RAM diag */	/* 1fe.0000.5000-53f8 */
    235  1.1  eeh 	u_int64_t	strbuf_error_diag[128];	/* streaming buffer error status diag *//* 1fe.0000.5400-57f8 */
    236  1.1  eeh 	u_int64_t	strbuf_pg_tag_diag[16];	/* streaming buffer page tag diag */	/* 1fe.0000.5800-5878 */
    237  1.1  eeh 	u_int64_t	pad16[16];
    238  1.1  eeh 	u_int64_t	strbuf_ln_tag_diag[16];	/* streaming buffer line tag diag */	/* 1fe.0000.5900-5978 */
    239  1.1  eeh };
    240  1.1  eeh 
    241  1.1  eeh /*
    242  1.1  eeh  * sun4u iommu stuff.  Probably belongs elsewhere.
    243  1.1  eeh  */
    244  1.1  eeh 
    245  1.1  eeh #define	IOTTE_V		0x8000000000000000LL	/* Entry valid */
    246  1.1  eeh #define IOTTE_64K	0x2000000000000000LL	/* 8K or 64K page? */
    247  1.1  eeh #define IOTTE_8K	0x0000000000000000LL
    248  1.1  eeh #define IOTTE_STREAM	0x1000000000000000LL	/* Is page streamable? */
    249  1.1  eeh #define	IOTTE_LOCAL	0x0800000000000000LL	/* Accesses to same bus segment? */
    250  1.1  eeh #define IOTTE_PAMASK	0x000001ffffffe000LL	/* Let's assume this is correct */
    251  1.1  eeh #define IOTTE_C		0x0000000000000010LL	/* Accesses to cacheable space */
    252  1.1  eeh #define IOTTE_W		0x0000000000000002LL	/* Writeable */
    253  1.1  eeh 
    254  1.1  eeh #define MAKEIOTTE(pa,w,c,s)	(((pa)&IOTTE_PAMASK)|((w)?IOTTE_W:0)|((c)?IOTTE_C:0)|((s)?IOTTE_STREAM:0)|(IOTTE_V|IOTTE_8K))
    255  1.1  eeh #if 0
    256  1.1  eeh /* This version generates a pointer to a int64_t */
    257  1.1  eeh #define IOTSBSLOT(va,sz)	((((((vm_offset_t)(va))-(0xff800000<<(sz))))>>(13-3))&(~7))
    258  1.1  eeh #else
    259  1.1  eeh /* Here we just try to create an array index */
    260  1.1  eeh #define IOTSBSLOT(va,sz)	((((((vm_offset_t)(va))-(0xff800000<<(sz))))>>(13)))
    261  1.1  eeh #endif
    262  1.1  eeh 
    263  1.1  eeh /*
    264  1.1  eeh  * intr map stuff.  Probably belongs elsewhere.
    265  1.1  eeh  */
    266  1.1  eeh 
    267  1.1  eeh #define INTMAP_V	0x080000000LL	/* Interrupt valid (enabled) */
    268  1.1  eeh #define INTMAP_TID	0x07c000000LL	/* UPA target ID mask */
    269  1.1  eeh #define INTMAP_IGN	0x0000007c0LL	/* Interrupt group no. */
    270  1.1  eeh #define INTMAP_INO	0x00000003fLL	/* Interrupt number */
    271  1.1  eeh #define INTMAP_INR	(INTMAP_IGN|INTMAP_INO)
    272  1.1  eeh #define INTMAP_SLOT	0x000000018LL	/* SBUS slot # */
    273  1.1  eeh #define INTMAP_OBIO	0x000000020LL	/* Onboard device */
    274  1.1  eeh #define INTMAP_LSHIFT	11		/* Encode level in vector */
    275  1.1  eeh #define	INTLEVENCODE(x)	(((x)&0x0f)<<INTMAP_LSHIFT)
    276  1.1  eeh #define INTLEV(x)	(((x)>>INTMAP_LSHIFT)&0x0f)
    277  1.1  eeh #define INTVEC(x)	((x)&INTMAP_INR)
    278  1.1  eeh #define INTSLOT(x)	(((x)>>3)&0x7)
    279  1.1  eeh #define	INTPRI(x)	((x)&0x7)
    280