summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/mptable.h
diff options
context:
space:
mode:
authorluoqi <luoqi@FreeBSD.org>1999-06-23 21:47:24 +0000
committerluoqi <luoqi@FreeBSD.org>1999-06-23 21:47:24 +0000
commit1a5d949c86beab6456d10ba66ff8c1c237b29837 (patch)
tree10c1cb3ff9f473f324726f5a5249a0701d69c521 /sys/i386/include/mptable.h
parentce33e41080593127d63d03332b674276a982496f (diff)
downloadFreeBSD-src-1a5d949c86beab6456d10ba66ff8c1c237b29837.zip
FreeBSD-src-1a5d949c86beab6456d10ba66ff8c1c237b29837.tar.gz
Do not setup 4M pdir until all APs are up.
Diffstat (limited to 'sys/i386/include/mptable.h')
-rw-r--r--sys/i386/include/mptable.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index 5afe5fe..5a9f672 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.102 1999/06/01 18:19:42 jlemon Exp $
+ * $Id: mp_machdep.c,v 1.103 1999/06/22 20:54:25 msmith Exp $
*/
#include "opt_smp.h"
@@ -300,7 +300,7 @@ u_int all_cpus;
/* AP uses this during bootstrap. Do not staticize. */
char *bootSTK;
-int boot_cpuid;
+static int bootAP;
/* Hotwire a 0->4MB V==P mapping */
extern pt_entry_t *KPTphys;
@@ -454,7 +454,7 @@ void
init_secondary(void)
{
int gsel_tss;
- int x, myid = boot_cpuid;
+ int x, myid = bootAP;
gdt_segs[GPRIV_SEL].ssd_base = (int) &SMP_prvspace[myid];
gdt_segs[GPROC0_SEL].ssd_base =
@@ -487,9 +487,7 @@ init_secondary(void)
load_cr0(0x8005003b); /* XXX! */
- pmap_set_opt((unsigned *)PTD);
-
- invltlb();
+ pmap_set_opt();
}
@@ -1827,7 +1825,7 @@ start_all_aps(u_int boot_addr)
#endif
bootSTK = &SMP_prvspace[x].idlestack[UPAGES*PAGE_SIZE];
- boot_cpuid = x;
+ bootAP = x;
/* attempt to start the Application Processor */
CHECK_INIT(99); /* setup checkpoints */
@@ -1874,7 +1872,7 @@ start_all_aps(u_int boot_addr)
(PG_V | PG_RW | vtophys(PAGE_SIZE * i + stack));
*(int *)PTD = 0;
- pmap_set_opt_bsp();
+ pmap_set_opt();
/* number of APs actually started */
return mp_ncpus - 1;
@@ -2172,6 +2170,9 @@ ap_init()
{
u_int apic_id;
+ /* BSP may have changed PTD while we're waiting for the lock */
+ cpu_invltlb();
+
smp_cpus++;
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
OpenPOWER on IntegriCloud