Intel Graphics System Controller Firmware Update Library
Intel Graphics System Controller Firmware Update Library
|
Modules | |
Oprom | |
Enumeration | |
Ifr | |
Data Structures | |
struct | igsc_fw_update_flags |
Macros | |
#define | IGSC_MAX_FW_STATUS_INDEX 5 |
Typedefs | |
typedef void(* | igsc_log_func_t) (enum igsc_log_level_type log_level, const char *fmt,...) |
Callback function template for printing igsc log messages. More... | |
typedef void(* | igsc_progress_func_t) (uint32_t sent, uint32_t total, void *ctx) |
Callback function template for monitor firmware update progress. More... | |
Functions | |
IGSC_EXPORT uint32_t | igsc_get_last_firmware_status (IN struct igsc_device_handle *handle) |
Return the last firmware status code. More... | |
IGSC_EXPORT const char * | igsc_translate_firmware_status (IN uint32_t firmware_status) |
Return the firmware status message corresponding to the code. More... | |
IGSC_EXPORT int | igsc_read_fw_status_reg (IN struct igsc_device_handle *handle, IN uint32_t fwsts_index, OUT uint32_t *fwsts_value) |
Read firmware status register. More... | |
IGSC_EXPORT void | igsc_set_log_callback_func (IN igsc_log_func_t log_callback_f) |
Sets log callback function. This interface is not thread-aware, Changes here may lead to crashes in multi-thread app when the thread setting callback exists without setting this call-back function to NULL while other thread from same app continues to run. More... | |
IGSC_EXPORT igsc_log_func_t | igsc_get_log_callback_func (void) |
Retrieves log callback function pointer. More... | |
IGSC_EXPORT int | igsc_device_init_by_device (IN OUT struct igsc_device_handle *handle, IN const char *device_path) |
Initializes a GSC Firmware Update device. More... | |
int | igsc_device_init_by_handle (IN OUT struct igsc_device_handle *handle, IN igsc_handle_t dev_handle) |
Initializes a GSC Firmware Update device. More... | |
IGSC_EXPORT int | igsc_device_init_by_device_info (IN OUT struct igsc_device_handle *handle, IN const struct igsc_device_info *dev_info) |
Initializes a GSC Firmware Update device. More... | |
IGSC_EXPORT int | igsc_device_get_device_info (IN struct igsc_device_handle *handle, OUT struct igsc_device_info *dev_info) |
Retrieve device information from the system. More... | |
IGSC_EXPORT int | igsc_device_update_device_info (IN struct igsc_device_handle *handle, OUT struct igsc_device_info *dev_info) |
Update device information from the firmware The subsystem device id and the subsystem vendor id, reported by the PCI system, may be different from the ones reported by the firmware and so the device information should be updated by with the values received from the firmware. More... | |
IGSC_EXPORT int | igsc_device_close (IN OUT struct igsc_device_handle *handle) |
Closes a GSC Firmware Update device. More... | |
IGSC_EXPORT int | igsc_device_fw_version (IN struct igsc_device_handle *handle, OUT struct igsc_fw_version *version) |
Retrieves the GSC Firmware Version from the device. More... | |
IGSC_EXPORT int | igsc_image_fw_version (IN const uint8_t *buffer, IN uint32_t buffer_len, OUT struct igsc_fw_version *version) |
Retrieves the Firmware Version from the provided firmware update image. More... | |
IGSC_EXPORT int | igsc_device_hw_config (IN struct igsc_device_handle *handle, OUT struct igsc_hw_config *hw_config) |
Retrieves the hw configuration from the device. More... | |
IGSC_EXPORT int | igsc_device_subsystem_ids (IN struct igsc_device_handle *handle, OUT struct igsc_subsystem_ids *ssids) |
Retrieves the subsystem ids (vid/did) from the device. More... | |
IGSC_EXPORT int | igsc_image_hw_config (IN const uint8_t *buffer, IN uint32_t buffer_len, OUT struct igsc_hw_config *hw_config) |
Retrieves the hw configurations from the provided firmware update image. More... | |
IGSC_EXPORT int | igsc_hw_config_compatible (IN const struct igsc_hw_config *image_hw_config, IN const struct igsc_hw_config *device_hw_config) |
Check whether image hardware configuration compatible with device hardware configuration. More... | |
IGSC_EXPORT int | igsc_hw_config_to_string (IN const struct igsc_hw_config *hw_config, IN char *buf, IN size_t length) |
express hw configuration in a string More... | |
IGSC_EXPORT int | igsc_device_fw_update (IN struct igsc_device_handle *handle, IN const uint8_t *buffer, IN const uint32_t buffer_len, IN igsc_progress_func_t progress_f, IN void *ctx) |
Perform the firmware update from the provided firmware update image. More... | |
IGSC_EXPORT int | igsc_device_fw_update_ex (IN struct igsc_device_handle *handle, IN const uint8_t *buffer, IN const uint32_t buffer_len, IN igsc_progress_func_t progress_f, IN void *ctx, IN struct igsc_fw_update_flags flags) |
Perform the firmware update with flags from the provided firmware update image. More... | |
IGSC_EXPORT int | igsc_iaf_psc_update (IN struct igsc_device_handle *handle, IN const uint8_t *buffer, IN const uint32_t buffer_len, IN igsc_progress_func_t progress_f, IN void *ctx) |
Perform Intel Accelerator Fabric Platform Specific Configuration (PSC) update from the provided update data image. More... | |
IGSC_EXPORT int | igsc_device_fwdata_update (IN struct igsc_device_handle *handle, IN const uint8_t *buffer, IN const uint32_t buffer_len, IN igsc_progress_func_t progress_f, IN void *ctx) |
Perform the GSC firmware in-field data update from the provided firmware update image. More... | |
IGSC_EXPORT int | igsc_device_fwdata_image_update (IN struct igsc_device_handle *handle, IN struct igsc_fwdata_image *img, IN igsc_progress_func_t progress_f, IN void *ctx) |
Perform the GSC firmware in-field data update from the provided firmware update image. More... | |
IGSC_EXPORT int | igsc_image_fwdata_init (IN OUT struct igsc_fwdata_image **img, IN const uint8_t *buffer, IN uint32_t buffer_len) |
initializes firmware data image handle from the supplied firmware data update image. More... | |
IGSC_EXPORT int | igsc_device_fwdata_version (IN struct igsc_device_handle *handle, OUT struct igsc_fwdata_version *version) |
Retrieves the GSC in-field data Firmware Version from the device. More... | |
IGSC_EXPORT int | igsc_device_fwdata_version2 (IN struct igsc_device_handle *handle, OUT struct igsc_fwdata_version2 *version) |
Retrieves the GSC in-field data Firmware Version from the device With ability to return FW Data version in second version format. More... | |
IGSC_EXPORT int | igsc_image_fwdata_version (IN struct igsc_fwdata_image *img, OUT struct igsc_fwdata_version *version) |
Retrieves the GSC in-field data Firmware version from the supplied GSC in-field data Firmware update image. More... | |
IGSC_EXPORT int | igsc_image_fwdata_version2 (IN struct igsc_fwdata_image *img, OUT struct igsc_fwdata_version2 *version) |
Retrieves the GSC in-field data Firmware version from the supplied GSC in-field data Firmware update image. With ability to return FW Data version in second version format. More... | |
IGSC_EXPORT uint8_t | igsc_fwdata_version_compare (IN struct igsc_fwdata_version *image_ver, IN struct igsc_fwdata_version *device_ver) |
Compares input GSC in-field data firmware update version to the flash one With ability to compare FW Data version in second version format. More... | |
IGSC_EXPORT uint8_t | igsc_fwdata_version_compare2 (IN struct igsc_fwdata_version2 *image_ver, IN struct igsc_fwdata_version2 *device_ver) |
Compares input GSC in-field data firmware update version to the flash one. More... | |
IGSC_EXPORT int | igsc_image_fwdata_count_devices (IN struct igsc_fwdata_image *img, OUT uint32_t *count) |
Retrieves a count of of different devices supported by the GSC in-field data firmware update image associated with the handle. More... | |
IGSC_EXPORT int | igsc_image_fwdata_supported_devices (IN struct igsc_fwdata_image *img, OUT struct igsc_fwdata_device_info *devices, IN OUT uint32_t *count) |
Retrieves a list of supported devices by the GSC in-field data firmware update image associated with the handle. The caller supplies allocated buffer devices of count size. The function returns count filled with actually returned devices. More... | |
IGSC_EXPORT int | igsc_image_fwdata_match_device (IN struct igsc_fwdata_image *img, IN struct igsc_device_info *device) |
check if GSC in-field data firmware image can be applied on the device. More... | |
IGSC_EXPORT int | igsc_image_fwdata_iterator_reset (IN struct igsc_fwdata_image *img) |
reset the iterator over supported devices More... | |
IGSC_EXPORT int | igsc_image_fwdata_iterator_next (IN struct igsc_fwdata_image *img, OUT struct igsc_fwdata_device_info *device) |
progress the supported device iterator and return the GSC in-field data firmware device info More... | |
IGSC_EXPORT int | igsc_image_fwdata_release (IN struct igsc_fwdata_image *img) |
release the fwdata image handle More... | |
IGSC_EXPORT uint8_t | igsc_fw_version_compare (IN struct igsc_fw_version *image_ver, IN struct igsc_fw_version *device_ver) |
Compares input fw version to the flash one. More... | |
IGSC_EXPORT int | igsc_device_oprom_version (IN struct igsc_device_handle *handle, IN uint32_t oprom_type, OUT struct igsc_oprom_version *version) |
Retrieves the GSC OPROM version from the device. More... | |
IGSC_EXPORT int | igsc_device_oprom_update (IN struct igsc_device_handle *handle, IN uint32_t oprom_type, IN struct igsc_oprom_image *img, IN igsc_progress_func_t progress_f, IN void *ctx) |
Perform the OPROM update from the provided image. More... | |
struct igsc_fw_update_flags |
Definition at line 632 of file igsc_lib.h.
Data Fields | ||
---|---|---|
uint32_t | force_update: 1 | |
uint32_t | reserved: 31 |
typedef void(* igsc_log_func_t) (enum igsc_log_level_type log_level, const char *fmt,...) |
Callback function template for printing igsc log messages.
log_level | log level of the error message. |
fmt | log message format |
... | variadic parameters |
Definition at line 412 of file igsc_lib.h.
typedef void(* igsc_progress_func_t) (uint32_t sent, uint32_t total, void *ctx) |
Callback function template for monitor firmware update progress.
sent | Number of bytes sent to the firmware. |
total | Total number of bytes in firmware update image. |
ctx | Context provided by caller. |
Definition at line 610 of file igsc_lib.h.
IGSC_EXPORT int igsc_device_close | ( | IN OUT struct igsc_device_handle * | handle | ) |
Closes a GSC Firmware Update device.
handle | A handle to the device. |
IGSC_EXPORT int igsc_device_fw_update | ( | IN struct igsc_device_handle * | handle, |
IN const uint8_t * | buffer, | ||
IN const uint32_t | buffer_len, | ||
IN igsc_progress_func_t | progress_f, | ||
IN void * | ctx | ||
) |
Perform the firmware update from the provided firmware update image.
handle | A handle to the device. |
buffer | A pointer to the buffer with the firmware update image. |
buffer_len | Length of the buffer with the firmware update image. |
progress_f | Pointer to the callback function for firmware update progress monitor. |
ctx | Context passed to progress_f function. |
IGSC_EXPORT int igsc_device_fw_update_ex | ( | IN struct igsc_device_handle * | handle, |
IN const uint8_t * | buffer, | ||
IN const uint32_t | buffer_len, | ||
IN igsc_progress_func_t | progress_f, | ||
IN void * | ctx, | ||
IN struct igsc_fw_update_flags | flags | ||
) |
Perform the firmware update with flags from the provided firmware update image.
handle | A handle to the device. |
buffer | A pointer to the buffer with the firmware update image. |
buffer_len | Length of the buffer with the firmware update image. |
progress_f | Pointer to the callback function for firmware update progress monitor. |
ctx | Context passed to progress_f function. |
flags | flags with which the update should be performed |
IGSC_EXPORT int igsc_device_fw_version | ( | IN struct igsc_device_handle * | handle, |
OUT struct igsc_fw_version * | version | ||
) |
Retrieves the GSC Firmware Version from the device.
handle | A handle to the device. |
version | The memory to store obtained firmware version. |
IGSC_EXPORT int igsc_device_fwdata_image_update | ( | IN struct igsc_device_handle * | handle, |
IN struct igsc_fwdata_image * | img, | ||
IN igsc_progress_func_t | progress_f, | ||
IN void * | ctx | ||
) |
Perform the GSC firmware in-field data update from the provided firmware update image.
handle | A handle to the device. |
img | A pointer to the parsed firmware data image structure. |
progress_f | Pointer to the callback function for firmware update progress monitor. |
ctx | Context passed to progress_f function. |
IGSC_EXPORT int igsc_device_fwdata_update | ( | IN struct igsc_device_handle * | handle, |
IN const uint8_t * | buffer, | ||
IN const uint32_t | buffer_len, | ||
IN igsc_progress_func_t | progress_f, | ||
IN void * | ctx | ||
) |
Perform the GSC firmware in-field data update from the provided firmware update image.
handle | A handle to the device. |
buffer | A pointer to the buffer with the firmware in-field data update image. |
buffer_len | Length of the buffer with the firmware in-field data update image. |
progress_f | Pointer to the callback function for firmware update progress monitor. |
ctx | Context passed to progress_f function. |
IGSC_EXPORT int igsc_device_fwdata_version | ( | IN struct igsc_device_handle * | handle, |
OUT struct igsc_fwdata_version * | version | ||
) |
Retrieves the GSC in-field data Firmware Version from the device.
handle | A handle to the device. |
version | The memory to store obtained firmware version. |
IGSC_EXPORT int igsc_device_fwdata_version2 | ( | IN struct igsc_device_handle * | handle, |
OUT struct igsc_fwdata_version2 * | version | ||
) |
Retrieves the GSC in-field data Firmware Version from the device With ability to return FW Data version in second version format.
handle | A handle to the device. |
version | The memory to store obtained firmware version. |
IGSC_EXPORT int igsc_device_get_device_info | ( | IN struct igsc_device_handle * | handle, |
OUT struct igsc_device_info * | dev_info | ||
) |
Retrieve device information from the system.
handle | An initialized handle to the device. |
dev_info | A device info structure |
IGSC_EXPORT int igsc_device_hw_config | ( | IN struct igsc_device_handle * | handle, |
OUT struct igsc_hw_config * | hw_config | ||
) |
Retrieves the hw configuration from the device.
handle | A handle to the device. |
hw_config | The memory to store obtained the hardware configuration |
IGSC_EXPORT int igsc_device_init_by_device | ( | IN OUT struct igsc_device_handle * | handle, |
IN const char * | device_path | ||
) |
Initializes a GSC Firmware Update device.
handle | A handle to the device. All subsequent calls to the lib's functions must be with this handle. |
device_path | A path to the device |
IGSC_EXPORT int igsc_device_init_by_device_info | ( | IN OUT struct igsc_device_handle * | handle, |
IN const struct igsc_device_info * | dev_info | ||
) |
Initializes a GSC Firmware Update device.
handle | A handle to the device. All subsequent calls to the lib's functions must be with this handle. |
dev_info | A device info structure |
int igsc_device_init_by_handle | ( | IN OUT struct igsc_device_handle * | handle, |
IN igsc_handle_t | dev_handle | ||
) |
Initializes a GSC Firmware Update device.
handle | A handle to the device. All subsequent calls to the lib's functions must be with this handle. |
dev_handle | An open device handle |
IGSC_EXPORT int igsc_device_oprom_update | ( | IN struct igsc_device_handle * | handle, |
IN uint32_t | oprom_type, | ||
IN struct igsc_oprom_image * | img, | ||
IN igsc_progress_func_t | progress_f, | ||
IN void * | ctx | ||
) |
Perform the OPROM update from the provided image.
handle | A handle to the device. |
oprom_type | OPROM part to update |
img | A pointer to the parsed oprom image structure. |
progress_f | Pointer to the callback function for OPROM update progress monitor. |
ctx | Context passed to progress_f function. |
IGSC_EXPORT int igsc_device_oprom_version | ( | IN struct igsc_device_handle * | handle, |
IN uint32_t | oprom_type, | ||
OUT struct igsc_oprom_version * | version | ||
) |
Retrieves the GSC OPROM version from the device.
handle | A handle to the device. |
oprom_type | An OPROM type requested |
version | The memory to store obtained OPROM version. |
IGSC_EXPORT int igsc_device_subsystem_ids | ( | IN struct igsc_device_handle * | handle, |
OUT struct igsc_subsystem_ids * | ssids | ||
) |
Retrieves the subsystem ids (vid/did) from the device.
handle | A handle to the device. |
ssids | The memory to store obtained subsystem ids |
IGSC_EXPORT int igsc_device_update_device_info | ( | IN struct igsc_device_handle * | handle, |
OUT struct igsc_device_info * | dev_info | ||
) |
Update device information from the firmware The subsystem device id and the subsystem vendor id, reported by the PCI system, may be different from the ones reported by the firmware and so the device information should be updated by with the values received from the firmware.
handle | An initialized handle to the device. |
dev_info | A device info structure |
IGSC_EXPORT uint8_t igsc_fw_version_compare | ( | IN struct igsc_fw_version * | image_ver, |
IN struct igsc_fw_version * | device_ver | ||
) |
Compares input fw version to the flash one.
image_ver | pointer to the update image version |
device_ver | pointer to the device version |
IGSC_EXPORT uint8_t igsc_fwdata_version_compare | ( | IN struct igsc_fwdata_version * | image_ver, |
IN struct igsc_fwdata_version * | device_ver | ||
) |
Compares input GSC in-field data firmware update version to the flash one With ability to compare FW Data version in second version format.
image_ver | pointer to the GSC in-field data firmware update image version |
device_ver | pointer to the device GSC data firmware version |
IGSC_EXPORT uint8_t igsc_fwdata_version_compare2 | ( | IN struct igsc_fwdata_version2 * | image_ver, |
IN struct igsc_fwdata_version2 * | device_ver | ||
) |
Compares input GSC in-field data firmware update version to the flash one.
image_ver | pointer to the GSC in-field data firmware update image version |
device_ver | pointer to the device GSC data firmware version |
IGSC_EXPORT uint32_t igsc_get_last_firmware_status | ( | IN struct igsc_device_handle * | handle | ) |
Return the last firmware status code.
handle | A handle to the device. |
IGSC_EXPORT igsc_log_func_t igsc_get_log_callback_func | ( | void | ) |
Retrieves log callback function pointer.
IGSC_EXPORT int igsc_hw_config_compatible | ( | IN const struct igsc_hw_config * | image_hw_config, |
IN const struct igsc_hw_config * | device_hw_config | ||
) |
Check whether image hardware configuration compatible with device hardware configuration.
image_hw_config | Stores the image hardware configuration. |
device_hw_config | Stores the device hardware configuration. |
IGSC_EXPORT int igsc_hw_config_to_string | ( | IN const struct igsc_hw_config * | hw_config, |
IN char * | buf, | ||
IN size_t | length | ||
) |
express hw configuration in a string
hw_config | Stores the hardware configuration. |
buf | to store the hw configuration in a printable null terminated string |
length | length of supplied buffer |
IGSC_EXPORT int igsc_iaf_psc_update | ( | IN struct igsc_device_handle * | handle, |
IN const uint8_t * | buffer, | ||
IN const uint32_t | buffer_len, | ||
IN igsc_progress_func_t | progress_f, | ||
IN void * | ctx | ||
) |
Perform Intel Accelerator Fabric Platform Specific Configuration (PSC) update from the provided update data image.
handle | A handle to the device. |
buffer | A pointer to the buffer with the PSC data update image. |
buffer_len | Length of the buffer with the PSC data update image. |
progress_f | Pointer to the callback function for data update progress monitor. |
ctx | Context passed to progress_f function. |
IGSC_EXPORT int igsc_image_fw_version | ( | IN const uint8_t * | buffer, |
IN uint32_t | buffer_len, | ||
OUT struct igsc_fw_version * | version | ||
) |
Retrieves the Firmware Version from the provided firmware update image.
buffer | A pointer to the buffer with the firmware update image. |
buffer_len | Length of the buffer with the firmware update image. |
version | The memory to store the obtained firmware version. |
IGSC_EXPORT int igsc_image_fwdata_count_devices | ( | IN struct igsc_fwdata_image * | img, |
OUT uint32_t * | count | ||
) |
Retrieves a count of of different devices supported by the GSC in-field data firmware update image associated with the handle.
img | GSC in-field data firmware image handle |
count | the number of devices |
IGSC_EXPORT int igsc_image_fwdata_init | ( | IN OUT struct igsc_fwdata_image ** | img, |
IN const uint8_t * | buffer, | ||
IN uint32_t | buffer_len | ||
) |
initializes firmware data image handle from the supplied firmware data update image.
img | firmware data image handle allocated by the function. |
buffer | A pointer to the buffer with the firmware data update image. |
buffer_len | Length of the buffer with the firmware data update image. |
IGSC_EXPORT int igsc_image_fwdata_iterator_next | ( | IN struct igsc_fwdata_image * | img, |
OUT struct igsc_fwdata_device_info * | device | ||
) |
progress the supported device iterator and return the GSC in-field data firmware device info
img | GSC in-field data firmware image handle |
device | GSC in-field data firmware device information. |
IGSC_EXPORT int igsc_image_fwdata_iterator_reset | ( | IN struct igsc_fwdata_image * | img | ) |
reset the iterator over supported devices
img | GSC in-field data firmware image handle |
IGSC_EXPORT int igsc_image_fwdata_match_device | ( | IN struct igsc_fwdata_image * | img, |
IN struct igsc_device_info * | device | ||
) |
check if GSC in-field data firmware image can be applied on the device.
img | GSC in-field data firmware image handle |
device | physical device info |
IGSC_EXPORT int igsc_image_fwdata_release | ( | IN struct igsc_fwdata_image * | img | ) |
release the fwdata image handle
img | fwdata image handle |
IGSC_EXPORT int igsc_image_fwdata_supported_devices | ( | IN struct igsc_fwdata_image * | img, |
OUT struct igsc_fwdata_device_info * | devices, | ||
IN OUT uint32_t * | count | ||
) |
Retrieves a list of supported devices by the GSC in-field data firmware update image associated with the handle. The caller supplies allocated buffer devices
of count
size. The function returns count
filled with actually returned devices.
img | GSC in-field data firmware image handle |
devices | list of devices supported by the GSC in-field data firmware image |
count | in the number of devices allocated |
IGSC_EXPORT int igsc_image_fwdata_version | ( | IN struct igsc_fwdata_image * | img, |
OUT struct igsc_fwdata_version * | version | ||
) |
Retrieves the GSC in-field data Firmware version from the supplied GSC in-field data Firmware update image.
img | GSC in-field data Firmware image handle |
version | The memory to store the obtained GSC in-field data Firmware version. |
IGSC_EXPORT int igsc_image_fwdata_version2 | ( | IN struct igsc_fwdata_image * | img, |
OUT struct igsc_fwdata_version2 * | version | ||
) |
Retrieves the GSC in-field data Firmware version from the supplied GSC in-field data Firmware update image. With ability to return FW Data version in second version format.
img | GSC in-field data Firmware image handle |
version | The memory to store the obtained GSC in-field data Firmware version. |
IGSC_EXPORT int igsc_image_hw_config | ( | IN const uint8_t * | buffer, |
IN uint32_t | buffer_len, | ||
OUT struct igsc_hw_config * | hw_config | ||
) |
Retrieves the hw configurations from the provided firmware update image.
buffer | A pointer to the buffer with the firmware update image. |
buffer_len | Length of the buffer with the firmware update image. |
hw_config | The memory to store obtained the hardware configuration |
IGSC_EXPORT int igsc_read_fw_status_reg | ( | IN struct igsc_device_handle * | handle, |
IN uint32_t | fwsts_index, | ||
OUT uint32_t * | fwsts_value | ||
) |
Read firmware status register.
handle | A handle to the device. |
fwsts_index | index of the firmware status register (0..IGSC_MAX_FW_STATUS_INDEX) |
fwsts_value | returned firmware status values |
IGSC_EXPORT void igsc_set_log_callback_func | ( | IN igsc_log_func_t | log_callback_f | ) |
Sets log callback function. This interface is not thread-aware, Changes here may lead to crashes in multi-thread app when the thread setting callback exists without setting this call-back function to NULL while other thread from same app continues to run.
log_callback_f | pointer to the callback function for igsc library log messages. passing NULL to this will disable logging callback function. |
IGSC_EXPORT const char* igsc_translate_firmware_status | ( | IN uint32_t | firmware_status | ) |
Return the firmware status message corresponding to the code.
firmware_status | code of firmware status |