Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src



Module Name:    src
Committed By:   andvar
Date:           Tue Apr 30 19:35:29 UTC 2024

Modified Files:
        src/distrib/sets/lists/man: mi
        src/distrib/sets/lists/manhtml: mi
        src/share/man/man4/man4.i386: Makefile
        src/share/man/man4/man4.x86: Makefile
        src/sys/arch/amd64/conf: ALL GENERIC
        src/sys/arch/i386/conf: ALL GENERIC
        src/sys/arch/x86/x86: viac7temp.c
Added Files:
        src/share/man/man4/man4.x86: viac7temp.4
Removed Files:
        src/share/man/man4/man4.i386: viac7temp.4

Log Message:
viac7temp(4): rewrite temperature sensor to read value from MSR instead of using
documented cpuid instruction and eax register.

This approach is adapted from linux via-cputemp.c, no official documentation is
currently available. However, msr value seems to work on all tested CPUs while
documented cpuid instruction typically reports 0, even for my C7-D CPU.
msr value seems to have temperature in Celsius in lower 24-bits without fraction
(thus "msr & 0xffffff;" is used).

Tested on my personal systems based on CPUs below (i386 and amd64):
C7-D 1.6GHz (i386 only), Nano X2 L4350E, Nano X2 U4300, U2300 Nano, KX-U6580.
Also got one response via email which was based on Nano X2 L4050 (VE-900).
Nano reports independent values for each core.
KX-U6580 seems to show the same value for all cores but more testing is needed.

Since it works on amd64 capable CPUs, adding driver to GENERIC kernel config.
Also moving viac7temp man page to x86 instead of i386 (with updates).
In theory the change should add support for all VIA Nano CPUs and Zhaoxin CPUs
 at least up to KX-6000(G) series.

In the future I may need to introduce amd64 kernel module as well.

Plan to pullup to at least netbsd-10.

Patch mainly reviewed by riastradh.


To generate a diff of this commit:
cvs rdiff -u -r1.1772 -r1.1773 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/manhtml/mi
cvs rdiff -u -r1.80 -r1.81 src/share/man/man4/man4.i386/Makefile
cvs rdiff -u -r1.3 -r0 src/share/man/man4/man4.i386/viac7temp.4
cvs rdiff -u -r1.23 -r1.24 src/share/man/man4/man4.x86/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.x86/viac7temp.4
cvs rdiff -u -r1.187 -r1.188 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.611 -r1.612 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.518 -r1.519 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.1255 -r1.1256 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x86/x86/viac7temp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index