From owner-p4-projects@FreeBSD.ORG Wed Sep 24 14:47:21 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 755FD16A4C0; Wed, 24 Sep 2003 14:47:21 -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 3398916A4B3 for ; Wed, 24 Sep 2003 14:47:21 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFC2343FE0 for ; Wed, 24 Sep 2003 14:47:18 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8OLlIXJ018091 for ; Wed, 24 Sep 2003 14:47:18 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8OLlIiC018088 for perforce@freebsd.org; Wed, 24 Sep 2003 14:47:18 -0700 (PDT) (envelope-from peter@freebsd.org) Date: Wed, 24 Sep 2003 14:47:18 -0700 (PDT) Message-Id: <200309242147.h8OLlIiC018088@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 38540 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2003 21:47:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=38540 Change 38540 by peter@peter_daintree on 2003/09/24 14:46:33 integrate -I from jhb_acpipci Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/io_apic.c#5 integrate .. //depot/projects/hammer/sys/jhb_notes#3 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/io_apic.c#5 (text+ko) ==== @@ -634,13 +634,14 @@ ioapic_write(apic, IOAPIC_REDTBL_LO(i), flags); /* - * Route interrupts to all CPU's by default using physical + * Route interrupts to the BSP by default using physical * addressing. Vectored interrupts get readdressed using - * logical IDs when they are enabled. + * logical IDs to CPU clusters when they are enabled. */ flags = ioapic_read(apic, IOAPIC_REDTBL_HI(i)); flags &= ~IOART_DEST; - flags |= IOART_DEST; + KASSERT(PCPU_GET(apic_id) == lapic_id(), ("APIC ID mismatch")); /* XXXTEST */ + flags |= PCPU_GET(apic_id) << APIC_ID_SHIFT; ioapic_write(apic, IOAPIC_REDTBL_HI(i), flags); mtx_unlock_spin(&icu_lock); if (pin->io_vector >= 0) { @@ -718,13 +719,18 @@ mixedpic_disable_source(struct intsrc *isrc) { struct mixedpic_intsrc *mpsrc; +#if 0 struct intsrc *intpin; +#endif mpsrc = (struct mixedpic_intsrc *)isrc; +#if 0 intpin = mpsrc->mp_apicpin; +#endif isrc = mpsrc->mp_atpicsrc; isrc->is_pic->pic_disable_source(isrc); +#if 0 /* * If the interrupt is pending in the local APIC, assume that * we have been called just before the local APIC gets its @@ -732,19 +738,26 @@ */ if (intpin->is_pic->pic_source_pending(intpin)) isrc->is_pic->pic_eoi_source(isrc); +#endif } static void mixedpic_eoi_source(struct intsrc *isrc) { struct mixedpic_intsrc *mpsrc; +#if 0 struct intsrc *intpin; +#endif mpsrc = (struct mixedpic_intsrc *)isrc; +#if 0 intpin = mpsrc->mp_apicpin; +#endif isrc = mpsrc->mp_atpicsrc; isrc->is_pic->pic_eoi_source(isrc); +#if 0 intpin->is_pic->pic_eoi_source(intpin); +#endif } static void @@ -753,7 +766,7 @@ struct mixedpic_intsrc *mpsrc; mpsrc = (struct mixedpic_intsrc *)isrc; - isrc = mpsrc->mp_apicpin; + isrc = mpsrc->mp_atpicsrc; isrc->is_pic->pic_enable_intr(isrc); } ==== //depot/projects/hammer/sys/jhb_notes#3 (text+ko) ==== @@ -27,8 +27,14 @@ - isa/vector.s Todo: +- Set PCPU(apic_id) for UP case in lapic_init(). +- Use apic id of BSP (current CPU) when programming temporary physical + destinations into I/O APIC RDT entries. - Fix IDT_SYSCALL mapping in APIC case - Test mixed mode + - Dang, mixed mode interrupts don't actually set the bit in the ISR. *grump* + - Need to write mixed mode interrupt entry points and use those in + mixed mode enable_intr() - Kill isa_irq_pending() (maybe, is this an MI function?) - Add ACPI MADT APIC enumerator. - solve ACPI module problem where madt wants APIC symbols :( @@ -53,4 +59,4 @@ Unrelated to this branch: - Work on cleaning up nested includes in sys/* headers. According to Bruce, - the only nested sys/* headers should be _*.h and queue.h.+ the only nested sys/* headers should be _*.h and queue.h.