[golan] Add Connect-IB, ConnectX-4 and ConnectX-4 Lx (Infiniband) support
[ipxe.git] / src / drivers / infiniband / mlx_utils / include / public / mlx_icmd.h
1 #ifndef MLXUTILS_INCLUDE_PUBLIC_MLX_ICMD_H_
2 #define MLXUTILS_INCLUDE_PUBLIC_MLX_ICMD_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
22
23 FILE_LICENCE ( GPL2_OR_LATER );
24
25 #include "mlx_utils.h"
26
27 #define MLX_ICMD_MB_ADDR 0x100000
28 #define MLX_ICMD_MB_SIZE_ADDR 0x1000
29 #define MLX_ICMD_CTRL_ADDR 0x0
30
31 #define MLX_ICMD_SEMAPHORE_ADDR 0x0
32
33 #define MLX_ICMD_SEMAPHORE_ID 1234
34
35 enum {
36 FLASH_REG_ACCESS = 0x9001,
37 GET_FW_INFO = 0x8007,
38 QUERY_VIRTUAL_MAC = 0x9003,
39 SET_VIRTUAL_MAC = 0x9004,
40 QUERY_WOL_ROL = 0x9005,
41 SET_WOL_ROL = 0x9006,
42 OCBB_INIT = 0x9007,
43 OCBB_QUERY_HEADER_STATUS = 0x9008,
44 OCBB_QUERY_ETOC_STATUS = 0x9009,
45 OCBB_QUERY_SET_EVENT = 0x900A,
46 OCSD_INIT = 0xf004,
47 };
48
49 struct mlx_icmd_ocsd {
50 mlx_uint32 reserved;
51 mlx_uint64 address;
52 };
53
54 mlx_status
55 mlx_icmd_send_command(
56 IN mlx_utils *utils,
57 IN mlx_uint16 opcode,
58 IN OUT mlx_void* data,
59 IN mlx_uint32 write_data_size,
60 IN mlx_uint32 read_data_size
61 );
62
63 #endif /* MLXUTILS_INCLUDE_PUBLIC_MLX_ICMD_H_ */