1*4882a593Smuzhiyun=================================== 2*4882a593SmuzhiyunKernel driver: x86_pkg_temp_thermal 3*4882a593Smuzhiyun=================================== 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunSupported chips: 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun* x86: with package level thermal management 8*4882a593Smuzhiyun 9*4882a593Smuzhiyun(Verify using: CPUID.06H:EAX[bit 6] =1) 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunAuthors: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunReference 14*4882a593Smuzhiyun--------- 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunIntel® 64 and IA-32 Architectures Software Developer’s Manual (Jan, 2013): 17*4882a593SmuzhiyunChapter 14.6: PACKAGE LEVEL THERMAL MANAGEMENT 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunDescription 20*4882a593Smuzhiyun----------- 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunThis driver register CPU digital temperature package level sensor as a thermal 23*4882a593Smuzhiyunzone with maximum two user mode configurable trip points. Number of trip points 24*4882a593Smuzhiyundepends on the capability of the package. Once the trip point is violated, 25*4882a593Smuzhiyunuser mode can receive notification via thermal notification mechanism and can 26*4882a593Smuzhiyuntake any action to control temperature. 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun 29*4882a593SmuzhiyunThreshold management 30*4882a593Smuzhiyun-------------------- 31*4882a593SmuzhiyunEach package will register as a thermal zone under /sys/class/thermal. 32*4882a593Smuzhiyun 33*4882a593SmuzhiyunExample:: 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun /sys/class/thermal/thermal_zone1 36*4882a593Smuzhiyun 37*4882a593SmuzhiyunThis contains two trip points: 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun- trip_point_0_temp 40*4882a593Smuzhiyun- trip_point_1_temp 41*4882a593Smuzhiyun 42*4882a593SmuzhiyunUser can set any temperature between 0 to TJ-Max temperature. Temperature units 43*4882a593Smuzhiyunare in milli-degree Celsius. Refer to "Documentation/driver-api/thermal/sysfs-api.rst" for 44*4882a593Smuzhiyunthermal sys-fs details. 45*4882a593Smuzhiyun 46*4882a593SmuzhiyunAny value other than 0 in these trip points, can trigger thermal notifications. 47*4882a593SmuzhiyunSetting 0, stops sending thermal notifications. 48*4882a593Smuzhiyun 49*4882a593SmuzhiyunThermal notifications: 50*4882a593SmuzhiyunTo get kobject-uevent notifications, set the thermal zone 51*4882a593Smuzhiyunpolicy to "user_space". 52*4882a593Smuzhiyun 53*4882a593SmuzhiyunFor example:: 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun echo -n "user_space" > policy 56