Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Oct 2014 14:03:45 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Terry Kennedy <TERRY@tmk.com>, freebsd-arch@freebsd.org
Subject:   Re: [rfc] Add boot-time warning messages to PAE kernels
Message-ID:  <alpine.BSF.2.11.1410131353130.20948@wonkity.com>
In-Reply-To: <5523023.h2nJCgOPoX@ralph.baldwin.cx>
References:  <01PDOI9M51BK0003PW@tmk.com> <5523023.h2nJCgOPoX@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1410131353130.20948>