diff --git a/CHANGES b/CHANGES index 8e74709b..16e607a4 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,7 @@ SVN HEAD Library: Add support for the pc87247 driver (fans only) Probe for busses before chips Drop support for algorithm names + Add support for coretemp driver Man page i2cdetect.8: Describe the output convention Man page sensors.1: Update (option -c) and clean up Module icspll: Delete. It was useless and dangerous. @@ -16,6 +17,7 @@ SVN HEAD Drop option -a (show algorithm names) Program sensors-detect: Add SMSC DME1737 detection Add EPoX EP1308 detection (Hans Edgington) + Add Intel Core thermal sensor detection 2.10.1 (20060924) File doc/developers/checklist renamed to dev/developers/release_checklist diff --git a/lib/chips.c b/lib/chips.c index 5cee2888..6a53c763 100644 --- a/lib/chips.c +++ b/lib/chips.c @@ -6028,6 +6028,16 @@ static sensors_chip_feature k8temp_features[] = { 0 } }; +static sensors_chip_feature coretemp_features[] = + { + { SENSORS_CORETEMP_TEMP1, "temp1", NOMAP, NOMAP, + R, NOSYSCTL, VALUE(2), 0 }, + { SENSORS_CORETEMP_TEMP1_CRIT, "temp1_crit", SENSORS_CORETEMP_TEMP1, + SENSORS_CORETEMP_TEMP1, R, NOSYSCTL, VALUE(1), 0 }, + { SENSORS_CORETEMP_TEMP1_CRIT_ALARM, "temp1_crit_alarm", SENSORS_CORETEMP_TEMP1, + NOMAP, R, NOSYSCTL, VALUE(1), 0 }, + { 0 } + }; sensors_chip_features sensors_chip_features_list[] = { @@ -6136,5 +6146,6 @@ sensors_chip_features sensors_chip_features_list[] = { SENSORS_F71805F_PREFIX, f71805f_features }, { SENSORS_ABITUGURU_PREFIX, abituguru_features }, { SENSORS_K8TEMP_PREFIX, k8temp_features }, + { SENSORS_CORETEMP_PREFIX, coretemp_features }, { 0 } }; diff --git a/lib/chips.h b/lib/chips.h index f9e94d23..2dcd4f63 100644 --- a/lib/chips.h +++ b/lib/chips.h @@ -2224,4 +2224,11 @@ #define SENSORS_K8TEMP_TEMP3 0x03 /* R */ #define SENSORS_K8TEMP_TEMP4 0x04 /* R */ +/* coretemp */ + +#define SENSORS_CORETEMP_PREFIX "coretemp" +#define SENSORS_CORETEMP_TEMP1 0x01 /* R */ +#define SENSORS_CORETEMP_TEMP1_CRIT 0x02 /* R */ +#define SENSORS_CORETEMP_TEMP1_CRIT_ALARM 0x03 /* R */ + #endif /* def LIB_SENSORS_CHIPS_H */ diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index ecaa2d3d..44eaa1c6 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -1848,6 +1848,11 @@ $chip_kern26_w83791d = { driver => "k8temp", detect => sub { k8temp_pci_detect(); }, }, + { + name => "Intel Core family thermal sensor", + driver => "coretemp", + detect => sub { coretemp_detect(); }, + }, ); ####################### @@ -5124,6 +5129,20 @@ sub k8temp_pci_detect return 9; } +# Returns: undef if not detected, (9) if detected. +sub coretemp_detect +{ + my $probecpu; + foreach $probecpu (@cpu) { + if ($probecpu->{'vendor_id'} eq 'GenuineIntel' && + $probecpu->{'cpu family'} == 6 && + ($probecpu->{'model'} == 14 || + $probecpu->{'model'} == 15)) { + return 9; + } + } + return; +} ################ # MAIN PROGRAM # diff --git a/prog/sensors/chips.c b/prog/sensors/chips.c index c8c391fd..49d87a75 100644 --- a/prog/sensors/chips.c +++ b/prog/sensors/chips.c @@ -6234,6 +6234,25 @@ void print_k8temp(const sensors_chip_name *name) } } +void print_coretemp(const sensors_chip_name *name) +{ + char *label; + double cur, over, alarm; + int valid; + + if (!sensors_get_label_and_valid(*name, SENSORS_CORETEMP_TEMP1, &label, &valid) + && !sensors_get_feature(*name, SENSORS_CORETEMP_TEMP1, &cur) + && !sensors_get_feature(*name, SENSORS_CORETEMP_TEMP1_CRIT_ALARM, &alarm) + && !sensors_get_feature(*name, SENSORS_CORETEMP_TEMP1_CRIT, &over)) { + if (valid) { + print_label(label, 10); + print_temp_info(cur, over, 0, MAXONLY, 0, 0); + printf(" %s\n", alarm ? "ALARM" : ""); + } + } else + printf("ERROR: Can't get temperature data!\n"); + free(label); +} void print_unknown_chip(const sensors_chip_name *name) { diff --git a/prog/sensors/chips.h b/prog/sensors/chips.h index 603a5550..a3f66c44 100644 --- a/prog/sensors/chips.h +++ b/prog/sensors/chips.h @@ -76,5 +76,6 @@ extern void print_smsc47b397(const sensors_chip_name *name); extern void print_f71805f(const sensors_chip_name *name); extern void print_abituguru(const sensors_chip_name *name); extern void print_k8temp(const sensors_chip_name *name); +extern void print_coretemp(const sensors_chip_name *name); #endif /* def PROG_SENSORS_CHIPS_H */ diff --git a/prog/sensors/main.c b/prog/sensors/main.c index 6c3f2b33..259a8d90 100644 --- a/prog/sensors/main.c +++ b/prog/sensors/main.c @@ -418,6 +418,7 @@ struct match matches[] = { { "f71805f", print_f71805f }, { "abituguru", print_abituguru }, { "k8temp", print_k8temp }, + { "coretemp", print_coretemp }, { NULL, NULL } };