diff options
| author | Mike Smith <msmith@FreeBSD.org> | 2000-01-26 01:32:51 +0000 | 
|---|---|---|
| committer | Mike Smith <msmith@FreeBSD.org> | 2000-01-26 01:32:51 +0000 | 
| commit | a6291d555883e78e52ee005ce62515e32dc1ffe8 (patch) | |
| tree | 405b7f4ebd89ecd2fff0531dd262929239e7bd29 | |
| parent | f54537c6c0fe1ed71542536ca36df64b09103b67 (diff) | |
Notes
| -rw-r--r-- | sys/amd64/amd64/legacy.c | 21 | ||||
| -rw-r--r-- | sys/amd64/amd64/nexus.c | 21 | ||||
| -rw-r--r-- | sys/i386/i386/legacy.c | 21 | ||||
| -rw-r--r-- | sys/i386/i386/nexus.c | 21 | 
4 files changed, 48 insertions, 36 deletions
| diff --git a/sys/amd64/amd64/legacy.c b/sys/amd64/amd64/legacy.c index 11193eb8e44b..f5554f8beac1 100644 --- a/sys/amd64/amd64/legacy.c +++ b/sys/amd64/amd64/legacy.c @@ -122,12 +122,6 @@ static devclass_t nexus_devclass;  DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); -#ifdef APIC_IO -#define LASTIRQ	(NINTR - 1) -#else -#define LASTIRQ 15 -#endif -  static int  nexus_probe(device_t dev)  { @@ -140,15 +134,24 @@ nexus_probe(device_t dev)  	 * multi-ISA-bus systems.  PCI interrupts are routed to the ISA  	 * component, so in a way, PCI can be a partial child of an ISA bus(!).  	 * APIC interrupts are global though. +	 * In the non-APIC case, disallow the use of IRQ 2.  	 */  	irq_rman.rm_start = 0; -	irq_rman.rm_end = LASTIRQ;  	irq_rman.rm_type = RMAN_ARRAY;  	irq_rman.rm_descr = "Interrupt request lines"; +#ifdef APIC_IO +	irq_rman.rm_end = APIC_INTMAPSIZE - 1;  	if (rman_init(&irq_rman) -	    || rman_manage_region(&irq_rman, 0, 1) -	    || rman_manage_region(&irq_rman, 3, LASTIRQ)) +	    || rman_manage_region(&irq_rman, +				  irq_rman.rm_start, irq_rman.rm_end))  		panic("nexus_probe irq_rman"); +#else +	irq_rman.rm_end = 15; +	if (rman_init(&irq_rman) +	    || rman_manage_region(&irq_rman, irq_rman.rm_start, 1) +	    || rman_manage_region(&irq_rman, 3, irq_rman.rm_end)) +		panic("nexus_probe irq_rman"); +#endif  	/*  	 * ISA DMA on PCI systems is implemented in the ISA part of each diff --git a/sys/amd64/amd64/nexus.c b/sys/amd64/amd64/nexus.c index 11193eb8e44b..f5554f8beac1 100644 --- a/sys/amd64/amd64/nexus.c +++ b/sys/amd64/amd64/nexus.c @@ -122,12 +122,6 @@ static devclass_t nexus_devclass;  DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); -#ifdef APIC_IO -#define LASTIRQ	(NINTR - 1) -#else -#define LASTIRQ 15 -#endif -  static int  nexus_probe(device_t dev)  { @@ -140,15 +134,24 @@ nexus_probe(device_t dev)  	 * multi-ISA-bus systems.  PCI interrupts are routed to the ISA  	 * component, so in a way, PCI can be a partial child of an ISA bus(!).  	 * APIC interrupts are global though. +	 * In the non-APIC case, disallow the use of IRQ 2.  	 */  	irq_rman.rm_start = 0; -	irq_rman.rm_end = LASTIRQ;  	irq_rman.rm_type = RMAN_ARRAY;  	irq_rman.rm_descr = "Interrupt request lines"; +#ifdef APIC_IO +	irq_rman.rm_end = APIC_INTMAPSIZE - 1;  	if (rman_init(&irq_rman) -	    || rman_manage_region(&irq_rman, 0, 1) -	    || rman_manage_region(&irq_rman, 3, LASTIRQ)) +	    || rman_manage_region(&irq_rman, +				  irq_rman.rm_start, irq_rman.rm_end))  		panic("nexus_probe irq_rman"); +#else +	irq_rman.rm_end = 15; +	if (rman_init(&irq_rman) +	    || rman_manage_region(&irq_rman, irq_rman.rm_start, 1) +	    || rman_manage_region(&irq_rman, 3, irq_rman.rm_end)) +		panic("nexus_probe irq_rman"); +#endif  	/*  	 * ISA DMA on PCI systems is implemented in the ISA part of each diff --git a/sys/i386/i386/legacy.c b/sys/i386/i386/legacy.c index 11193eb8e44b..f5554f8beac1 100644 --- a/sys/i386/i386/legacy.c +++ b/sys/i386/i386/legacy.c @@ -122,12 +122,6 @@ static devclass_t nexus_devclass;  DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); -#ifdef APIC_IO -#define LASTIRQ	(NINTR - 1) -#else -#define LASTIRQ 15 -#endif -  static int  nexus_probe(device_t dev)  { @@ -140,15 +134,24 @@ nexus_probe(device_t dev)  	 * multi-ISA-bus systems.  PCI interrupts are routed to the ISA  	 * component, so in a way, PCI can be a partial child of an ISA bus(!).  	 * APIC interrupts are global though. +	 * In the non-APIC case, disallow the use of IRQ 2.  	 */  	irq_rman.rm_start = 0; -	irq_rman.rm_end = LASTIRQ;  	irq_rman.rm_type = RMAN_ARRAY;  	irq_rman.rm_descr = "Interrupt request lines"; +#ifdef APIC_IO +	irq_rman.rm_end = APIC_INTMAPSIZE - 1;  	if (rman_init(&irq_rman) -	    || rman_manage_region(&irq_rman, 0, 1) -	    || rman_manage_region(&irq_rman, 3, LASTIRQ)) +	    || rman_manage_region(&irq_rman, +				  irq_rman.rm_start, irq_rman.rm_end))  		panic("nexus_probe irq_rman"); +#else +	irq_rman.rm_end = 15; +	if (rman_init(&irq_rman) +	    || rman_manage_region(&irq_rman, irq_rman.rm_start, 1) +	    || rman_manage_region(&irq_rman, 3, irq_rman.rm_end)) +		panic("nexus_probe irq_rman"); +#endif  	/*  	 * ISA DMA on PCI systems is implemented in the ISA part of each diff --git a/sys/i386/i386/nexus.c b/sys/i386/i386/nexus.c index 11193eb8e44b..f5554f8beac1 100644 --- a/sys/i386/i386/nexus.c +++ b/sys/i386/i386/nexus.c @@ -122,12 +122,6 @@ static devclass_t nexus_devclass;  DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); -#ifdef APIC_IO -#define LASTIRQ	(NINTR - 1) -#else -#define LASTIRQ 15 -#endif -  static int  nexus_probe(device_t dev)  { @@ -140,15 +134,24 @@ nexus_probe(device_t dev)  	 * multi-ISA-bus systems.  PCI interrupts are routed to the ISA  	 * component, so in a way, PCI can be a partial child of an ISA bus(!).  	 * APIC interrupts are global though. +	 * In the non-APIC case, disallow the use of IRQ 2.  	 */  	irq_rman.rm_start = 0; -	irq_rman.rm_end = LASTIRQ;  	irq_rman.rm_type = RMAN_ARRAY;  	irq_rman.rm_descr = "Interrupt request lines"; +#ifdef APIC_IO +	irq_rman.rm_end = APIC_INTMAPSIZE - 1;  	if (rman_init(&irq_rman) -	    || rman_manage_region(&irq_rman, 0, 1) -	    || rman_manage_region(&irq_rman, 3, LASTIRQ)) +	    || rman_manage_region(&irq_rman, +				  irq_rman.rm_start, irq_rman.rm_end))  		panic("nexus_probe irq_rman"); +#else +	irq_rman.rm_end = 15; +	if (rman_init(&irq_rman) +	    || rman_manage_region(&irq_rman, irq_rman.rm_start, 1) +	    || rman_manage_region(&irq_rman, 3, irq_rman.rm_end)) +		panic("nexus_probe irq_rman"); +#endif  	/*  	 * ISA DMA on PCI systems is implemented in the ISA part of each | 
