Advanced Debugging
About AdvDbg Consult Train Services Products Tools Community Contact  
欢迎光临 高端调试 登录 | 注册 | FAQ
 
  ACPI调试
Linux内核调试
Windows内核调试
 
  调试战役
调试原理
新工具观察
 
  Linux
Windows Vista
Windows
 
  Linux驱动
WDF
WDM
 
  PCI Express
PCI/PCI-X
USB
无线通信协议
 
  64位CPU
ARM
IA-32
  CPU Info Center
 
  ACPI标准
系统认证
Desktop
服务器
 
  Embedded Linux
嵌入式开发工具
VxWorks
WinCE
嵌入式Windows
 
  格蠹调试套件(GDK)
  格蠹学院
  小朱书店
  老雷的微博
  《软件调试》
  《格蠹汇编》
  《软件调试(第二版)》
沪ICP备11027180号-1

Windows内核调试

帖子发起人: merry   发起时间: 2009-05-04 17:14 下午   回复: 7

Print Search
帖子排序:    
   2009-05-04, 17:14 下午
merryzhao 离线,最后访问时间: 2017/2/21 12:41:06 merry

发帖数前25位
注册: 2008-09-26
发 贴: 61
请问如何解读!cpuinfo指令Features栏属性
Reply Quote

请问指令 !cpuinfoFeatures栏属性代表什么含义?谢谢!
 
lkd> !cpuinfo
CP  F/M/S Manufacturer  MHz   PRCB Signature     MSR 8B Signature Features
 0  6,14,12 GenuineIntel 1733 0000005400000000  0000005400000000 a0033fff

 

IP 地址: 已记录   报告
   2009-05-04, 19:58 下午
MJ0011 离线,最后访问时间: 2009/12/24 22:33:41 MJ0011

发帖数前10位
注册: 2008-04-24
发 贴: 112
Re: 请问如何解读!cpuinfo指令Features栏属性
Reply Quote
CPU 特性,PAE , MMX , 3DNOW,等等等
IP 地址: 已记录   报告
   2009-05-04, 21:42 下午
merryzhao 离线,最后访问时间: 2017/2/21 12:41:06 merry

发帖数前25位
注册: 2008-09-26
发 贴: 61
Re: 请问如何解读!cpuinfo指令Features栏属性
Reply Quote
太笼统了....,希望能有每位确切定义的解释
IP 地址: 已记录   报告
   2009-05-04, 21:53 下午
MJ0011 离线,最后访问时间: 2009/12/24 22:33:41 MJ0011

发帖数前10位
注册: 2008-04-24
发 贴: 112
Re: 请问如何解读!cpuinfo指令Features栏属性
Reply Quote

{ Standard (Intel) Feature Flags }

FPU_FLAG = $00000001; // Floating-Point unit on chip
VME_FLAG = $00000002; // Virtual Mode Extention
DE_FLAG = $00000004; // Debugging Extention
PSE_FLAG = $00000008; // Page Size Extention
TSC_FLAG = $00000010; // Time Stamp Counter
MSR_FLAG = $00000020; // Model Specific Registers
PAE_FLAG = $00000040; // Physical Address Extention
MCE_FLAG = $00000080; // Machine Check Exception
CX8_FLAG = $00000100; // CMPXCHG8 Instruction
APIC_FLAG = $00000200; // Software-accessible local APIC on Chip
BIT_10 = $00000400; // Reserved, do not count on value
SEP_FLAG = $00000800; // Fast System Call
MTRR_FLAG = $00001000; // Memory Type Range Registers
PGE_FLAG = $00002000; // Page Global Enable
MCA_FLAG = $00004000; // Machine Check Architecture
CMOV_FLAG = $00008000; // Conditional Move Instruction
PAT_FLAG = $00010000; // Page Attribute Table
PSE36_FLAG = $00020000; // 36-bit Page Size Extention
BIT_18 = $00040000; // Reserved, do not count on value
CLFLSH_FLAG = $00080000; // CLFLUSH intruction
BIT_20 = $00100000; // Reserved, do not count on value
DS_FLAG = $00200000; // Debug store
ACPI_FLAG = $00400000; // Thermal monitor and clock control
MMX_FLAG = $00800000; // MMX technology
FXSR_FLAG = $01000000; // Fast Floating Point Save and Restore
SSE_FLAG = $02000000; // Streaming SIMD Extensions
SSE2_FLAG = $04000000; // Streaming SIMD Extensions 2
SS_FLAG = $08000000; // Self snoop
HTT_FLAG = $10000000; // Hyper-threading technology
TM_FLAG = $20000000; // Thermal monitor
BIT_30 = $40000000; // Reserved, do not count on value
PBE_FLAG = DWORD($80000000); // Pending Break Enable

{ Extended (Intel) Feature Flags }

SSE3_EFLAG = $00000001; // Streaming SIMD Extensions 3
EBIT_1 = $00000002; // Reserved, do not count on value
EBIT_2 = $00000004; // Reserved, do not count on value
MONITOR_EFLAG = $00000008; // Monitor/MWAIT
DSCPL_EFLAG = $00000010; // CPL Qualified debug Store
EBIT_5 = $00000020; // Reserved, do not count on value
EBIT_6 = $00000040; // Reserved, do not count on value
EST_EFLAG = $00000080; // Enhanced Intel Speedstep technology
TM2_EFLAG = $00000100; // Thermal monitor 2
EBIT_9 = $00000200; // Reserved, do not count on value
CNXTID_EFLAG = $00000400; // L1 Context ID
EBIT_11 = $00000800; // Reserved, do not count on value
EBIT_12 = $00001000; // Reserved, do not count on value
EBIT_13 = $00002000; // Reserved, do not count on value
EBIT_14 = $00004000; // Reserved, do not count on value
EBIT_15 = $00008000; // Reserved, do not count on value
EBIT_16 = $00010000; // Reserved, do not count on value
EBIT_17 = $00020000; // Reserved, do not count on value
EBIT_18 = $00040000; // Reserved, do not count on value
EBIT_19 = $00080000; // Reserved, do not count on value
EBIT_20 = $00100000; // Reserved, do not count on value
EBIT_21 = $00200000; // Reserved, do not count on value
EBIT_22 = $00400000; // Reserved, do not count on value
EBIT_23 = $00800000; // Reserved, do not count on value
EBIT_24 = $01000000; // Reserved, do not count on value
EBIT_25 = $02000000; // Reserved, do not count on value
EBIT_26 = $04000000; // Reserved, do not count on value
EBIT_27 = $08000000; // Reserved, do not count on value
EBIT_28 = $10000000; // Reserved, do not count on value
EBIT_29 = $20000000; // Reserved, do not count on value
EBIT_30 = $40000000; // Reserved, do not count on value
EBIT_31 = DWORD($80000000); // Reserved, do not count on value

{ AMD Standard Feature Flags }

AMD_FPU_FLAG = $00000001; // Floating-Point unit on chip
AMD_VME_FLAG = $00000002; // Virtual Mode Extention
AMD_DE_FLAG = $00000004; // Debugging Extention
AMD_PSE_FLAG = $00000008; // Page Size Extention
AMD_TSC_FLAG = $00000010; // Time Stamp Counter
AMD_MSR_FLAG = $00000020; // Model Specific Registers
AMD_PAE_FLAG = $00000040; // Physical address Extensions
AMD_MCE_FLAG = $00000080; // Machine Check Exception
AMD_CX8_FLAG = $00000100; // CMPXCHG8 Instruction
AMD_APIC_FLAG = $00000200; // Software-accessible local APIC on Chip
AMD_BIT_10 = $00000400; // Reserved, do not count on value
AMD_SEP_BIT = $00000800; // SYSENTER and SYSEXIT instructions
AMD_MTRR_FLAG = $00001000; // Memory Type Range Registers
AMD_PGE_FLAG = $00002000; // Page Global Enable
AMD_MCA_FLAG = $00004000; // Machine Check Architecture
AMD_CMOV_FLAG = $00008000; // Conditional Move Instruction
AMD_PAT_FLAG = $00010000; // Page Attribute Table
AMD_PSE2_FLAG = $00020000; // Page Size Extensions
AMD_BIT_18 = $00040000; // Reserved, do not count on value
AMD_CLFLSH_FLAG = $00080000; // CLFLUSH instruction
AMD_BIT_20 = $00100000; // Reserved, do not count on value
AMD_BIT_21 = $00200000; // Reserved, do not count on value
AMD_BIT_22 = $00400000; // Reserved, do not count on value
AMD_MMX_FLAG = $00800000; // MMX technology
AMD_FX_FLAG = $01000000; // FXSAVE and FXSTORE instructions
AMD_SSE_FLAG = $02000000; // SSE Extensions
AMD_SSE2_FLAG = $04000000; // SSE2 Extensions
AMD_BIT_27 = $08000000; // Reserved, do not count on value
AMD_BIT_28 = $10000000; // Reserved, do not count on value
AMD_BIT_29 = $20000000; // Reserved, do not count on value
AMD_BIT_30 = $40000000; // Reserved, do not count on value
AMD_BIT_31 = DWORD($80000000); // Reserved, do not count on value

AMD Enhanced Feature Flags }

EAMD_FPU_FLAG = $00000001; // Floating-Point unit on chip
EAMD_VME_FLAG = $00000002; // Virtual Mode Extention
EAMD_DE_FLAG = $00000004; // Debugging Extention
EAMD_PSE_FLAG = $00000008; // Page Size Extention
EAMD_TSC_FLAG = $00000010; // Time Stamp Counter
EAMD_MSR_FLAG = $00000020; // Model Specific Registers
EAMD_PAE_EFLAG = $00000040; // Physical-address extensions
EAMD_MCE_FLAG = $00000080; // Machine Check Exception
EAMD_CX8_FLAG = $00000100; // CMPXCHG8 Instruction
EAMD_APIC_FLAG = $00000200; // Advanced Programmable Interrupt Controler
EAMD_BIT_10 = $00000400; // Reserved, do not count on value
EAMD_SEP_FLAG = $00000800; // Fast System Call
EAMD_MTRR_FLAG = $00001000; // Memory-Type Range Registers
EAMD_PGE_FLAG = $00002000; // Page Global Enable
EAMD_MCA_FLAG = $00004000; // Machine Check Architecture
//EAMD_ICMOV_FLAG = $00008000; // Integer Conditional Move Instruction
//EAMD_FCMOV_FLAG = $00010000; // Floating Point Conditional Move Instruction
EAMD_CMOV_FLAG = $00008000; // Conditional Move Intructions
EAMD_PAT_FLAG = $00010000; // Page Attributes Table
EAMD_PSE2_FLAG = $00020000; // Page Size Extensions
EAMD_BIT_18 = $00040000; // Reserved, do not count on value
EAMD_BIT_19 = $00080000; // Reserved, do not count on value
EAMD_NEPP_FLAG = $00100000; // No-Execute Page Protection
EAMD_BIT_21 = $00200000; // Reserved, do not count on value
EAMD_EXMMX_FLAG = $00400000; // AMD Extensions to MMX technology
EAMD_MMX_FLAG = $00800000; // MMX technology
EAMD_FX_FLAG = $01000000; // FXSAVE and FXSTORE instructions
EAMD_FFX_FLAG = $02000000; // Fast FXSAVE and FXSTORE instructions
EAMD_BIT_26 = $04000000; // Reserved, do not count on value
EAMD_BIT_27 = $08000000; // Reserved, do not count on value
EAMD_BIT_28 = $10000000; // Reserved, do not count on value
EAMD_LONG_FLAG = $20000000; // Long Mode (64-bit Core)
EAMD_EX3DNOW_FLAG = $40000000; // AMD Extensions to 3DNow! intructions
EAMD_3DNOW_FLAG = DWORD($80000000); // AMD 3DNOW! Technology

{ Cyrix Standard Feature Flags }

CYRIX_FPU_FLAG = $00000001; // Floating-Point unit on chip
CYRIX_VME_FLAG = $00000002; // Virtual Mode Extention
CYRIX_DE_FLAG = $00000004; // Debugging Extention
CYRIX_PSE_FLAG = $00000008; // Page Size Extention
CYRIX_TSC_FLAG = $00000010; // Time Stamp Counter
CYRIX_MSR_FLAG = $00000020; // Model Specific Registers
CYRIX_PAE_FLAG = $00000040; // Physical Address Extention
CYRIX_MCE_FLAG = $00000080; // Machine Check Exception
CYRIX_CX8_FLAG = $00000100; // CMPXCHG8 Instruction
CYRIX_APIC_FLAG = $00000200; // Software-accessible local APIC on Chip
CYRIX_BIT_10 = $00000400; // Reserved, do not count on value
CYRIX_BIT_11 = $00000800; // Reserved, do not count on value
CYRIX_MTRR_FLAG = $00001000; // Memory Type Range Registers
CYRIX_PGE_FLAG = $00002000; // Page Global Enable
CYRIX_MCA_FLAG = $00004000; // Machine Check Architecture
CYRIX_CMOV_FLAG = $00008000; // Conditional Move Instruction
CYRIX_BIT_16 = $00010000; // Reserved, do not count on value
CYRIX_BIT_17 = $00020000; // Reserved, do not count on value
CYRIX_BIT_18 = $00040000; // Reserved, do not count on value
CYRIX_BIT_19 = $00080000; // Reserved, do not count on value
CYRIX_BIT_20 = $00100000; // Reserved, do not count on value
CYRIX_BIT_21 = $00200000; // Reserved, do not count on value
CYRIX_BIT_22 = $00400000; // Reserved, do not count on value
CYRIX_MMX_FLAG = $00800000; // MMX technology
CYRIX_BIT_24 = $01000000; // Reserved, do not count on value
CYRIX_BIT_25 = $02000000; // Reserved, do not count on value
CYRIX_BIT_26 = $04000000; // Reserved, do not count on value
CYRIX_BIT_27 = $08000000; // Reserved, do not count on value
CYRIX_BIT_28 = $10000000; // Reserved, do not count on value
CYRIX_BIT_29 = $20000000; // Reserved, do not count on value
CYRIX_BIT_30 = $40000000; // Reserved, do not count on value
CYRIX_BIT_31 = DWORD($80000000); // Reserved, do not count on value
{ Cyrix Enhanced Feature Flags }

ECYRIX_FPU_FLAG = $00000001; // Floating-Point unit on chip
ECYRIX_VME_FLAG = $00000002; // Virtual Mode Extention
ECYRIX_DE_FLAG = $00000004; // Debugging Extention
ECYRIX_PSE_FLAG = $00000008; // Page Size Extention
ECYRIX_TSC_FLAG = $00000010; // Time Stamp Counter
ECYRIX_MSR_FLAG = $00000020; // Model Specific Registers
ECYRIX_PAE_FLAG = $00000040; // Physical Address Extention
ECYRIX_MCE_FLAG = $00000080; // Machine Check Exception
ECYRIX_CX8_FLAG = $00000100; // CMPXCHG8 Instruction
ECYRIX_APIC_FLAG = $00000200; // Software-accessible local APIC on Chip
ECYRIX_SEP_FLAG = $00000400; // Fast System Call
ECYRIX_BIT_11 = $00000800; // Reserved, do not count on value
ECYRIX_MTRR_FLAG = $00001000; // Memory Type Range Registers
ECYRIX_PGE_FLAG = $00002000; // Page Global Enable
ECYRIX_MCA_FLAG = $00004000; // Machine Check Architecture
ECYRIX_ICMOV_FLAG = $00008000; // Integer Conditional Move Instruction
ECYRIX_FCMOV_FLAG = $00010000; // Floating Point Conditional Move Instruction
ECYRIX_BIT_17 = $00020000; // Reserved, do not count on value
ECYRIX_BIT_18 = $00040000; // Reserved, do not count on value
ECYRIX_BIT_19 = $00080000; // Reserved, do not count on value
ECYRIX_BIT_20 = $00100000; // Reserved, do not count on value
ECYRIX_BIT_21 = $00200000; // Reserved, do not count on value
ECYRIX_BIT_22 = $00400000; // Reserved, do not count on value
ECYRIX_MMX_FLAG = $00800000; // MMX technology
ECYRIX_EMMX_FLAG = $01000000; // Extended MMX Technology
ECYRIX_BIT_25 = $02000000; // Reserved, do not count on value
ECYRIX_BIT_26 = $04000000; // Reserved, do not count on value
ECYRIX_BIT_27 = $08000000; // Reserved, do not count on value
ECYRIX_BIT_28 = $10000000; // Reserved, do not count on value
ECYRIX_BIT_29 = $20000000; // Reserved, do not count on value
ECYRIX_BIT_30 = $40000000; // Reserved, do not count on value
ECYRIX_BIT_31 = DWORD($80000000); // Reserved, do not count on value


IP 地址: 已记录   报告
   2009-05-04, 21:58 下午
Raymond 离线,最后访问时间: 2020/7/3 3:40:25 格蠹老雷

发帖数前10位
注册: 2005-12-19
发 贴: 1,303
Re: 请问如何解读!cpuinfo指令Features栏属性
Reply Quote

这是NT内核抽象出来的CPU特性,记录在处理器的KPRCB结构的FeatureBits字段中,在内核启动时,nt!KiGetFeatureBits函数使用CPUID指令收集信息,分别按照AMD和INTEL CPU的特点将得到的信息放到FeatureBits中,各个位的定义在ReactOS的源代码中中可以找到:

00070 //
00071 // Kernel Feature Bits
00072 //
00073 #define KF_V86_VIS                      0x00000001
00074 #define KF_RDTSC                        0x00000002
00075 #define KF_CR4                          0x00000004
00076 #define KF_CMOV                         0x00000008
00077 #define KF_GLOBAL_PAGE                  0x00000010
00078 #define KF_LARGE_PAGE                   0x00000020
00079 #define KF_MTRR                         0x00000040
00080 #define KF_CMPXCHG8B                    0x00000080
00081 #define KF_MMX                          0x00000100
00082 #define KF_WORKING_PTE                  0x00000200
00083 #define KF_PAT                          0x00000400
00084 #define KF_FXSR                         0x00000800
00085 #define KF_FAST_SYSCALL                 0x00001000
00086 #define KF_XMMI                         0x00002000
00087 #define KF_3DNOW                        0x00004000
00088 #define KF_AMDK6MTRR                    0x00008000
00089 #define KF_XMMI64                       0x00010000
00090 #define KF_DTS                          0x00020000
00091 #define KF_NX_BIT                       0x20000000
00092 #define KF_NX_DISABLED                  0x40000000
00093 #define KF_NX_ENABLED                   0x80000000

因此,a0033fff代表的CPU功能是:KF_NX_ENABLED | KF_NX_BIT | KF_DTS | KF_XMMI64 | KF_XMMI | KF_FAST_SYSCALL 加上KF_FXSR前面的所有功能,也就是几乎所有功能都支持了。

lkd> .formats  a0033fff
Evaluate expression:
  Hex:     a0033fff
  Decimal: -1610399745
  Octal:   24000637777
  Binary:  10100000 00000011 00111111 11111111
  Chars:   ..?.
  Time:    ***** Invalid
  Float:   low -1.11173e-019 high -1.#QNAN
  Double:  -1.#QNAN


IP 地址: 已记录   报告
   2009-05-04, 23:36 下午
merryzhao 离线,最后访问时间: 2017/2/21 12:41:06 merry

发帖数前25位
注册: 2008-09-26
发 贴: 61
Re: 请问如何解读!cpuinfo指令Features栏属性
Reply Quote

Raymond, 学问一流,且乐于助人!

努力学习...


IP 地址: 已记录   报告
   2009-05-05, 09:05 上午
WANGyu 离线,最后访问时间: 2012/9/10 3:34:00 王宇

发帖数前10位
男
注册: 2007-05-08
发 贴: 306
Re: 请问如何解读!cpuinfo指令Features栏属性
Reply Quote

楼上的忘记感谢 MJ 了哦~

X86平台 微软的定义在: \base\ntos\inc\i386.h

//
// i386 Feature bit definitions
//
// N.B. The no execute feature flags must be identical on all platforms.

#define KF_V86_VIS                   0x00000001
#define KF_RDTSC                     0x00000002
#define KF_CR4                       0x00000004
#define KF_CMOV                      0x00000008
#define KF_GLOBAL_PAGE               0x00000010
#define KF_LARGE_PAGE                0x00000020
#define KF_MTRR                      0x00000040
#define KF_CMPXCHG8B                 0x00000080
#define KF_MMX                       0x00000100
#define KF_WORKING_PTE               0x00000200
#define KF_PAT                       0x00000400
#define KF_FXSR                      0x00000800
#define KF_FAST_SYSCALL              0x00001000
#define KF_XMMI                      0x00002000
#define KF_3DNOW                     0x00004000
#define KF_AMDK6MTRR                 0x00008000
#define KF_XMMI64                    0x00010000
#define KF_DTS                       0x00020000
#define KF_NOEXECUTE                 0x20000000
#define KF_GLOBAL_32BIT_EXECUTE      0x40000000
#define KF_GLOBAL_32BIT_NOEXECUTE    0x80000000


IP 地址: 已记录   报告
   2009-05-05, 20:54 下午
merryzhao 离线,最后访问时间: 2017/2/21 12:41:06 merry

发帖数前25位
注册: 2008-09-26
发 贴: 61
Re: 请问如何解读!cpuinfo指令Features栏属性
Reply Quote
因疏忽..,抱歉!
IP 地址: 已记录   报告
高端调试 » 软件调试 » Windows内核调试 » Re: 请问如何解读!cpuinfo指令Features栏属性

 
Legal Notice Privacy Statement Corporate Governance Corporate Governance
(C)2004-2020 ADVDBG.ORG All Rights Reserved.