All of lore.kernel.org
 help / color / mirror / Atom feed
From: r.marek@assembler.cz (Rudolf Marek)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] FB-DIMM temperature
Date: Thu, 11 Jan 2007 15:34:44 +0000	[thread overview]
Message-ID: <45A65914.6040302@assembler.cz> (raw)

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



             reply	other threads:[~2007-01-11 15:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-11 15:34 Rudolf Marek [this message]
2007-01-11 15:57 ` [lm-sensors] FB-DIMM temperature 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45A65914.6040302@assembler.cz \
    --to=r.marek@assembler.cz \
    --cc=lm-sensors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.