Saturday, November 22, 2008

[SRC]GM965 Thermal Sensor detect program v0.3

Last updated: 2008-11-03

Dear all:

I haven't found a tool in linux to detect the temperature of GM965. So I just take some sources and try to write it to do it.
First, I try libpciaccess and learn from xf86-video-intel code. But I found the "pci_device_find_by_slot" function can't find the correct "Device 0"'s base_addr and size. So I search some code about the process of "MCHBAR", because I found the "Device 0 MCHBAR" contains "Thermal Sensor" Regs in Intel GM965 datasheet.
And I found coreboot's inteltool. At that time, I don't get the trac version code, so the inteltool code which I used is a bit old.
I focus on the "print_mchbar" funcion, and make a small revise on it to support GM965.
Then I can dump the MCHBAR Regs in GM965.
The other thing is much more easy, and I had a little trouble in transfering the TR1's value to Centigrade degree value. I just test the value some time and use a Magic number based on experience.

Now it seems to work.
Hope you like it.

Thank you for your orignal work, Stefan Reinauer.
Let's GNU/Linux.

http://www.coreboot.org/pipermail/coreboot/attachments/20081025/c7921f6c/attachment-0001.gz

Updated version: Add GM945 detect support, make a little adjustment of temprature report.

http://www.coreboot.org/pipermail/coreboot/attachments/20081026/0f52e1e7/attachment-0001.gz

2008-11-03 Updated version:

Use Intel's offical datasheet formula to transfer display.

http://lists.lm-sensors.org/pipermail/lm-sensors/2008-November/024623.html

http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20081103/38f7eac1/attachment.tgz

No comments: