zsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget(/translations/zh_CN/misc-devices/amd-sbimodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/zh_TW/misc-devices/amd-sbimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/it_IT/misc-devices/amd-sbimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/ja_JP/misc-devices/amd-sbimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/ko_KR/misc-devices/amd-sbimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/sp_SP/misc-devices/amd-sbimodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhB/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi.rsthKubhsection)}(hhh](htitle)}(hAMD SIDE BAND interfaceh]hAMD SIDE BAND interface}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXjSome AMD Zen based processors supports system management functionality via side-band interface (SBI) called Advanced Platform Management Link (APML). APML is an I2C/I3C based 2-wire processor target interface. APML is used to communicate with the Remote Management Interface (SB Remote Management Interface (SB-RMI) and SB Temperature Sensor Interface (SB-TSI)).h]hXjSome AMD Zen based processors supports system management functionality via side-band interface (SBI) called Advanced Platform Management Link (APML). APML is an I2C/I3C based 2-wire processor target interface. APML is used to communicate with the Remote Management Interface (SB Remote Management Interface (SB-RMI) and SB Temperature Sensor Interface (SB-TSI)).}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hMore details on the interface can be found in chapter "5 Advanced Platform Management Link (APML)" of the family/model PPR [1]_.h](hMore details on the interface can be found in chapter “5 Advanced Platform Management Link (APML)” of the family/model PPR }(hhhhhNhNubhfootnote_reference)}(h[1]_h]h1}(hhhhhNhNubah}(h]id1ah ]h"]h$]h&]refidid2docnamemisc-devices/amd-sbiuh1hhhٌresolvedKubh.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhfootnote)}(hrhttps://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/programmer-references/55898_B1_pub_0_50.zip h](hlabel)}(h1h]h1}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh)}(hphttps://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/programmer-references/55898_B1_pub_0_50.ziph]h reference)}(hjh]hphttps://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/programmer-references/55898_B1_pub_0_50.zip}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]hah ]h"]1ah$]h&]hahhuh1jhhhKhhhhhKubh)}(hhh](h)}(h SBRMI deviceh]h SBRMI device}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hhhhhKubh)}(hapml_sbrmi driver under the drivers/misc/amd-sbi creates miscdevice /dev/sbrmi-* to let user space programs run APML mailbox, CPUID, MCAMSR and register xfer commands.h]hapml_sbrmi driver under the drivers/misc/amd-sbi creates miscdevice /dev/sbrmi-* to let user space programs run APML mailbox, CPUID, MCAMSR and register xfer commands.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj8hhubh)}(hRegister sets is common across APML protocols. IOCTL is providing synchronization among protocols as transactions may create race condition.h]hRegister sets is common across APML protocols. IOCTL is providing synchronization among protocols as transactions may create race condition.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj8hhubh literal_block)}(h]$ ls -al /dev/sbrmi-3c crw------- 1 root root 10, 53 Jul 10 11:13 /dev/sbrmi-3ch]h]$ ls -al /dev/sbrmi-3c crw------- 1 root root 10, 53 Jul 10 11:13 /dev/sbrmi-3c}hjgsbah}(h]h ]h"]h$]h&]hhforcelanguagebashhighlight_args}uh1jehhhKhj8hhubh)}(hyapml_sbrmi driver registers hwmon sensors for monitoring power_cap_max, current power consumption and managing power_cap.h]hyapml_sbrmi driver registers hwmon sensors for monitoring power_cap_max, current power consumption and managing power_cap.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hj8hhubhdefinition_list)}(hhh](hdefinition_list_item)}(hCharacteristics of the dev node: * Differnet xfer protocols are defined: * Mailbox * CPUID * MCA_MSR * Register xfer h](hterm)}(h Characteristics of the dev node:h]h Characteristics of the dev node:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK,hjubh definition)}(hhh]h bullet_list)}(hhh]h list_item)}(hfDiffernet xfer protocols are defined: * Mailbox * CPUID * MCA_MSR * Register xfer h]j)}(hhh]j)}(hRDiffernet xfer protocols are defined: * Mailbox * CPUID * MCA_MSR * Register xfer h](j)}(h%Differnet xfer protocols are defined:h]h%Differnet xfer protocols are defined:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK,hjubj)}(hhh]j)}(hhh](j)}(hMailboxh]h)}(hjh]hMailbox}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hCPUIDh]h)}(hjh]hCPUID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hMCA_MSRh]h)}(hjh]hMCA_MSR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hRegister xfer h]h)}(h Register xferh]h Register xfer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]bullet*uh1jhhhK)hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK,hjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]j1j2uh1jhhhK(hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK,hjubj)}(hAccess restrictions: * Only root user is allowed to open the file. * APML Mailbox messages and Register xfer access are read-write, * CPUID and MCA_MSR access is read-only. h](j)}(hAccess restrictions:h]hAccess restrictions:}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK1hj]ubj)}(hhh]j)}(hhh](j)}(h+Only root user is allowed to open the file.h]h)}(hjwh]h+Only root user is allowed to open the file.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjuubah}(h]h ]h"]h$]h&]uh1jhjrubj)}(h>APML Mailbox messages and Register xfer access are read-write,h]h)}(hjh]h>APML Mailbox messages and Register xfer access are read-write,}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjubah}(h]h ]h"]h$]h&]uh1jhjrubj)}(h'CPUID and MCA_MSR access is read-only. h]h)}(h&CPUID and MCA_MSR access is read-only.h]h&CPUID and MCA_MSR access is read-only.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1jhjrubeh}(h]h ]h"]h$]h&]j1j2uh1jhhhK/hjoubah}(h]h ]h"]h$]h&]uh1jhj]ubeh}(h]h ]h"]h$]h&]uh1jhhhK1hjhhubeh}(h]h ]h"]h$]h&]uh1jhj8hhhNhNubeh}(h] sbrmi-deviceah ]h"] sbrmi deviceah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Driver IOCTLsh]h Driver IOCTLs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK4ubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleSBRMI_IOCTL_MBOX_CMD (C macro)c.SBRMI_IOCTL_MBOX_CMDhNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hSBRMI_IOCTL_MBOX_CMDh]hdesc_signature_line)}(hSBRMI_IOCTL_MBOX_CMDh]h desc_name)}(hSBRMI_IOCTL_MBOX_CMDh]h desc_sig_name)}(hjh]hSBRMI_IOCTL_MBOX_CMD}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhj hhhhhK6ubah}(h]h ]h"]h$]h&]hh add_permalinkuh1jsphinx_line_type declaratorhjhhhhhK6ubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhhhK6hjhhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1j@hjhhhhhK6ubeh}(h]h ](cmacroeh"]h$]h&]domainjNobjtypejOdesctypejOnoindex noindexentrynocontentsentryuh1jhhhjhNhNubh)}(h**Parameters**h]hstrong)}(hj[h]h Parameters}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1j]hjYubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:55: ./include/uapi/misc/amd-apml.hhKRhjhhubj)}(hhh]j)}(h**struct** apml_mbox_msg Pointer to the :c:type:`struct apml_mbox_msg ` that will contain the protocol information h](j)}(h**struct** apml_mbox_msgh](j^)}(h **struct**h]hstruct}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1j]hjzubh apml_mbox_msg}(hjzhhhNhNubeh}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:55: ./include/uapi/misc/amd-apml.hhKVhjvubj)}(hhh]h)}(hhPointer to the :c:type:`struct apml_mbox_msg ` that will contain the protocol informationh](hPointer to the }(hjhhhNhNubh)}(h.:c:type:`struct apml_mbox_msg `h]hliteral)}(hjh]hstruct apml_mbox_msg}(hjhhhNhNubah}(h]h ](xrefjNc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoch refdomainjNreftypetype refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]sb reftarget apml_mbox_msguh1hha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:55: ./include/uapi/misc/amd-apml.hhKUhjubh+ that will contain the protocol information}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKUhjubah}(h]h ]h"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]uh1jhjhKVhjsubah}(h]h ]h"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:55: ./include/uapi/misc/amd-apml.hhNubh)}(hX**Description** IOCTL command for APML messages using generic _IOWR The IOCTL provides userspace access to AMD sideband mailbox protocol - Mailbox message read/write(0x0~0xFF) - returning "-EFAULT" if none of the above "-EPROTOTYPE" error is returned to provide additional error detailsh](j^)}(h**Description**h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j]hjubhX IOCTL command for APML messages using generic _IOWR The IOCTL provides userspace access to AMD sideband mailbox protocol - Mailbox message read/write(0x0~0xFF) - returning “-EFAULT” if none of the above “-EPROTOTYPE” error is returned to provide additional error details}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:55: ./include/uapi/misc/amd-apml.hhKXhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jSBRMI_IOCTL_CPUID_CMD (C macro)c.SBRMI_IOCTL_CPUID_CMDhNtauh1jhjhhhNhNubj)}(hhh](j)}(hSBRMI_IOCTL_CPUID_CMDh]j )}(hSBRMI_IOCTL_CPUID_CMDh]j)}(hSBRMI_IOCTL_CPUID_CMDh]j)}(hjh]hSBRMI_IOCTL_CPUID_CMD}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj!ubah}(h]h ](j'j(eh"]h$]h&]hhuh1jhjhhhhhK9ubah}(h]h ]h"]h$]h&]hhj2uh1jj3j4hjhhhhhK9ubah}(h]jah ](j8j9eh"]h$]h&]j=j>)j?huh1jhhhK9hjhhubjA)}(hhh]h}(h]h ]h"]h$]h&]uh1j@hjhhhhhK9ubeh}(h]h ](jNmacroeh"]h$]h&]jSjNjTjPjUjPjVjWjXuh1jhhhjhNhNubh)}(h**Parameters**h]j^)}(hjVh]h Parameters}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j]hjTubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:58: ./include/uapi/misc/amd-apml.hhKdhjhhubj)}(hhh]j)}(h**struct** apml_cpuid_msg Pointer to the :c:type:`struct apml_cpuid_msg ` that will contain the protocol information h](j)}(h**struct** apml_cpuid_msgh](j^)}(h **struct**h]hstruct}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j]hjsubh apml_cpuid_msg}(hjshhhNhNubeh}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:58: ./include/uapi/misc/amd-apml.hhKhhjoubj)}(hhh]h)}(hjPointer to the :c:type:`struct apml_cpuid_msg ` that will contain the protocol informationh](hPointer to the }(hjhhhNhNubh)}(h0:c:type:`struct apml_cpuid_msg `h]j)}(hjh]hstruct apml_cpuid_msg}(hjhhhNhNubah}(h]h ](jjNc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoch refdomainjNreftypetype refexplicitrefwarnjjjapml_cpuid_msguh1hha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:58: ./include/uapi/misc/amd-apml.hhKghjubh+ that will contain the protocol information}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKghjubah}(h]h ]h"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]uh1jhjhKhhjlubah}(h]h ]h"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:58: ./include/uapi/misc/amd-apml.hhNubh)}(hXC**Description** IOCTL command for APML messages using generic _IOWR The IOCTL provides userspace access to AMD sideband cpuid protocol - CPUID protocol to get CPU details for Function/Ext Function at thread level - returning "-EFAULT" if none of the above "-EPROTOTYPE" error is returned to provide additional error detailsh](j^)}(h**Description**h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j]hjubhX< IOCTL command for APML messages using generic _IOWR The IOCTL provides userspace access to AMD sideband cpuid protocol - CPUID protocol to get CPU details for Function/Ext Function at thread level - returning “-EFAULT” if none of the above “-EPROTOTYPE” error is returned to provide additional error details}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:58: ./include/uapi/misc/amd-apml.hhKjhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j SBRMI_IOCTL_MCAMSR_CMD (C macro)c.SBRMI_IOCTL_MCAMSR_CMDhNtauh1jhjhhhNhNubj)}(hhh](j)}(hSBRMI_IOCTL_MCAMSR_CMDh]j )}(hSBRMI_IOCTL_MCAMSR_CMDh]j)}(hSBRMI_IOCTL_MCAMSR_CMDh]j)}(hjh]hSBRMI_IOCTL_MCAMSR_CMD}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ](j'j(eh"]h$]h&]hhuh1jhj hhhhhK)j?huh1jhhhK` that will contain the protocol information h](j)}(h**struct** apml_mcamsr_msgh](j^)}(h **struct**h]hstruct}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1j]hj`ubh apml_mcamsr_msg}(hj`hhhNhNubeh}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:61: ./include/uapi/misc/amd-apml.hhK{hj\ubj)}(hhh]h)}(hlPointer to the :c:type:`struct apml_mcamsr_msg ` that will contain the protocol informationh](hPointer to the }(hjhhhNhNubh)}(h2:c:type:`struct apml_mcamsr_msg `h]j)}(hjh]hstruct apml_mcamsr_msg}(hjhhhNhNubah}(h]h ](jjNc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoch refdomainjNreftypetype refexplicitrefwarnjjjapml_mcamsr_msguh1hha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:61: ./include/uapi/misc/amd-apml.hhKzhjubh+ that will contain the protocol information}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKzhj}ubah}(h]h ]h"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]uh1jhj|hK{hjYubah}(h]h ]h"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:61: ./include/uapi/misc/amd-apml.hhNubh)}(hX=**Description** IOCTL command for APML messages using generic _IOWR The IOCTL provides userspace access to AMD sideband MCAMSR protocol - MCAMSR protocol to get MCA bank details for Function at thread level - returning "-EFAULT" if none of the above "-EPROTOTYPE" error is returned to provide additional error detailsh](j^)}(h**Description**h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j]hjubhX6 IOCTL command for APML messages using generic _IOWR The IOCTL provides userspace access to AMD sideband MCAMSR protocol - MCAMSR protocol to get MCA bank details for Function at thread level - returning “-EFAULT” if none of the above “-EPROTOTYPE” error is returned to provide additional error details}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:61: ./include/uapi/misc/amd-apml.hhK}hjhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"SBRMI_IOCTL_REG_XFER_CMD (C macro)c.SBRMI_IOCTL_REG_XFER_CMDhNtauh1jhjhhhNhNubj)}(hhh](j)}(hSBRMI_IOCTL_REG_XFER_CMDh]j )}(hSBRMI_IOCTL_REG_XFER_CMDh]j)}(hSBRMI_IOCTL_REG_XFER_CMDh]j)}(hjh]hSBRMI_IOCTL_REG_XFER_CMD}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubah}(h]h ](j'j(eh"]h$]h&]hhuh1jhjhhhhhK?ubah}(h]h ]h"]h$]h&]hhj2uh1jj3j4hjhhhhhK?ubah}(h]jah ](j8j9eh"]h$]h&]j=j>)j?huh1jhhhK?hjhhubjA)}(hhh]h}(h]h ]h"]h$]h&]uh1j@hjhhhhhK?ubeh}(h]h ](jNmacroeh"]h$]h&]jSjNjTj*jUj*jVjWjXuh1jhhhjhNhNubh)}(h**Parameters**h]j^)}(hj0h]h Parameters}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1j]hj.ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:64: ./include/uapi/misc/amd-apml.hhKhjhhubj)}(hhh]j)}(h**struct** apml_reg_xfer_msg Pointer to the :c:type:`struct apml_reg_xfer_msg ` that will contain the protocol information h](j)}(h**struct** apml_reg_xfer_msgh](j^)}(h **struct**h]hstruct}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j]hjMubh apml_reg_xfer_msg}(hjMhhhNhNubeh}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:64: ./include/uapi/misc/amd-apml.hhKhjIubj)}(hhh]h)}(hpPointer to the :c:type:`struct apml_reg_xfer_msg ` that will contain the protocol informationh](hPointer to the }(hjmhhhNhNubh)}(h6:c:type:`struct apml_reg_xfer_msg `h]j)}(hjwh]hstruct apml_reg_xfer_msg}(hjyhhhNhNubah}(h]h ](jjNc-typeeh"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&]refdoch refdomainjNreftypetype refexplicitrefwarnjjjapml_reg_xfer_msguh1hha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:64: ./include/uapi/misc/amd-apml.hhKhjmubh+ that will contain the protocol information}(hjmhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKhjjubah}(h]h ]h"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]uh1jhjihKhjFubah}(h]h ]h"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:64: ./include/uapi/misc/amd-apml.hhNubh)}(h**Description** IOCTL command for APML messages using generic _IOWR The IOCTL provides userspace access to AMD sideband register xfer protocol - Register xfer protocol to get/set hardware register for given offseth](j^)}(h**Description**h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j]hjubh IOCTL command for APML messages using generic _IOWR The IOCTL provides userspace access to AMD sideband register xfer protocol - Register xfer protocol to get/set hardware register for given offset}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/misc-devices/amd-sbi:64: ./include/uapi/misc/amd-apml.hhKhjhhubeh}(h] driver-ioctlsah ]h"] driver ioctlsah$]h&]uh1hhhhhhhhK4ubh)}(hhh](h)}(hUser-space usageh]hUser-space usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKDubh)}(hYTo access side band interface from a C program. First, user need to include the headers::h]hXTo access side band interface from a C program. First, user need to include the headers:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKFhjhhubjf)}(h#include h]h#include }hjsbah}(h]h ]h"]h$]h&]hhuh1jehhhKIhjhhubh)}(hVWhich defines the supported IOCTL and data structure to be passed from the user space.h]hVWhich defines the supported IOCTL and data structure to be passed from the user space.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjhhubh)}(h.Next thing, open the device file, as follows::h]h-Next thing, open the device file, as follows:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjhhubjf)}(hcint file; file = open("/dev/sbrmi-*", O_RDWR); if (file < 0) { /* ERROR HANDLING */ exit(1); }h]hcint file; file = open("/dev/sbrmi-*", O_RDWR); if (file < 0) { /* ERROR HANDLING */ exit(1); }}hj sbah}(h]h ]h"]h$]h&]hhuh1jehhhKPhjhhubh)}(h!The following IOCTLs are defined:h]h!The following IOCTLs are defined:}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKXhjhhubh)}(hX``#define SB_BASE_IOCTL_NR 0xF9`` ``#define SBRMI_IOCTL_MBOX_CMD _IOWR(SB_BASE_IOCTL_NR, 0, struct apml_mbox_msg)`` ``#define SBRMI_IOCTL_CPUID_CMD _IOWR(SB_BASE_IOCTL_NR, 1, struct apml_cpuid_msg)`` ``#define SBRMI_IOCTL_MCAMSR_CMD _IOWR(SB_BASE_IOCTL_NR, 2, struct apml_mcamsr_msg)`` ``#define SBRMI_IOCTL_REG_XFER_CMD _IOWR(SB_BASE_IOCTL_NR, 3, struct apml_reg_xfer_msg)``h](j)}(h.``#define SB_BASE_IOCTL_NR 0xF9``h]h*#define SB_BASE_IOCTL_NR 0xF9}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh }(hj<hhhNhNubj)}(hZ``#define SBRMI_IOCTL_MBOX_CMD _IOWR(SB_BASE_IOCTL_NR, 0, struct apml_mbox_msg)``h]hV#define SBRMI_IOCTL_MBOX_CMD _IOWR(SB_BASE_IOCTL_NR, 0, struct apml_mbox_msg)}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh }hj<sbj)}(h[``#define SBRMI_IOCTL_CPUID_CMD _IOWR(SB_BASE_IOCTL_NR, 1, struct apml_cpuid_msg)``h]hW#define SBRMI_IOCTL_CPUID_CMD _IOWR(SB_BASE_IOCTL_NR, 1, struct apml_cpuid_msg)}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh }hj<sbj)}(h\``#define SBRMI_IOCTL_MCAMSR_CMD _IOWR(SB_BASE_IOCTL_NR, 2, struct apml_mcamsr_msg)``h]hX#define SBRMI_IOCTL_MCAMSR_CMD _IOWR(SB_BASE_IOCTL_NR, 2, struct apml_mcamsr_msg)}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh }hj<sbj)}(h^``#define SBRMI_IOCTL_REG_XFER_CMD _IOWR(SB_BASE_IOCTL_NR, 3, struct apml_reg_xfer_msg)``h]hZ#define SBRMI_IOCTL_REG_XFER_CMD _IOWR(SB_BASE_IOCTL_NR, 3, struct apml_reg_xfer_msg)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1hhhhKZhjhhubh)}(huUser space C-APIs are made available by esmi_oob_library, hosted at [2]_ which is provided by the E-SMS project [3]_.h](hDUser space C-APIs are made available by esmi_oob_library, hosted at }(hjhhhNhNubh)}(h[2]_h]h2}(hjhhhNhNubah}(h]id3ah ]h"]h$]h&]hid5hhuh1hhjhKubh( which is provided by the E-SMS project }(hjhhhNhNubh)}(h[3]_h]h3}(hjhhhNhNubah}(h]id4ah ]h"]h$]h&]hid6hhuh1hhjhKubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKahjhhubj)}(h'https://github.com/amd/esmi_oob_libraryh](j)}(h2h]h2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh)}(hjh]j)}(hjh]h'https://github.com/amd/esmi_oob_library}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKdhjubeh}(h]jah ]h"]2ah$]h&]jahhuh1jhhhKdhjhhhKubj)}(h+https://www.amd.com/en/developer/e-sms.htmlh](j)}(h3h]h3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh)}(hjh]j)}(hjh]h+https://www.amd.com/en/developer/e-sms.html}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKehjubeh}(h]jah ]h"]3ah$]h&]jahhuh1jhhhKehjhhhKubeh}(h]user-space-usageah ]h"]user-space usageah$]h&]uh1hhhhhhhhKDubeh}(h]amd-side-band-interfaceah ]h"]amd side band interfaceah$]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_handlerjeerror_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}(1]ha2]ja3]jaurefids}nameids}(j?j<j5hjjjjj7j4jjj/ju nametypes}(j?j5jjj7jj/uh}(j<hhhhjjj8jjjjjjjjjjj4jjjjjjjjju footnote_refs}(j]haj]jaj]jau citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes](jjje citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jsKsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.