Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Nov 2006 17:49:11 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/105534: Update misc/cpuid handling of AMD CPU features
Message-ID:  <200611141749.kAEHnBwr081206@freefall.freebsd.org>
Resent-Message-ID: <200611141750.kAEHo0gj081240@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         105534
>Category:       ports
>Synopsis:       Update misc/cpuid handling of AMD CPU features
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 14 17:50:00 GMT 2006
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



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