nmi.c (77582) | nmi.c (80028) |
---|---|
1/*- 2 * Copyright (c) 1991 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 --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 | 1/*- 2 * Copyright (c) 1991 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 --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 |
37 * $FreeBSD: head/sys/i386/isa/nmi.c 77582 2001-06-01 13:23:28Z tmm $ | 37 * $FreeBSD: head/sys/i386/isa/nmi.c 80028 2001-07-20 06:07:34Z takawata $ |
38 */ 39 40#include "opt_auto_eoi.h" 41#include "opt_isa.h" 42#include "opt_mca.h" 43 44#include <sys/param.h> 45#include <sys/bus.h> --- 84 unchanged lines hidden (view full) --- 130#endif /* APIC_IO */ 131}; 132 133static driver_intr_t isa_strayintr; 134 135static void ithds_init(void *dummy); 136static void ithread_enable(int vector); 137static void ithread_disable(int vector); | 38 */ 39 40#include "opt_auto_eoi.h" 41#include "opt_isa.h" 42#include "opt_mca.h" 43 44#include <sys/param.h> 45#include <sys/bus.h> --- 84 unchanged lines hidden (view full) --- 130#endif /* APIC_IO */ 131}; 132 133static driver_intr_t isa_strayintr; 134 135static void ithds_init(void *dummy); 136static void ithread_enable(int vector); 137static void ithread_disable(int vector); |
138static void init_i8259(void); |
|
138 139#ifdef PC98 140#define NMI_PARITY 0x04 141#define NMI_EPARITY 0x02 142#else 143#define NMI_PARITY (1 << 7) 144#define NMI_IOCHAN (1 << 6) 145#define ENMI_WATCHDOG (1 << 7) --- 131 unchanged lines hidden (view full) --- 277 log(LOG_CRIT, "EISA I/O port status error."); 278 retval = 1; 279 } 280#endif 281 return(retval); 282} 283 284/* | 139 140#ifdef PC98 141#define NMI_PARITY 0x04 142#define NMI_EPARITY 0x02 143#else 144#define NMI_PARITY (1 << 7) 145#define NMI_IOCHAN (1 << 6) 146#define ENMI_WATCHDOG (1 << 7) --- 131 unchanged lines hidden (view full) --- 278 log(LOG_CRIT, "EISA I/O port status error."); 279 retval = 1; 280 } 281#endif 282 return(retval); 283} 284 285/* |
286 * ICU reinitialize when ICU configuration has lost. 287 */ 288void icu_reinit() 289{ 290 int i; 291 u_int32_t eflags; 292 eflags = read_eflags(); 293 disable_intr(); 294 init_i8259(); 295 for(i=0;i<ICU_LEN;i++) 296 if(intr_handler[i] != isa_strayintr) 297 INTREN(1<<i); 298 write_eflags(eflags); 299} 300 301/* |
|
285 * Create a default interrupt table to avoid problems caused by 286 * spurious interrupts during configuration of kernel, then setup 287 * interrupt control unit. 288 */ 289void 290isa_defaultirq() 291{ 292 int i; 293 294 /* icu vectors */ 295 for (i = 0; i < ICU_LEN; i++) 296 icu_unset(i, (driver_intr_t *)NULL); | 302 * Create a default interrupt table to avoid problems caused by 303 * spurious interrupts during configuration of kernel, then setup 304 * interrupt control unit. 305 */ 306void 307isa_defaultirq() 308{ 309 int i; 310 311 /* icu vectors */ 312 for (i = 0; i < ICU_LEN; i++) 313 icu_unset(i, (driver_intr_t *)NULL); |
314 init_i8259(); 315} |
|
297 | 316 |
298 /* initialize 8259's */ | 317 318/* 319 *initialize 8259's 320 */ 321static void init_i8259() 322{ 323 |
299#ifdef DEV_MCA 300 if (MCA_system) 301 outb(IO_ICU1, 0x19); /* reset; program device, four bytes */ 302 else 303#endif 304 outb(IO_ICU1, 0x11); /* reset; program device, four bytes */ 305 306 outb(IO_ICU1+ICU_IMR_OFFSET, NRSVIDT); /* starting at this vector index */ --- 336 unchanged lines hidden --- | 324#ifdef DEV_MCA 325 if (MCA_system) 326 outb(IO_ICU1, 0x19); /* reset; program device, four bytes */ 327 else 328#endif 329 outb(IO_ICU1, 0x11); /* reset; program device, four bytes */ 330 331 outb(IO_ICU1+ICU_IMR_OFFSET, NRSVIDT); /* starting at this vector index */ --- 336 unchanged lines hidden --- |