€•˜0Œ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”Œ2/translations/zh_CN/userspace-api/fwctl/bnxt_fwctl”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ2/translations/zh_TW/userspace-api/fwctl/bnxt_fwctl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ2/translations/it_IT/userspace-api/fwctl/bnxt_fwctl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ2/translations/ja_JP/userspace-api/fwctl/bnxt_fwctl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ2/translations/ko_KR/userspace-api/fwctl/bnxt_fwctl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ2/translations/pt_BR/userspace-api/fwctl/bnxt_fwctl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ2/translations/sp_SP/userspace-api/fwctl/bnxt_fwctl”Œ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³ŒL/var/lib/git/docbuild/linux/Documentation/userspace-api/fwctl/bnxt_fwctl.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒfwctl bnxt driver”h]”hŒfwctl bnxt driver”…”�”}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ field_list”“”)�”}”(hhh]”hŒfield”“”)�”}”(hhh]”(hŒ field_name”“”)�”}”(hŒAuthor”h]”hŒAuthor”…”�”}”(hhéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hçhhäh³hÇh´KubhŒ field_body”“”)�”}”(hŒ Pavan Chebbi ”h]”hŒ paragraph”“”)�”}”(hŒ Pavan Chebbi”h]”hŒ Pavan Chebbi”…”�”}”(hhÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´Khhùubah}”(h]”h ]”h"]”h$]”h&]”uh1h÷hhäubeh}”(h]”h ]”h"]”h$]”h&]”uh1hâh³hÇh´Khhßh²hubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒOverview”h]”hŒOverview”…”�”}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´K ubhþ)�”}”(hŒ¢BNXT driver makes a fwctl service available through an auxiliary_device. The bnxt_fwctl driver binds to this device and registers itself with the fwctl subsystem.”h]”hŒ¢BNXT driver makes a fwctl service available through an auxiliary_device. The bnxt_fwctl driver binds to this device and registers itself with the fwctl subsystem.”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K hjh²hubhþ)�”}”(hŒÂThe bnxt_fwctl driver is agnostic to the device firmware internals. It uses the Upper Layer Protocol (ULP) conduit provided by bnxt to send HardWare Resource Manager (HWRM) commands to firmware.”h]”hŒÂThe bnxt_fwctl driver is agnostic to the device firmware internals. It uses the Upper Layer Protocol (ULP) conduit provided by bnxt to send HardWare Resource Manager (HWRM) commands to firmware.”…”�”}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´Khjh²hubhþ)�”}”(hŒ€These commands can query or change firmware driven device configurations and read/write registers that are useful for debugging.”h]”hŒ€These commands can query or change firmware driven device configurations and read/write registers that are useful for debugging.”…”�”}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´Khjh²hubeh}”(h]”Œoverview”ah ]”h"]”Œoverview”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒbnxt_fwctl User API”h]”hŒbnxt_fwctl User API”…”�”}”(hjeh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjbh²hh³hÇh´Kubhþ)�”}”(hŒvEach RPC request contains the HWRM input structure in the fwctl_rpc 'in' buffer while 'out' will contain the response.”h]”hŒ~Each RPC request contains the HWRM input structure in the fwctl_rpc ‘in’ buffer while ‘out’ will contain the response.”…”�”}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´Khjbh²hubhþ)�”}”(hŒ€A typical user application can send a FWCTL_INFO command using ioctl() to discover bnxt_fwctl's RPC capabilities as shown below:”h]”hŒ‚A typical user application can send a FWCTL_INFO command using ioctl() to discover bnxt_fwctl’s RPC capabilities as shown below:”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´Khjbh²hubhŒ block_quote”“”)�”}”(hŒ(ioctl(fd, FWCTL_INFO, &fwctl_info_msg); ”h]”hþ)�”}”(hŒ'ioctl(fd, FWCTL_INFO, &fwctl_info_msg);”h]”hŒ'ioctl(fd, FWCTL_INFO, &fwctl_info_msg);”…”�”}”(hj•h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K hj‘ubah}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´K hjbh²hubhþ)�”}”(hŒ�where fwctl_info_msg (of type struct fwctl_info) describes bnxt_info_msg (of type struct fwctl_info_bnxt). fwctl_info_msg is set up as follows:”h]”hŒ�where fwctl_info_msg (of type struct fwctl_info) describes bnxt_info_msg (of type struct fwctl_info_bnxt). fwctl_info_msg is set up as follows:”…”�”}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K"hjbh²hubj�)�”}”(hŒ‡size = sizeof(struct fwctl_info); flags = 0; device_data_len = sizeof(bnxt_info_msg); out_device_data = (__aligned_u64)&bnxt_info_msg; ”h]”hþ)�”}”(hŒ†size = sizeof(struct fwctl_info); flags = 0; device_data_len = sizeof(bnxt_info_msg); out_device_data = (__aligned_u64)&bnxt_info_msg;”h]”hŒ†size = sizeof(struct fwctl_info); flags = 0; device_data_len = sizeof(bnxt_info_msg); out_device_data = (__aligned_u64)&bnxt_info_msg;”…”�”}”(hj»h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K%hj·ubah}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´K%hjbh²hubhþ)�”}”(hŒ{The uctx_caps of bnxt_info_msg represents the capabilities as described in fwctl_bnxt_commands of include/uapi/fwctl/bnxt.h”h]”hŒ{The uctx_caps of bnxt_info_msg represents the capabilities as described in fwctl_bnxt_commands of include/uapi/fwctl/bnxt.h”…”�”}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K*hjbh²hubhþ)�”}”(hŒ:The FW RPC itself, FWCTL_RPC can be sent using ioctl() as:”h]”hŒ:The FW RPC itself, FWCTL_RPC can be sent using ioctl() as:”…”�”}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K-hjbh²hubj�)�”}”(hŒ&ioctl(fd, FWCTL_RPC, &fwctl_rpc_msg); ”h]”hþ)�”}”(hŒ%ioctl(fd, FWCTL_RPC, &fwctl_rpc_msg);”h]”hŒ%ioctl(fd, FWCTL_RPC, &fwctl_rpc_msg);”…”�”}”(hjïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K/hjëubah}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´K/hjbh²hubhþ)�”}”(hŒÌwhere fwctl_rpc_msg (of type struct fwctl_rpc) carries the HWRM command in its 'in' buffer. The HWRM input structures are described in include/linux/bnxt/hsi.h. An example for HWRM_VER_GET is shown below:”h]”hŒÐwhere fwctl_rpc_msg (of type struct fwctl_rpc) carries the HWRM command in its ‘in’ buffer. The HWRM input structures are described in include/linux/bnxt/hsi.h. An example for HWRM_VER_GET is shown below:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K1hjbh²hubj�)�”}”(hXstruct hwrm_ver_get_output resp; struct fwctl_rpc fwctl_rpc_msg; struct hwrm_ver_get_input req; req.req_type = HWRM_VER_GET; req.hwrm_intf_maj = HWRM_VERSION_MAJOR; req.hwrm_intf_min = HWRM_VERSION_MINOR; req.hwrm_intf_upd = HWRM_VERSION_UPDATE; req.cmpl_ring = -1; req.target_id = -1; fwctl_rpc_msg.size = sizeof(struct fwctl_rpc); fwctl_rpc_msg.scope = FWCTL_RPC_DEBUG_READ_ONLY; fwctl_rpc_msg.in_len = sizeof(req); fwctl_rpc_msg.out_len = sizeof(resp); fwctl_rpc_msg.in = (__aligned_u64)&req; fwctl_rpc_msg.out = (__aligned_u64)&resp; ”h]”(hþ)�”}”(hŒ_struct hwrm_ver_get_output resp; struct fwctl_rpc fwctl_rpc_msg; struct hwrm_ver_get_input req;”h]”hŒ_struct hwrm_ver_get_output resp; struct fwctl_rpc fwctl_rpc_msg; struct hwrm_ver_get_input req;”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K5hjubhþ)�”}”(hŒ½req.req_type = HWRM_VER_GET; req.hwrm_intf_maj = HWRM_VERSION_MAJOR; req.hwrm_intf_min = HWRM_VERSION_MINOR; req.hwrm_intf_upd = HWRM_VERSION_UPDATE; req.cmpl_ring = -1; req.target_id = -1;”h]”hŒ½req.req_type = HWRM_VER_GET; req.hwrm_intf_maj = HWRM_VERSION_MAJOR; req.hwrm_intf_min = HWRM_VERSION_MINOR; req.hwrm_intf_upd = HWRM_VERSION_UPDATE; req.cmpl_ring = -1; req.target_id = -1;”…”�”}”(hj#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K9hjubhþ)�”}”(hŒûfwctl_rpc_msg.size = sizeof(struct fwctl_rpc); fwctl_rpc_msg.scope = FWCTL_RPC_DEBUG_READ_ONLY; fwctl_rpc_msg.in_len = sizeof(req); fwctl_rpc_msg.out_len = sizeof(resp); fwctl_rpc_msg.in = (__aligned_u64)&req; fwctl_rpc_msg.out = (__aligned_u64)&resp;”h]”hŒûfwctl_rpc_msg.size = sizeof(struct fwctl_rpc); fwctl_rpc_msg.scope = FWCTL_RPC_DEBUG_READ_ONLY; fwctl_rpc_msg.in_len = sizeof(req); fwctl_rpc_msg.out_len = sizeof(resp); fwctl_rpc_msg.in = (__aligned_u64)&req; fwctl_rpc_msg.out = (__aligned_u64)&resp;”…”�”}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´K@hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´K5hjbh²hubhþ)�”}”(hŒiAn example python3 program that can exercise this interface can be found in the following git repository:”h]”hŒiAn example python3 program that can exercise this interface can be found in the following git repository:”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´KGhjbh²hubhþ)�”}”(hŒ'https://github.com/Broadcom/fwctl-tools”h]”hŒ reference”“”)�”}”(hjUh]”hŒ'https://github.com/Broadcom/fwctl-tools”…”�”}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jUuh1jWhjSubah}”(h]”h ]”h"]”h$]”h&]”uh1hýh³hÇh´KJhjbh²hubeh}”(h]”Œbnxt-fwctl-user-api”ah ]”h"]”Œbnxt_fwctl user api”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´Kubeh}”(h]”Œfwctl-bnxt-driver”ah ]”h"]”Œfwctl bnxt driver”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”j Œ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”}”(jzjwj_j\jrjouŒ nametypes”}”(jz‰j_‰jr‰uh}”(jwhÊj\jjojbuŒ 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”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.