iPXE
Data Structures | Macros | Functions
mlx_nvconfig_defaults.h File Reference
#include "mlx_nvconfig_prm.h"

Go to the source code of this file.

Data Structures

struct  mlx_nvconfig_port_conf_defaults
 
struct  mlx_nvconfig_conf_defaults
 

Macros

#define DEFAULT_FLEXBOOT_MENU_TO   4
 
#define DEFAULT_MAX_VFS   8
 
#define DEFAULT_BOOT_PROTOCOL   1
 
#define DEFAULT_OPTION_ROM_EN   1
 
#define DEFAULT_BOOT_VLAN   1
 
#define DEFAULT_ISCSI_DHCP_PARAM_EN   1
 
#define DEFAULT_ISCSI_IPV4_DHCP_EN   1
 
#define DEFAULT_ISCSI_DRIVE_NUM   0x80
 
#define DEFAULT_OCSD_OCBB_EN   1
 
#define DEFAULT_BOOT_IP_VER   0
 
#define DEFAULT_BOOT_LINK_UP_TO   0
 
#define DEFAULT_BOOT_UNDI_NETWORK_WAIT_TO   30
 
#define DEFAULT_BOOT_IP_VERSION_EN   1
 

Functions

 FILE_LICENCE (GPL2_OR_LATER)
 
mlx_status nvconfig_read_port_default_values (IN mlx_utils *utils, IN mlx_uint8 port, OUT struct mlx_nvconfig_port_conf_defaults *port_conf_def)
 
mlx_status nvconfig_read_general_default_values (IN mlx_utils *utils, OUT struct mlx_nvconfig_conf_defaults *conf_def)
 
mlx_status nvconfig_read_rom_ini_values (IN mlx_utils *utils, OUT struct mlx_nvcofnig_romini *rom_ini)
 

Macro Definition Documentation

◆ DEFAULT_FLEXBOOT_MENU_TO

#define DEFAULT_FLEXBOOT_MENU_TO   4

Definition at line 28 of file mlx_nvconfig_defaults.h.

◆ DEFAULT_MAX_VFS

#define DEFAULT_MAX_VFS   8

Definition at line 29 of file mlx_nvconfig_defaults.h.

◆ DEFAULT_BOOT_PROTOCOL

#define DEFAULT_BOOT_PROTOCOL   1

Definition at line 30 of file mlx_nvconfig_defaults.h.

◆ DEFAULT_OPTION_ROM_EN

#define DEFAULT_OPTION_ROM_EN   1

Definition at line 31 of file mlx_nvconfig_defaults.h.

◆ DEFAULT_BOOT_VLAN

#define DEFAULT_BOOT_VLAN   1

Definition at line 32 of file mlx_nvconfig_defaults.h.

◆ DEFAULT_ISCSI_DHCP_PARAM_EN

#define DEFAULT_ISCSI_DHCP_PARAM_EN   1

Definition at line 33 of file mlx_nvconfig_defaults.h.

◆ DEFAULT_ISCSI_IPV4_DHCP_EN

#define DEFAULT_ISCSI_IPV4_DHCP_EN   1

Definition at line 34 of file mlx_nvconfig_defaults.h.

◆ DEFAULT_ISCSI_DRIVE_NUM

#define DEFAULT_ISCSI_DRIVE_NUM   0x80

Definition at line 35 of file mlx_nvconfig_defaults.h.

◆ DEFAULT_OCSD_OCBB_EN

#define DEFAULT_OCSD_OCBB_EN   1

Definition at line 36 of file mlx_nvconfig_defaults.h.

◆ DEFAULT_BOOT_IP_VER

#define DEFAULT_BOOT_IP_VER   0

Definition at line 37 of file mlx_nvconfig_defaults.h.

◆ DEFAULT_BOOT_LINK_UP_TO

#define DEFAULT_BOOT_LINK_UP_TO   0

Definition at line 38 of file mlx_nvconfig_defaults.h.

◆ DEFAULT_BOOT_UNDI_NETWORK_WAIT_TO

#define DEFAULT_BOOT_UNDI_NETWORK_WAIT_TO   30

Definition at line 39 of file mlx_nvconfig_defaults.h.

◆ DEFAULT_BOOT_IP_VERSION_EN

#define DEFAULT_BOOT_IP_VERSION_EN   1

Definition at line 40 of file mlx_nvconfig_defaults.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER  )

◆ nvconfig_read_port_default_values()

mlx_status nvconfig_read_port_default_values ( IN mlx_utils utils,
IN mlx_uint8  port,
OUT struct mlx_nvconfig_port_conf_defaults port_conf_def 
)

Definition at line 446 of file mlx_nvconfig_defaults.c.

451 {
453 
454  if (utils == NULL || port_conf_def == NULL) {
456  MLX_DEBUG_ERROR(utils,"bad params.");
457  goto bad_param;
458  }
459  mlx_memory_set(utils, port_conf_def, 0, sizeof(*port_conf_def));
461  (sizeof(tlv_port_defaults)/sizeof(tlv_port_defaults[0])),
462  port_conf_def);
463 
464 bad_param:
465  return status;
466 }
#define MLX_INVALID_PARAMETER
static struct tlv_default tlv_port_defaults[]
static void nvconfig_nvdata_read_default_values(IN mlx_utils *utils, IN mlx_uint8 modifier, IN struct tlv_default defaults_table[], IN mlx_uint8 defaults_table_size, OUT void *def_strct)
uint8_t status
Status.
Definition: ena.h:16
mlx_status mlx_memory_set(IN mlx_utils *utils, IN mlx_void *block, IN mlx_int32 value, IN mlx_size size)
Definition: mlx_memory.c:171
u8 port
Port number.
Definition: CIB_PRM.h:31
#define MLX_SUCCESS
#define MLX_DEBUG_ERROR(...)
Definition: mlx_logging.h:29
int mlx_status
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References MLX_DEBUG_ERROR, MLX_INVALID_PARAMETER, mlx_memory_set(), MLX_SUCCESS, NULL, nvconfig_nvdata_read_default_values(), port, status, and tlv_port_defaults.

◆ nvconfig_read_general_default_values()

mlx_status nvconfig_read_general_default_values ( IN mlx_utils utils,
OUT struct mlx_nvconfig_conf_defaults conf_def 
)

Definition at line 469 of file mlx_nvconfig_defaults.c.

473 {
475 
476  if (utils == NULL || conf_def == NULL) {
478  MLX_DEBUG_ERROR(utils,"bad params.");
479  goto bad_param;
480  }
481  mlx_memory_set(utils, conf_def, 0, sizeof(*conf_def));
483  (sizeof(tlv_general_defaults)/sizeof(tlv_general_defaults[0])),
484  conf_def);
485 
486 bad_param:
487  return status;
488 }
#define MLX_INVALID_PARAMETER
static void nvconfig_nvdata_read_default_values(IN mlx_utils *utils, IN mlx_uint8 modifier, IN struct tlv_default defaults_table[], IN mlx_uint8 defaults_table_size, OUT void *def_strct)
uint8_t status
Status.
Definition: ena.h:16
mlx_status mlx_memory_set(IN mlx_utils *utils, IN mlx_void *block, IN mlx_int32 value, IN mlx_size size)
Definition: mlx_memory.c:171
#define MLX_SUCCESS
#define MLX_DEBUG_ERROR(...)
Definition: mlx_logging.h:29
int mlx_status
static struct tlv_default tlv_general_defaults[]
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References MLX_DEBUG_ERROR, MLX_INVALID_PARAMETER, mlx_memory_set(), MLX_SUCCESS, NULL, nvconfig_nvdata_read_default_values(), status, and tlv_general_defaults.

◆ nvconfig_read_rom_ini_values()

mlx_status nvconfig_read_rom_ini_values ( IN mlx_utils utils,
OUT struct mlx_nvcofnig_romini rom_ini 
)

Definition at line 491 of file mlx_nvconfig_defaults.c.

495 {
497  mlx_uint8 version = 0;
499 
500  if (utils == NULL || rom_ini == NULL) {
502  MLX_DEBUG_ERROR(utils,"bad params.");
503  goto bad_param;
504  }
505  mlx_memory_set(utils, rom_ini, 0, sizeof(*rom_ini));
506 
508  sizeof(*rom_ini), TLV_ACCESS_DEFAULT_DIS, 0,
509  &version, rom_ini);
510  MLX_CHECK_STATUS(NULL, status, bad_param,
511  "nvconfig_nvdata_access failed ");
512  for (index = 0; index * 4 < sizeof(*rom_ini); index++) {
513  mlx_memory_be32_to_cpu(utils, (((mlx_uint32 *) rom_ini)[index]),
514  ((mlx_uint32 *) rom_ini) + index);
515  }
516 
517 bad_param:
518  return status;
519 }
#define MLX_INVALID_PARAMETER
uint8_t status
Status.
Definition: ena.h:16
uint32_t mlx_uint32
mlx_status mlx_memory_set(IN mlx_utils *utils, IN mlx_void *block, IN mlx_int32 value, IN mlx_size size)
Definition: mlx_memory.c:171
u32 version
Version number.
Definition: ath9k_hw.c:1983
#define MLX_SUCCESS
uint8_t mlx_uint8
#define MLX_DEBUG_ERROR(...)
Definition: mlx_logging.h:29
int mlx_status
mlx_status mlx_memory_be32_to_cpu(IN mlx_utils *utils, IN mlx_uint32 source, IN mlx_uint32 *destination)
Definition: mlx_memory.c:224
#define MLX_CHECK_STATUS(id, status, label, message)
Definition: mlx_bail.h:37
uint64_t index
Index of the first segment within the content.
Definition: pccrc.h:21
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
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)
Definition: mlx_nvconfig.c:235

References GLOBAL_ROM_INI_TYPE, index, MLX_CHECK_STATUS, MLX_DEBUG_ERROR, MLX_INVALID_PARAMETER, mlx_memory_be32_to_cpu(), mlx_memory_set(), MLX_SUCCESS, NULL, nvconfig_nvdata_access(), REG_ACCESS_READ, status, TLV_ACCESS_DEFAULT_DIS, and version.