iPXE
mlx_icmd.h
Go to the documentation of this file.
00001 #ifndef MLXUTILS_INCLUDE_PUBLIC_MLX_ICMD_H_
00002 #define MLXUTILS_INCLUDE_PUBLIC_MLX_ICMD_H_
00003 /*
00004  * Copyright (C) 2015 Mellanox Technologies Ltd.
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License as
00008  * published by the Free Software Foundation; either version 2 of the
00009  * License, or any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful, but
00012  * WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019  * 02110-1301, USA.
00020  */
00021 
00022 
00023 FILE_LICENCE ( GPL2_OR_LATER );
00024 
00025 #include "mlx_utils.h"
00026 
00027 #define MLX_ICMD_MB_ADDR 0x100000
00028 #define MLX_ICMD_MB_SIZE_ADDR 0x1000
00029 #define MLX_ICMD_CTRL_ADDR 0x0
00030 
00031 #define MLX_ICMD_SEMAPHORE_ADDR 0x0
00032 
00033 #define MLX_ICMD_SEMAPHORE_ID 1234
00034 
00035 enum {
00036         FLASH_REG_ACCESS        = 0x9001,
00037         GET_FW_INFO                     = 0x8007,
00038         QUERY_VIRTUAL_MAC       = 0x9003,
00039         SET_VIRTUAL_MAC         = 0x9004,
00040         QUERY_WOL_ROL           = 0x9005,
00041         SET_WOL_ROL                     = 0x9006,
00042         OCBB_INIT                       = 0x9007,
00043         OCBB_QUERY_HEADER_STATUS        = 0x9008,
00044         OCBB_QUERY_ETOC_STATUS  = 0x9009,
00045         OCBB_QUERY_SET_EVENT    = 0x900A,
00046         OCSD_INIT                       = 0xf004,
00047 };
00048 
00049 struct mlx_icmd_ocsd {
00050         mlx_uint32 reserved;
00051         mlx_uint64 address;
00052 };
00053 
00054 mlx_status
00055 mlx_icmd_send_command(
00056                                 IN mlx_utils *utils,
00057                                 IN  mlx_uint16 opcode,
00058                                 IN OUT mlx_void* data,
00059                                 IN mlx_uint32 write_data_size,
00060                                 IN mlx_uint32 read_data_size
00061                                 );
00062 
00063 #endif /* MLXUTILS_INCLUDE_PUBLIC_MLX_ICMD_H_ */