From owner-freebsd-hackers Mon Aug 5 13:10:35 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E42737B400 for ; Mon, 5 Aug 2002 13:10:32 -0700 (PDT) Received: from gull.mail.pas.earthlink.net (gull.mail.pas.earthlink.net [207.217.120.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15D8543E72 for ; Mon, 5 Aug 2002 13:10:32 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0308.cvx40-bradley.dialup.earthlink.net ([216.244.43.53] helo=mindspring.com) by gull.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17boBC-0002yY-00; Mon, 05 Aug 2002 13:10:14 -0700 Message-ID: <3D4EDB6C.A339167F@mindspring.com> Date: Mon, 05 Aug 2002 13:09:16 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: "John S. Bucy" Cc: freebsd-hackers@freebsd.org Subject: Re: weird npxintr References: <20020805182753.GD494@catalepsy.pdl.cmu.edu> <3D4EC913.528452C2@mindspring.com> <20020805191440.GE494@catalepsy.pdl.cmu.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "John S. Bucy" wrote: > Err ... our code is getting called from dadone which gets called up > from swi_cambio which is the soft interrupt handler, right? The software interrupt handler runs any time you call splx() to unset the SPL level back to nothing from a raised SPL. This is not limited to happening when you have a valid current process. > By copy, do you mean bcopy/memcpy or load/store to a register? bcopy/memcopy/uiomove/copyin/copyout > We're certainly not in the middle of a bcopy when we get the interrupt... > > Again, I'm fairly certain that we aren't touching any fp registers or > issuing any fp instructions. You are if the kernel is running any one of those kernel supplied functions, whether you think you are or not. In general, the FPU exceptions happen only on the next instruction following an exception, not at the time of the exception itself. This lets them pipeline integer and floating point instructions (it's a cheap way out of making the hardware do the right thing). So you appear to be loading an MMX register after there has been an exception, without an intervening context switch to cause the exception to be sent to the correct process (the "curproc = 0" is a dead give away here). I know GCC 2.95 doesn't do this; since you are posting on the -hackers list instead of the -current list, I guess you are not running current, so you aren't running GCC 3.1, right? I don't know what GCC 3.1 does; one way to tell would be to see if you get exceptions... ;^). You should be able to tell the compiler to not generate any MMX instructions, as an override. Be aware that you can't just use the GCC 3.1 on an older kernel. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message