Add new API for RAS related information

The API to get the EEPROM version and ECC schema.

Change-Id: Iee6b3c555541a33bf16bf9ac1fd60100dfff5643
This commit is contained in:
Bill(Shuzhou) Liu
2023-10-10 10:11:16 -05:00
committed by Maisam Arif
parent 69c35a4cff
commit d92d4e4b38
8 changed files with 178 additions and 0 deletions
+24
View File
@@ -1163,6 +1163,16 @@ typedef struct {
/// @endcond
} amdsmi_gpu_metrics_t;
/**
* @brief This structure holds ras feature
*/
typedef struct {
uint32_t ras_eeprom_version;
// PARITY error(bit 0), Single Bit correctable (bit1),
// Double bit error detection (bit2), Poison (bit 3).
uint32_t ecc_correction_schema_flag; //!< ecc_correction_schema mask
} amdsmi_ras_feature_t;
/**
* @brief This structure holds error counts.
*/
@@ -2004,6 +2014,20 @@ amdsmi_get_gpu_memory_usage(amdsmi_processor_handle processor_handle, amdsmi_mem
amdsmi_status_t
amdsmi_get_gpu_bad_page_info(amdsmi_processor_handle processor_handle, uint32_t *num_pages, amdsmi_retired_page_record_t *info);
/**
* @brief Returns RAS features info.
*
* @param[in] processor_handle Device handle which to query
*
* @param[out] ras_feature RAS features that are currently enabled and supported on
* the processor. Must be allocated by user.
*
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
*/
amdsmi_status_t amdsmi_get_gpu_ras_feature_info(
amdsmi_processor_handle processor_handle, amdsmi_ras_feature_t *ras_feature);
/**
* @brief Returns if RAS features are enabled or disabled for given block. It is not
* supported on virtual machine guest