iPXE
|
#include "../../include/public/mlx_bail.h"
#include "../../include/public/mlx_icmd.h"
#include "../../include/public/mlx_pci_gw.h"
#include "../../include/public/mlx_utils.h"
Go to the source code of this file.
Macros | |
#define | ICMD_GET_SEMAPHORE_TRIES 2560 |
#define | MLX_ICMD_OPCODE_ALIGN 16 |
#define | MLX_ICMD_OPCODE_MASK 0xffff |
#define | MLX_ICMD_BUSY_ALIGN 0 |
#define | MLX_ICMD_BUSY_MASK 0x1 |
#define | MLX_ICMD_BUSY_MAX_ITERATIONS 1024 |
#define | MLX_ICMD_STATUS_ALIGN 8 |
#define | MLX_ICMD_STATUS_MASK 0xff |
Functions | |
FILE_LICENCE (GPL2_OR_LATER) | |
static mlx_status | mlx_icmd_get_semaphore (IN mlx_utils *utils) |
static mlx_status | mlx_icmd_clear_semaphore (IN mlx_utils *utils) |
static mlx_status | mlx_icmd_init (IN mlx_utils *utils) |
static mlx_status | mlx_icmd_set_opcode (IN mlx_utils *utils, IN mlx_uint16 opcode) |
static mlx_status | mlx_icmd_go (IN mlx_utils *utils) |
static mlx_status | mlx_icmd_get_status (IN mlx_utils *utils, OUT mlx_uint32 *out_status) |
static mlx_status | mlx_icmd_write_buffer (IN mlx_utils *utils, IN mlx_void *data, IN mlx_uint32 data_size) |
static mlx_status | mlx_icmd_read_buffer (IN mlx_utils *utils, OUT mlx_void *data, IN mlx_uint32 data_size) |
mlx_status | mlx_icmd_send_command (IN mlx_utils *utils, IN mlx_uint16 opcode, IN OUT mlx_void *data, IN mlx_uint32 write_data_size, IN mlx_uint32 read_data_size) |
#define ICMD_GET_SEMAPHORE_TRIES 2560 |
#define MLX_ICMD_OPCODE_ALIGN 16 |
#define MLX_ICMD_OPCODE_MASK 0xffff |
#define MLX_ICMD_BUSY_ALIGN 0 |
#define MLX_ICMD_BUSY_MASK 0x1 |
#define MLX_ICMD_BUSY_MAX_ITERATIONS 1024 |
#define MLX_ICMD_STATUS_ALIGN 8 |
#define MLX_ICMD_STATUS_MASK 0xff |
FILE_LICENCE | ( | GPL2_OR_LATER | ) |
|
static |
Definition at line 30 of file mlx_icmd.c.
References buffer, ICMD_GET_SEMAPHORE_TRIES, MLX_CHECK_STATUS, MLX_FAILED, MLX_ICMD_SEMAPHORE_ADDR, MLX_INVALID_PARAMETER, mlx_pci_gw_read(), mlx_pci_gw_write(), MLX_SUCCESS, mlx_utils_delay_in_ms(), mlx_utils_rand(), NULL, PCI_GW_SPACE_SEMAPHORE, status, and TRUE.
Referenced by mlx_icmd_send_command().
|
static |
Definition at line 78 of file mlx_icmd.c.
References FALSE, MLX_CHECK_STATUS, MLX_ICMD_SEMAPHORE_ADDR, MLX_INVALID_PARAMETER, mlx_pci_gw_write(), MLX_SUCCESS, NULL, PCI_GW_SPACE_SEMAPHORE, and status.
Referenced by mlx_icmd_send_command().
|
static |
Definition at line 105 of file mlx_icmd.c.
References FALSE, MLX_CHECK_STATUS, MLX_ICMD_MB_SIZE_ADDR, MLX_INVALID_PARAMETER, mlx_pci_gw_read(), MLX_SUCCESS, NULL, PCI_GW_SPACE_ALL_ICMD, status, and TRUE.
Referenced by mlx_icmd_send_command().
|
static |
Definition at line 134 of file mlx_icmd.c.
References buffer, MLX_CHECK_STATUS, MLX_ICMD_CTRL_ADDR, MLX_ICMD_OPCODE_ALIGN, MLX_ICMD_OPCODE_MASK, MLX_INVALID_PARAMETER, mlx_pci_gw_read(), mlx_pci_gw_write(), MLX_SUCCESS, NULL, opcode, PCI_GW_SPACE_ALL_ICMD, and status.
Referenced by mlx_icmd_send_command().
|
static |
Definition at line 168 of file mlx_icmd.c.
References buffer, MLX_CHECK_STATUS, MLX_DEBUG_ERROR, MLX_FAILED, MLX_ICMD_BUSY_ALIGN, MLX_ICMD_BUSY_MASK, MLX_ICMD_BUSY_MAX_ITERATIONS, MLX_ICMD_CTRL_ADDR, MLX_INVALID_PARAMETER, mlx_pci_gw_read(), mlx_pci_gw_write(), MLX_SUCCESS, mlx_utils_delay_in_ms(), NULL, PCI_GW_SPACE_ALL_ICMD, and status.
Referenced by mlx_icmd_send_command().
|
static |
Definition at line 226 of file mlx_icmd.c.
References buffer, MLX_CHECK_STATUS, MLX_ICMD_CTRL_ADDR, MLX_ICMD_STATUS_ALIGN, MLX_ICMD_STATUS_MASK, MLX_INVALID_PARAMETER, mlx_pci_gw_read(), MLX_SUCCESS, NULL, PCI_GW_SPACE_ALL_ICMD, and status.
Referenced by mlx_icmd_send_command().
|
static |
Definition at line 255 of file mlx_icmd.c.
References data, MLX_CHECK_STATUS, MLX_ICMD_MB_ADDR, MLX_INVALID_PARAMETER, mlx_pci_gw_write(), MLX_SUCCESS, NULL, PCI_GW_SPACE_ALL_ICMD, and status.
Referenced by mlx_icmd_send_command().
|
static |
Definition at line 284 of file mlx_icmd.c.
References data, MLX_CHECK_STATUS, MLX_ICMD_MB_ADDR, MLX_INVALID_PARAMETER, mlx_pci_gw_read(), MLX_SUCCESS, NULL, PCI_GW_SPACE_ALL_ICMD, and status.
Referenced by mlx_icmd_send_command().
mlx_status mlx_icmd_send_command | ( | IN mlx_utils * | utils, |
IN mlx_uint16 | opcode, | ||
IN OUT mlx_void * | data, | ||
IN mlx_uint32 | write_data_size, | ||
IN mlx_uint32 | read_data_size | ||
) |
Definition at line 310 of file mlx_icmd.c.
References data, MLX_CHECK_STATUS, MLX_DEBUG_ERROR, MLX_FAILED, mlx_icmd_clear_semaphore(), mlx_icmd_get_semaphore(), mlx_icmd_get_status(), mlx_icmd_go(), mlx_icmd_init(), mlx_icmd_read_buffer(), mlx_icmd_set_opcode(), mlx_icmd_write_buffer(), MLX_INVALID_PARAMETER, MLX_SUCCESS, NULL, opcode, and status.
Referenced by mlx_reg_access(), mlx_vmac_query_virt_mac(), and mlx_vmac_set_virt_mac().