#ifndef _EMLXS_DUMP_H
#define _EMLXS_DUMP_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct emlxs_file
{
uint8_t *buffer;
uint8_t *ptr;
uint32_t size;
} emlxs_file_t;
typedef struct dump_temp_event
{
struct emlxs_hba *hba;
uint32_t type;
uint32_t temp;
} dump_temp_event_t;
#define EMLXS_TXT_FILE_SIZE (1024*1024)
#define EMLXS_DMP_FILE_SIZE ((8*1024*1024)+0x100)
#define EMLXS_CEE_FILE_SIZE (1024*1024)
#define DUMP_BC_MAX (0x18 * 4)
#define CC_DUMP_FW_BUG_1 1
#define CC_DUMP_ENABLE_PAD 1
#define CC_DUMP_USE_ALL_TABLES 1
#define DUMP_TYPE_USER 0
#define DUMP_TYPE_DRIVER 1
#define DUMP_TYPE_TEMP 2
#define TEMP_TYPE_CRITICAL 1
#define TEMP_TYPE_THRESHOLD 2
#define TEMP_TYPE_NORMAL 3
#define DUMP_SEMAPHORE_RETRY 200
#define DUMP_RETENTION_CNT_DEF 10
#define DUMP_RETENTION_CNT_MAX 500
#define DUMP_TXT_FILE 0
#define DUMP_DMP_FILE 1
#define DUMP_CEE_FILE 2
#define DUMP_DRV_UNK "Unknown"
#define DUMP_DRV_LEADVILLE "Solaris " DRIVER_NAME
#define SID_MULT_ELEM 0x20
#define SID_NULL 0x00
#define SID_ID01 0x01
#define SID_ID02 0x02
#define SID_ID03 0x03
#define SID_TERM 0x04
#define SID_SLIM 0x05
#define SID_05 0x06
#define SID_PCI_CONFIG 0x07
#define SID_SLI_REGS 0x08
#define SID_29 0x29
#define SID_PCI_CONFIG_I 0x47
#define SID_SLI_I 0x48
#define SID_DUMP_ID_LE 0x80
#define SID_DUMP_ID_BE 0x81
#define SID_DUMP_TERM 0x82
#define SID_LEGEND 0x83
#define SID_PCB 0x84
#define SID_MBX 0x86
#define SID_HOST_PTRS 0x87
#define SID_PORT_PTRS 0x88
#define SID_RINGS 0xA9
#define SID_PCB_A 0xC4
#define SID_MBX_A 0xC6
#define SID_HOST_PTRS_A 0xC7
#define SID_PORT_PTRS_A 0xC8
#define SID_BUFFER_LISTS 0xCA
#define SID_RINGS_A 0xE9
#define SID_BUFFER_LISTS_A 0xEA
#define SID_HBA_MEM_DUMP 0x11
#define SID_REV_INFO 0x90
#define SID_HBA_INFO 0x91
#define SID_DP_TABLE 0x92
#define SID_DP_UNIX 0x93
#define SID_DP_WINDOWS 0x94
#define SID_INTERNAL_MP 0x95
#define SID_INTERNAL_SP 0x96
#define SID_INTERNAL_SOL 0x97
#define SID_INTERNAL_L7X 0x98
#define SID_INTERNAL_L8X 0x99
#define SID_CONFIG_REGION 0x9A
#define SID_NON_VOLATILE_LOG 0x9B
#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"
#define LEGEND_NON_VOLATILE_LOG "Non-Volatile Log Data"
#define LEGEND_HBA_MEM_DUMP_TABLE "Dump Table"
#define LEGEND_HBA_MEM_DUMP_REGION "Dump Region"
#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"
#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"
#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"
#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 "
#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"
#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"
#define NV_LOG_NOT_INCLUDED_IN_DMP \
"Non-Volatile Log Dump is not included in the DMP file"
#define NV_LOG_INCLUDED_IN_DMP \
"Non-Volatile Log Dump is included in the DMP file"
#define NV_LOG_NOT_INCLUDED_IN_FAT \
"Non-Volatile Log Dump is not included in the FAT file"
#define NV_LOG_INCLUDED_IN_FAT \
"Non-Volatile Log Dump is included in the FAT file"
#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
#define GDDR_ST_SUCCESS 0
#define GDDR_ST_ERROR 1
#define GDDR_ST_BAD_ID 2
#define GDDR_ST_BUF_OVERFLOW 3
#define GDDR_ST_ID_NA 4
#define DUMP_MAX_CONFIG_REGION_LENGTH 1000
typedef struct _DUMP_WAKE_UP_PARAMS
{
uint32_t InitialId[2];
uint32_t Flags;
uint32_t BootBiosId[2];
uint32_t Sli1Id[2];
uint32_t Sli2Id[2];
uint32_t Sli3Id[2];
uint32_t Sli4Id[2];
uint32_t EromId[2];
} DUMP_WAKE_UP_PARAMS;
typedef struct _DUMP_TABLE_ENTRY_PORT_STRUCT
{
union
{
uint32_t w[2];
struct
{
#ifdef EMLXS_LITTLE_ENDIAN
uint32_t count:16;
uint32_t length:8;
uint32_t sid:8;
#else
uint32_t sid:8;
uint32_t length:8;
uint32_t count:16;
#endif
uint32_t addr;
} s;
} un;
} DUMP_TABLE_ENTRY_PORT_STRUCT;
typedef struct _DUMP_TABLE_ENTRY_PORT_BLK
{
union
{
uint32_t w[2];
struct
{
#ifdef EMLXS_LITTLE_ENDIAN
uint32_t bc:24;
uint32_t sid:8;
#else
uint32_t sid:8;
uint32_t bc:24;
#endif
uint32_t addr;
} s;
} un;
} DUMP_TABLE_ENTRY_PORT_BLK;
typedef struct _DUMP_TABLE_ENTRY
{
union
{
DUMP_TABLE_ENTRY_PORT_BLK PortBlock;
DUMP_TABLE_ENTRY_PORT_STRUCT PortStruct;
} un;
} DUMP_TABLE_ENTRY;
#define VPD_TAG_82 0x82
#define VPD_TAG_90 0x90
#define VPD_TAG_FF 0x0F
#ifdef __cplusplus
}
#endif
#endif