firmware_status(3)
๐ NAME ๐
okay so this is firmware_status(3) from the Library Functions Manual, and the page is all about firmware_status โ yes bestie, that's the name, and it's serving main-character energy. ๐ This page is long, so it comes in three parts, and this is part 1.
โจ SYNOPSIS โจ
The synopsis is giving โlots of functions,โ and we are not skipping a single one. No cap. ๐
๐ฆ Topics
OpromEnumerationIfr
๐ฆ 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. ๐ฌtypedef void(* igsc_progress_func_t) (uint32_t sent, uint32_t total, void *ctx)โ Callback function template for monitor firmware update progress. ๐
๐ฆ Functions
IGSC_EXPORT uint32_t igsc_get_last_firmware_status (IN struct igsc_device_handle *handle)โ Return the last firmware status code. ๐IGSC_EXPORT const char * igsc_translate_firmware_status (IN uint32_t firmware_status)โ Return the firmware status message corresponding to the code. ๐ฃ๏ธ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. ๐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 toNULLwhile other thread from same app continues to run. โ ๏ธIGSC_EXPORT igsc_log_func_t igsc_get_log_callback_func (void)โ Retrieves log callback function pointer. ๐ช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. ๐ ๏ธ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. ๐ ๏ธ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. ๐ ๏ธ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. ๐พ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. ๐IGSC_EXPORT int igsc_device_close (IN OUT struct igsc_device_handle *handle)โ Closes a GSC Firmware Update device. ๐ช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. ๐ท๏ธ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. ๐ผ๏ธ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. โ๏ธ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. ๐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. โ๏ธ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. โ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. ๐งต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. ๐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. ๐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. ๐ง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. ๐ฆ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. ๐ฆ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. ๐งฐ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. ๐ท๏ธ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. ๐ท๏ธ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. ๐ผ๏ธ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. ๐ผ๏ธ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. โ๏ธ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. โ๏ธ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. ๐ข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. ๐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. ๐ฏIGSC_EXPORT int igsc_image_fwdata_iterator_reset (IN struct igsc_fwdata_image *img)โ reset the iterator over supported devices. ๐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. โก๏ธIGSC_EXPORT int igsc_image_fwdata_release (IN struct igsc_fwdata_image *img)โ release the fwdata image handle. ๐งน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. โ๏ธ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. ๐ท๏ธ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. ๐
๐ธ DETAILED DESCRIPTION ๐ธ
The original page doesn't drop extra prose in this section, so we're sliding straight into the data structure docs. ๐
๐ DATA STRUCTURE DOCUMENTATION ๐
๐ struct igsc_fw_update_flags
Definition at line 647 of file igsc_lib.h. ๐
Data Fields:
uint32_t force_update: 1uint32_t reserved: 31
๐ MACRO DEFINITION DOCUMENTATION ๐
๐ธ #define IGSC_MAX_FW_STATUS_INDEX 5
Definition at line 404 of file igsc_lib.h. ๐
๐ง TYPEDEF DOCUMENTATION ๐ง
๐ซ igsc_log_func_t
typedef void(* igsc_log_func_t) (enum igsc_log_level_type log_level, const char *fmt,...) โ Callback function template for printing igsc log messages. ๐ฌ
Parameters:
log_levelโ log level of the error message.fmtโ log message format....โ variadic parameters.
Definition at line 427 of file igsc_lib.h. ๐
๐ซ igsc_progress_func_t
typedef void(* igsc_progress_func_t) (uint32_t sent, uint32_t total, void *ctx) โ Callback function template for monitor firmware update progress. ๐
Parameters:
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 625 of file igsc_lib.h. ๐
๐ FUNCTION DOCUMENTATION ๐
This part only has one function documented in detail, bestie โ yes, just igsc_device_close in this chunk. The rest of the synopsis is above. ๐
๐
igsc_device_close
IGSC_EXPORT int igsc_device_close (IN OUT struct igsc_device_handle *
handle)
Closes a GSC Firmware Update device. ๐ซถ
Parameters:
handleโ A handle to the device.
Returns:
IGSC_SUCCESSif successful, otherwise error code.
igsc_device_fw_update
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)
Okay so this is the classic โpush the firmware update image onto the deviceโ move. ๐ It performs the firmware update from the provided firmware update image.
Parameters:
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 theprogress_ffunction.
Returns: <pink>IGSC_SUCCESS</pink> if successful, otherwise error code. โจ
igsc_device_fw_update_ex
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)
This one is the firmware update with flags โ same firmware update image energy, but with flags deciding how the update should be performed. ๐
Parameters:
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 theprogress_ffunction.flagsโ flags with which the update should be performed.
Returns: IGSC_SUCCESS if successful, otherwise error code. ๐ซถ
igsc_device_fw_version
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. ๐
Parameters:
handleโ a handle to the device.versionโ the memory to store the obtained firmware version.
Returns: IGSC_SUCCESS if successful, otherwise error code. ๐ธ
igsc_device_fwdata_image_update
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)
Performs the GSC firmware in-field data update from the provided firmware update image. ๐ฆ
Parameters:
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 theprogress_ffunction.
Returns: IGSC_SUCCESS if successful, otherwise error code. โญ
igsc_device_fwdata_update
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)
Performs the GSC firmware in-field data update from the provided firmware update image โ this time youโre handing over the raw buffer. ๐
Parameters:
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 theprogress_ffunction.
Returns: IGSC_SUCCESS if successful, otherwise error code. ๐
igsc_device_fwdata_version
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. ๐ง
Parameters:
handleโ a handle to the device.versionโ the memory to store the obtained firmware version.
Returns: IGSC_SUCCESS if successful, otherwise error code. ๐
igsc_device_fwdata_version2
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 the ability to return FW Data version in second version format. โจ
Parameters:
handleโ a handle to the device.versionโ the memory to store the obtained firmware version.
Returns: IGSC_SUCCESS if successful, otherwise error code. ๐
igsc_device_get_device_info
IGSC_EXPORT int igsc_device_get_device_info (IN struct igsc_device_handle * handle, OUT struct igsc_device_info * dev_info)
Retrieves device information from the system. ๐
Parameters:
handleโ an initialized handle to the device.dev_infoโ a device info structure.
Returns: IGSC_SUCCESS if successful, otherwise error code. ๐
igsc_device_hw_config
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. ๐ฅ
Parameters:
handleโ a handle to the device.hw_configโ the memory to store the obtained hardware configuration.
Returns:
IGSC_SUCCESSif successful, otherwise error code.IGSC_ERROR_NOT_SUPPORTEDif feature is not supported.
igsc_device_init_by_device
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. ๐
Parameters:
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.
Returns: IGSC_SUCCESS if successful, otherwise error code. ๐
igsc_device_init_by_device_info
IGSC_EXPORT int igsc_device_init_by_device_info (IN OUT struct igsc_device_handle * handle, IN const struct igsc_device_info * dev_info)
Also initializes a GSC Firmware Update device โ this time using device info. ๐ฆ
Parameters:
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.
Returns: IGSC_SUCCESS if successful, otherwise error code. ๐
igsc_device_init_by_handle
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 from an already-open device handle. ๐
Parameters:
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.
Returns: IGSC_SUCCESS if successful, otherwise error code. ๐ซถ
igsc_device_oprom_update
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)
Performs the OPROM update from the provided image. ๐ฅ
Parameters:
handleโ a handle to the device.oprom_typeโ OPROM part to update.- See also:
igsc_oprom_type 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 theprogress_ffunction.
Returns: IGSC_SUCCESS if successful, otherwise error code. โญ
igsc_device_oprom_version
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. ๐ง
Parameters:
handleโ a handle to the device.oprom_typeโ an OPROM type requested.- See also:
enum igsc_oprom_type versionโ the memory to store the obtained OPROM version.
Returns: IGSC_SUCCESS if successful, otherwise error code. ๐ธ
igsc_device_subsystem_ids
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. ๐
Parameters:
handleโ a handle to the device.ssidsโ the memory to store the obtained subsystem ids.
Returns:
IGSC_SUCCESSif successful, otherwise error code.IGSC_ERROR_NOT_SUPPORTEDif feature is not supported.
igsc_device_update_device_info
IGSC_EXPORT int igsc_device_update_device_info (IN struct igsc_device_handle * handle, OUT struct igsc_device_info * dev_info)
Updates 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, so the device information should be updated with the values received from the firmware.
Parameters:
handleโ an initialized handle to the device.dev_infoโ a device info structure.
Returns: IGSC_SUCCESS if successful, otherwise error code. ๐
igsc_fw_version_compare
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. ๐ฆ
Parameters:
image_verโ pointer to the update image version.device_verโ pointer to the device version.
Returns:
IGSC_VERSION_NOT_COMPATIBLEif update image is for a different platform.IGSC_VERSION_NEWERif update image version is newer than the one on the device.IGSC_VERSION_EQUALif update image version is equal to the one on the device.IGSC_VERSION_OLDERif update image version is older than the one on the device.IGSC_VERSION_ERRORif NULL parameters were provided.
igsc_fwdata_version_compare
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 the ability to compare FW Data version in second version format. ๐
Parameters:
image_verโ pointer to the GSC in-field data firmware update image version.device_verโ pointer to the device GSC data firmware version.
Returns:
IGSC_FWDATA_VERSION_REJECT_VCNif image VCN version is bigger than device VCN.IGSC_FWDATA_VERSION_REJECT_OEM_MANUF_DATA_VERSIONif OEM manufacturing data version is not bigger than device OEM version.IGSC_FWDATA_VERSION_REJECT_DIFFERENT_PROJECTif major version is different from device major version.IGSC_FWDATA_VERSION_ACCEPTif VCN version is equal to the deviceโs one, and OEM is bigger.IGSC_FWDATA_VERSION_OLDER_VCNif VCN version is smaller than the one on the device.
igsc_fwdata_version_compare2
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. ๐ฅ
Parameters:
image_verโ pointer to the GSC in-field data firmware update image version.device_verโ pointer to the device GSC data firmware version.
Returns:
IGSC_FWDATA_VERSION_REJECT_VCNif image VCN version is bigger than device VCN.IGSC_FWDATA_VERSION_REJECT_OEM_MANUF_DATA_VERSIONif OEM manufacturing data version is not bigger than device OEM version or equal in ver2 comparison.IGSC_FWDATA_VERSION_REJECT_DIFFERENT_PROJECTif major version is different from device major version.IGSC_FWDATA_VERSION_ACCEPTif VCN version is equal to the deviceโs one, and OEM is bigger.IGSC_FWDATA_VERSION_OLDER_VCNif VCN version is smaller than the one on the device.IGSC_FWDATA_VERSION_REJECT_WRONG_FORMATโ if the version format is the wrong one or, like, straight-up incompatible ๐ฌIGSC_FWDATA_VERSION_REJECT_ARB_SVNโ if the update image's SVN version is smaller than the one already chilling on the device (no downgrades, bestie ๐ )
igsc_get_last_firmware_status()
IGSC_EXPORT uint32_t igsc_get_last_firmware_status (IN struct igsc_device_handle * handle)
Returns the last firmware status code, bestie. That's it, that's the whole vibe.
Parameters
handleโ a handle to the device โจ
Returns
The last firmware status code.
igsc_get_log_callback_func()
IGSC_EXPORT igsc_log_func_t igsc_get_log_callback_func (void )
Grabs you the log callback function pointer, no cap.
Returns
The log callback function pointer ๐ธ
igsc_hw_config_compatible()
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)
The vibe check for hardware: is the image's hardware config compatible with the device's hardware config? ๐
Parameters
image_hw_configโ stores the image hardware configurationdevice_hw_configโ stores the device hardware configuration
Returns
IGSC_SUCCESS if the image hardware configuration is compatible with the device ๐ซถ
igsc_hw_config_to_string()
IGSC_EXPORT int igsc_hw_config_to_string (IN const struct igsc_hw_config * hw_config, IN char * buf, IN size_t length)
Expresses the hw configuration as a string โ turning hardware tea into readable tea โโจ
Parameters
hw_configโ stores the hardware configurationbufโ where you want the hw configuration stored as a printable, null-terminated stringlengthโ the length of the supplied buffer
Returns
The number of bytes in the buffer, excluding the null terminator โ or < 0 on error ๐ญ
igsc_iaf_psc_update()
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)
Performs an Intel Accelerator Fabric Platform Specific Configuration (PSC) update from the update data image you hand it ๐ฅ
Parameters
handleโ a handle to the devicebufferโ pointer to the buffer holding the PSC data update imagebuffer_lenโ length of the buffer with the PSC data update imageprogress_fโ pointer to the callback function that monitors data update progress ๐ctxโ context passed along to theprogress_ffunction
Returns
IGSC_SUCCESSif it worked- otherwise, an error code ๐
igsc_image_fw_version()
IGSC_EXPORT int igsc_image_fw_version (IN const uint8_t * buffer, IN uint32_t buffer_len, OUT struct igsc_fw_version * version)
Pulls the Firmware Version out of the firmware update image you gave it. Detective work, but make it firmware ๐ต๏ธโโ๏ธ๐
Parameters
bufferโ pointer to the buffer with the firmware update imagebuffer_lenโ length of the buffer with the firmware update imageversionโ the memory where the obtained firmware version gets stored
Returns
IGSC_SUCCESS if successful, otherwise an error code.
igsc_image_fwdata_count_devices()
IGSC_EXPORT int igsc_image_fwdata_count_devices (IN struct igsc_fwdata_image * img, OUT uint32_t * count)
Gets you a count of the different devices supported by the GSC in-field data firmware update image tied to the handle. Headcount, but for hardware ๐งฎโจ
Parameters
imgโ GSC in-field data firmware image handlecountโ the number of devices
Returns
IGSC_SUCCESS if successful, otherwise an error code.
igsc_image_fwdata_init()
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 a firmware data image handle from the firmware data update image you supply. Glow-up for your pointer, honestly ๐ฆ
Parameters
imgโ firmware data image handle allocated by the function (yes, it allocates it for you ๐)bufferโ pointer to the buffer with the firmware data update imagebuffer_lenโ length of the buffer with the firmware data update image
Returns
IGSC_SUCCESS if successful, otherwise an error code.
igsc_image_fwdata_iterator_next()
IGSC_EXPORT int igsc_image_fwdata_iterator_next (IN struct igsc_fwdata_image * img, OUT struct igsc_fwdata_device_info * device)
Advances the supported-device iterator and hands back the GSC in-field data firmware device info. Next, please ๐
Parameters
imgโ GSC in-field data firmware image handledeviceโ GSC in-field data firmware device information
Returns
IGSC_SUCCESS if successful, otherwise an error code.
igsc_image_fwdata_iterator_reset()
IGSC_EXPORT int igsc_image_fwdata_iterator_reset (IN struct igsc_fwdata_image * img)
Resets the iterator over supported devices. Rewind era ๐๐
Parameters
imgโ GSC in-field data firmware image handle
Returns
IGSC_SUCCESS if successful, otherwise an error code.
igsc_image_fwdata_match_device()
IGSC_EXPORT int igsc_image_fwdata_match_device (IN struct igsc_fwdata_image * img, IN struct igsc_device_info * device)
Checks whether the GSC in-field data firmware image can actually be applied on the device. Compatibility check, but make it official โ
Parameters
imgโ GSC in-field data firmware image handledeviceโ physical device info
Returns
IGSC_SUCCESSif the device is on the list of supported devicesIGSC_ERROR_DEVICE_NOT_FOUNDotherwise ๐
igsc_image_fwdata_release()
IGSC_EXPORT int igsc_image_fwdata_release (IN struct igsc_fwdata_image * img)
Releases the fwdata image handle. Cleanup era, we love to see it ๐งน๐
Parameters
imgโ fwdata image handle
Returns
IGSC_SUCCESS if successful, otherwise an error code.
igsc_image_fwdata_supported_devices()
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 the list of devices supported by the GSC in-field data firmware update image tied to the handle. You (the caller) bring a pre-allocated devices buffer of count size, and the function returns count filled with the devices it actually returned. So it's an in-out situation, very main character of it ๐ซถ
Parameters
imgโ GSC in-field data firmware image handledevicesโ list of devices supported by the GSC in-field data firmware imagecountโ in: the number of devices allocated
Returns
IGSC_SUCCESS if successful, otherwise an error code.
igsc_image_fwdata_version()
IGSC_EXPORT int igsc_image_fwdata_version (IN struct igsc_fwdata_image * img, OUT struct igsc_fwdata_version * version)
Pulls the GSC in-field data Firmware version from the supplied GSC in-field data Firmware update image ๐
Parameters
imgโ GSC in-field data Firmware image handleversionโ the memory where the obtained GSC in-field data Firmware version gets stored
Returns
IGSC_SUCCESS if successful, otherwise an error code.
igsc_image_fwdata_version2()
IGSC_EXPORT int igsc_image_fwdata_version2 (IN struct igsc_fwdata_image * img, OUT struct igsc_fwdata_version2 * version)
Same idea as above โ grabs the GSC in-field data Firmware version from the supplied GSC in-field data Firmware update image โ except this one can return the FW Data version in the second version format ๐ฅโจ
Parameters
imgโ GSC in-field data Firmware image handleversionโ the memory where the obtained GSC in-field data Firmware version gets stored
Returns
IGSC_SUCCESS if successful, otherwise an error code.
igsc_image_hw_config()
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 firmware update image you provided ๐
Parameters
bufferโ pointer to the buffer with the firmware update imagebuffer_lenโ length of the buffer with the firmware update imagehw_configโ the memory where the obtained hardware configuration gets stored
Returns
IGSC_SUCCESS if successful, otherwise an error code.
igsc_read_fw_status_reg()
IGSC_EXPORT int igsc_read_fw_status_reg (IN struct igsc_device_handle * handle, IN uint32_t fwsts_index, OUT uint32_t * fwsts_value)
Reads the firmware status register. Peeking behind the curtain, but legally ๐๐
Parameters
handleโ a handle to the devicefwsts_indexโ index of the firmware status register,(0..IGSC_MAX_FW_STATUS_INDEX)fwsts_valueโ the returned firmware status values
Returns
IGSC_SUCCESS if successful, otherwise an error code.
igsc_set_log_callback_func()
IGSC_EXPORT void igsc_set_log_callback_func (IN igsc_log_func_t log_callback_f)
Sets the log callback function.
โ ๏ธ Okay bestie, listen. This interface is not thread-aware. Changing stuff here can legitimately crash a multi-threaded app โ specifically when the thread that sets the callback exits without setting this call-back function to NULL while another thread from the same app keeps running. So like... be careful, fr fr ๐ญ๐
Parameters
log_callback_fโ pointer to the callback function for igsc library log messages. PassingNULLto this disables the logging callback function ๐ โโ๏ธ
Returns
void.
igsc_translate_firmware_status()
IGSC_EXPORT const char * igsc_translate_firmware_status (IN uint32_t firmware_status)
Returns the firmware status message that corresponds to the code. Translating firmware feelings into words ๐ฃ๏ธ๐ฌ
Parameters
firmware_statusโ code of firmware status
Returns
The firmware status message corresponding to the code.
๐ Author
Generated automatically by Doxygen for the Intel Graphics System Controller Firmware Update Library, straight from the source code. So no human wrote the original โ it's giving "the compiler wrote my essay" energy ๐คโจ
And that's a wrap on firmware_status(3), bestie!! ๐ The footer down at the bottom of the real page is just the source/version and date line โ the Intel Graphics System Controller Firmware Update library, page firmware_status(3) โ so I'm tipping my crown to it here instead of copy-pasting the whole thing. Go forth and update that firmware responsibly ๐
๐ฅ๐ฆ
๐ฆ where this page comes from
- epel 10: intel-gsc-devel 1.3.1-1.el10_3 ยท Apache-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms