Date: Sun, 28 Feb 1999 12:45:26 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Dennis <dennis@etinc.com> Cc: hackers@FreeBSD.ORG Subject: Re: CPU-type question Message-ID: <199902282045.MAA39096@apollo.backplane.com> References: <199902281711.MAA00353@etinc.com>
index | next in thread | previous in thread | raw e-mail
:What does the "cpu" directive in the kernel config actually do? In the
:context of
:a binary driver, is there a potential problem if the binary was compiled on
:one
:type of cpu and that cpu type was not specified in the target machine's
:config?
:(that is that the driver was compiled on a i586 and the target machine only
:specified i686).
:
:I suppose this has some relevance to loadable drivers as well.
:
:Dennis
The cpu directive is used to compile in alternative cpu-specific code.
It is also used to NOT compile in cpu-specific code.
For example:
cpu "I586_CPU"
cpu "I686_CPU"
In this case I'm telling the kernel to use Pentium and Pentium II
specific features if those processors are detected. But, more noteably,
by *NOT* including "I486_cpu" I am telling the kernel to not bother to
compile in 386 or 486-specific features.
This means that the above kernel will *NOT* run on a 386 or 486, but
it will run more efficiently ( though not by much ) on a P or PII
because it doesn't bother to check for 486 specific stuff. Or, at
least, the kernel will be slightly smaller by not including the 386 or
486 specific stuff.
-Matt
Matthew Dillon
<dillon@backplane.com>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902282045.MAA39096>
