From owner-p4-projects Thu Mar 13 7:51:27 2003 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 476F337B404; Thu, 13 Mar 2003 07:51:25 -0800 (PST) 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 E7C6F37B401 for ; Thu, 13 Mar 2003 07:51:24 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E8D943FCB for ; Thu, 13 Mar 2003 07:51:24 -0800 (PST) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h2DFpO0U056480 for ; Thu, 13 Mar 2003 07:51:24 -0800 (PST) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h2DFpN9Z056477 for perforce@freebsd.org; Thu, 13 Mar 2003 07:51:23 -0800 (PST) Date: Thu, 13 Mar 2003 07:51:23 -0800 (PST) Message-Id: <200303131551.h2DFpN9Z056477@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 26838 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://perforce.freebsd.org/chv.cgi?CH=26838 Change 26838 by jhb@jhb_laptop on 2003/03/13 07:51:08 Axe a few more magic numbers. Affected files ... .. //depot/projects/smpng/sys/i386/i386/mp_machdep.c#42 edit Differences ... ==== //depot/projects/smpng/sys/i386/i386/mp_machdep.c#42 (text+ko) ==== @@ -2256,10 +2256,13 @@ icr_hi |= (physical_cpu << 24); lapic.icr_hi = icr_hi; + /* setup common fields for subsequent IPIs */ + icr_lo = lapic.icr_lo & APIC_ICRLO_RESV_MASK; + icr_lo |= APIC_DESTMODE_PHY; + /* do an INIT IPI: assert RESET */ - icr_lo = lapic.icr_lo & APIC_ICRLO_RESV_MASK; lapic.icr_lo = icr_lo | APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | - APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_INIT; + APIC_LEVEL_ASSERT | APIC_DELMODE_INIT; /* wait for pending status end */ while (lapic.icr_lo & APIC_DELSTAT_MASK) @@ -2267,7 +2270,7 @@ /* do an INIT IPI: deassert RESET */ lapic.icr_lo = icr_lo | APIC_DEST_ALLESELF | APIC_TRIGMOD_LEVEL | - APIC_LEVEL_DEASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_INIT; + APIC_LEVEL_DEASSERT | APIC_DELMODE_INIT; /* wait for pending status end */ u_sleep(10000); /* wait ~10mS */ @@ -2284,7 +2287,8 @@ */ /* do a STARTUP IPI */ - lapic.icr_lo = icr_lo | 0x00000600 | vector; + lapic.icr_lo = icr_lo | APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | + APIC_LEVEL_DEASSERT | APIC_DELMODE_STARTUP | vector; while (lapic.icr_lo & APIC_DELSTAT_MASK) /* spin */ ; u_sleep(200); /* wait ~200uS */ @@ -2296,7 +2300,8 @@ * recognized after hardware RESET or INIT IPI. */ - lapic.icr_lo = icr_lo | 0x00000600 | vector; + lapic.icr_lo = icr_lo | APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | + APIC_LEVEL_DEASSERT | APIC_DELMODE_STARTUP | vector; while (lapic.icr_lo & APIC_DELSTAT_MASK) /* spin */ ; u_sleep(200); /* wait ~200uS */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message