emlxs_dump.h revision 291a2b48b9adcd7b3666c34e80ba6411929afe7f
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Emulex. All rights reserved.
* Use is subject to License terms.
*/
#ifndef _EMLXS_DUMP_H
#define _EMLXS_DUMP_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct emlxs_file
{
} emlxs_file_t;
typedef struct dump_temp_event
{
/* Maximum BC for DUMP w/o MBX Extension */
/* Conditional Compile Symbols */
/* The following define controls whether the Dump Routines, */
/* in the Port Memory Dump, */
/* use all (potentially up to 3) Dump Tables, or only Dump Table #1. */
/* This is a diagnostic feature only, and is not compiled in releases. */
/* If enabled, this feature provides a way to test all the FW Dump Tables, */
/* a debugging courtesy to the FW group. */
/* 1 = all Dump Tables; 0 = Table 1 Only */
#define CC_DUMP_USE_ALL_TABLES 1
/* Dump Type: loaded into gDumpType; controls */
/* operation of many dump functions */
#define DUMP_TYPE_USER 0 /* User-Initiated Dump */
/* Dump Temperature tempType Event codes (from DFC) */
#define TEMP_TYPE_CRITICAL 1
#define TEMP_TYPE_THRESHOLD 2
#define TEMP_TYPE_NORMAL 3
/* Misc Defines */
#define DUMP_TXT_FILE 0
#define DUMP_DMP_FILE 1
#define DUMP_CEE_FILE 2
/* Driver Name Strings */
#define DUMP_DRV_UNK "Unknown"
#define DUMP_DRV_LEADVILLE "Solaris emlxs"
/* SIDs (Dump File Segment Identifiers) */
/* SID Control Bits */
/* This set of SIDs is defined in "LightPulse Dump Facility Design Guide" */
/* This set of SIDs is defined in "HBAnyware v2.3 */
/* Dump Feature Design Specification" */
/* Legend Strings */
#define LEGEND_CONFIG_REGION "Config Region Data"
#define LEGEND_HBA_MEM_DUMP "HBA Memory Dump"
#define LEGEND_REV_INFO "Revision Information"
#define LEGEND_HBA_INFO "HBA Information"
#define LEGEND_DP_TABLE "Driver Parameters: Table"
#define LEGEND_DP_UNIX "Driver Parameters: Config File Entries"
#define LEGEND_DP_WINDOWS "Driver Parameters: Registry Entries"
#define LEGEND_INTERNAL_MP "Driver-specific Internal Structures, Miniport"
#define LEGEND_INTERNAL_SP "Driver-specific Internal Structures, Storport"
#define LEGEND_INTERNAL_SOL "Driver-specific Internal Structures, Solaris"
#define LEGEND_INTERNAL_L7X "Driver-specific Internal Structures, Linux 7x"
#define LEGEND_INTERNAL_L8X "Driver-specific Internal Structures, Linux 8x"
#define LEGEND_SLI_STRUCTURES "SLI Interface Structures"
#define LEGEND_MENLO_LOG_CONFIG "Converged Enhanced Ethernet (CEE) Log"
#define LEGEND_MENLO_LOG_PANIC_REGS "\n\nPanic Log Registers\n"
#define LEGEND_MENLO_LOG_PANIC_LOGS "\n\nPanic Log Entries\n"
/* Sub-Legends associated with SID_HBA_MEM_DUMP // HBA Memory Dump */
#define LEGEND_HBA_MEM_DUMP_TABLE "Dump Table"
#define LEGEND_HBA_MEM_DUMP_REGION "Dump Region"
/* Sub-Legends associated with SID_REV_INFO // Revision Information */
#define LEGEND_REV_OS_VERSION "OS Version"
#define LEGEND_REV_DRV_VERSION "Driver Version"
#define LEGEND_REV_UTIL_VERSION "HBAnyware Version"
#define LEGEND_REV_DFCLIB_VERSION "DFC Lib Version"
/* Sub-Legends associated with SID_HBA_INFO // Adapter Information */
#define LEGEND_HBA_MODEL "Adapter Model"
#define LEGEND_HBA_WWN "Adapter WWN"
#define LEGEND_HBA_SN "Adapter Serial Number"
#define LEGEND_HBA_FW_VERSION "Firmware Version"
#define LEGEND_HBA_FW_OPVERSION "Operational FW Version"
#define LEGEND_HBA_FW_SLI1VERSION "SLI-1 FW Version"
#define LEGEND_HBA_FW_SLI2VERSION "SLI-2 FW Version"
#define LEGEND_HBA_FW_SLI3VERSION "SLI-3 FW Version"
#define LEGEND_HBA_FW_KERNELVERSION "Kernel FW Version"
#define LEGEND_HBA_BB_STATE "Boot Bios State"
#define LEGEND_HBA_BB_VERSION "Boot Bios Version"
#define LEGEND_HBA_LMSD_A0 "Link Module Serial Data: Page A0"
#define LEGEND_HBA_LMSD_A2 "Link Module Serial Data: Page A2"
/* Sub-Legends associated with SID_CONFIG_REGION // Configuration Region */
#define LEGEND_CONFIG_REGION_0 "Config Region 0: Non-volatile Params"
#define LEGEND_CONFIG_REGION_1 "Config Region 1: reserved"
#define LEGEND_CONFIG_REGION_2 "Config Region 2: reserved"
#define LEGEND_CONFIG_REGION_3 "Config Region 3: reserved"
#define LEGEND_CONFIG_REGION_4 "Config Region 4: Wake-up Params"
#define LEGEND_CONFIG_REGION_5 "Config Region 5: PCI Config, Default"
#define LEGEND_CONFIG_REGION_6 "Config Region 6: PCI Config, Alternate 1"
#define LEGEND_CONFIG_REGION_7 "Config Region 7: PCI Config, Alternate 2"
#define LEGEND_CONFIG_REGION_8 "Config Region 8: Boot Params, x86, Basic"
#define LEGEND_CONFIG_REGION_9 "Config Region 9: Boot Params, x86, Extended"
#define LEGEND_CONFIG_REGION_10 "Config Region 10: Boot Params, EFI"
#define LEGEND_CONFIG_REGION_11 "Config Region 11: reserved"
#define LEGEND_CONFIG_REGION_12 "Config Region 12: reserved"
#define LEGEND_CONFIG_REGION_13 "Config Region 13: reserved"
#define LEGEND_CONFIG_REGION_14 "Config Region 14: VPD"
#define LEGEND_CONFIG_REGION_15 "Config Region 15: Diagnostic Trace"
#define LEGEND_CONFIG_REGION_16 "Config Region 16: reserved"
#define LEGEND_CONFIG_REGION_17 \
"Config Region 17: Physical Environment NV Params"
#define LEGEND_CONFIG_REGION_18 "Config Region 18: reserved"
#define LEGEND_CONFIG_REGION_19 "Config Region 19: reserved"
#define LEGEND_CONFIG_REGION_20 "Config Region 20: reserved"
#define LEGEND_CONFIG_REGION_21 "Config Region 21: Saved Wakeup Params"
#define LEGEND_CONFIG_REGION_22 "Config Region 22: reserved"
#define LEGEND_CONFIG_REGION_23 "Config Region 23: reserved"
#define LEGEND_CONFIG_REGION_24 "Config Region 24: reserved"
#define LEGEND_CONFIG_REGION_25 "Config Region 25: reserved"
#define LEGEND_CONFIG_REGION_26 "Config Region 26: reserved"
#define LEGEND_CONFIG_REGION_27 "Config Region 27: reserved"
#define LEGEND_CONFIG_REGION_28 "Config Region 28: reserved"
#define LEGEND_CONFIG_REGION_29 "Config Region 29: reserved"
#define LEGEND_CONFIG_REGION_30 "Config Region 30: reserved"
#define LEGEND_CONFIG_REGION_31 "Config Region 31: reserved"
#define LEGEND_CONFIG_REGION_32 "Config Region 32: IEEE Address"
/* Additional Sub-Legends for Region 4 */
#define LEGEND_CR4_INITIAL_LOAD "Initial Load"
#define LEGEND_CR4_FLAGS "Flags "
#define LEGEND_CR4_BOOT_BIOS_ID "Boot Bios ID"
#define LEGEND_CR4_SLI1_ID "SLI-1 ID "
#define LEGEND_CR4_SLI2_ID "SLI-2 ID "
#define LEGEND_CR4_SLI3_ID "SLI-3 ID "
#define LEGEND_CR4_SLI4_ID "SLI-4 ID "
#define LEGEND_CR4_EROM_ID "E-Rom ID "
/* Sub-Legends associated with SLI Interface Structures */
#define LEGEND_SLI_REGS "SLI Registers"
#define LEGEND_SLIM "SLIM"
#define LEGEND_PCB "PCB"
#define LEGEND_MBX "Mailbox"
#define LEGEND_HOST_PTRS "Host Pointers"
#define LEGEND_PORT_PTRS "Port Pointers"
#define LEGEND_RINGS "Cmd/Rsp Rings"
#define LEGEND_DRIVER_SPEC "Driver-Specific Internal Structures"
/* Misc Legend DAta */
#define LEGEND_NULL ""
#define LEGEND_NV_LOG_DRIVER_NOT_SUPPORTED \
"NV Log not supported by the driver"
#define LEGEND_NV_LOG_STATUS_ERROR \
"Error in getting NV Log status"
#define LEGEND_NV_LOG_ERROR \
"Error in getting NV Log"
/* Dump Regions Definitions */
#define DR_SLI_REGS 0x0000
#define DR_SLIM 0x0001
#define DR_PCB 0x0002
#define DR_MBX 0x0003
#define DR_HOST_PTRS 0x0004
#define DR_PORT_PTRS 0x0005
#define DR_RINGS 0x0006
#define DR_INTERNAL 0x0007
/* DFC_GetDriverDumpRegions Status */
#define GDDR_ST_SUCCESS 0
/* Max size supported by dump Config Region routines */
#define DUMP_MAX_CONFIG_REGION_LENGTH 1000
/* This is a simplified form of the wakeup params structure, */
/* w/o all the bit fields, */
/* for ease of displaying in the Dump File. */
typedef struct _DUMP_WAKE_UP_PARAMS
{
typedef struct _DUMP_TABLE_ENTRY_PORT_STRUCT
{
union
{
uint32_t w[2];
struct
{
#ifdef EMLXS_LITTLE_ENDIAN
#else
#endif
} s;
} un;
/* This is a simplified form of the Dump Table Entry structures. */
typedef struct _DUMP_TABLE_ENTRY_PORT_BLK
{
union
{
uint32_t w[2];
struct
{
#ifdef EMLXS_LITTLE_ENDIAN
#else
#endif
} s;
} un;
typedef struct _DUMP_TABLE_ENTRY
{
union
{
} un;
/* VPD Data Defines */
#ifdef __cplusplus
}
#endif
#endif /* _EMLXS_DUMP_H */