#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <stdarg.h>#include <getopt.h>#include <stdint.h>#include <string.h>#include <ctype.h>#include <fcntl.h>#include <sys/stat.h>#include <errno.h>#include <sys/ioctl.h>#include <sys/utsname.h>#include <elxu_device.h>#include <elxu_sli4.h>#include <elxu_sky.h>#include <elxu_lancer.h>#include <elxu_dump.h>#include <ocs_ioctl.h>#include <ecd_api.h>#include <elxu_common.h>#include <elxu_mgmt.h>#include <elx_pt_ioctl.h>Go to the source code of this file.
Macros | |
| #define | OCS_FW_DIAG_LOG_SIZE_MAX (1*1024*1024) |
| #define | MAX_FW_LOG_BUFFER_SIZE (16*1024*1024) |
| #define | helper_trace(fmt,...) |
Functions | |
| static int | elxu_test_file_write (const char *filename) |
| test write permissions for given file More... | |
| static int | fat_upload (elxu_device_t *device_p, char const *fname_p) |
| FAT data upload functionality. More... | |
| void | elxu_driver_dump (elxu_device_t *device, int bufsize, ocs_ioctl_ddump_arg_t *args) |
| int | ext_fat_read_string_table_upld (elxu_device_t *device_p, char const *fname_p) |
| FAT data upload functionality. More... | |
| int | ext_fat_capabilities_upld (elxu_device_t *device_p) |
| Displays EXT FAT capabilities. More... | |
| static int | ext_fat_snapshot_upload (elxu_device_t *device_p, char const *fname_p) |
| EXT FAT data upload functionality. More... | |
| static int | ext_fat_generate_efd_file (elxu_device_t *device_p, char const *fname_p) |
| EXT FAT data upload functionality. More... | |
| static int | lancer_hba_dump_upload (elxu_device_t *device_p, char const *fname_p) |
| Lancer dump data upload functionality. More... | |
| int | hba_data_object_upload (elxu_device_t *device_p, char const *objname_p, char const *fname_p) |
| int | lancer_gen_dump (elxu_device_t *device_p, int fdb_dump) |
| Trigger dump generation on Lancer. More... | |
| int | lancer_dump_to_host (elxu_device_t *device_p, const char *fname, int fdb_dump) |
| Trigger dump-to-host on Lancer. More... | |
| static size_t | ocs_write_buffer_to_file (const char *ofname, void *src_buffer, size_t byte_count) |
| int | elxu_get_fw_diagnostic_log (elxu_device_t *device_p, char const *fname) |
| gather firmware diagnostic logs More... | |
| int | hba_data_upload (elxu_device_t *device_p, char const *fname_p, data_type_req_t req) |
| FAT data upload functionality. More... | |
| int | elxu_core_dump (elxu_device_t *device_p, char *fname_p, int test_dump) |
| Core Dump functionality. More... | |
| void | ecd_log (char *fmt,...) |
| void | os_assert (char *message, uint32_t Line, char *File) |
| void | os_stall (void *ctx, uint32_t usecTime) |
| void | os_cfg_read8 (void *ctx, uint32_t offset, uint32_t *pdata) |
| void | os_cfg_read16 (void *ctx, uint32_t offset, uint32_t *pdata) |
| void | os_cfg_read32 (void *ctx, uint32_t offset, uint32_t *pdata) |
| void | os_cfg_write8 (void *ctx, uint32_t offset, uint32_t data) |
| void | os_cfg_write16 (void *ctx, uint32_t offset, uint32_t data) |
| void | os_cfg_write32 (void *ctx, uint32_t offset, uint32_t data) |
| void | os_bar_read8 (void *ctx, uint32_t bar, uint32_t offset, uint32_t *pdata) |
| void | os_bar_read16 (void *ctx, uint32_t bar, uint32_t offset, uint32_t *pdata) |
| void | os_bar_read32 (void *ctx, uint32_t bar, uint32_t offset, uint32_t *pdata) |
| void | os_bar_write8 (void *ctx, uint32_t bar, uint32_t offset, uint32_t data) |
| void | os_bar_write16 (void *ctx, uint32_t bar, uint32_t offset, uint32_t data) |
| void | os_bar_write32 (void *ctx, uint32_t bar, uint32_t offset, uint32_t data) |
| void * | os_malloc (void *ctx, uint32_t size) |
| void | os_free (void *ctx, void *ptr) |
Variables | |
| static int | enable_helper_trace = 0 |
| #define helper_trace | ( | fmt, | |
| ... | |||
| ) |
Definition at line 962 of file elxu_dump.c.
| #define MAX_FW_LOG_BUFFER_SIZE (16*1024*1024) |
| #define OCS_FW_DIAG_LOG_SIZE_MAX (1*1024*1024) |
| void ecd_log | ( | char * | fmt, |
| ... | |||
| ) |
Definition at line 969 of file elxu_dump.c.
| int elxu_core_dump | ( | elxu_device_t * | device_p, |
| char * | fname_p, | ||
| int | test_dump | ||
| ) |
Core Dump functionality.
Handle the request to retrieve the core dump from Skyhawk.
| device_p | The pointer to the HBA descriptor structure. |
| fname_p | file name of file to to which dump is written |
Definition at line 855 of file elxu_dump.c.
| void elxu_driver_dump | ( | elxu_device_t * | device, |
| int | bufsize, | ||
| ocs_ioctl_ddump_arg_t * | args | ||
| ) |
Definition at line 163 of file elxu_dump.c.
| int elxu_get_fw_diagnostic_log | ( | elxu_device_t * | device_p, |
| char const * | fname | ||
| ) |
gather firmware diagnostic logs
The functionality to extract firmware diagnostic logs to a file
| device_p | Pointer to HBA descriptor structure. |
| fname | Output file name. |
Definition at line 765 of file elxu_dump.c.
|
static |
test write permissions for given file
| filename | File for which write test is performed |
Definition at line 65 of file elxu_dump.c.
| int ext_fat_capabilities_upld | ( | elxu_device_t * | device_p | ) |
Displays EXT FAT capabilities.
| device_p | The pointer to the HBA descriptor structure. |
Definition at line 309 of file elxu_dump.c.
|
static |
EXT FAT data upload functionality.
| device_p | The pointer to the HBA descriptor structure. |
| fname_p | The pointer to the file name string. |
Definition at line 448 of file elxu_dump.c.
| int ext_fat_read_string_table_upld | ( | elxu_device_t * | device_p, |
| char const * | fname_p | ||
| ) |
FAT data upload functionality.
| device_p | The pointer to the HBA descriptor structure. |
| fname_p | The pointer to the file name string. |
Definition at line 216 of file elxu_dump.c.
|
static |
EXT FAT data upload functionality.
| device_p | The pointer to the HBA descriptor structure. |
| fname_p | The pointer to the file name string. |
Definition at line 382 of file elxu_dump.c.
|
static |
FAT data upload functionality.
| device_p | The pointer to the HBA descriptor structure. |
| fname_p | The pointer to the file name string. |
Definition at line 83 of file elxu_dump.c.
| int hba_data_object_upload | ( | elxu_device_t * | device_p, |
| char const * | objname_p, | ||
| char const * | fname_p | ||
| ) |
Definition at line 564 of file elxu_dump.c.
| int hba_data_upload | ( | elxu_device_t * | device_p, |
| char const * | fname_p, | ||
| data_type_req_t | req | ||
| ) |
FAT data upload functionality.
The functionality which is handling the request to retrieve the FAT data from Skyhawk.
| device_p | The pointer to the HBA descriptor structure. |
| fname_p | The pointer to the file name string. |
| req | The request data type. |
Definition at line 822 of file elxu_dump.c.
| int lancer_dump_to_host | ( | elxu_device_t * | device_p, |
| const char * | fname, | ||
| int | fdb_dump | ||
| ) |
Trigger dump-to-host on Lancer.
This function uses Lancer's dump-to-host capability to cause a dump to be generated and to transfer that dump into host memory. The transfered dump is stored in a file.
| device_p | The pointer to the HBA descriptor structure. |
Definition at line 660 of file elxu_dump.c.
| int lancer_gen_dump | ( | elxu_device_t * | device_p, |
| int | fdb_dump | ||
| ) |
Trigger dump generation on Lancer.
The functionality to generate a dump on Lancer.
| device_p | The pointer to the HBA descriptor structure. |
Definition at line 630 of file elxu_dump.c.
|
static |
Lancer dump data upload functionality.
| device_p | The pointer to the HBA descriptor structure. |
| fname_p | The pointer to the file name string. |
Definition at line 488 of file elxu_dump.c.
|
static |
Definition at line 743 of file elxu_dump.c.
| void os_assert | ( | char * | message, |
| uint32_t | Line, | ||
| char * | File | ||
| ) |
Definition at line 978 of file elxu_dump.c.
| void os_bar_read16 | ( | void * | ctx, |
| uint32_t | bar, | ||
| uint32_t | offset, | ||
| uint32_t * | pdata | ||
| ) |
Definition at line 1203 of file elxu_dump.c.
| void os_bar_read32 | ( | void * | ctx, |
| uint32_t | bar, | ||
| uint32_t | offset, | ||
| uint32_t * | pdata | ||
| ) |
Definition at line 1237 of file elxu_dump.c.
| void os_bar_read8 | ( | void * | ctx, |
| uint32_t | bar, | ||
| uint32_t | offset, | ||
| uint32_t * | pdata | ||
| ) |
Definition at line 1169 of file elxu_dump.c.
| void os_bar_write16 | ( | void * | ctx, |
| uint32_t | bar, | ||
| uint32_t | offset, | ||
| uint32_t | data | ||
| ) |
Definition at line 1302 of file elxu_dump.c.
| void os_bar_write32 | ( | void * | ctx, |
| uint32_t | bar, | ||
| uint32_t | offset, | ||
| uint32_t | data | ||
| ) |
Definition at line 1333 of file elxu_dump.c.
| void os_bar_write8 | ( | void * | ctx, |
| uint32_t | bar, | ||
| uint32_t | offset, | ||
| uint32_t | data | ||
| ) |
Definition at line 1271 of file elxu_dump.c.
| void os_cfg_read16 | ( | void * | ctx, |
| uint32_t | offset, | ||
| uint32_t * | pdata | ||
| ) |
Definition at line 1019 of file elxu_dump.c.
| void os_cfg_read32 | ( | void * | ctx, |
| uint32_t | offset, | ||
| uint32_t * | pdata | ||
| ) |
Definition at line 1050 of file elxu_dump.c.
| void os_cfg_read8 | ( | void * | ctx, |
| uint32_t | offset, | ||
| uint32_t * | pdata | ||
| ) |
Definition at line 989 of file elxu_dump.c.
| void os_cfg_write16 | ( | void * | ctx, |
| uint32_t | offset, | ||
| uint32_t | data | ||
| ) |
Definition at line 1112 of file elxu_dump.c.
| void os_cfg_write32 | ( | void * | ctx, |
| uint32_t | offset, | ||
| uint32_t | data | ||
| ) |
Definition at line 1140 of file elxu_dump.c.
| void os_cfg_write8 | ( | void * | ctx, |
| uint32_t | offset, | ||
| uint32_t | data | ||
| ) |
Definition at line 1083 of file elxu_dump.c.
| void os_free | ( | void * | ctx, |
| void * | ptr | ||
| ) |
Definition at line 1369 of file elxu_dump.c.
| void* os_malloc | ( | void * | ctx, |
| uint32_t | size | ||
| ) |
Definition at line 1365 of file elxu_dump.c.
| void os_stall | ( | void * | ctx, |
| uint32_t | usecTime | ||
| ) |
Definition at line 984 of file elxu_dump.c.
|
static |
Definition at line 960 of file elxu_dump.c.