[golan] Update Connect-IB, ConnectX-4 and ConnectX-4 Lx (Infiniband) support
Updates: - Nodnic: Support for arm cq doorbell via the UAR BAR - Ensure hardware is quiescent when no interface is open - WinPE WA - Support for clear interrupt via BAR - Nodnic: Support for send TX doorbells via the UAR BAR - Added ConnectX-5EX device - Added ConnectX-5 device Signed-off-by: Raed Salem <raeds@mellanox.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
committed by
Michael Brown
parent
5cf5ffea28
commit
26050fd4c8
@@ -124,6 +124,11 @@ struct mlx_link_speed {
|
||||
/* -------------- */
|
||||
mlx_uint32 ib_proto_oper :16;
|
||||
mlx_uint32 ib_link_width_oper :16;
|
||||
/* -------------- */
|
||||
mlx_uint32 reserved7 :32;
|
||||
/* -------------- */
|
||||
mlx_uint32 eth_proto_lp_advertise :32;
|
||||
mlx_uint32 reserved[3];
|
||||
};
|
||||
|
||||
mlx_status
|
||||
|
||||
@@ -42,6 +42,7 @@ struct nvconfig_tlv_mapping nvconfig_tlv_mapping[] = {
|
||||
TlvMappingEntry(0x2020, 0x2020, NVRAM_TLV_CLASS_PHYSICAL_PORT, FALSE),
|
||||
TlvMappingEntry(0x2021, 0x221, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x2023, 0x223, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x2006, 0x206, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x2100, 0x230, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x2101, 0x231, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x2102, 0x232, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
@@ -53,6 +54,7 @@ struct nvconfig_tlv_mapping nvconfig_tlv_mapping[] = {
|
||||
TlvMappingEntry(0x2108, 0x238, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x2109, 0x239, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x210A, 0x23A, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x2022, 0x222, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x2200, 0x240, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x2201, 0x241, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x2202, 0x242, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
@@ -60,6 +62,11 @@ struct nvconfig_tlv_mapping nvconfig_tlv_mapping[] = {
|
||||
TlvMappingEntry(0x2204, 0x244, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x2205, 0x245, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x2207, 0x247, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x2002, 0x202, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x2004, 0x204, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x110, 0x110, NVRAM_TLV_CLASS_HOST, FALSE),
|
||||
TlvMappingEntry(0x192, 0x192, NVRAM_TLV_CLASS_GLOBAL, FALSE),
|
||||
TlvMappingEntry(0x101, 0x101, NVRAM_TLV_CLASS_GLOBAL, TRUE),
|
||||
TlvMappingEntry(0, 0, 0, 0),
|
||||
};
|
||||
|
||||
|
||||
@@ -107,6 +107,22 @@ struct nvconfig_nvda {
|
||||
mlx_uint8 data[NVCONFIG_MAX_TLV_SIZE];
|
||||
};
|
||||
|
||||
struct nv_conf_cap {
|
||||
/** WOL En/Dis **/
|
||||
mlx_uint8 wol_en;
|
||||
/** VPI En/Dis **/
|
||||
mlx_uint8 vpi_en;
|
||||
};
|
||||
|
||||
struct mlx_nvconfig_virt_net_addr {
|
||||
mlx_uint32 reserved1 :29;
|
||||
mlx_uint32 erase_on_powerup:1;
|
||||
mlx_uint32 reserverd2 :1;
|
||||
mlx_uint32 virtual_mac_en :1;
|
||||
mlx_uint32 virtual_mac_high;
|
||||
mlx_uint32 virtual_mac_low;
|
||||
};
|
||||
|
||||
|
||||
mlx_status
|
||||
nvconfig_query_capability(
|
||||
|
||||
@@ -86,13 +86,13 @@ nvconfig_get_boot_ext_default_conf(
|
||||
"TLV not found. Using hard-coded defaults ");
|
||||
port_conf_def->linkup_timeout = nic_boot_ext_conf->linkup_timeout;
|
||||
port_conf_def->ip_ver = nic_boot_ext_conf->ip_ver;
|
||||
|
||||
port_conf_def->undi_network_wait_to = nic_boot_ext_conf->undi_network_wait_to;
|
||||
return MLX_SUCCESS;
|
||||
|
||||
nvdata_access_err:
|
||||
port_conf_def->linkup_timeout = DEFAULT_BOOT_LINK_UP_TO;
|
||||
port_conf_def->ip_ver = DEFAULT_BOOT_IP_VER;
|
||||
|
||||
port_conf_def->undi_network_wait_to = DEFAULT_BOOT_UNDI_NETWORK_WAIT_TO;
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -185,8 +185,12 @@ nvconfig_get_iscsi_gen_default_conf(
|
||||
port_conf_def->iscsi_chap_auth_en = iscsi_gen->chap_auth_en;
|
||||
port_conf_def->iscsi_lun_busy_retry_count = iscsi_gen->lun_busy_retry_count;
|
||||
port_conf_def->iscsi_link_up_delay_time = iscsi_gen->link_up_delay_time;
|
||||
port_conf_def->iscsi_drive_num = iscsi_gen->drive_num;
|
||||
|
||||
return MLX_SUCCESS;
|
||||
|
||||
nvdata_access_err:
|
||||
port_conf_def->iscsi_drive_num = DEFAULT_ISCSI_DRIVE_NUM;
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -327,6 +331,27 @@ nvdata_access_err:
|
||||
return status;
|
||||
}
|
||||
|
||||
static
|
||||
mlx_status
|
||||
nvconfig_get_rom_cap_default_conf( IN void *data,
|
||||
IN int status, OUT void *def_struct) {
|
||||
union mlx_nvconfig_rom_cap_conf *rom_cap_conf =
|
||||
(union mlx_nvconfig_rom_cap_conf *) data;
|
||||
struct mlx_nvconfig_conf_defaults *conf_def =
|
||||
(struct mlx_nvconfig_conf_defaults *) def_struct;
|
||||
|
||||
MLX_CHECK_STATUS(NULL, status, nvdata_access_err,
|
||||
"TLV not found. Using hard-coded defaults ");
|
||||
conf_def->boot_ip_ver_en = rom_cap_conf->boot_ip_ver_en;
|
||||
|
||||
return MLX_SUCCESS;
|
||||
|
||||
nvdata_access_err:
|
||||
rom_cap_conf->boot_ip_ver_en = DEFAULT_BOOT_IP_VERSION_EN;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static struct tlv_default tlv_port_defaults[] = {
|
||||
TlvDefaultEntry(BOOT_SETTINGS_TYPE, union mlx_nvconfig_nic_boot_conf, &nvconfig_get_boot_default_conf),
|
||||
TlvDefaultEntry(BOOT_SETTINGS_EXT_TYPE, union mlx_nvconfig_nic_boot_ext_conf, &nvconfig_get_boot_ext_default_conf),
|
||||
@@ -343,6 +368,7 @@ static struct tlv_default tlv_general_defaults[] = {
|
||||
TlvDefaultEntry(GLOPAL_PCI_CAPS_TYPE, union mlx_nvconfig_virt_caps, &nvconfig_get_nv_virt_caps_default_conf),
|
||||
TlvDefaultEntry(GLOPAL_PCI_SETTINGS_TYPE, union mlx_nvconfig_virt_conf, &nvconfig_get_nv_virt_default_conf),
|
||||
TlvDefaultEntry(OCSD_OCBB_TYPE, union mlx_nvconfig_ocsd_ocbb_conf, &nvconfig_get_ocsd_ocbb_default_conf),
|
||||
TlvDefaultEntry(NV_ROM_CAP_TYPE, union mlx_nvconfig_rom_cap_conf, &nvconfig_get_rom_cap_default_conf),
|
||||
};
|
||||
|
||||
static
|
||||
|
||||
@@ -32,9 +32,12 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
#define DEFAULT_BOOT_VLAN 1
|
||||
#define DEFAULT_ISCSI_DHCP_PARAM_EN 1
|
||||
#define DEFAULT_ISCSI_IPV4_DHCP_EN 1
|
||||
#define DEFAULT_ISCSI_DRIVE_NUM 0x80
|
||||
#define DEFAULT_OCSD_OCBB_EN 1
|
||||
#define DEFAULT_BOOT_IP_VER 0
|
||||
#define DEFAULT_BOOT_LINK_UP_TO 0
|
||||
#define DEFAULT_BOOT_UNDI_NETWORK_WAIT_TO 30
|
||||
#define DEFAULT_BOOT_IP_VERSION_EN 1
|
||||
|
||||
struct mlx_nvconfig_port_conf_defaults {
|
||||
mlx_uint8 pptx;
|
||||
@@ -56,11 +59,13 @@ struct mlx_nvconfig_port_conf_defaults {
|
||||
mlx_boolean iscsi_ipv4_dhcp_en;
|
||||
mlx_uint8 iscsi_lun_busy_retry_count;
|
||||
mlx_uint8 iscsi_link_up_delay_time;
|
||||
mlx_uint8 iscsi_drive_num;
|
||||
mlx_uint8 client_identifier;
|
||||
mlx_uint8 mac_admin_bit;
|
||||
mlx_uint8 default_link_type;
|
||||
mlx_uint8 linkup_timeout;
|
||||
mlx_uint8 ip_ver;
|
||||
mlx_uint8 undi_network_wait_to;
|
||||
};
|
||||
|
||||
struct mlx_nvconfig_conf_defaults {
|
||||
@@ -71,6 +76,7 @@ struct mlx_nvconfig_conf_defaults {
|
||||
mlx_uint8 uar_bar_size;
|
||||
mlx_uint8 flexboot_menu_to;
|
||||
mlx_boolean ocsd_ocbb_en;
|
||||
mlx_boolean boot_ip_ver_en;
|
||||
};
|
||||
|
||||
mlx_status
|
||||
|
||||
@@ -33,12 +33,15 @@ enum {
|
||||
OCSD_OCBB_TYPE = 0x2011,
|
||||
FLOW_CONTROL_TYPE = 0x2020,
|
||||
BOOT_SETTINGS_TYPE = 0x2021,
|
||||
NV_ROM_FLEXBOOT_DEBUG = 0x2004,
|
||||
|
||||
ISCSI_GENERAL_SETTINGS_TYPE = 0x2100,
|
||||
IB_BOOT_SETTING_TYPE = 0x2022,
|
||||
IB_DHCP_SETTINGS_TYPE = 0x2023,
|
||||
GLOPAL_PCI_SETTINGS_TYPE = 0x80,
|
||||
GLOPAL_PCI_CAPS_TYPE = 0x81,
|
||||
GLOBAL_ROM_INI_TYPE = 0x100,
|
||||
NV_VIRT_NET_ADDR = 0x110,
|
||||
|
||||
// Types for iSCSI strings
|
||||
DHCP_VEND_ID = 0x2101,
|
||||
@@ -59,6 +62,8 @@ enum {
|
||||
FIRST_TGT_ISCSI_NAME = 0x2204,
|
||||
FIRST_TGT_CHAP_ID = 0x2205,
|
||||
FIRST_TGT_CHAP_PWD = 0x2207,
|
||||
NV_ROM_DEBUG_LEVEL = 0x2002,
|
||||
NV_ROM_CAP_TYPE = 0x101,
|
||||
};
|
||||
|
||||
union mlx_nvconfig_nic_boot_conf {
|
||||
@@ -78,7 +83,9 @@ union mlx_nvconfig_nic_boot_ext_conf {
|
||||
struct {
|
||||
mlx_uint32 linkup_timeout : 8;
|
||||
mlx_uint32 ip_ver : 2;
|
||||
mlx_uint32 reserved0 : 22;
|
||||
mlx_uint32 reserved0 : 6;
|
||||
mlx_uint32 undi_network_wait_to : 8;
|
||||
mlx_uint32 reserved1 : 8;
|
||||
};
|
||||
mlx_uint32 dword;
|
||||
};
|
||||
@@ -194,7 +201,8 @@ union mlx_nvconfig_iscsi_general {
|
||||
/*-------------------*/
|
||||
mlx_uint32 lun_busy_retry_count:8;
|
||||
mlx_uint32 link_up_delay_time :8;
|
||||
mlx_uint32 reserved4 :16;
|
||||
mlx_uint32 drive_num :8;
|
||||
mlx_uint32 reserved4 :8;
|
||||
};
|
||||
mlx_uint32 dword[3];
|
||||
};
|
||||
@@ -226,34 +234,98 @@ union mlx_nvconfig_vpi_link_conf {
|
||||
};
|
||||
|
||||
struct mlx_nvcofnig_romini {
|
||||
mlx_uint32 reserved0 :1;
|
||||
mlx_uint32 reserved0 :1;
|
||||
mlx_uint32 shared_memory_en :1;
|
||||
mlx_uint32 hii_vpi_en :1;
|
||||
mlx_uint32 tech_enum :1;
|
||||
mlx_uint32 reserved1 :4;
|
||||
mlx_uint32 hii_vpi_en :1;
|
||||
mlx_uint32 tech_enum :1;
|
||||
mlx_uint32 reserved1 :4;
|
||||
mlx_uint32 static_component_name_string :1;
|
||||
mlx_uint32 hii_iscsi_configuration :1;
|
||||
mlx_uint32 hii_ibm_aim :1;
|
||||
mlx_uint32 hii_ibm_aim :1;
|
||||
mlx_uint32 hii_platform_setup :1;
|
||||
mlx_uint32 hii_bdf_decimal :1;
|
||||
mlx_uint32 hii_read_only :1;
|
||||
mlx_uint32 reserved2 :10;
|
||||
mlx_uint32 reserved2 :10;
|
||||
mlx_uint32 mac_enum :1;
|
||||
mlx_uint32 port_enum :1;
|
||||
mlx_uint32 port_enum :1;
|
||||
mlx_uint32 flash_en :1;
|
||||
mlx_uint32 fmp_en :1;
|
||||
mlx_uint32 bofm_en :1;
|
||||
mlx_uint32 platform_to_driver_en :1;
|
||||
mlx_uint32 platform_to_driver_en:1;
|
||||
mlx_uint32 hii_en :1;
|
||||
mlx_uint32 undi_en :1;
|
||||
/* -------------- */
|
||||
mlx_uint64 dhcp_user_class;
|
||||
/* -------------- */
|
||||
mlx_uint32 reserved3 :22;
|
||||
mlx_uint32 reserved3 :10;
|
||||
mlx_uint32 ucm_single_port :1;
|
||||
mlx_uint32 tivoli_wa_en :1;
|
||||
mlx_uint32 dhcp_pxe_discovery_control_dis :1;
|
||||
mlx_uint32 hii_flexaddr_override:1;
|
||||
mlx_uint32 hii_flexaddr_setting :1;
|
||||
mlx_uint32 guided_ops :1;
|
||||
mlx_uint32 hii_type :4;
|
||||
mlx_uint32 hii_mriname2 :1;
|
||||
mlx_uint32 hii_aim_ucm_ver2 :1;
|
||||
mlx_uint32 uri_boot_retry_delay :4;
|
||||
mlx_uint32 uri_boot_retry :4;
|
||||
mlx_uint32 option_rom_debug :1;
|
||||
mlx_uint32 promiscuous_vlan :1;
|
||||
|
||||
} __attribute__ ((packed));
|
||||
|
||||
union mlx_nvconfig_debug_conf {
|
||||
struct {
|
||||
mlx_uint32 dbg_log_en :1;
|
||||
mlx_uint32 reserved1 :31;
|
||||
/***************************************************/
|
||||
mlx_uint32 stp_dbg_lvl :2;
|
||||
mlx_uint32 romprefix_dbg_lvl :2;
|
||||
mlx_uint32 dhcp_dbg_lvl :2;
|
||||
mlx_uint32 dhcpv6_dbg_lvl :2;
|
||||
mlx_uint32 arp_dbg_lvl :2;
|
||||
mlx_uint32 neighbor_dbg_lvl :2;
|
||||
mlx_uint32 ndp_dbg_lvl :2;
|
||||
mlx_uint32 uri_dbg_lvl :2;
|
||||
mlx_uint32 driver_dbg_lvl :2;
|
||||
mlx_uint32 nodnic_dbg_lvl :2;
|
||||
mlx_uint32 nodnic_cmd_dbg_lvl :2;
|
||||
mlx_uint32 nodnic_device_dbg_lvl :2;
|
||||
mlx_uint32 nodnic_port_dbg_lvl :2;
|
||||
mlx_uint32 netdevice_dbg_lvl :2;
|
||||
mlx_uint32 tftp_dbg_lvl :2;
|
||||
mlx_uint32 udp_dbg_lvl :2;
|
||||
/***************************************************/
|
||||
mlx_uint32 tcp_dbg_lvl :2;
|
||||
mlx_uint32 tcpip_dbg_lvl :2;
|
||||
mlx_uint32 ipv4_dbg_lvl :2;
|
||||
mlx_uint32 ipv6_dbg_lvl :2;
|
||||
mlx_uint32 drv_set_dbg_lvl :2;
|
||||
mlx_uint32 stat_update_dbg_lvl :2;
|
||||
mlx_uint32 pxe_undi_dbg_lvl :2;
|
||||
mlx_uint32 reserved2 :18;
|
||||
};
|
||||
mlx_uint32 dword[3];
|
||||
};
|
||||
|
||||
union mlx_nvconfig_flexboot_debug {
|
||||
struct {
|
||||
mlx_uint32 reserved0 :29;
|
||||
mlx_uint32 panic_behavior :2;
|
||||
mlx_uint32 boot_to_shell :1;
|
||||
};
|
||||
mlx_uint32 dword;
|
||||
};
|
||||
|
||||
union mlx_nvconfig_rom_cap_conf {
|
||||
struct {
|
||||
mlx_uint32 reserved0 :28;
|
||||
mlx_uint32 uefi_logs_en :1;
|
||||
mlx_uint32 flexboot_debug_en :1;
|
||||
mlx_uint32 boot_debug_log_en :1;
|
||||
mlx_uint32 boot_ip_ver_en :1;
|
||||
};
|
||||
mlx_uint32 dword;
|
||||
};
|
||||
|
||||
#endif /* MLX_NVCONFIG_PRM_H_ */
|
||||
|
||||
Reference in New Issue
Block a user