Date: Mon, 31 Jul 2017 18:07:49 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 221071] NCT6779D - implement support for sensor readings Message-ID: <bug-221071-8-g4ZTYoI188@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-221071-8@https.bugs.freebsd.org/bugzilla/> References: <bug-221071-8@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221071 --- Comment #5 from Nils Beyer <nbe@renzel.net> --- (In reply to Andriy Gapon from comment #4) okay, so the value that "superiotool -de" spits out already is the current temperature in °C. Got it. What about VCORE voltage. This is the logic: ---------------------------------------------------------------------------- #define RFACT_NONE 10000 + { .desc = "VCore", .type = ENVSYS_SVOLTS_DC, .bank = 4, .reg = 0x80, .refresh = lm_refresh_volt, .rfact = RFACT_NONE / 2 }, + data = (*sc->lm_readreg)(sc, sc->lm_sensors[n].reg); if (data == 0xff) { sc->sensors[n].state = ENVSYS_SINVALID; } else { sc->sensors[n].value_cur = (data << 4); if (sc->sensors[n].rfact) { sc->sensors[n].value_cur *= sc->sensors[n].rfact; sc->sensors[n].value_cur /= 10; } else { sc->sensors[n].value_cur *= sc->lm_sensors[n].rfact; sc->sensors[n].value_cur /= 10; sc->sensors[n].rfact = sc->lm_sensors[n].rfact; } sc->sensors[n].state = ENVSYS_SVALID; } ---------------------------------------------------------------------------- bank 4, register 0x80 reads: 0x42 -> 66 1) it's not 0xff, so go on 2) shift left by 4 -> 1056 (I'll keep decimal for now) 3) "rfact" is set (I think), so multiply that with "rfact" (5000) -> 5280000 4) divide that with 10 -> 528000 So my CPU is running with 528000V or (if millivolts: 528V). Lovely, hard to cool it, though... -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-221071-8-g4ZTYoI188>
