FreeBSD kernel CXGBE device code
|
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/param.h>
#include "common/common.h"
#include "common/t4_regs.h"
#include "cudbg.h"
#include "cudbg_lib_common.h"
Go to the source code of this file.
Enumerations | |
enum | { SF_ATTEMPTS = 10 , SF_PROG_PAGE = 2 , SF_WR_DISABLE = 4 , SF_RD_STATUS = 5 , SF_WR_ENABLE = 6 , SF_RD_DATA_FAST = 0xb , SF_RD_ID = 0x9f , SF_ERASE_SECTOR = 0xd8 } |
Functions | |
__FBSDID ("$FreeBSD$") | |
int | write_flash (struct adapter *adap, u32 start_sec, void *data, u32 size) |
int | read_flash (struct adapter *adap, u32 start_sec, void *data, u32 size, u32 start_address) |
void | update_skip_size (struct cudbg_flash_sec_info *sec_info, u32 size) |
static void | set_sector_availability (struct cudbg_flash_sec_info *sec_info, int sector_nu, int avail) |
static int | find_empty_sec (struct cudbg_flash_sec_info *sec_info) |
static void | update_headers (void *handle, struct cudbg_buffer *dbg_buff, u64 timestamp, u32 cur_entity_hdr_offset, u32 start_offset, u32 ext_size) |
int | cudbg_write_flash (void *handle, u64 timestamp, void *data, u32 start_offset, u32 cur_entity_hdr_offset, u32 cur_entity_size, u32 ext_size) |
int | cudbg_read_flash_details (void *handle, struct cudbg_flash_hdr *data) |
int | cudbg_read_flash_data (void *handle, void *buf, u32 buf_size) |
int | cudbg_read_flash (void *handle, void *data, u32 size, int data_flag) |
anonymous enum |
Enumerator | |
---|---|
SF_ATTEMPTS | |
SF_PROG_PAGE | |
SF_WR_DISABLE | |
SF_RD_STATUS | |
SF_WR_ENABLE | |
SF_RD_DATA_FAST | |
SF_RD_ID | |
SF_ERASE_SECTOR |
Definition at line 38 of file cudbg_flash_utils.c.
__FBSDID | ( | "$FreeBSD$" | ) |
int cudbg_read_flash | ( | void * | handle, |
void * | data, | ||
u32 | size, | ||
int | data_flag | ||
) |
Definition at line 329 of file cudbg_flash_utils.c.
References cudbg_init::adap, CUDBG_FL_SIGNATURE, CUDBG_MAX_ENTITY, CUDBG_SF_MAX_SECTOR, CUDBG_SF_SECTOR_SIZE, CUDBG_START_SEC, CUDBG_STATUS_NO_SIGNATURE, cudbg_flash_hdr::data_len, cudbg_private::dbg_init, cudbg_flash_sec_info::hdr_data_len, cudbg_flash_sec_info::max_seq_no, cudbg_flash_sec_info::max_seq_sec, cudbg_flash_sec_info::max_timestamp, cudbg_init::print, read_flash(), cudbg_private::sec_info, cudbg_flash_hdr::sec_seq_no, cudbg_flash_hdr::signature, t4_get_flash_params(), and cudbg_flash_hdr::timestamp.
Referenced by cudbg_read_flash_data(), and cudbg_read_flash_details().
int cudbg_read_flash_data | ( | void * | handle, |
void * | data_buf, | ||
u32 | data_buf_size | ||
) |
cudbg_read_flash_data - Read cudbg dump contents stored in flash.
@handle : A pointer returned by cudbg_hello. @data_buf : A pointer to data buffer. @data_buf_size : Data buffer size.
Definition at line 302 of file cudbg_flash_utils.c.
References CUDBG_MAX_ENTITY, and cudbg_read_flash().
int cudbg_read_flash_details | ( | void * | handle, |
struct cudbg_flash_hdr * | data | ||
) |
cudbg_read_flash_data - Read cudbg “flash” header from adapter flash. This will be used by the consumer mainly to know the size of the data in flash.
@handle : A pointer returned by cudbg_hello. @data : A pointer to data/header buffer
Definition at line 293 of file cudbg_flash_utils.c.
References cudbg_read_flash().
int cudbg_write_flash | ( | void * | handle, |
u64 | timestamp, | ||
void * | data, | ||
u32 | start_offset, | ||
u32 | cur_entity_hdr_offset, | ||
u32 | cur_entity_size, | ||
u32 | ext_size | ||
) |
Definition at line 152 of file cudbg_flash_utils.c.
References cudbg_init::adap, CUDBG_FLASH_SIZE, CUDBG_MAX_ENTITY, CUDBG_SF_SECTOR_SIZE, CUDBG_STATUS_FLASH_FULL, cudbg_flash_sec_info::cur_seq_no, cudbg_buffer::data, cudbg_flash_hdr::data_len, cudbg_private::dbg_init, find_empty_sec(), cudbg_buffer::offset, cudbg_flash_sec_info::par_sec, cudbg_flash_sec_info::par_sec_offset, cudbg_init::print, cudbg_flash_sec_info::sec_data, cudbg_private::sec_info, cudbg_flash_hdr::sec_seq_no, set_sector_availability(), cudbg_entity_hdr::start_offset, cudbg_flash_hdr::timestamp, update_headers(), and write_flash().
Referenced by wr_entity_to_flash().
|
static |
Definition at line 74 of file cudbg_flash_utils.c.
References CUDBG_SF_MAX_SECTOR, CUDBG_START_SEC, CUDBG_STATUS_FLASH_FULL, and cudbg_flash_sec_info::sec_bitmap.
Referenced by cudbg_write_flash().
Definition at line 468 of file cudbg_flash_utils.c.
References CUDBG_SF_SECTOR_SIZE, SF_PAGE_SIZE, and t4_read_flash().
Referenced by cudbg_read_flash().
|
static |
Definition at line 62 of file cudbg_flash_utils.c.
References CUDBG_START_SEC, reset_dbg_bitmap(), cudbg_flash_sec_info::sec_bitmap, and set_dbg_bitmap().
Referenced by cudbg_write_flash().
|
static |
Definition at line 90 of file cudbg_flash_utils.c.
References cudbg_flash_hdr::build_ver, CUDBG_FL_BUILD_VERSION, CUDBG_FL_MAJOR_VERSION, CUDBG_FL_MINOR_VERSION, CUDBG_FL_SIGNATURE, CUDBG_MAX_ENTITY, CUDBG_SF_SECTOR_SIZE, cudbg_buffer::data, cudbg_flash_hdr::data_len, cudbg_hdr::data_len, cudbg_flash_hdr::hdr_len, cudbg_flash_hdr::major_ver, cudbg_flash_hdr::minor_ver, cudbg_flash_sec_info::sec_data, cudbg_private::sec_info, cudbg_flash_hdr::signature, cudbg_flash_sec_info::skip_size, cudbg_entity_hdr::start_offset, and cudbg_flash_hdr::timestamp.
Referenced by cudbg_write_flash().
void update_skip_size | ( | struct cudbg_flash_sec_info * | sec_info, |
u32 | size | ||
) |
Definition at line 56 of file cudbg_flash_utils.c.
References cudbg_flash_sec_info::skip_size.
Referenced by wr_entity_to_flash().
Definition at line 249 of file cudbg_flash_utils.c.
References CUDBG_SF_SECTOR_SIZE, DIV_ROUND_UP, adapter::params, adapter_params::sf_nsec, SF_PAGE_SIZE, adapter_params::sf_size, t4_flash_erase_sectors(), and t4_write_flash().
Referenced by cudbg_write_flash().