All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] FB-DIMM temperature
@ 2007-01-11 15:34 Rudolf Marek
  2007-01-11 15:57 ` Vadim Zeitlin
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Rudolf Marek @ 2007-01-11 15:34 UTC (permalink / raw)
  To: lm-sensors

Hello,

Thanks for the improvements.

> 
> 	#include <sys/mman.h>
> 	#include <sys/stat.h>
> 	#include <fcntl.h>
> 	#include <stdio.h>
> 
> 	int main(void)
> 	{
> 	    int i;
> 	    unsigned char *addr;
> 	    int fd = open("/dev/mem", O_RDONLY);
> 
> 	    if ( fd = -1 ) {
> 		perror("failed to open /dev/mem");
> 		return 1;
> 	    }
> 
> 	    addr = mmap(0, 128*1024*1024, PROT_READ, MAP_PRIVATE, fd, 0xFE000000);
> 
> 	    if ( addr = MAP_FAILED ) {
> 		perror("mmap failed");
> 		return 1;
> 	    }
> 
> 	    /* we want function 3, 4 channels, 16AMB/channel */
> 	    for ( i = 0; i < 64; i++ ) {
> 		int idx = i*2048;
> 		if ( addr[idx] != 0xff || addr[idx+1] != 0xff ) {
> 		    printf("Intel sig at %i: %02x %02x\n",
> 	                   i, addr[idx], addr[idx+1]);

We should see the 86 80



> 		    /* offset 85h function 3 */
> 		    printf("Current temp is: %fC\n", addr[idx+(256*3)+0x85]/2.);
> 		}
> 	    }
> 
> 	    munmap(addr, 128*1024*1024);
> 
> 	    return 0;
> 	}
> 
> and here are the results:
> 
> 	# ./fbdt
> 	Intel sig at 0: 1d 11
> 	Current temp is: 71.500000C
> 	Intel sig at 16: 1d 11
> 	Current temp is: 0.000000C
> 	Intel sig at 32: 1d 11
> 	Current temp is: 61.000000C
> 	Intel sig at 48: 1d 11
> 	Current temp is: 0.000000C
> 

Hmm there is something wrong. Please provide output of lspci -vvv
and lspci -xxx

Do you have the windows software somewhere to download?

Rudolf



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-01-11 21:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-11 15:34 [lm-sensors] FB-DIMM temperature Rudolf Marek
2007-01-11 15:57 ` Vadim Zeitlin
2007-01-11 16:57 ` Rudolf Marek
2007-01-11 17:13 ` Vadim Zeitlin
2007-01-11 19:56 ` Vadim Zeitlin
2007-01-11 21:50 ` Rudolf Marek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.