~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/hwmon/fam15h_power.rst

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/hwmon/fam15h_power.rst (Version linux-6.11.5) and /Documentation/hwmon/fam15h_power.rst (Version linux-4.18.20)


  1 Kernel driver fam15h_power                        
  2 ==========================                        
  3                                                   
  4 Supported chips:                                  
  5                                                   
  6 * AMD Family 15h Processors                       
  7                                                   
  8 * AMD Family 16h Processors                       
  9                                                   
 10   Prefix: 'fam15h_power'                          
 11                                                   
 12   Addresses scanned: PCI space                    
 13                                                   
 14   Datasheets:                                     
 15                                                   
 16   - BIOS and Kernel Developer's Guide (BKDG) F    
 17   - BIOS and Kernel Developer's Guide (BKDG) F    
 18   - AMD64 Architecture Programmer's Manual Vol    
 19                                                   
 20 Author: Andreas Herrmann <herrmann.der.user@goo    
 21                                                   
 22 Description                                       
 23 -----------                                       
 24                                                   
 25 1) Processor TDP (Thermal design power)           
 26                                                   
 27 Given a fixed frequency and voltage, the power    
 28 processor varies based on the workload being e    
 29 is the power consumed when running a specific     
 30 design power (TDP) is an example of derated po    
 31                                                   
 32 This driver permits reading of registers provi    
 33 of AMD Family 15h and 16h processors via TDP a    
 34                                                   
 35 For AMD Family 15h and 16h processors the foll    
 36 be calculated using different processor northb    
 37 registers:                                        
 38                                                   
 39 * BasePwrWatts:                                   
 40     Specifies in watts the maximum amount of p    
 41     consumed by the processor for NB and logic    
 42                                                   
 43 * ProcessorPwrWatts:                              
 44     Specifies in watts the maximum amount of p    
 45     the processor can support.                    
 46 * CurrPwrWatts:                                   
 47     Specifies in watts the current amount of p    
 48     consumed by the processor.                    
 49                                                   
 50 This driver provides ProcessorPwrWatts and Cur    
 51                                                   
 52 * power1_crit (ProcessorPwrWatts)                 
 53 * power1_input (CurrPwrWatts)                     
 54                                                   
 55 On multi-node processors the calculated value     
 56 package and not for a single node. Thus the dr    
 57 attributes only for internal node0 of a multi-    
 58                                                   
 59 2) Accumulated Power Mechanism                    
 60                                                   
 61 This driver also introduces an algorithm that     
 62 calculate the average power consumed by a proc    
 63 measurement interval Tm. The feature of accumu    
 64 indicated by CPUID Fn8000_0007_EDX[12].           
 65                                                   
 66 * Tsample:                                        
 67         compute unit power accumulator sample     
 68                                                   
 69 * Tref:                                           
 70         the PTSC counter period                   
 71                                                   
 72 * PTSC:                                           
 73         performance timestamp counter             
 74                                                   
 75 * N:                                              
 76         the ratio of compute unit power accumu    
 77         PTSC period                               
 78                                                   
 79 * Jmax:                                           
 80         max compute unit accumulated power whi    
 81         MaxCpuSwPwrAcc MSR C001007b               
 82                                                   
 83 * Jx/Jy:                                          
 84         compute unit accumulated power which i    
 85         CpuSwPwrAcc MSR C001007a                  
 86 * Tx/Ty:                                          
 87         the value of performance timestamp cou    
 88         by CU_PTSC MSR C0010280                   
 89                                                   
 90 * PwrCPUave:                                      
 91         CPU average power                         
 92                                                   
 93 i. Determine the ratio of Tsample to Tref by e    
 94                                                   
 95         N = value of CPUID Fn8000_0007_ECX[Cpu    
 96                                                   
 97 ii. Read the full range of the cumulative ener    
 98     MSR MaxCpuSwPwrAcc.                           
 99                                                   
100         Jmax = value returned.                    
101                                                   
102 iii. At time x, SW reads CpuSwPwrAcc MSR and s    
103                                                   
104         Jx = value read from CpuSwPwrAcc and T    
105                                                   
106 iv. At time y, SW reads CpuSwPwrAcc MSR and sa    
107                                                   
108         Jy = value read from CpuSwPwrAcc and T    
109                                                   
110 v. Calculate the average power consumption for    
111    time period (y-x). Unit of result is uWatt:    
112                                                   
113         if (Jy < Jx) // Rollover has occurred     
114                 Jdelta = (Jy + Jmax) - Jx         
115         else                                      
116                 Jdelta = Jy - Jx                  
117         PwrCPUave = N * Jdelta * 1000 / (Ty -     
118                                                   
119 This driver provides PwrCPUave and interval(de    
120 and maximum is 1 second):                         
121                                                   
122 * power1_average (PwrCPUave)                      
123 * power1_average_interval (Interval)              
124                                                   
125 The power1_average_interval can be updated at     
126 as below:                                         
127                                                   
128 chip `fam15h_power-*`                             
129         set power1_average_interval 0.01          
130                                                   
131 Then save it with "sensors -s".                   
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php