If we are running in APIC_IO mode, pretend that we didn't see the BIOS

reporting an AT PIC.  We do this because otherwise the PIC will claim
IRQ 2 in an unshareable mode, preventing other devices from legitimately
using it.

For symmetry, in !APIC_IO mode, ignore the APIC if it's reported.

This is a hack; a better solution would have the PIC's driver release
the IRQ if it was not going to be active.
This commit is contained in:
Mike Smith 2000-05-17 19:44:16 +00:00
parent bd70ab3989
commit 642ba07a24
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60668
2 changed files with 34 additions and 0 deletions

View file

@ -32,6 +32,7 @@
*/
#include "isa.h"
#include "opt_smp.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -565,6 +566,22 @@ pnpbios_identify(driver_t *driver, device_t parent)
printf("pnpbios: bogus system node data, aborting scan\n");
break;
}
/*
* If we are in APIC_IO mode, we should ignore the ISA PIC if it
* shows up. Likewise, in !APIC_IO mode, we should ignore the
* APIC (less important).
* This is significant because the ISA PIC will claim IRQ 2 (which
* it uses for chaining), while in APIC mode this is a valid IRQ
* available for general use.
*/
#ifdef APIC_IO
if (pnp_eisaformat(pd->devid) == "PNP0000") /* ISA PIC */
continue;
#else
if (pnp_eisaformat(pd->devid) == "PNP0003") /* APIC */
continue;
#endif
/* Add the device and parse its resources */
dev = BUS_ADD_CHILD(parent, ISA_ORDER_PNP, NULL, -1);

View file

@ -32,6 +32,7 @@
*/
#include "isa.h"
#include "opt_smp.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -565,6 +566,22 @@ pnpbios_identify(driver_t *driver, device_t parent)
printf("pnpbios: bogus system node data, aborting scan\n");
break;
}
/*
* If we are in APIC_IO mode, we should ignore the ISA PIC if it
* shows up. Likewise, in !APIC_IO mode, we should ignore the
* APIC (less important).
* This is significant because the ISA PIC will claim IRQ 2 (which
* it uses for chaining), while in APIC mode this is a valid IRQ
* available for general use.
*/
#ifdef APIC_IO
if (pnp_eisaformat(pd->devid) == "PNP0000") /* ISA PIC */
continue;
#else
if (pnp_eisaformat(pd->devid) == "PNP0003") /* APIC */
continue;
#endif
/* Add the device and parse its resources */
dev = BUS_ADD_CHILD(parent, ISA_ORDER_PNP, NULL, -1);