aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2011-12-15 17:54:23 +0000
committerAlan Cox <alc@FreeBSD.org>2011-12-15 17:54:23 +0000
commit725e839b9f3db572c75f3a1faa264dbdaada37b8 (patch)
tree5c928acfbcaf6022d69949114d9bbdfde6efb479 /sys
parent338e7cf2356dab20282387f0801f32ff7331393d (diff)
downloadsrc-725e839b9f3db572c75f3a1faa264dbdaada37b8.tar.gz
src-725e839b9f3db572c75f3a1faa264dbdaada37b8.zip
Simplify the implementation of the identity mapping in start_all_aps().
Since mpboot.s enables processor support for PG_PS before enabling paging, there is no reason that the identity must use 4 KB page mappings. Discussed with: jhb
Notes
Notes: svn path=/head/; revision=228535
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/i386/locore.s3
-rw-r--r--sys/i386/i386/mp_machdep.c9
2 files changed, 2 insertions, 10 deletions
diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s
index 107cbcf0ada8..68cb430965a5 100644
--- a/sys/i386/i386/locore.s
+++ b/sys/i386/i386/locore.s
@@ -775,8 +775,7 @@ no_kernend:
* if we've enabled PSE above, we'll just switch the corresponding kernel
* PDEs before we turn on paging.
*
- * XXX: We waste some pages here in the PSE case! DON'T BLINDLY REMOVE
- * THIS! SMP needs the page table to be there to map the kernel P==V.
+ * XXX: We waste some pages here in the PSE case!
*/
xorl %eax, %eax
movl R(KERNend),%ecx
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
index 11d23ba8a40f..b67a39fbd5a3 100644
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -145,9 +145,6 @@ static int bootAP;
void *bootstacks[MAXCPU];
static void *dpcpu;
-/* Hotwire a 0->4MB V==P mapping */
-extern pt_entry_t *KPTphys;
-
struct pcb stoppcbs[MAXCPU];
/* Variables needed for SMP tlb shootdown. */
@@ -931,7 +928,6 @@ start_all_aps(void)
#ifndef PC98
u_char mpbiosreason;
#endif
- uintptr_t kptbase;
u_int32_t mpbioswarmvec;
int apic_id, cpu, i;
@@ -949,11 +945,8 @@ start_all_aps(void)
/* set up temporary P==V mapping for AP boot */
/* XXX this is a hack, we should boot the AP on its own stack/PTD */
-
- kptbase = (uintptr_t)(void *)KPTphys;
for (i = TMPMAP_START; i < NKPT; i++)
- PTD[i] = (pd_entry_t)(PG_V | PG_RW |
- ((kptbase + i * PAGE_SIZE) & PG_FRAME));
+ PTD[i] = PTD[KPTDI + i];
invltlb();
/* start each AP */