From emaste@FreeBSD.org  Tue Nov 14 17:49:12 2006
Return-Path: <emaste@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 378AD16A416
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 14 Nov 2006 17:49:12 +0000 (UTC)
	(envelope-from emaste@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E462643D45
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 14 Nov 2006 17:49:11 +0000 (GMT)
	(envelope-from emaste@FreeBSD.org)
Received: from freefall.freebsd.org (emaste@localhost [127.0.0.1])
	by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kAEHnBkR081207
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 14 Nov 2006 17:49:11 GMT
	(envelope-from emaste@freefall.freebsd.org)
Received: (from emaste@localhost)
	by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kAEHnBwr081206;
	Tue, 14 Nov 2006 17:49:11 GMT
	(envelope-from emaste)
Message-Id: <200611141749.kAEHnBwr081206@freefall.freebsd.org>
Date: Tue, 14 Nov 2006 17:49:11 GMT
From: Ed Maste <emaste@FreeBSD.org>
Reply-To: Ed Maste <emaste@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Update misc/cpuid handling of AMD CPU features
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         105534
>Category:       ports
>Synopsis:       Update misc/cpuid handling of AMD CPU features
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    emaste
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 14 17:50:00 GMT 2006
>Closed-Date:    Tue Nov 14 20:50:37 GMT 2006
>Last-Modified:  Tue Nov 14 21:00:02 GMT 2006
>Originator:     Ed Maste
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD freefall.freebsd.org 6.0-STABLE FreeBSD 6.0-STABLE #0: Sat Dec 10 03:18:20 UTC 2005 kensmith@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386


>Description:
On an Opteron 250 machine here, cpuid shows:

Extended feature flags e3d3fbff:
Floating Point Unit
Virtual Mode Extensions
Debugging Extensions
Page Size Extensions
Time Stamp Counter (with RDTSC and CR4 disable bit)
Model Specific Registers with RDMSR & WRMSR
PAE - Page Address Extensions
Machine Check Exception
COMPXCHG8B Instruction
APIC
SYSCALL/SYSRET or SYSENTER/SYSEXIT instructions
MTRR - Memory Type Range Registers
Global paging extension
Machine Check Architecture
Conditional Move Instruction
PAT - Page Attribute Table
PSE-36 - Page Size Extensions
20 - reserved
AMD MMX Instruction Extensions
MMX instructions
FXSAVE/FXRSTOR
25 - reserved
29 - reserved
3DNow! Instruction Extensions
3DNow instructions

Note that a number of reserved bits are not correctly parsed.  In addition, the
format of the AMD bits is quite different to that of the Intel output.  The patch
mentioned below makes it print instead:

Extended feature flags e3d3fbff:
FPU    Floating Point Unit
VME    Virtual 8086 Mode Enhancements
DE     Debugging Extensions
PSE    Page Size Extensions
TSC    Time Stamp Counter
MSR    Model Specific Registers
PAE    Physical Address Extension
MCE    Machine Check Exception
CX8    COMPXCHG8B Instruction
APIC   On-chip Advanced Programmable Interrupt Controller present and enabled
SEP    Fast System Call
MTRR   Memory Type Range Registers
PGE    PTE Global Flag
MCA    Machine Check Architecture
CMOV   Conditional Move and Compare Instructions
PAT    Page Attribute Table
PSE36  36-bit Page Size Extension
NX     No-execute page protection
MmxExt MMX instruction extensions
MMX    MMX instructions
FXSR   Fast FP/MMX Streaming SIMD Extensions save/restore
FFXSR  FXSAVE and FXRSTOR instruction optimizations
LM     64 bit long mode
3DNowE 3DNow! instruction extensions
3DNow  3DNow! instructions

>How-To-Repeat:
	Run cpuid on a modern AMD machine
>Fix:
	A modified patch-cpuid.c is at http://people.freebsd.org/~emaste/patches/patch-cpuid.c

	I added references to two AMD documents relating to the CPUID instruction.  In general
I used the short forms of the feature bits from those documents, except where it was too
long.  In those cases I borrowed the short from from the Intel version.

	Please look for formatting issues, typos, etc.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->emaste 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Nov 14 17:50:17 UTC 2006 
Responsible-Changed-Why:  
Submitter has GNATS access 

http://www.freebsd.org/cgi/query-pr.cgi?pr=105534 
State-Changed-From-To: open->closed 
State-Changed-By: edwin 
State-Changed-When: Tue Nov 14 20:50:33 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=105534 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/105534: commit references a PR
Date: Tue, 14 Nov 2006 20:53:48 +0000 (UTC)

 edwin       2006-11-14 20:49:38 UTC
 
   FreeBSD ports repository
 
   Modified files:
     misc/cpuid           Makefile 
     misc/cpuid/files     patch-cpuid.c 
   Log:
   Update misc/cpuid handling of AMD CPU features
   
   PR:             ports/105534
   Submitted by:   Ed Maste <emaste@FreeBSD.org>
   
   Revision  Changes    Path
   1.14      +1 -1      ports/misc/cpuid/Makefile
   1.2       +142 -19   ports/misc/cpuid/files/patch-cpuid.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
