You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mlx_nvconfig_prm.h 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. #ifndef MLX_NVCONFIG_PRM_H_
  2. #define MLX_NVCONFIG_PRM_H_
  3. /*
  4. * Copyright (C) 2015 Mellanox Technologies Ltd.
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation; either version 2 of the
  9. * License, or any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  19. * 02110-1301, USA.
  20. */
  21. FILE_LICENCE ( GPL2_OR_LATER );
  22. #include "../../include/public/mlx_types.h"
  23. enum {
  24. WAKE_ON_LAN_TYPE = 0x10,
  25. VIRTUALIZATION_TYPE = 0x11,
  26. VPI_LINK_TYPE = 0x12,
  27. BOOT_SETTINGS_EXT_TYPE = 0x2001,
  28. BANNER_TO_TYPE = 0x2010,
  29. OCSD_OCBB_TYPE = 0x2011,
  30. FLOW_CONTROL_TYPE = 0x2020,
  31. BOOT_SETTINGS_TYPE = 0x2021,
  32. ISCSI_GENERAL_SETTINGS_TYPE = 0x2100,
  33. IB_BOOT_SETTING_TYPE = 0x2022,
  34. IB_DHCP_SETTINGS_TYPE = 0x2023,
  35. GLOPAL_PCI_SETTINGS_TYPE = 0x80,
  36. GLOPAL_PCI_CAPS_TYPE = 0x81,
  37. GLOBAL_ROM_INI_TYPE = 0x100,
  38. // Types for iSCSI strings
  39. DHCP_VEND_ID = 0x2101,
  40. ISCSI_INITIATOR_IPV4_ADDR = 0x2102,
  41. ISCSI_INITIATOR_SUBNET = 0x2103,
  42. ISCSI_INITIATOR_IPV4_GATEWAY = 0x2104,
  43. ISCSI_INITIATOR_IPV4_PRIM_DNS = 0x2105,
  44. ISCSI_INITIATOR_IPV4_SECDNS = 0x2106,
  45. ISCSI_INITIATOR_NAME = 0x2107,
  46. ISCSI_INITIATOR_CHAP_ID = 0x2108,
  47. ISCSI_INITIATOR_CHAP_PWD = 0x2109,
  48. ISCSI_INITIATOR_DHCP_CONF_TYPE = 0x210a,
  49. CONNECT_FIRST_TGT = 0x2200,
  50. FIRST_TGT_IP_ADDRESS = 0x2201,
  51. FIRST_TGT_TCP_PORT = 0x2202,
  52. FIRST_TGT_BOOT_LUN = 0x2203,
  53. FIRST_TGT_ISCSI_NAME = 0x2204,
  54. FIRST_TGT_CHAP_ID = 0x2205,
  55. FIRST_TGT_CHAP_PWD = 0x2207,
  56. };
  57. union mlx_nvconfig_nic_boot_conf {
  58. struct {
  59. mlx_uint32 vlan_id : 12;
  60. mlx_uint32 link_speed : 4;
  61. mlx_uint32 legacy_boot_prot : 8;
  62. mlx_uint32 boot_retry_count : 3;
  63. mlx_uint32 boot_strap_type : 3;
  64. mlx_uint32 en_vlan : 1;
  65. mlx_uint32 en_option_rom : 1;
  66. };
  67. mlx_uint32 dword;
  68. };
  69. union mlx_nvconfig_nic_boot_ext_conf {
  70. struct {
  71. mlx_uint32 linkup_timeout : 8;
  72. mlx_uint32 ip_ver : 2;
  73. mlx_uint32 reserved0 : 22;
  74. };
  75. mlx_uint32 dword;
  76. };
  77. union mlx_nvconfig_rom_banner_timeout_conf {
  78. struct {
  79. mlx_uint32 rom_banner_to : 4;
  80. mlx_uint32 reserved : 28;
  81. };
  82. mlx_uint32 dword;
  83. };
  84. union mlx_nvconfig_virt_conf {
  85. struct {
  86. mlx_uint32 reserved0 :24;
  87. mlx_uint32 pf_bar_size_valid :1;
  88. mlx_uint32 vf_bar_size_valid :1;
  89. mlx_uint32 num_pf_msix_valid :1;
  90. mlx_uint32 num_vf_msix_valid :1;
  91. mlx_uint32 num_pfs_valid :1;
  92. mlx_uint32 fpp_valid :1;
  93. mlx_uint32 full_vf_qos_valid :1;
  94. mlx_uint32 sriov_valid :1;
  95. /*-------------------*/
  96. mlx_uint32 num_of_vfs :16;
  97. mlx_uint32 num_of_pfs :4;
  98. mlx_uint32 reserved1 :9;
  99. mlx_uint32 fpp_en :1;
  100. mlx_uint32 full_vf_qos :1;
  101. mlx_uint32 virt_mode :1; //sriov_en
  102. /*-------------------*/
  103. mlx_uint32 log_pf_uar_bar_size :6;
  104. mlx_uint32 log_vf_uar_bar_size :6;
  105. mlx_uint32 num_pf_msix :10;
  106. mlx_uint32 num_vf_msix :10;
  107. };
  108. mlx_uint32 dword[3];
  109. };
  110. union mlx_nvconfig_virt_caps {
  111. struct {
  112. mlx_uint32 reserved0 :24;
  113. mlx_uint32 max_vfs_per_pf_valid :1;
  114. mlx_uint32 max_total_msix_valid :1;
  115. mlx_uint32 max_total_bar_valid :1;
  116. mlx_uint32 num_pfs_supported :1;
  117. mlx_uint32 num_vf_msix_supported :1;
  118. mlx_uint32 num_pf_msix_supported :1;
  119. mlx_uint32 vf_bar_size_supported :1;
  120. mlx_uint32 pf_bar_size_supported :1;
  121. /*-------------------*/
  122. mlx_uint32 max_vfs_per_pf :16;
  123. mlx_uint32 max_num_pfs :4;
  124. mlx_uint32 reserved1 :9;
  125. mlx_uint32 fpp_support :1;
  126. mlx_uint32 vf_qos_control_support :1;
  127. mlx_uint32 sriov_support :1;
  128. /*-------------------*/
  129. mlx_uint32 max_log_pf_uar_bar_size :6;
  130. mlx_uint32 max_log_vf_uar_bar_size :6;
  131. mlx_uint32 max_num_pf_msix :10;
  132. mlx_uint32 max_num_vf_msix :10;
  133. /*-------------------*/
  134. mlx_uint32 max_total_msix;
  135. /*-------------------*/
  136. mlx_uint32 max_total_bar;
  137. };
  138. mlx_uint32 dword[5];
  139. };
  140. union mlx_nvconfig_iscsi_init_dhcp_conf {
  141. struct {
  142. mlx_uint32 reserved0 :30;
  143. mlx_uint32 dhcp_iscsi_en :1;
  144. mlx_uint32 ipv4_dhcp_en :1;
  145. };
  146. mlx_uint32 dword;
  147. };
  148. union mlx_nvconfig_nic_ib_boot_conf {
  149. struct {
  150. mlx_uint32 boot_pkey : 16;
  151. mlx_uint32 reserved0 : 16;
  152. };
  153. mlx_uint32 dword;
  154. };
  155. union mlx_nvconfig_wol_conf {
  156. struct {
  157. mlx_uint32 reserved0 :9;
  158. mlx_uint32 en_wol_passwd :1;
  159. mlx_uint32 en_wol_magic :1;
  160. mlx_uint32 reserved1 :21;
  161. mlx_uint32 reserved2 :32;
  162. };
  163. mlx_uint32 dword[2];
  164. };
  165. union mlx_nvconfig_iscsi_general {
  166. struct {
  167. mlx_uint32 reserved0 :22;
  168. mlx_uint32 boot_to_target :2;
  169. mlx_uint32 reserved1 :2;
  170. mlx_uint32 vlan_en :1;
  171. mlx_uint32 tcp_timestamps_en :1;
  172. mlx_uint32 chap_mutual_auth_en :1;
  173. mlx_uint32 chap_auth_en :1;
  174. mlx_uint32 reserved2 :2;
  175. /*-------------------*/
  176. mlx_uint32 vlan :12;
  177. mlx_uint32 reserved3 :20;
  178. /*-------------------*/
  179. mlx_uint32 lun_busy_retry_count:8;
  180. mlx_uint32 link_up_delay_time :8;
  181. mlx_uint32 reserved4 :16;
  182. };
  183. mlx_uint32 dword[3];
  184. };
  185. union mlx_nvconfig_ib_dhcp_conf {
  186. struct {
  187. mlx_uint32 reserved :24;
  188. mlx_uint32 client_identifier :4;
  189. mlx_uint32 mac_admin_bit :4;
  190. };
  191. mlx_uint32 dword;
  192. };
  193. union mlx_nvconfig_ocsd_ocbb_conf {
  194. struct {
  195. mlx_uint32 reserved :31;
  196. mlx_uint32 ocsd_ocbb_en :1;
  197. };
  198. mlx_uint32 dword;
  199. };
  200. union mlx_nvconfig_vpi_link_conf {
  201. struct {
  202. mlx_uint32 network_link_type :2;
  203. mlx_uint32 default_link_type :2;
  204. mlx_uint32 reserved :28;
  205. };
  206. mlx_uint32 dword;
  207. };
  208. struct mlx_nvcofnig_romini {
  209. mlx_uint32 reserved0 :1;
  210. mlx_uint32 shared_memory_en :1;
  211. mlx_uint32 hii_vpi_en :1;
  212. mlx_uint32 tech_enum :1;
  213. mlx_uint32 reserved1 :4;
  214. mlx_uint32 static_component_name_string :1;
  215. mlx_uint32 hii_iscsi_configuration :1;
  216. mlx_uint32 hii_ibm_aim :1;
  217. mlx_uint32 hii_platform_setup :1;
  218. mlx_uint32 hii_bdf_decimal :1;
  219. mlx_uint32 hii_read_only :1;
  220. mlx_uint32 reserved2 :10;
  221. mlx_uint32 mac_enum :1;
  222. mlx_uint32 port_enum :1;
  223. mlx_uint32 flash_en :1;
  224. mlx_uint32 fmp_en :1;
  225. mlx_uint32 bofm_en :1;
  226. mlx_uint32 platform_to_driver_en :1;
  227. mlx_uint32 hii_en :1;
  228. mlx_uint32 undi_en :1;
  229. /* -------------- */
  230. mlx_uint64 dhcp_user_class;
  231. /* -------------- */
  232. mlx_uint32 reserved3 :22;
  233. mlx_uint32 uri_boot_retry_delay :4;
  234. mlx_uint32 uri_boot_retry :4;
  235. mlx_uint32 option_rom_debug :1;
  236. mlx_uint32 promiscuous_vlan :1;
  237. };
  238. #endif /* MLX_NVCONFIG_PRM_H_ */