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:
parent
bd70ab3989
commit
642ba07a24
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user