Date: Thu, 10 Feb 2005 18:37:44 +0100 From: Robert Millan <rmh@debian.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/77355: Detect i*86 subarches for uname Message-ID: <E1CzIG8-0005kp-E5@khazad.dyndns.org> Resent-Message-ID: <200502101810.j1AIAMMH041572@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 77355
>Category: kern
>Synopsis: Detect i*86 subarches for uname
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Feb 10 18:10:22 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Robert Millan
>Release: GNU/kFreeBSD 5.3-3 i686
>Organization:
Debian
>Environment:
System: GNU/kFreeBSD aragorn 5.3-3 #0: Thu Feb 10 15:39:57 CET 2005 i686 GNU/KFreeBSD
>Description:
This patch enables the kernel of FreeBSD to give output of i*86 subarches
in the uname kernel call. As a result, `uname -m' may print "i686", etc
instead of always "i386".
>How-To-Repeat:
>Fix:
--- src/sys/i386/i386/identcpu.c.old 2005-02-08 05:02:33.000000000 +0100
+++ src/sys/i386/i386/identcpu.c 2005-02-08 05:05:09.000000000 +0100
@@ -604,6 +604,7 @@
#if defined(I486_CPU)
case CPUCLASS_486:
printf("486");
+ machine[1] = '4';
bzero_vector = i486_bzero;
break;
#endif
@@ -614,6 +615,7 @@
(intmax_t)(tsc_freq + 4999) / 1000000,
(u_int)((tsc_freq + 4999) / 10000) % 100);
printf("586");
+ machine[1] = '5';
break;
#endif
#if defined(I686_CPU)
@@ -623,6 +625,7 @@
(intmax_t)(tsc_freq + 4999) / 1000000,
(u_int)((tsc_freq + 4999) / 10000) % 100);
printf("686");
+ machine[1] = '6';
break;
#endif
default:
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1CzIG8-0005kp-E5>
