iPXE
mlx_nvconfig_prm.h
Go to the documentation of this file.
00001 #ifndef MLX_NVCONFIG_PRM_H_
00002 #define MLX_NVCONFIG_PRM_H_
00003 
00004 /*
00005  * Copyright (C) 2015 Mellanox Technologies Ltd.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License as
00009  * published by the Free Software Foundation; either version 2 of the
00010  * License, or any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00020  * 02110-1301, USA.
00021  */
00022 
00023 FILE_LICENCE ( GPL2_OR_LATER );
00024 
00025 #include "../../include/public/mlx_types.h"
00026 
00027 enum {
00028         WAKE_ON_LAN_TYPE                                = 0x10,
00029         VIRTUALIZATION_TYPE                             = 0x11,
00030         VPI_LINK_TYPE                                   = 0x12,
00031         BOOT_SETTINGS_EXT_TYPE                  = 0x2001,
00032         BANNER_TO_TYPE                                  = 0x2010,
00033         OCSD_OCBB_TYPE                                  = 0x2011,
00034         FLOW_CONTROL_TYPE                               = 0x2020,
00035         BOOT_SETTINGS_TYPE                              = 0x2021,
00036         NV_ROM_FLEXBOOT_DEBUG                           = 0x2004,
00037 
00038         ISCSI_GENERAL_SETTINGS_TYPE             = 0x2100,
00039         IB_BOOT_SETTING_TYPE                    = 0x2022,
00040         IB_DHCP_SETTINGS_TYPE                   = 0x2023,
00041         GLOPAL_PCI_SETTINGS_TYPE                = 0x80,
00042         GLOPAL_PCI_CAPS_TYPE                    = 0x81,
00043         GLOBAL_ROM_INI_TYPE                             = 0x100,
00044         NV_VIRT_NET_ADDR                                = 0x110,
00045 
00046         // Types for iSCSI strings
00047         DHCP_VEND_ID                                    = 0x2101,
00048         ISCSI_INITIATOR_IPV4_ADDR               = 0x2102,
00049         ISCSI_INITIATOR_SUBNET                  = 0x2103,
00050         ISCSI_INITIATOR_IPV4_GATEWAY    = 0x2104,
00051         ISCSI_INITIATOR_IPV4_PRIM_DNS   = 0x2105,
00052         ISCSI_INITIATOR_IPV4_SECDNS             = 0x2106,
00053         ISCSI_INITIATOR_NAME                    = 0x2107,
00054         ISCSI_INITIATOR_CHAP_ID                 = 0x2108,
00055         ISCSI_INITIATOR_CHAP_PWD                = 0x2109,
00056         ISCSI_INITIATOR_DHCP_CONF_TYPE  = 0x210a,
00057 
00058         CONNECT_FIRST_TGT                               = 0x2200,
00059         FIRST_TGT_IP_ADDRESS                    = 0x2201,
00060         FIRST_TGT_TCP_PORT                              = 0x2202,
00061         FIRST_TGT_BOOT_LUN                              = 0x2203,
00062         FIRST_TGT_ISCSI_NAME                    = 0x2204,
00063         FIRST_TGT_CHAP_ID                               = 0x2205,
00064         FIRST_TGT_CHAP_PWD                              = 0x2207,
00065         NV_ROM_DEBUG_LEVEL                              = 0x2002,
00066         NV_ROM_CAP_TYPE                                 = 0x101,
00067 };
00068 
00069 union mlx_nvconfig_nic_boot_conf {
00070         struct {
00071                 mlx_uint32      vlan_id                         : 12;
00072                 mlx_uint32      link_speed                      : 4;
00073                 mlx_uint32      legacy_boot_prot        : 8;
00074                 mlx_uint32      boot_retry_count        : 3;
00075                 mlx_uint32      boot_strap_type         : 3;
00076                 mlx_uint32      en_vlan                         : 1;
00077                 mlx_uint32      en_option_rom           : 1;
00078         };
00079         mlx_uint32 dword;
00080 };
00081 
00082 union mlx_nvconfig_nic_boot_ext_conf {
00083         struct {
00084                 mlx_uint32      linkup_timeout  : 8;
00085                 mlx_uint32      ip_ver                  : 2;
00086                 mlx_uint32      reserved0               : 6;
00087                 mlx_uint32      undi_network_wait_to : 8;
00088                 mlx_uint32      reserved1               : 8;
00089         };
00090         mlx_uint32 dword;
00091 };
00092 
00093 union mlx_nvconfig_rom_banner_timeout_conf {
00094         struct {
00095                 mlx_uint32      rom_banner_to   : 4;
00096                 mlx_uint32      reserved                : 28;
00097         };
00098         mlx_uint32 dword;
00099 };
00100 
00101 union mlx_nvconfig_virt_conf {
00102         struct {
00103                 mlx_uint32 reserved0                            :24;
00104                 mlx_uint32 pf_bar_size_valid            :1;
00105                 mlx_uint32 vf_bar_size_valid            :1;
00106                 mlx_uint32 num_pf_msix_valid            :1;
00107                 mlx_uint32 num_vf_msix_valid            :1;
00108                 mlx_uint32 num_pfs_valid                        :1;
00109                 mlx_uint32 fpp_valid                            :1;
00110                 mlx_uint32 full_vf_qos_valid            :1;
00111                 mlx_uint32 sriov_valid                  :1;
00112                 /*-------------------*/
00113                 mlx_uint32 num_of_vfs                           :16;
00114                 mlx_uint32 num_of_pfs                           :4;
00115                 mlx_uint32 reserved1                            :9;
00116                 mlx_uint32 fpp_en                                       :1;
00117                 mlx_uint32 full_vf_qos                  :1;
00118                 mlx_uint32 virt_mode                            :1; //sriov_en
00119                 /*-------------------*/
00120                 mlx_uint32 log_pf_uar_bar_size  :6;
00121                 mlx_uint32 log_vf_uar_bar_size  :6;
00122                 mlx_uint32 num_pf_msix                  :10;
00123                 mlx_uint32 num_vf_msix                  :10;
00124         };
00125         mlx_uint32 dword[3];
00126 };
00127 
00128 union mlx_nvconfig_virt_caps {
00129         struct {
00130                 mlx_uint32 reserved0                            :24;
00131                 mlx_uint32 max_vfs_per_pf_valid :1;
00132                 mlx_uint32 max_total_msix_valid :1;
00133                 mlx_uint32 max_total_bar_valid  :1;
00134                 mlx_uint32 num_pfs_supported            :1;
00135                 mlx_uint32 num_vf_msix_supported        :1;
00136                 mlx_uint32 num_pf_msix_supported        :1;
00137                 mlx_uint32 vf_bar_size_supported        :1;
00138                 mlx_uint32 pf_bar_size_supported        :1;
00139                 /*-------------------*/
00140                 mlx_uint32 max_vfs_per_pf                       :16;
00141                 mlx_uint32 max_num_pfs                  :4;
00142                 mlx_uint32 reserved1                            :9;
00143                 mlx_uint32 fpp_support                  :1;
00144                 mlx_uint32 vf_qos_control_support       :1;
00145                 mlx_uint32 sriov_support                        :1;
00146                 /*-------------------*/
00147                 mlx_uint32 max_log_pf_uar_bar_size      :6;
00148                 mlx_uint32 max_log_vf_uar_bar_size      :6;
00149                 mlx_uint32 max_num_pf_msix                      :10;
00150                 mlx_uint32 max_num_vf_msix                      :10;
00151                 /*-------------------*/
00152                 mlx_uint32 max_total_msix;
00153                 /*-------------------*/
00154                 mlx_uint32 max_total_bar;
00155         };
00156         mlx_uint32 dword[5];
00157 };
00158 
00159 union mlx_nvconfig_iscsi_init_dhcp_conf {
00160         struct {
00161                 mlx_uint32 reserved0            :30;
00162                 mlx_uint32 dhcp_iscsi_en        :1;
00163                 mlx_uint32 ipv4_dhcp_en :1;
00164 
00165         };
00166         mlx_uint32 dword;
00167 };
00168 
00169 union mlx_nvconfig_nic_ib_boot_conf {
00170         struct {
00171                 mlx_uint32      boot_pkey                       : 16;
00172                 mlx_uint32      reserved0                       : 16;
00173         };
00174         mlx_uint32 dword;
00175 };
00176 
00177 union mlx_nvconfig_wol_conf {
00178         struct {
00179                 mlx_uint32      reserved0               :9;
00180                 mlx_uint32      en_wol_passwd   :1;
00181                 mlx_uint32      en_wol_magic    :1;
00182                 mlx_uint32      reserved1               :21;
00183                 mlx_uint32      reserved2               :32;
00184         };
00185         mlx_uint32 dword[2];
00186 };
00187 
00188 union mlx_nvconfig_iscsi_general {
00189         struct {
00190                 mlx_uint32      reserved0                       :22;
00191                 mlx_uint32      boot_to_target          :2;
00192                 mlx_uint32      reserved1                       :2;
00193                 mlx_uint32      vlan_en                         :1;
00194                 mlx_uint32      tcp_timestamps_en       :1;
00195                 mlx_uint32      chap_mutual_auth_en     :1;
00196                 mlx_uint32      chap_auth_en            :1;
00197                 mlx_uint32      reserved2                       :2;
00198                 /*-------------------*/
00199                 mlx_uint32      vlan                            :12;
00200                 mlx_uint32      reserved3                       :20;
00201                 /*-------------------*/
00202                 mlx_uint32      lun_busy_retry_count:8;
00203                 mlx_uint32      link_up_delay_time      :8;
00204                 mlx_uint32      drive_num                       :8;
00205                 mlx_uint32      reserved4                       :8;
00206         };
00207         mlx_uint32 dword[3];
00208 };
00209 
00210 union mlx_nvconfig_ib_dhcp_conf {
00211         struct {
00212                 mlx_uint32 reserved                     :24;
00213                 mlx_uint32 client_identifier    :4;
00214                 mlx_uint32 mac_admin_bit                :4;
00215         };
00216         mlx_uint32 dword;
00217 };
00218 
00219 union mlx_nvconfig_ocsd_ocbb_conf {
00220         struct {
00221                 mlx_uint32      reserved                :31;
00222                 mlx_uint32      ocsd_ocbb_en    :1;
00223         };
00224         mlx_uint32 dword;
00225 };
00226 
00227 union mlx_nvconfig_vpi_link_conf {
00228         struct {
00229                 mlx_uint32      network_link_type       :2;
00230                 mlx_uint32      default_link_type       :2;
00231                 mlx_uint32      reserved                :28;
00232         };
00233         mlx_uint32 dword;
00234 };
00235 
00236 struct  mlx_nvcofnig_romini {
00237         mlx_uint32 reserved0                    :1;
00238         mlx_uint32 shared_memory_en     :1;
00239         mlx_uint32 hii_vpi_en                   :1;
00240         mlx_uint32 tech_enum                    :1;
00241         mlx_uint32 reserved1                    :4;
00242         mlx_uint32 static_component_name_string :1;
00243         mlx_uint32 hii_iscsi_configuration      :1;
00244         mlx_uint32 hii_ibm_aim                  :1;
00245         mlx_uint32 hii_platform_setup   :1;
00246         mlx_uint32 hii_bdf_decimal      :1;
00247         mlx_uint32 hii_read_only        :1;
00248         mlx_uint32 reserved2                    :10;
00249         mlx_uint32 mac_enum             :1;
00250         mlx_uint32 port_enum                    :1;
00251         mlx_uint32 flash_en             :1;
00252         mlx_uint32 fmp_en               :1;
00253         mlx_uint32 bofm_en              :1;
00254         mlx_uint32 platform_to_driver_en:1;
00255         mlx_uint32 hii_en               :1;
00256         mlx_uint32 undi_en              :1;
00257         /* -------------- */
00258         mlx_uint64 dhcp_user_class;
00259         /* -------------- */
00260         mlx_uint32 reserved3                    :10;
00261         mlx_uint32 ucm_single_port              :1;
00262         mlx_uint32 tivoli_wa_en                 :1;
00263         mlx_uint32 dhcp_pxe_discovery_control_dis       :1;
00264         mlx_uint32 hii_flexaddr_override:1;
00265         mlx_uint32 hii_flexaddr_setting :1;
00266         mlx_uint32 guided_ops                   :1;
00267         mlx_uint32 hii_type                             :4;
00268         mlx_uint32 hii_mriname2                 :1;
00269         mlx_uint32 hii_aim_ucm_ver2             :1;
00270         mlx_uint32 uri_boot_retry_delay :4;
00271         mlx_uint32 uri_boot_retry       :4;
00272         mlx_uint32 option_rom_debug     :1;
00273         mlx_uint32 promiscuous_vlan     :1;
00274 
00275 } __attribute__ ((packed));
00276 
00277 union mlx_nvconfig_debug_conf {
00278         struct {
00279         mlx_uint32      dbg_log_en                              :1;
00280         mlx_uint32      reserved1                               :31;
00281                 /***************************************************/
00282         mlx_uint32      stp_dbg_lvl                             :2;
00283         mlx_uint32      romprefix_dbg_lvl               :2;
00284         mlx_uint32      dhcp_dbg_lvl                    :2;
00285         mlx_uint32      dhcpv6_dbg_lvl                  :2;
00286         mlx_uint32      arp_dbg_lvl                             :2;
00287         mlx_uint32      neighbor_dbg_lvl                :2;
00288         mlx_uint32      ndp_dbg_lvl                             :2;
00289         mlx_uint32      uri_dbg_lvl                             :2;
00290         mlx_uint32      driver_dbg_lvl                  :2;
00291         mlx_uint32      nodnic_dbg_lvl                  :2;
00292         mlx_uint32      nodnic_cmd_dbg_lvl              :2;
00293         mlx_uint32      nodnic_device_dbg_lvl   :2;
00294         mlx_uint32      nodnic_port_dbg_lvl             :2;
00295         mlx_uint32      netdevice_dbg_lvl               :2;
00296         mlx_uint32      tftp_dbg_lvl                    :2;
00297         mlx_uint32      udp_dbg_lvl                             :2;
00298                 /***************************************************/
00299         mlx_uint32      tcp_dbg_lvl                             :2;
00300         mlx_uint32      tcpip_dbg_lvl                   :2;
00301         mlx_uint32      ipv4_dbg_lvl                    :2;
00302         mlx_uint32      ipv6_dbg_lvl                    :2;
00303         mlx_uint32      drv_set_dbg_lvl                 :2;
00304         mlx_uint32      stat_update_dbg_lvl             :2;
00305         mlx_uint32      pxe_undi_dbg_lvl                :2;
00306         mlx_uint32      reserved2                               :18;
00307         };
00308         mlx_uint32 dword[3];
00309 };
00310 
00311 union mlx_nvconfig_flexboot_debug {
00312         struct {
00313         mlx_uint32      reserved0                               :29;
00314         mlx_uint32      panic_behavior                          :2;
00315         mlx_uint32      boot_to_shell                           :1;
00316         };
00317         mlx_uint32 dword;
00318 };
00319 
00320 union mlx_nvconfig_rom_cap_conf {
00321         struct {
00322                 mlx_uint32      reserved0                       :28;
00323                 mlx_uint32      uefi_logs_en            :1;
00324                 mlx_uint32      flexboot_debug_en       :1;
00325                 mlx_uint32      boot_debug_log_en       :1;
00326                 mlx_uint32      boot_ip_ver_en          :1;
00327         };
00328         mlx_uint32 dword;
00329 };
00330 
00331 #endif /* MLX_NVCONFIG_PRM_H_ */