iPXE
mlx_device.h
Go to the documentation of this file.
00001 #ifndef NODNIC_DEVICE_H_
00002 #define NODNIC_DEVICE_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 "mlx_nodnic_data_structures.h"
00026 
00027 #define NODIC_SUPPORTED_REVISION 1
00028 //Initialization segment
00029 #define NODNIC_CMDQ_PHY_ADDR_HIGH_OFFSET 0x10
00030 #define NODNIC_CMDQ_PHY_ADDR_LOW_OFFSET 0x14
00031 #define NODNIC_NIC_INTERFACE_OFFSET 0x14
00032 #define NODNIC_INITIALIZING_OFFSET 0x1fc
00033 #define NODNIC_NIC_INTERFACE_SUPPORTED_OFFSET 0x1fc
00034 #define NODNIC_LOCATION_OFFSET 0x240
00035 
00036 #define NODNIC_CMDQ_PHY_ADDR_LOW_MASK 0xFFFFE000
00037 #define NODNIC_NIC_INTERFACE_SUPPORTED_MASK 0x4000000
00038 
00039 #define NODNIC_NIC_INTERFACE_BIT 9
00040 #define NODNIC_DISABLE_INTERFACE_BIT 8
00041 #define NODNIC_NIC_INTERFACE_SUPPORTED_BIT 26
00042 #define NODNIC_INITIALIZING_BIT 31
00043 
00044 #define NODNIC_NIC_DISABLE_INT_OFFSET   0x100c
00045 
00046 //nodnic segment
00047 #define NODNIC_REVISION_OFFSET 0x0
00048 #define NODNIC_HARDWARE_FORMAT_OFFSET 0x0
00049 
00050 
00051 
00052 mlx_status
00053 nodnic_device_init(
00054                                 IN nodnic_device_priv *device_priv
00055                                 );
00056 
00057 mlx_status
00058 nodnic_device_teardown(
00059                                 IN nodnic_device_priv *device_priv
00060                                 );
00061 
00062 
00063 mlx_status
00064 nodnic_device_get_cap(
00065                                 IN nodnic_device_priv *device_priv
00066                                 );
00067 
00068 mlx_status
00069 nodnic_device_clear_int (
00070                                 IN nodnic_device_priv *device_priv
00071                                 );
00072 
00073 mlx_status
00074 nodnic_device_get_fw_version(
00075                                 IN nodnic_device_priv *device_priv,
00076                                 OUT mlx_uint16          *fw_ver_minor,
00077                                 OUT mlx_uint16          *fw_ver_sub_minor,
00078                                 OUT mlx_uint16          *fw_ver_major
00079                                 );
00080 #endif /* STUB_NODNIC_DEVICE_H_ */