iPXE
mlx_reg_access.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 Mellanox Technologies Ltd.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301, USA.
18 */
19
20FILE_LICENCE ( GPL2_OR_LATER );
21
22#ifndef MLX_REG_ACCESS_H_
23#define MLX_REG_ACCESS_H_
24
26
27#define REG_ACCESS_MAX_REG_SIZE 236
28
33
34#define REG_ID_NVDA 0x9024
35#define REG_ID_NVDI 0x9025
36#define REG_ID_NVIA 0x9029
37#define REG_ID_MLCR 0x902b
38#define REG_ID_NVQC 0x9030
39#define REG_ID_MFRL 0x9028
40#define REG_ID_PTYS 0x5004
41#define REG_ID_PMTU 0x5003
42
44 mlx_uint32 reserved0 :8; /* bit_offset:0 */ /* element_size: 8 */
45 mlx_uint32 status :7; /* bit_offset:8 */ /* element_size: 7 */
46 mlx_uint32 dr :1; /* bit_offset:15 */ /* element_size: 1 */
47 mlx_uint32 len :11; /* bit_offset:16 */ /* element_size: 11 */
48 mlx_uint32 Type :5; /* bit_offset:27 */ /* element_size: 5 */
49 mlx_uint32 cls :8; /* bit_offset:32 */ /* element_size: 8 */
50 mlx_uint32 method :7; /* bit_offset:40 */ /* element_size: 7 */
51 mlx_uint32 r :1; /* bit_offset:47 */ /* element_size: 1 */
52 mlx_uint32 register_id :16; /* bit_offset:48 */ /* element_size: 16 */
53 mlx_uint64 tid ; /* bit_offset:64 */ /* element_size: 64 */
54};
55
56struct reg_tlv {
57 mlx_uint32 reserved0 :16; /* bit_offset:0 */ /* element_size: 16 */
58 mlx_uint32 len :11; /* bit_offset:16 */ /* element_size: 11 */
59 mlx_uint32 Type :5; /* bit_offset:27 */ /* element_size: 5 */
61};
62
69 IN mlx_utils *utils,
70 IN mlx_uint16 reg_id,
71 IN REG_ACCESS_OPT reg_opt,
72 IN OUT mlx_void *reg_data,
73 IN mlx_size reg_size,
74 OUT mlx_uint32 *reg_status
75 );
76
77#endif /* MLX_REG_ACCESS_H_ */
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
mlx_status mlx_reg_access(IN mlx_utils *utils, IN mlx_uint16 reg_id, IN REG_ACCESS_OPT reg_opt, IN OUT mlx_void *reg_data, IN mlx_size reg_size, OUT mlx_uint32 *reg_status)
REG_ACCESS_OPT
@ REG_ACCESS_WRITE
@ REG_ACCESS_READ
#define REG_ACCESS_MAX_REG_SIZE
uint16_t mlx_uint16
uint32_t mlx_uint32
size_t mlx_size
uint64_t mlx_uint64
void mlx_void
int mlx_status
uint8_t mlx_uint8
#define IN
Definition mlx_utils.h:28
#define OUT
Definition mlx_utils.h:29
struct reg_tlv reg_tlv
struct operation_tlv operation_tlv
mlx_uint32 status
mlx_uint32 Type
mlx_uint32 len
mlx_uint32 register_id
mlx_uint32 method
mlx_uint32 dr
mlx_uint64 tid
mlx_uint32 cls
mlx_uint32 reserved0
mlx_uint32 reserved0
mlx_uint32 Type
mlx_uint32 len
mlx_uint8 data[REG_ACCESS_MAX_REG_SIZE]