PERFORCE change 52429 for review

Peter Wemm peter at FreeBSD.org
Fri May 7 08:50:56 PDT 2004


http://perforce.freebsd.org/chv.cgi?CH=52429

Change 52429 by peter at peter_daintree on 2004/05/07 08:50:39

	oops, some PC98/MCA stuff slipped back in with a recent IFC

Affected files ...

.. //depot/projects/hammer/sys/amd64/amd64/mptable.c#23 edit
.. //depot/projects/hammer/sys/amd64/isa/atpic.c#38 edit
.. //depot/projects/hammer/sys/amd64/isa/nmi.c#11 edit

Differences ...

==== //depot/projects/hammer/sys/amd64/amd64/mptable.c#23 (text+ko) ====

@@ -546,14 +546,12 @@
 		return (INTR_POLARITY_HIGH);
 	case PCI:
 		return (INTR_POLARITY_LOW);
-#ifndef PC98
 	case EISA:
 		KASSERT(src_bus_irq < 16, ("Invalid EISA IRQ %d", src_bus_irq));
 		if (elcr_read_trigger(src_bus_irq) == INTR_TRIGGER_LEVEL)
 			return (INTR_POLARITY_LOW);
 		else
 			return (INTR_POLARITY_HIGH);
-#endif
 	default:
 		panic("%s: unknown bus type %d", __func__,
 		    busses[src_bus].bus_type);
@@ -573,11 +571,9 @@
 		return (INTR_TRIGGER_EDGE);
 	case PCI:
 		return (INTR_TRIGGER_LEVEL);
-#ifndef PC98
 	case EISA:
 		KASSERT(src_bus_irq < 16, ("Invalid EISA IRQ %d", src_bus_irq));
 		return (elcr_read_trigger(src_bus_irq));
-#endif
 	default:
 		panic("%s: unknown bus type %d", __func__,
 		    busses[src_bus].bus_type);

==== //depot/projects/hammer/sys/amd64/isa/atpic.c#38 (text+ko) ====

@@ -88,9 +88,7 @@
 static void	atpic_init(void *dummy);
 
 unsigned int imen;	/* XXX */
-#ifndef PC98
 static int using_elcr;
-#endif
 
 inthand_t
 	IDTVEC(atpic_intr0), IDTVEC(atpic_intr1), IDTVEC(atpic_intr2),
@@ -259,10 +257,8 @@
 
 	if (ai->at_irq == 0) {
 		i8259_init(ap, ap == &atpics[SLAVE]);
-#ifndef PC98
 		if (ap == &atpics[SLAVE] && using_elcr)
 			elcr_resume();
-#endif
 	}
 }
 
@@ -292,17 +288,6 @@
 	if (ai->at_trigger == trig)
 		return (0);
 
-#ifdef PC98
-	if ((vector == 0 || vector == 1 || vector == 7 || vector == 8) &&
-	    trig == INTR_TRIGGER_LEVEL) {
-		if (bootverbose)
-			printf(
-		"atpic: Ignoring invalid level/low configuration for IRQ%u\n",
-			    vector);
-		return (EINVAL);
-	}
-	return (ENXIO);
-#else
 	/*
 	 * Certain IRQs can never be level/lo, so don't try to set them
 	 * that way if asked.  At least some ELCR registers ignore setting
@@ -331,7 +316,6 @@
 	ai->at_trigger = trig;
 	mtx_unlock_spin(&icu_lock);
 	return (0);
-#endif /* PC98 */
 }
 
 static void
@@ -397,28 +381,6 @@
 		    ai->at_irq, ai->at_intr, SDT_SYSIGT, SEL_KPL, 0);
 	}
 
-#ifdef DEV_MCA
-	/* For MCA systems, all interrupts are level triggered. */
-	if (MCA_system)
-		for (i = 0, ai = atintrs; i < NUM_ISA_IRQS; i++, ai++)
-			ai->at_trigger = INTR_TRIGGER_LEVEL;
-	else
-#endif
-
-#ifdef PC98
-	for (i = 0, ai = atintrs; i < NUM_ISA_IRQS; i++, ai++)
-		switch (i) {
-		case 0:
-		case 1:
-		case 7:
-		case 8:
-			ai->at_trigger = INTR_TRIGGER_EDGE;
-			break;
-		default:
-			ai->at_trigger = INTR_TRIGGER_LEVEL;
-			break;
-		}
-#else
 	/*
 	 * Look for an ELCR.  If we find one, update the trigger modes.
 	 * If we don't find one, assume that IRQs 0, 1, 2, and 13 are
@@ -449,7 +411,6 @@
 				break;
 			}
 	}
-#endif /* PC98 */
 }
 
 static void

==== //depot/projects/hammer/sys/amd64/isa/nmi.c#11 (text+ko) ====

@@ -43,10 +43,6 @@
 
 #include <machine/md_var.h>
 
-#ifdef DEV_MCA
-#include <i386/bios/mca_machdep.h>
-#endif
-
 #define NMI_PARITY (1 << 7)
 #define NMI_IOCHAN (1 << 6)
 #define ENMI_WATCHDOG (1 << 7)
@@ -65,10 +61,6 @@
 	int eisa_port = inb(0x461);
 
 	log(LOG_CRIT, "NMI ISA %x, EISA %x\n", isa_port, eisa_port);
-#ifdef DEV_MCA
-	if (MCA_system && mca_bus_nmi())
-		return(0);
-#endif
 	
 	if (isa_port & NMI_PARITY) {
 		log(LOG_CRIT, "RAM parity error, likely hardware failure.");


More information about the p4-projects mailing list