Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x68k/x68k Defer fpu_probe() call until curlwp and r...



details:   https://anonhg.NetBSD.org/src/rev/ff59caf9a5c9
branches:  trunk
changeset: 764907:ff59caf9a5c9
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Wed May 11 14:17:29 2011 +0000

description:
Defer fpu_probe() call until curlwp and related variables are initialized.
Fixes pre-consinit KASSERT() in trap() caused by fnop instruction in
fpu_probe() on machines without FPU, including XM6i.

diffstat:

 sys/arch/x68k/x68k/locore.s |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r d2c8ce46a0b2 -r ff59caf9a5c9 sys/arch/x68k/x68k/locore.s
--- a/sys/arch/x68k/x68k/locore.s       Wed May 11 12:22:34 2011 +0000
+++ b/sys/arch/x68k/x68k/locore.s       Wed May 11 14:17:29 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.101 2011/02/08 20:20:26 rmind Exp $       */
+/*     $NetBSD: locore.s,v 1.102 2011/05/11 14:17:29 tsutsui Exp $     */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -898,9 +898,6 @@
        movl    #_C_LABEL(vectab),%d0   | set Vector Base Register
        movc    %d0,%vbr
        lea     _ASM_LABEL(tmpstk),%sp  | temporary stack
-/* detect FPU type */
-       jbsr    _C_LABEL(fpu_probe)
-       movl    %d0,_C_LABEL(fputype)
 /* call final pmap setup */
        jbsr    _C_LABEL(pmap_bootstrap_finalize)
 /* set kernel stack, user SP */
@@ -909,6 +906,9 @@
        movl    #USRSTACK-4,%a2
        movl    %a2,%usp                | init user SP
 
+/* detect FPU type */
+       jbsr    _C_LABEL(fpu_probe)
+       movl    %d0,_C_LABEL(fputype)
        tstl    _C_LABEL(fputype)       | Have an FPU?
        jeq     Lenab2                  | No, skip.
        clrl    %a1@(PCB_FPCTX)         | ensure null FP context



Home | Main Index | Thread Index | Old Index