Bug 105534 - Update misc/cpuid handling of AMD CPU features
Summary: Update misc/cpuid handling of AMD CPU features
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ed Maste
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-14 17:50 UTC by Ed Maste
Modified: 2006-11-14 21:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2006-11-14 17:50:00 UTC
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

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.
How-To-Repeat: 	Run cpuid on a modern AMD machine
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-11-14 17:50:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->emaste

Submitter has GNATS access
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2006-11-14 20:50:33 UTC
State Changed
From-To: open->closed

Committed, thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2006-11-14 20:53:48 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"