igsc_lib.h - Man Page

Intel Graphics System Controller Library API.

Synopsis

#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>

Data Structures

struct igsc_fw_version
struct igsc_ifr_bin_version
struct igsc_psc_version
struct igsc_oem_version
struct igsc_fwdata_version
struct igsc_fwdata_version2
struct igsc_oprom_version
struct igsc_oprom_device_info
struct igsc_oprom_device_info_4ids
struct igsc_fwdata_device_info
struct igsc_device_info
struct igsc_hw_config
structure to store hw configuration
struct igsc_subsystem_ids
structure to store device subsystem ids
struct igsc_device_handle
struct igsc_fw_update_flags
struct igsc_gfsp_tile_mem_err
struct igsc_gfsp_mem_err
struct igsc_device_mbist_ppr_status
struct igsc_ppr_status

Macros

#define BIT(x)
#define UNUSED_VAR(_v)
#define IGSC_INVALID_DEVICE_HANDLE   ((void *)0)
#define IGSC_MAX_OEM_VERSION_LENGTH   256
#define IGSC_FWDATA_FORMAT_VERSION_1   0x1
#define IGSC_FWDATA_FORMAT_VERSION_2   0x2
#define IGSC_FWDATA_FITB_VALID_MASK   0x1
#define IGSC_OPROM_VER_SIZE   8
#define IGSC_INFO_NAME_SIZE   256
#define IGSC_HW_CONFIG_BLOB_SIZE   48
#define IGSC_MAX_IMAGE_SIZE   (8*1024*1024) /* 8M */
Maximum firmware image size.
#define IGSC_MAX_FW_STATUS_INDEX   5

IGSC_ERRORS
The Library return codes

#define IGSC_ERROR_BASE   0x0000U
#define IGSC_SUCCESS   (IGSC_ERROR_BASE + 0)
#define IGSC_ERROR_INTERNAL   (IGSC_ERROR_BASE + 1)
#define IGSC_ERROR_NOMEM   (IGSC_ERROR_BASE + 2)
#define IGSC_ERROR_INVALID_PARAMETER   (IGSC_ERROR_BASE + 3)
#define IGSC_ERROR_DEVICE_NOT_FOUND   (IGSC_ERROR_BASE + 4)
#define IGSC_ERROR_BAD_IMAGE   (IGSC_ERROR_BASE + 5)
#define IGSC_ERROR_PROTOCOL   (IGSC_ERROR_BASE + 6)
#define IGSC_ERROR_BUFFER_TOO_SMALL   (IGSC_ERROR_BASE + 7)
#define IGSC_ERROR_INVALID_STATE   (IGSC_ERROR_BASE + 8)
#define IGSC_ERROR_NOT_SUPPORTED   (IGSC_ERROR_BASE + 9)
#define IGSC_ERROR_INCOMPATIBLE   (IGSC_ERROR_BASE + 10)
#define IGSC_ERROR_TIMEOUT   (IGSC_ERROR_BASE + 11)
#define IGSC_ERROR_PERMISSION_DENIED   (IGSC_ERROR_BASE + 12)
#define IGSC_ERROR_BUSY   (IGSC_ERROR_BASE + 13)

Typedefs

typedef void * igsc_handle_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.
typedef void(* igsc_progress_func_t) (uint32_t sent, uint32_t total, void *ctx)
Callback function template for monitor firmware update progress.

Enumerations

enum igsc_log_level_type { IGSC_LOG_LEVEL_ERROR = 0, IGSC_LOG_LEVEL_DEBUG = 1, IGSC_LOG_LEVEL_TRACE = 2, IGSC_LOG_LEVEL_MAX = 3 }
enum igsc_image_type { IGSC_IMAGE_TYPE_UNKNOWN = 0, IGSC_IMAGE_TYPE_GFX_FW, IGSC_IMAGE_TYPE_OPROM, IGSC_IMAGE_TYPE_OPROM_CODE, IGSC_IMAGE_TYPE_OPROM_DATA, IGSC_IMAGE_TYPE_FW_DATA }
enum igsc_version_compare_result { IGSC_VERSION_ERROR = 0, IGSC_VERSION_NOT_COMPATIBLE = 1, IGSC_VERSION_NEWER = 2, IGSC_VERSION_EQUAL = 3, IGSC_VERSION_OLDER = 4 }
enum igsc_fwdata_version_compare_result { IGSC_FWDATA_VERSION_REJECT_VCN = 0, IGSC_FWDATA_VERSION_REJECT_OEM_MANUF_DATA_VERSION = 1, IGSC_FWDATA_VERSION_REJECT_DIFFERENT_PROJECT = 2, IGSC_FWDATA_VERSION_ACCEPT = 3, IGSC_FWDATA_VERSION_OLDER_VCN = 4, IGSC_FWDATA_VERSION_REJECT_WRONG_FORMAT = 5, IGSC_FWDATA_VERSION_REJECT_ARB_SVN = 6 }
enum igsc_oprom_type { IGSC_OPROM_NONE = 0, IGSC_OPROM_DATA = 0x01, IGSC_OPROM_CODE = 0x02 }
enum igsc_ifr_tiles { IGSC_IFR_TILE_0 = 0x0001, IGSC_IFR_TILE_1 = 0x0002 }
enum igsc_supported_ifr_tests { IGSC_IFR_SUPPORTED_TEST_SCAN = 0x00000001, IGSC_IFR_SUPPORTED_TEST_ARRAY = 0x00000002 }
enum igsc_ifr_repairs { IGSC_IFR_REPAIR_DSS_EN = 0x00000001, IGSC_IFR_REPAIR_ARRAY = 0x00000002 }
enum igsc_ifr_pending_reset { IGSC_IFR_PENDING_RESET_NONE = 0, IGSC_IFR_PENDING_RESET_SHALLOW = 1, IGSC_IFR_PENDING_RESET_DEEP = 2 }
enum igsc_ifr_array_scan_test_status_mask { IGSC_ARRAY_SCAN_STATUS_TEST_EXECUTION_MASK = BIT(0), IGSC_ARRAY_SCAN_STATUS_TEST_RESULT_MASK = BIT(1), IGSC_ARRAY_SCAN_STATUS_FOUND_HW_ERROR_MASK = BIT(2), IGSC_ARRAY_SCAN_STATUS_HW_REPAIR_MASK = BIT(3) }
enum igsc_ifr_array_scan_extended_status { IGSC_IFR_EXT_STS_PASSED = 0, IGSC_IFR_EXT_STS_SHALLOW_RST_PENDING = 1, IGSC_IFR_EXT_STS_DEEP_RST_PENDING = 2, IGSC_IFR_EXT_STS_NO_REPAIR_NEEDED = 3, IGSC_IFR_EXT_STS_REPAIRED_ARRAY = 4, IGSC_IFR_EXT_STS_REPAIRED_SUBSLICE = 5, IGSC_IFR_EXT_STS_REPAIRED_ARRAY_SUBSLICE = 6, IGSC_IFR_EXT_STS_REPAIRED_ARRAY_FAULTY_SUBSLICE = 7, IGSC_IFR_EXT_STS_REPAIR_NOT_SUPPORTED = 8, IGSC_IFR_EXT_STS_NO_RESORCES = 9, IGSC_IFR_EXT_STS_NON_SUBSLICE_IN_ARRAY = 10, IGSC_IFR_EXT_STS_NON_SUBSLICE_IN_SCAN = 11, IGSC_IFR_EXT_STS_TEST_ERROR = 12 }
enum igsc_ifr_supported_tests_masks { IGSC_IFR_SUPPORTED_TESTS_ARRAY_AND_SCAN = BIT(0), IGSC_IFR_SUPPORTED_TESTS_MEMORY_PPR = BIT(1) }
enum igsc_ifr_hw_capabilities_masks { IGSC_IRF_HW_CAPABILITY_IN_FIELD_REPAIR = BIT(0), IGSC_IRF_HW_CAPABILITY_FULL_EU_MODE_SWITCH = BIT(1) }
enum igsc_ifr_previous_errors_masks { IGSC_IFR_PREV_ERROR_DSS_ERR_ARR_STS_PKT = BIT(0), IGSC_IFR_PREV_ERROR_NON_DSS_ERR_ARR_STS_PKT = BIT(1), IGSC_IFR_PREV_ERROR_DSS_REPAIRABLE_PKT = BIT(2), IGSC_IFR_PREV_ERROR_DSS_UNREPAIRABLE_PKT = BIT(3), IGSC_IFR_PREV_ERROR_NON_DSS_REPAIRABLE_PKT = BIT(4), IGSC_IFR_PREV_ERROR_NON_DSS_UNREPAIRABLE_PKT = BIT(5), IGSC_IFR_PREV_ERROR_DSS_ERR_SCAN_STS_PKT = BIT(6), IGSC_IFR_PREV_ERROR_NON_DSS_ERR_SCAN_STS_PKT = BIT(7), IGSC_IFR_PREV_ERROR_NOT_ENOUGH_SPARE_DSS = BIT(8), IGSC_IFR_PREV_ERROR_MIS_DSS_STS_PKT_ON_ARR = BIT(9), IGSC_IFR_PREV_ERROR_MIS_NON_DSS_STS_PKT_ON_ARR = BIT(10), IGSC_IFR_PREV_ERROR_MIS_DSS_STS_PKT_ON_SCAN = BIT(11), IGSC_IFR_PREV_ERROR_MIS_NON_DSS_STS_PKT_ON_SCAN = BIT(12), IGSC_IFR_PREV_ERROR_DSS_ENG_DONE_CLR_IN_ARR = BIT(13), IGSC_IFR_PREV_ERROR_NON_DSS_ENG_DONE_CLR_IN_ARR = BIT(14), IGSC_IFR_PREV_ERROR_UNEXPECTED = BIT(31) }
enum igsc_ifr_repairs_mask { IGSC_IFR_REPAIRS_MASK_DSS_EN_REPAIR = BIT(0), IGSC_IFR_REPAIRS_MASK_ARRAY_REPAIR = BIT(1), IGSC_IFR_REPAIRS_MASK_FAILURE = BIT(2) }
enum igsc_gfsp_health_indicators { IGSC_HEALTH_INDICATOR_HEALTHY = 0, IGSC_HEALTH_INDICATOR_DEGRADED = 1, IGSC_HEALTH_INDICATOR_CRITICAL = 2, IGSC_HEALTH_INDICATOR_REPLACE = 3 }
Gets memory health indicator.
enum csc_late_binding_flags { CSC_LATE_BINDING_FLAGS_IS_PERSISTENT_MASK = 0x1 }
enum csc_late_binding_type { CSC_LATE_BINDING_TYPE_INVALID = 0, CSC_LATE_BINDING_TYPE_FAN_TABLE, CSC_LATE_BINDING_TYPE_VR_CONFIG }
Sends Late Binding HECI command.
enum csc_late_binding_status { CSC_LATE_BINDING_STATUS_SUCCESS = 0, CSC_LATE_BINDING_STATUS_4ID_MISMATCH = 1, CSC_LATE_BINDING_STATUS_ARB_FAILURE = 2, CSC_LATE_BINDING_STATUS_GENERAL_ERROR = 3, CSC_LATE_BINDING_STATUS_INVALID_PARAMS = 4, CSC_LATE_BINDING_STATUS_INVALID_SIGNATURE = 5, CSC_LATE_BINDING_STATUS_INVALID_PAYLOAD = 6, CSC_LATE_BINDING_STATUS_TIMEOUT = 7 }
enum igsc_ppr_test_status_mask { IGSC_PPR_STATUS_TEST_EXECUTED_MASK = 0x1, IGSC_PPR_STATUS_TEST_SUCCESS_MASK = 0x2, IGSC_PPR_STATUS_FOUND_HW_ERROR_MASK = 0x4, IGSC_PPR_STATUS_HW_ERROR_REPAIRED_MASK = 0x8 }

Functions

IGSC_EXPORT void igsc_set_log_level (unsigned int log_level)
Sets log level.
IGSC_EXPORT unsigned int igsc_get_log_level (void)
Retrieves current log level.
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 to NULL while 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.
IGSC_EXPORT int igsc_image_oprom_init (IN OUT struct igsc_oprom_image **img, IN const uint8_t *buffer, IN uint32_t buffer_len)
initializes OPROM image handle from the supplied OPROM update image.
IGSC_EXPORT int igsc_image_oprom_version (IN struct igsc_oprom_image *img, IN enum igsc_oprom_type type, OUT struct igsc_oprom_version *version)
Retrieves the OPROM version from the supplied OPROM update image.
IGSC_EXPORT int igsc_image_oprom_type (IN struct igsc_oprom_image *img, IN uint32_t *oprom_type)
Retrieves the OPROM type from the provided OPROM update image.
IGSC_EXPORT int igsc_image_oprom_count_devices (IN struct igsc_oprom_image *img, OUT uint32_t *count)
Retrieves a count of of different devices supported by the OPROM update image associated with the handle.
IGSC_EXPORT int igsc_image_oprom_supported_devices (IN struct igsc_oprom_image *img, OUT struct igsc_oprom_device_info *devices, IN OUT uint32_t *count)
Retrieves a list of supported devices by the OPROM 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_oprom_match_device (IN struct igsc_oprom_image *img, IN enum igsc_oprom_type request_type, IN struct igsc_device_info *device)
check if oprom image can be applied on the device.
IGSC_EXPORT int igsc_image_oprom_iterator_reset (IN struct igsc_oprom_image *img)
reset the iterator over supported devices
IGSC_EXPORT int igsc_image_oprom_iterator_next (IN struct igsc_oprom_image *img, OUT struct igsc_oprom_device_info *device)
progress the supported device iterator and return the oprom device info
IGSC_EXPORT int igsc_image_oprom_count_devices_typed (IN struct igsc_oprom_image *img, IN uint32_t request_type, OUT uint32_t *count)
Retrieves a count of of different devices supported by the OPROM update image associated with the handle, based on image type.
IGSC_EXPORT int igsc_image_oprom_supported_devices_typed (IN struct igsc_oprom_image *img, IN uint32_t request_type, OUT struct igsc_oprom_device_info_4ids *devices, IN OUT uint32_t *count)
Retrieves a list of supported devices based on image type by the OPROM 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_oprom_iterator_reset_typed (IN struct igsc_oprom_image *img, IN uint32_t request_type)
reset the iterator over supported devices based on image type
IGSC_EXPORT int igsc_image_oprom_iterator_next_typed (IN struct igsc_oprom_image *img, IN uint32_t request_type, OUT struct igsc_oprom_device_info_4ids *device)
progress the supported device iterator and return the oprom device info, based on image type
IGSC_EXPORT int igsc_image_oprom_has_4ids_extension (IN struct igsc_oprom_image *img, IN uint32_t request_type, OUT bool *has_4ids_extension)
returns whether the oprom image has 4ids device extension
IGSC_EXPORT int igsc_image_oprom_has_2ids_extension (IN struct igsc_oprom_image *img, OUT bool *has_2ids_extension)
returns whether the oprom image has 2ids device extension
IGSC_EXPORT int igsc_image_oprom_code_devid_enforced (IN struct igsc_hw_config *hw_config, OUT bool *devid_enforced)
returns whether the oprom code config has devId enforcement bit set
IGSC_EXPORT int igsc_image_oprom_release (IN struct igsc_oprom_image *img)
release the OPROM image handle
IGSC_EXPORT uint8_t igsc_oprom_version_compare (const struct igsc_oprom_version *image_ver, const struct igsc_oprom_version *device_ver)
Compares input oprom version to the flash one.
IGSC_EXPORT int igsc_image_get_type (IN const uint8_t *buffer, IN const uint32_t buffer_len, OUT uint8_t *type)
Determine the type of the provided image.
IGSC_EXPORT int igsc_device_iterator_create (struct igsc_device_iterator **iter)
Create iterator for devices capable of FW update.
IGSC_EXPORT int igsc_device_iterator_next (struct igsc_device_iterator *iter, struct igsc_device_info *info)
Obtain next devices capable of FW update.
IGSC_EXPORT void igsc_device_iterator_destroy (struct igsc_device_iterator *iter)
Free iterator for devices capable of FW update.
IGSC_EXPORT int igsc_gfsp_count_tiles (IN struct igsc_device_handle *handle, OUT uint32_t *max_num_of_tiles)
Gets number of tiles.
IGSC_EXPORT int igsc_gfsp_memory_errors (IN struct igsc_device_handle *handle, IN OUT struct igsc_gfsp_mem_err *tiles)
Gets GFSP number of memory errors.
IGSC_EXPORT int igsc_ifr_run_array_scan_test (IN struct igsc_device_handle *handle, OUT uint32_t *status, OUT uint32_t *extended_status, OUT uint32_t *pending_reset, OUT uint32_t *error_code)
Runs IFR Array and Scan tests on GSC IFR device.
IGSC_EXPORT int igsc_ifr_run_mem_ppr_test (IN struct igsc_device_handle *handle, OUT uint32_t *status, OUT uint32_t *pending_reset, OUT uint32_t *error_code)
Runs IFR memory Post Package Repair (PPR) test on GSC IFR device.
IGSC_EXPORT int igsc_ifr_get_status_ext (IN struct igsc_device_handle *handle, OUT uint32_t *supported_tests, OUT uint32_t *hw_capabilities, OUT uint32_t *ifr_applied, OUT uint32_t *prev_errors, OUT uint32_t *pending_reset)
Retrieves the status of GSC IFR device.
IGSC_EXPORT int igsc_ifr_count_tiles (IN struct igsc_device_handle *handle, OUT uint16_t *supported_tiles)
Counts the IFR supported tiles.
IGSC_EXPORT int igsc_ifr_get_tile_repair_info (IN struct igsc_device_handle *handle, IN uint16_t tile_idx, OUT uint16_t *used_array_repair_entries, OUT uint16_t *available_array_repair_entries, OUT uint16_t *failed_dss)
Retrieves the IFR repair info.
IGSC_EXPORT int igsc_ecc_config_set (IN struct igsc_device_handle *handle, IN uint8_t req_ecc_state, OUT uint8_t *cur_ecc_state, OUT uint8_t *pen_ecc_state)
Set ECC Configuration.
IGSC_EXPORT int igsc_ecc_config_get (IN struct igsc_device_handle *handle, OUT uint8_t *cur_ecc_state, OUT uint8_t *pen_ecc_state)
Get ECC Configuration.
IGSC_EXPORT int igsc_device_oem_version (IN struct igsc_device_handle *handle, OUT struct igsc_oem_version *version)
Retrieves the OEM Version from the device.
IGSC_EXPORT int igsc_device_ifr_bin_version (IN struct igsc_device_handle *handle, OUT struct igsc_ifr_bin_version *version)
Retrieves the IFR Binary Version from the device.
IGSC_EXPORT int igsc_device_psc_version (IN struct igsc_device_handle *handle, OUT struct igsc_psc_version *version)
Retrieves the PSC Version from the device.
IGSC_EXPORT int igsc_gfsp_get_health_indicator (IN struct igsc_device_handle *handle, OUT uint8_t *health_indicator)
IGSC_EXPORT int igsc_gfsp_heci_cmd (struct igsc_device_handle *handle, uint32_t gfsp_cmd, uint8_t *in_buffer, size_t in_buffer_size, uint8_t *out_buffer, size_t out_buffer_size, size_t *actual_out_buffer_size)
Send generic GFSP command and receive response.
IGSC_EXPORT int igsc_device_update_late_binding_config (IN struct igsc_device_handle *handle, IN uint32_t type, IN uint32_t flags, IN uint8_t *payload, IN size_t payload_size, OUT uint32_t *status)
IGSC_EXPORT int igsc_device_commit_arb_svn (IN struct igsc_device_handle *handle, uint8_t *fw_error)
Sends ARB SVN Commit HECI command.
IGSC_EXPORT int igsc_device_get_min_allowed_arb_svn (IN struct igsc_device_handle *handle, OUT uint8_t *min_allowed_svn)
Retrieves Minimal allowed ARB SVN.
IGSC_EXPORT int igsc_memory_ppr_devices (IN struct igsc_device_handle *handle, OUT uint32_t *device_count)
Retrieves GFSP number of memory PPR devices.
IGSC_EXPORT int igsc_memory_ppr_status (IN struct igsc_device_handle *handle, OUT struct igsc_ppr_status *ppr_status)
Retrieves GFSP memory PPR status structure data.

Igsc_ifr_run_test_statuses

The IFR Run Test Command Statuses

enum ifr_test_run_status { IFR_TEST_STATUS_SUCCESS = 0, IFR_TEST_STATUS_PASSED_WITH_REPAIR, IFR_TEST_STATUS_PASSED_WITH_RECOVERY, IFR_TEST_STATUS_SUBSLICE_FAILURE, IFR_TEST_STATUS_NON_SUBSLICE_FAILURE, IFR_TEST_STATUS_ERROR }
IGSC_EXPORT int igsc_ifr_get_status (IN struct igsc_device_handle *handle, OUT uint8_t *result, OUT uint32_t *supported_tests, OUT uint32_t *ifr_applied, OUT uint8_t *tiles_num)
Retrieves the status of GSC IFR device.
IGSC_EXPORT int igsc_ifr_run_test (IN struct igsc_device_handle *handle, IN uint8_t test_type, IN uint8_t tiles, OUT uint8_t *result, OUT uint8_t *run_status, OUT uint32_t *error_code)
Runs IFR test on GSC IFR device.

Detailed Description

Intel Graphics System Controller Library API.

Definition in file igsc_lib.h.

Data Structure Documentation

struct igsc_fw_version

Structure to store fw version data

Definition at line 120 of file igsc_lib.h.

Data Fields:

uint16_t build FW Build Number

uint16_t hotfix FW Hotfix Number

char project[4] Project code name

struct igsc_ifr_bin_version

Structure to store ifr binary version data

Definition at line 129 of file igsc_lib.h.

Data Fields:

uint16_t build IFR Binary Build Number

uint16_t hotfix IFR Binary Hotfix Number

uint16_t major IFR Binary Major Number

uint16_t minor IFR Binary Minor Number

struct igsc_psc_version

Structure to store psc version data

Definition at line 139 of file igsc_lib.h.

Data Fields:

uint32_t cfg_version PSC configuration version

uint32_t date PSC date

struct igsc_oem_version

Structure to store oem version data

Definition at line 149 of file igsc_lib.h.

Data Fields:

uint16_t length actual OEM version length

uint8_t version[IGSC_MAX_OEM_VERSION_LENGTH] buffer to store oem version

struct igsc_fwdata_version

Structure to store OEM manufacturing data version and data major VCN for GSC in-field data firmware update image

Definition at line 182 of file igsc_lib.h.

Data Fields:

uint16_t major_vcn GSC in-field data firmware major VCN

uint16_t major_version GSC in-field data firmware major version

uint32_t oem_manuf_data_version GSC in-field data firmware OEM manufacturing data version

struct igsc_fwdata_version2

Structure to store versions for GSC in-field data firmware update image (version 2)

Definition at line 197 of file igsc_lib.h.

Data Fields:

uint32_t data_arb_svn GSC in-field data firmware SVN

uint32_t data_arb_svn_fitb GSC in-field data firmware SVN from FITB

uint32_t flags GSC in-field data firmware flags

uint32_t format_version GSC in-field data firmware version format

uint16_t major_vcn GSC in-field data firmware major VCN

uint16_t major_version GSC in-field data firmware major version

uint32_t oem_manuf_data_version GSC in-field data firmware OEM manufacturing data version

uint32_t oem_manuf_data_version_fitb GSC in-field data firmware OEM manufacturing data version from FITB

struct igsc_oprom_version

Structure to store OPROM version data

Definition at line 215 of file igsc_lib.h.

Data Fields:

uint8_t version[IGSC_OPROM_VER_SIZE] OPROM Version string

struct igsc_oprom_device_info

subsystem vendor and device id support by the OPROM image as defined by PCI.

Definition at line 232 of file igsc_lib.h.

Data Fields:

uint16_t subsys_device_id subsystem device id

uint16_t subsys_vendor_id subsystem vendor id

struct igsc_oprom_device_info_4ids

vendor and device id, subsystem vendor and device id support by the GSC in-field data firmware update image as defined by PCI.

Definition at line 241 of file igsc_lib.h.

Data Fields:

uint16_t device_id device id

uint16_t subsys_device_id subsystem device id

uint16_t subsys_vendor_id subsystem vendor id

uint16_t vendor_id vendor id

struct igsc_fwdata_device_info

vendor and device id, subsystem vendor and device id support by the GSC in-field data firmware update image as defined by PCI.

Definition at line 252 of file igsc_lib.h.

Data Fields:

uint16_t device_id device id

uint16_t subsys_device_id subsystem device id

uint16_t subsys_vendor_id subsystem vendor id

uint16_t vendor_id vendor id

struct igsc_device_info

Structure to store GSC device info

Definition at line 285 of file igsc_lib.h.

Data Fields:

uint8_t bus pci bus number for GFX device

uint8_t dev device number on pci bus

uint16_t device_id gfx device id

uint16_t domain pci domain for GFX device

uint8_t func device function number

char name[IGSC_INFO_NAME_SIZE] the device node path

uint16_t subsys_device_id gfx device subsystem device id

uint16_t subsys_vendor_id gfx device subsystem vendor id

uint16_t vendor_id gfx device vendor id

Macro Definition Documentation

#define BIT( x)

Value:

(1U << (x))

Definition at line 54 of file igsc_lib.h.

#define IGSC_FWDATA_FITB_VALID_MASK   0x1

Definition at line 191 of file igsc_lib.h.

#define IGSC_FWDATA_FORMAT_VERSION_1   0x1

Definition at line 188 of file igsc_lib.h.

#define IGSC_FWDATA_FORMAT_VERSION_2   0x2

Definition at line 189 of file igsc_lib.h.

#define IGSC_INFO_NAME_SIZE   256

A device node path (Linux) or device instance path (Windows) Length

Definition at line 280 of file igsc_lib.h.

#define IGSC_INVALID_DEVICE_HANDLE   ((void *)0)

Definition at line 74 of file igsc_lib.h.

#define IGSC_MAX_OEM_VERSION_LENGTH   256

Definition at line 144 of file igsc_lib.h.

#define IGSC_OPROM_VER_SIZE   8

OPROM partition version size in bytes

Definition at line 211 of file igsc_lib.h.

#define UNUSED_VAR( _v)

Value:

(void)_v

Definition at line 58 of file igsc_lib.h.

Typedef Documentation

typedef void* igsc_handle_t

A file descriptor

Under Linux: file descriptor int fd = open(2)
Under Windows: HANDLE handle = CreateFile()

Definition at line 73 of file igsc_lib.h.

Enumeration Type Documentation

enum igsc_fwdata_version_compare_result

fwdata versions comparison results

Enumerator

IGSC_FWDATA_VERSION_REJECT_VCN

VCN version is bigger than device VCN

IGSC_FWDATA_VERSION_REJECT_OEM_MANUF_DATA_VERSION

OEM manufacturing data version is not bigger than device OEM version or equal in ver2 comparison

IGSC_FWDATA_VERSION_REJECT_DIFFERENT_PROJECT

major version is different from device major version

IGSC_FWDATA_VERSION_ACCEPT

update image VCN version is equal than the one on the device, and OEM is bigger

IGSC_FWDATA_VERSION_OLDER_VCN

update image VCN version is smaller than the one on the device

IGSC_FWDATA_VERSION_REJECT_WRONG_FORMAT

the version format is the wrong one or incompatible

IGSC_FWDATA_VERSION_REJECT_ARB_SVN

update image SVN version is smaller than the one on the device

Definition at line 168 of file igsc_lib.h.

enum igsc_image_type

types of supported update images

Enumerator

IGSC_IMAGE_TYPE_UNKNOWN

Unknown image type

IGSC_IMAGE_TYPE_GFX_FW

GSC Firmware image

IGSC_IMAGE_TYPE_OPROM

OPROM CODA an DATA combined image

IGSC_IMAGE_TYPE_OPROM_CODE

OPROM code image

IGSC_IMAGE_TYPE_OPROM_DATA

OPROM data image

IGSC_IMAGE_TYPE_FW_DATA

firmware data image

Definition at line 108 of file igsc_lib.h.

enum igsc_log_level_type

types of supported log levels

Enumerator

IGSC_LOG_LEVEL_ERROR

Errors only

IGSC_LOG_LEVEL_DEBUG

Debug messages and errors

IGSC_LOG_LEVEL_TRACE

Trace, debug messages and errors

IGSC_LOG_LEVEL_MAX

Upper boundary

Definition at line 80 of file igsc_lib.h.

enum igsc_oprom_type

OPROM partition type

Enumerator

IGSC_OPROM_NONE

OPROM INVALID PARTITION

IGSC_OPROM_DATA

OPROM data (VBT)

IGSC_OPROM_CODE

OPROM code (VBIOS and GOP)

Definition at line 222 of file igsc_lib.h.

enum igsc_version_compare_result

versions comparison results

Enumerator

IGSC_VERSION_ERROR

An internal error during comparison

IGSC_VERSION_NOT_COMPATIBLE

cannot compare, the update image is for a different platform

IGSC_VERSION_NEWER

update image version is newer than the one on the device

IGSC_VERSION_EQUAL

update image version is equal to the one on the device

IGSC_VERSION_OLDER

update image version is older than the one on the device

Definition at line 157 of file igsc_lib.h.

Function Documentation

IGSC_EXPORT unsigned int igsc_get_log_level (void )

Retrieves current log level.

Returns

current log level

IGSC_EXPORT void igsc_set_log_level (unsigned int log_level)

Sets log level.

Parameters

log_level log level to set

Returns

void

Author

Generated automatically by Doxygen for Intel Graphics System Controller Firmware Update Library from the source code.

Info

Intel Graphics System Controller Firmware Update Library