From owner-p4-projects Fri Sep 20 21:25:39 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2F89F37B401; Fri, 20 Sep 2002 21:25:31 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC28537B404 for ; Fri, 20 Sep 2002 21:25:30 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 206E443E42 for ; Fri, 20 Sep 2002 21:25:30 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g8L4PUCo023976 for ; Fri, 20 Sep 2002 21:25:30 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g8L4PTuW023973 for perforce@freebsd.org; Fri, 20 Sep 2002 21:25:29 -0700 (PDT) Date: Fri, 20 Sep 2002 21:25:29 -0700 (PDT) Message-Id: <200209210425.g8L4PTuW023973@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm Subject: PERFORCE change 17828 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17828 Change 17828 by peter@peter_daintree on 2002/09/20 21:24:34 remove microchannel (I defy somebody to show me a hammer + microchannel system!), various other cruft. Get rid of TPR stuff since we actually have %cr8 as a TPR replacement which will be a lot nicer. That all needs to be redone. Affected files ... .. //depot/projects/hammer/sys/x86_64/isa/clock.c#2 edit .. //depot/projects/hammer/sys/x86_64/isa/intr_machdep.c#3 edit .. //depot/projects/hammer/sys/x86_64/isa/intr_machdep.h#2 edit .. //depot/projects/hammer/sys/x86_64/x86_64/exception.s#6 edit .. //depot/projects/hammer/sys/x86_64/x86_64/nexus.c#3 edit .. //depot/projects/hammer/sys/x86_64/x86_64/swtch.s#4 edit Differences ... ==== //depot/projects/hammer/sys/x86_64/isa/clock.c#2 (text+ko) ==== @@ -50,7 +50,6 @@ #include "opt_clock.h" #include "opt_isa.h" -#include "opt_mca.h" #include #include @@ -91,10 +90,6 @@ #include -#ifdef DEV_MCA -#include -#endif - #ifdef APIC_IO #include /* The interrupt triggered by the 8254 (timer) chip */ @@ -262,11 +257,6 @@ } break; } -#ifdef DEV_MCA - /* Reset clock interrupt by asserting bit 7 of port 0x61 */ - if (MCA_system) - outb(0x61, inb(0x61) | 0x80); -#endif } /* ==== //depot/projects/hammer/sys/x86_64/isa/intr_machdep.c#3 (text+ko) ==== @@ -39,7 +39,6 @@ #include "opt_auto_eoi.h" #include "opt_isa.h" -#include "opt_mca.h" #include #include @@ -60,7 +59,6 @@ #include #if defined(APIC_IO) -#include /** FAST_HI */ #include #include #endif /* APIC_IO */ @@ -76,10 +74,6 @@ #include #endif -#ifdef DEV_MCA -#include -#endif - /* * Per-interrupt data. */ @@ -238,10 +232,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."); @@ -324,12 +314,7 @@ static void init_i8259() { -#ifdef DEV_MCA - if (MCA_system) - outb(IO_ICU1, 0x19); /* reset; program device, four bytes */ - else -#endif - outb(IO_ICU1, 0x11); /* reset; program device, four bytes */ + outb(IO_ICU1, 0x11); /* reset; program device, four bytes */ outb(IO_ICU1+ICU_IMR_OFFSET, NRSVIDT); /* starting at this vector index */ outb(IO_ICU1+ICU_IMR_OFFSET, IRQ_SLAVE); /* slave on line 7 */ @@ -342,12 +327,7 @@ outb(IO_ICU1, 0x0a); /* default to IRR on read */ outb(IO_ICU1, 0xc0 | (3 - 1)); /* pri order 3-7, 0-2 (com2 first) */ -#ifdef DEV_MCA - if (MCA_system) - outb(IO_ICU2, 0x19); /* reset; program device, four bytes */ - else -#endif - outb(IO_ICU2, 0x11); /* reset; program device, four bytes */ + outb(IO_ICU2, 0x11); /* reset; program device, four bytes */ outb(IO_ICU2+ICU_IMR_OFFSET, NRSVIDT+8); /* staring at this vector index */ outb(IO_ICU2+ICU_IMR_OFFSET, ICU_SLAVEID); /* my slave id is 7 */ @@ -456,11 +436,6 @@ int icu_setup(int intr, driver_intr_t *handler, void *arg, int flags) { -#ifdef FAST_HI - int select; /* the select register is 8 bits */ - int vector; - u_int32_t value; /* the window register is 32 bits */ -#endif /* FAST_HI */ register_t crit; #if defined(APIC_IO) @@ -478,35 +453,9 @@ mtx_lock_spin(&icu_lock); intr_handler[intr] = handler; intr_unit[intr] = arg; -#ifdef FAST_HI - if (flags & INTR_FAST) { - vector = TPR_FAST_INTS + intr; - setidt(vector, fastintr[intr], - SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - } - else { - vector = TPR_SLOW_INTS + intr; - setidt(vector, slowintr[intr], - SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - } -#ifdef APIC_INTR_REORDER - set_lapic_isrloc(intr, vector); -#endif - /* - * Reprogram the vector in the IO APIC. - */ - if (int_to_apicintpin[intr].ioapic >= 0) { - select = int_to_apicintpin[intr].redirindex; - value = io_apic_read(int_to_apicintpin[intr].ioapic, - select) & ~IOART_INTVEC; - io_apic_write(int_to_apicintpin[intr].ioapic, - select, value | vector); - } -#else setidt(ICU_OFFSET + intr, flags & INTR_FAST ? fastintr[intr] : slowintr[intr], SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); -#endif /* FAST_HI */ INTREN(1 << intr); mtx_unlock_spin(&icu_lock); intr_restore(crit); @@ -534,17 +483,8 @@ intr_countp[intr] = &intrcnt[1 + intr]; intr_handler[intr] = isa_strayintr; intr_unit[intr] = &intr_unit[intr]; -#ifdef FAST_HI_XXX - /* XXX how do I re-create dvp here? */ - setidt(flags & INTR_FAST ? TPR_FAST_INTS + intr : TPR_SLOW_INTS + intr, - slowintr[intr], SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); -#else /* FAST_HI */ -#ifdef APIC_INTR_REORDER - set_lapic_isrloc(intr, ICU_OFFSET + intr); -#endif setidt(ICU_OFFSET + intr, slowintr[intr], SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); -#endif /* FAST_HI */ mtx_unlock_spin(&icu_lock); intr_restore(crit); return (0); ==== //depot/projects/hammer/sys/x86_64/isa/intr_machdep.h#2 (text+ko) ==== @@ -99,11 +99,6 @@ #define TPR_BLOCK_XCPUSTOP 0xaf /* */ #define TPR_BLOCK_ALL 0xff /* all INTs */ -#ifdef TEST_TEST1 -/* put a 'fake' HWI in top of APIC prio 0x3x, 32 + 31 = 63 = 0x3f */ -#define XTEST1_OFFSET (ICU_OFFSET + 31) -#endif /** TEST_TEST1 */ - /* TLB shootdowns */ #define XINVLTLB_OFFSET (ICU_OFFSET + 112) /* 0x90 */ #define XINVLPG_OFFSET (ICU_OFFSET + 113) /* 0x91 */ @@ -208,12 +203,6 @@ Xspuriousint, /* handle APIC "spurious INTs" */ Xrendezvous; /* handle CPU rendezvous */ -#ifdef TEST_TEST1 -inthand_t - Xtest1; /* 'fake' HWI at top of APIC prio 0x3x, 32+31 = 0x3f */ -#endif /** TEST_TEST1 */ -#endif /* SMP || APIC_IO */ - #ifdef APIC_IO /* * This is to accommodate "mixed-mode" programming for ==== //depot/projects/hammer/sys/x86_64/x86_64/exception.s#6 (text+ko) ==== @@ -38,9 +38,6 @@ #include #include #include -#ifdef SMP -#include /** various SMP options */ -#endif #include "assym.s" ==== //depot/projects/hammer/sys/x86_64/x86_64/nexus.c#3 (text+ko) ==== @@ -240,12 +240,6 @@ panic("nexus_attach eisa"); device_probe_and_attach(child); } - if (!devclass_get_device(devclass_find("mca"), 0)) { - child = BUS_ADD_CHILD(dev, 0, "mca", 0); - if (child == 0) - panic("nexus_probe mca"); - device_probe_and_attach(child); - } if (!devclass_get_device(devclass_find("isa"), 0)) { child = BUS_ADD_CHILD(dev, 0, "isa", 0); if (child == NULL) ==== //depot/projects/hammer/sys/x86_64/x86_64/swtch.s#4 (text+ko) ==== @@ -38,11 +38,6 @@ #include -#ifdef SMP -#include -#include /* CHEAP_TPR, GRAB_LOPRIO */ -#endif - #include "assym.s" /*****************************************************************************/ @@ -51,8 +46,6 @@ .data - .globl panic - #ifdef SWTCH_OPTIM_STATS .globl swtch_optim_stats, tlb_flush_count swtch_optim_stats: .long 0 /* number of _swtch_optims */ @@ -123,10 +116,6 @@ movl %eax,PCB_DR0(%edx) 1: -#ifdef SMP - /* XXX FIXME: we should be saving the local APIC TPR */ -#endif - /* have we used fp, and need a save? */ cmpl %ecx,PCPU(FPCURTHREAD) jne 1f @@ -233,21 +222,9 @@ pushl PCB_PSL(%edx) popfl -#if defined(SMP) && defined(GRAB_LOPRIO) - /* Hold LOPRIO for interrupts. */ -#ifdef CHEAP_TPR - movl $0, lapic+LA_TPR -#else - andl $~APIC_TPR_PRIO, lapic+LA_TPR -#endif -#endif movl %edx, PCPU(CURPCB) movl %ecx, PCPU(CURTHREAD) /* into next thread */ -#ifdef SMP - /* XXX FIXME: we should be restoring the local APIC TPR */ -#endif - /* * Determine the LDT to use and load it if is the default one and * that is not the current one. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message