Don't include <isa/isavar.h> or compile code depending on it when isa
is not configured. Including <isa/isavar.h> when it is not used is harmful as well as bogus, since it includes "isa_if.h" which is not generated when isa is not configured. This was fixed in 1999 but was broken by unconditionalizing PNPBIOS.
This commit is contained in:
parent
c636c4a872
commit
586079cc26
@ -31,6 +31,8 @@
|
||||
* Code for dealing with the BIOS in x86 PC systems.
|
||||
*/
|
||||
|
||||
#include "opt_isa.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -44,9 +46,11 @@
|
||||
#include <machine/stdarg.h>
|
||||
#include <machine/vmparam.h>
|
||||
#include <machine/pc/bios.h>
|
||||
#ifdef DEV_ISA
|
||||
#include <isa/isavar.h>
|
||||
#include <isa/pnpreg.h>
|
||||
#include <isa/pnpvar.h>
|
||||
#endif
|
||||
|
||||
#define BIOS_START 0xe0000
|
||||
#define BIOS_SIZE 0x20000
|
||||
@ -459,6 +463,7 @@ bios16(struct bios_args *args, char *fmt, ...)
|
||||
return (i);
|
||||
}
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* PnP BIOS interface; enumerate devices only known to the system
|
||||
* BIOS and save information about them for later use.
|
||||
@ -664,3 +669,4 @@ static driver_t pnpbios_driver = {
|
||||
static devclass_t pnpbios_devclass;
|
||||
|
||||
DRIVER_MODULE(pnpbios, isa, pnpbios_driver, pnpbios_devclass, 0, 0);
|
||||
#endif /* DEV_ISA */
|
||||
|
@ -37,6 +37,7 @@
|
||||
|
||||
#include "opt_cpu.h"
|
||||
#include "opt_debug_npx.h"
|
||||
#include "opt_isa.h"
|
||||
#include "opt_math_emulate.h"
|
||||
#include "opt_npx.h"
|
||||
|
||||
@ -83,7 +84,9 @@
|
||||
#endif
|
||||
#endif
|
||||
#include <i386/isa/intr_machdep.h>
|
||||
#ifdef DEV_ISA
|
||||
#include <isa/isavar.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 387 and 287 Numeric Coprocessor Extension (NPX) Driver.
|
||||
@ -949,6 +952,7 @@ static driver_t npx_driver = {
|
||||
|
||||
static devclass_t npx_devclass;
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* We prefer to attach to the root nexus so that the usual case (exception 16)
|
||||
* doesn't describe the processor as being `on isa'.
|
||||
@ -1003,4 +1007,4 @@ DRIVER_MODULE(npxisa, isa, npxisa_driver, npxisa_devclass, 0, 0);
|
||||
#ifndef PC98
|
||||
DRIVER_MODULE(npxisa, acpi, npxisa_driver, npxisa_devclass, 0, 0);
|
||||
#endif
|
||||
|
||||
#endif /* DEV_ISA */
|
||||
|
@ -40,6 +40,8 @@
|
||||
* and I/O memory address space.
|
||||
*/
|
||||
|
||||
#include "opt_isa.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/bus.h>
|
||||
@ -62,12 +64,14 @@
|
||||
#include <machine/mpapic.h>
|
||||
#endif
|
||||
|
||||
#ifdef DEV_ISA
|
||||
#include <isa/isavar.h>
|
||||
#ifdef PC98
|
||||
#include <pc98/pc98/pc98.h>
|
||||
#else
|
||||
#include <i386/isa/isa.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <i386/isa/icu.h>
|
||||
#include <i386/isa/intr_machdep.h>
|
||||
#include <sys/rtprio.h>
|
||||
@ -636,6 +640,7 @@ nexus_delete_resource(device_t dev, device_t child, int type, int rid)
|
||||
resource_list_delete(rl, type, rid);
|
||||
}
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* Placeholder which claims PnP 'devices' which describe system
|
||||
* resources.
|
||||
@ -683,3 +688,4 @@ static driver_t sysresource_driver = {
|
||||
static devclass_t sysresource_devclass;
|
||||
|
||||
DRIVER_MODULE(sysresource, isa, sysresource_driver, sysresource_devclass, 0, 0);
|
||||
#endif /* DEV_ISA */
|
||||
|
@ -40,6 +40,8 @@
|
||||
* and I/O memory address space.
|
||||
*/
|
||||
|
||||
#include "opt_isa.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/bus.h>
|
||||
@ -62,12 +64,14 @@
|
||||
#include <machine/mpapic.h>
|
||||
#endif
|
||||
|
||||
#ifdef DEV_ISA
|
||||
#include <isa/isavar.h>
|
||||
#ifdef PC98
|
||||
#include <pc98/pc98/pc98.h>
|
||||
#else
|
||||
#include <i386/isa/isa.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <i386/isa/icu.h>
|
||||
#include <i386/isa/intr_machdep.h>
|
||||
#include <sys/rtprio.h>
|
||||
@ -636,6 +640,7 @@ nexus_delete_resource(device_t dev, device_t child, int type, int rid)
|
||||
resource_list_delete(rl, type, rid);
|
||||
}
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* Placeholder which claims PnP 'devices' which describe system
|
||||
* resources.
|
||||
@ -683,3 +688,4 @@ static driver_t sysresource_driver = {
|
||||
static devclass_t sysresource_devclass;
|
||||
|
||||
DRIVER_MODULE(sysresource, isa, sysresource_driver, sysresource_devclass, 0, 0);
|
||||
#endif /* DEV_ISA */
|
||||
|
@ -49,6 +49,7 @@
|
||||
*/
|
||||
|
||||
#include "opt_clock.h"
|
||||
#include "opt_isa.h"
|
||||
#include "opt_mca.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -83,7 +84,9 @@
|
||||
#include <i386/isa/icu.h>
|
||||
#include <i386/isa/isa.h>
|
||||
#include <isa/rtc.h>
|
||||
#ifdef DEV_ISA
|
||||
#include <isa/isavar.h>
|
||||
#endif
|
||||
#include <i386/isa/timerreg.h>
|
||||
|
||||
#include <i386/isa/intr_machdep.h>
|
||||
@ -1260,6 +1263,7 @@ tsc_get_timecount(struct timecounter *tc)
|
||||
return (rdtsc());
|
||||
}
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* Attach to the ISA PnP descriptors for the timer and realtime clock.
|
||||
*/
|
||||
@ -1306,3 +1310,4 @@ static devclass_t attimer_devclass;
|
||||
|
||||
DRIVER_MODULE(attimer, isa, attimer_driver, attimer_devclass, 0, 0);
|
||||
DRIVER_MODULE(attimer, acpi, attimer_driver, attimer_devclass, 0, 0);
|
||||
#endif /* DEV_ISA */
|
||||
|
@ -49,6 +49,7 @@
|
||||
*/
|
||||
|
||||
#include "opt_clock.h"
|
||||
#include "opt_isa.h"
|
||||
#include "opt_mca.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -83,7 +84,9 @@
|
||||
#include <i386/isa/icu.h>
|
||||
#include <i386/isa/isa.h>
|
||||
#include <isa/rtc.h>
|
||||
#ifdef DEV_ISA
|
||||
#include <isa/isavar.h>
|
||||
#endif
|
||||
#include <i386/isa/timerreg.h>
|
||||
|
||||
#include <i386/isa/intr_machdep.h>
|
||||
@ -1260,6 +1263,7 @@ tsc_get_timecount(struct timecounter *tc)
|
||||
return (rdtsc());
|
||||
}
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* Attach to the ISA PnP descriptors for the timer and realtime clock.
|
||||
*/
|
||||
@ -1306,3 +1310,4 @@ static devclass_t attimer_devclass;
|
||||
|
||||
DRIVER_MODULE(attimer, isa, attimer_driver, attimer_devclass, 0, 0);
|
||||
DRIVER_MODULE(attimer, acpi, attimer_driver, attimer_devclass, 0, 0);
|
||||
#endif /* DEV_ISA */
|
||||
|
@ -148,6 +148,7 @@ static void init_i8259(void);
|
||||
#define ENMI_IOSTATUS (1 << 5)
|
||||
#endif
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* Bus attachment for the ISA PIC.
|
||||
*/
|
||||
@ -212,6 +213,7 @@ static devclass_t atpic_devclass;
|
||||
|
||||
DRIVER_MODULE(atpic, isa, atpic_driver, atpic_devclass, 0, 0);
|
||||
DRIVER_MODULE(atpic, acpi, atpic_driver, atpic_devclass, 0, 0);
|
||||
#endif /* DEV_ISA */
|
||||
|
||||
/*
|
||||
* Handle a NMI, possibly a machine check.
|
||||
|
@ -148,6 +148,7 @@ static void init_i8259(void);
|
||||
#define ENMI_IOSTATUS (1 << 5)
|
||||
#endif
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* Bus attachment for the ISA PIC.
|
||||
*/
|
||||
@ -212,6 +213,7 @@ static devclass_t atpic_devclass;
|
||||
|
||||
DRIVER_MODULE(atpic, isa, atpic_driver, atpic_devclass, 0, 0);
|
||||
DRIVER_MODULE(atpic, acpi, atpic_driver, atpic_devclass, 0, 0);
|
||||
#endif /* DEV_ISA */
|
||||
|
||||
/*
|
||||
* Handle a NMI, possibly a machine check.
|
||||
|
@ -37,6 +37,7 @@
|
||||
|
||||
#include "opt_cpu.h"
|
||||
#include "opt_debug_npx.h"
|
||||
#include "opt_isa.h"
|
||||
#include "opt_math_emulate.h"
|
||||
#include "opt_npx.h"
|
||||
|
||||
@ -83,7 +84,9 @@
|
||||
#endif
|
||||
#endif
|
||||
#include <i386/isa/intr_machdep.h>
|
||||
#ifdef DEV_ISA
|
||||
#include <isa/isavar.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 387 and 287 Numeric Coprocessor Extension (NPX) Driver.
|
||||
@ -949,6 +952,7 @@ static driver_t npx_driver = {
|
||||
|
||||
static devclass_t npx_devclass;
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* We prefer to attach to the root nexus so that the usual case (exception 16)
|
||||
* doesn't describe the processor as being `on isa'.
|
||||
@ -1003,4 +1007,4 @@ DRIVER_MODULE(npxisa, isa, npxisa_driver, npxisa_devclass, 0, 0);
|
||||
#ifndef PC98
|
||||
DRIVER_MODULE(npxisa, acpi, npxisa_driver, npxisa_devclass, 0, 0);
|
||||
#endif
|
||||
|
||||
#endif /* DEV_ISA */
|
||||
|
@ -31,6 +31,8 @@
|
||||
* Code for dealing with the BIOS in x86 PC systems.
|
||||
*/
|
||||
|
||||
#include "opt_isa.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -44,9 +46,11 @@
|
||||
#include <machine/stdarg.h>
|
||||
#include <machine/vmparam.h>
|
||||
#include <machine/pc/bios.h>
|
||||
#ifdef DEV_ISA
|
||||
#include <isa/isavar.h>
|
||||
#include <isa/pnpreg.h>
|
||||
#include <isa/pnpvar.h>
|
||||
#endif
|
||||
|
||||
#define BIOS_START 0xe0000
|
||||
#define BIOS_SIZE 0x20000
|
||||
@ -459,6 +463,7 @@ bios16(struct bios_args *args, char *fmt, ...)
|
||||
return (i);
|
||||
}
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* PnP BIOS interface; enumerate devices only known to the system
|
||||
* BIOS and save information about them for later use.
|
||||
@ -664,3 +669,4 @@ static driver_t pnpbios_driver = {
|
||||
static devclass_t pnpbios_devclass;
|
||||
|
||||
DRIVER_MODULE(pnpbios, isa, pnpbios_driver, pnpbios_devclass, 0, 0);
|
||||
#endif /* DEV_ISA */
|
||||
|
@ -40,6 +40,8 @@
|
||||
* and I/O memory address space.
|
||||
*/
|
||||
|
||||
#include "opt_isa.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/bus.h>
|
||||
@ -62,12 +64,14 @@
|
||||
#include <machine/mpapic.h>
|
||||
#endif
|
||||
|
||||
#ifdef DEV_ISA
|
||||
#include <isa/isavar.h>
|
||||
#ifdef PC98
|
||||
#include <pc98/pc98/pc98.h>
|
||||
#else
|
||||
#include <i386/isa/isa.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <i386/isa/icu.h>
|
||||
#include <i386/isa/intr_machdep.h>
|
||||
#include <sys/rtprio.h>
|
||||
@ -636,6 +640,7 @@ nexus_delete_resource(device_t dev, device_t child, int type, int rid)
|
||||
resource_list_delete(rl, type, rid);
|
||||
}
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* Placeholder which claims PnP 'devices' which describe system
|
||||
* resources.
|
||||
@ -683,3 +688,4 @@ static driver_t sysresource_driver = {
|
||||
static devclass_t sysresource_devclass;
|
||||
|
||||
DRIVER_MODULE(sysresource, isa, sysresource_driver, sysresource_devclass, 0, 0);
|
||||
#endif /* DEV_ISA */
|
||||
|
@ -40,6 +40,8 @@
|
||||
* and I/O memory address space.
|
||||
*/
|
||||
|
||||
#include "opt_isa.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/bus.h>
|
||||
@ -62,12 +64,14 @@
|
||||
#include <machine/mpapic.h>
|
||||
#endif
|
||||
|
||||
#ifdef DEV_ISA
|
||||
#include <isa/isavar.h>
|
||||
#ifdef PC98
|
||||
#include <pc98/pc98/pc98.h>
|
||||
#else
|
||||
#include <i386/isa/isa.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <i386/isa/icu.h>
|
||||
#include <i386/isa/intr_machdep.h>
|
||||
#include <sys/rtprio.h>
|
||||
@ -636,6 +640,7 @@ nexus_delete_resource(device_t dev, device_t child, int type, int rid)
|
||||
resource_list_delete(rl, type, rid);
|
||||
}
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* Placeholder which claims PnP 'devices' which describe system
|
||||
* resources.
|
||||
@ -683,3 +688,4 @@ static driver_t sysresource_driver = {
|
||||
static devclass_t sysresource_devclass;
|
||||
|
||||
DRIVER_MODULE(sysresource, isa, sysresource_driver, sysresource_devclass, 0, 0);
|
||||
#endif /* DEV_ISA */
|
||||
|
@ -49,6 +49,7 @@
|
||||
*/
|
||||
|
||||
#include "opt_clock.h"
|
||||
#include "opt_isa.h"
|
||||
#include "opt_mca.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -83,7 +84,9 @@
|
||||
#include <i386/isa/icu.h>
|
||||
#include <i386/isa/isa.h>
|
||||
#include <isa/rtc.h>
|
||||
#ifdef DEV_ISA
|
||||
#include <isa/isavar.h>
|
||||
#endif
|
||||
#include <i386/isa/timerreg.h>
|
||||
|
||||
#include <i386/isa/intr_machdep.h>
|
||||
@ -1260,6 +1263,7 @@ tsc_get_timecount(struct timecounter *tc)
|
||||
return (rdtsc());
|
||||
}
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* Attach to the ISA PnP descriptors for the timer and realtime clock.
|
||||
*/
|
||||
@ -1306,3 +1310,4 @@ static devclass_t attimer_devclass;
|
||||
|
||||
DRIVER_MODULE(attimer, isa, attimer_driver, attimer_devclass, 0, 0);
|
||||
DRIVER_MODULE(attimer, acpi, attimer_driver, attimer_devclass, 0, 0);
|
||||
#endif /* DEV_ISA */
|
||||
|
@ -49,6 +49,7 @@
|
||||
*/
|
||||
|
||||
#include "opt_clock.h"
|
||||
#include "opt_isa.h"
|
||||
#include "opt_mca.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -83,7 +84,9 @@
|
||||
#include <i386/isa/icu.h>
|
||||
#include <i386/isa/isa.h>
|
||||
#include <isa/rtc.h>
|
||||
#ifdef DEV_ISA
|
||||
#include <isa/isavar.h>
|
||||
#endif
|
||||
#include <i386/isa/timerreg.h>
|
||||
|
||||
#include <i386/isa/intr_machdep.h>
|
||||
@ -1260,6 +1263,7 @@ tsc_get_timecount(struct timecounter *tc)
|
||||
return (rdtsc());
|
||||
}
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* Attach to the ISA PnP descriptors for the timer and realtime clock.
|
||||
*/
|
||||
@ -1306,3 +1310,4 @@ static devclass_t attimer_devclass;
|
||||
|
||||
DRIVER_MODULE(attimer, isa, attimer_driver, attimer_devclass, 0, 0);
|
||||
DRIVER_MODULE(attimer, acpi, attimer_driver, attimer_devclass, 0, 0);
|
||||
#endif /* DEV_ISA */
|
||||
|
@ -148,6 +148,7 @@ static void init_i8259(void);
|
||||
#define ENMI_IOSTATUS (1 << 5)
|
||||
#endif
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* Bus attachment for the ISA PIC.
|
||||
*/
|
||||
@ -212,6 +213,7 @@ static devclass_t atpic_devclass;
|
||||
|
||||
DRIVER_MODULE(atpic, isa, atpic_driver, atpic_devclass, 0, 0);
|
||||
DRIVER_MODULE(atpic, acpi, atpic_driver, atpic_devclass, 0, 0);
|
||||
#endif /* DEV_ISA */
|
||||
|
||||
/*
|
||||
* Handle a NMI, possibly a machine check.
|
||||
|
@ -148,6 +148,7 @@ static void init_i8259(void);
|
||||
#define ENMI_IOSTATUS (1 << 5)
|
||||
#endif
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* Bus attachment for the ISA PIC.
|
||||
*/
|
||||
@ -212,6 +213,7 @@ static devclass_t atpic_devclass;
|
||||
|
||||
DRIVER_MODULE(atpic, isa, atpic_driver, atpic_devclass, 0, 0);
|
||||
DRIVER_MODULE(atpic, acpi, atpic_driver, atpic_devclass, 0, 0);
|
||||
#endif /* DEV_ISA */
|
||||
|
||||
/*
|
||||
* Handle a NMI, possibly a machine check.
|
||||
|
@ -37,6 +37,7 @@
|
||||
|
||||
#include "opt_cpu.h"
|
||||
#include "opt_debug_npx.h"
|
||||
#include "opt_isa.h"
|
||||
#include "opt_math_emulate.h"
|
||||
#include "opt_npx.h"
|
||||
|
||||
@ -83,7 +84,9 @@
|
||||
#endif
|
||||
#endif
|
||||
#include <i386/isa/intr_machdep.h>
|
||||
#ifdef DEV_ISA
|
||||
#include <isa/isavar.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 387 and 287 Numeric Coprocessor Extension (NPX) Driver.
|
||||
@ -949,6 +952,7 @@ static driver_t npx_driver = {
|
||||
|
||||
static devclass_t npx_devclass;
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* We prefer to attach to the root nexus so that the usual case (exception 16)
|
||||
* doesn't describe the processor as being `on isa'.
|
||||
@ -1003,4 +1007,4 @@ DRIVER_MODULE(npxisa, isa, npxisa_driver, npxisa_devclass, 0, 0);
|
||||
#ifndef PC98
|
||||
DRIVER_MODULE(npxisa, acpi, npxisa_driver, npxisa_devclass, 0, 0);
|
||||
#endif
|
||||
|
||||
#endif /* DEV_ISA */
|
||||
|
@ -49,6 +49,7 @@
|
||||
*/
|
||||
|
||||
#include "opt_clock.h"
|
||||
#include "opt_isa.h"
|
||||
#include "opt_mca.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -83,7 +84,9 @@
|
||||
#include <i386/isa/icu.h>
|
||||
#include <i386/isa/isa.h>
|
||||
#include <isa/rtc.h>
|
||||
#ifdef DEV_ISA
|
||||
#include <isa/isavar.h>
|
||||
#endif
|
||||
#include <i386/isa/timerreg.h>
|
||||
|
||||
#include <i386/isa/intr_machdep.h>
|
||||
@ -1260,6 +1263,7 @@ tsc_get_timecount(struct timecounter *tc)
|
||||
return (rdtsc());
|
||||
}
|
||||
|
||||
#ifdef DEV_ISA
|
||||
/*
|
||||
* Attach to the ISA PnP descriptors for the timer and realtime clock.
|
||||
*/
|
||||
@ -1306,3 +1310,4 @@ static devclass_t attimer_devclass;
|
||||
|
||||
DRIVER_MODULE(attimer, isa, attimer_driver, attimer_devclass, 0, 0);
|
||||
DRIVER_MODULE(attimer, acpi, attimer_driver, attimer_devclass, 0, 0);
|
||||
#endif /* DEV_ISA */
|
||||
|
Loading…
Reference in New Issue
Block a user