Date: Sun, 28 Feb 1999 15:52:21 -0600 From: Dan Nelson <dnelson@emsphone.com> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: Dennis <dennis@etinc.com>, hackers@FreeBSD.ORG Subject: Re: CPU-type question Message-ID: <19990228155221.A5190@dan.emsphone.com> In-Reply-To: <199902282045.MAA39096@apollo.backplane.com>; from "Matthew Dillon" on Sun Feb 28 12:45:26 GMT 1999 References: <199902281711.MAA00353@etinc.com> <199902282045.MAA39096@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 28), Matthew Dillon said: > :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. > > cpu "I586_CPU" > cpu "I686_CPU" > > 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. There was a thread in -questions back on October arguing over how much faster your kernel was if you removed the unnecessary CPU types from your config file. Go to http://www.freebsd.org/search/search-mid.html and search for messageid <19981031141836.B2302@emsphone.com> for my response. The summary is that most of the CPU-specific code is in initcpu(), which enables CPU caches, optimized memcpys, and F00F workarounds depending on the detected CPU. So, Dennis, the CPU-types specified in the kernel shouldn't have any bearing on loadable modules, as long as you make sure your module works on all CPU types (i.e. don't put any #ifdef Ix86_CPU blocks in your lkm). -Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990228155221.A5190>