linux-mips
[Top] [All Lists]

Re: config option vs. run-time detection (the debate continues ...)

To: Jun Sun <jsun@mvista.com>
Subject: Re: config option vs. run-time detection (the debate continues ...)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Fri, 9 Feb 2001 21:39:29 +0100 (MET)
Cc: "Kevin D. Kissell" <kevink@mips.com>, linux-mips@oss.sgi.com
In-reply-to: <3A844C16.DD53E7E0@mvista.com>
Organization: Technical University of Gdansk
Sender: owner-linux-mips@oss.sgi.com
On Fri, 9 Feb 2001, Jun Sun wrote:

> Do you like run-time detection better because it allows a kernel to run on
> CPUs both with a FPU and without a FPU?  Or there is something else to it?

 Nope.  There are certain explicit actions that are to be performed by the
kernel if a real FPU is present, such as saving and restoring its
registers or setting the control register.  Therefore the kernel has to
know if a real part is present and act accordingly.  Maintaining a table
of all CPU ids ever manufactured and manually setting the FPU presence bit
is unreliable, especially as there are chips which cannot be classified
this way, e.g. knowing your CPU is an R3000A you don't know if an R3010A
FPU is soldered as well or not. 

> Another question.  I know with mips32 and mips64 we can do run-time detection
> reliably.  What about other existing processors?

 I've sent a quote from an IDT manual recently.  It recommended to use the
FPU implementation ID to check if an FP hw is present.  I believe it
should work for any sane implementation of a MIPS CPU.  See the mail for
details. 

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


<Prev in Thread] Current Thread [Next in Thread>