From owner-freebsd-hackers Sun Feb 28 12:45:52 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id 6D5B7152A8 for ; Sun, 28 Feb 1999 12:45:51 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id MAA39096; Sun, 28 Feb 1999 12:45:26 -0800 (PST) (envelope-from dillon) Date: Sun, 28 Feb 1999 12:45:26 -0800 (PST) From: Matthew Dillon Message-Id: <199902282045.MAA39096@apollo.backplane.com> To: Dennis Cc: hackers@FreeBSD.ORG Subject: Re: CPU-type question References: <199902281711.MAA00353@etinc.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message