英特尔处理器:“如果CPUID.06H:EAX.[7] = 1"意义? [英] Intel Processor : "If CPUID.06H:EAX.[7] = 1" Meaning?

查看:352
本文介绍了英特尔处理器:“如果CPUID.06H:EAX.[7] = 1"意义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下注释在英特尔处理器数据表中是什么意思?如何在Linux的驱动程序代码中进行检查?

What does the below comment mean in Intel Processor data sheet? How can I check that in my driver's code in Linux?

如果是CPUID.06H:EAX.[7] = 1

我在寄存器描述表的注释列中看到了SW开发人员手册(针对Intel处理器)中的此类声明.

I come across this type of statements in the SW developer's manual for Intel Processors in the comments column in register description table..

参考: https ://software.intel.com/sites/default/files/managed/22/0d/335592-sdm-vol-4.pdf

请帮助我了解处理器说明.

Please help me to understand the processor descriptions.

谢谢.

推荐答案

问题1

以下注释在英特尔处理器数据表中意味着什么?

What does the below comment mean in Intel Processor data sheet?

If CPUID.06H:EAX.[7] = 1

cpuid是用于发现处理器详细信息的特殊处理器指令(例如,检查某些不常见功能的可用性).它隐式使用EAX寄存器作为参数,并以EAX,EBX,ECX,EDX返回结果. 在英特尔手册中,常规格式为:

The cpuid is a special processor instruction used to discover details of the processor (check the availability of some uncommon features for eg). It implicitly uses the EAX register as parameter and returns the result in EAX, EBX, ECX, EDX. In Intel manual, the general format is:

CPUID.EAX_VALUE:RETURN_REGISTER.[BIT_NUMBER] = 1:表示如果使用EAX寄存器= EAX_VALUE执行CPUID指令,则将在RETURN_REGISTER中得到结果.如果设置了位数BIT_NUMBER,则可以在手册中找到它的特殊含义.

CPUID.EAX_VALUE:RETURN_REGISTER.[BIT_NUMBER] = 1 : means that If you execute CPUID instruction with EAX register = EAX_VALUE, you will get the result in RETURN_REGISTER. If the bit number BIT_NUMBER is set, so it has some special mean you can find in the manuals.

CPUID.06H:EAX.[7]=1意味着,如果以寄存器EAX = 06H(十六进制为6)作为输入执行CPUID指令,则将在EAX中获得结果.如果结果的位数7为1,那么它具有一些特殊的含义,您可以在手册中找到.例如.我在手册中阅读了此内容:

CPUID.06H:EAX.[7]=1 means that If you execute CPUID instruction with register EAX = 06H (6 in hexadecimal) as input, you will get the result in EAX. If the bit number 7 of the result is 1, so it has some special mean you can find in the manuals. For eg. I read this in the manual:

HWP基准资源和功能的可用性, CPUID.06H:EAX [bit 7]:如果该位置位(即 CPUID.06H:EAX.[7]=1),HWP提供了几个新的体系结构MSR: IA32_PM_ENABLE,IA32_HWP_CAPABILITIES, IA32_HWP_REQUEST,IA32_HWP_STATUS.

Availability of HWP baseline resource and capability, CPUID.06H:EAX[bit 7]: If this bit is set (that is if CPUID.06H:EAX.[7]=1), HWP provides several new architectural MSRs: IA32_PM_ENABLE, IA32_HWP_CAPABILITIES, IA32_HWP_REQUEST,IA32_HWP_STATUS.

问题2

如何在Linux中的驱动程序代码中进行检查?

How can I check that in my driver's code in Linux?

if(cpuid_eax(0x06) & (1<<7)){
   // Good news :features availlable, do your job
}else{
   // Bad luck ::
   return;
}

这篇关于英特尔处理器:“如果CPUID.06H:EAX.[7] = 1"意义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆