From 6f8a44a5dd9207302a55064d3d60209c53a39820 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Fri, 8 Nov 2013 16:32:30 +0000 Subject: [PATCH] Add bits for the AMD features from CPUID function 0x80000001 ECX, described in the rev. 3.0 of the Kabini BKDG, document 48751.pdf. Partially based on the patch submitted by: Dmitry Luhtionov Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/amd64/amd64/identcpu.c | 12 ++++++------ sys/i386/i386/identcpu.c | 12 ++++++------ sys/x86/include/specialreg.h | 6 ++++++ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/sys/amd64/amd64/identcpu.c b/sys/amd64/amd64/identcpu.c index 27ea9a6d22ca..3712fc0170b1 100644 --- a/sys/amd64/amd64/identcpu.c +++ b/sys/amd64/amd64/identcpu.c @@ -366,18 +366,18 @@ printcpuinfo(void) "\017" "\020LWP" /* Lightweight Profiling */ "\021FMA4" /* 4-operand FMA instructions */ - "\022" + "\022TCE" /* Translation Cache Extension */ "\023" "\024NodeId" /* NodeId MSR support */ "\025" "\026TBM" /* Trailing Bit Manipulation */ "\027Topology" /* Topology Extensions */ - "\030" - "\031" + "\030PCXC" /* Core perf count */ + "\031PNXC" /* NB perf count */ "\032" - "\033" - "\034" - "\035" + "\033DBE" /* Data Breakpoint extension */ + "\034PTSC" /* Performance TSC */ + "\035PL2I" /* L2I perf count */ "\036" "\037" "\040" diff --git a/sys/i386/i386/identcpu.c b/sys/i386/i386/identcpu.c index beec9b1e7dff..1af3ac25cdb3 100644 --- a/sys/i386/i386/identcpu.c +++ b/sys/i386/i386/identcpu.c @@ -842,18 +842,18 @@ printcpuinfo(void) "\017" "\020LWP" /* Lightweight Profiling */ "\021FMA4" /* 4-operand FMA instructions */ - "\022" + "\022TCE" /* Translation Cache Extension */ "\023" "\024NodeId" /* NodeId MSR support */ "\025" "\026TBM" /* Trailing Bit Manipulation */ "\027Topology" /* Topology Extensions */ - "\030" - "\031" + "\030PCXC" /* Core perf count */ + "\031PNXC" /* NB perf count */ "\032" - "\033" - "\034" - "\035" + "\033DBE" /* Data Breakpoint extension */ + "\034PTSC" /* Performance TSC */ + "\035PL2I" /* L2I perf count */ "\036" "\037" "\040" diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h index 4247ee2caccb..3d20e611dc29 100644 --- a/sys/x86/include/specialreg.h +++ b/sys/x86/include/specialreg.h @@ -201,9 +201,15 @@ #define AMDID2_WDT 0x00002000 #define AMDID2_LWP 0x00008000 #define AMDID2_FMA4 0x00010000 +#define AMDID2_TCE 0x00020000 #define AMDID2_NODE_ID 0x00080000 #define AMDID2_TBM 0x00200000 #define AMDID2_TOPOLOGY 0x00400000 +#define AMDID2_PCXC 0x00800000 +#define AMDID2_PNXC 0x01000000 +#define AMDID2_DBE 0x04000000 +#define AMDID2_PTSC 0x08000000 +#define AMDID2_PTSCEL2I 0x10000000 /* * CPUID instruction 1 eax info