amdsmi.h File Reference

amdsmi.h File Reference#

AMD SMI: amdsmi.h File Reference
amdsmi.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>

Go to the source code of this file.

Data Structures

union  amdsmi_bdf_t
 AUX STRUCTURES. More...
 
struct  amdsmi_bdf_t::bdf_
 
struct  amdsmi_pcie_info_t
 
struct  amdsmi_pcie_info_t::pcie_static_
 
struct  amdsmi_pcie_info_t::pcie_metric_
 
struct  amdsmi_power_cap_info_t
 
struct  amdsmi_vbios_info_t
 
struct  amdsmi_gpu_cache_info_t
 
struct  amdsmi_gpu_cache_info_t::cache_
 
struct  amdsmi_fw_info_t
 
struct  amdsmi_asic_info_t
 
struct  amdsmi_driver_info_t
 
struct  amdsmi_power_info_t
 
struct  amdsmi_engine_usage_t
 
struct  amdsmi_clk_info_t
 
struct  amdsmi_error_count_t
 
struct  amdsmi_ras_feature_t
 
struct  amdsmi_vf_handle_t
 
struct  amdsmi_event_entry_t
 
struct  amdsmi_board_info_t
 
struct  amdsmi_pf_fb_info_t
 
struct  amdsmi_vf_fb_info_t
 
struct  amdsmi_partition_info_t
 
struct  amdsmi_guard_info_t
 
struct  amdsmi_vf_info_t
 
struct  amdsmi_sched_info_t
 
struct  amdsmi_vf_data_t
 
struct  amdsmi_profile_caps_info_t
 
struct  amdsmi_profile_info_t
 
struct  amdsmi_guest_data_t
 
struct  amdsmi_dfc_fw_header_t
 
struct  amdsmi_dfc_fw_white_list_t
 
struct  amdsmi_dfc_fw_ta_uuid_t
 
struct  amdsmi_dfc_fw_data_t
 
struct  amdsmi_dfc_fw_t
 
struct  amdsmi_eeprom_table_record_t
 
struct  amdsmi_fw_load_error_record_t
 
struct  amdsmi_fw_error_record_t
 
struct  amdsmi_link_metrics_t
 
struct  amdsmi_link_metrics_t::links_
 
struct  amdsmi_link_topology_t
 
union  amdsmi_xgmi_fb_sharing_caps_t
 
struct  amdsmi_xgmi_fb_sharing_caps_t::cap_
 
struct  amdsmi_vram_info_t
 
struct  amdsmi_metric_t
 
struct  amdsmi_version_t
 This structure holds version information. More...
 
union  amdsmi_nps_caps_t
 This union holds memory partition bitmask. More...
 
struct  amdsmi_nps_caps_t::nps_flags_
 
struct  amdsmi_memory_partition_config_t
 
struct  amdsmi_memory_partition_config_t::numa_range_
 
struct  amdsmi_accelerator_partition_profile_t
 
struct  amdsmi_accelerator_partition_resource_profile_t
 
struct  amdsmi_accelerator_partition_profile_config_t
 
struct  amdsmi_dpm_policy_entry_t
 
struct  amdsmi_dpm_policy_t
 
struct  amdsmi_cper_guid_t
 
struct  amdsmi_cper_timestamp_t
 
struct  amdsmi_cper_hdr
 

Macros

#define AMDSMI_MAX_DEVICES   32
 Maximum size definitions AMDSMI.
 
#define AMDSMI_MAX_VF_COUNT   32
 
#define AMDSMI_PF_INDEX   (AMDSMI_MAX_VF_COUNT - 1)
 
#define AMDSMI_MAX_STRING_LENGTH   256
 
#define AMDSMI_MAX_DRIVER_INFO_RSVD   64
 
#define AMDSMI_MAX_MM_IP_COUNT   8
 
#define AMDSMI_MAX_CACHE_TYPES   10
 
#define AMDSMI_MAX_NUM_PM_POLICIES   32
 
#define AMDSMI_MAX_NAME   32
 
#define AMDSMI_MAX_DRIVER_NUM   2
 Maximum of two drv.
 
#define AMDSMI_MAX_DATE_LENGTH   32
 YYYY-MM-DD:HH:MM:SS.MSC.
 
#define AMDSMI_GPU_UUID_SIZE   38
 
#define AMDSMI_DFC_FW_NUMBER_OF_ENTRIES   9
 
#define AMDSMI_MAX_WHITE_LIST_ELEMENTS   16
 
#define AMDSMI_MAX_BLACK_LIST_ELEMENTS   64
 
#define AMDSMI_MAX_UUID_ELEMENTS   16
 
#define AMDSMI_MAX_TA_WHITE_LIST_ELEMENTS   8
 
#define AMDSMI_MAX_ERR_RECORDS   10
 
#define AMDSMI_EVENT_MSG_SIZE   256
 256 BYTES
 
#define AMDSMI_MAX_PROFILE_COUNT   16
 
#define AMDSMI_TIME_FORMAT   "%02d:%02d:%02d.%03d"
 string format
 
#define AMDSMI_DATE_FORMAT   "%04d-%02d-%02d:%02d:%02d:%02d.%03d"
 
#define AMDSMI_MASK_ALL   (~0ULL)
 AMDSMI event mask. More...
 
#define AMDSMI_MASK_DEFAULT   ((1ULL << 62) - 1)
 include all events but only error severities without warnings and infos
 
#define AMDSMI_MASK_INIT   (0ULL)
 a clear event mask
 
#define AMDSMI_MASK_HIGH_AND_MED_SEVERITY   (~((1ULL << 61) - 1))
 check mask in case new severity levels are not supported
 
#define AMDSMI_MASK_HIGH_ERROR_SEVERITY_ONLY(mask)   (mask & ((1ULL << 60) - 1))
 error severity level mask
 
#define AMDSMI_MASK_INCLUDE_MED_ERROR_SEVERITY(mask)   (mask | (1ULL << 60))
 
#define AMDSMI_MASK_INCLUDE_LOW_ERROR_SEVERITY(mask)   (mask | (1ULL << 61))
 
#define AMDSMI_MASK_INCLUDE_WARN_SEVERITY(mask)   (mask | (1ULL << 62))
 
#define AMDSMI_MASK_INCLUDE_INFO_SEVERITY(mask)   (mask | (1ULL << 63))
 
#define AMDSMI_MASK_HIGH_SEVERITY_ONLY(mask)   (mask & ((1ULL << 62) - 1))
 map old severity level mask to new severity level
 
#define AMDSMI_MASK_INCLUDE_MED_SEVERITY(mask)   AMDSMI_MASK_INCLUDE_WARN_SEVERITY(mask)
 
#define AMDSMI_MASK_INCLUDE_LOW_SEVERITY(mask)   AMDSMI_MASK_INCLUDE_INFO_SEVERITY(mask)
 
#define AMDSMI_MASK_INCLUDE_CATEGORY(mask, cate)   (mask | (1ULL << cate))
 
#define AMDSMI_MASK_EXCLUDE_CATEGORY(mask, cate)   (mask & (~(1ULL << cate)))
 
#define AMDSMI_MAX_NUM_XGMI_PHYSICAL_LINK   64
 
#define AMDSMI_MAX_FB_SHARING_GROUPS   64
 
#define AMDSMI_MAX_NUM_CONNECTED_NODES   64
 
#define AMDSMI_MAX_NUM_METRICS_V1   255
 
#define AMDSMI_MAX_NUM_METRICS   AMDSMI_MAX_NUM_METRICS_V1
 
#define AMDSMI_MAX_BAD_PAGE_RECORD_V1   512
 
#define AMDSMI_MAX_BAD_PAGE_RECORD_V2   16384
 
#define AMDSMI_MAX_BAD_PAGE_RECORD   AMDSMI_MAX_BAD_PAGE_RECORD_V2
 
#define AMDSMI_MAX_CP_PROFILE_RESOURCES   32
 
#define AMDSMI_MAX_ACCELERATOR_PARTITIONS   8
 
#define AMDSMI_MAX_ACCELERATOR_PROFILE   32
 
#define AMDSMI_MAX_NUM_NUMA_NODES   32
 
#define AMDSMI_EVENT_FW_FW_INIT_FAIL   AMDSMI_EVENT_FW_RING_INIT_FAIL
 

Typedefs

typedef void * amdsmi_socket_handle
 opaque handler point to underlying implementation
 
typedef void * amdsmi_event_set
 
typedef void * amdsmi_processor_handle
 

Enumerations

enum  amdsmi_init_flags_t {
  AMDSMI_INIT_ALL_PROCESSORS = 0xFFFFFFFF , AMDSMI_INIT_AMD_CPUS = (1 << 0) , AMDSMI_INIT_AMD_GPUS = (1 << 1) , AMDSMI_INIT_NON_AMD_CPUS = (1 << 2) ,
  AMDSMI_INIT_NON_AMD_GPUS = (1 << 3) , AMDSMI_INIT_AMD_APUS = (AMDSMI_INIT_AMD_CPUS | AMDSMI_INIT_AMD_GPUS)
}
 Initialization flags. More...
 
enum  amdsmi_status_t {
  AMDSMI_STATUS_SUCCESS = 0 , AMDSMI_STATUS_INVAL = 1 , AMDSMI_STATUS_NOT_SUPPORTED = 2 , AMDSMI_STATUS_NOT_YET_IMPLEMENTED = 3 ,
  AMDSMI_STATUS_FAIL_LOAD_MODULE = 4 , AMDSMI_STATUS_FAIL_LOAD_SYMBOL = 5 , AMDSMI_STATUS_DRM_ERROR = 6 , AMDSMI_STATUS_API_FAILED = 7 ,
  AMDSMI_STATUS_TIMEOUT = 8 , AMDSMI_STATUS_RETRY = 9 , AMDSMI_STATUS_NO_PERM = 10 , AMDSMI_STATUS_INTERRUPT = 11 ,
  AMDSMI_STATUS_IO = 12 , AMDSMI_STATUS_ADDRESS_FAULT = 13 , AMDSMI_STATUS_FILE_ERROR = 14 , AMDSMI_STATUS_OUT_OF_RESOURCES = 15 ,
  AMDSMI_STATUS_INTERNAL_EXCEPTION = 16 , AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS = 17 , AMDSMI_STATUS_INIT_ERROR = 18 , AMDSMI_STATUS_REFCOUNT_OVERFLOW = 19 ,
  AMDSMI_STATUS_MORE_DATA = 20 , AMDSMI_STATUS_BUSY = 30 , AMDSMI_STATUS_NOT_FOUND = 31 , AMDSMI_STATUS_NOT_INIT = 32 ,
  AMDSMI_STATUS_NO_SLOT = 33 , AMDSMI_STATUS_DRIVER_NOT_LOADED = 34 , AMDSMI_STATUS_NO_DATA = 40 , AMDSMI_STATUS_INSUFFICIENT_SIZE = 41 ,
  AMDSMI_STATUS_UNEXPECTED_SIZE = 42 , AMDSMI_STATUS_UNEXPECTED_DATA = 43 , AMDSMI_STATUS_NON_AMD_CPU = 44 , AMDSMI_STATUS_NO_ENERGY_DRV = 45 ,
  AMDSMI_STATUS_NO_MSR_DRV = 46 , AMDSMI_STATUS_NO_HSMP_DRV = 47 , AMDSMI_STATUS_NO_HSMP_SUP = 48 , AMDSMI_STATUS_NO_HSMP_MSG_SUP = 49 ,
  AMDSMI_STATUS_HSMP_TIMEOUT = 50 , AMDSMI_STATUS_NO_DRV = 51 , AMDSMI_STATUS_FILE_NOT_FOUND = 52 , AMDSMI_STATUS_ARG_PTR_NULL = 53 ,
  AMDSMI_STATUS_AMDGPU_RESTART_ERR = 54 , AMDSMI_STATUS_SETTING_UNAVAILABLE = 55 , AMDSMI_STATUS_MAP_ERROR = 0xFFFFFFFE , AMDSMI_STATUS_UNKNOWN_ERROR = 0xFFFFFFFF
}
 ENUMERATORS. More...
 
enum  amdsmi_cache_property_type_t {
  AMDSMI_CACHE_PROPERTY_ENABLED = 0x00000001 , AMDSMI_CACHE_PROPERTY_DATA_CACHE = 0x00000002 , AMDSMI_CACHE_PROPERTY_INST_CACHE = 0x00000004 , AMDSMI_CACHE_PROPERTY_CPU_CACHE = 0x00000008 ,
  AMDSMI_CACHE_PROPERTY_SIMD_CACHE = 0x00000010
}
 cache properties
 
enum  amdsmi_fw_block_t {
  AMDSMI_FW_ID_SMU = 1 , AMDSMI_FW_ID_FIRST = AMDSMI_FW_ID_SMU , AMDSMI_FW_ID_CP_CE , AMDSMI_FW_ID_CP_PFP ,
  AMDSMI_FW_ID_CP_ME , AMDSMI_FW_ID_CP_MEC_JT1 , AMDSMI_FW_ID_CP_MEC_JT2 , AMDSMI_FW_ID_CP_MEC1 ,
  AMDSMI_FW_ID_CP_MEC2 , AMDSMI_FW_ID_RLC , AMDSMI_FW_ID_SDMA0 , AMDSMI_FW_ID_SDMA1 ,
  AMDSMI_FW_ID_SDMA2 , AMDSMI_FW_ID_SDMA3 , AMDSMI_FW_ID_SDMA4 , AMDSMI_FW_ID_SDMA5 ,
  AMDSMI_FW_ID_SDMA6 , AMDSMI_FW_ID_SDMA7 , AMDSMI_FW_ID_VCN , AMDSMI_FW_ID_UVD ,
  AMDSMI_FW_ID_VCE , AMDSMI_FW_ID_ISP , AMDSMI_FW_ID_DMCU_ERAM , AMDSMI_FW_ID_DMCU_ISR ,
  AMDSMI_FW_ID_RLC_RESTORE_LIST_GPM_MEM , AMDSMI_FW_ID_RLC_RESTORE_LIST_SRM_MEM , AMDSMI_FW_ID_RLC_RESTORE_LIST_CNTL , AMDSMI_FW_ID_RLC_V ,
  AMDSMI_FW_ID_MMSCH , AMDSMI_FW_ID_PSP_SYSDRV , AMDSMI_FW_ID_PSP_SOSDRV , AMDSMI_FW_ID_PSP_TOC ,
  AMDSMI_FW_ID_PSP_KEYDB , AMDSMI_FW_ID_DFC , AMDSMI_FW_ID_PSP_SPL , AMDSMI_FW_ID_DRV_CAP ,
  AMDSMI_FW_ID_MC , AMDSMI_FW_ID_PSP_BL , AMDSMI_FW_ID_CP_PM4 , AMDSMI_FW_ID_RLC_P ,
  AMDSMI_FW_ID_SEC_POLICY_STAGE2 , AMDSMI_FW_ID_REG_ACCESS_WHITELIST , AMDSMI_FW_ID_IMU_DRAM , AMDSMI_FW_ID_IMU_IRAM ,
  AMDSMI_FW_ID_SDMA_TH0 , AMDSMI_FW_ID_SDMA_TH1 , AMDSMI_FW_ID_CP_MES , AMDSMI_FW_ID_MES_STACK ,
  AMDSMI_FW_ID_MES_THREAD1 , AMDSMI_FW_ID_MES_THREAD1_STACK , AMDSMI_FW_ID_RLX6 , AMDSMI_FW_ID_RLX6_DRAM_BOOT ,
  AMDSMI_FW_ID_RS64_ME , AMDSMI_FW_ID_RS64_ME_P0_DATA , AMDSMI_FW_ID_RS64_ME_P1_DATA , AMDSMI_FW_ID_RS64_PFP ,
  AMDSMI_FW_ID_RS64_PFP_P0_DATA , AMDSMI_FW_ID_RS64_PFP_P1_DATA , AMDSMI_FW_ID_RS64_MEC , AMDSMI_FW_ID_RS64_MEC_P0_DATA ,
  AMDSMI_FW_ID_RS64_MEC_P1_DATA , AMDSMI_FW_ID_RS64_MEC_P2_DATA , AMDSMI_FW_ID_RS64_MEC_P3_DATA , AMDSMI_FW_ID_PPTABLE ,
  AMDSMI_FW_ID_PSP_SOC , AMDSMI_FW_ID_PSP_DBG , AMDSMI_FW_ID_PSP_INTF , AMDSMI_FW_ID_RLX6_CORE1 ,
  AMDSMI_FW_ID_RLX6_DRAM_BOOT_CORE1 , AMDSMI_FW_ID_RLCV_LX7 , AMDSMI_FW_ID_RLC_SAVE_RESTORE_LIST , AMDSMI_FW_ID_ASD ,
  AMDSMI_FW_ID_TA_RAS , AMDSMI_FW_ID_XGMI , AMDSMI_FW_ID_RLC_SRLG , AMDSMI_FW_ID_RLC_SRLS ,
  AMDSMI_FW_ID_SMC , AMDSMI_FW_ID_DMCU , AMDSMI_FW_ID_PSP_RAS , AMDSMI_FW_ID_P2S_TABLE ,
  AMDSMI_FW_ID__MAX
}
 
enum  amdsmi_mm_ip_t { AMDSMI_MM_UVD , AMDSMI_MM_VCE , AMDSMI_MM_VCN , AMDSMI_MM__MAX }
 GPU Capability info.
 
enum  amdsmi_clk_type_t {
  AMDSMI_CLK_TYPE_SYS = 0x0 , AMDSMI_CLK_TYPE_FIRST = AMDSMI_CLK_TYPE_SYS , AMDSMI_CLK_TYPE_GFX = AMDSMI_CLK_TYPE_SYS , AMDSMI_CLK_TYPE_DF ,
  AMDSMI_CLK_TYPE_DCEF , AMDSMI_CLK_TYPE_SOC , AMDSMI_CLK_TYPE_MEM , AMDSMI_CLK_TYPE_PCIE ,
  AMDSMI_CLK_TYPE_VCLK0 , AMDSMI_CLK_TYPE_VCLK1 , AMDSMI_CLK_TYPE_DCLK0 , AMDSMI_CLK_TYPE_DCLK1 ,
  AMDSMI_CLK_TYPE__MAX = AMDSMI_CLK_TYPE_DCLK1
}
 Clock types. More...
 
enum  amdsmi_temperature_type_t {
  AMDSMI_TEMPERATURE_TYPE_EDGE , AMDSMI_TEMPERATURE_TYPE_FIRST = AMDSMI_TEMPERATURE_TYPE_EDGE , AMDSMI_TEMPERATURE_TYPE_HOTSPOT , AMDSMI_TEMPERATURE_TYPE_JUNCTION = AMDSMI_TEMPERATURE_TYPE_HOTSPOT ,
  AMDSMI_TEMPERATURE_TYPE_VRAM , AMDSMI_TEMPERATURE_TYPE_HBM_0 , AMDSMI_TEMPERATURE_TYPE_HBM_1 , AMDSMI_TEMPERATURE_TYPE_HBM_2 ,
  AMDSMI_TEMPERATURE_TYPE_HBM_3 , AMDSMI_TEMPERATURE_TYPE_PLX , AMDSMI_TEMPERATURE_TYPE__MAX = AMDSMI_TEMPERATURE_TYPE_PLX
}
 This enumeration is used to indicate from which part of the processor a temperature reading should be obtained.
 
enum  amdsmi_temperature_metric_t {
  AMDSMI_TEMP_CURRENT = 0x0 , AMDSMI_TEMP_FIRST = AMDSMI_TEMP_CURRENT , AMDSMI_TEMP_MAX , AMDSMI_TEMP_MIN ,
  AMDSMI_TEMP_MAX_HYST , AMDSMI_TEMP_MIN_HYST , AMDSMI_TEMP_CRITICAL , AMDSMI_TEMP_CRITICAL_HYST ,
  AMDSMI_TEMP_EMERGENCY , AMDSMI_TEMP_EMERGENCY_HYST , AMDSMI_TEMP_CRIT_MIN , AMDSMI_TEMP_CRIT_MIN_HYST ,
  AMDSMI_TEMP_OFFSET , AMDSMI_TEMP_LOWEST , AMDSMI_TEMP_HIGHEST , AMDSMI_TEMP_SHUTDOWN ,
  AMDSMI_TEMP_LAST = AMDSMI_TEMP_SHUTDOWN
}
 Temperature Metrics. This enum is used to identify various temperature metrics. Corresponding values will be in Celcius. More...
 
enum  processor_type_t {
  AMDSMI_PROCESSOR_TYPE_UNKNOWN = 0 , AMDSMI_PROCESSOR_TYPE_AMD_GPU , AMDSMI_PROCESSOR_TYPE_AMD_CPU , AMDSMI_PROCESSOR_TYPE_NON_AMD_GPU ,
  AMDSMI_PROCESSOR_TYPE_NON_AMD_CPU , AMDSMI_PROCESSOR_TYPE_AMD_CPU_CORE , AMDSMI_PROCESSOR_TYPE_AMD_APU
}
 
enum  amdsmi_event_category_t {
  AMDSMI_EVENT_CATEGORY_NON_USED = 0 , AMDSMI_EVENT_CATEGORY_DRIVER = 1 , AMDSMI_EVENT_CATEGORY_RESET = 2 , AMDSMI_EVENT_CATEGORY_SCHED = 3 ,
  AMDSMI_EVENT_CATEGORY_VBIOS = 4 , AMDSMI_EVENT_CATEGORY_ECC = 5 , AMDSMI_EVENT_CATEGORY_PP = 6 , AMDSMI_EVENT_CATEGORY_IOV = 7 ,
  AMDSMI_EVENT_CATEGORY_VF = 8 , AMDSMI_EVENT_CATEGORY_FW = 9 , AMDSMI_EVENT_CATEGORY_GPU = 10 , AMDSMI_EVENT_CATEGORY_GUARD = 11 ,
  AMDSMI_EVENT_CATEGORY_GPUMON = 12 , AMDSMI_EVENT_CATEGORY_MMSCH = 13 , AMDSMI_EVENT_CATEGORY_XGMI = 14 , AMDSMI_EVENT_CATEGORY__MAX
}
 
enum  amdsmi_event_gpu_t {
  AMDSMI_EVENT_GPU_DEVICE_LOST = 0 , AMDSMI_EVENT_GPU_NOT_SUPPORTED , AMDSMI_EVENT_GPU_RMA , AMDSMI_EVENT_GPU_NOT_INITIALIZED ,
  AMDSMI_EVENT_GPU_MMSCH_ABNORMAL_STATE , AMDSMI_EVENT_GPU_RLCV_ABNORMAL_STATE , AMDSMI_EVENT_GPU_SDMA_ENGINE_BUSY , AMDSMI_EVENT_GPU_RLC_ENGINE_BUSY ,
  AMDSMI_EVENT_GPU_GC_ENGINE_BUSY , AMDSMI_EVENT_GPU__MAX
}
 Below are the error subcodes of each category.
 
enum  amdsmi_event_driver_t {
  AMDSMI_EVENT_DRIVER_SPIN_LOCK_BUSY = 0 , AMDSMI_EVENT_DRIVER_ALLOC_SYSTEM_MEM_FAIL , AMDSMI_EVENT_DRIVER_CREATE_GFX_WORKQUEUE_FAIL , AMDSMI_EVENT_DRIVER_CREATE_MM_WORKQUEUE_FAIL ,
  AMDSMI_EVENT_DRIVER_BUFFER_OVERFLOW , AMDSMI_EVENT_DRIVER_DEV_INIT_FAIL , AMDSMI_EVENT_DRIVER_CREATE_THREAD_FAIL , AMDSMI_EVENT_DRIVER_NO_ACCESS_PCI_REGION ,
  AMDSMI_EVENT_DRIVER_MMIO_FAIL , AMDSMI_EVENT_DRIVER_INTERRUPT_INIT_FAIL , AMDSMI_EVENT_DRIVER_INVALID_VALUE , AMDSMI_EVENT_DRIVER_CREATE_MUTEX_FAIL ,
  AMDSMI_EVENT_DRIVER_CREATE_TIMER_FAIL , AMDSMI_EVENT_DRIVER_CREATE_EVENT_FAIL , AMDSMI_EVENT_DRIVER_CREATE_SPIN_LOCK_FAIL , AMDSMI_EVENT_DRIVER_ALLOC_FB_MEM_FAIL ,
  AMDSMI_EVENT_DRIVER_ALLOC_DMA_MEM_FAIL , AMDSMI_EVENT_DRIVER_NO_FB_MANAGER , AMDSMI_EVENT_DRIVER_HW_INIT_FAIL , AMDSMI_EVENT_DRIVER_SW_INIT_FAIL ,
  AMDSMI_EVENT_DRIVER_INIT_CONFIG_ERROR , AMDSMI_EVENT_DRIVER_ERROR_LOGGING_FAILED , AMDSMI_EVENT_DRIVER_CREATE_RWLOCK_FAIL , AMDSMI_EVENT_DRIVER_CREATE_RWSEMA_FAIL ,
  AMDSMI_EVENT_DRIVER_GET_READ_LOCK_FAIL , AMDSMI_EVENT_DRIVER_GET_WRITE_LOCK_FAIL , AMDSMI_EVENT_DRIVER_GET_READ_SEMA_FAIL , AMDSMI_EVENT_DRIVER_GET_WRITE_SEMA_FAIL ,
  AMDSMI_EVENT_DRIVER_DIAG_DATA_INIT_FAIL , AMDSMI_EVENT_DRIVER_DIAG_DATA_MEM_REQ_FAIL , AMDSMI_EVENT_DRIVER_DIAG_DATA_VADDR_REQ_FAIL , AMDSMI_EVENT_DRIVER_DIAG_DATA_BUS_ADDR_REQ_FAIL ,
  AMDSMI_EVENT_DRIVER_HRTIMER_START_FAIL , AMDSMI_EVENT_DRIVER_CREATE_DRIVER_FILE_FAIL , AMDSMI_EVENT_DRIVER_CREATE_DEVICE_FILE_FAIL , AMDSMI_EVENT_DRIVER_CREATE_DEBUGFS_FILE_FAIL ,
  AMDSMI_EVENT_DRIVER_CREATE_DEBUGFS_DIR_FAIL , AMDSMI_EVENT_DRIVER_PCI_ENABLE_DEVICE_FAIL , AMDSMI_EVENT_DRIVER_FB_MAP_FAIL , AMDSMI_EVENT_DRIVER_DOORBELL_MAP_FAIL ,
  AMDSMI_EVENT_DRIVER_PCI_REGISTER_DRIVER_FAIL , AMDSMI_EVENT_DRIVER_ALLOC_IOVA_ALIGN_FAIL , AMDSMI_EVENT_DRIVER_ROM_MAP_FAIL , AMDSMI_EVENT_DRIVER_FULL_ACCESS_TIMEOUT ,
  AMDSMI_EVENT_DRIVER__MAX
}
 
enum  amdsmi_event_fw_t {
  AMDSMI_EVENT_FW_CMD_ALLOC_BUF_FAIL = 0 , AMDSMI_EVENT_FW_CMD_BUF_PREP_FAIL , AMDSMI_EVENT_FW_RING_INIT_FAIL , AMDSMI_EVENT_FW_FW_APPLY_SECURITY_POLICY_FAIL ,
  AMDSMI_EVENT_FW_START_RING_FAIL , AMDSMI_EVENT_FW_FW_LOAD_FAIL , AMDSMI_EVENT_FW_EXIT_FAIL , AMDSMI_EVENT_FW_INIT_FAIL ,
  AMDSMI_EVENT_FW_CMD_SUBMIT_FAIL , AMDSMI_EVENT_FW_CMD_FENCE_WAIT_FAIL , AMDSMI_EVENT_FW_TMR_LOAD_FAIL , AMDSMI_EVENT_FW_TOC_LOAD_FAIL ,
  AMDSMI_EVENT_FW_RAS_LOAD_FAIL , AMDSMI_EVENT_FW_RAS_UNLOAD_FAIL , AMDSMI_EVENT_FW_RAS_TA_INVOKE_FAIL , AMDSMI_EVENT_FW_RAS_TA_ERR_INJECT_FAIL ,
  AMDSMI_EVENT_FW_ASD_LOAD_FAIL , AMDSMI_EVENT_FW_ASD_UNLOAD_FAIL , AMDSMI_EVENT_FW_AUTOLOAD_FAIL , AMDSMI_EVENT_FW_VFGATE_FAIL ,
  AMDSMI_EVENT_FW_XGMI_LOAD_FAIL , AMDSMI_EVENT_FW_XGMI_UNLOAD_FAIL , AMDSMI_EVENT_FW_XGMI_TA_INVOKE_FAIL , AMDSMI_EVENT_FW_TMR_INIT_FAIL ,
  AMDSMI_EVENT_FW_NOT_SUPPORTED_FEATURE , AMDSMI_EVENT_FW_GET_PSP_TRACELOG_FAIL , AMDSMI_EVENT_FW_SET_SNAPSHOT_ADDR_FAIL , AMDSMI_EVENT_FW_SNAPSHOT_TRIGGER_FAIL ,
  AMDSMI_EVENT_FW_MIGRATION_GET_PSP_INFO_FAIL , AMDSMI_EVENT_FW_MIGRATION_EXPORT_FAIL , AMDSMI_EVENT_FW_MIGRATION_IMPORT_FAIL , AMDSMI_EVENT_FW_BL_FAIL ,
  AMDSMI_EVENT_FW_RAS_BOOT_FAIL , AMDSMI_EVENT_FW_MAILBOX_ERROR , AMDSMI_EVENT_FW__MAX
}
 
enum  amdsmi_event_reset_t {
  AMDSMI_EVENT_RESET_GPU = 0 , AMDSMI_EVENT_RESET_GPU_FAILED , AMDSMI_EVENT_RESET_FLR , AMDSMI_EVENT_RESET_FLR_FAILED ,
  AMDSMI_EVENT_RESET__MAX
}
 
enum  amdsmi_event_iov_t {
  AMDSMI_EVENT_IOV_NO_GPU_IOV_CAP = 0 , AMDSMI_EVENT_IOV_ASIC_NO_SRIOV_SUPPORT , AMDSMI_EVENT_IOV_ENABLE_SRIOV_FAIL , AMDSMI_EVENT_IOV_CMD_TIMEOUT ,
  AMDSMI_EVENT_IOV_CMD_ERROR , AMDSMI_EVENT_IOV_INIT_IV_RING_FAIL , AMDSMI_EVENT_IOV_SRIOV_STRIDE_ERROR , AMDSMI_EVENT_IOV_WS_SAVE_TIMEOUT ,
  AMDSMI_EVENT_IOV_WS_IDLE_TIMEOUT , AMDSMI_EVENT_IOV_WS_RUN_TIMEOUT , AMDSMI_EVENT_IOV_WS_LOAD_TIMEOUT , AMDSMI_EVENT_IOV_WS_SHUTDOWN_TIMEOUT ,
  AMDSMI_EVENT_IOV_WS_ALREADY_SHUTDOWN , AMDSMI_EVENT_IOV_WS_INFINITE_LOOP , AMDSMI_EVENT_IOV_WS_REENTRANT_ERROR , AMDSMI_EVENT_IOV__MAX
}
 
enum  amdsmi_event_ecc_t {
  AMDSMI_EVENT_ECC_UCE = 0 , AMDSMI_EVENT_ECC_CE , AMDSMI_EVENT_ECC_IN_PF_FB , AMDSMI_EVENT_ECC_IN_CRI_REG ,
  AMDSMI_EVENT_ECC_IN_VF_CRI , AMDSMI_EVENT_ECC_REACH_THD , AMDSMI_EVENT_ECC_VF_CE , AMDSMI_EVENT_ECC_VF_UE ,
  AMDSMI_EVENT_ECC_IN_SAME_ROW , AMDSMI_EVENT_ECC_UMC_UE , AMDSMI_EVENT_ECC_GFX_CE , AMDSMI_EVENT_ECC_GFX_UE ,
  AMDSMI_EVENT_ECC_SDMA_CE , AMDSMI_EVENT_ECC_SDMA_UE , AMDSMI_EVENT_ECC_GFX_CE_TOTAL , AMDSMI_EVENT_ECC_GFX_UE_TOTAL ,
  AMDSMI_EVENT_ECC_SDMA_CE_TOTAL , AMDSMI_EVENT_ECC_SDMA_UE_TOTAL , AMDSMI_EVENT_ECC_UMC_CE_TOTAL , AMDSMI_EVENT_ECC_UMC_UE_TOTAL ,
  AMDSMI_EVENT_ECC_MMHUB_CE , AMDSMI_EVENT_ECC_MMHUB_UE , AMDSMI_EVENT_ECC_MMHUB_CE_TOTAL , AMDSMI_EVENT_ECC_MMHUB_UE_TOTAL ,
  AMDSMI_EVENT_ECC_XGMI_WAFL_CE , AMDSMI_EVENT_ECC_XGMI_WAFL_UE , AMDSMI_EVENT_ECC_XGMI_WAFL_CE_TOTAL , AMDSMI_EVENT_ECC_XGMI_WAFL_UE_TOTAL ,
  AMDSMI_EVENT_ECC_FATAL_ERROR , AMDSMI_EVENT_ECC_POISON_CONSUMPTION , AMDSMI_EVENT_ECC_ACA_DUMP , AMDSMI_EVENT_ECC_WRONG_SOCKET_ID ,
  AMDSMI_EVENT_ECC_ACA_UNKNOWN_BLOCK_INSTANCE , AMDSMI_EVENT_ECC_UNKNOWN_CHIPLET_CE , AMDSMI_EVENT_ECC_UNKNOWN_CHIPLET_UE , AMDSMI_EVENT_ECC_UMC_CHIPLET_CE ,
  AMDSMI_EVENT_ECC_UMC_CHIPLET_UE , AMDSMI_EVENT_ECC_GFX_CHIPLET_CE , AMDSMI_EVENT_ECC_GFX_CHIPLET_UE , AMDSMI_EVENT_ECC_SDMA_CHIPLET_CE ,
  AMDSMI_EVENT_ECC_SDMA_CHIPLET_UE , AMDSMI_EVENT_ECC_MMHUB_CHIPLET_CE , AMDSMI_EVENT_ECC_MMHUB_CHIPLET_UE , AMDSMI_EVENT_ECC_XGMI_WAFL_CHIPLET_CE ,
  AMDSMI_EVENT_ECC_XGMI_WAFL_CHIPLET_UE , AMDSMI_EVENT_ECC_EEPROM_ENTRIES_FOUND , AMDSMI_EVENT_ECC_UMC_DE , AMDSMI_EVENT_ECC_UMC_DE_TOTAL ,
  AMDSMI_EVENT_ECC_UNKNOWN , AMDSMI_EVENT_ECC_EEPROM_REACH_THD , AMDSMI_EVENT_ECC_UMC_CHIPLET_DE , AMDSMI_EVENT_ECC_UNKNOWN_CHIPLET_DE ,
  AMDSMI_EVENT_ECC_EEPROM_CHK_MISMATCH , AMDSMI_EVENT_ECC_EEPROM_RESET , AMDSMI_EVENT_ECC_EEPROM_RESET_FAILED , AMDSMI_EVENT_ECC_EEPROM_APPEND ,
  AMDSMI_EVENT_ECC_THD_CHANGED , AMDSMI_EVENT_ECC_DUP_ENTRIES , AMDSMI_EVENT_ECC_EEPROM_WRONG_HDR , AMDSMI_EVENT_ECC_EEPROM_WRONG_VER ,
  AMDSMI_EVENT_ECC__MAX
}
 
enum  amdsmi_event_pp_t {
  AMDSMI_EVENT_PP_SET_DPM_POLICY_FAIL = 0 , AMDSMI_EVENT_PP_ACTIVATE_DPM_POLICY_FAIL , AMDSMI_EVENT_PP_I2C_SLAVE_NOT_PRESENT , AMDSMI_EVENT_PP_THROTTLER_EVENT ,
  AMDSMI_EVENT_PP__MAX
}
 
enum  amdsmi_event_sched_t {
  AMDSMI_EVENT_SCHED_WORLD_SWITCH_FAIL = 0 , AMDSMI_EVENT_SCHED_DISABLE_AUTO_HW_SWITCH_FAIL , AMDSMI_EVENT_SCHED_ENABLE_AUTO_HW_SWITCH_FAIL , AMDSMI_EVENT_SCHED_GFX_SAVE_REG_FAIL ,
  AMDSMI_EVENT_SCHED_GFX_IDLE_REG_FAIL , AMDSMI_EVENT_SCHED_GFX_RUN_REG_FAIL , AMDSMI_EVENT_SCHED_GFX_LOAD_REG_FAIL , AMDSMI_EVENT_SCHED_GFX_INIT_REG_FAIL ,
  AMDSMI_EVENT_SCHED_MM_SAVE_REG_FAIL , AMDSMI_EVENT_SCHED_MM_IDLE_REG_FAIL , AMDSMI_EVENT_SCHED_MM_RUN_REG_FAIL , AMDSMI_EVENT_SCHED_MM_LOAD_REG_FAIL ,
  AMDSMI_EVENT_SCHED_MM_INIT_REG_FAIL , AMDSMI_EVENT_SCHED_INIT_GPU_FAIL , AMDSMI_EVENT_SCHED_RUN_GPU_FAIL , AMDSMI_EVENT_SCHED_SAVE_GPU_STATE_FAIL ,
  AMDSMI_EVENT_SCHED_LOAD_GPU_STATE_FAIL , AMDSMI_EVENT_SCHED_IDLE_GPU_FAIL , AMDSMI_EVENT_SCHED_FINI_GPU_FAIL , AMDSMI_EVENT_SCHED_DEAD_VF ,
  AMDSMI_EVENT_SCHED_EVENT_QUEUE_FULL , AMDSMI_EVENT_SCHED_SHUTDOWN_VF_FAIL , AMDSMI_EVENT_SCHED_RESET_VF_NUM_FAIL , AMDSMI_EVENT_SCHED_IGNORE_EVENT ,
  AMDSMI_EVENT_SCHED_PF_SWITCH_FAIL , AMDSMI_EVENT_SCHED__MAX
}
 
enum  amdsmi_event_vf_max_t {
  AMDSMI_EVENT_VF_ATOMBIOS_INIT_FAIL = 0 , AMDSMI_EVENT_VF_NO_VBIOS , AMDSMI_EVENT_VF_GPU_POST_ERROR , AMDSMI_EVENT_VF_ATOMBIOS_GET_CLOCK_FAIL ,
  AMDSMI_EVENT_VF_FENCE_INIT_FAIL , AMDSMI_EVENT_VF_AMDGPU_INIT_FAIL , AMDSMI_EVENT_VF_IB_INIT_FAIL , AMDSMI_EVENT_VF_AMDGPU_LATE_INIT_FAIL ,
  AMDSMI_EVENT_VF_ASIC_RESUME_FAIL , AMDSMI_EVENT_VF_GPU_RESET_FAIL , AMDSMI_EVENT_VF__MAX
}
 
enum  amdsmi_event_vbios_t {
  AMDSMI_EVENT_VBIOS_INVALID = 0 , AMDSMI_EVENT_VBIOS_IMAGE_MISSING , AMDSMI_EVENT_VBIOS_CHECKSUM_ERR , AMDSMI_EVENT_VBIOS_POST_FAIL ,
  AMDSMI_EVENT_VBIOS_READ_FAIL , AMDSMI_EVENT_VBIOS_READ_IMG_HEADER_FAIL , AMDSMI_EVENT_VBIOS_READ_IMG_SIZE_FAIL , AMDSMI_EVENT_VBIOS_GET_FW_INFO_FAIL ,
  AMDSMI_EVENT_VBIOS_GET_TBL_REVISION_FAIL , AMDSMI_EVENT_VBIOS_PARSER_TBL_FAIL , AMDSMI_EVENT_VBIOS_IP_DISCOVERY_FAIL , AMDSMI_EVENT_VBIOS_TIMEOUT ,
  AMDSMI_EVENT_VBIOS_HASH_INVALID , AMDSMI_EVENT_VBIOS_HASH_UPDATED , AMDSMI_EVENT_VBIOS_IP_DISCOVERY_BINARY_CHECKSUM_FAIL , AMDSMI_EVENT_VBIOS_IP_DISCOVERY_TABLE_CHECKSUM_FAIL ,
  AMDSMI_EVENT_VBIOS__MAX
}
 
enum  amdsmi_event_guard_t { AMDSMI_EVENT_GUARD_RESET_FAIL = 0 , AMDSMI_EVENT_GUARD_EVENT_OVERFLOW , AMDSMI_EVENT_GUARD__MAX }
 
enum  amdsmi_event_gpumon_t {
  AMDSMI_EVENT_GPUMON_INVALID_OPTION = 0 , AMDSMI_EVENT_GPUMON_INVALID_VF_INDEX , AMDSMI_EVENT_GPUMON_INVALID_FB_SIZE , AMDSMI_EVENT_GPUMON_NO_SUITABLE_SPACE ,
  AMDSMI_EVENT_GPUMON_NO_AVAILABLE_SLOT , AMDSMI_EVENT_GPUMON_OVERSIZE_ALLOCATION , AMDSMI_EVENT_GPUMON_OVERLAPPING_FB , AMDSMI_EVENT_GPUMON_INVALID_GFX_TIMESLICE ,
  AMDSMI_EVENT_GPUMON_INVALID_MM_TIMESLICE , AMDSMI_EVENT_GPUMON_INVALID_GFX_PART , AMDSMI_EVENT_GPUMON_VF_BUSY , AMDSMI_EVENT_GPUMON_INVALID_VF_NUM ,
  AMDSMI_EVENT_GPUMON_NOT_SUPPORTED , AMDSMI_EVENT_GPUMON__MAX
}
 
enum  amdsmi_event_mmsch_t { AMDSMI_EVENT_MMSCH_IGNORED_JOB = 0 , AMDSMI_EVENT_MMSCH_UNSUPPORTED_VCN_FW , AMDSMI_EVENT_MMSCH__MAX }
 
enum  amdsmi_event_xgmi_t {
  AMDSMI_EVENT_XGMI_TOPOLOGY_UPDATE_FAILED = 0 , AMDSMI_EVENT_XGMI_TOPOLOGY_HW_INIT_UPDATE , AMDSMI_EVENT_XGMI_TOPOLOGY_UPDATE_DONE , AMDSMI_EVENT_XGMI_FB_SHARING_SETTING_ERROR ,
  AMDSMI_EVENT_XGMI_FB_SHARING_SETTING_RESET , AMDSMI_EVENT_XGMI__MAX
}
 
enum  amdsmi_ecc_correction_schema_support_t { AMDSMI_RAS_ECC_SUPPORT_PARITY = (1 << 0) , AMDSMI_RAS_ECC_SUPPORT_CORRECTABLE = (1 << 1) , AMDSMI_RAS_ECC_SUPPORT_UNCORRECTABLE = (1 << 2) , AMDSMI_RAS_ECC_SUPPORT_POISON = (1 << 3) }
 The values of this enum are used to identify supported ecc correction schema.
 
enum  amdsmi_guest_fw_engine_id_t {
  AMDSMI_GUEST_FW_ID_VCE = 0 , AMDSMI_GUEST_FW_ID_UVD , AMDSMI_GUEST_FW_ID_MC , AMDSMI_GUEST_FW_ID_ME ,
  AMDSMI_GUEST_FW_ID_PFP , AMDSMI_GUEST_FW_ID_CE , AMDSMI_GUEST_FW_ID_RLC , AMDSMI_GUEST_FW_ID_RLC_SRLC ,
  AMDSMI_GUEST_FW_ID_RLC_SRLG , AMDSMI_GUEST_FW_ID_RLC_SRLS , AMDSMI_GUEST_FW_ID_MEC , AMDSMI_GUEST_FW_ID_MEC2 ,
  AMDSMI_GUEST_FW_ID_SOS , AMDSMI_GUEST_FW_ID_ASD , AMDSMI_GUEST_FW_ID_TA_RAS , AMDSMI_GUEST_FW_ID_TA_XGMI ,
  AMDSMI_GUEST_FW_ID_SMC , AMDSMI_GUEST_FW_ID_SDMA , AMDSMI_GUEST_FW_ID_SDMA2 , AMDSMI_GUEST_FW_ID_VCN ,
  AMDSMI_GUEST_FW_ID_DMCU , AMDSMI_GUEST_FW_ID__MAX
}
 The values of this enum are used to identify the various firmware blocks.
 
enum  amdsmi_vf_config_flags_t {
  AMDSMI_VF_CONFIG_FB_SIZE_SET = 0 , AMDSMI_VF_CONFIG_FB_OFFSET_SET , AMDSMI_VF_CONFIG_GFX_TIMESLICE_US_SET , AMDSMI_VF_CONFIG_ENG_COMPUTE_BW_SET ,
  AMDSMI_VF_CONFIG_GUARD_THRESHOLD_FLR_SET , AMDSMI_VF_CONFIG_GUARD_THRESHOLD_EXCL_MOD_SET , AMDSMI_VF_CONFIG_GUARD_THRESHOLD_EXCL_TIMEOUT_SET , AMDSMI_VF_CONFIG_GUARD_THRESHOLD_ALL_INT_SET ,
  AMDSMI_VF_CONFIG_ENG_ENCODE_BW_UVD_SET , AMDSMI_VF_CONFIG_ENG_ENCODE_BW_VCE_SET , AMDSMI_VF_CONFIG_ENG_ENCODE_BW_UVD1_SET , AMDSMI_VF_CONFIG_ENG_ENCODE_BW_VCN_SET ,
  AMDSMI_VF_CONFIG_ENG_ENCODE_BW_VCN1_SET , AMDSMI_VF_CONFIG__MAX
}
 
enum  amdsmi_vf_sched_state_t {
  AMDSMI_VF_STATE_UNAVAILABLE , AMDSMI_VF_STATE_AVAILABLE , AMDSMI_VF_STATE_ACTIVE , AMDSMI_VF_STATE_SUSPENDED ,
  AMDSMI_VF_STATE_FULLACCESS , AMDSMI_VF_STATE_DEFAULT_AVAILABLE
}
 
enum  amdsmi_guard_type_t {
  AMDSMI_GUARD_EVENT_FLR , AMDSMI_GUARD_EVENT_EXCLUSIVE_MOD , AMDSMI_GUARD_EVENT_EXCLUSIVE_TIMEOUT , AMDSMI_GUARD_EVENT_ALL_INT ,
  AMDSMI_GUARD_EVENT__MAX
}
 
enum  amdsmi_driver_t {
  AMDSMI_DRIVER_LIBGV , AMDSMI_DRIVER_KMD , AMDSMI_DRIVER_AMDGPUV , AMDSMI_DRIVER_AMDGPU ,
  AMDSMI_DRIVER_VMWGPUV , AMDSMI_DRIVER__MAX
}
 
enum  amdsmi_guard_state_t { AMDSMI_GUARD_STATE_NORMAL = 0 , AMDSMI_GUARD_STATE_FULL = 1 , AMDSMI_GUARD_STATE_OVERFLOW = 2 }
 
enum  amdsmi_sched_block_t {
  AMDSMI_SCHED_BLOCK_GFX = 0x0 , AMDSMI_SCHED_BLOCK_UVD = 0x1 , AMDSMI_SCHED_BLOCK_VCE = 0x2 , AMDSMI_SCHED_BLOCK_UVD1 = 0x3 ,
  AMDSMI_SCHED_BLOCK_VCN = 0x4 , AMDSMI_SCHED_BLOCK_VCN1 = 0x5
}
 
enum  amdsmi_guest_fw_load_status_t {
  GUEST_FW_LOAD_STATUS_OK = 0 , GUEST_FW_LOAD_STATUS_OBSOLETE_FW = 1 , GUEST_FW_LOAD_STATUS_BAD_SIG = 2 , GUEST_FW_LOAD_STATUS_FW_LOAD_FAIL = 3 ,
  GUEST_FW_LOAD_STATUS_ERR_GENERIC = 4
}
 
enum  amdsmi_link_status_t { AMDSMI_LINK_STATUS_ENABLED = 0 , AMDSMI_LINK_STATUS_DISABLED = 1 , AMDSMI_LINK_STATUS_ERROR = 2 }
 
enum  amdsmi_link_type_t {
  AMDSMI_LINK_TYPE_INTERNAL , AMDSMI_LINK_TYPE_XGMI , AMDSMI_LINK_TYPE_PCIE , AMDSMI_LINK_TYPE_NOT_APPLICABLE ,
  AMDSMI_LINK_TYPE_UNKNOWN
}
 
enum  amdsmi_xgmi_fb_sharing_mode_t {
  AMDSMI_XGMI_FB_SHARING_MODE_CUSTOM = 0 , AMDSMI_XGMI_FB_SHARING_MODE_1 = 1 , AMDSMI_XGMI_FB_SHARING_MODE_2 = 2 , AMDSMI_XGMI_FB_SHARING_MODE_4 = 4 ,
  AMDSMI_XGMI_FB_SHARING_MODE_8 = 8 , AMDSMI_XGMI_FB_SHARING_MODE_UNKNOWN = 0xFFFFFFFF
}
 
enum  amdsmi_profile_capability_type_t {
  AMDSMI_PROFILE_CAPABILITY_MEMORY = 0 , AMDSMI_PROFILE_CAPABILITY_ENCODE = 1 , AMDSMI_PROFILE_CAPABILITY_DECODE = 2 , AMDSMI_PROFILE_CAPABILITY_COMPUTE = 3 ,
  AMDSMI_PROFILE_CAPABILITY__MAX
}
 
enum  amdsmi_vram_type_t {
  AMDSMI_VRAM_TYPE_UNKNOWN = 0 , AMDSMI_VRAM_TYPE_HBM = 1 , AMDSMI_VRAM_TYPE_HBM2 = 2 , AMDSMI_VRAM_TYPE_HBM2E = 3 ,
  AMDSMI_VRAM_TYPE_HBM3 = 4 , AMDSMI_VRAM_TYPE_DDR2 = 10 , AMDSMI_VRAM_TYPE_DDR3 = 11 , AMDSMI_VRAM_TYPE_DDR4 = 12 ,
  AMDSMI_VRAM_TYPE_GDDR1 = 17 , AMDSMI_VRAM_TYPE_GDDR2 = 18 , AMDSMI_VRAM_TYPE_GDDR3 = 19 , AMDSMI_VRAM_TYPE_GDDR4 = 20 ,
  AMDSMI_VRAM_TYPE_GDDR5 = 21 , AMDSMI_VRAM_TYPE_GDDR6 = 22 , AMDSMI_VRAM_TYPE_GDDR7 = 23
}
 
enum  amdsmi_vram_vendor_t {
  AMDSMI_VRAM_VENDOR_SAMSUNG , AMDSMI_VRAM_VENDOR_INFINEON , AMDSMI_VRAM_VENDOR_ELPIDA , AMDSMI_VRAM_VENDOR_ETRON ,
  AMDSMI_VRAM_VENDOR_NANYA , AMDSMI_VRAM_VENDOR_HYNIX , AMDSMI_VRAM_VENDOR_MOSEL , AMDSMI_VRAM_VENDOR_WINBOND ,
  AMDSMI_VRAM_VENDOR_ESMT , AMDSMI_VRAM_VENDOR_MICRON , AMDSMI_VRAM_VENDOR_UNKNOWN
}
 
enum  amdsmi_gpu_block_t {
  AMDSMI_GPU_BLOCK_INVALID = 0 , AMDSMI_GPU_BLOCK_FIRST = (1 << 0) , AMDSMI_GPU_BLOCK_UMC = AMDSMI_GPU_BLOCK_FIRST , AMDSMI_GPU_BLOCK_SDMA = (1 << 1) ,
  AMDSMI_GPU_BLOCK_GFX = (1 << 2) , AMDSMI_GPU_BLOCK_MMHUB = (1 << 3) , AMDSMI_GPU_BLOCK_ATHUB = (1 << 4) , AMDSMI_GPU_BLOCK_PCIE_BIF = (1 << 5) ,
  AMDSMI_GPU_BLOCK_HDP = (1 << 6) , AMDSMI_GPU_BLOCK_XGMI_WAFL = (1 << 7) , AMDSMI_GPU_BLOCK_DF = (1 << 8) , AMDSMI_GPU_BLOCK_SMN = (1 << 9) ,
  AMDSMI_GPU_BLOCK_SEM = (1 << 10) , AMDSMI_GPU_BLOCK_MP0 = (1 << 11) , AMDSMI_GPU_BLOCK_MP1 = (1 << 12) , AMDSMI_GPU_BLOCK_FUSE = (1 << 13) ,
  AMDSMI_GPU_BLOCK_MCA = (1 << 14) , AMDSMI_GPU_BLOCK_VCN = (1 << 15) , AMDSMI_GPU_BLOCK_JPEG = (1 << 16) , AMDSMI_GPU_BLOCK_IH = (1 << 17) ,
  AMDSMI_GPU_BLOCK_MPIO = (1 << 18) , AMDSMI_GPU_BLOCK_LAST = AMDSMI_GPU_BLOCK_MPIO
}
 
enum  amdsmi_card_form_factor_t { AMDSMI_CARD_FORM_FACTOR_PCIE , AMDSMI_CARD_FORM_FACTOR_OAM , AMDSMI_CARD_FORM_FACTOR_CEM , AMDSMI_CARD_FORM_FACTOR_UNKNOWN }
 
enum  amdsmi_metric_category_t {
  AMDSMI_METRIC_CATEGORY_ACC_COUNTER , AMDSMI_METRIC_CATEGORY_FREQUENCY , AMDSMI_METRIC_CATEGORY_ACTIVITY , AMDSMI_METRIC_CATEGORY_TEMPERATURE ,
  AMDSMI_METRIC_CATEGORY_POWER , AMDSMI_METRIC_CATEGORY_ENERGY , AMDSMI_METRIC_CATEGORY_THROTTLE , AMDSMI_METRIC_CATEGORY_PCIE ,
  AMDSMI_METRIC_CATEGORY_UNKNOWN
}
 
enum  amdsmi_metric_name_t {
  AMDSMI_METRIC_NAME_METRIC_ACC_COUNTER , AMDSMI_METRIC_NAME_FW_TIMESTAMP , AMDSMI_METRIC_NAME_CLK_GFX , AMDSMI_METRIC_NAME_CLK_SOC ,
  AMDSMI_METRIC_NAME_CLK_MEM , AMDSMI_METRIC_NAME_CLK_VCLK , AMDSMI_METRIC_NAME_CLK_DCLK , AMDSMI_METRIC_NAME_USAGE_GFX ,
  AMDSMI_METRIC_NAME_USAGE_MEM , AMDSMI_METRIC_NAME_USAGE_MM , AMDSMI_METRIC_NAME_USAGE_VCN , AMDSMI_METRIC_NAME_USAGE_JPEG ,
  AMDSMI_METRIC_NAME_VOLT_GFX , AMDSMI_METRIC_NAME_VOLT_SOC , AMDSMI_METRIC_NAME_VOLT_MEM , AMDSMI_METRIC_NAME_TEMP_HOTSPOT_CURR ,
  AMDSMI_METRIC_NAME_TEMP_HOTSPOT_LIMIT , AMDSMI_METRIC_NAME_TEMP_MEM_CURR , AMDSMI_METRIC_NAME_TEMP_MEM_LIMIT , AMDSMI_METRIC_NAME_TEMP_VR_CURR ,
  AMDSMI_METRIC_NAME_TEMP_SHUTDOWN , AMDSMI_METRIC_NAME_POWER_CURR , AMDSMI_METRIC_NAME_POWER_LIMIT , AMDSMI_METRIC_NAME_ENERGY_SOCKET ,
  AMDSMI_METRIC_NAME_ENERGY_CCD , AMDSMI_METRIC_NAME_ENERGY_XCD , AMDSMI_METRIC_NAME_ENERGY_AID , AMDSMI_METRIC_NAME_ENERGY_MEM ,
  AMDSMI_METRIC_NAME_THROTTLE_SOCKET_ACTIVE , AMDSMI_METRIC_NAME_THROTTLE_VR_ACTIVE , AMDSMI_METRIC_NAME_THROTTLE_MEM_ACTIVE , AMDSMI_METRIC_NAME_PCIE_BANDWIDTH ,
  AMDSMI_METRIC_NAME_PCIE_L0_TO_RECOVERY_COUNT , AMDSMI_METRIC_NAME_PCIE_REPLAY_COUNT , AMDSMI_METRIC_NAME_PCIE_REPLAY_ROLLOVER_COUNT , AMDSMI_METRIC_NAME_PCIE_NAK_SENT_COUNT ,
  AMDSMI_METRIC_NAME_PCIE_NAK_RECEIVED_COUNT , AMDSMI_METRIC_NAME_CLK_GFX_MAX_LIMIT , AMDSMI_METRIC_NAME_CLK_SOC_MAX_LIMIT , AMDSMI_METRIC_NAME_CLK_MEM_MAX_LIMIT ,
  AMDSMI_METRIC_NAME_CLK_VCLK_MAX_LIMIT , AMDSMI_METRIC_NAME_CLK_DCLK_MAX_LIMIT , AMDSMI_METRIC_NAME_CLK_GFX_MIN_LIMIT , AMDSMI_METRIC_NAME_CLK_SOC_MIN_LIMIT ,
  AMDSMI_METRIC_NAME_CLK_MEM_MIN_LIMIT , AMDSMI_METRIC_NAME_CLK_VCLK_MIN_LIMIT , AMDSMI_METRIC_NAME_CLK_DCLK_MIN_LIMIT , AMDSMI_METRIC_NAME_CLK_GFX_LOCKED ,
  AMDSMI_METRIC_NAME_CLK_GFX_DS_DISABLED , AMDSMI_METRIC_NAME_CLK_MEM_DS_DISABLED , AMDSMI_METRIC_NAME_CLK_SOC_DS_DISABLED , AMDSMI_METRIC_NAME_CLK_VCLK_DS_DISABLED ,
  AMDSMI_METRIC_NAME_CLK_DCLK_DS_DISABLED , AMDSMI_METRIC_NAME_PCIE_LINK_SPEED , AMDSMI_METRIC_NAME_PCIE_LINK_WIDTH , AMDSMI_METRIC_NAME_UNKNOWN
}
 
enum  amdsmi_metric_unit_t {
  AMDSMI_METRIC_UNIT_COUNTER , AMDSMI_METRIC_UNIT_UINT , AMDSMI_METRIC_UNIT_BOOL , AMDSMI_METRIC_UNIT_MHZ ,
  AMDSMI_METRIC_UNIT_PERCENT , AMDSMI_METRIC_UNIT_MILLIVOLT , AMDSMI_METRIC_UNIT_CELSIUS , AMDSMI_METRIC_UNIT_WATT ,
  AMDSMI_METRIC_UNIT_JOULE , AMDSMI_METRIC_UNIT_GBPS , AMDSMI_METRIC_UNIT_MBITPS , AMDSMI_METRIC_UNIT_PCIE_GEN ,
  AMDSMI_METRIC_UNIT_PCIE_LANES , AMDSMI_METRIC_UNIT_UNKNOWN
}
 
enum  amdsmi_metric_type_t { AMDSMI_METRIC_TYPE_COUNTER = (1 << 0) , AMDSMI_METRIC_TYPE_CHIPLET = (1 << 1) , AMDSMI_METRIC_TYPE_INST = (1 << 2) , AMDSMI_METRIC_TYPE_ACC = (1 << 3) }
 
enum  amdsmi_memory_partition_type_t {
  AMDSMI_MEMORY_PARTITION_UNKNOWN = 0 , AMDSMI_MEMORY_PARTITION_NPS1 = 1 , AMDSMI_MEMORY_PARTITION_NPS2 = 2 , AMDSMI_MEMORY_PARTITION_NPS4 = 4 ,
  AMDSMI_MEMORY_PARTITION_NPS8 = 8
}
 Memory Partitions. This enum is used to identify various memory partition types. More...
 
enum  amdsmi_accelerator_partition_type_t {
  AMDSMI_ACCELERATOR_PARTITION_INVALID = 0 , AMDSMI_ACCELERATOR_PARTITION_SPX , AMDSMI_ACCELERATOR_PARTITION_DPX , AMDSMI_ACCELERATOR_PARTITION_TPX ,
  AMDSMI_ACCELERATOR_PARTITION_QPX , AMDSMI_ACCELERATOR_PARTITION_CPX , AMDSMI_ACCELERATOR_PARTITION_MAX
}
 
enum  amdsmi_accelerator_partition_resource_type_t {
  AMDSMI_ACCELERATOR_XCC , AMDSMI_ACCELERATOR_ENCODER , AMDSMI_ACCELERATOR_DECODER , AMDSMI_ACCELERATOR_DMA ,
  AMDSMI_ACCELERATOR_JPEG , AMDSMI_ACCELERATOR_MAX
}
 
enum  amdsmi_driver_model_type_t { AMDSMI_DRIVER_MODEL_TYPE_WDDM = 0 , AMDSMI_DRIVER_MODEL_TYPE_WDM = 1 , AMDSMI_DRIVER_MODEL_TYPE_MCDM = 2 , AMDSMI_DRIVER_MODEL_TYPE__MAX = 3 }
 
enum  amdsmi_cper_sev_t {
  AMDSMI_CPER_SEV_NON_FATAL_UNCORRECTED = 0 , AMDSMI_CPER_SEV_FATAL = 1 , AMDSMI_CPER_SEV_NON_FATAL_CORRECTED = 2 , AMDSMI_CPER_SEV_NUM = 3 ,
  AMDSMI_CPER_SEV_UNUSED = 10
}
 

Functions

amdsmi_status_t amdsmi_init (uint64_t init_flags)
 Initializes the library and the internal software structures. More...
 
amdsmi_status_t amdsmi_shut_down (void)
 The library frees all associated with the library on the current process. More...
 
amdsmi_status_t amdsmi_get_processor_handles (amdsmi_socket_handle socket_handle, uint32_t *processor_count, amdsmi_processor_handle *processor_handles)
 Returns a list of AMD GPU devices in the system. More...
 
amdsmi_status_t amdsmi_get_processor_type (amdsmi_processor_handle processor_handle, processor_type_t *processor_type)
 Get the processor type. More...
 
amdsmi_status_t amdsmi_get_socket_handles (uint32_t *socket_count, amdsmi_socket_handle *socket_handles)
 Returns a list of socket handles in the system. NOT SUPPORTED YET, CURRENTLY HARDCODED TO RETURN EMPTY LIST. More...
 
amdsmi_status_t amdsmi_get_socket_info (amdsmi_socket_handle socket_handle, size_t len, char *name)
 Returns socket information about given socket handle NOT SUPPORTED YET, CURRENTLY HARDCODED TO RETURN EMPTY VALUES. More...
 
amdsmi_status_t amdsmi_get_processor_handle_from_bdf (amdsmi_bdf_t bdf, amdsmi_processor_handle *processor_handle)
 Returns processor handle (PF) from the given BDF. More...
 
amdsmi_status_t amdsmi_get_index_from_processor_handle (amdsmi_processor_handle processor_handle, uint32_t *processor_index)
 Returns the index of the given processor handle. More...
 
amdsmi_status_t amdsmi_get_vf_handle_from_bdf (amdsmi_bdf_t bdf, amdsmi_vf_handle_t *vf_handle)
 Returns VF handle from the given BDF. More...
 
amdsmi_status_t amdsmi_get_gpu_device_bdf (amdsmi_processor_handle processor_handle, amdsmi_bdf_t *bdf)
 Returns BDF of the given processor (PF or VF). More...
 
amdsmi_status_t amdsmi_get_processor_handle_from_index (uint32_t processor_index, amdsmi_processor_handle *processor_handle)
 Returns the processor handle from the given processor index. More...
 
amdsmi_status_t amdsmi_get_vf_bdf (amdsmi_vf_handle_t vf_handle, amdsmi_bdf_t *bdf)
 Returns BDF of the given device (VF). More...
 
amdsmi_status_t amdsmi_get_vf_handle_from_vf_index (amdsmi_processor_handle processor_handle, uint32_t fcn_idx, amdsmi_vf_handle_t *vf_handle)
 Returns the handle of a virtual function given its index. More...
 
amdsmi_status_t amdsmi_get_vf_handle_from_uuid (const char *uuid, amdsmi_vf_handle_t *vf_handle)
 Returns the handle of a virtual function from the given UUID. More...
 
amdsmi_status_t amdsmi_get_processor_handle_from_uuid (const char *uuid, amdsmi_processor_handle *processor_handle)
 Returns the processor handle from the given UUID. More...
 
amdsmi_status_t amdsmi_get_gpu_device_uuid (amdsmi_processor_handle processor_handle, unsigned int *uuid_length, char *uuid)
 Returns the UUID of the processor. More...
 
amdsmi_status_t amdsmi_get_vf_uuid (amdsmi_vf_handle_t processor_handle, unsigned int *uuid_length, char *uuid)
 Returns the UUID of the VF. More...
 
amdsmi_status_t amdsmi_get_gpu_driver_info (amdsmi_processor_handle processor_handle, amdsmi_driver_info_t *info)
 Returns the driver version information. More...
 
amdsmi_status_t amdsmi_get_gpu_driver_model (amdsmi_processor_handle processor_handle, amdsmi_driver_model_type_t *model)
 Returns the driver model information. More...
 
amdsmi_status_t amdsmi_get_lib_version (amdsmi_version_t *version)
 Get the build version information for the currently running build of AMDSMI. More...
 
amdsmi_status_t amdsmi_get_gpu_asic_info (amdsmi_processor_handle processor_handle, amdsmi_asic_info_t *info)
 Returns the ASIC information for the processor. More...
 
amdsmi_status_t amdsmi_get_gpu_vram_info (amdsmi_processor_handle processor_handle, amdsmi_vram_info_t *info)
 Returns vram info. More...
 
amdsmi_status_t amdsmi_get_power_cap_info (amdsmi_processor_handle processor_handle, uint32_t sensor_ind, amdsmi_power_cap_info_t *info)
 Returns the power caps as currently configured in the system. More...
 
amdsmi_status_t amdsmi_get_pcie_info (amdsmi_processor_handle processor_handle, amdsmi_pcie_info_t *info)
 Returns the PCIe info for the GPU. More...
 
amdsmi_status_t amdsmi_get_fb_layout (amdsmi_processor_handle processor_handle, amdsmi_pf_fb_info_t *info)
 Returns the framebuffer info for the ASIC. More...
 
amdsmi_status_t amdsmi_get_gpu_vbios_info (amdsmi_processor_handle processor_handle, amdsmi_vbios_info_t *info)
 Returns the static information for the vBIOS on the processor. More...
 
amdsmi_status_t amdsmi_get_gpu_board_info (amdsmi_processor_handle processor_handle, amdsmi_board_info_t *info)
 Returns the board part number and board information for the requested processor. More...
 
amdsmi_status_t amdsmi_get_fw_info (amdsmi_processor_handle processor_handle, amdsmi_fw_info_t *info)
 Returns the firmware versions running on PF of the processor. More...
 
amdsmi_status_t amdsmi_get_fw_error_records (amdsmi_processor_handle processor_handle, amdsmi_fw_error_record_t *records)
 Gets firmware error records. More...
 
amdsmi_status_t amdsmi_get_dfc_fw_table (amdsmi_processor_handle processor_handle, amdsmi_dfc_fw_t *info)
 Returns the DFC fw table. More...
 
amdsmi_status_t amdsmi_get_gpu_activity (amdsmi_processor_handle processor_handle, amdsmi_engine_usage_t *info)
 Returns the current usage of the GPU engines (GFX, MM and MEM). Each usage is reported as a percentage from 0-100%. More...
 
amdsmi_status_t amdsmi_get_power_info (amdsmi_processor_handle processor_handle, uint32_t sensor_ind, amdsmi_power_info_t *info)
 Returns the current power and voltage of the GPU. More...
 
amdsmi_status_t amdsmi_set_power_cap (amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t cap)
 Sets GPU power cap. More...
 
amdsmi_status_t amdsmi_is_gpu_power_management_enabled (amdsmi_processor_handle processor_handle, bool *enabled)
 Returns is power management enabled. More...
 
amdsmi_status_t amdsmi_get_clock_info (amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, amdsmi_clk_info_t *info)
 Returns the measurements of the clocks in the GPU for the GFX and multimedia engines and Memory. This call reports the averages over 1s in MHz. For clk_type AMDSMI_CLK_TYPE_GFX cur_clk is expected to be larger than max_clk in some cases due to decoupled nature of master vs slave oscillator in DFLL clk_locked supported only for AMDSMI_CLK_TYPE_GFX. More...
 
amdsmi_status_t amdsmi_get_temp_metric (amdsmi_processor_handle processor_handle, amdsmi_temperature_type_t sensor_type, amdsmi_temperature_metric_t metric, int64_t *temperature)
 Returns temperature measurements of the GPU. The results are in °C. More...
 
amdsmi_status_t amdsmi_get_gpu_cache_info (amdsmi_processor_handle processor_handle, amdsmi_gpu_cache_info_t *info)
 Returns gpu cache info. More...
 
amdsmi_status_t amdsmi_get_gpu_metrics (amdsmi_processor_handle processor_handle, uint32_t *metrics_size, amdsmi_metric_t *metrics)
 Returns metrics information. More...
 
amdsmi_status_t amdsmi_get_soc_pstate (amdsmi_processor_handle processor_handle, amdsmi_dpm_policy_t *policy)
 Returns the soc pstate policy for the processor. More...
 
amdsmi_status_t amdsmi_set_soc_pstate (amdsmi_processor_handle processor_handle, uint32_t policy_id)
 Set the soc pstate policy for the processor. More...
 
amdsmi_status_t amdsmi_get_gpu_total_ecc_count (amdsmi_processor_handle processor_handle, amdsmi_error_count_t *ec)
 Returns the number of ECC errors (correctable, uncorrectable and deferred) in the given GPU. More...
 
amdsmi_status_t amdsmi_get_gpu_ecc_count (amdsmi_processor_handle processor_handle, amdsmi_gpu_block_t block, amdsmi_error_count_t *ec)
 Returns the number of ECC errors (correctable, uncorrectable and deferred) for the given GPU block. More...
 
amdsmi_status_t amdsmi_get_gpu_ecc_enabled (amdsmi_processor_handle processor_handle, uint64_t *enabled_blocks)
 Returns the enabled ECC bitmask. More...
 
amdsmi_status_t amdsmi_get_gpu_bad_page_info (amdsmi_processor_handle processor_handle, uint32_t *bad_page_size, amdsmi_eeprom_table_record_t *bad_pages)
 Returns the bad page info. More...
 
amdsmi_status_t amdsmi_get_gpu_ras_feature_info (amdsmi_processor_handle processor_handle, amdsmi_ras_feature_t *ras_feature)
 Returns RAS features info. More...
 
amdsmi_status_t amdsmi_get_num_vf (amdsmi_processor_handle processor_handle, uint32_t *num_vf_enabled, uint32_t *num_vf_supported)
 Returns the number of VFs enabled by gpuv in the ASIC. More...
 
amdsmi_status_t amdsmi_set_num_vf (amdsmi_processor_handle processor_handle, uint32_t num_vf)
 Enable a given number of VF. More...
 
amdsmi_status_t amdsmi_get_vf_partition_info (amdsmi_processor_handle processor_handle, unsigned int vf_buffer_num, amdsmi_partition_info_t *info)
 Returns the current framebuffer partitioning structure as currently configured by the driver. More...
 
amdsmi_status_t amdsmi_get_vf_info (amdsmi_vf_handle_t vf_handle, amdsmi_vf_info_t *config)
 Returns the configuration structure for a VF. More...
 
amdsmi_status_t amdsmi_get_vf_data (amdsmi_vf_handle_t vf_handle, amdsmi_vf_data_t *info)
 Returns the data structure for a VF. More...
 
amdsmi_status_t amdsmi_event_create (amdsmi_processor_handle *processor_list, uint32_t num_devices, uint64_t event_types, amdsmi_event_set *set)
 Allocate a new event set notifier to monitor different types of issues with the GPU running virtualization SW. This call registers an event set. The user must pass an array with the GPUs it wants to monitor with the selected event flags. More...
 
amdsmi_status_t amdsmi_event_read (amdsmi_event_set set, int64_t timeout_usec, amdsmi_event_entry_t *event)
 The call blocks till timeout is expired to copy one event specified by the event set into the user provided notifier storage. More...
 
amdsmi_status_t amdsmi_event_destroy (amdsmi_event_set set)
 Destroys and frees an event set. More...
 
amdsmi_status_t amdsmi_get_guest_data (amdsmi_vf_handle_t vf_handle, amdsmi_guest_data_t *info)
 Returns guest OS information of the queried VF. The fw_info field from the amdsmi_guest_data structure is deprecated and will be empty. To get the vf fw info, amdsmi_get_vf_fw_info API should be used. More...
 
amdsmi_status_t amdsmi_get_vf_fw_info (amdsmi_vf_handle_t vf_handle, amdsmi_fw_info_t *info)
 Returns the firmware versions running on a VF. In case the VM is not started on the VF, empty list will be returned and num_fw_info will be set to zero. More...
 
amdsmi_status_t amdsmi_get_partition_profile_info (amdsmi_processor_handle processor_handle, amdsmi_profile_info_t *profile_info)
 Return the list of supported profiles on the given GPU device. More...
 
amdsmi_status_t amdsmi_get_link_metrics (amdsmi_processor_handle processor_handle, amdsmi_link_metrics_t *link_metrics)
 Return link metric information. More...
 
amdsmi_status_t amdsmi_get_link_topology (amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, amdsmi_link_topology_t *topology_info)
 Return link topology information between two connected processors. More...
 
amdsmi_status_t amdsmi_get_xgmi_fb_sharing_caps (amdsmi_processor_handle processor_handle, amdsmi_xgmi_fb_sharing_caps_t *caps)
 Return XGMI capabilities. More...
 
amdsmi_status_t amdsmi_get_xgmi_fb_sharing_mode_info (amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, amdsmi_xgmi_fb_sharing_mode_t mode, uint8_t *fb_sharing)
 Return XGMI framebuffer sharing information between two GPUs. More...
 
amdsmi_status_t amdsmi_set_xgmi_fb_sharing_mode (amdsmi_processor_handle processor_handle, amdsmi_xgmi_fb_sharing_mode_t mode)
 Set XGMI framebuffer sharing mode. More...
 
amdsmi_status_t amdsmi_set_xgmi_fb_sharing_mode_v2 (amdsmi_processor_handle *processor_list, uint32_t num_processors, amdsmi_xgmi_fb_sharing_mode_t mode)
 Set XGMI framebuffer custom sharing mode. More...
 
amdsmi_status_t amdsmi_clear_vf_fb (amdsmi_vf_handle_t vf_handle)
 Clear the framebuffer of a VF. If trying to clear the framebuffer of an active function, the call will fail with device busy. More...
 
amdsmi_status_t amdsmi_status_code_to_string (amdsmi_status_t status, const char **status_string)
 Get a description of a provided AMDSMI error status. More...
 
amdsmi_status_t amdsmi_get_gpu_memory_partition_config (amdsmi_processor_handle processor_handle, amdsmi_memory_partition_config_t *config)
 Returns current gpu memory partition config and mode capabilities. More...
 
amdsmi_status_t amdsmi_set_gpu_memory_partition_mode (amdsmi_processor_handle processor_handle, amdsmi_memory_partition_type_t mode)
 Sets memory partition mode. More...
 
amdsmi_status_t amdsmi_get_gpu_accelerator_partition_profile_config (amdsmi_processor_handle processor_handle, amdsmi_accelerator_partition_profile_config_t *profile_config)
 Returns gpu accelerator partition caps as currently configured in the system. More...
 
amdsmi_status_t amdsmi_get_gpu_accelerator_partition_profile (amdsmi_processor_handle processor_handle, amdsmi_accelerator_partition_profile_t *profile, uint32_t *partition_id)
 Returns current gpu accelerator partition cap. More...
 
amdsmi_status_t amdsmi_set_gpu_accelerator_partition_profile (amdsmi_processor_handle processor_handle, uint32_t profile_index)
 Sets accelerator partition setting based on profile_index from amdsmi_get_gpu_accelerator_partition_profile_config. More...
 
amdsmi_status_t amdsmi_gpu_get_cper_entries (amdsmi_processor_handle processor_handle, uint32_t severity_mask, char *cper_data, uint64_t *buf_size, amdsmi_cper_hdr **cper_hdrs, uint64_t *entry_count, uint64_t *cursor)
 Retrieve CPER entries cached in the driver. More...
 

Detailed Description

AMD AMDSMI Library Types

Macro Definition Documentation

◆ AMDSMI_MASK_ALL

#define AMDSMI_MASK_ALL   (~0ULL)

AMDSMI event mask.

include all events and all severities

Enumeration Type Documentation

◆ amdsmi_init_flags_t

Initialization flags.

Initialization flags may be OR'd together and passed to amdsmi_init().

Enumerator
AMDSMI_INIT_ALL_PROCESSORS 

Initialize all processors.

◆ amdsmi_status_t

ENUMERATORS.

Enumerator
AMDSMI_STATUS_SUCCESS 

Call succeeded.

AMDSMI_STATUS_INVAL 

Invalid parameters.

AMDSMI_STATUS_NOT_SUPPORTED 

Command not supported.

AMDSMI_STATUS_NOT_YET_IMPLEMENTED 

Not implemented yet.

AMDSMI_STATUS_FAIL_LOAD_MODULE 

Fail to load lib.

AMDSMI_STATUS_FAIL_LOAD_SYMBOL 

Fail to load symbol.

AMDSMI_STATUS_DRM_ERROR 

Error when call libdrm.

AMDSMI_STATUS_API_FAILED 

API call failed.

AMDSMI_STATUS_TIMEOUT 

Timeout in API call.

AMDSMI_STATUS_RETRY 

Retry operation.

AMDSMI_STATUS_NO_PERM 

Permission Denied.

AMDSMI_STATUS_INTERRUPT 

An interrupt occurred during execution of function.

AMDSMI_STATUS_IO 

I/O Error.

AMDSMI_STATUS_ADDRESS_FAULT 

Bad address.

AMDSMI_STATUS_FILE_ERROR 

Problem accessing a file.

AMDSMI_STATUS_OUT_OF_RESOURCES 

Not enough memory.

AMDSMI_STATUS_INTERNAL_EXCEPTION 

An internal exception was caught.

AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS 

The provided input is out of allowable or safe range.

AMDSMI_STATUS_INIT_ERROR 

An error occurred when initializing internal data structures.

AMDSMI_STATUS_REFCOUNT_OVERFLOW 

An internal reference counter exceeded INT32_MAX.

AMDSMI_STATUS_BUSY 

Processor busy.

AMDSMI_STATUS_NOT_FOUND 

Processor not found.

AMDSMI_STATUS_NOT_INIT 

Processor not initialized.

AMDSMI_STATUS_NO_SLOT 

No more free slot.

AMDSMI_STATUS_DRIVER_NOT_LOADED 

Processor driver not loaded.

AMDSMI_STATUS_NO_DATA 

No data was found for a given input.

AMDSMI_STATUS_INSUFFICIENT_SIZE 

Not enough resources were available for the operation.

AMDSMI_STATUS_UNEXPECTED_SIZE 

An unexpected amount of data was read.

AMDSMI_STATUS_UNEXPECTED_DATA 

The data read or provided to function is not what was expected.

AMDSMI_STATUS_NON_AMD_CPU 

System has different cpu than AMD.

AMDSMI_STATUS_NO_ENERGY_DRV 

Energy driver not found.

AMDSMI_STATUS_NO_MSR_DRV 

MSR driver not found.

AMDSMI_STATUS_NO_HSMP_DRV 

HSMP driver not found.

AMDSMI_STATUS_NO_HSMP_SUP 

HSMP not supported.

AMDSMI_STATUS_NO_HSMP_MSG_SUP 

HSMP message/feature not supported.

AMDSMI_STATUS_HSMP_TIMEOUT 

HSMP message is timedout.

AMDSMI_STATUS_NO_DRV 

No Energy and HSMP driver present.

AMDSMI_STATUS_FILE_NOT_FOUND 

file or directory not found

AMDSMI_STATUS_ARG_PTR_NULL 

Parsed argument is invalid.

AMDSMI_STATUS_AMDGPU_RESTART_ERR 

AMDGPU restart failed.

AMDSMI_STATUS_SETTING_UNAVAILABLE 

Setting is not available.

AMDSMI_STATUS_MAP_ERROR 

The internal library error did not map to a status code.

AMDSMI_STATUS_UNKNOWN_ERROR 

An unknown error occurred.

◆ amdsmi_fw_block_t

Enumerator
AMDSMI_FW_ID_DMCU_ERAM 

eRAM

AMDSMI_FW_ID_DMCU_ISR 

ISR.

AMDSMI_FW_ID_MES_THREAD1 

FW_ID_MES_THREAD1 = CP_MES_KIQ.

AMDSMI_FW_ID_RLX6 

FW_ID_MES_THREAD1_STACK = MES_KIQ_STACK.

◆ amdsmi_clk_type_t

Clock types.

Enumerator
AMDSMI_CLK_TYPE_SYS 

System clock.

AMDSMI_CLK_TYPE_DF 

running on a separate clock)

Data Fabric clock (for ASICs

AMDSMI_CLK_TYPE_DCEF 

Display Controller Engine clock.

◆ amdsmi_temperature_metric_t

Temperature Metrics. This enum is used to identify various temperature metrics. Corresponding values will be in Celcius.

Enumerator
AMDSMI_TEMP_CURRENT 

Temperature current value.

AMDSMI_TEMP_MAX 

Temperature max value.

AMDSMI_TEMP_MIN 

Temperature min value.

AMDSMI_TEMP_MAX_HYST 

Temperature hysteresis value for max limit. (This is an absolute temperature, not a delta).

AMDSMI_TEMP_MIN_HYST 

Temperature hysteresis value for min limit. (This is an absolute temperature, not a delta).

AMDSMI_TEMP_CRITICAL 

greater than corresponding temp_max values.

Temperature critical max value, typically

AMDSMI_TEMP_CRITICAL_HYST 

Temperature hysteresis value for critical limit. (This is an absolute temperature, not a delta).

AMDSMI_TEMP_EMERGENCY 

Temperature emergency max value, for chips supporting more than two upper temperature limits. Must be equal or greater than corresponding temp_crit values.

AMDSMI_TEMP_EMERGENCY_HYST 

Temperature hysteresis value for emergency limit. (This is an absolute temperature, not a delta).

AMDSMI_TEMP_CRIT_MIN 

Temperature critical min value, typically lower than corresponding temperature minimum values.

AMDSMI_TEMP_CRIT_MIN_HYST 

Temperature hysteresis value for critical minimum limit. (This is an absolute temperature, not a delta).

AMDSMI_TEMP_OFFSET 

Temperature offset which is added to the

AMDSMI_TEMP_LOWEST 

temperature reading by the chip.

Historical minimum temperature.

AMDSMI_TEMP_HIGHEST 

Historical maximum temperature.

AMDSMI_TEMP_SHUTDOWN 

Shutdown temperature.

◆ amdsmi_profile_capability_type_t

Enumerator
AMDSMI_PROFILE_CAPABILITY_MEMORY 

memory

AMDSMI_PROFILE_CAPABILITY_ENCODE 

encode engine

AMDSMI_PROFILE_CAPABILITY_DECODE 

decode engine

AMDSMI_PROFILE_CAPABILITY_COMPUTE 

compute engine

◆ amdsmi_gpu_block_t

Enumerator
AMDSMI_GPU_BLOCK_INVALID 

invalid block

Used to indicate an

AMDSMI_GPU_BLOCK_UMC 

UMC block.

AMDSMI_GPU_BLOCK_SDMA 

SDMA block.

AMDSMI_GPU_BLOCK_GFX 

GFX block.

AMDSMI_GPU_BLOCK_MMHUB 

MMHUB block.

AMDSMI_GPU_BLOCK_ATHUB 

ATHUB block.

AMDSMI_GPU_BLOCK_PCIE_BIF 

PCIE_BIF block.

AMDSMI_GPU_BLOCK_HDP 

HDP block.

AMDSMI_GPU_BLOCK_XGMI_WAFL 

XGMI block.

AMDSMI_GPU_BLOCK_DF 

DF block.

AMDSMI_GPU_BLOCK_SMN 

SMN block.

AMDSMI_GPU_BLOCK_SEM 

SEM block.

AMDSMI_GPU_BLOCK_MP0 

MP0 block.

AMDSMI_GPU_BLOCK_MP1 

MP1 block.

AMDSMI_GPU_BLOCK_FUSE 

Fuse block.

AMDSMI_GPU_BLOCK_MCA 

MCA block.

AMDSMI_GPU_BLOCK_VCN 

VCN block.

AMDSMI_GPU_BLOCK_JPEG 

JPEG block.

AMDSMI_GPU_BLOCK_IH 

IH block.

AMDSMI_GPU_BLOCK_MPIO 

MPIO block.

◆ amdsmi_metric_type_t

Enumerator
AMDSMI_METRIC_TYPE_COUNTER 

counter metric

AMDSMI_METRIC_TYPE_CHIPLET 

chiplet metric

AMDSMI_METRIC_TYPE_INST 

instantaneous metric

AMDSMI_METRIC_TYPE_ACC 

accumulated metric

◆ amdsmi_memory_partition_type_t

Memory Partitions. This enum is used to identify various memory partition types.

Enumerator
AMDSMI_MEMORY_PARTITION_NPS1 

across all 8 HBM stacks (all stacks/1).

NPS1 - All CCD & XCD data is interleaved

AMDSMI_MEMORY_PARTITION_NPS2 

NPS2 - 2 sets of CCDs or 4 XCD interleaved across the 4 HBM stacks per AID pair (8 stacks/2).

AMDSMI_MEMORY_PARTITION_NPS4 

NPS4 - Each XCD data is interleaved across across 2 (or single) HBM stacks (8 stacks/8 or 8 stacks/4).

AMDSMI_MEMORY_PARTITION_NPS8 

NPS8 - Each XCD uses a single HBM stack (8 stacks/8). Or each XCD uses a single HBM stack & CCDs share 2 non-interleaved HBM stacks on its AID (AID[1,2,3] = 6 stacks/6).

◆ amdsmi_accelerator_partition_type_t

Enumerator
AMDSMI_ACCELERATOR_PARTITION_SPX 

together with shared memory

Single GPU mode (SPX)- All XCCs work

AMDSMI_ACCELERATOR_PARTITION_DPX 

together with shared memory

Dual GPU mode (DPX)- Half XCCs work

AMDSMI_ACCELERATOR_PARTITION_TPX 

work together with shared memory

Triple GPU mode (TPX)- One-third XCCs

AMDSMI_ACCELERATOR_PARTITION_QPX 

work together with shared memory

Quad GPU mode (QPX)- Quarter XCCs

AMDSMI_ACCELERATOR_PARTITION_CPX 

shared memory

Core mode (CPX)- Per-chip XCC with

Function Documentation

◆ amdsmi_status_code_to_string()

amdsmi_status_t amdsmi_status_code_to_string ( amdsmi_status_t  status,
const char **  status_string 
)

Get a description of a provided AMDSMI error status.

Platform:

gpu_bm_linux

host

cpu_bm

guest_1vf

guest_mvf

Set the provided pointer to a const char *, status_string, to a string containing a description of the provided error code status.

Parameters
[in]statusThe error status for which a description is desired
[in,out]status_stringA pointer to a const char * which will be made to point to a description of the provided error code
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_gpu_get_cper_entries()

amdsmi_status_t amdsmi_gpu_get_cper_entries ( amdsmi_processor_handle  processor_handle,
uint32_t  severity_mask,
char *  cper_data,
uint64_t *  buf_size,
amdsmi_cper_hdr **  cper_hdrs,
uint64_t *  entry_count,
uint64_t *  cursor 
)

Retrieve CPER entries cached in the driver.

The user will pass buffers to hold the CPER data and CPER headers. The library will fill the buffer based on the severity_mask user passed. It will also parse the CPER header and stored in the cper_hdrs array. The user can use the cper_hdrs to get the timestamp and other header information. A cursor is also returned to the user, which can be used to get the next set of CPER entries.

If there are more data than any of the buffers user pass, the library will return AMDSMI_STATUS_MORE_DATA. User can call the API again with the cursor returned at previous call to get more data. If the buffer size is too small to even hold one entry, the library will return AMDSMI_STATUS_OUT_OF_RESOURCES.

Even if the API returns AMDSMI_STATUS_MORE_DATA, the 2nd call may still get the entry_count == 0 as the driver cache may not contain the serverity user is interested in. The API should return AMDSMI_STATUS_SUCCESS in this case so that user can ignore that call.

Parameters
[in]processor_handleHandle to the processor for which CPER entries are to be retrieved.
[in]severity_maskThe severity mask of the entries to be retrieved.
[in,out]cper_dataPointer to a buffer where the CPER data will be stored. User must allocate the buffer and set the buf_size correctly.
[in,out]buf_sizePointer to a variable that specifies the size of the cper_data. On return, it will contain the actual size of the data written to the cper_data.
[in,out]cper_hdrsArray of the parsed headers of the cper_data. The user must allocate the array of pointers to cper_hdr. The library will fill the array with the pointers to the parsed headers. The underlying data is in the cper_data buffer and only pointer is stored in this array.
[in,out]entry_countPointer to a variable that specifies the array length of the cper_hdrs user allocated. On return, it will contain the actual entries written to the cper_hdrs.
[in,out]cursorPointer to a variable that will contain the cursor for the next call.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail