116 while (offset < bufferLength) {
117 n = (bufferLength - offset);
189 if (fatLength < bufferLength) {
190 bufferLength = fatLength;
194 while (bufferLength > 0) {
307 int logs_per_read = 32;
309 uint32_t returned_bytes = 0;
310 uint32_t returned_logs = 0;
327 while (numlogs > 0) {
328 if (numlogs > logs_per_read) {
329 trace_chunk = logs_per_read;
331 trace_chunk = numlogs;
333 memset (mbox,0,mbox_len);
345 printf (
"Retrieving EFD data failure\n");
355 returned_logs += retlogs;
388 uint32_t tbl_info_len, uint32_t bytes_to_read, uint32_t bytes_read)
391 uint32_t ioctl_mbx_len = bytes_to_read +
sizeof (*mbox);
#define OPCODE_COMMON_GET_EXT_FAT_CAPABILITIES
struct mbox_common_get_ext_fat_capabilities_t::@12::@13 request
struct mbox_ioctl_common_ext_fat_retrieve_snapshot_t::@19::@21 response
union ioctl_common_ext_fat_read_string_table_t::@22 params
union mbox_ioctl_common_ext_fat_retrieve_snapshot_t::@19 params
#define MGMT_FLASHROM_OPCODE_SAVE
#define EXT_FAT_RETRIEVE_MODE_VRAM
int fat_info(elxu_device_t *device)
Return length of FAT.
void * zmalloc(uint32_t len)
Allocates and zeroes memory to be used.
int fat_read(elxu_device_t *device, uint8_t *buffer, uint32_t bufferLength)
Read FAT.
int get_ext_fat_capabilities(elxu_device_t *device, uint32_t parameter_type, ext_fat_config_params_t *params, uint32_t paramsLength)
Issue EFD get capabilities mailbox command.
int ufi_image_upload(elxu_device_t *device, uint32_t op_type, uint8_t *buffer, uint32_t bufferLength)
Upload UFI flash image component.
int ext_fat_retrieve_snapshot(elxu_device_t *device, uint8_t *buf, uint32_t len, uint32_t numlogs)
Issue retrieve EFD snapshot mailbox command.
void zfree(void *p)
Frees memory that has been allocated.
struct mbox_ioctl_common_ext_fat_retrieve_snapshot_t::@19::@20 request
#define OPCODE_COMMON_EXT_FAT_READ_STRING_TABLE
#define FAT_OPERATION_RETRIEVE
int ext_fat_read_string_table(elxu_device_t *device, mbox_ext_fat_read_string_params_t *tblinfo, uint32_t tbl_info_len, uint32_t bytes_to_read, uint32_t bytes_read)
Issue EXT_FAT_READ_STRING_TABLE mailbox command.
int mbox_ext_fat(elxu_device_t *device, uint32_t opcode, void *mbox, uint32_t mboxLength)
Issue EFD mailbox command.
#define FAT_OPERATION_QUERY
int mbox_manage_fat(elxu_device_t *device, uint32_t fat_operation, uint32_t read_log_offset, void *buffer, uint32_t bufferLength)
Issue COMMON_MANAGE_FAT mailbox commands.
int mbox_read_flashrom(elxu_device_t *device, uint32_t opcode, uint32_t optype, uint32_t offset, void *outbuf, uint32_t outbufLength)
Issue read flashrom mailbox command.
struct ioctl_common_ext_fat_read_string_table_t::@22::@24 response
static int image_load_common(elxu_device_t *device, dir_t direction, uint32_t op_type, uint8_t *buffer, uint32_t bufferLength)
Read or Write UFI flash image component.
int ufi_image_download(elxu_device_t *device, uint32_t op_type, uint8_t *buffer, uint32_t bufferLength)
Download UFI flash image component.
#define MGMT_FLASHROM_OPCODE_REPORT
union mbox_common_get_ext_fat_capabilities_t::@12 params
struct mbox_common_get_ext_fat_capabilities_t::@12::@14 response
int mbox_write_flashrom(elxu_device_t *device, uint32_t opcode, uint32_t optype, uint32_t offset, void *inbuf, uint32_t inbufLength)
Issue write flashrom mailbox command.
#define OPCODE_COMMON_EXT_FAT_CONFIGURE_SNAPSHOT
#define OPCODE_COMMON_EXT_FAT_RETRIEVE_SHAPSHOT
#define MGMT_FLASHROM_OPCODE_FLASH
struct ioctl_common_ext_fat_read_string_table_t::@22::@23 request
int ext_fat_config_snapshot(elxu_device_t *device)
Issue configure EFD snapshot mailbox command.