17ebd8b66SMauro Carvalho ChehabKernel driver k8temp
27ebd8b66SMauro Carvalho Chehab====================
37ebd8b66SMauro Carvalho Chehab
47ebd8b66SMauro Carvalho ChehabSupported chips:
57ebd8b66SMauro Carvalho Chehab
67ebd8b66SMauro Carvalho Chehab  * AMD Athlon64/FX or Opteron CPUs
77ebd8b66SMauro Carvalho Chehab
87ebd8b66SMauro Carvalho Chehab    Prefix: 'k8temp'
97ebd8b66SMauro Carvalho Chehab
107ebd8b66SMauro Carvalho Chehab    Addresses scanned: PCI space
117ebd8b66SMauro Carvalho Chehab
12f4753560SAlexander A. Klimov    Datasheet: https://www.amd.com/system/files/TechDocs/32559.pdf
137ebd8b66SMauro Carvalho Chehab
147ebd8b66SMauro Carvalho ChehabAuthor: Rudolf Marek
157ebd8b66SMauro Carvalho Chehab
167ebd8b66SMauro Carvalho ChehabContact: Rudolf Marek <r.marek@assembler.cz>
177ebd8b66SMauro Carvalho Chehab
187ebd8b66SMauro Carvalho ChehabDescription
197ebd8b66SMauro Carvalho Chehab-----------
207ebd8b66SMauro Carvalho Chehab
217ebd8b66SMauro Carvalho ChehabThis driver permits reading temperature sensor(s) embedded inside AMD K8
227ebd8b66SMauro Carvalho Chehabfamily CPUs (Athlon64/FX, Opteron). Official documentation says that it works
237ebd8b66SMauro Carvalho Chehabfrom revision F of K8 core, but in fact it seems to be implemented for all
247ebd8b66SMauro Carvalho Chehabrevisions of K8 except the first two revisions (SH-B0 and SH-B3).
257ebd8b66SMauro Carvalho Chehab
267ebd8b66SMauro Carvalho ChehabPlease note that you will need at least lm-sensors 2.10.1 for proper userspace
277ebd8b66SMauro Carvalho Chehabsupport.
287ebd8b66SMauro Carvalho Chehab
297ebd8b66SMauro Carvalho ChehabThere can be up to four temperature sensors inside single CPU. The driver
307ebd8b66SMauro Carvalho Chehabwill auto-detect the sensors and will display only temperatures from
317ebd8b66SMauro Carvalho Chehabimplemented sensors.
327ebd8b66SMauro Carvalho Chehab
337ebd8b66SMauro Carvalho ChehabMapping of /sys files is as follows:
347ebd8b66SMauro Carvalho Chehab
357ebd8b66SMauro Carvalho Chehab============= ===================================
367ebd8b66SMauro Carvalho Chehabtemp1_input   temperature of Core 0 and "place" 0
377ebd8b66SMauro Carvalho Chehabtemp2_input   temperature of Core 0 and "place" 1
387ebd8b66SMauro Carvalho Chehabtemp3_input   temperature of Core 1 and "place" 0
397ebd8b66SMauro Carvalho Chehabtemp4_input   temperature of Core 1 and "place" 1
407ebd8b66SMauro Carvalho Chehab============= ===================================
417ebd8b66SMauro Carvalho Chehab
427ebd8b66SMauro Carvalho ChehabTemperatures are measured in degrees Celsius and measurement resolution is
437ebd8b66SMauro Carvalho Chehab1 degree C. It is expected that future CPU will have better resolution. The
447ebd8b66SMauro Carvalho Chehabtemperature is updated once a second. Valid temperatures are from -49 to
457ebd8b66SMauro Carvalho Chehab206 degrees C.
467ebd8b66SMauro Carvalho Chehab
477ebd8b66SMauro Carvalho ChehabTemperature known as TCaseMax was specified for processors up to revision E.
487ebd8b66SMauro Carvalho ChehabThis temperature is defined as temperature between heat-spreader and CPU
497ebd8b66SMauro Carvalho Chehabcase, so the internal CPU temperature supplied by this driver can be higher.
507ebd8b66SMauro Carvalho ChehabThere is no easy way how to measure the temperature which will correlate
517ebd8b66SMauro Carvalho Chehabwith TCaseMax temperature.
527ebd8b66SMauro Carvalho Chehab
537ebd8b66SMauro Carvalho ChehabFor newer revisions of CPU (rev F, socket AM2) there is a mathematically
547ebd8b66SMauro Carvalho Chehabcomputed temperature called TControl, which must be lower than TControlMax.
557ebd8b66SMauro Carvalho Chehab
567ebd8b66SMauro Carvalho ChehabThe relationship is following:
577ebd8b66SMauro Carvalho Chehab
587ebd8b66SMauro Carvalho Chehab	temp1_input - TjOffset*2 < TControlMax,
597ebd8b66SMauro Carvalho Chehab
607ebd8b66SMauro Carvalho ChehabTjOffset is not yet exported by the driver, TControlMax is usually
617ebd8b66SMauro Carvalho Chehab70 degrees C. The rule of the thumb -> CPU temperature should not cross
627ebd8b66SMauro Carvalho Chehab60 degrees C too much.
63