From owner-freebsd-arch@FreeBSD.ORG Mon Oct 13 20:03:53 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BDF5FC97; Mon, 13 Oct 2014 20:03:53 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E16994E; Mon, 13 Oct 2014 20:03:53 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id s9DK3j82024531 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 13 Oct 2014 14:03:45 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id s9DK3jKQ024528; Mon, 13 Oct 2014 14:03:45 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 13 Oct 2014 14:03:45 -0600 (MDT) From: Warren Block To: John Baldwin Subject: Re: [rfc] Add boot-time warning messages to PAE kernels In-Reply-To: <5523023.h2nJCgOPoX@ralph.baldwin.cx> Message-ID: References: <01PDOI9M51BK0003PW@tmk.com> <5523023.h2nJCgOPoX@ralph.baldwin.cx> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Mon, 13 Oct 2014 14:03:45 -0600 (MDT) Cc: Terry Kennedy , freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2014 20:03:53 -0000 On Mon, 13 Oct 2014, John Baldwin wrote: > I actually think we should consider doing this for all i386 kernels regardless > of the 4GB of RAM check. Something like this: > > diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c > index 9d98f0e..6fbf419 100644 > --- a/sys/i386/i386/machdep.c > +++ b/sys/i386/i386/machdep.c > @@ -4067,3 +4067,17 @@ outb_(u_short port, u_char data) > } > > #endif /* KDB */ > + > +static void > +warn64(void *arg __unused) > +{ > + > + if ((cpu_vendor_id == CPU_VENDOR_INTEL || > + cpu_vendor_id == CPU_VENDOR_AMD || > + cpu_vendor_id == CPU_VENDOR_CENTAUR) && > + amd_feature & AMDID_LM) > + printf("WARNING: 64-bit capable CPU, consider running " > + "FreeBSD/amd64 instead.\n"); > +} > +SYSINIT(warn64, SI_SUB_COPYRIGHT, SI_ORDER_THIRD + 3, warn64, NULL); > +SYSINIT(warn64_2, SI_SUB_LAST, SI_ORDER_THIRD + 3, warn64, NULL); "WARNING" is a bit too strong. Personally, I'd prefer just a note of what is being missed: "Running in 32-bit mode on 64-bit CPU, FreeBSD/amd64 can provide increased performance and address space." Or something like that, the point is just to flip the comparison from what is lacking with i386 to what is better with amd64.