Reading TEMPERATURE_TARGET directly from CPU [closed]

旧街凉风 提交于 2021-01-29 03:38:59

问题


I would like to directly read the minimum temperate at which the TCC will be activated from the TEMPERATURE_TARGET register in my Intel i7-5930k. The Socket Thermal Guide (http://www.intel.com/content/www/us/en/processors/core/core-i7-lga2011-3-tmsdg.html) from intel says there is a software readable field in the TEMPERATURE_TARGET register. Is there a way to read this field to get the absolute processor Temperature in Linux using either a command line tool or a writing some code?


回答1:


It depends on the OS.

On linux, you can read it using rdmsr (read model specific registers)

On ubuntu, you could try something like the following:

sudo apt-get install msr-tools
sudo modprobe msr
sudo rdmsr --bitfield 15:8 -c 0x00001a2
sudo rdmsr --bitfield 23:16 -c 0x00001a2

Returns 0x12 and 0x69 on my machine.

Explanation

From the Thermal Mechanical Design Guidelines (page 20):

  1. Temperature Control (T_CONTROL ) Offset: MSR (1A2h) TEMPERATURE_TARGET[15:8]
  2. TCC Activation Temperature: MSR (1A2h) TEMPERATURE_TARGET[23:16]
  • 0x00001a2 is the register number.
  • The first rdmsr command reads the field Temperature Control Offset.
  • The second rdmsr command reads the field TCC Activation Temperature.


来源:https://stackoverflow.com/questions/37400005/reading-temperature-target-directly-from-cpu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!