]esphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget&/translations/zh_CN/hwmon/fam15h_powermodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/zh_TW/hwmon/fam15h_powermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/it_IT/hwmon/fam15h_powermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ja_JP/hwmon/fam15h_powermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ko_KR/hwmon/fam15h_powermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/sp_SP/hwmon/fam15h_powermodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hKernel driver fam15h_powerh]hKernel driver fam15h_power}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh@/var/lib/git/docbuild/linux/Documentation/hwmon/fam15h_power.rsthKubh paragraph)}(hSupported chips:h]hSupported chips:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh bullet_list)}(hhh](h list_item)}(hAMD Family 15h Processors h]h)}(hAMD Family 15h Processorsh]hAMD Family 15h Processors}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hX6AMD Family 16h Processors Prefix: 'fam15h_power' Addresses scanned: PCI space 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 - AMD64 Architecture Programmer's Manual Volume 2: System Programming h](h)}(hAMD Family 16h Processorsh]hAMD Family 16h Processors}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubh)}(hPrefix: 'fam15h_power'h]hPrefix: ‘fam15h_power’}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubh)}(hAddresses scanned: PCI spaceh]hAddresses scanned: PCI space}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubh)}(h Datasheets:h]h Datasheets:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubh)}(hhh](h)}(hFBIOS and Kernel Developer's Guide (BKDG) For AMD Family 15h Processorsh]h)}(hj'h]hHBIOS and Kernel Developer’s Guide (BKDG) For AMD Family 15h Processors}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj%ubah}(h]h ]h"]h$]h&]uh1hhj"ubh)}(hFBIOS and Kernel Developer's Guide (BKDG) For AMD Family 16h Processorsh]h)}(hj>h]hHBIOS and Kernel Developer’s Guide (BKDG) For AMD Family 16h Processors}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj<ubah}(h]h ]h"]h$]h&]uh1hhj"ubh)}(hDAMD64 Architecture Programmer's Manual Volume 2: System Programming h]h)}(hCAMD64 Architecture Programmer's Manual Volume 2: System Programmingh]hEAMD64 Architecture Programmer’s Manual Volume 2: System Programming}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjSubah}(h]h ]h"]h$]h&]uh1hhj"ubeh}(h]h ]h"]h$]h&]bullet-uh1hhhhKhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhNhNubeh}(h]h ]h"]h$]h&]jq*uh1hhhhKhhhhubh)}(h;Author: Andreas Herrmann h](hAuthor: Andreas Herrmann <}(hjhhhNhNubh reference)}(h herrmann.der.user@googlemail.comh]h herrmann.der.user@googlemail.com}(hjhhhNhNubah}(h]h ]h"]h$]h&]refuri'mailto:herrmann.der.user@googlemail.comuh1jhjubh>}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhenumerated_list)}(hhh]h)}(h%Processor TDP (Thermal design power) h]h)}(h$Processor TDP (Thermal design power)h]h$Processor TDP (Thermal design power)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubah}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix)uh1jhjhhhhhKubh)}(hGiven a fixed frequency and voltage, the power consumption of a processor varies based on the workload being executed. Derated power is the power consumed when running a specific application. Thermal design power (TDP) is an example of derated power.h]hGiven a fixed frequency and voltage, the power consumption of a processor varies based on the workload being executed. Derated power is the power consumed when running a specific application. Thermal design power (TDP) is an example of derated power.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h|This driver permits reading of registers providing power information of AMD Family 15h and 16h processors via TDP algorithm.h]h|This driver permits reading of registers providing power information of AMD Family 15h and 16h processors via TDP algorithm.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjhhubh)}(hFor AMD Family 15h and 16h processors the following power values can be calculated using different processor northbridge function registers:h]hFor AMD Family 15h and 16h processors the following power values can be calculated using different processor northbridge function registers:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjhhubh)}(hhh](h)}(hBasePwrWatts: Specifies in watts the maximum amount of power consumed by the processor for NB and logic external to the core. h]hdefinition_list)}(hhh]hdefinition_list_item)}(h~BasePwrWatts: Specifies in watts the maximum amount of power consumed by the processor for NB and logic external to the core. h](hterm)}(h BasePwrWatts:h]h BasePwrWatts:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK)hjubh definition)}(hhh]h)}(hoSpecifies in watts the maximum amount of power consumed by the processor for NB and logic external to the core.h]hoSpecifies in watts the maximum amount of power consumed by the processor for NB and logic external to the core.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hj+ubah}(h]h ]h"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]uh1jhhhK)hjubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhjhhhNhNubh)}(h`ProcessorPwrWatts: Specifies in watts the maximum amount of power the processor can support.h]j)}(hhh]j)}(h\ProcessorPwrWatts: Specifies in watts the maximum amount of power the processor can support.h](j)}(hProcessorPwrWatts:h]hProcessorPwrWatts:}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK,hj[ubj*)}(hhh]h)}(hISpecifies in watts the maximum amount of power the processor can support.h]hISpecifies in watts the maximum amount of power the processor can support.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjmubah}(h]h ]h"]h$]h&]uh1j)hj[ubeh}(h]h ]h"]h$]h&]uh1jhhhK,hjXubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1hhjhhhNhNubh)}(hbCurrPwrWatts: Specifies in watts the current amount of power being consumed by the processor. h]j)}(hhh]j)}(h^CurrPwrWatts: Specifies in watts the current amount of power being consumed by the processor. h](j)}(h CurrPwrWatts:h]h CurrPwrWatts:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK0hjubj*)}(hhh]h)}(hOSpecifies in watts the current amount of power being consumed by the processor.h]hOSpecifies in watts the current amount of power being consumed by the processor.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]uh1jhhhK0hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhjhhhNhNubeh}(h]h ]h"]h$]h&]jqjuh1hhhhK'hjhhubh)}(h8This driver provides ProcessorPwrWatts and CurrPwrWatts:h]h8This driver provides ProcessorPwrWatts and CurrPwrWatts:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK2hjhhubh)}(hhh](h)}(hpower1_crit (ProcessorPwrWatts)h]h)}(hjh]hpower1_crit (ProcessorPwrWatts)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(hpower1_input (CurrPwrWatts) h]h)}(hpower1_input (CurrPwrWatts)h]hpower1_input (CurrPwrWatts)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubeh}(h]h ]h"]h$]h&]jqjuh1hhhhK4hjhhubh)}(hOn multi-node processors the calculated value is for the entire package and not for a single node. Thus the driver creates sysfs attributes only for internal node0 of a multi-node processor.h]hOn multi-node processors the calculated value is for the entire package and not for a single node. Thus the driver creates sysfs attributes only for internal node0 of a multi-node processor.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjhhubj)}(hhh]h)}(hAccumulated Power Mechanism h]h)}(hAccumulated Power Mechanismh]hAccumulated Power Mechanism}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hj5ubah}(h]h ]h"]h$]h&]uh1hhj2hhhhhNubah}(h]h ]h"]h$]h&]jjjhjjstartKuh1jhjhhhhhK;ubh)}(hThis driver also introduces an algorithm that should be used to calculate the average power consumed by a processor during a measurement interval Tm. The feature of accumulated power mechanism is indicated by CPUID Fn8000_0007_EDX[12].h]hThis driver also introduces an algorithm that should be used to calculate the average power consumed by a processor during a measurement interval Tm. The feature of accumulated power mechanism is indicated by CPUID Fn8000_0007_EDX[12].}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hjhhubh)}(hhh](h)}(hhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK[hj:ubj*)}(hhh]h)}(hCPU average powerh]hCPU average power}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hjLubah}(h]h ]h"]h$]h&]uh1j)hj:ubeh}(h]h ]h"]h$]h&]uh1jhhhK[hj7ubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1hhjbhhhNhNubeh}(h]h ]h"]h$]h&]jqjuh1hhhhKBhjhhubj)}(hhh](h)}(hDetermine the ratio of Tsample to Tref by executing CPUID Fn8000_0007. N = value of CPUID Fn8000_0007_ECX[CpuPwrSampleTimeRatio[15:0]]. h](h)}(hFDetermine the ratio of Tsample to Tref by executing CPUID Fn8000_0007.h]hFDetermine the ratio of Tsample to Tref by executing CPUID Fn8000_0007.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hj~ubh block_quote)}(hAN = value of CPUID Fn8000_0007_ECX[CpuPwrSampleTimeRatio[15:0]]. h]h)}(h@N = value of CPUID Fn8000_0007_ECX[CpuPwrSampleTimeRatio[15:0]].h]h@N = value of CPUID Fn8000_0007_ECX[CpuPwrSampleTimeRatio[15:0]].}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK_hjubah}(h]h ]h"]h$]h&]uh1jhhhK_hj~ubeh}(h]h ]h"]h$]h&]uh1hhj{hhhhhNubh)}(hpRead the full range of the cumulative energy value from the new MSR MaxCpuSwPwrAcc. Jmax = value returned. h](h)}(hSRead the full range of the cumulative energy value from the new MSR MaxCpuSwPwrAcc.h]hSRead the full range of the cumulative energy value from the new MSR MaxCpuSwPwrAcc.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKahjubj)}(hJmax = value returned. h]h)}(hJmax = value returned.h]hJmax = value returned.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhjubah}(h]h ]h"]h$]h&]uh1jhhhKdhjubeh}(h]h ]h"]h$]h&]uh1hhj{hhhhhNubh)}(h~At time x, SW reads CpuSwPwrAcc MSR and samples the PTSC. Jx = value read from CpuSwPwrAcc and Tx = value read from PTSC. h](h)}(h9At time x, SW reads CpuSwPwrAcc MSR and samples the PTSC.h]h9At time x, SW reads CpuSwPwrAcc MSR and samples the PTSC.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjubj)}(h@Jx = value read from CpuSwPwrAcc and Tx = value read from PTSC. h]h)}(h?Jx = value read from CpuSwPwrAcc and Tx = value read from PTSC.h]h?Jx = value read from CpuSwPwrAcc and Tx = value read from PTSC.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjubah}(h]h ]h"]h$]h&]uh1jhhhKhhjubeh}(h]h ]h"]h$]h&]uh1hhj{hhhhhNubh)}(hAt time y, SW reads CpuSwPwrAcc MSR and samples the PTSC. Jy = value read from CpuSwPwrAcc and Ty = value read from PTSC. h](h)}(h9At time y, SW reads CpuSwPwrAcc MSR and samples the PTSC.h]h9At time y, SW reads CpuSwPwrAcc MSR and samples the PTSC.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhjubj)}(h@Jy = value read from CpuSwPwrAcc and Ty = value read from PTSC. h]h)}(h?Jy = value read from CpuSwPwrAcc and Ty = value read from PTSC.h]h?Jy = value read from CpuSwPwrAcc and Ty = value read from PTSC.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhj"ubah}(h]h ]h"]h$]h&]uh1jhhhKlhjubeh}(h]h ]h"]h$]h&]uh1hhj{hhhhhNubh)}(hXCalculate the average power consumption for a compute unit over time period (y-x). Unit of result is uWatt:: if (Jy < Jx) // Rollover has occurred Jdelta = (Jy + Jmax) - Jx else Jdelta = Jy - Jx PwrCPUave = N * Jdelta * 1000 / (Ty - Tx) h](h)}(hlCalculate the average power consumption for a compute unit over time period (y-x). Unit of result is uWatt::h]hkCalculate the average power consumption for a compute unit over time period (y-x). Unit of result is uWatt:}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhj@ubh literal_block)}(hif (Jy < Jx) // Rollover has occurred Jdelta = (Jy + Jmax) - Jx else Jdelta = Jy - Jx PwrCPUave = N * Jdelta * 1000 / (Ty - Tx)h]hif (Jy < Jx) // Rollover has occurred Jdelta = (Jy + Jmax) - Jx else Jdelta = Jy - Jx PwrCPUave = N * Jdelta * 1000 / (Ty - Tx)}hjTsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jRhhhKqhj@ubeh}(h]h ]h"]h$]h&]uh1hhj{hhhhhNubeh}(h]h ]h"]h$]h&]j lowerromanjhj.uh1jhjhhhhhK]ubh)}(h_This driver provides PwrCPUave and interval(default is 10 millisecond and maximum is 1 second):h]h_This driver provides PwrCPUave and interval(default is 10 millisecond and maximum is 1 second):}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjhhubh)}(hhh](h)}(hpower1_average (PwrCPUave)h]h)}(hjh]hpower1_average (PwrCPUave)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKzhjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h#power1_average_interval (Interval) h]h)}(h"power1_average_interval (Interval)h]h"power1_average_interval (Interval)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubeh}(h]h ]h"]h$]h&]jqjuh1hhhhKzhjhhubh)}(hOThe power1_average_interval can be updated at /etc/sensors3.conf file as below:h]hOThe power1_average_interval can be updated at /etc/sensors3.conf file as below:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK}hjhhubj)}(hhh]j)}(h7chip `fam15h_power-*` set power1_average_interval 0.01 h](j)}(hchip `fam15h_power-*`h](hchip }(hjhhhNhNubhtitle_reference)}(h`fam15h_power-*`h]hfam15h_power-*}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj*)}(hhh]h)}(h set power1_average_interval 0.01h]h set power1_average_interval 0.01}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(hThen save it with "sensors -s".h]h#Then save it with “sensors -s”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhKubeh}(h]kernel-driver-fam15h-powerah ]h"]kernel driver fam15h_powerah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjOerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j)j&j!ju nametypes}(j)j!uh}(j&hjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]hsystem_message)}(hhh]h)}(h:Enumerated list start value not ordinal-1: "2" (ordinal 2)h]h>Enumerated list start value not ordinal-1: “2” (ordinal 2)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1jhjhhhhhK;ubatransform_messages] transformerN include_log] decorationNhhub.