diff options
author | dfr <dfr@FreeBSD.org> | 2002-03-14 09:20:07 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2002-03-14 09:20:07 +0000 |
commit | 8af7d2dfbb275885d37a3c14c0a56dfedfb20a57 (patch) | |
tree | 2411398336680a787666e8fcd1b44969eb62d06d | |
parent | 1fde57f8aa76f4ae637982fe51734152b7fcca1c (diff) | |
download | FreeBSD-src-8af7d2dfbb275885d37a3c14c0a56dfedfb20a57.zip FreeBSD-src-8af7d2dfbb275885d37a3c14c0a56dfedfb20a57.tar.gz |
Move the call to pmap_bootstrap to after the initialisation of thread0.
This allows us to use mutexes in pmap safely. Also initialise fpcurthread
for cpu0 so that ia64_fpstate_check doesn't barf during boot.
-rw-r--r-- | sys/ia64/ia64/machdep.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index 45006ab..00de2c8 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -671,11 +671,6 @@ ia64_init(u_int64_t arg1, u_int64_t arg2) ia64_set_k4((u_int64_t) pcpup); /* - * Initialize the virtual memory system. - */ - pmap_bootstrap(); - - /* * Initialize the rest of proc 0's PCB. * * Set the kernel sp, reserving space for an (empty) trapframe, @@ -691,6 +686,9 @@ ia64_init(u_int64_t arg1, u_int64_t arg2) /* Setup curproc so that mutexes work */ PCPU_SET(curthread, &thread0); + /* We pretend to own FP state so that ia64_fpstate_check() works */ + PCPU_SET(fpcurthread, &thread0); + LIST_INIT(&thread0.td_contested); /* @@ -702,6 +700,11 @@ ia64_init(u_int64_t arg1, u_int64_t arg2) mtx_lock(&Giant); /* + * Initialize the virtual memory system. + */ + pmap_bootstrap(); + + /* * Initialize debuggers, and break into them if appropriate. */ #ifdef DDB @@ -1301,7 +1304,7 @@ ia64_fpstate_check(struct thread *td) { if ((td->td_frame->tf_cr_ipsr & IA64_PSR_DFH) == 0) if (td != PCPU_GET(fpcurthread)) - panic("ia64_check_fpcurthread: bogus"); + panic("ia64_fpstate_check: bogus"); } /* |