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>
This commit is contained in:
Steve Passe 1997-05-05 22:56:37 +00:00
parent 08896efb1a
commit 2479ac60b9
10 changed files with 240 additions and 48 deletions

View File

@ -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) irq %d for ISA cards.\n", rirq);
printf("Freeing (NOT implemented) redirected PCI irq %d.\n", rirq);
return 0;
#endif /* READY */
#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) redirected ISA irq %d.\n", rirq);
return 0;
#endif /* READY */
}

View File

@ -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) irq %d for ISA cards.\n", rirq);
printf("Freeing (NOT implemented) redirected PCI irq %d.\n", rirq);
return 0;
#endif /* READY */
#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) redirected ISA irq %d.\n", rirq);
return 0;
#endif /* READY */
}

View File

@ -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) irq %d for ISA cards.\n", rirq);
printf("Freeing (NOT implemented) redirected PCI irq %d.\n", rirq);
return 0;
#endif /* READY */
#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) redirected ISA irq %d.\n", rirq);
return 0;
#endif /* READY */
}

View File

@ -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));

View File

@ -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) irq %d for ISA cards.\n", rirq);
printf("Freeing (NOT implemented) redirected PCI irq %d.\n", rirq);
return 0;
#endif /* READY */
#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) redirected ISA irq %d.\n", rirq);
return 0;
#endif /* READY */
}

View File

@ -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) irq %d for ISA cards.\n", rirq);
printf("Freeing (NOT implemented) redirected PCI irq %d.\n", rirq);
return 0;
#endif /* READY */
#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) redirected ISA irq %d.\n", rirq);
return 0;
#endif /* READY */
}

View File

@ -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) irq %d for ISA cards.\n", rirq);
printf("Freeing (NOT implemented) redirected PCI irq %d.\n", rirq);
return 0;
#endif /* READY */
#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) redirected ISA irq %d.\n", rirq);
return 0;
#endif /* READY */
}

View File

@ -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));

View File

@ -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) irq %d for ISA cards.\n", rirq);
printf("Freeing (NOT implemented) redirected PCI irq %d.\n", rirq);
return 0;
#endif /* READY */
#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) redirected ISA irq %d.\n", rirq);
return 0;
#endif /* READY */
}

View File

@ -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));