From owner-freebsd-questions Mon Jul 1 23:23: 7 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E06337B400 for ; Mon, 1 Jul 2002 23:23:03 -0700 (PDT) Received: from maila.telia.com (maila.telia.com [194.22.194.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2628B43E13 for ; Mon, 1 Jul 2002 23:19:18 -0700 (PDT) (envelope-from erikt@midgard.homeip.net) Received: from d1o913.telia.com (d1o913.telia.com [195.252.44.241]) by maila.telia.com (8.11.6/8.11.6) with ESMTP id g626J1J08137 for ; Tue, 2 Jul 2002 08:19:02 +0200 (CEST) Received: from falcon.midgard.homeip.net (h53n2fls20o913.telia.com [212.181.163.53]) by d1o913.telia.com (8.8.8/8.8.8) with SMTP id IAA27060 for ; Tue, 2 Jul 2002 08:19:00 +0200 (CEST) Received: (qmail 29569 invoked by uid 1001); 2 Jul 2002 06:18:58 -0000 Date: Tue, 2 Jul 2002 08:18:58 +0200 From: Erik Trulsson To: Aaron Burke Cc: Paulo Roberto , FreeBSD-Questions Subject: Re: kernel - pentium FDIV bug corrected? Message-ID: <20020702061857.GA29547@falcon.midgard.homeip.net> Mail-Followup-To: Aaron Burke , Paulo Roberto , FreeBSD-Questions References: <20020702010136.1563.qmail@web14907.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Jul 01, 2002 at 10:52:53PM -0700, Aaron Burke wrote: > > -----Original Message----- > > From: owner-freebsd-questions@FreeBSD.ORG > > [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Paulo Roberto > > Sent: Monday, July 01, 2002 06:02 PM > > To: freebsd-questions@FreeBSD.ORG > > Subject: kernel - pentium FDIV bug corrected? > > > > > > Hi, > > > > Since I am not a C expert, I will ask those who are... > > > > Is there an implementation in the FreeBSD kernel to correct the > > pentium fdiv bug? I am interested because I am switching a few > > boxes from Linux (that dmesg tells me that the machine has this > > bug, and it is correcting the problem thru code in the linux > > kernel) to FreeBSD and I need a few of them to run math routines > > in a database. > > There is a kernel config option that takes care of it. Also, the > problem affected more than just the pentium. > > But check out /sys/i386/conf/LINT for the "NO_F00F_HACK" option. The F00F bug is not the same as the FDIV bug. Also the FDIV bug affected only the earliest Pentiums (I think it was only the 60 and 66 MHz versions) while the F00F bug affected all Pentiums and Pentium/MMX. As far as I know there is no code in FreeBSD to correct the FDIV bug, and to be honest I don't really see how it could do that, but if Linux does it I suppose it is possible. One possible workaround could be to use the emulator instead of the hardware FPU. Check the [GPL_]MATH_EMULATE option and the npx device in LINT. Note that this will cause all floating point operations to go slower so it might not be an acceptable solution. If you really have a machine with the FDIV bug, I would actually suggest you replace the machine, or at least the CPU. It can't be that expensive. -- Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message