PERFORCE change 42369 for review
Peter Wemm
peter at FreeBSD.org
Fri Nov 14 11:58:02 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=42369
Change 42369 by peter at peter_overcee on 2003/11/14 11:57:20
begin restoring the auto-eoi stuff, as much as I dislike it.
Affected files ...
.. //depot/projects/hammer/sys/amd64/isa/atpic.c#23 edit
Differences ...
==== //depot/projects/hammer/sys/amd64/isa/atpic.c#23 (text+ko) ====
@@ -55,13 +55,22 @@
#include <amd64/isa/icu.h>
#include <amd64/isa/isa.h>
-#ifdef DEV_ISA
#include <isa/isavar.h>
#define MASTER 0
#define SLAVE 1
+#ifdef AUTO_EOI_1
+#define MASTER_MODE (ICW4_8086 | ICW4_AEOI)
+#else
+#define MASTER_MODE ICW4_8086
#endif
+#ifdef AUTO_EOI_2
+#define SLAVE_MODE (ICW4_8086 | ICW4_AEOI)
+#else
+#define SLAVE_MODE ICW4_8086
+#endif
+
static void atpic_init(void *dummy);
@@ -164,9 +173,11 @@
KASSERT(isrc->is_pic == &atpics[MASTER].at_pic,
("%s: mismatched pic", __func__));
+#ifndef AUTO_EOI_1
mtx_lock_spin(&icu_lock);
outb(atpics[MASTER].at_ioaddr, ICU_EOI);
mtx_unlock_spin(&icu_lock);
+#endif
}
/*
@@ -179,10 +190,14 @@
KASSERT(isrc->is_pic == &atpics[SLAVE].at_pic,
("%s: mismatched pic", __func__));
+#ifndef AUTO_EOI_2
mtx_lock_spin(&icu_lock);
outb(atpics[SLAVE].at_ioaddr, ICU_EOI);
+#ifndef AUTO_EOI_1
outb(atpics[MASTER].at_ioaddr, ICU_EOI);
+#endif
mtx_unlock_spin(&icu_lock);
+#endif
}
static void
@@ -243,9 +258,9 @@
/* Set mode. */
if (slave)
- outb(imr_addr, ICW4_8086);
+ outb(imr_addr, SLAVE_MODE);
else
- outb(imr_addr, ICW4_8086);
+ outb(imr_addr, MASTER_MODE);
/* Set interrupt enable mask. */
outb(imr_addr, *pic->at_imen);
More information about the p4-projects
mailing list