summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1997-04-26 11:46:25 +0000
committerPeter Wemm <peter@FreeBSD.org>1997-04-26 11:46:25 +0000
commit477a642cee98950f11ce12c94468b0156991a8eb (patch)
tree0b1362dc59c530540630177826b3e1cee9bb08bd /sys/dev
parent539fc95753f186bdf4f6d04d86484abd3c7f59c5 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/pci.c30
-rw-r--r--sys/dev/sio/sio.c13
2 files changed, 38 insertions, 5 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 8c1bc7dbc19b..96a71e841cf0 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pci.c,v 1.68 1997/03/25 19:12:08 se Exp $
+** $Id: pci.c,v 1.69 1997/04/23 19:43:20 se Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@@ -46,6 +46,8 @@
**========================================================
*/
+#include "opt_smp.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
@@ -70,9 +72,6 @@
#include <pci/pcibus.h>
#include <pci/pci_ioctl.h>
-#define PCI_MAX_IRQ (16)
-
-
/*========================================================
**
** Structs and Functions
@@ -403,6 +402,10 @@ static void pci_attach (int bus, int dev, int func,
u_char reg;
u_char pciint;
int irq;
+#if defined(APIC_IO)
+ u_char airq = 0xff;
+ u_char rirq = 0xff;
+#endif /* APIC_IO */
pcici_t tag = pcibus->pb_tag (bus, dev, func);
/*
@@ -437,14 +440,33 @@ static void pci_attach (int bus, int dev, int func,
** and we cannot bind the pci interrupt.
*/
+#if defined(APIC_IO)
+ if (irq && (irq != 0xff)) {
+ airq = get_pci_apic_irq (bus, dev, pciint);
+ if (airq != 0xff) { /* APIC IRQ exists */
+ rirq = irq; /* 're-directed' IRQ */
+ irq = airq; /* use APIC IRQ */
+ }
+ printf ("%d", irq);
+ }
+#else
if (irq && (irq != 0xff))
printf ("%d", irq);
+#endif /* APIC_IO */
else
printf ("??");
};
printf (" on pci%d:%d:%d\n", bus, dev, func);
+#if defined(APIC_IO)
+ if (airq != 0xff) { /* APIC IRQ exists */
+ data = PCI_INTERRUPT_LINE_INSERT(data, airq);
+ pci_conf_write (tag, PCI_INTERRUPT_REG, data);
+ undirect_pci_irq (rirq); /* free for ISA card */
+ }
+#endif /* APIC_IO */
+
/*
** Read the current mapping,
** and update the pcicb fields.
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 7d5e78db1be2..54420e863661 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -31,12 +31,13 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.162 1997/04/05 13:11:27 bde Exp $
+ * $Id: sio.c,v 1.163 1997/04/18 18:28:09 bde Exp $
*/
#include "opt_comconsole.h"
#include "opt_ddb.h"
#include "opt_sio.h"
+#include "opt_smp.h"
#include "sio.h"
/*
@@ -82,6 +83,16 @@
#include <pccard/slot.h>
#endif
+#if defined(APIC_IO)
+/*
+ * INTs are masked in the (global) IO APIC,
+ * but the IRR register is in each LOCAL APIC,
+ * so we HAVE to unmask the INT to be able to "see INT pending"
+ * BUT how do we clear them???
+ */
+#define isa_irq_pending icu_irq_pending
+#endif /* APIC_IO */
+
#define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */
#define RB_I_HIGH_WATER (TTYHOG - 2 * RS_IBUFSIZE)
#define RS_IBUFSIZE 256