€•:sŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ%/translations/zh_CN/arch/x86/amd_hsmp”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/zh_TW/arch/x86/amd_hsmp”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/it_IT/arch/x86/amd_hsmp”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/ja_JP/arch/x86/amd_hsmp”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/ko_KR/arch/x86/amd_hsmp”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/pt_BR/arch/x86/amd_hsmp”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/sp_SP/arch/x86/amd_hsmp”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³Œ?/var/lib/git/docbuild/linux/Documentation/arch/x86/amd_hsmp.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒAMD HSMP interface”h]”hŒAMD HSMP interface”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒÏNewer Fam19h(model 0x00-0x1f, 0x30-0x3f, 0x90-0x9f, 0xa0-0xaf), Fam1Ah(model 0x00-0x1f) EPYC server line of processors from AMD support system management functionality via HSMP (Host System Management Port).”h]”hŒÏNewer Fam19h(model 0x00-0x1f, 0x30-0x3f, 0x90-0x9f, 0xa0-0xaf), Fam1Ah(model 0x00-0x1f) EPYC server line of processors from AMD support system management functionality via HSMP (Host System Management Port).”…””}”(hhßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)”}”(hŒžThe Host System Management Port (HSMP) is an interface to provide OS-level software with access to system management functions via a set of mailbox registers.”h]”hŒžThe Host System Management Port (HSMP) is an interface to provide OS-level software with access to system management functions via a set of mailbox registers.”…””}”(hhíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hhÊh²hubhÞ)”}”(hŒ©More details on the interface can be found in chapter "7 Host System Management Port (HSMP)" of the family/model PPR Eg: https://docs.amd.com/v/u/en-US/55898_B1_pub_0_50”h]”(hŒ}More details on the interface can be found in chapter “7 Host System Management Port (HSMP)†of the family/model PPR Eg: ”…””}”(hhûh²hh³Nh´NubhŒ reference”“”)”}”(hŒ0https://docs.amd.com/v/u/en-US/55898_B1_pub_0_50”h]”hŒ0https://docs.amd.com/v/u/en-US/55898_B1_pub_0_50”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”juh1jhhûubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)”}”(hŒIHSMP interface is supported on EPYC line of server CPUs and MI300A (APU).”h]”hŒIHSMP interface is supported on EPYC line of server CPUs and MI300A (APU).”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒ HSMP device”h]”hŒ HSMP device”…””}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj(h²hh³hÇh´KubhÞ)”}”(hŒ»amd_hsmp driver under drivers/platforms/x86/amd/hsmp/ has separate driver files for ACPI object based probing, platform device based probing and for the common code for these two drivers.”h]”hŒ»amd_hsmp driver under drivers/platforms/x86/amd/hsmp/ has separate driver files for ACPI object based probing, platform device based probing and for the common code for these two drivers.”…””}”(hj9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj(h²hubhÞ)”}”(hX(Kconfig option CONFIG_AMD_HSMP_PLAT compiles plat.c and creates amd_hsmp.ko. Kconfig option CONFIG_AMD_HSMP_ACPI compiles acpi.c and creates hsmp_acpi.ko. Selecting any of these two configs automatically selects CONFIG_AMD_HSMP. This compiles common code hsmp.c and creates hsmp_common.ko module.”h]”hX(Kconfig option CONFIG_AMD_HSMP_PLAT compiles plat.c and creates amd_hsmp.ko. Kconfig option CONFIG_AMD_HSMP_ACPI compiles acpi.c and creates hsmp_acpi.ko. Selecting any of these two configs automatically selects CONFIG_AMD_HSMP. This compiles common code hsmp.c and creates hsmp_common.ko module.”…””}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj(h²hubhÞ)”}”(hŒtBoth the ACPI and plat drivers create the miscdevice /dev/hsmp to let user space programs run hsmp mailbox commands.”h]”hŒtBoth the ACPI and plat drivers create the miscdevice /dev/hsmp to let user space programs run hsmp mailbox commands.”…””}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K#hj(h²hubhÞ)”}”(hŒ@The ACPI object format supported by the driver is defined below.”h]”hŒ@The ACPI object format supported by the driver is defined below.”…””}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K&hj(h²hubhÞ)”}”(hŒH$ ls -al /dev/hsmp crw-r--r-- 1 root root 10, 123 Jan 21 21:41 /dev/hsmp”h]”hŒH$ ls -al /dev/hsmp crw-r--r-- 1 root root 10, 123 Jan 21 21:41 /dev/hsmp”…””}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K(hj(h²hubhŒdefinition_list”“”)”}”(hhh]”(hŒdefinition_list_item”“”)”}”(hŒ•Characteristics of the dev node: * Write mode is used for running set/configure commands * Read mode is used for running get/status monitor commands ”h]”(hŒterm”“”)”}”(hŒ Characteristics of the dev node:”h]”hŒ Characteristics of the dev node:”…””}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŠh³hÇh´K-hj†ubhŒ definition”“”)”}”(hhh]”hŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ5Write mode is used for running set/configure commands”h]”hÞ)”}”(hj¨h]”hŒ5Write mode is used for running set/configure commands”…””}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K,hj¦ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hj¡ubj¥)”}”(hŒ:Read mode is used for running get/status monitor commands ”h]”hÞ)”}”(hŒ9Read mode is used for running get/status monitor commands”h]”hŒ9Read mode is used for running get/status monitor commands”…””}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K-hj½ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hj¡ubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1jŸh³hÇh´K,hjœubah}”(h]”h ]”h"]”h$]”h&]”uh1jšhj†ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j„h³hÇh´K-hjubj…)”}”(hŒ‰Access restrictions: * Only root user is allowed to open the file in write mode. * The file can be opened in read mode by all the users. ”h]”(j‹)”}”(hŒAccess restrictions:”h]”hŒAccess restrictions:”…””}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŠh³hÇh´K1hjéubj›)”}”(hhh]”j )”}”(hhh]”(j¥)”}”(hŒ9Only root user is allowed to open the file in write mode.”h]”hÞ)”}”(hjh]”hŒ9Only root user is allowed to open the file in write mode.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K0hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjþubj¥)”}”(hŒ6The file can be opened in read mode by all the users. ”h]”hÞ)”}”(hŒ5The file can be opened in read mode by all the users.”h]”hŒ5The file can be opened in read mode by all the users.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K1hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjþubeh}”(h]”h ]”h"]”h$]”h&]”jÛjÜuh1jŸh³hÇh´K0hjûubah}”(h]”h ]”h"]”h$]”h&]”uh1jšhjéubeh}”(h]”h ]”h"]”h$]”h&]”uh1j„h³hÇh´K1hjh²hubj…)”}”(hŒ®In-kernel integration: * Other subsystems in the kernel can use the exported transport function hsmp_send_message(). * Locking across callers is taken care by the driver. ”h]”(j‹)”}”(hŒIn-kernel integration:”h]”hŒIn-kernel integration:”…””}”(hjFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŠh³hÇh´K7hjBubj›)”}”(hhh]”j )”}”(hhh]”(j¥)”}”(hŒ[Other subsystems in the kernel can use the exported transport function hsmp_send_message().”h]”hÞ)”}”(hŒ[Other subsystems in the kernel can use the exported transport function hsmp_send_message().”h]”hŒ[Other subsystems in the kernel can use the exported transport function hsmp_send_message().”…””}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K4hjZubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjWubj¥)”}”(hŒ5Locking across callers is taken care by the driver. ”h]”hÞ)”}”(hŒ3Locking across callers is taken care by the driver.”h]”hŒ3Locking across callers is taken care by the driver.”…””}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K6hjrubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjWubeh}”(h]”h ]”h"]”h$]”h&]”jÛjÜuh1jŸh³hÇh´K4hjTubah}”(h]”h ]”h"]”h$]”h&]”uh1jšhjBubeh}”(h]”h ]”h"]”h$]”h&]”uh1j„h³hÇh´K7hjh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj(h²hh³Nh´Nubeh}”(h]”Œ hsmp-device”ah ]”h"]”Œ hsmp device”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒHSMP sysfs interface”h]”hŒHSMP sysfs interface”…””}”(hj­h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjªh²hh³hÇh´K:ubhŒenumerated_list”“”)”}”(hhh]”j¥)”}”(hŒMetrics table binary sysfs ”h]”hÞ)”}”(hŒMetrics table binary sysfs”h]”hŒMetrics table binary sysfs”…””}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khjªh²hubhÞ)”}”(hŒ¤The metrics table is made available as hexadecimal sysfs binary file under per socket sysfs directory created at /sys/devices/platform/amd_hsmp/socket%d/metrics_bin”h]”hŒ¤The metrics table is made available as hexadecimal sysfs binary file under per socket sysfs directory created at /sys/devices/platform/amd_hsmp/socket%d/metrics_bin”…””}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KAhjªh²hubhÞ)”}”(hŒ?Note: lseek() is not supported as entire metrics table is read.”h]”hŒ?Note: lseek() is not supported as entire metrics table is read.”…””}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KEhjªh²hubhÞ)”}”(hŒqMetrics table definitions will be documented as part of Public PPR. The same is defined in the amd_hsmp.h header.”h]”hŒqMetrics table definitions will be documented as part of Public PPR. The same is defined in the amd_hsmp.h header.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KGhjªh²hubj¼)”}”(hhh]”j¥)”}”(hŒHSMP telemetry sysfs files ”h]”hÞ)”}”(hŒHSMP telemetry sysfs files”h]”hŒHSMP telemetry sysfs files”…””}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KJhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjh²hh³hÇh´Nubah}”(h]”h ]”h"]”h$]”h&]”jÞjßjàhjájâŒstart”Kuh1j»hjªh²hh³hÇh´KJubhÞ)”}”(hŒJFollowing sysfs files are available at /sys/devices/platform/AMDI0097:0X/.”h]”hŒJFollowing sysfs files are available at /sys/devices/platform/AMDI0097:0X/.”…””}”(hj=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KLhjªh²hubj )”}”(hhh]”(j¥)”}”(hŒ4c0_residency_input: Percentage of cores in C0 state.”h]”hÞ)”}”(hjPh]”hŒ4c0_residency_input: Percentage of cores in C0 state.”…””}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KNhjNubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjKh²hh³hÇh´Nubj¥)”}”(hŒVprochot_status: Reports 1 if the processor is at thermal threshold value, 0 otherwise.”h]”hÞ)”}”(hŒVprochot_status: Reports 1 if the processor is at thermal threshold value, 0 otherwise.”h]”hŒVprochot_status: Reports 1 if the processor is at thermal threshold value, 0 otherwise.”…””}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KOhjeubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjKh²hh³hÇh´Nubj¥)”}”(hŒ%smu_fw_version: SMU firmware version.”h]”hÞ)”}”(hjh]”hŒ%smu_fw_version: SMU firmware version.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KQhj}ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjKh²hh³hÇh´Nubj¥)”}”(hŒ)protocol_version: HSMP interface version.”h]”hÞ)”}”(hj–h]”hŒ)protocol_version: HSMP interface version.”…””}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KRhj”ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjKh²hh³hÇh´Nubj¥)”}”(hŒ6ddr_max_bw: Theoretical maximum DDR bandwidth in GB/s.”h]”hÞ)”}”(hj­h]”hŒ6ddr_max_bw: Theoretical maximum DDR bandwidth in GB/s.”…””}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KShj«ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjKh²hh³hÇh´Nubj¥)”}”(hŒ>ddr_utilised_bw_input: Current utilized DDR bandwidth in GB/s.”h]”hÞ)”}”(hjÄh]”hŒ>ddr_utilised_bw_input: Current utilized DDR bandwidth in GB/s.”…””}”(hjÆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KThjÂubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjKh²hh³hÇh´Nubj¥)”}”(hŒLddr_utilised_bw_perc_input(%): Percentage of current utilized DDR bandwidth.”h]”hÞ)”}”(hjÛh]”hŒLddr_utilised_bw_perc_input(%): Percentage of current utilized DDR bandwidth.”…””}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KUhjÙubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjKh²hh³hÇh´Nubj¥)”}”(hŒ mclk_input: Memory clock in MHz.”h]”hÞ)”}”(hjòh]”hŒ mclk_input: Memory clock in MHz.”…””}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KVhjðubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjKh²hh³hÇh´Nubj¥)”}”(hŒ fclk_input: Fabric clock in MHz.”h]”hÞ)”}”(hj h]”hŒ fclk_input: Fabric clock in MHz.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KWhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjKh²hh³hÇh´Nubj¥)”}”(hŒ-clk_fmax: Maximum frequency of socket in MHz.”h]”hÞ)”}”(hj h]”hŒ-clk_fmax: Maximum frequency of socket in MHz.”…””}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KXhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjKh²hh³hÇh´Nubj¥)”}”(hŒ-clk_fmin: Minimum frequency of socket in MHz.”h]”hÞ)”}”(hj7h]”hŒ-clk_fmin: Minimum frequency of socket in MHz.”…””}”(hj9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KYhj5ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjKh²hh³hÇh´Nubj¥)”}”(hŒDcclk_freq_limit_input: Core clock frequency limit per socket in MHz.”h]”hÞ)”}”(hjNh]”hŒDcclk_freq_limit_input: Core clock frequency limit per socket in MHz.”…””}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KZhjLubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjKh²hh³hÇh´Nubj¥)”}”(hŒOpwr_current_active_freq_limit: Current active frequency limit of socket in MHz.”h]”hÞ)”}”(hŒOpwr_current_active_freq_limit: Current active frequency limit of socket in MHz.”h]”hŒOpwr_current_active_freq_limit: Current active frequency limit of socket in MHz.”…””}”(hjgh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K[hjcubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjKh²hh³hÇh´Nubj¥)”}”(hŒPpwr_current_active_freq_limit_source: Source of current active frequency limit. ”h]”hÞ)”}”(hŒOpwr_current_active_freq_limit_source: Source of current active frequency limit.”h]”hŒOpwr_current_active_freq_limit_source: Source of current active frequency limit.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K]hj{ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¤hjKh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÛjÜuh1jŸh³hÇh´KNhjªh²hubeh}”(h]”Œhsmp-sysfs-interface”ah ]”h"]”Œhsmp sysfs interface”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K:ubhÉ)”}”(hhh]”(hÎ)”}”(hŒACPI device object format”h]”hŒACPI device object format”…””}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj¡h²hh³hÇh´KaubhÞ)”}”(hŒ^The ACPI object format expected from the amd_hsmp driver for socket with ID00 is given below::”h]”hŒ]The ACPI object format expected from the amd_hsmp driver for socket with ID00 is given below:”…””}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kbhj¡h²hubhŒ literal_block”“”)”}”(hX[Device(HSMP) { Name(_HID, "AMDI0097") Name(_UID, "ID00") Name(HSE0, 0x00000001) Name(RBF0, ResourceTemplate() { Memory32Fixed(ReadWrite, 0xxxxxxx, 0x00100000) }) Method(_CRS, 0, NotSerialized) { Return(RBF0) } Method(_STA, 0, NotSerialized) { If(LEqual(HSE0, One)) { Return(0x0F) } Else { Return(Zero) } } Name(_DSD, Package(2) { Buffer(0x10) { 0x9D, 0x61, 0x4D, 0xB7, 0x07, 0x57, 0xBD, 0x48, 0xA6, 0x9F, 0x4E, 0xA2, 0x87, 0x1F, 0xC2, 0xF6 }, Package(3) { Package(2) {"MsgIdOffset", 0x00010934}, Package(2) {"MsgRspOffset", 0x00010980}, Package(2) {"MsgArgOffset", 0x000109E0} } }) }”h]”hX[Device(HSMP) { Name(_HID, "AMDI0097") Name(_UID, "ID00") Name(HSE0, 0x00000001) Name(RBF0, ResourceTemplate() { Memory32Fixed(ReadWrite, 0xxxxxxx, 0x00100000) }) Method(_CRS, 0, NotSerialized) { Return(RBF0) } Method(_STA, 0, NotSerialized) { If(LEqual(HSE0, One)) { Return(0x0F) } Else { Return(Zero) } } Name(_DSD, Package(2) { Buffer(0x10) { 0x9D, 0x61, 0x4D, 0xB7, 0x07, 0x57, 0xBD, 0x48, 0xA6, 0x9F, 0x4E, 0xA2, 0x87, 0x1F, 0xC2, 0xF6 }, Package(3) { Package(2) {"MsgIdOffset", 0x00010934}, Package(2) {"MsgRspOffset", 0x00010980}, Package(2) {"MsgArgOffset", 0x000109E0} } }) }”…””}”hjÂsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jÀh³hÇh´Kehj¡h²hubeh}”(h]”Œacpi-device-object-format”ah ]”h"]”Œacpi device object format”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KaubhÉ)”}”(hhh]”(hÎ)”}”(hŒHSMP HWMON interface”h]”hŒHSMP HWMON interface”…””}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjØh²hh³hÇh´KŽubhÞ)”}”(hXHSMP power sensors are registered with the hwmon interface. A separate hwmon directory is created for each socket and the following files are generated within the hwmon directory. - power1_input (read only) - power1_cap_max (read only) - power1_cap (read, write)”h]”hXHSMP power sensors are registered with the hwmon interface. A separate hwmon directory is created for each socket and the following files are generated within the hwmon directory. - power1_input (read only) - power1_cap_max (read only) - power1_cap (read, write)”…””}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhjØh²hubeh}”(h]”Œhsmp-hwmon-interface”ah ]”h"]”Œhsmp hwmon interface”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KŽubhÉ)”}”(hhh]”(hÎ)”}”(hŒ An example”h]”hŒ An example”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÿh²hh³hÇh´K—ubhÞ)”}”(hŒPTo access hsmp device from a C program. First, you need to include the headers::”h]”hŒOTo access hsmp device from a C program. First, you need to include the headers:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K™hjÿh²hubjÁ)”}”(hŒ#include ”h]”hŒ#include ”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jÀh³hÇh´Kœhjÿh²hubhÞ)”}”(hŒ1Which defines the supported messages/message IDs.”h]”hŒ1Which defines the supported messages/message IDs.”…””}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kžhjÿh²hubhÞ)”}”(hŒ.Next thing, open the device file, as follows::”h]”hŒ-Next thing, open the device file, as follows:”…””}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hjÿh²hubjÁ)”}”(hŒŒint file; file = open("/dev/hsmp", O_RDWR); if (file < 0) { /* ERROR HANDLING; you can check errno to see what went wrong */ exit(1); }”h]”hŒŒint file; file = open("/dev/hsmp", O_RDWR); if (file < 0) { /* ERROR HANDLING; you can check errno to see what went wrong */ exit(1); }”…””}”hjHsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jÀh³hÇh´K¢hjÿh²hubhÞ)”}”(hŒThe following IOCTL is defined:”h]”hŒThe following IOCTL is defined:”…””}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kªhjÿh²hubj€)”}”(hhh]”j…)”}”(hX``ioctl(file, HSMP_IOCTL_CMD, struct hsmp_message *msg)`` The argument is a pointer to a:: struct hsmp_message { __u32 msg_id; /* Message ID */ __u16 num_args; /* Number of input argument words in message */ __u16 response_sz; /* Number of expected output/response words */ __u32 args[HSMP_MAX_MSG_LEN]; /* argument/response buffer */ __u16 sock_ind; /* socket number */ }; ”h]”(j‹)”}”(hŒ9``ioctl(file, HSMP_IOCTL_CMD, struct hsmp_message *msg)``”h]”hŒliteral”“”)”}”(hjmh]”hŒ5ioctl(file, HSMP_IOCTL_CMD, struct hsmp_message *msg)”…””}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1johjkubah}”(h]”h ]”h"]”h$]”h&]”uh1jŠh³hÇh´Kµhjgubj›)”}”(hhh]”(hÞ)”}”(hŒ The argument is a pointer to a::”h]”hŒThe argument is a pointer to a:”…””}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K­hj„ubjÁ)”}”(hX—struct hsmp_message { __u32 msg_id; /* Message ID */ __u16 num_args; /* Number of input argument words in message */ __u16 response_sz; /* Number of expected output/response words */ __u32 args[HSMP_MAX_MSG_LEN]; /* argument/response buffer */ __u16 sock_ind; /* socket number */ };”h]”hX—struct hsmp_message { __u32 msg_id; /* Message ID */ __u16 num_args; /* Number of input argument words in message */ __u16 response_sz; /* Number of expected output/response words */ __u32 args[HSMP_MAX_MSG_LEN]; /* argument/response buffer */ __u16 sock_ind; /* socket number */ };”…””}”hj•sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jÀh³hÇh´K¯hj„ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jšhjgubeh}”(h]”h ]”h"]”h$]”h&]”uh1j„h³hÇh´Kµhjdubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÿh²hh³hÇh´NubhÞ)”}”(hŒ|The ioctl would return a non-zero on failure; you can read errno to see what happened. The transaction returns 0 on success.”h]”hŒ|The ioctl would return a non-zero on failure; you can read errno to see what happened. The transaction returns 0 on success.”…””}”(hjµh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K·hjÿh²hubhÞ)”}”(hŒÌMore details on the interface and message definitions can be found in chapter "7 Host System Management Port (HSMP)" of the respective family/model PPR eg: https://docs.amd.com/v/u/en-US/55898_B1_pub_0_50”h]”(hŒ More details on the interface and message definitions can be found in chapter “7 Host System Management Port (HSMP)†of the respective family/model PPR eg: ”…””}”(hjÃh²hh³Nh´Nubj)”}”(hŒ0https://docs.amd.com/v/u/en-US/55898_B1_pub_0_50”h]”hŒ0https://docs.amd.com/v/u/en-US/55898_B1_pub_0_50”…””}”(hjËh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jÍuh1jhjÃubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kºhjÿh²hubhÞ)”}”(hŒÉUser space C-APIs are made available by linking against the esmi library, which is provided by the E-SMS project https://www.amd.com/en/developer/e-sms.html. See: https://github.com/amd/esmi_ib_library”h]”(hŒqUser space C-APIs are made available by linking against the esmi library, which is provided by the E-SMS project ”…””}”(hjàh²hh³Nh´Nubj)”}”(hŒ+https://www.amd.com/en/developer/e-sms.html”h]”hŒ+https://www.amd.com/en/developer/e-sms.html”…””}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jêuh1jhjàubhŒ. See: ”…””}”(hjàh²hh³Nh´Nubj)”}”(hŒ&https://github.com/amd/esmi_ib_library”h]”hŒ&https://github.com/amd/esmi_ib_library”…””}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jýuh1jhjàubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K¾hjÿh²hubeh}”(h]”Œ an-example”ah ]”h"]”Œ an example”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K—ubeh}”(h]”Œamd-hsmp-interface”ah ]”h"]”Œamd hsmp interface”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jCŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jjj§j¤jžj›jÕjÒjüjùjjuŒ nametypes”}”(j‰j§‰jž‰jÕ‰jü‰j‰uh}”(jhÊj¤j(j›jªjÒj¡jùjØjjÿuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”hŒsystem_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)”…””}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝhj§ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÇŒline”Kuh1j¥hjªh²hh³hÇh´KJubaŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.