iPXE
mlx_nvconfig.h
Go to the documentation of this file.
1#ifndef MLX_NVCONFIG_H_
2#define MLX_NVCONFIG_H_
3
4/*
5 * Copyright (C) 2015 Mellanox Technologies Ltd.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 * 02110-1301, USA.
21 */
22
23FILE_LICENCE ( GPL2_OR_LATER );
24
27
33
38
44
50
57
62
69
75
76
79/* -------------- */
80 mlx_uint32 support_rd :1; /*the configuration item is supported and can be read */
81 mlx_uint32 support_wr :1; /*the configuration item is supported and can be updated */
83 mlx_uint32 version :4; /*The maximum version of the configuration item currently supported by the firmware. */
85};
86
87
89 mlx_uint32 length :9; /*Size of configuration item data in bytes between 0..256 */
91 mlx_uint32 version :4; /* Configuration item version */
94
95 mlx_uint32 access_mode :2; /*Defines which value of the Configuration Item will be accessed.
96 0x0: NEXT - Next value to be applied
97 0x1: CURRENT - Currently set values (only valid for Query operation) Supported only if NVGC.nvda_read_current_settings==1.
98 0x2: FACTORY - Default factory values (only valid for Query operation). Supported only if NVGC.nvda_read_factory_settings==1.*/
99
104/* -------------- */
106/* -------------- */
109
110};
111
112#define NVCONFIG_MAX_TLV_SIZE 256
113
118
120 /** WOL En/Dis **/
122 /** VPI En/Dis **/
124};
125
134
135
138 IN mlx_utils *utils,
140 IN mlx_uint16 tlv_type,
141 OUT mlx_boolean *read_supported,
142 OUT mlx_boolean *write_supported
143 );
144
145
148 IN mlx_utils *utils,
150 IN mlx_uint16 tlv_type
151 );
152
155 IN mlx_utils *utils,
157 IN mlx_uint16 tlv_type,
158 IN REG_ACCESS_OPT opt,
159 IN mlx_size data_size,
160 IN NV_DEFAULT_OPT def_en,
161 IN NVDA_WRITER_ID writer_id,
164 );
165
166#endif /* MLX_NVCONFIG_H_ */
u8 port
Port number.
Definition CIB_PRM.h:3
u32 version
Driver version.
Definition ath9k_hw.c:1985
uint8_t data[48]
Additional event data.
Definition ena.h:11
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
mlx_status nvconfig_nvdata_invalidate(IN mlx_utils *utils, IN mlx_uint8 port, IN mlx_uint16 tlv_type)
NVRAM_CLASS_CODE
@ NVRAM_TLV_CLASS_HOST
@ NVRAM_TLV_CLASS_PHYSICAL_PORT
@ NVRAM_TLV_CLASS_GLOBAL
NVDA_WRITER_ID
@ NVDA_NV_HEADER_WRITER_ID_UEFI_HII
@ NVDA_NV_HEADER_WRITER_ID_FLEXBOOT
NV_DEFAULT_OPT
@ TLV_ACCESS_CURRENT
@ TLV_ACCESS_DEFAULT_DIS
@ TLV_ACCESS_DEFAULT_EN
mlx_status nvconfig_nvdata_access(IN mlx_utils *utils, IN mlx_uint8 port, IN mlx_uint16 tlv_type, IN REG_ACCESS_OPT opt, IN mlx_size data_size, IN NV_DEFAULT_OPT def_en, IN NVDA_WRITER_ID writer_id, IN OUT mlx_uint8 *version, IN OUT mlx_void *data)
mlx_status nvconfig_query_capability(IN mlx_utils *utils, IN mlx_uint8 port, IN mlx_uint16 tlv_type, OUT mlx_boolean *read_supported, OUT mlx_boolean *write_supported)
#define NVCONFIG_MAX_TLV_SIZE
REG_ACCESS_OPT
uint16_t mlx_uint16
uint32_t mlx_uint32
size_t mlx_size
void mlx_void
int mlx_status
uint8_t mlx_boolean
uint8_t mlx_uint8
#define IN
Definition mlx_utils.h:28
#define OUT
Definition mlx_utils.h:29
mlx_uint8 wol_en
WOL En/Dis.
mlx_uint8 vpi_en
VPI En/Dis.
mlx_uint32 version
mlx_uint32 reserved2
mlx_uint32 valid
union nvconfig_tlv_type tlv_type
mlx_uint32 reserved1
mlx_uint32 reserved
mlx_uint32 access_mode
mlx_uint32 length
mlx_uint32 writer_id
mlx_uint32 reserved3
mlx_uint32 reserved0
mlx_uint32 header_type
mlx_uint8 data[NVCONFIG_MAX_TLV_SIZE]
struct nvconfig_header nv_header
union nvconfig_tlv_type tlv_type
mlx_uint32 version
mlx_uint32 support_rd
mlx_uint32 reserved2
mlx_uint32 support_wr
mlx_uint32 reserved1
mlx_uint16 real_tlv_type
mlx_boolean fw_reset_needed
NVRAM_CLASS_CODE class_code
struct nvconfig_tlv_type_per_port per_port
struct nvconfig_tlv_type_per_host per_host
struct nvconfig_tlv_type_global global