您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

mlx_nvconfig_prm.h 8.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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. NV_ROM_FLEXBOOT_DEBUG = 0x2004,
  33. ISCSI_GENERAL_SETTINGS_TYPE = 0x2100,
  34. IB_BOOT_SETTING_TYPE = 0x2022,
  35. IB_DHCP_SETTINGS_TYPE = 0x2023,
  36. GLOPAL_PCI_SETTINGS_TYPE = 0x80,
  37. GLOPAL_PCI_CAPS_TYPE = 0x81,
  38. GLOBAL_ROM_INI_TYPE = 0x100,
  39. NV_VIRT_NET_ADDR = 0x110,
  40. // Types for iSCSI strings
  41. DHCP_VEND_ID = 0x2101,
  42. ISCSI_INITIATOR_IPV4_ADDR = 0x2102,
  43. ISCSI_INITIATOR_SUBNET = 0x2103,
  44. ISCSI_INITIATOR_IPV4_GATEWAY = 0x2104,
  45. ISCSI_INITIATOR_IPV4_PRIM_DNS = 0x2105,
  46. ISCSI_INITIATOR_IPV4_SECDNS = 0x2106,
  47. ISCSI_INITIATOR_NAME = 0x2107,
  48. ISCSI_INITIATOR_CHAP_ID = 0x2108,
  49. ISCSI_INITIATOR_CHAP_PWD = 0x2109,
  50. ISCSI_INITIATOR_DHCP_CONF_TYPE = 0x210a,
  51. CONNECT_FIRST_TGT = 0x2200,
  52. FIRST_TGT_IP_ADDRESS = 0x2201,
  53. FIRST_TGT_TCP_PORT = 0x2202,
  54. FIRST_TGT_BOOT_LUN = 0x2203,
  55. FIRST_TGT_ISCSI_NAME = 0x2204,
  56. FIRST_TGT_CHAP_ID = 0x2205,
  57. FIRST_TGT_CHAP_PWD = 0x2207,
  58. NV_ROM_DEBUG_LEVEL = 0x2002,
  59. NV_ROM_CAP_TYPE = 0x101,
  60. };
  61. union mlx_nvconfig_nic_boot_conf {
  62. struct {
  63. mlx_uint32 vlan_id : 12;
  64. mlx_uint32 link_speed : 4;
  65. mlx_uint32 legacy_boot_prot : 8;
  66. mlx_uint32 boot_retry_count : 3;
  67. mlx_uint32 boot_strap_type : 3;
  68. mlx_uint32 en_vlan : 1;
  69. mlx_uint32 en_option_rom : 1;
  70. };
  71. mlx_uint32 dword;
  72. };
  73. union mlx_nvconfig_nic_boot_ext_conf {
  74. struct {
  75. mlx_uint32 linkup_timeout : 8;
  76. mlx_uint32 ip_ver : 2;
  77. mlx_uint32 reserved0 : 6;
  78. mlx_uint32 undi_network_wait_to : 8;
  79. mlx_uint32 reserved1 : 8;
  80. };
  81. mlx_uint32 dword;
  82. };
  83. union mlx_nvconfig_rom_banner_timeout_conf {
  84. struct {
  85. mlx_uint32 rom_banner_to : 4;
  86. mlx_uint32 reserved : 28;
  87. };
  88. mlx_uint32 dword;
  89. };
  90. union mlx_nvconfig_virt_conf {
  91. struct {
  92. mlx_uint32 reserved0 :24;
  93. mlx_uint32 pf_bar_size_valid :1;
  94. mlx_uint32 vf_bar_size_valid :1;
  95. mlx_uint32 num_pf_msix_valid :1;
  96. mlx_uint32 num_vf_msix_valid :1;
  97. mlx_uint32 num_pfs_valid :1;
  98. mlx_uint32 fpp_valid :1;
  99. mlx_uint32 full_vf_qos_valid :1;
  100. mlx_uint32 sriov_valid :1;
  101. /*-------------------*/
  102. mlx_uint32 num_of_vfs :16;
  103. mlx_uint32 num_of_pfs :4;
  104. mlx_uint32 reserved1 :9;
  105. mlx_uint32 fpp_en :1;
  106. mlx_uint32 full_vf_qos :1;
  107. mlx_uint32 virt_mode :1; //sriov_en
  108. /*-------------------*/
  109. mlx_uint32 log_pf_uar_bar_size :6;
  110. mlx_uint32 log_vf_uar_bar_size :6;
  111. mlx_uint32 num_pf_msix :10;
  112. mlx_uint32 num_vf_msix :10;
  113. };
  114. mlx_uint32 dword[3];
  115. };
  116. union mlx_nvconfig_virt_caps {
  117. struct {
  118. mlx_uint32 reserved0 :24;
  119. mlx_uint32 max_vfs_per_pf_valid :1;
  120. mlx_uint32 max_total_msix_valid :1;
  121. mlx_uint32 max_total_bar_valid :1;
  122. mlx_uint32 num_pfs_supported :1;
  123. mlx_uint32 num_vf_msix_supported :1;
  124. mlx_uint32 num_pf_msix_supported :1;
  125. mlx_uint32 vf_bar_size_supported :1;
  126. mlx_uint32 pf_bar_size_supported :1;
  127. /*-------------------*/
  128. mlx_uint32 max_vfs_per_pf :16;
  129. mlx_uint32 max_num_pfs :4;
  130. mlx_uint32 reserved1 :9;
  131. mlx_uint32 fpp_support :1;
  132. mlx_uint32 vf_qos_control_support :1;
  133. mlx_uint32 sriov_support :1;
  134. /*-------------------*/
  135. mlx_uint32 max_log_pf_uar_bar_size :6;
  136. mlx_uint32 max_log_vf_uar_bar_size :6;
  137. mlx_uint32 max_num_pf_msix :10;
  138. mlx_uint32 max_num_vf_msix :10;
  139. /*-------------------*/
  140. mlx_uint32 max_total_msix;
  141. /*-------------------*/
  142. mlx_uint32 max_total_bar;
  143. };
  144. mlx_uint32 dword[5];
  145. };
  146. union mlx_nvconfig_iscsi_init_dhcp_conf {
  147. struct {
  148. mlx_uint32 reserved0 :30;
  149. mlx_uint32 dhcp_iscsi_en :1;
  150. mlx_uint32 ipv4_dhcp_en :1;
  151. };
  152. mlx_uint32 dword;
  153. };
  154. union mlx_nvconfig_nic_ib_boot_conf {
  155. struct {
  156. mlx_uint32 boot_pkey : 16;
  157. mlx_uint32 reserved0 : 16;
  158. };
  159. mlx_uint32 dword;
  160. };
  161. union mlx_nvconfig_wol_conf {
  162. struct {
  163. mlx_uint32 reserved0 :9;
  164. mlx_uint32 en_wol_passwd :1;
  165. mlx_uint32 en_wol_magic :1;
  166. mlx_uint32 reserved1 :21;
  167. mlx_uint32 reserved2 :32;
  168. };
  169. mlx_uint32 dword[2];
  170. };
  171. union mlx_nvconfig_iscsi_general {
  172. struct {
  173. mlx_uint32 reserved0 :22;
  174. mlx_uint32 boot_to_target :2;
  175. mlx_uint32 reserved1 :2;
  176. mlx_uint32 vlan_en :1;
  177. mlx_uint32 tcp_timestamps_en :1;
  178. mlx_uint32 chap_mutual_auth_en :1;
  179. mlx_uint32 chap_auth_en :1;
  180. mlx_uint32 reserved2 :2;
  181. /*-------------------*/
  182. mlx_uint32 vlan :12;
  183. mlx_uint32 reserved3 :20;
  184. /*-------------------*/
  185. mlx_uint32 lun_busy_retry_count:8;
  186. mlx_uint32 link_up_delay_time :8;
  187. mlx_uint32 drive_num :8;
  188. mlx_uint32 reserved4 :8;
  189. };
  190. mlx_uint32 dword[3];
  191. };
  192. union mlx_nvconfig_ib_dhcp_conf {
  193. struct {
  194. mlx_uint32 reserved :24;
  195. mlx_uint32 client_identifier :4;
  196. mlx_uint32 mac_admin_bit :4;
  197. };
  198. mlx_uint32 dword;
  199. };
  200. union mlx_nvconfig_ocsd_ocbb_conf {
  201. struct {
  202. mlx_uint32 reserved :31;
  203. mlx_uint32 ocsd_ocbb_en :1;
  204. };
  205. mlx_uint32 dword;
  206. };
  207. union mlx_nvconfig_vpi_link_conf {
  208. struct {
  209. mlx_uint32 network_link_type :2;
  210. mlx_uint32 default_link_type :2;
  211. mlx_uint32 reserved :28;
  212. };
  213. mlx_uint32 dword;
  214. };
  215. struct mlx_nvcofnig_romini {
  216. mlx_uint32 reserved0 :1;
  217. mlx_uint32 shared_memory_en :1;
  218. mlx_uint32 hii_vpi_en :1;
  219. mlx_uint32 tech_enum :1;
  220. mlx_uint32 reserved1 :4;
  221. mlx_uint32 static_component_name_string :1;
  222. mlx_uint32 hii_iscsi_configuration :1;
  223. mlx_uint32 hii_ibm_aim :1;
  224. mlx_uint32 hii_platform_setup :1;
  225. mlx_uint32 hii_bdf_decimal :1;
  226. mlx_uint32 hii_read_only :1;
  227. mlx_uint32 reserved2 :10;
  228. mlx_uint32 mac_enum :1;
  229. mlx_uint32 port_enum :1;
  230. mlx_uint32 flash_en :1;
  231. mlx_uint32 fmp_en :1;
  232. mlx_uint32 bofm_en :1;
  233. mlx_uint32 platform_to_driver_en:1;
  234. mlx_uint32 hii_en :1;
  235. mlx_uint32 undi_en :1;
  236. /* -------------- */
  237. mlx_uint64 dhcp_user_class;
  238. /* -------------- */
  239. mlx_uint32 reserved3 :10;
  240. mlx_uint32 ucm_single_port :1;
  241. mlx_uint32 tivoli_wa_en :1;
  242. mlx_uint32 dhcp_pxe_discovery_control_dis :1;
  243. mlx_uint32 hii_flexaddr_override:1;
  244. mlx_uint32 hii_flexaddr_setting :1;
  245. mlx_uint32 guided_ops :1;
  246. mlx_uint32 hii_type :4;
  247. mlx_uint32 hii_mriname2 :1;
  248. mlx_uint32 hii_aim_ucm_ver2 :1;
  249. mlx_uint32 uri_boot_retry_delay :4;
  250. mlx_uint32 uri_boot_retry :4;
  251. mlx_uint32 option_rom_debug :1;
  252. mlx_uint32 promiscuous_vlan :1;
  253. } __attribute__ ((packed));
  254. union mlx_nvconfig_debug_conf {
  255. struct {
  256. mlx_uint32 dbg_log_en :1;
  257. mlx_uint32 reserved1 :31;
  258. /***************************************************/
  259. mlx_uint32 stp_dbg_lvl :2;
  260. mlx_uint32 romprefix_dbg_lvl :2;
  261. mlx_uint32 dhcp_dbg_lvl :2;
  262. mlx_uint32 dhcpv6_dbg_lvl :2;
  263. mlx_uint32 arp_dbg_lvl :2;
  264. mlx_uint32 neighbor_dbg_lvl :2;
  265. mlx_uint32 ndp_dbg_lvl :2;
  266. mlx_uint32 uri_dbg_lvl :2;
  267. mlx_uint32 driver_dbg_lvl :2;
  268. mlx_uint32 nodnic_dbg_lvl :2;
  269. mlx_uint32 nodnic_cmd_dbg_lvl :2;
  270. mlx_uint32 nodnic_device_dbg_lvl :2;
  271. mlx_uint32 nodnic_port_dbg_lvl :2;
  272. mlx_uint32 netdevice_dbg_lvl :2;
  273. mlx_uint32 tftp_dbg_lvl :2;
  274. mlx_uint32 udp_dbg_lvl :2;
  275. /***************************************************/
  276. mlx_uint32 tcp_dbg_lvl :2;
  277. mlx_uint32 tcpip_dbg_lvl :2;
  278. mlx_uint32 ipv4_dbg_lvl :2;
  279. mlx_uint32 ipv6_dbg_lvl :2;
  280. mlx_uint32 drv_set_dbg_lvl :2;
  281. mlx_uint32 stat_update_dbg_lvl :2;
  282. mlx_uint32 pxe_undi_dbg_lvl :2;
  283. mlx_uint32 reserved2 :18;
  284. };
  285. mlx_uint32 dword[3];
  286. };
  287. union mlx_nvconfig_flexboot_debug {
  288. struct {
  289. mlx_uint32 reserved0 :29;
  290. mlx_uint32 panic_behavior :2;
  291. mlx_uint32 boot_to_shell :1;
  292. };
  293. mlx_uint32 dword;
  294. };
  295. union mlx_nvconfig_rom_cap_conf {
  296. struct {
  297. mlx_uint32 reserved0 :28;
  298. mlx_uint32 uefi_logs_en :1;
  299. mlx_uint32 flexboot_debug_en :1;
  300. mlx_uint32 boot_debug_log_en :1;
  301. mlx_uint32 boot_ip_ver_en :1;
  302. };
  303. mlx_uint32 dword;
  304. };
  305. #endif /* MLX_NVCONFIG_PRM_H_ */