icu.h revision 128019
1/*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 1. Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in the 15 * documentation and/or other materials provided with the distribution. 16 * 4. Neither the name of the University nor the names of its contributors 17 * may be used to endorse or promote products derived from this software 18 * without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * from: @(#)icu.h 5.6 (Berkeley) 5/9/91 33 * $FreeBSD: head/sys/i386/isa/icu.h 128019 2004-04-07 20:46:16Z imp $ 34 */ 35 36/* 37 * AT/386 Interrupt Control constants 38 * W. Jolitz 8/89 39 */ 40 41#ifndef _I386_ISA_ICU_H_ 42#define _I386_ISA_ICU_H_ 43 44/* 45 * Interrupt enable bits - in normal order of priority (which we change) 46 */ 47#ifdef PC98 48#define IRQ0 0x0001 49#define IRQ1 0x0002 50#define IRQ2 0x0004 51#define IRQ3 0x0008 52#define IRQ4 0x0010 53#define IRQ5 0x0020 54#define IRQ6 0x0040 55#define IRQ7 0x0080 56#define IRQ_SLAVE 0x0080 57#define IRQ8 0x0100 58#define IRQ9 0x0200 59#define IRQ10 0x0400 60#define IRQ11 0x0800 61#define IRQ12 0x1000 62#define IRQ13 0x2000 63#define IRQ14 0x4000 64#define IRQ15 0x8000 65#else 66#define IRQ0 0x0001 /* highest priority - timer */ 67#define IRQ1 0x0002 68#define IRQ_SLAVE 0x0004 69#define IRQ8 0x0100 70#define IRQ9 0x0200 71#define IRQ2 IRQ9 72#define IRQ10 0x0400 73#define IRQ11 0x0800 74#define IRQ12 0x1000 75#define IRQ13 0x2000 76#define IRQ14 0x4000 77#define IRQ15 0x8000 78#define IRQ3 0x0008 /* this is highest after rotation */ 79#define IRQ4 0x0010 80#define IRQ5 0x0020 81#define IRQ6 0x0040 82#define IRQ7 0x0080 /* lowest - parallel printer */ 83#endif 84 85/* 86 * Interrupt Control offset into Interrupt descriptor table (IDT) 87 */ 88#define ICU_OFFSET 32 /* 0-31 are processor exceptions */ 89#define ICU_LEN 16 /* 32-47 are ISA interrupts */ 90 91#ifdef PC98 92#define ICU_IMR_OFFSET 2 93#define ICU_SLAVEID 7 94#else 95#define ICU_IMR_OFFSET 1 96#define ICU_SLAVEID 2 97#endif 98 99#define ICU_EOI (OCW2_EOI) /* non-specific EOI */ 100 101#ifndef LOCORE 102void atpic_handle_intr(struct intrframe iframe); 103void atpic_startup(void); 104#endif 105 106#endif /* !_I386_ISA_ICU_H_ */ 107