iPXE
Data Structures | Defines | 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

Defines

#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)

Define Documentation

#define DEFAULT_FLEXBOOT_MENU_TO   4

Definition at line 28 of file mlx_nvconfig_defaults.h.

Referenced by nvconfig_get_rom_banner_to_default_conf().

#define DEFAULT_MAX_VFS   8

Definition at line 29 of file mlx_nvconfig_defaults.h.

Referenced by nvconfig_get_nv_virt_caps_default_conf().

#define DEFAULT_BOOT_PROTOCOL   1

Definition at line 30 of file mlx_nvconfig_defaults.h.

Referenced by nvconfig_get_boot_default_conf().

#define DEFAULT_OPTION_ROM_EN   1

Definition at line 31 of file mlx_nvconfig_defaults.h.

Referenced by nvconfig_get_boot_default_conf().

#define DEFAULT_BOOT_VLAN   1

Definition at line 32 of file mlx_nvconfig_defaults.h.

Referenced by nvconfig_get_boot_default_conf().

Definition at line 33 of file mlx_nvconfig_defaults.h.

Referenced by nvconfig_get_iscsi_init_dhcp_default_conf().

Definition at line 34 of file mlx_nvconfig_defaults.h.

Referenced by nvconfig_get_iscsi_init_dhcp_default_conf().

#define DEFAULT_ISCSI_DRIVE_NUM   0x80

Definition at line 35 of file mlx_nvconfig_defaults.h.

Referenced by nvconfig_get_iscsi_gen_default_conf().

#define DEFAULT_OCSD_OCBB_EN   1

Definition at line 36 of file mlx_nvconfig_defaults.h.

Referenced by nvconfig_get_ocsd_ocbb_default_conf().

#define DEFAULT_BOOT_IP_VER   0

Definition at line 37 of file mlx_nvconfig_defaults.h.

Referenced by nvconfig_get_boot_ext_default_conf().

#define DEFAULT_BOOT_LINK_UP_TO   0

Definition at line 38 of file mlx_nvconfig_defaults.h.

Referenced by nvconfig_get_boot_ext_default_conf().

Definition at line 39 of file mlx_nvconfig_defaults.h.

Referenced by nvconfig_get_boot_ext_default_conf().

Definition at line 40 of file mlx_nvconfig_defaults.h.

Referenced by nvconfig_get_rom_cap_default_conf().


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER  )

Definition at line 446 of file mlx_nvconfig_defaults.c.

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

{
        mlx_status status = MLX_SUCCESS;

        if (utils == NULL || port_conf_def == NULL) {
                status = MLX_INVALID_PARAMETER;
                MLX_DEBUG_ERROR(utils,"bad params.");
                goto bad_param;
        }
        mlx_memory_set(utils, port_conf_def, 0, sizeof(*port_conf_def));
        nvconfig_nvdata_read_default_values(utils, port, tlv_port_defaults,
                                (sizeof(tlv_port_defaults)/sizeof(tlv_port_defaults[0])),
                                port_conf_def);

bad_param:
        return status;
}

Definition at line 469 of file mlx_nvconfig_defaults.c.

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

{
        mlx_status status = MLX_SUCCESS;

        if (utils == NULL || conf_def == NULL) {
                status = MLX_INVALID_PARAMETER;
                MLX_DEBUG_ERROR(utils,"bad params.");
                goto bad_param;
        }
        mlx_memory_set(utils, conf_def, 0, sizeof(*conf_def));
        nvconfig_nvdata_read_default_values(utils, 0, tlv_general_defaults,
                        (sizeof(tlv_general_defaults)/sizeof(tlv_general_defaults[0])),
                        conf_def);

bad_param:
        return status;
}

Definition at line 491 of file mlx_nvconfig_defaults.c.

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(), status, TLV_ACCESS_DEFAULT_DIS, and version.

{
        mlx_status status = MLX_SUCCESS;
        mlx_uint8 version = 0;
        mlx_uint32 index;

        if (utils == NULL || rom_ini == NULL) {
                status = MLX_INVALID_PARAMETER;
                MLX_DEBUG_ERROR(utils,"bad params.");
                goto bad_param;
        }
        mlx_memory_set(utils, rom_ini, 0, sizeof(*rom_ini));

        status = nvconfig_nvdata_access(utils, 0, GLOBAL_ROM_INI_TYPE, REG_ACCESS_READ,
                        sizeof(*rom_ini), TLV_ACCESS_DEFAULT_DIS, 0,
                        &version, rom_ini);
        MLX_CHECK_STATUS(NULL, status, bad_param,
                                "nvconfig_nvdata_access failed ");
        for (index = 0; index * 4 < sizeof(*rom_ini); index++) {
                mlx_memory_be32_to_cpu(utils, (((mlx_uint32 *) rom_ini)[index]),
                                ((mlx_uint32 *) rom_ini) + index);
        }

bad_param:
        return status;
}