#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <elxu_device.h>
#include <elxu_sky.h>
#include <elxu_sli4.h>
#include <elxu_mbox.h>
#include <elxu_common.h>
Go to the source code of this file.
|
| 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. More...
|
| |
| int | ufi_image_download (elxu_device_t *device, uint32_t op_type, uint8_t *buffer, uint32_t bufferLength) |
| | Download UFI flash image component. More...
|
| |
| int | ufi_image_upload (elxu_device_t *device, uint32_t op_type, uint8_t *buffer, uint32_t bufferLength) |
| | Upload UFI flash image component. More...
|
| |
| int | fat_info (elxu_device_t *device) |
| | Return length of FAT. More...
|
| |
| int | fat_read (elxu_device_t *device, uint8_t *buffer, uint32_t bufferLength) |
| | Read FAT. More...
|
| |
| 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. More...
|
| |
| int | ext_fat_config_snapshot (elxu_device_t *device) |
| | Issue configure EFD snapshot mailbox command. More...
|
| |
| int | ext_fat_retrieve_snapshot (elxu_device_t *device, uint8_t *buf, uint32_t len, uint32_t numlogs) |
| | Issue retrieve EFD snapshot mailbox command. More...
|
| |
| 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. More...
|
| |
| Enumerator |
|---|
| DIR_WRITE |
|
| DIR_READ |
|
Definition at line 42 of file elxu_sky.c.
Issue configure EFD snapshot mailbox command.
- Description
- The OPCODE_COMMON_EXT_FAT_CONFIGURATION_SNAPSHOT mailbox command is issued. The command returns total log entries in the snapshot buffer.
- Parameters
-
- Returns
- Returns the length of snapshot EFD log entries on success; negative error code on failure.
Definition at line 268 of file elxu_sky.c.
Issue EXT_FAT_READ_STRING_TABLE mailbox command.
- Description
- The OPCODE_COMMON_EXT_FAT_READ_STRING_TABLE mailbox command is issued. The upper layer has to provide a number of bytes to be retrieved and the number of bytes already retrieved. The function returns the response param part of ioctl_common_ext_fat_read_string_table_t structure.
- Parameters
-
| device | Device descriptor. |
| tblinfo | Pointer to the param response structure. |
| tbl_info_len | Param response structure length. |
| bytes_to_read | Bytes to read. |
| bytes_read | Bytes already read. |
- Returns
- Returns 0 on success; or a negative error code value on failure.
Definition at line 387 of file elxu_sky.c.
| int ext_fat_retrieve_snapshot |
( |
elxu_device_t * |
device, |
|
|
uint8_t * |
buf, |
|
|
uint32_t |
len, |
|
|
uint32_t |
numlogs |
|
) |
| |
Issue retrieve EFD snapshot mailbox command.
- Description
- The OPCODE_COMMON_EXT_FAT_RETRIEVE_SHAPSHOT mailbox command is issued. Because of BSG limitations only 32 logs are requested per read. Upper layer executing OPCODE_COMMON_EXT_FAT_CONFIGURATION_SNAPSHOT mailbox command already knows the total number of log entries.
- Parameters
-
| device | Device descriptor. |
| buf | The EFD snapshot data buffer. |
| len | The buffer length. |
| numlogs | The number of logs to retrieve. |
- Returns
- Returns 0 on success; or a negative error code value on failure.
Definition at line 304 of file elxu_sky.c.
Return length of FAT.
- Description
- Issues MANAGE_FAT mailbox command and returns the length of the FAT.
- Parameters
-
- Returns
- Returns the length of the FAT on success; negative error code on failure.
Definition at line 156 of file elxu_sky.c.
| int fat_read |
( |
elxu_device_t * |
device, |
|
|
uint8_t * |
buffer, |
|
|
uint32_t |
bufferLength |
|
) |
| |
Read FAT.
- Description
- Reads FAT into buffer.
- Parameters
-
| device | Device descriptor. |
| buffer | Read buffer. |
| bufferLength | Read buffer length. |
- Returns
- Returns the number of bytes read on success; negative error code on failure.
Definition at line 175 of file elxu_sky.c.
Issue EFD get capabilities mailbox command.
- Description
- The COMMON_GET_EXT_FAT_CAPABILIEIS mailbox command is issued. WARNING: this command will return a variable amount of data based on the configuration. There are BSG limitations that may keep all data from being correctly returned.
- Parameters
-
| device | Device descriptor. |
| Parameter_type | parameter type (0 for default, 1 for current set). |
| params | Pointer to ext_fat_config_params_t structure. |
| paramsLength | Length of parameters structure. |
- Returns
- Returns 0 on success; or a negative error code value on failure.
Definition at line 236 of file elxu_sky.c.
| static int image_load_common |
( |
elxu_device_t * |
device, |
|
|
dir_t |
direction, |
|
|
uint32_t |
op_type, |
|
|
uint8_t * |
buffer, |
|
|
uint32_t |
bufferLength |
|
) |
| |
|
static |
Read or Write UFI flash image component.
- Description
- Read or write UFI flash image. The request is broken up into a series of requests.
- Parameters
-
| device | Pointer to device descriptor. |
| direction | Of transfer. |
| op_type | UFI flash component to update. |
| buffer | Pointer to memory buffer with flash data. |
| bufferLength | Length of flash data. |
- Returns
- Returns 0 on success; or a negative error code value on failure.
Definition at line 109 of file elxu_sky.c.
| int ufi_image_download |
( |
elxu_device_t * |
device, |
|
|
uint32_t |
op_type, |
|
|
uint8_t * |
buffer, |
|
|
uint32_t |
bufferLength |
|
) |
| |
Download UFI flash image component.
- Description
- The flash image given by 'buffer' for 'bufferLength' is passed to the flash. 'op_type' defines which flash image component is to be written.
- Parameters
-
| device | Pointer to device descriptor. |
| op_type | flash component to update. |
| buffer | Pointer to memory buffer with flash data. |
| bufferlength | Length of flash data. |
- Returns
- Returns 0 on success; or a negative error code value on failure.
Definition at line 67 of file elxu_sky.c.
| int ufi_image_upload |
( |
elxu_device_t * |
device, |
|
|
uint32_t |
op_type, |
|
|
uint8_t * |
buffer, |
|
|
uint32_t |
bufferLength |
|
) |
| |
Upload UFI flash image component.
- Description
- The flash image 'op_type' is read into 'buffer'
- Parameters
-
| device | Pointer to device descriptor. |
| op_type | flash component to update. |
| buffer | Pointer to memory buffer with flash data. |
| bufferLength | Length of flash data. |
- Returns
- Returns 0 on success; or a negative error code value on failure.
Definition at line 87 of file elxu_sky.c.