>Number:         177319
>Category:       kern
>Synopsis:       Add more x86 CPU feature flag definitions
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 23 19:20:02 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Jeremy Chadwick
>Release:        FreeBSD 9.1-STABLE amd64
>Organization:
>Environment:
System: FreeBSD icarus.home.lan 9.1-STABLE FreeBSD 9.1-STABLE #0 r248403: Sat 
Mar 16 20:33:01 PDT 2013 
[email protected]:/usr/obj/usr/src/sys/X7SBA_RELENG_9_amd64 amd64
>Description:
        While reading this thread:

        
http://lists.freebsd.org/pipermail/freebsd-current/2013-March/040666.html

        It occurred to me that we might be missing some x86 CPU feature flag
        definitions in comparison to other OSes (e.g. Linux).

        My comparison source was the Linux 3.8.4 source code, specifically
        arch/x86/include/asm/cpufeature.h.  That can be viewed here:

        
http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/arch/x86/include/asm/cpufeature.h?h=linux-3.8.y
>How-To-Repeat:
        n/a
>Fix:
        Apply below patch (intended for stable/9, but can be backported to head
        I'm sure).  Patch is also available here once I get a PR number:

        http://jdc.koitsu.org/freebsd/{prnum}/

        I strongly recommend someone familiar with these bits review this patch
        first, as AFAIK these are only for cosmetical representation rather than
        operational, but I could be wrong.


Index: sys/amd64/amd64/identcpu.c
===================================================================
--- sys/amd64/amd64/identcpu.c  (revision 248655)
+++ sys/amd64/amd64/identcpu.c  (working copy)
@@ -366,13 +366,13 @@ printcpuinfo(void)
                                "\017<b14>"
                                "\020LWP"       /* Lightweight Profiling */
                                "\021FMA4"      /* 4-operand FMA instructions */
-                               "\022<b17>"
+                               "\022TCE"       /* Translation Cache Extension 
*/
                                "\023<b18>"
                                "\024NodeId"    /* NodeId MSR support */
                                "\025<b20>"
                                "\026TBM"       /* Trailing Bit Manipulation */
                                "\027Topology"  /* Topology Extensions */
-                               "\030<b23>"
+                               "\030CorePerfC" /* Core Perf. Counter 
Extensions */
                                "\031<b24>"
                                "\032<b25>"
                                "\033<b26>"
@@ -390,9 +390,17 @@ printcpuinfo(void)
                                       "\020"
                                       "\001GSFSBASE"
                                       "\002TSCADJ"
+                                      "\004BMI1"
+                                      "\005HLE"
+                                      "\006AVX2"
                                       "\010SMEP"
+                                      "\011BMI2"
                                       "\012ENHMOVSB"
                                       "\013INVPCID"
+                                      "\014RTM"
+                                      "\023RDSEED"
+                                      "\024ADX"
+                                      "\025SMAP"
                                       );
                        }
 
Index: sys/i386/i386/identcpu.c
===================================================================
--- sys/i386/i386/identcpu.c    (revision 248655)
+++ sys/i386/i386/identcpu.c    (working copy)
@@ -842,13 +842,13 @@ printcpuinfo(void)
                                "\017<b14>"
                                "\020LWP"       /* Lightweight Profiling */
                                "\021FMA4"      /* 4-operand FMA instructions */
-                               "\022<b17>"
+                               "\022TCE"       /* Translation Cache Extension 
*/
                                "\023<b18>"
                                "\024NodeId"    /* NodeId MSR support */
                                "\025<b20>"
                                "\026TBM"       /* Trailing Bit Manipulation */
                                "\027Topology"  /* Topology Extensions */
-                               "\030<b23>"
+                               "\030CorePerfC" /* Core Perf. Counter 
Extensions */
                                "\031<b24>"
                                "\032<b25>"
                                "\033<b26>"
>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to