diff options
author | kib <kib@FreeBSD.org> | 2015-05-15 08:30:29 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-05-15 08:30:29 +0000 |
commit | c3a04ab331a24533e7a7470d0f8a347a23ea974d (patch) | |
tree | 3a0f03e2ecfbd97c3e46af633b49d098932a0a81 /sys/kern/init_main.c | |
parent | 7531e6e70ecfbbf822fff6ef7e6165cac9d7e5fd (diff) | |
download | FreeBSD-src-c3a04ab331a24533e7a7470d0f8a347a23ea974d.zip FreeBSD-src-c3a04ab331a24533e7a7470d0f8a347a23ea974d.tar.gz |
On amd64, make proc0 pmap initialization slightly more correct. In
particular, switch to the proc0 pmap to have expected %cr3 and PCID
for the thread0 during initialization, and the up to date pm_active
mask.
pmap_pinit0() should be done after proc0->p_vmspace is assigned so
that the amd64 pmap_activate() find the correct curproc pmap.
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r-- | sys/kern/init_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index b77b788..3f51cb5 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -561,9 +561,9 @@ proc0_init(void *dummy __unused) p->p_stats = pstats_alloc(); /* Allocate a prototype map so we have something to fork. */ - pmap_pinit0(vmspace_pmap(&vmspace0)); p->p_vmspace = &vmspace0; vmspace0.vm_refcnt = 1; + pmap_pinit0(vmspace_pmap(&vmspace0)); /* * proc0 is not expected to enter usermode, so there is no special |