docs: hwmon: fam15h_power: convert to ReST format
Convert fam15h_power to ReST format, in order to allow it to be parsed by Sphinx. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
a9fc881b9b
commit
b413e3fa7f
|
@ -2,15 +2,20 @@ Kernel driver fam15h_power
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
Supported chips:
|
Supported chips:
|
||||||
|
|
||||||
* AMD Family 15h Processors
|
* AMD Family 15h Processors
|
||||||
|
|
||||||
* AMD Family 16h Processors
|
* AMD Family 16h Processors
|
||||||
|
|
||||||
Prefix: 'fam15h_power'
|
Prefix: 'fam15h_power'
|
||||||
|
|
||||||
Addresses scanned: PCI space
|
Addresses scanned: PCI space
|
||||||
|
|
||||||
Datasheets:
|
Datasheets:
|
||||||
BIOS and Kernel Developer's Guide (BKDG) For AMD Family 15h Processors
|
|
||||||
BIOS and Kernel Developer's Guide (BKDG) For AMD Family 16h Processors
|
- BIOS and Kernel Developer's Guide (BKDG) For AMD Family 15h Processors
|
||||||
AMD64 Architecture Programmer's Manual Volume 2: System Programming
|
- BIOS and Kernel Developer's Guide (BKDG) For AMD Family 16h Processors
|
||||||
|
- AMD64 Architecture Programmer's Manual Volume 2: System Programming
|
||||||
|
|
||||||
Author: Andreas Herrmann <herrmann.der.user@googlemail.com>
|
Author: Andreas Herrmann <herrmann.der.user@googlemail.com>
|
||||||
|
|
||||||
|
@ -31,14 +36,19 @@ For AMD Family 15h and 16h processors the following power values can
|
||||||
be calculated using different processor northbridge function
|
be calculated using different processor northbridge function
|
||||||
registers:
|
registers:
|
||||||
|
|
||||||
* BasePwrWatts: Specifies in watts the maximum amount of power
|
* BasePwrWatts:
|
||||||
|
Specifies in watts the maximum amount of power
|
||||||
consumed by the processor for NB and logic external to the core.
|
consumed by the processor for NB and logic external to the core.
|
||||||
* ProcessorPwrWatts: Specifies in watts the maximum amount of power
|
|
||||||
|
* ProcessorPwrWatts:
|
||||||
|
Specifies in watts the maximum amount of power
|
||||||
the processor can support.
|
the processor can support.
|
||||||
* CurrPwrWatts: Specifies in watts the current amount of power being
|
* CurrPwrWatts:
|
||||||
|
Specifies in watts the current amount of power being
|
||||||
consumed by the processor.
|
consumed by the processor.
|
||||||
|
|
||||||
This driver provides ProcessorPwrWatts and CurrPwrWatts:
|
This driver provides ProcessorPwrWatts and CurrPwrWatts:
|
||||||
|
|
||||||
* power1_crit (ProcessorPwrWatts)
|
* power1_crit (ProcessorPwrWatts)
|
||||||
* power1_input (CurrPwrWatts)
|
* power1_input (CurrPwrWatts)
|
||||||
|
|
||||||
|
@ -53,35 +63,53 @@ calculate the average power consumed by a processor during a
|
||||||
measurement interval Tm. The feature of accumulated power mechanism is
|
measurement interval Tm. The feature of accumulated power mechanism is
|
||||||
indicated by CPUID Fn8000_0007_EDX[12].
|
indicated by CPUID Fn8000_0007_EDX[12].
|
||||||
|
|
||||||
* Tsample: compute unit power accumulator sample period
|
* Tsample:
|
||||||
* Tref: the PTSC counter period
|
compute unit power accumulator sample period
|
||||||
* PTSC: performance timestamp counter
|
|
||||||
* N: the ratio of compute unit power accumulator sample period to the
|
* Tref:
|
||||||
|
the PTSC counter period
|
||||||
|
|
||||||
|
* PTSC:
|
||||||
|
performance timestamp counter
|
||||||
|
|
||||||
|
* N:
|
||||||
|
the ratio of compute unit power accumulator sample period to the
|
||||||
PTSC period
|
PTSC period
|
||||||
* Jmax: max compute unit accumulated power which is indicated by
|
|
||||||
|
* Jmax:
|
||||||
|
max compute unit accumulated power which is indicated by
|
||||||
MaxCpuSwPwrAcc MSR C001007b
|
MaxCpuSwPwrAcc MSR C001007b
|
||||||
* Jx/Jy: compute unit accumulated power which is indicated by
|
|
||||||
|
* Jx/Jy:
|
||||||
|
compute unit accumulated power which is indicated by
|
||||||
CpuSwPwrAcc MSR C001007a
|
CpuSwPwrAcc MSR C001007a
|
||||||
* Tx/Ty: the value of performance timestamp counter which is indicated
|
* Tx/Ty:
|
||||||
|
the value of performance timestamp counter which is indicated
|
||||||
by CU_PTSC MSR C0010280
|
by CU_PTSC MSR C0010280
|
||||||
* PwrCPUave: CPU average power
|
|
||||||
|
* PwrCPUave:
|
||||||
|
CPU average power
|
||||||
|
|
||||||
i. Determine the ratio of Tsample to Tref by executing CPUID Fn8000_0007.
|
i. Determine the ratio of Tsample to Tref by executing CPUID Fn8000_0007.
|
||||||
|
|
||||||
N = value of CPUID Fn8000_0007_ECX[CpuPwrSampleTimeRatio[15:0]].
|
N = value of CPUID Fn8000_0007_ECX[CpuPwrSampleTimeRatio[15:0]].
|
||||||
|
|
||||||
ii. Read the full range of the cumulative energy value from the new
|
ii. Read the full range of the cumulative energy value from the new
|
||||||
MSR MaxCpuSwPwrAcc.
|
MSR MaxCpuSwPwrAcc.
|
||||||
|
|
||||||
Jmax = value returned.
|
Jmax = value returned.
|
||||||
|
|
||||||
iii. At time x, SW reads CpuSwPwrAcc MSR and samples the PTSC.
|
iii. At time x, SW reads CpuSwPwrAcc MSR and samples the PTSC.
|
||||||
Jx = value read from CpuSwPwrAcc and Tx = value read from
|
|
||||||
PTSC.
|
Jx = value read from CpuSwPwrAcc and Tx = value read from PTSC.
|
||||||
|
|
||||||
iv. At time y, SW reads CpuSwPwrAcc MSR and samples the PTSC.
|
iv. At time y, SW reads CpuSwPwrAcc MSR and samples the PTSC.
|
||||||
Jy = value read from CpuSwPwrAcc and Ty = value read from
|
|
||||||
PTSC.
|
Jy = value read from CpuSwPwrAcc and Ty = value read from PTSC.
|
||||||
|
|
||||||
v. Calculate the average power consumption for a compute unit over
|
v. Calculate the average power consumption for a compute unit over
|
||||||
time period (y-x). Unit of result is uWatt.
|
time period (y-x). Unit of result is uWatt::
|
||||||
|
|
||||||
if (Jy < Jx) // Rollover has occurred
|
if (Jy < Jx) // Rollover has occurred
|
||||||
Jdelta = (Jy + Jmax) - Jx
|
Jdelta = (Jy + Jmax) - Jx
|
||||||
else
|
else
|
||||||
|
@ -90,13 +118,14 @@ time period (y-x). Unit of result is uWatt.
|
||||||
|
|
||||||
This driver provides PwrCPUave and interval(default is 10 millisecond
|
This driver provides PwrCPUave and interval(default is 10 millisecond
|
||||||
and maximum is 1 second):
|
and maximum is 1 second):
|
||||||
|
|
||||||
* power1_average (PwrCPUave)
|
* power1_average (PwrCPUave)
|
||||||
* power1_average_interval (Interval)
|
* power1_average_interval (Interval)
|
||||||
|
|
||||||
The power1_average_interval can be updated at /etc/sensors3.conf file
|
The power1_average_interval can be updated at /etc/sensors3.conf file
|
||||||
as below:
|
as below:
|
||||||
|
|
||||||
chip "fam15h_power-*"
|
chip `fam15h_power-*`
|
||||||
set power1_average_interval 0.01
|
set power1_average_interval 0.01
|
||||||
|
|
||||||
Then save it with "sensors -s".
|
Then save it with "sensors -s".
|
||||||
|
|
Loading…
Reference in New Issue