X86 Assembly - accessing a chip

Tag: assembly , x86 , gpu , chip Author: firemament Date: 2010-07-28

Lets say that my GPU includes a chip called ADT7473. I am interested in receiving information from this chip about the temperature of my card. My question is, how to access this chip? is that accomplished using the IN/OUT instructions?


I might add those lines found in the chip's documentation :

Table 18. Temperature Reading Registers (Power?On Default = 0x01) (Note 1 and 2)

0x25 : Read?only : Remote 1 temperature reading (8 MSB of reading). (Note 3 and 4)

0x26 : Read?only : Local temperature reading (8 MSB of reading).

0x27 : Read?only : Remote 2 temperature reading (8 MSB of reading). (Note 3 and 4)

I was told that there should be an interface chip on the card, which can be accessed. How can I know the port which should be used? or the name of the chip?

Other Answer1

According to that specs, that chip uses the SMBus protocol. So the chip is accessed from some interface chip on your graphics card using the SMBus protocol, and is probably exported to the OS as an I2C/SMBus device. To access it you would need to access the interface chip using IN/OUT.

As an example, my USB TV capture card has several chips:

  • An USB interface chip, this chip has some pins for controlling other chips on the card (I2C bus, GPIO pins, ...)
  • Tuner and demodulator chips, that need to be accessed indirectly through the interface chip.


Occasionally you'll run across I/O devices that are memory mapped too (for speed, the in and out instructions have historically been painfully slow on x86 chips).
Thank you for your answer. However, how can I know which chip to access or which IN/OUT port to use?

Other Answer2

For NVIDIA or ATI GPUs, check this:


This is the best way, no need to use assembly, vendors already provide interfaces to their temperature sensors.