Date: Thu, 13 Mar 2003 07:51:23 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 26838 for review Message-ID: <200303131551.h2DFpN9Z056477@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303131551.h2DFpN9Z056477>