From owner-freebsd-current Tue Dec 17 20:32:52 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B539F37B401; Tue, 17 Dec 2002 20:32:50 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id E6E0843EDA; Tue, 17 Dec 2002 20:32:48 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id PAA09168; Wed, 18 Dec 2002 15:32:39 +1100 Date: Wed, 18 Dec 2002 15:33:42 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Ruslan Ermilov Cc: "Greg 'groggy' Lehey" , Terry Lambert , Alex , , Johnson David , Subject: Re: 80386 out of GENERIC In-Reply-To: <20021217074235.GA95679@sunbay.com> Message-ID: <20021218152338.V23575-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 17 Dec 2002, Ruslan Ermilov wrote: > On Mon, Dec 16, 2002 at 09:05:40AM +1030, Greg 'groggy' Lehey wrote: > > I suppose it would be a good idea to include an alternatvie i386 > > kernel on the CD-ROM. There may be a space issue, of course. How > > many people participating in this thread have an i386 with at least 12 > > MB of memory and intended to try 5.0 on it? How many of those don't > > have a machine to bootstrap off? > > > Having only alternative i386 kernel is not enough while userland > stuff is still compiled for i486. Er, userland stuff is still compiled for original i386's, modulo bugs. E.g., in the i386 endian.h: % #if defined(_KERNEL) && (defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)) && !defined(I386_CPU) ^^^^^^^^^^^^^^^ % % #define __byte_swap_int(x) \ % __extension__ ({ register __uint32_t __X = (x); \ % __asm ("bswap %0" : "+r" (__X)); \ % __X; }) % #else % % #define __byte_swap_int(x) \ % __extension__ ({ register __uint32_t __X = (x); \ % __asm ("xchgb %h0, %b0\n\trorl $16, %0\n\txchgb %h0, %b0" \ % : "+q" (__X)); \ % __X; }) % #endif The _KERNEL part of the ifdef limits the use of the i486 "bswap" instruction to the kernel, so userland is properly pessimized to support all x86's. The other parts of the ifdef properly pessimize modules to support all x86's (options don't apply to modules so none of the XXX_CPU's is defined). So kernels get the full epsilon of optimizations from turning off i386 support, while userland doesn't get any (not counting ones from optimizing for non-i386 without breaking i386). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message