PERFORCE change 129038 for review

Peter Wemm peter at FreeBSD.org
Tue Nov 13 12:32:13 PST 2007


http://perforce.freebsd.org/chv.cgi?CH=129038

Change 129038 by peter at peter_overcee on 2007/11/13 20:31:55

	Fix off-by-one in pmap.h that caused a lockup at boot.
	Cosmetic tweaks.

Affected files ...

.. //depot/projects/hammer/sys/i386/i386/mp_machdep.c#70 edit
.. //depot/projects/hammer/sys/i386/include/pmap.h#32 edit

Differences ...

==== //depot/projects/hammer/sys/i386/i386/mp_machdep.c#70 (text+ko) ====

@@ -506,11 +506,10 @@
 	/* Get per-cpu data */
 	pc = &__pcpu[myid];
 
-	/* prime data pabe or it to use */
+	/* prime data page for it to use */
 	pcpu_init(pc, myid, sizeof(struct pcpu));
 	pc->pc_apic_id = cpu_apic_ids[myid];
 	pc->pc_prvspace = pc;
-	pc->pc_curthread = 0;
 
 	gdt_segs[GPRIV_SEL].ssd_base = (int) pc;
 	gdt_segs[GPROC0_SEL].ssd_base = (int) &pc->pc_common_tss;
@@ -763,7 +762,7 @@
 	for (cpu = 1; cpu < mp_ncpus; cpu++) {
 		apic_id = cpu_apic_ids[cpu];
 
-		/* allocate and set up an idle stack data page */
+		/* allocate and set up a boot stack data page */
 		bootstacks[cpu] = (char *)kmem_alloc(kernel_map, KSTACK_PAGES * PAGE_SIZE);
 
 		/* setup a vector to our boot code */
@@ -803,6 +802,7 @@
 	outb(CMOS_DATA, mpbiosreason);
 #endif
 
+	/* Clear out V==P hack for mpboot above */
 	for (i = 0; i < NKPT; i++)
 		PTD[i] = 0;
 	pmap_invalidate_range(kernel_pmap, 0, NKPT * NBPDR - 1);

==== //depot/projects/hammer/sys/i386/include/pmap.h#32 (text+ko) ====

@@ -121,12 +121,8 @@
 #endif
 
 #ifndef NKPDE
-#ifdef SMP
-#define NKPDE	(KVA_PAGES - 1) /* number of page tables/pde's */
-#else
 #define NKPDE	(KVA_PAGES)	/* number of page tables/pde's */
 #endif
-#endif
 
 /*
  * The *PTDI values control the layout of virtual memory


More information about the p4-projects mailing list