summaryrefslogtreecommitdiffstats
path: root/sys/amd64/isa/atpic.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64/isa/atpic.c')
-rw-r--r--sys/amd64/isa/atpic.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/amd64/isa/atpic.c b/sys/amd64/isa/atpic.c
index 09593b5..23979ea 100644
--- a/sys/amd64/isa/atpic.c
+++ b/sys/amd64/isa/atpic.c
@@ -62,15 +62,23 @@ __FBSDID("$FreeBSD$");
#define MASTER 0
#define SLAVE 1
+/*
+ * Determine the base master and slave modes not including auto EOI support.
+ * All machines that FreeBSD supports use 8086 mode.
+ */
+#define BASE_MASTER_MODE ICW4_8086
+#define BASE_SLAVE_MODE ICW4_8086
+
+/* Enable automatic EOI if requested. */
#ifdef AUTO_EOI_1
-#define MASTER_MODE (ICW4_8086 | ICW4_AEOI)
+#define MASTER_MODE (BASE_MASTER_MODE | ICW4_AEOI)
#else
-#define MASTER_MODE ICW4_8086
+#define MASTER_MODE BASE_MASTER_MODE
#endif
#ifdef AUTO_EOI_2
-#define SLAVE_MODE (ICW4_8086 | ICW4_AEOI)
+#define SLAVE_MODE (BASE_SLAVE_MODE | ICW4_AEOI)
#else
-#define SLAVE_MODE ICW4_8086
+#define SLAVE_MODE BASE_SLAVE_MODE
#endif
static void atpic_init(void *dummy);
OpenPOWER on IntegriCloud