icu.h revision 121985
14Srgrimes/*- 24Srgrimes * Copyright (c) 1990 The Regents of the University of California. 34Srgrimes * All rights reserved. 44Srgrimes * 54Srgrimes * This code is derived from software contributed to Berkeley by 64Srgrimes * William Jolitz. 74Srgrimes * 84Srgrimes * Redistribution and use in source and binary forms, with or without 94Srgrimes * modification, are permitted provided that the following conditions 104Srgrimes * are met: 114Srgrimes * 1. Redistributions of source code must retain the above copyright 124Srgrimes * notice, this list of conditions and the following disclaimer. 134Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 144Srgrimes * notice, this list of conditions and the following disclaimer in the 154Srgrimes * documentation and/or other materials provided with the distribution. 164Srgrimes * 3. All advertising materials mentioning features or use of this software 174Srgrimes * must display the following acknowledgement: 184Srgrimes * This product includes software developed by the University of 194Srgrimes * California, Berkeley and its contributors. 204Srgrimes * 4. Neither the name of the University nor the names of its contributors 214Srgrimes * may be used to endorse or promote products derived from this software 224Srgrimes * without specific prior written permission. 234Srgrimes * 244Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 254Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 264Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 274Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 284Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 294Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 304Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 314Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 324Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 334Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 344Srgrimes * SUCH DAMAGE. 354Srgrimes * 36619Srgrimes * from: @(#)icu.h 5.6 (Berkeley) 5/9/91 3750477Speter * $FreeBSD: head/sys/i386/isa/icu.h 121985 2003-11-03 21:34:45Z jhb $ 384Srgrimes */ 394Srgrimes 404Srgrimes/* 414Srgrimes * AT/386 Interrupt Control constants 424Srgrimes * W. Jolitz 8/89 434Srgrimes */ 444Srgrimes 452873Sbde#ifndef _I386_ISA_ICU_H_ 462873Sbde#define _I386_ISA_ICU_H_ 474Srgrimes 484Srgrimes/* 491321Sdg * Interrupt enable bits - in normal order of priority (which we change) 504Srgrimes */ 5193945Snyan#ifdef PC98 5293945Snyan#define IRQ0 0x0001 5393945Snyan#define IRQ1 0x0002 5493945Snyan#define IRQ2 0x0004 5593945Snyan#define IRQ3 0x0008 5693945Snyan#define IRQ4 0x0010 5793945Snyan#define IRQ5 0x0020 5893945Snyan#define IRQ6 0x0040 5993945Snyan#define IRQ7 0x0080 6093945Snyan#define IRQ_SLAVE 0x0080 6193945Snyan#define IRQ8 0x0100 6293945Snyan#define IRQ9 0x0200 6393945Snyan#define IRQ10 0x0400 6493945Snyan#define IRQ11 0x0800 6593945Snyan#define IRQ12 0x1000 6693945Snyan#define IRQ13 0x2000 6793945Snyan#define IRQ14 0x4000 6893945Snyan#define IRQ15 0x8000 6993945Snyan#else 704Srgrimes#define IRQ0 0x0001 /* highest priority - timer */ 714Srgrimes#define IRQ1 0x0002 724Srgrimes#define IRQ_SLAVE 0x0004 734Srgrimes#define IRQ8 0x0100 744Srgrimes#define IRQ9 0x0200 754Srgrimes#define IRQ2 IRQ9 764Srgrimes#define IRQ10 0x0400 774Srgrimes#define IRQ11 0x0800 784Srgrimes#define IRQ12 0x1000 794Srgrimes#define IRQ13 0x2000 804Srgrimes#define IRQ14 0x4000 814Srgrimes#define IRQ15 0x8000 821321Sdg#define IRQ3 0x0008 /* this is highest after rotation */ 834Srgrimes#define IRQ4 0x0010 844Srgrimes#define IRQ5 0x0020 854Srgrimes#define IRQ6 0x0040 864Srgrimes#define IRQ7 0x0080 /* lowest - parallel printer */ 8718095Sasami#endif 8818095Sasami 894Srgrimes/* 904Srgrimes * Interrupt Control offset into Interrupt descriptor table (IDT) 914Srgrimes */ 924Srgrimes#define ICU_OFFSET 32 /* 0-31 are processor exceptions */ 93121985Sjhb#define ICU_LEN 16 /* 32-47 are ISA interrupts */ 9425164Speter 9593945Snyan#ifdef PC98 9693945Snyan#define ICU_IMR_OFFSET 2 9793945Snyan#define ICU_SLAVEID 7 9893945Snyan#else 9993945Snyan#define ICU_IMR_OFFSET 1 10093945Snyan#define ICU_SLAVEID 2 10193945Snyan#endif 102121985Sjhb 10393945Snyan#define ICU_EOI 0x20 10476645Sjhb#define HWI_MASK 0xffff /* bits for h/w interrupts */ 1054Srgrimes 106121985Sjhb#ifndef LOCORE 107121985Sjhbvoid atpic_sched_ithd(struct intrframe iframe); 108121985Sjhbvoid atpic_startup(void); 109121985Sjhb#endif 11025164Speter 1112873Sbde#endif /* !_I386_ISA_ICU_H_ */ 112