summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-05-05 22:56:37 +0000
committerfsmp <fsmp@FreeBSD.org>1997-05-05 22:56:37 +0000
commitf94a577a72115bb3c2e2bde28ad844fcc7faca23 (patch)
treec818f329c4d43303c9d7c0cc422c172030809c0e
parent3f8c900a277d80f1c710d3b60ddbb381a3bb771b (diff)
downloadFreeBSD-src-f94a577a72115bb3c2e2bde28ad844fcc7faca23.zip
FreeBSD-src-f94a577a72115bb3c2e2bde28ad844fcc7faca23.tar.gz
Code to handle SMP/APIC_IO mapping of ISA INTs to APIC pins above IRQ15.
- doesn't break my system. - NOT yet verified on the affected motherboard. Submitted by: "John S. Dyson" <toor@dyson.iquest.net>
-rw-r--r--sys/amd64/amd64/mp_machdep.c39
-rw-r--r--sys/amd64/amd64/mptable.c39
-rw-r--r--sys/amd64/include/mptable.h39
-rw-r--r--sys/amd64/include/smp.h5
-rw-r--r--sys/i386/i386/mp_machdep.c39
-rw-r--r--sys/i386/i386/mptable.c39
-rw-r--r--sys/i386/include/mptable.h39
-rw-r--r--sys/i386/include/smp.h5
-rw-r--r--sys/kern/subr_smp.c39
-rw-r--r--sys/sys/smp.h5
10 files changed, 240 insertions, 48 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index ea2f991..8f26040 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.6 1997/05/01 19:27:58 fsmp Exp $
+ * $Id: mp_machdep.c,v 1.7 1997/05/03 17:42:01 fsmp Exp $
*/
#include "opt_smp.h"
@@ -889,8 +889,8 @@ get_isa_apic_irq(int isaIRQ)
/*
*
*/
-int
-get_isa_apic_mask(int isaMASK)
+u_int
+get_isa_apic_mask(u_int isaMASK)
{
int apicpin, isairq;
@@ -966,17 +966,44 @@ get_pci_apic_irq(int pciBus, int pciDevice, int pciInt)
#undef INTTYPE
+/*
+ * Reprogram the MB chipset to NOT redirect a PCI INTerrupt
+ */
int
undirect_pci_irq(int rirq)
{
#if defined(READY)
- printf("Freeing irq %d for ISA cards.\n", rirq);
+ printf("Freeing redirected PCI irq %d.\n", rirq);
+ /** FIXME: tickle the MB redirector chip */
+ return ???;
+#else
+ printf("Freeing (NOT implemented) redirected PCI irq %d.\n", rirq);
+ return 0;
+#endif /* READY */
+}
+
+
+/*
+ * Reprogram the MB chipset to NOT redirect an ISA INTerrupt.
+ *
+ * XXX FIXME:
+ * Exactly what this means is unclear at this point. It is a solution
+ * for motherboards that redirect the MBIRQ0 pin. Generically a motherboard
+ * could route any of the ISA INTs to upper (>15) IRQ values. But most would
+ * NOT be redirected via MBIRQ0, thus "undirect()ing" them would NOT be an
+ * option.
+ */
+int
+undirect_isa_irq(int rirq)
+{
+#if defined(READY)
+ printf("Freeing redirected ISA irq %d.\n", rirq);
/** FIXME: tickle the MB redirector chip */
return ???;
#else
- printf("Freeing (NOT implemented) irq %d for ISA cards.\n", rirq);
+ printf("Freeing (NOT implemented) redirected ISA irq %d.\n", rirq);
return 0;
-#endif /* READY */
+#endif /* READY */
}
diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c
index ea2f991..8f26040 100644
--- a/sys/amd64/amd64/mptable.c
+++ b/sys/amd64/amd64/mptable.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.6 1997/05/01 19:27:58 fsmp Exp $
+ * $Id: mp_machdep.c,v 1.7 1997/05/03 17:42:01 fsmp Exp $
*/
#include "opt_smp.h"
@@ -889,8 +889,8 @@ get_isa_apic_irq(int isaIRQ)
/*
*
*/
-int
-get_isa_apic_mask(int isaMASK)
+u_int
+get_isa_apic_mask(u_int isaMASK)
{
int apicpin, isairq;
@@ -966,17 +966,44 @@ get_pci_apic_irq(int pciBus, int pciDevice, int pciInt)
#undef INTTYPE
+/*
+ * Reprogram the MB chipset to NOT redirect a PCI INTerrupt
+ */
int
undirect_pci_irq(int rirq)
{
#if defined(READY)
- printf("Freeing irq %d for ISA cards.\n", rirq);
+ printf("Freeing redirected PCI irq %d.\n", rirq);
+ /** FIXME: tickle the MB redirector chip */
+ return ???;
+#else
+ printf("Freeing (NOT implemented) redirected PCI irq %d.\n", rirq);
+ return 0;
+#endif /* READY */
+}
+
+
+/*
+ * Reprogram the MB chipset to NOT redirect an ISA INTerrupt.
+ *
+ * XXX FIXME:
+ * Exactly what this means is unclear at this point. It is a solution
+ * for motherboards that redirect the MBIRQ0 pin. Generically a motherboard
+ * could route any of the ISA INTs to upper (>15) IRQ values. But most would
+ * NOT be redirected via MBIRQ0, thus "undirect()ing" them would NOT be an
+ * option.
+ */
+int
+undirect_isa_irq(int rirq)
+{
+#if defined(READY)
+ printf("Freeing redirected ISA irq %d.\n", rirq);
/** FIXME: tickle the MB redirector chip */
return ???;
#else
- printf("Freeing (NOT implemented) irq %d for ISA cards.\n", rirq);
+ printf("Freeing (NOT implemented) redirected ISA irq %d.\n", rirq);
return 0;
-#endif /* READY */
+#endif /* READY */
}
diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h
index ea2f991..8f26040 100644
--- a/sys/amd64/include/mptable.h
+++ b/sys/amd64/include/mptable.h
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.6 1997/05/01 19:27:58 fsmp Exp $
+ * $Id: mp_machdep.c,v 1.7 1997/05/03 17:42:01 fsmp Exp $
*/
#include "opt_smp.h"
@@ -889,8 +889,8 @@ get_isa_apic_irq(int isaIRQ)
/*
*
*/
-int
-get_isa_apic_mask(int isaMASK)
+u_int
+get_isa_apic_mask(u_int isaMASK)
{
int apicpin, isairq;
@@ -966,17 +966,44 @@ get_pci_apic_irq(int pciBus, int pciDevice, int pciInt)
#undef INTTYPE
+/*
+ * Reprogram the MB chipset to NOT redirect a PCI INTerrupt
+ */
int
undirect_pci_irq(int rirq)
{
#if defined(READY)
- printf("Freeing irq %d for ISA cards.\n", rirq);
+ printf("Freeing redirected PCI irq %d.\n", rirq);
+ /** FIXME: tickle the MB redirector chip */
+ return ???;
+#else
+ printf("Freeing (NOT implemented) redirected PCI irq %d.\n", rirq);
+ return 0;
+#endif /* READY */
+}
+
+
+/*
+ * Reprogram the MB chipset to NOT redirect an ISA INTerrupt.
+ *
+ * XXX FIXME:
+ * Exactly what this means is unclear at this point. It is a solution
+ * for motherboards that redirect the MBIRQ0 pin. Generically a motherboard
+ * could route any of the ISA INTs to upper (>15) IRQ values. But most would
+ * NOT be redirected via MBIRQ0, thus "undirect()ing" them would NOT be an
+ * option.
+ */
+int
+undirect_isa_irq(int rirq)
+{
+#if defined(READY)
+ printf("Freeing redirected ISA irq %d.\n", rirq);
/** FIXME: tickle the MB redirector chip */
return ???;
#else
- printf("Freeing (NOT implemented) irq %d for ISA cards.\n", rirq);
+ printf("Freeing (NOT implemented) redirected ISA irq %d.\n", rirq);
return 0;
-#endif /* READY */
+#endif /* READY */
}
diff --git a/sys/amd64/include/smp.h b/sys/amd64/include/smp.h
index c32f3cb..d6da4f2 100644
--- a/sys/amd64/include/smp.h
+++ b/sys/amd64/include/smp.h
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: smp.h,v 1.4 1997/05/01 19:33:06 fsmp Exp $
+ * $Id: smp.h,v 1.5 1997/05/03 18:05:31 fsmp Exp $
*
*/
@@ -61,7 +61,8 @@ u_int mp_bootaddress __P((u_int));
void mp_start __P((void));
void mp_announce __P((void));
int get_isa_apic_irq __P((int));
-int get_isa_apic_mask __P((int));
+u_int get_isa_apic_mask __P((u_int));
+int undirect_isa_irq __P((int));
int get_eisa_apic_irq __P((int));
int get_pci_apic_irq __P((int, int, int));
int undirect_pci_irq __P((int));
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
index ea2f991..8f26040 100644
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.6 1997/05/01 19:27:58 fsmp Exp $
+ * $Id: mp_machdep.c,v 1.7 1997/05/03 17:42:01 fsmp Exp $
*/
#include "opt_smp.h"
@@ -889,8 +889,8 @@ get_isa_apic_irq(int isaIRQ)
/*
*
*/
-int
-get_isa_apic_mask(int isaMASK)
+u_int
+get_isa_apic_mask(u_int isaMASK)
{
int apicpin, isairq;
@@ -966,17 +966,44 @@ get_pci_apic_irq(int pciBus, int pciDevice, int pciInt)
#undef INTTYPE
+/*
+ * Reprogram the MB chipset to NOT redirect a PCI INTerrupt
+ */
int
undirect_pci_irq(int rirq)
{
#if defined(READY)
- printf("Freeing irq %d for ISA cards.\n", rirq);
+ printf("Freeing redirected PCI irq %d.\n", rirq);
+ /** FIXME: tickle the MB redirector chip */
+ return ???;
+#else
+ printf("Freeing (NOT implemented) redirected PCI irq %d.\n", rirq);
+ return 0;
+#endif /* READY */
+}
+
+
+/*
+ * Reprogram the MB chipset to NOT redirect an ISA INTerrupt.
+ *
+ * XXX FIXME:
+ * Exactly what this means is unclear at this point. It is a solution
+ * for motherboards that redirect the MBIRQ0 pin. Generically a motherboard
+ * could route any of the ISA INTs to upper (>15) IRQ values. But most would
+ * NOT be redirected via MBIRQ0, thus "undirect()ing" them would NOT be an
+ * option.
+ */
+int
+undirect_isa_irq(int rirq)
+{
+#if defined(READY)
+ printf("Freeing redirected ISA irq %d.\n", rirq);
/** FIXME: tickle the MB redirector chip */
return ???;
#else
- printf("Freeing (NOT implemented) irq %d for ISA cards.\n", rirq);
+ printf("Freeing (NOT implemented) redirected ISA irq %d.\n", rirq);
return 0;
-#endif /* READY */
+#endif /* READY */
}
diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c
index ea2f991..8f26040 100644
--- a/sys/i386/i386/mptable.c
+++ b/sys/i386/i386/mptable.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.6 1997/05/01 19:27:58 fsmp Exp $
+ * $Id: mp_machdep.c,v 1.7 1997/05/03 17:42:01 fsmp Exp $
*/
#include "opt_smp.h"
@@ -889,8 +889,8 @@ get_isa_apic_irq(int isaIRQ)
/*
*
*/
-int
-get_isa_apic_mask(int isaMASK)
+u_int
+get_isa_apic_mask(u_int isaMASK)
{
int apicpin, isairq;
@@ -966,17 +966,44 @@ get_pci_apic_irq(int pciBus, int pciDevice, int pciInt)
#undef INTTYPE
+/*
+ * Reprogram the MB chipset to NOT redirect a PCI INTerrupt
+ */
int
undirect_pci_irq(int rirq)
{
#if defined(READY)
- printf("Freeing irq %d for ISA cards.\n", rirq);
+ printf("Freeing redirected PCI irq %d.\n", rirq);
+ /** FIXME: tickle the MB redirector chip */
+ return ???;
+#else
+ printf("Freeing (NOT implemented) redirected PCI irq %d.\n", rirq);
+ return 0;
+#endif /* READY */
+}
+
+
+/*
+ * Reprogram the MB chipset to NOT redirect an ISA INTerrupt.
+ *
+ * XXX FIXME:
+ * Exactly what this means is unclear at this point. It is a solution
+ * for motherboards that redirect the MBIRQ0 pin. Generically a motherboard
+ * could route any of the ISA INTs to upper (>15) IRQ values. But most would
+ * NOT be redirected via MBIRQ0, thus "undirect()ing" them would NOT be an
+ * option.
+ */
+int
+undirect_isa_irq(int rirq)
+{
+#if defined(READY)
+ printf("Freeing redirected ISA irq %d.\n", rirq);
/** FIXME: tickle the MB redirector chip */
return ???;
#else
- printf("Freeing (NOT implemented) irq %d for ISA cards.\n", rirq);
+ printf("Freeing (NOT implemented) redirected ISA irq %d.\n", rirq);
return 0;
-#endif /* READY */
+#endif /* READY */
}
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index ea2f991..8f26040 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.6 1997/05/01 19:27:58 fsmp Exp $
+ * $Id: mp_machdep.c,v 1.7 1997/05/03 17:42:01 fsmp Exp $
*/
#include "opt_smp.h"
@@ -889,8 +889,8 @@ get_isa_apic_irq(int isaIRQ)
/*
*
*/
-int
-get_isa_apic_mask(int isaMASK)
+u_int
+get_isa_apic_mask(u_int isaMASK)
{
int apicpin, isairq;
@@ -966,17 +966,44 @@ get_pci_apic_irq(int pciBus, int pciDevice, int pciInt)
#undef INTTYPE
+/*
+ * Reprogram the MB chipset to NOT redirect a PCI INTerrupt
+ */
int
undirect_pci_irq(int rirq)
{
#if defined(READY)
- printf("Freeing irq %d for ISA cards.\n", rirq);
+ printf("Freeing redirected PCI irq %d.\n", rirq);
+ /** FIXME: tickle the MB redirector chip */
+ return ???;
+#else
+ printf("Freeing (NOT implemented) redirected PCI irq %d.\n", rirq);
+ return 0;
+#endif /* READY */
+}
+
+
+/*
+ * Reprogram the MB chipset to NOT redirect an ISA INTerrupt.
+ *
+ * XXX FIXME:
+ * Exactly what this means is unclear at this point. It is a solution
+ * for motherboards that redirect the MBIRQ0 pin. Generically a motherboard
+ * could route any of the ISA INTs to upper (>15) IRQ values. But most would
+ * NOT be redirected via MBIRQ0, thus "undirect()ing" them would NOT be an
+ * option.
+ */
+int
+undirect_isa_irq(int rirq)
+{
+#if defined(READY)
+ printf("Freeing redirected ISA irq %d.\n", rirq);
/** FIXME: tickle the MB redirector chip */
return ???;
#else
- printf("Freeing (NOT implemented) irq %d for ISA cards.\n", rirq);
+ printf("Freeing (NOT implemented) redirected ISA irq %d.\n", rirq);
return 0;
-#endif /* READY */
+#endif /* READY */
}
diff --git a/sys/i386/include/smp.h b/sys/i386/include/smp.h
index c32f3cb..d6da4f2 100644
--- a/sys/i386/include/smp.h
+++ b/sys/i386/include/smp.h
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: smp.h,v 1.4 1997/05/01 19:33:06 fsmp Exp $
+ * $Id: smp.h,v 1.5 1997/05/03 18:05:31 fsmp Exp $
*
*/
@@ -61,7 +61,8 @@ u_int mp_bootaddress __P((u_int));
void mp_start __P((void));
void mp_announce __P((void));
int get_isa_apic_irq __P((int));
-int get_isa_apic_mask __P((int));
+u_int get_isa_apic_mask __P((u_int));
+int undirect_isa_irq __P((int));
int get_eisa_apic_irq __P((int));
int get_pci_apic_irq __P((int, int, int));
int undirect_pci_irq __P((int));
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index ea2f991..8f26040 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.6 1997/05/01 19:27:58 fsmp Exp $
+ * $Id: mp_machdep.c,v 1.7 1997/05/03 17:42:01 fsmp Exp $
*/
#include "opt_smp.h"
@@ -889,8 +889,8 @@ get_isa_apic_irq(int isaIRQ)
/*
*
*/
-int
-get_isa_apic_mask(int isaMASK)
+u_int
+get_isa_apic_mask(u_int isaMASK)
{
int apicpin, isairq;
@@ -966,17 +966,44 @@ get_pci_apic_irq(int pciBus, int pciDevice, int pciInt)
#undef INTTYPE
+/*
+ * Reprogram the MB chipset to NOT redirect a PCI INTerrupt
+ */
int
undirect_pci_irq(int rirq)
{
#if defined(READY)
- printf("Freeing irq %d for ISA cards.\n", rirq);
+ printf("Freeing redirected PCI irq %d.\n", rirq);
+ /** FIXME: tickle the MB redirector chip */
+ return ???;
+#else
+ printf("Freeing (NOT implemented) redirected PCI irq %d.\n", rirq);
+ return 0;
+#endif /* READY */
+}
+
+
+/*
+ * Reprogram the MB chipset to NOT redirect an ISA INTerrupt.
+ *
+ * XXX FIXME:
+ * Exactly what this means is unclear at this point. It is a solution
+ * for motherboards that redirect the MBIRQ0 pin. Generically a motherboard
+ * could route any of the ISA INTs to upper (>15) IRQ values. But most would
+ * NOT be redirected via MBIRQ0, thus "undirect()ing" them would NOT be an
+ * option.
+ */
+int
+undirect_isa_irq(int rirq)
+{
+#if defined(READY)
+ printf("Freeing redirected ISA irq %d.\n", rirq);
/** FIXME: tickle the MB redirector chip */
return ???;
#else
- printf("Freeing (NOT implemented) irq %d for ISA cards.\n", rirq);
+ printf("Freeing (NOT implemented) redirected ISA irq %d.\n", rirq);
return 0;
-#endif /* READY */
+#endif /* READY */
}
diff --git a/sys/sys/smp.h b/sys/sys/smp.h
index c32f3cb..d6da4f2 100644
--- a/sys/sys/smp.h
+++ b/sys/sys/smp.h
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: smp.h,v 1.4 1997/05/01 19:33:06 fsmp Exp $
+ * $Id: smp.h,v 1.5 1997/05/03 18:05:31 fsmp Exp $
*
*/
@@ -61,7 +61,8 @@ u_int mp_bootaddress __P((u_int));
void mp_start __P((void));
void mp_announce __P((void));
int get_isa_apic_irq __P((int));
-int get_isa_apic_mask __P((int));
+u_int get_isa_apic_mask __P((u_int));
+int undirect_isa_irq __P((int));
int get_eisa_apic_irq __P((int));
int get_pci_apic_irq __P((int, int, int));
int undirect_pci_irq __P((int));
OpenPOWER on IntegriCloud