amdsmi.h Source File

amdsmi.h Source File#

AMD SMI: amdsmi.h Source File
amdsmi.h
Go to the documentation of this file.
1 /*
2  * =============================================================================
3  * The University of Illinois/NCSA
4  * Open Source License (NCSA)
5  *
6  * Copyright (c) 2023, Advanced Micro Devices, Inc.
7  * All rights reserved.
8  *
9  * Developed by:
10  *
11  * AMD Research and AMD ROC Software Development
12  *
13  * Advanced Micro Devices, Inc.
14  *
15  * www.amd.com
16  *
17  * Permission is hereby granted, free of charge, to any person obtaining a copy
18  * of this software and associated documentation files (the "Software"), to
19  * deal with the Software without restriction, including without limitation
20  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
21  * and/or sell copies of the Software, and to permit persons to whom the
22  * Software is furnished to do so, subject to the following conditions:
23  *
24  * - Redistributions of source code must retain the above copyright notice,
25  * this list of conditions and the following disclaimers.
26  * - Redistributions in binary form must reproduce the above copyright
27  * notice, this list of conditions and the following disclaimers in
28  * the documentation and/or other materials provided with the distribution.
29  * - Neither the names of <Name of Development Group, Name of Institution>,
30  * nor the names of its contributors may be used to endorse or promote
31  * products derived from this Software without specific prior written
32  * permission.
33  *
34  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
37  * THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
38  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
39  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
40  * DEALINGS WITH THE SOFTWARE.
41  *
42  */
43 #ifndef INCLUDE_AMDSMI_H_
44 #define INCLUDE_AMDSMI_H_
45 
51 #include <stdlib.h>
52 #include <stdbool.h>
53 #ifdef __cplusplus
54 extern "C" {
55 #include <cstdint>
56 #ifdef ENABLE_ESMI_LIB
57  #include <e_smi/e_smi.h>
58 #endif
59 
60 #else
61 #include <stdint.h>
62 #endif // __cplusplus
63 
69 typedef enum {
70  AMDSMI_INIT_ALL_PROCESSORS = 0x0, // Default option
71  AMDSMI_INIT_AMD_CPUS = (1 << 0),
72  AMDSMI_INIT_AMD_GPUS = (1 << 1),
73  AMDSMI_INIT_NON_AMD_CPUS = (1 << 2),
74  AMDSMI_INIT_NON_AMD_GPUS = (1 << 3)
76 
77 /* Maximum size definitions AMDSMI */
78 #define AMDSMI_MAX_MM_IP_COUNT 8
79 #define AMDSMI_MAX_DATE_LENGTH 32
80 #define AMDSMI_MAX_STRING_LENGTH 64
81 #define AMDSMI_NORMAL_STRING_LENGTH 32
82 #define AMDSMI_MAX_DEVICES 32
83 #define AMDSMI_MAX_NAME 32
84 #define AMDSMI_MAX_DRIVER_VERSION_LENGTH 80
85 #define AMDSMI_PRODUCT_NAME_LENGTH 128
86 #define AMDSMI_MAX_CONTAINER_TYPE 2
87 #define AMDSMI_MAX_CACHE_TYPES 10
88 
89 #define AMDSMI_GPU_UUID_SIZE 38
90 
91 /* string format */
92 #define AMDSMI_TIME_FORMAT "%02d:%02d:%02d.%03d"
93 #define AMDSMI_DATE_FORMAT "%04d-%02d-%02d:%02d:%02d:%02d.%03d"
94 
100 #define AMDSMI_LIB_VERSION_YEAR 23
101 
103 #define AMDSMI_LIB_VERSION_MAJOR 4
104 
106 #define AMDSMI_LIB_VERSION_MINOR 0
107 
109 #define AMDSMI_LIB_VERSION_RELEASE 0
110 
111 #define AMDSMI_LIB_VERSION_CREATE_STRING(YEAR, MAJOR, MINOR, RELEASE) (#YEAR "." #MAJOR "." #MINOR "." #RELEASE)
112 #define AMDSMI_LIB_VERSION_EXPAND_PARTS(YEAR_STR, MAJOR_STR, MINOR_STR, RELEASE_STR) AMDSMI_LIB_VERSION_CREATE_STRING(YEAR_STR, MAJOR_STR, MINOR_STR, RELEASE_STR)
113 #define AMDSMI_LIB_VERSION_STRING AMDSMI_LIB_VERSION_EXPAND_PARTS(AMDSMI_LIB_VERSION_YEAR, AMDSMI_LIB_VERSION_MAJOR, AMDSMI_LIB_VERSION_MINOR, AMDSMI_LIB_VERSION_RELEASE)
114 
115 typedef enum {
116  AMDSMI_MM_UVD,
117  AMDSMI_MM_VCE,
118  AMDSMI_MM_VCN,
119  AMDSMI_MM__MAX
120 } amdsmi_mm_ip_t;
121 
122 typedef enum {
123  CONTAINER_LXC,
124  CONTAINER_DOCKER,
125 } amdsmi_container_types_t;
126 
129 typedef void *amdsmi_socket_handle;
130 #ifdef ENABLE_ESMI_LIB
131 typedef void *amdsmi_cpusocket_handle;
132 #endif
133 
140 typedef enum {
141  UNKNOWN = 0,
142  AMD_GPU,
143  AMD_CPU,
144  NON_AMD_GPU,
145  NON_AMD_CPU,
146  AMD_CPU_CORE,
147  AMD_APU
149 
153 // Please avoid status codes that are multiples of 256 (256, 512, etc..)
154 // Return values in the shell get modulo 256 applied, meaning any multiple of 256 ends up as 0
155 typedef enum {
157  // Library usage errors
177  // Device related errors
183  // Data and size errors
188  //esmi errors
201 
202  // General errors
203  AMDSMI_STATUS_MAP_ERROR = 0xFFFFFFFE,
206 
210 typedef enum {
211  CLK_TYPE_SYS = 0x0,
212  CLK_TYPE_FIRST = CLK_TYPE_SYS,
213  CLK_TYPE_GFX = CLK_TYPE_SYS,
214  CLK_TYPE_DF,
217  CLK_TYPE_SOC,
218  CLK_TYPE_MEM,
219  CLK_TYPE_PCIE,
220  CLK_TYPE_VCLK0,
221  CLK_TYPE_VCLK1,
222  CLK_TYPE_DCLK0,
223  CLK_TYPE_DCLK1,
224  CLK_TYPE__MAX = CLK_TYPE_DCLK1
226 
231 typedef enum {
232  COMPUTE_PARTITION_INVALID = 0,
244 
249 typedef enum {
250  MEMORY_PARTITION_UNKNOWN = 0,
265 
270 typedef enum {
271  TEMPERATURE_TYPE_EDGE,
272  TEMPERATURE_TYPE_FIRST = TEMPERATURE_TYPE_EDGE,
273  TEMPERATURE_TYPE_HOTSPOT,
274  TEMPERATURE_TYPE_JUNCTION = TEMPERATURE_TYPE_HOTSPOT,
275  TEMPERATURE_TYPE_VRAM,
276  TEMPERATURE_TYPE_HBM_0,
277  TEMPERATURE_TYPE_HBM_1,
278  TEMPERATURE_TYPE_HBM_2,
279  TEMPERATURE_TYPE_HBM_3,
280  TEMPERATURE_TYPE_PLX,
281  TEMPERATURE_TYPE__MAX = TEMPERATURE_TYPE_PLX
283 
288 typedef enum {
289  FW_ID_SMU = 1,
290  FW_ID_FIRST = FW_ID_SMU,
291  FW_ID_CP_CE,
292  FW_ID_CP_PFP,
293  FW_ID_CP_ME,
294  FW_ID_CP_MEC_JT1,
295  FW_ID_CP_MEC_JT2,
296  FW_ID_CP_MEC1,
297  FW_ID_CP_MEC2,
298  FW_ID_RLC,
299  FW_ID_SDMA0,
300  FW_ID_SDMA1,
301  FW_ID_SDMA2,
302  FW_ID_SDMA3,
303  FW_ID_SDMA4,
304  FW_ID_SDMA5,
305  FW_ID_SDMA6,
306  FW_ID_SDMA7,
307  FW_ID_VCN,
308  FW_ID_UVD,
309  FW_ID_VCE,
310  FW_ID_ISP,
311  FW_ID_DMCU_ERAM, /*eRAM*/
312  FW_ID_DMCU_ISR, /*ISR*/
313  FW_ID_RLC_RESTORE_LIST_GPM_MEM,
314  FW_ID_RLC_RESTORE_LIST_SRM_MEM,
315  FW_ID_RLC_RESTORE_LIST_CNTL,
316  FW_ID_RLC_V,
317  FW_ID_MMSCH,
318  FW_ID_PSP_SYSDRV,
319  FW_ID_PSP_SOSDRV,
320  FW_ID_PSP_TOC,
321  FW_ID_PSP_KEYDB,
322  FW_ID_DFC,
323  FW_ID_PSP_SPL,
324  FW_ID_DRV_CAP,
325  FW_ID_MC,
326  FW_ID_PSP_BL,
327  FW_ID_CP_PM4,
328  FW_ID_RLC_P,
329  FW_ID_SEC_POLICY_STAGE2,
330  FW_ID_REG_ACCESS_WHITELIST,
331  FW_ID_IMU_DRAM,
332  FW_ID_IMU_IRAM,
333  FW_ID_SDMA_TH0,
334  FW_ID_SDMA_TH1,
335  FW_ID_CP_MES,
336  FW_ID_MES_KIQ,
337  FW_ID_MES_STACK,
338  FW_ID_MES_THREAD1,
339  FW_ID_MES_THREAD1_STACK,
340  FW_ID_RLX6,
341  FW_ID_RLX6_DRAM_BOOT,
342  FW_ID_RS64_ME,
343  FW_ID_RS64_ME_P0_DATA,
344  FW_ID_RS64_ME_P1_DATA,
345  FW_ID_RS64_PFP,
346  FW_ID_RS64_PFP_P0_DATA,
347  FW_ID_RS64_PFP_P1_DATA,
348  FW_ID_RS64_MEC,
349  FW_ID_RS64_MEC_P0_DATA,
350  FW_ID_RS64_MEC_P1_DATA,
351  FW_ID_RS64_MEC_P2_DATA,
352  FW_ID_RS64_MEC_P3_DATA,
353  FW_ID_PPTABLE,
354  FW_ID_PSP_SOC,
355  FW_ID_PSP_DBG,
356  FW_ID_PSP_INTF,
357  FW_ID_RLX6_CORE1,
358  FW_ID_RLX6_DRAM_BOOT_CORE1,
359  FW_ID_RLCV_LX7,
360  FW_ID_RLC_SAVE_RESTORE_LIST,
361  FW_ID_ASD,
362  FW_ID_TA_RAS,
363  FW_ID_TA_XGMI,
364  FW_ID_RLC_SRLG,
365  FW_ID_RLC_SRLS,
366  FW_ID_PM,
367  FW_ID_DMCU,
368  FW_ID__MAX
370 
371 
372 typedef enum {
373  VRAM_TYPE_UNKNOWN = 0,
374  VRAM_TYPE_GDDR1 = 1,
375  VRAM_TYPE_DDR2 = 2,
376  VRAM_TYPE_GDDR3 = 3,
377  VRAM_TYPE_GDDR4 = 4,
378  VRAM_TYPE_GDDR5 = 5,
379  VRAM_TYPE_HBM = 6,
380  VRAM_TYPE_DDR3 = 7,
381  VRAM_TYPE_DDR4 = 8,
382  VRAM_TYPE_GDDR6 = 9,
383  VRAM_TYPE__MAX = VRAM_TYPE_GDDR6
384 } amdsmi_vram_type_t;
385 
386 typedef enum {
387  AMDSMI_VRAM_VENDOR__PLACEHOLDER0,
388  AMDSMI_VRAM_VENDOR__SAMSUNG,
389  AMDSMI_VRAM_VENDOR__INFINEON,
390  AMDSMI_VRAM_VENDOR__ELPIDA,
391  AMDSMI_VRAM_VENDOR__ETRON,
392  AMDSMI_VRAM_VENDOR__NANYA,
393  AMDSMI_VRAM_VENDOR__HYNIX,
394  AMDSMI_VRAM_VENDOR__MOSEL,
395  AMDSMI_VRAM_VENDOR__WINBOND,
396  AMDSMI_VRAM_VENDOR__ESMT,
397  AMDSMI_VRAM_VENDOR__PLACEHOLDER1,
398  AMDSMI_VRAM_VENDOR__PLACEHOLDER2,
399  AMDSMI_VRAM_VENDOR__PLACEHOLDER3,
400  AMDSMI_VRAM_VENDOR__PLACEHOLDER4,
401  AMDSMI_VRAM_VENDOR__PLACEHOLDER5,
402  AMDSMI_VRAM_VENDOR__MICRON,
403 } amdsmi_vram_vendor_type_t;
404 
408 typedef struct {
409  uint64_t lower_bound;
410  uint64_t upper_bound;
411  uint64_t reserved[2];
413 
414 typedef struct {
415  uint8_t xgmi_lanes;
416  uint64_t xgmi_hive_id;
417  uint64_t xgmi_node_id;
418  uint32_t index;
419  uint32_t reserved[9];
421 
422 typedef struct {
423  uint32_t vram_total;
424  uint32_t vram_used;
425  uint32_t reserved[2];
427 
428 typedef struct {
429  amdsmi_range_t supported_freq_range;
430  amdsmi_range_t current_freq_range;
431  uint32_t reserved[8];
433 
434 typedef union {
435  struct fields_ {
436  uint64_t function_number : 3;
437  uint64_t device_number : 5;
438  uint64_t bus_number : 8;
439  uint64_t domain_number : 48;
440  } fields;
441  uint64_t as_uint;
442 } amdsmi_bdf_t;
443 
444 typedef struct {
445  uint64_t power_cap;
446  uint64_t default_power_cap;
447  uint64_t dpm_cap;
448  uint64_t min_power_cap;
449  uint64_t max_power_cap;
450  uint64_t reserved[3];
452 
453 typedef struct {
454  char name[AMDSMI_MAX_STRING_LENGTH];
455  char build_date[AMDSMI_MAX_DATE_LENGTH];
456  char part_number[AMDSMI_MAX_STRING_LENGTH];
457  char version[AMDSMI_NORMAL_STRING_LENGTH];
458  uint32_t reserved[16];
460 
464 typedef enum {
465  CACHE_FLAGS_ENABLED = 0x00000001,
466  CACHE_FLAGS_DATA_CACHE = 0x00000002,
467  CACHE_FLAGS_INST_CACHE = 0x00000004,
468  CACHE_FLAGS_CPU_CACHE = 0x00000008,
469  CACHE_FLAGS_SIMD_CACHE = 0x00000010,
471 
472 typedef struct {
473  uint32_t num_cache_types;
474  struct cache_ {
475  uint32_t cache_size_kb; /* In KB */
476  uint32_t cache_level;
477  uint32_t flags; // amdsmi_cache_flags_type_t which is a bitmask
478  uint32_t max_num_cu_shared; /* Indicates how many Compute Units share this cache instance */
479  uint32_t num_cache_instance; /* total number of instance of this cache type */
480  uint32_t reserved[3];
481  } cache[AMDSMI_MAX_CACHE_TYPES];
482  uint32_t reserved[15];
484 
485 typedef struct {
486  uint8_t num_fw_info;
487  struct fw_info_list_ {
488  amdsmi_fw_block_t fw_id;
489  uint64_t fw_version;
490  uint64_t reserved[2];
491  } fw_info_list[FW_ID__MAX];
492  uint32_t reserved[7];
494 
495 typedef struct {
496  char market_name[AMDSMI_MAX_STRING_LENGTH];
497  uint32_t vendor_id; //< Use 32 bit to be compatible with other platform.
498  char vendor_name[AMDSMI_MAX_STRING_LENGTH];
499  uint32_t subvendor_id; //< The subsystem vendor id
500  uint64_t device_id; //< The device id of a GPU
501  uint32_t rev_id;
502  char asic_serial[AMDSMI_NORMAL_STRING_LENGTH];
503  uint16_t oam_id; //< 0xFFFF if not supported
504  uint16_t reserved[37];
506 
507 typedef struct{
508  amdsmi_vram_type_t vram_type;
509  amdsmi_vram_vendor_type_t vram_vendor;
510  uint64_t vram_size_mb;
512 
513 
514 typedef struct {
515  char driver_name[AMDSMI_MAX_STRING_LENGTH];
516  char driver_version[AMDSMI_MAX_STRING_LENGTH];
517  char driver_date[AMDSMI_MAX_STRING_LENGTH];
519 
520 typedef struct {
521  bool is_master;
522  char model_number[AMDSMI_NORMAL_STRING_LENGTH];
523  char product_serial[AMDSMI_NORMAL_STRING_LENGTH];
524  char fru_id[AMDSMI_NORMAL_STRING_LENGTH];
525  char manufacturer_name[AMDSMI_NORMAL_STRING_LENGTH];
526  char product_name[AMDSMI_PRODUCT_NAME_LENGTH];
528 
529 typedef struct {
530  uint32_t current_socket_power;
531  uint32_t average_socket_power;
532  uint32_t gfx_voltage; // GFX voltage measurement in mV
533  uint32_t soc_voltage; // SOC voltage measurement in mV
534  uint32_t mem_voltage; // MEM voltage measurement in mV
535  uint32_t power_limit; // The power limit;
536  uint32_t reserved[11];
538 
539 typedef struct {
540  uint32_t cur_clk;
541  uint32_t min_clk;
542  uint32_t max_clk;
543  uint32_t sleep_clk;
544  uint32_t reserved[4];
546 
547 typedef struct {
548  uint32_t gfx_activity;
549  uint32_t umc_activity;
550  uint32_t mm_activity;
551  uint32_t reserved[13];
553 
554 typedef uint32_t amdsmi_process_handle_t;
555 
556 typedef struct {
557  char name[AMDSMI_NORMAL_STRING_LENGTH];
558  amdsmi_process_handle_t pid;
559  uint64_t mem;
560  struct engine_usage_ {
561  uint64_t gfx;
562  uint64_t enc;
563  uint32_t reserved[12];
564  } engine_usage;
565  struct memory_usage_ {
566  uint64_t gtt_mem;
567  uint64_t cpu_mem;
568  uint64_t vram_mem;
569  uint32_t reserved[10];
570  } memory_usage;
571  char container_name[AMDSMI_NORMAL_STRING_LENGTH];
572  uint32_t reserved[4];
574 
576 #define AMDSMI_MAX_NUM_FREQUENCIES 33
577 
580 #define AMDSMI_MAX_FAN_SPEED 255
581 
583 #define AMDSMI_NUM_VOLTAGE_CURVE_POINTS 3
587 typedef enum {
589  AMDSMI_DEV_PERF_LEVEL_FIRST = AMDSMI_DEV_PERF_LEVEL_AUTO,
590 
605 
606  AMDSMI_DEV_PERF_LEVEL_LAST = AMDSMI_DEV_PERF_LEVEL_DETERMINISM,
607 
610 
623 typedef uintptr_t amdsmi_event_handle_t;
624 
631 typedef enum {
634  AMDSMI_EVNT_GRP_INVALID = 0xFFFFFFFF
636 
643 typedef enum {
644  AMDSMI_EVNT_FIRST = AMDSMI_EVNT_GRP_XGMI,
645 
646  AMDSMI_EVNT_XGMI_FIRST = AMDSMI_EVNT_GRP_XGMI,
647  AMDSMI_EVNT_XGMI_0_NOP_TX = AMDSMI_EVNT_XGMI_FIRST,
652 
665  // ie, Throughput = BEATS/time_running 10^9 bytes/sec
675 
676  AMDSMI_EVNT_XGMI_LAST = AMDSMI_EVNT_XGMI_1_BEATS_TX, // 5
677 
678  AMDSMI_EVNT_XGMI_DATA_OUT_FIRST = AMDSMI_EVNT_GRP_XGMI_DATA_OUT, // 10
679 
680  /*
681  * @brief Events in the AMDSMI_EVNT_GRP_XGMI_DATA_OUT group measure
682  * the number of beats sent on an XGMI link. Each beat represents
683  * 32 bytes. AMDSMI_EVNT_XGMI_DATA_OUT_n represents the number of
684  * outbound beats (each representing 32 bytes) on link n.<br><br>
685  *
686  * XGMI throughput can be calculated by multiplying a event
687  * such as ::AMDSMI_EVNT_XGMI_DATA_OUT_n by 32 and dividing by
688  * the time for which event collection occurred,
689  * ::amdsmi_counter_value_t.time_running (which is in nanoseconds). To get
690  * bytes per second, multiply this value by 10<sup>9</sup>.<br>
691  * <br>
692  * Throughput = BEATS/time_running * 10<sup>9</sup> (bytes/second)<br>
693  */
694  // ie, Throughput = BEATS/time_running 10^9 bytes/sec
695  AMDSMI_EVNT_XGMI_DATA_OUT_0 = AMDSMI_EVNT_XGMI_DATA_OUT_FIRST,
701  AMDSMI_EVNT_XGMI_DATA_OUT_LAST = AMDSMI_EVNT_XGMI_DATA_OUT_5,
702 
703  AMDSMI_EVNT_LAST = AMDSMI_EVNT_XGMI_DATA_OUT_LAST,
705 
709 typedef enum {
714 
718 typedef struct {
719  uint64_t value;
720  uint64_t time_enabled;
722  uint64_t time_running;
725 
729 typedef enum {
731  AMDSMI_EVT_NOTIF_FIRST = AMDSMI_EVT_NOTIF_VMFAULT,
732  AMDSMI_EVT_NOTIF_THERMAL_THROTTLE = 2,
733  AMDSMI_EVT_NOTIF_GPU_PRE_RESET = 3,
734  AMDSMI_EVT_NOTIF_GPU_POST_RESET = 4,
735 
736  AMDSMI_EVT_NOTIF_LAST = AMDSMI_EVT_NOTIF_GPU_POST_RESET
738 
742 #define AMDSMI_EVENT_MASK_FROM_INDEX(i) (1ULL << ((i) - 1))
743 
745 #define MAX_EVENT_NOTIFICATION_MSG_SIZE 64
746 
750 typedef struct {
755 
761 typedef enum {
763  AMDSMI_TEMP_FIRST = AMDSMI_TEMP_CURRENT,
764 
795 
796  AMDSMI_TEMP_LAST = AMDSMI_TEMP_HIGHEST
798 
804 typedef enum {
806 
807  AMDSMI_VOLT_FIRST = AMDSMI_VOLT_CURRENT,
815 
816  AMDSMI_VOLT_LAST = AMDSMI_VOLT_HIGHEST
818 
823 typedef enum {
824  AMDSMI_VOLT_TYPE_FIRST = 0,
825 
826  AMDSMI_VOLT_TYPE_VDDGFX = AMDSMI_VOLT_TYPE_FIRST,
828  AMDSMI_VOLT_TYPE_LAST = AMDSMI_VOLT_TYPE_VDDGFX,
829  AMDSMI_VOLT_TYPE_INVALID = 0xFFFFFFFF
831 
838 typedef enum {
844 
846  AMDSMI_PWR_PROF_PRST_3D_FULL_SCR_MASK = 0x20,
849 
851  AMDSMI_PWR_PROF_PRST_INVALID = 0xFFFFFFFFFFFFFFFF
853 
857 typedef enum {
858  AMDSMI_GPU_BLOCK_INVALID = 0x0000000000000000,
860  AMDSMI_GPU_BLOCK_FIRST = 0x0000000000000001,
861 
862  AMDSMI_GPU_BLOCK_UMC = AMDSMI_GPU_BLOCK_FIRST,
863  AMDSMI_GPU_BLOCK_SDMA = 0x0000000000000002,
864  AMDSMI_GPU_BLOCK_GFX = 0x0000000000000004,
865  AMDSMI_GPU_BLOCK_MMHUB = 0x0000000000000008,
866  AMDSMI_GPU_BLOCK_ATHUB = 0x0000000000000010,
867  AMDSMI_GPU_BLOCK_PCIE_BIF = 0x0000000000000020,
868  AMDSMI_GPU_BLOCK_HDP = 0x0000000000000040,
869  AMDSMI_GPU_BLOCK_XGMI_WAFL = 0x0000000000000080,
870  AMDSMI_GPU_BLOCK_DF = 0x0000000000000100,
871  AMDSMI_GPU_BLOCK_SMN = 0x0000000000000200,
872  AMDSMI_GPU_BLOCK_SEM = 0x0000000000000400,
873  AMDSMI_GPU_BLOCK_MP0 = 0x0000000000000800,
874  AMDSMI_GPU_BLOCK_MP1 = 0x0000000000001000,
875  AMDSMI_GPU_BLOCK_FUSE = 0x0000000000002000,
876 
879  AMDSMI_GPU_BLOCK_RESERVED = 0x8000000000000000
881 
885 typedef enum {
894 
895  AMDSMI_RAS_ERR_STATE_LAST = AMDSMI_RAS_ERR_STATE_ENABLED,
896  AMDSMI_RAS_ERR_STATE_INVALID = 0xFFFFFFFF
898 
902 typedef enum {
903  AMDSMI_MEM_TYPE_FIRST = 0,
904 
905  AMDSMI_MEM_TYPE_VRAM = AMDSMI_MEM_TYPE_FIRST,
908 
909  AMDSMI_MEM_TYPE_LAST = AMDSMI_MEM_TYPE_GTT
911 
915 typedef enum {
918  AMDSMI_FREQ_IND_INVALID = 0xFFFFFFFF
920 
924 typedef enum {
925  AMDSMI_XGMI_STATUS_NO_ERRORS = 0,
926  AMDSMI_XGMI_STATUS_ERROR,
927  AMDSMI_XGMI_STATUS_MULTIPLE_ERRORS,
929 
933 typedef uint64_t amdsmi_bit_field_t;
934 
938 typedef enum {
946 
950 typedef enum {
955  AMDSMI_IOLINK_TYPE_SIZE = 0xFFFFFFFF
957 
961 typedef enum {
964  AMDSMI_COARSE_GRAIN_GFX_ACTIVITY = AMDSMI_UTILIZATION_COUNTER_FIRST,
966  AMDSMI_UTILIZATION_COUNTER_LAST = AMDSMI_COARSE_GRAIN_MEM_ACTIVITY
968 
972 typedef enum {
975  AMDSMI_INVALID_POWER = 0xFFFFFFFF
977 
981 typedef struct {
983  uint64_t value;
985 
989 typedef struct {
990  uint64_t page_address;
991  uint64_t page_size;
994 
998 #define AMDSMI_MAX_NUM_POWER_PROFILES (sizeof(amdsmi_bit_field_t) * 8)
999 
1005 typedef struct {
1010 
1015 
1019  uint32_t num_profiles;
1021 
1025 typedef struct {
1030 
1034  uint32_t num_supported;
1035 
1039  uint32_t current;
1040 
1045  uint64_t frequency[AMDSMI_MAX_NUM_FREQUENCIES];
1047 
1053 typedef struct {
1058 
1065 
1069 typedef struct {
1070  uint32_t year;
1071  uint32_t major;
1072  uint32_t minor;
1073  uint32_t release;
1074  const char *build;
1076 
1080 typedef struct {
1081  uint64_t frequency;
1082  uint64_t voltage;
1084 
1090 typedef struct {
1094 
1098 typedef struct {
1105 
1109 typedef struct {
1115 
1120  uint32_t num_regions;
1122 
1130 typedef struct {
1131  // TODO(amd) Doxygen documents
1132  // Note: This should match: AMDGpuMetricsHeader_v1_t
1134  uint16_t structure_size;
1135  uint8_t format_revision;
1136  uint8_t content_revision;
1139 
1147 #define CENTRIGRADE_TO_MILLI_CENTIGRADE 1000
1148 
1152 #define AMDSMI_NUM_HBM_INSTANCES 4
1153 
1157 #define AMDSMI_MAX_NUM_VCN 4
1158 
1162 #define AMDSMI_MAX_NUM_CLKS 4
1163 
1167 #define AMDSMI_MAX_NUM_XGMI_LINKS 8
1168 
1172 #define AMDSMI_MAX_NUM_GFX_CLKS 8
1173 
1174 
1175 typedef struct {
1176  // TODO(amd) Doxygen documents
1177  // Note: This structure is extended to fit the needs of different GPU metric
1178  // versions when exposing data through the structure.
1179  // Depending on the version, some data members will hold data, and
1180  // some will not. A good example is the set of 'current clocks':
1181  // - current_gfxclk, current_socclk, current_vclk0, current_dclk0
1182  // These are single-valued data members, up to version 1.3.
1183  // For version 1.4 and up these are multi-valued data members (arrays)
1184  // and their counterparts;
1185  // - current_gfxclks[], current_socclks[], current_vclk0s[],
1186  // current_dclk0s[]
1187  // will hold the data
1189  amd_metrics_table_header_t common_header;
1190 
1191  /*
1192  * v1.0 Base
1193  */
1194  // Temperature
1195  uint16_t temperature_edge;
1196  uint16_t temperature_hotspot;
1197  uint16_t temperature_mem;
1198  uint16_t temperature_vrgfx;
1199  uint16_t temperature_vrsoc;
1200  uint16_t temperature_vrmem;
1201 
1202  // Utilization
1203  uint16_t average_gfx_activity;
1204  uint16_t average_umc_activity; // memory controller
1205  uint16_t average_mm_activity; // UVD or VCN
1206 
1207  // Power/Energy
1208  uint16_t average_socket_power;
1209  uint64_t energy_accumulator; // v1 mod. (32->64)
1210 
1211  // Driver attached timestamp (in ns)
1212  uint64_t system_clock_counter; // v1 mod. (moved from top of struct)
1213 
1214  // Average clocks
1215  uint16_t average_gfxclk_frequency;
1216  uint16_t average_socclk_frequency;
1217  uint16_t average_uclk_frequency;
1218  uint16_t average_vclk0_frequency;
1219  uint16_t average_dclk0_frequency;
1220  uint16_t average_vclk1_frequency;
1221  uint16_t average_dclk1_frequency;
1222 
1223  // Current clocks
1224  uint16_t current_gfxclk;
1225  uint16_t current_socclk;
1226  uint16_t current_uclk;
1227  uint16_t current_vclk0;
1228  uint16_t current_dclk0;
1229  uint16_t current_vclk1;
1230  uint16_t current_dclk1;
1231 
1232  // Throttle status
1233  uint32_t throttle_status;
1234 
1235  // Fans
1236  uint16_t current_fan_speed;
1237 
1238  // Link width/speed
1239  uint16_t pcie_link_width; // v1 mod.(8->16)
1240  uint16_t pcie_link_speed; // in 0.1 GT/s; v1 mod. (8->16)
1241 
1242 
1243  /*
1244  * v1.1 additions
1245  */
1246  uint32_t gfx_activity_acc; // new in v1
1247  uint32_t mem_activity_acc; // new in v1
1248  uint16_t temperature_hbm[AMDSMI_NUM_HBM_INSTANCES]; // new in v1
1249 
1250 
1251  /*
1252  * v1.2 additions
1253  */
1254  // PMFW attached timestamp (10ns resolution)
1255  uint64_t firmware_timestamp;
1256 
1257 
1258  /*
1259  * v1.3 additions
1260  */
1261  // Voltage (mV)
1262  uint16_t voltage_soc;
1263  uint16_t voltage_gfx;
1264  uint16_t voltage_mem;
1265 
1266  // Throttle status
1267  uint64_t indep_throttle_status;
1268 
1269 
1270  /*
1271  * v1.4 additions
1272  */
1273  // Power (Watts)
1274  uint16_t current_socket_power;
1275 
1276  // Utilization (%)
1277  uint16_t vcn_activity[AMDSMI_MAX_NUM_VCN]; // VCN instances activity percent (encode/decode)
1278 
1279  // Clock Lock Status. Each bit corresponds to clock instance
1280  uint32_t gfxclk_lock_status;
1281 
1282  // XGMI bus width and bitrate (in Gbps)
1283  uint16_t xgmi_link_width;
1284  uint16_t xgmi_link_speed;
1285 
1286  // PCIE accumulated bandwidth (GB/sec)
1287  uint64_t pcie_bandwidth_acc;
1288 
1289  // PCIE instantaneous bandwidth (GB/sec)
1290  uint64_t pcie_bandwidth_inst;
1291 
1292  // PCIE L0 to recovery state transition accumulated count
1293  uint64_t pcie_l0_to_recov_count_acc;
1294 
1295  // PCIE replay accumulated count
1296  uint64_t pcie_replay_count_acc;
1297 
1298  // PCIE replay rollover accumulated count
1299  uint64_t pcie_replay_rover_count_acc;
1300 
1301  // XGMI accumulated data transfer size(KiloBytes)
1302  uint64_t xgmi_read_data_acc[AMDSMI_MAX_NUM_XGMI_LINKS];
1303  uint64_t xgmi_write_data_acc[AMDSMI_MAX_NUM_XGMI_LINKS];
1304 
1305  // Current clock frequencies
1306  uint16_t current_gfxclks[AMDSMI_MAX_NUM_GFX_CLKS];
1307  uint16_t current_socclks[AMDSMI_MAX_NUM_CLKS];
1308  uint16_t current_vclk0s[AMDSMI_MAX_NUM_CLKS];
1309  uint16_t current_dclk0s[AMDSMI_MAX_NUM_CLKS];
1312 
1313 
1314 #define MAX_AMDSMI_NAME_LENGTH 64
1315 
1319 typedef struct {
1320  char name[MAX_AMDSMI_NAME_LENGTH];
1321  uint64_t value;
1323 
1327 typedef enum {
1328  AMDSMI_REG_XGMI,
1329  AMDSMI_REG_WAFL,
1330  AMDSMI_REG_PCIE,
1331  AMDSMI_REG_USR,
1332  AMDSMI_REG_USR1,
1334 
1338 typedef struct {
1339  uint32_t ras_eeprom_version;
1340  // PARITY error(bit 0), Single Bit correctable (bit1),
1341  // Double bit error detection (bit2), Poison (bit 3).
1344 
1348 typedef struct {
1351  uint64_t reserved[2];
1353 
1357 typedef enum {
1358  AMDSMI_SLOT_TYPE__PCIE = 0,
1359  AMDSMI_SLOT_TYPE__CEM = 1,
1360  AMDSMI_SLOT_TYPE__OAM = 2,
1361  AMDSMI_SLOT_TYPE__RESERVED = 3,
1363 
1367 typedef struct {
1368  uint16_t pcie_lanes;
1369  uint32_t pcie_speed;
1370  uint32_t pcie_interface_version;
1371  amdsmi_pcie_slot_type_t pcie_slot_type; // 0: PCIE, 1: CEM, 2: OAM, 3: Reserved
1372  uint32_t reserved[4];
1374 
1378 typedef struct {
1379  uint32_t process_id;
1380  uint32_t pasid;
1381  uint64_t vram_usage;
1382  uint64_t sdma_usage;
1383  uint32_t cu_occupancy;
1385 
1388 #define AMDSMI_DEFAULT_VARIANT 0xFFFFFFFFFFFFFFFF
1389 
1390 #ifdef ENABLE_ESMI_LIB
1394 typedef struct {
1395  uint8_t debug;
1396  uint8_t minor;
1397  uint8_t major;
1398  uint8_t unused;
1399 } amdsmi_smu_fw_version_t;
1400 
1404 typedef struct {
1405  uint32_t max_bw;
1406  uint32_t utilized_bw;
1407  uint32_t utilized_pct;
1408 } amdsmi_ddr_bw_metrics_t;
1409 
1413 typedef struct {
1414  uint8_t range : 3;
1415  uint8_t ref_rate : 1;
1416 } amdsmi_temp_range_refresh_rate_t;
1417 
1421 typedef struct {
1422  uint16_t power : 15;
1423  uint16_t update_rate : 9;
1424  uint8_t dimm_addr;
1425 } amdsmi_dimm_power_t;
1426 
1430 typedef struct {
1431  uint16_t sensor : 11;
1432  uint16_t update_rate : 9;
1433  uint8_t dimm_addr;
1434  float temp;
1435 } amdsmi_dimm_thermal_t;
1436 
1440 typedef enum {
1441  AGG_BW0 = 1,
1442  RD_BW0 = 2,
1443  WR_BW0 = 4
1444 } amdsmi_io_bw_encoding_t;
1445 
1453 typedef struct {
1454  amdsmi_io_bw_encoding_t bw_type;
1455  char *link_name;
1456 } amdsmi_link_id_bw_type_t;
1457 
1462 typedef struct {
1463  uint8_t max_dpm_level;
1464  uint8_t min_dpm_level;
1465 } amdsmi_dpm_level_t;
1466 
1467 #endif
1468 
1469 /*****************************************************************************/
1493 amdsmi_status_t amdsmi_init(uint64_t init_flags);
1494 
1504 
1507 /*****************************************************************************/
1540  amdsmi_socket_handle* socket_handles);
1541 
1542 #ifdef ENABLE_ESMI_LIB
1567 amdsmi_status_t amdsmi_get_cpusocket_handles(uint32_t *socket_count,
1568  amdsmi_cpusocket_handle* socket_handles);
1569 #endif
1570 
1586  amdsmi_socket_handle socket_handle,
1587  size_t len, char *name);
1588 
1589 #ifdef ENABLE_ESMI_LIB
1602 amdsmi_status_t amdsmi_get_cpusocket_info(amdsmi_cpusocket_handle socket_handle, uint32_t sockid);
1603 
1616 amdsmi_status_t amdsmi_get_cpucore_info(amdsmi_processor_handle core_handle, uint32_t coreid);
1617 #endif
1618 
1650 amdsmi_status_t amdsmi_get_processor_handles(amdsmi_socket_handle socket_handle,
1651  uint32_t *processor_count,
1652  amdsmi_processor_handle* processor_handles);
1653 
1654 #ifdef ENABLE_ESMI_LIB
1677 amdsmi_status_t amdsmi_get_cpucore_handles(amdsmi_cpusocket_handle socket_handle,
1678  uint32_t *processor_count,
1679  amdsmi_processor_handle* processor_handles);
1680 #endif
1681 
1697  processor_type_t* processor_type);
1698 
1712  amdsmi_processor_handle* processor_handle);
1713 
1716 /*****************************************************************************/
1746 
1761 
1794  size_t len);
1795 
1819  uint32_t len);
1820 
1841 
1874 amdsmi_get_gpu_subsystem_name(amdsmi_processor_handle processor_handle, char *name, size_t len);
1875 
1878 /*****************************************************************************/
1903  amdsmi_pcie_bandwidth_t *bandwidth);
1904 
1938 
1959  int32_t *numa_node);
1960 
1984  uint64_t *received, uint64_t *max_pkt_sz);
1985 
2006  uint64_t *counter);
2007 
2010 /*****************************************************************************/
2047  uint64_t bw_bitmask);
2048 
2051 /*****************************************************************************/
2085 amdsmi_get_energy_count(amdsmi_processor_handle processor_handle, uint64_t *power,
2086  float *counter_resolution, uint64_t *timestamp);
2087 
2090 /*****************************************************************************/
2114  amdsmi_set_power_cap(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t cap);
2115 
2134  amdsmi_set_gpu_power_profile(amdsmi_processor_handle processor_handle, uint32_t reserved,
2136 
2139 /*****************************************************************************/
2168  uint64_t *total);
2169 
2192  uint64_t *used);
2193 
2211 amdsmi_get_gpu_bad_page_info(amdsmi_processor_handle processor_handle, uint32_t *num_pages,
2213 
2225  amdsmi_processor_handle processor_handle, amdsmi_ras_feature_t *ras_feature);
2226 
2227 
2251  amdsmi_gpu_block_t block,
2252  amdsmi_ras_err_state_t *state);
2253 
2287  uint32_t *num_pages,
2288  amdsmi_retired_page_record_t *records);
2289 
2321  uint32_t sensor_ind, int64_t *speed);
2322 
2347  uint32_t sensor_ind, int64_t *speed);
2348 
2372  uint32_t sensor_ind, uint64_t *max_speed);
2373 
2402  amdsmi_temperature_type_t sensor_type,
2403  amdsmi_temperature_metric_t metric, int64_t *temperature);
2404 
2416  amdsmi_processor_handle processor_handle, amdsmi_gpu_cache_info_t *info);
2417 
2446  amdsmi_voltage_type_t sensor_type,
2447  amdsmi_voltage_metric_t metric, int64_t *voltage);
2448 
2451 /*****************************************************************************/
2470 amdsmi_status_t amdsmi_reset_gpu_fan(amdsmi_processor_handle processor_handle, uint32_t sensor_ind);
2471 
2493  uint32_t sensor_ind, uint64_t speed);
2494 
2497 /*****************************************************************************/
2530  amdsmi_utilization_counter_t utilization_counters[],
2531  uint32_t count,
2532  uint64_t *timestamp);
2533 
2548  amdsmi_pcie_info_t *info);
2549 
2563  amdsmi_pcie_info_t *info);
2564 
2585  amdsmi_dev_perf_level_t *perf);
2586 
2607 
2629  uint32_t *od);
2630 
2652 
2664 
2685 
2705  amdsmi_gpu_metrics_t *pgpu_metrics);
2706 
2737  amdsmi_processor_handle processor_handle,
2738  amdsmi_name_value_t** pm_metrics,
2739  uint32_t *num_of_metrics);
2740 
2773  amdsmi_processor_handle processor_handle,
2774  amdsmi_reg_type_t reg_type,
2775  amdsmi_name_value_t** reg_metrics,
2776  uint32_t *num_of_metrics);
2777 
2799  uint64_t minclkvalue,
2800  uint64_t maxclkvalue,
2801  amdsmi_clk_type_t clkType);
2802 
2824  amdsmi_freq_ind_t level,
2825  uint64_t clkvalue,
2826  amdsmi_clk_type_t clkType);
2827 
2848  uint32_t vpoint,
2849  uint64_t clkvalue,
2850  uint64_t voltvalue);
2851 
2888  uint32_t *num_regions, amdsmi_freq_volt_region_t *buffer);
2889 
2922  amdsmi_get_gpu_power_profile_presets(amdsmi_processor_handle processor_handle, uint32_t sensor_ind,
2924 
2927 /*****************************************************************************/
2953 
2992 
3026  amdsmi_clk_type_t clk_type, uint64_t freq_bitmask);
3027 
3030 /*****************************************************************************/
3050 
3053 /*****************************************************************************/
3084 
3110  uint64_t *enabled_blocks);
3111 
3135  amdsmi_gpu_block_t block,
3136  amdsmi_ras_err_state_t *state);
3137 
3152 amdsmi_status_code_to_string(amdsmi_status_t status, const char **status_string);
3153 
3156 /*****************************************************************************/
3275 
3302  amdsmi_event_handle_t *evnt_handle);
3303 
3318 
3338  amdsmi_counter_command_t cmd, void *cmd_args);
3339 
3358  amdsmi_counter_value_t *value);
3359 
3380  amdsmi_event_group_t grp, uint32_t *available);
3381 
3384 /*****************************************************************************/
3420 
3439 
3470 amdsmi_get_gpu_compute_process_gpus(uint32_t pid, uint32_t *dv_indices,
3471  uint32_t *num_devices);
3472 
3475 /*****************************************************************************/
3503 
3518 
3521 /*****************************************************************************/
3543 amdsmi_topo_get_numa_node_number(amdsmi_processor_handle processor_handle, uint32_t *numa_node);
3544 
3565  uint64_t *weight);
3566 
3590  amdsmi_processor_handle processor_handle_dst,
3591  uint64_t *min_bandwidth,
3592  uint64_t *max_bandwidth);
3593 
3618  amdsmi_processor_handle processor_handle_dst,
3619  uint64_t *hops, amdsmi_io_link_type_t *type);
3620 
3641  amdsmi_processor_handle processor_handle_dst,
3642  bool *accessible);
3643 
3646 /*****************************************************************************/
3683  char *compute_partition, uint32_t len);
3684 
3709  amdsmi_compute_partition_type_t compute_partition);
3710 
3727  // end of compute_partition
3729 
3730 /*****************************************************************************/
3767  char *memory_partition, uint32_t len);
3768 
3792  amdsmi_memory_partition_type_t memory_partition);
3793 
3812  // end of memory_partition
3814 
3815 /*****************************************************************************/
3837 
3866 
3904  uint32_t *num_elem, amdsmi_evt_notification_data_t *data);
3905 
3921 
3935 
3951 amdsmi_get_gpu_device_uuid(amdsmi_processor_handle processor_handle, unsigned int *uuid_length, char *uuid);
3952 
3953 /*****************************************************************************/
3974 
3977 /*****************************************************************************/
3998 
4010  amdsmi_processor_handle processor_handle, amdsmi_vram_info_t *info);
4011 
4024 
4038 amdsmi_get_power_cap_info(amdsmi_processor_handle processor_handle, uint32_t sensor_ind,
4039  amdsmi_power_cap_info_t *info);
4040 
4054 
4057 /*****************************************************************************/
4073 
4086 
4089 /*****************************************************************************/
4107 
4121 
4133 
4151 
4166 
4167 
4170 /*****************************************************************************/
4202 amdsmi_get_gpu_process_list(amdsmi_processor_handle processor_handle, uint32_t *max_processes, amdsmi_process_handle_t *list);
4203 
4218 amdsmi_get_gpu_process_info(amdsmi_processor_handle processor_handle, amdsmi_process_handle_t process, amdsmi_proc_info_t *info);
4219 
4222 /*****************************************************************************/
4241 
4245 /*****************************************************************************/
4256 typedef uint16_t gpu_metric_vcn_activity_t[AMDSMI_MAX_NUM_VCN];
4257 typedef uint64_t gpu_metric_xgmi_read_data_acc_t[AMDSMI_MAX_NUM_XGMI_LINKS];
4258 typedef uint64_t gpu_metric_xgmi_write_data_acc_t[AMDSMI_MAX_NUM_XGMI_LINKS];
4259 typedef uint16_t gpu_metric_curr_gfxclk_t[AMDSMI_MAX_NUM_GFX_CLKS];
4260 typedef uint16_t gpu_metric_curr_socclk_t[AMDSMI_MAX_NUM_CLKS];
4261 typedef uint16_t gpu_metric_curr_vclk0_t[AMDSMI_MAX_NUM_CLKS];
4262 typedef uint16_t gpu_metric_curr_dclk0_t[AMDSMI_MAX_NUM_CLKS];
4263 
4264 
4265 /******
4266  * Metric single-valued counter types
4267  */
4268 
4286 amdsmi_get_gpu_metrics_temp_hotspot(amdsmi_processor_handle processor_handle, uint16_t* hotspot_value);
4287 
4305 amdsmi_get_gpu_metrics_temp_mem(amdsmi_processor_handle processor_handle, uint16_t* mem_value);
4306 
4324 amdsmi_get_gpu_metrics_temp_vrsoc(amdsmi_processor_handle processor_handle, uint16_t* vrsoc_value);
4325 
4343 amdsmi_get_gpu_metrics_curr_socket_power(amdsmi_processor_handle processor_handle, uint16_t* socket_power_value);
4344 
4362 amdsmi_get_gpu_metrics_avg_gfx_activity(amdsmi_processor_handle processor_handle, uint16_t* gfx_activity_value);
4363 
4381 amdsmi_get_gpu_metrics_avg_umc_activity(amdsmi_processor_handle processor_handle, uint16_t* umc_activity_value);
4382 
4400 amdsmi_get_gpu_metrics_energy_acc(amdsmi_processor_handle processor_handle, uint64_t* energy_acc_value);
4401 
4419 amdsmi_get_gpu_metrics_system_clock_counter(amdsmi_processor_handle processor_handle, uint64_t* system_clock_counter_value);
4420 
4438 amdsmi_get_gpu_metrics_firmware_timestamp(amdsmi_processor_handle processor_handle, uint64_t* firmware_timestamp_value);
4439 
4457 amdsmi_get_gpu_metrics_throttle_status(amdsmi_processor_handle processor_handle, uint32_t* throttle_status_value);
4458 
4476 amdsmi_get_gpu_metrics_pcie_link_width(amdsmi_processor_handle processor_handle, uint16_t* pcie_link_width_value);
4477 
4495 amdsmi_get_gpu_metrics_pcie_link_speed(amdsmi_processor_handle processor_handle, uint16_t* pcie_link_speed_value);
4496 
4514 amdsmi_get_gpu_metrics_xgmi_link_width(amdsmi_processor_handle processor_handle, uint16_t* xgmi_link_width_value);
4515 
4533 amdsmi_get_gpu_metrics_xgmi_link_speed(amdsmi_processor_handle processor_handle, uint16_t* xgmi_link_speed_value);
4534 
4552 amdsmi_get_gpu_metrics_gfxclk_lock_status(amdsmi_processor_handle processor_handle, uint32_t* gfxclk_lock_status_value);
4553 
4571 amdsmi_get_gpu_metrics_gfx_activity_acc(amdsmi_processor_handle processor_handle, uint32_t* gfx_activity_acc_value);
4572 
4590 amdsmi_get_gpu_metrics_mem_activity_acc(amdsmi_processor_handle processor_handle, uint32_t* mem_activity_acc_value);
4591 
4609 amdsmi_get_gpu_metrics_pcie_bandwidth_acc(amdsmi_processor_handle processor_handle, uint64_t* pcie_bandwidth_acc_value);
4610 
4628 amdsmi_get_gpu_metrics_pcie_bandwidth_inst(amdsmi_processor_handle processor_handle, uint64_t* pcie_bandwidth_inst_value);
4629 
4647 amdsmi_get_gpu_metrics_pcie_l0_recov_count_acc(amdsmi_processor_handle processor_handle, uint64_t* pcie_count_acc_value);
4648 
4666 amdsmi_get_gpu_metrics_pcie_replay_count_acc(amdsmi_processor_handle processor_handle, uint64_t* pcie_count_acc_value);
4667 
4685 amdsmi_get_gpu_metrics_pcie_replay_rover_count_acc(amdsmi_processor_handle processor_handle, uint64_t* pcie_count_acc_value);
4686 
4704 amdsmi_get_gpu_metrics_curr_uclk(amdsmi_processor_handle processor_handle, uint16_t* uclk_value);
4705 
4706 
4707 /******
4708  * Metric multi-valued counter types
4709  */
4710 
4731 
4751 amdsmi_get_gpu_metrics_vcn_activity(amdsmi_processor_handle processor_handle, gpu_metric_vcn_activity_t* vcn_activity_value);
4752 
4772 amdsmi_get_gpu_metrics_xgmi_read_data(amdsmi_processor_handle processor_handle, gpu_metric_xgmi_read_data_acc_t* xgmi_read_data_acc_value);
4773 
4793 amdsmi_get_gpu_metrics_xgmi_write_data(amdsmi_processor_handle processor_handle, gpu_metric_xgmi_write_data_acc_t* xgmi_write_data_acc_value);
4794 
4814 amdsmi_get_gpu_metrics_curr_gfxclk(amdsmi_processor_handle processor_handle, gpu_metric_curr_gfxclk_t* current_gfxclk_value);
4815 
4835 amdsmi_get_gpu_metrics_curr_socclk(amdsmi_processor_handle processor_handle, gpu_metric_curr_socclk_t* current_socclk_value);
4836 
4856 amdsmi_get_gpu_metrics_curr_vclk0(amdsmi_processor_handle processor_handle, gpu_metric_curr_vclk0_t* current_vclk_value);
4857 
4877 amdsmi_get_gpu_metrics_curr_dclk0(amdsmi_processor_handle processor_handle, gpu_metric_curr_dclk0_t* current_dclk_value);
4878 
4896 amdsmi_get_gpu_metrics_temp_edge(amdsmi_processor_handle processor_handle, uint16_t* edge_value);
4897 
4915 amdsmi_get_gpu_metrics_temp_vrgfx(amdsmi_processor_handle processor_handle, uint16_t* vrgfx_value);
4916 
4934 amdsmi_get_gpu_metrics_temp_vrmem(amdsmi_processor_handle processor_handle, uint16_t* vrmem_value);
4935 
4953 amdsmi_get_gpu_metrics_avg_mm_activity(amdsmi_processor_handle processor_handle, uint16_t* mm_activity_value);
4954 
4972 amdsmi_get_gpu_metrics_curr_vclk1(amdsmi_processor_handle processor_handle, uint16_t* current_vclk_value);
4973 
4991 amdsmi_get_gpu_metrics_curr_dclk1(amdsmi_processor_handle processor_handle, uint16_t* current_dclk_value);
4992 
5010 amdsmi_get_gpu_metrics_indep_throttle_status(amdsmi_processor_handle processor_handle, uint64_t* throttle_status_value);
5011 
5029 amdsmi_get_gpu_metrics_avg_socket_power(amdsmi_processor_handle processor_handle, uint16_t* socket_power_value);
5030 
5048 amdsmi_get_gpu_metrics_curr_fan_speed(amdsmi_processor_handle processor_handle, uint16_t* fan_speed_value);
5049 
5067 amdsmi_get_gpu_metrics_avg_gfx_clock_frequency(amdsmi_processor_handle processor_handle, uint16_t* clock_frequency_value);
5068 
5086 amdsmi_get_gpu_metrics_avg_soc_clock_frequency(amdsmi_processor_handle processor_handle, uint16_t* clock_frequency_value);
5087 
5105 amdsmi_get_gpu_metrics_avg_uclock_frequency(amdsmi_processor_handle processor_handle, uint16_t* clock_frequency_value);
5106 
5124 amdsmi_get_gpu_metrics_avg_vclock0_frequency(amdsmi_processor_handle processor_handle, uint16_t* clock_frequency_value);
5125 
5143 amdsmi_get_gpu_metrics_avg_dclock0_frequency(amdsmi_processor_handle processor_handle, uint16_t* clock_frequency_value);
5144 
5162 amdsmi_get_gpu_metrics_avg_vclock1_frequency(amdsmi_processor_handle processor_handle, uint16_t* clock_frequency_value);
5163 
5181 amdsmi_get_gpu_metrics_avg_dclock1_frequency(amdsmi_processor_handle processor_handle, uint16_t* clock_frequency_value);
5182 
5200 amdsmi_get_gpu_metrics_volt_soc(amdsmi_processor_handle processor_handle, uint16_t* voltage_value);
5201 
5219 amdsmi_get_gpu_metrics_volt_gfx(amdsmi_processor_handle processor_handle, uint16_t* voltage_value);
5220 
5238 amdsmi_get_gpu_metrics_volt_mem(amdsmi_processor_handle processor_handle, uint16_t* voltage_value);
5239 
5258 
5276 amdsmi_get_gpu_metrics_xcd_counter(amdsmi_processor_handle processor_handle, uint16_t* xcd_counter_value);
5277 
5291 
5295 #ifdef ENABLE_ESMI_LIB
5296 /*---------------------------------------------------------------------------*/
5298 /*---------------------------------------------------------------------------*/
5311 amdsmi_status_t amdsmi_get_cpu_core_energy(amdsmi_processor_handle processor_handle,
5312  uint32_t core_ind, uint64_t *penergy);
5313 
5324 amdsmi_status_t amdsmi_get_cpu_socket_energy(amdsmi_cpusocket_handle socket_handle,
5325  uint32_t sock_ind, uint64_t *penergy);
5326 
5329 /*---------------------------------------------------------------------------*/
5331 /*---------------------------------------------------------------------------*/
5342 amdsmi_status_t amdsmi_get_cpu_smu_fw_version(amdsmi_cpusocket_handle socket_handle,
5343  amdsmi_smu_fw_version_t *amdsmi_smu_fw);
5344 
5353 amdsmi_status_t amdsmi_get_cpu_hsmp_proto_ver(amdsmi_cpusocket_handle socket_handle,
5354  uint32_t *proto_ver);
5355 
5366 amdsmi_status_t amdsmi_get_cpu_prochot_status(amdsmi_cpusocket_handle socket_handle,
5367  uint32_t sock_ind, uint32_t *prochot);
5368 
5381 amdsmi_status_t amdsmi_get_cpu_fclk_mclk(amdsmi_cpusocket_handle socket_handle,
5382  uint32_t sock_ind, uint32_t *fclk, uint32_t *mclk);
5383 
5394 amdsmi_status_t amdsmi_get_cpu_cclk_limit(amdsmi_cpusocket_handle socket_handle,
5395  uint32_t sock_ind, uint32_t *cclk);
5396 
5409 amdsmi_status_t amdsmi_get_cpu_socket_current_active_freq_limit(amdsmi_cpusocket_handle socket_handle,
5410  uint32_t sock_ind, uint16_t *freq, char **src_type);
5411 
5424 amdsmi_status_t amdsmi_get_cpu_socket_freq_range(amdsmi_cpusocket_handle socket_handle,
5425  uint32_t sock_ind, uint16_t *fmax, uint16_t *fmin);
5426 
5437 amdsmi_status_t amdsmi_get_cpu_core_current_freq_limit(amdsmi_processor_handle processor_handle,
5438  uint32_t core_ind, uint32_t *freq);
5439 
5442 /*---------------------------------------------------------------------------*/
5444 /*---------------------------------------------------------------------------*/
5457 amdsmi_status_t amdsmi_get_cpu_socket_power(amdsmi_cpusocket_handle socket_handle,
5458  uint32_t sock_ind, uint32_t *ppower);
5459 
5470 amdsmi_status_t amdsmi_get_cpu_socket_power_cap(amdsmi_cpusocket_handle socket_handle,
5471  uint32_t sock_ind, uint32_t *pcap);
5472 
5483 amdsmi_status_t amdsmi_get_cpu_socket_power_cap_max(amdsmi_cpusocket_handle socket_handle,
5484  uint32_t sock_ind, uint32_t *pmax);
5485 
5496 amdsmi_status_t amdsmi_get_cpu_pwr_svi_telemetry_all_rails(amdsmi_cpusocket_handle socket_handle,
5497  uint32_t sock_ind, uint32_t *power);
5498 
5509 amdsmi_status_t amdsmi_set_cpu_socket_power_cap(amdsmi_cpusocket_handle socket_handle,
5510  uint32_t sock_ind, uint32_t pcap);
5511 
5522 amdsmi_status_t amdsmi_set_cpu_pwr_efficiency_mode(amdsmi_cpusocket_handle socket_handle,
5523  uint8_t sock_ind, uint8_t mode);
5524 
5527 /*---------------------------------------------------------------------------*/
5529 /*---------------------------------------------------------------------------*/
5542 amdsmi_status_t amdsmi_get_cpu_core_boostlimit(amdsmi_processor_handle processor_handle,
5543  uint32_t core_ind, uint32_t *pboostlimit);
5544 
5555 amdsmi_status_t amdsmi_get_cpu_socket_c0_residency(amdsmi_cpusocket_handle socket_handle,
5556  uint32_t sock_ind, uint32_t *pc0_residency);
5557 
5568 amdsmi_status_t amdsmi_set_cpu_core_boostlimit(amdsmi_processor_handle processor_handle,
5569  uint32_t core_ind, uint32_t boostlimit);
5570 
5581 amdsmi_status_t amdsmi_set_cpu_socket_boostlimit(amdsmi_cpusocket_handle socket_handle,
5582  uint32_t sock_ind, uint32_t boostlimit);
5583 
5586 /*---------------------------------------------------------------------------*/
5588 /*---------------------------------------------------------------------------*/
5599 amdsmi_status_t amdsmi_get_cpu_ddr_bw(amdsmi_cpusocket_handle socket_handle,
5600  amdsmi_ddr_bw_metrics_t *ddr_bw);
5601 
5604 /*---------------------------------------------------------------------------*/
5606 /*---------------------------------------------------------------------------*/
5619 amdsmi_status_t amdsmi_get_cpu_socket_temperature(amdsmi_cpusocket_handle socket_handle,
5620  uint32_t sock_ind, uint32_t *ptmon);
5621 
5624 /*---------------------------------------------------------------------------*/
5626 /*---------------------------------------------------------------------------*/
5639 amdsmi_status_t amdsmi_get_cpu_dimm_temp_range_and_refresh_rate(amdsmi_cpusocket_handle socket_handle,
5640  uint8_t sock_ind, uint8_t dimm_addr, amdsmi_temp_range_refresh_rate_t *rate);
5641 
5652 amdsmi_status_t amdsmi_get_cpu_dimm_power_consumption(amdsmi_cpusocket_handle socket_handle,
5653  uint8_t sock_ind, uint8_t dimm_addr, amdsmi_dimm_power_t *dimm_pow);
5654 
5665 amdsmi_status_t amdsmi_get_cpu_dimm_thermal_sensor(amdsmi_cpusocket_handle socket_handle,
5666  uint8_t sock_ind, uint8_t dimm_addr, amdsmi_dimm_thermal_t *dimm_temp);
5667 
5670 /*---------------------------------------------------------------------------*/
5672 /*---------------------------------------------------------------------------*/
5683 amdsmi_status_t amdsmi_set_cpu_xgmi_width(amdsmi_cpusocket_handle socket_handle,
5684  uint8_t min, uint8_t max);
5685 
5688 /*---------------------------------------------------------------------------*/
5690 /*---------------------------------------------------------------------------*/
5703 amdsmi_status_t amdsmi_set_cpu_gmi3_link_width_range(amdsmi_cpusocket_handle socket_handle,
5704  uint8_t sock_ind, uint8_t min_link_width, uint8_t max_link_width);
5705 
5708 /*---------------------------------------------------------------------------*/
5710 /*---------------------------------------------------------------------------*/
5721 amdsmi_status_t amdsmi_cpu_apb_enable(amdsmi_cpusocket_handle socket_handle, uint32_t sock_ind);
5722 
5733 amdsmi_status_t amdsmi_cpu_apb_disable(amdsmi_cpusocket_handle socket_handle,
5734  uint32_t sock_ind, uint8_t pstate);
5735 
5747 amdsmi_status_t amdsmi_set_cpu_socket_lclk_dpm_level(amdsmi_cpusocket_handle socket_handle,
5748  uint32_t sock_ind, uint8_t nbio_id, uint8_t min, uint8_t max);
5749 
5760 amdsmi_status_t amdsmi_get_cpu_socket_lclk_dpm_level(amdsmi_cpusocket_handle socket_handle,
5761  uint8_t sock_ind, uint8_t nbio_id, amdsmi_dpm_level_t *nbio);
5762 
5773 amdsmi_status_t amdsmi_set_cpu_pcie_link_rate(amdsmi_cpusocket_handle socket_handle,
5774  uint8_t sock_ind, uint8_t rate_ctrl, uint8_t *prev_mode);
5775 
5786 amdsmi_status_t amdsmi_set_cpu_df_pstate_range(amdsmi_cpusocket_handle socket_handle,
5787  uint8_t sock_ind, uint8_t max_pstate, uint8_t min_pstate);
5788 
5791 /*---------------------------------------------------------------------------*/
5793 /*---------------------------------------------------------------------------*/
5806 amdsmi_status_t amdsmi_get_cpu_current_io_bandwidth(amdsmi_cpusocket_handle socket_handle,
5807  uint8_t sock_ind, amdsmi_link_id_bw_type_t link, uint32_t *io_bw);
5808 
5818 amdsmi_status_t amdsmi_get_cpu_current_xgmi_bw(amdsmi_cpusocket_handle socket_handle,
5819  amdsmi_link_id_bw_type_t link, uint32_t *xgmi_bw);
5820 
5823 /*---------------------------------------------------------------------------*/
5825 /*---------------------------------------------------------------------------*/
5836 amdsmi_status_t amdsmi_get_metrics_table_version(amdsmi_cpusocket_handle socket_handle,
5837  uint32_t *metrics_version);
5838 
5848 amdsmi_status_t amdsmi_get_metrics_table(amdsmi_cpusocket_handle socket_handle, uint8_t sock_ind,
5849  struct hsmp_metric_table *metrics_table);
5850 
5853 /*---------------------------------------------------------------------------*/
5855 /*---------------------------------------------------------------------------*/
5868 amdsmi_status_t amdsmi_first_online_core_on_cpu_socket(amdsmi_cpusocket_handle socket_handle,
5869  uint32_t sock_ind, uint32_t *pcore_ind);
5870 
5884 const char** amdsmi_get_esmi_err_msg(amdsmi_status_t status, const char **status_string);
5885 #endif
5887 #ifdef __cplusplus
5888 }
5889 #endif // __cplusplus
5890 #endif // INCLUDE_AMDSMI_H_
#define AMDSMI_MAX_DATE_LENGTH
Definition: amdsmi.h:79
amdsmi_evt_notification_type_t
Definition: amdsmi.h:729
@ AMDSMI_EVT_NOTIF_VMFAULT
VM page fault.
Definition: amdsmi.h:730
#define AMDSMI_MAX_NUM_CLKS
This should match MAX_NUM_CLKS.
Definition: amdsmi.h:1162
#define AMDSMI_MAX_NUM_XGMI_LINKS
This should match MAX_NUM_XGMI_LINKS.
Definition: amdsmi.h:1167
amdsmi_freq_ind_t
The values of this enum are used as frequency identifiers.
Definition: amdsmi.h:915
@ AMDSMI_FREQ_IND_INVALID
An invalid frequency index.
Definition: amdsmi.h:918
@ AMDSMI_FREQ_IND_MAX
Index used for the maximum frequency value.
Definition: amdsmi.h:917
@ AMDSMI_FREQ_IND_MIN
Index used for the minimum frequency value.
Definition: amdsmi.h:916
amdsmi_reg_type_t
This register type for register table.
Definition: amdsmi.h:1327
uintptr_t amdsmi_event_handle_t
Available clock types.
Definition: amdsmi.h:623
amdsmi_memory_type_t
Types of memory.
Definition: amdsmi.h:902
@ AMDSMI_MEM_TYPE_VRAM
VRAM memory.
Definition: amdsmi.h:905
@ AMDSMI_MEM_TYPE_VIS_VRAM
VRAM memory that is visible.
Definition: amdsmi.h:906
@ AMDSMI_MEM_TYPE_GTT
GTT memory.
Definition: amdsmi.h:907
amdsmi_status_t amdsmi_get_gpu_device_uuid(amdsmi_processor_handle processor_handle, unsigned int *uuid_length, char *uuid)
Returns the UUID of the device.
amdsmi_clk_type_t
Definition: amdsmi.h:210
@ CLK_TYPE_DF
running on a separate clock)
Definition: amdsmi.h:214
@ CLK_TYPE_SYS
System clock.
Definition: amdsmi.h:211
@ CLK_TYPE_DCEF
Display Controller Engine clock.
Definition: amdsmi.h:216
#define MAX_EVENT_NOTIFICATION_MSG_SIZE
Maximum number of characters an event notification message will be.
Definition: amdsmi.h:745
amdsmi_io_link_type_t
Types for IO Link.
Definition: amdsmi.h:950
@ AMDSMI_IOLINK_TYPE_SIZE
Max of IO Link types.
Definition: amdsmi.h:955
@ AMDSMI_IOLINK_TYPE_UNDEFINED
unknown type.
Definition: amdsmi.h:951
@ AMDSMI_IOLINK_TYPE_NUMIOLINKTYPES
Number of IO Link types.
Definition: amdsmi.h:954
@ AMDSMI_IOLINK_TYPE_XGMI
XGMI.
Definition: amdsmi.h:953
@ AMDSMI_IOLINK_TYPE_PCIEXPRESS
PCI Express.
Definition: amdsmi.h:952
amdsmi_cache_flags_type_t
cache flags
Definition: amdsmi.h:464
amdsmi_init_flags_t
Initialization flags.
Definition: amdsmi.h:69
#define AMDSMI_NUM_HBM_INSTANCES
This should match NUM_HBM_INSTANCES.
Definition: amdsmi.h:1152
amdsmi_event_group_t
Enum denoting an event group. The value of the enum is the base value for all the event enums in the ...
Definition: amdsmi.h:631
@ AMDSMI_EVNT_GRP_XGMI
Data Fabric (XGMI) related events.
Definition: amdsmi.h:632
@ AMDSMI_EVNT_GRP_XGMI_DATA_OUT
XGMI Outbound data.
Definition: amdsmi.h:633
amdsmi_ras_err_state_t
The current ECC state.
Definition: amdsmi.h:885
@ AMDSMI_RAS_ERR_STATE_PARITY
ECC errors present, but type unknown.
Definition: amdsmi.h:888
@ AMDSMI_RAS_ERR_STATE_SING_C
Single correctable error.
Definition: amdsmi.h:889
@ AMDSMI_RAS_ERR_STATE_MULT_UC
Multiple uncorrectable errors.
Definition: amdsmi.h:890
@ AMDSMI_RAS_ERR_STATE_POISON
page. Treat as uncorrectable.
Definition: amdsmi.h:891
@ AMDSMI_RAS_ERR_STATE_ENABLED
ECC is enabled.
Definition: amdsmi.h:893
@ AMDSMI_RAS_ERR_STATE_NONE
No current errors.
Definition: amdsmi.h:886
@ AMDSMI_RAS_ERR_STATE_DISABLED
ECC is disabled.
Definition: amdsmi.h:887
amdsmi_event_type_t
Event type enum. Events belonging to a particular event group amdsmi_event_group_t should begin enume...
Definition: amdsmi.h:643
@ AMDSMI_EVNT_XGMI_0_BEATS_TX
Data beats sent to neighbor 0; Each beat represents 32 bytes.
Definition: amdsmi.h:666
@ AMDSMI_EVNT_XGMI_DATA_OUT_3
Outbound beats to neighbor 3.
Definition: amdsmi.h:698
@ AMDSMI_EVNT_XGMI_0_NOP_TX
NOPs sent to neighbor 0.
Definition: amdsmi.h:647
@ AMDSMI_EVNT_XGMI_1_NOP_TX
NOPs sent to neighbor 1.
Definition: amdsmi.h:667
@ AMDSMI_EVNT_XGMI_0_RESPONSE_TX
neighbor 0
Definition: amdsmi.h:650
@ AMDSMI_EVNT_XGMI_1_BEATS_TX
Definition: amdsmi.h:672
@ AMDSMI_EVNT_XGMI_DATA_OUT_4
Outbound beats to neighbor 4.
Definition: amdsmi.h:699
@ AMDSMI_EVNT_XGMI_DATA_OUT_1
Outbound beats to neighbor 1.
Definition: amdsmi.h:696
@ AMDSMI_EVNT_XGMI_DATA_OUT_2
Outbound beats to neighbor 2.
Definition: amdsmi.h:697
@ AMDSMI_EVNT_XGMI_1_REQUEST_TX
neighbor 1
Definition: amdsmi.h:668
@ AMDSMI_EVNT_XGMI_DATA_OUT_5
Outbound beats to neighbor 5.
Definition: amdsmi.h:700
@ AMDSMI_EVNT_XGMI_0_REQUEST_TX
neighbor 0
Definition: amdsmi.h:648
@ AMDSMI_EVNT_XGMI_1_RESPONSE_TX
neighbor 1
Definition: amdsmi.h:670
processor_type_t
Processor types detectable by AMD SMI AMD_CPU - CPU Socket is a physical component that holds the CPU...
Definition: amdsmi.h:140
amdsmi_fw_block_t
The values of this enum are used to identify the various firmware blocks.
Definition: amdsmi.h:288
amdsmi_memory_page_status_t
Reserved Memory Page States.
Definition: amdsmi.h:938
@ AMDSMI_MEM_PAGE_STATUS_UNRESERVABLE
Unable to reserve this page.
Definition: amdsmi.h:944
@ AMDSMI_MEM_PAGE_STATUS_RESERVED
and not available for use
Definition: amdsmi.h:939
@ AMDSMI_MEM_PAGE_STATUS_PENDING
Definition: amdsmi.h:941
amdsmi_xgmi_status_t
XGMI Status.
Definition: amdsmi.h:924
amdsmi_dev_perf_level_t
PowerPlay performance levels.
Definition: amdsmi.h:587
@ AMDSMI_DEV_PERF_LEVEL_STABLE_STD
clocks
Definition: amdsmi.h:597
@ AMDSMI_DEV_PERF_LEVEL_STABLE_PEAK
Stable power state with peak clocks.
Definition: amdsmi.h:599
@ AMDSMI_DEV_PERF_LEVEL_AUTO
Performance level is "auto".
Definition: amdsmi.h:588
@ AMDSMI_DEV_PERF_LEVEL_STABLE_MIN_SCLK
system clock
Definition: amdsmi.h:602
@ AMDSMI_DEV_PERF_LEVEL_STABLE_MIN_MCLK
memory clock
Definition: amdsmi.h:600
@ AMDSMI_DEV_PERF_LEVEL_DETERMINISM
Performance determinism state.
Definition: amdsmi.h:604
@ AMDSMI_DEV_PERF_LEVEL_LOW
regardless of workload
Definition: amdsmi.h:591
@ AMDSMI_DEV_PERF_LEVEL_HIGH
regardless of workload
Definition: amdsmi.h:593
@ AMDSMI_DEV_PERF_LEVEL_MANUAL
setting the AMDSMI_CLK_TYPE_SYS speed
Definition: amdsmi.h:595
@ AMDSMI_DEV_PERF_LEVEL_UNKNOWN
Unknown performance level.
Definition: amdsmi.h:608
amdsmi_utilization_counter_type_t
The utilization counter type.
Definition: amdsmi.h:961
@ AMDSMI_COARSE_GRAIN_MEM_ACTIVITY
Memory Activity.
Definition: amdsmi.h:965
@ AMDSMI_UTILIZATION_COUNTER_FIRST
GFX Activity.
Definition: amdsmi.h:962
amdsmi_memory_partition_type_t
Memory Partitions. This enum is used to identify various memory partition types.
Definition: amdsmi.h:249
@ MEMORY_PARTITION_NPS1
Definition: amdsmi.h:251
@ MEMORY_PARTITION_NPS4
Definition: amdsmi.h:256
@ MEMORY_PARTITION_NPS2
Definition: amdsmi.h:253
@ MEMORY_PARTITION_NPS8
Definition: amdsmi.h:259
amdsmi_voltage_metric_t
Voltage Metrics. This enum is used to identify various Volatge metrics. Corresponding values will be ...
Definition: amdsmi.h:804
@ AMDSMI_VOLT_LOWEST
Historical minimum voltage.
Definition: amdsmi.h:813
@ AMDSMI_VOLT_MAX_CRIT
Voltage critical max value.
Definition: amdsmi.h:811
@ AMDSMI_VOLT_HIGHEST
Historical maximum voltage.
Definition: amdsmi.h:814
@ AMDSMI_VOLT_MIN
Voltage min value.
Definition: amdsmi.h:810
@ AMDSMI_VOLT_AVERAGE
Average voltage.
Definition: amdsmi.h:812
@ AMDSMI_VOLT_CURRENT
Voltage current value.
Definition: amdsmi.h:805
@ AMDSMI_VOLT_MAX
Voltage max value.
Definition: amdsmi.h:808
@ AMDSMI_VOLT_MIN_CRIT
Voltage critical min value.
Definition: amdsmi.h:809
uint64_t amdsmi_bit_field_t
Bitfield used in various AMDSMI calls.
Definition: amdsmi.h:933
amdsmi_voltage_type_t
This ennumeration is used to indicate which type of voltage reading should be obtained.
Definition: amdsmi.h:823
@ AMDSMI_VOLT_TYPE_INVALID
Invalid type.
Definition: amdsmi.h:829
@ AMDSMI_VOLT_TYPE_VDDGFX
voltage
Definition: amdsmi.h:826
amdsmi_pcie_slot_type_t
This is a enum translation for pcie_slot_type.
Definition: amdsmi.h:1357
void * amdsmi_processor_handle
opaque handler point to underlying implementation
Definition: amdsmi.h:128
amdsmi_status_t
Error codes returned by amdsmi functions.
Definition: amdsmi.h:155
@ AMDSMI_STATUS_NOT_INIT
Device not initialized.
Definition: amdsmi.h:180
@ AMDSMI_STATUS_NON_AMD_CPU
System has different cpu than AMD.
Definition: amdsmi.h:189
@ AMDSMI_ARG_PTR_NULL
Parsed argument is invalid.
Definition: amdsmi.h:198
@ AMDSMI_NO_HSMP_SUP
HSMP not supported.
Definition: amdsmi.h:193
@ AMDSMI_STATUS_INVAL
Invalid parameters.
Definition: amdsmi.h:158
@ AMDSMI_STATUS_BUSY
Device busy.
Definition: amdsmi.h:178
@ AMDSMI_NO_MSR_DRV
MSR driver not found.
Definition: amdsmi.h:191
@ AMDSMI_STATUS_UNKNOWN_ERROR
An unknown error occurred.
Definition: amdsmi.h:204
@ AMDSMI_STATUS_DRIVER_NOT_LOADED
Processor driver not loaded.
Definition: amdsmi.h:182
@ AMDSMI_STATUS_FILE_ERROR
Problem accessing a file.
Definition: amdsmi.h:171
@ AMDSMI_STATUS_DRM_ERROR
Error when call libdrm.
Definition: amdsmi.h:163
@ AMDSMI_STATUS_IO
I/O Error.
Definition: amdsmi.h:169
@ AMDSMI_NO_DRV
No Energy and HSMP driver present.
Definition: amdsmi.h:196
@ AMDSMI_STATUS_NO_DATA
No data was found for a given input.
Definition: amdsmi.h:184
@ AMDSMI_STATUS_RETRY
Retry operation.
Definition: amdsmi.h:166
@ AMDSMI_STATUS_UNEXPECTED_SIZE
An unexpected amount of data was read.
Definition: amdsmi.h:186
@ AMDSMI_STATUS_SETTING_UNAVAILABLE
Setting is not available.
Definition: amdsmi.h:200
@ AMDSMI_STATUS_INTERNAL_EXCEPTION
An internal exception was caught.
Definition: amdsmi.h:173
@ AMDSMI_STATUS_MAP_ERROR
The internal library error did not map to a status code.
Definition: amdsmi.h:203
@ AMDSMI_STATUS_FAIL_LOAD_SYMBOL
Fail to load symbol.
Definition: amdsmi.h:162
@ AMDSMI_STATUS_INSUFFICIENT_SIZE
Not enough resources were available for the operation.
Definition: amdsmi.h:185
@ AMDSMI_STATUS_INIT_ERROR
An error occurred when initializing internal data structures.
Definition: amdsmi.h:175
@ AMDSMI_NO_HSMP_DRV
HSMP driver not found.
Definition: amdsmi.h:192
@ AMDSMI_STATUS_OUT_OF_RESOURCES
Not enough memory.
Definition: amdsmi.h:172
@ AMDSMI_STATUS_NO_SLOT
No more free slot.
Definition: amdsmi.h:181
@ AMDSMI_STATUS_INTERRUPT
An interrupt occurred during execution of function.
Definition: amdsmi.h:168
@ AMDSMI_STATUS_SUCCESS
Call succeeded.
Definition: amdsmi.h:156
@ AMDSMI_HSMP_TIMEOUT
HSMP message is timedout.
Definition: amdsmi.h:195
@ AMDSMI_STATUS_ADDRESS_FAULT
Bad address.
Definition: amdsmi.h:170
@ AMDSMI_NO_ENERGY_DRV
Energy driver not found.
Definition: amdsmi.h:190
@ AMDSMI_FILE_NOT_FOUND
file or directory not found
Definition: amdsmi.h:197
@ AMDSMI_STATUS_NOT_YET_IMPLEMENTED
Not implemented yet.
Definition: amdsmi.h:160
@ AMDSMI_STATUS_NO_PERM
Permission Denied.
Definition: amdsmi.h:167
@ AMDSMI_STATUS_NOT_FOUND
Device Not found.
Definition: amdsmi.h:179
@ AMDSMI_STATUS_FAIL_LOAD_MODULE
Fail to load lib.
Definition: amdsmi.h:161
@ AMDSMI_STATUS_AMDGPU_RESTART_ERR
AMDGPU restart failed.
Definition: amdsmi.h:199
@ AMDSMI_STATUS_NOT_SUPPORTED
Command not supported.
Definition: amdsmi.h:159
@ AMDSMI_NO_HSMP_MSG_SUP
HSMP message/feature not supported.
Definition: amdsmi.h:194
@ AMDSMI_STATUS_UNEXPECTED_DATA
The data read or provided to function is not what was expected.
Definition: amdsmi.h:187
@ AMDSMI_STATUS_API_FAILED
API call failed.
Definition: amdsmi.h:164
@ AMDSMI_STATUS_TIMEOUT
Timeout in API call.
Definition: amdsmi.h:165
@ AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS
The provided input is out of allowable or safe range.
Definition: amdsmi.h:174
@ AMDSMI_STATUS_REFCOUNT_OVERFLOW
An internal reference counter exceeded INT32_MAX.
Definition: amdsmi.h:176
amdsmi_temperature_metric_t
Temperature Metrics. This enum is used to identify various temperature metrics. Corresponding values ...
Definition: amdsmi.h:761
@ AMDSMI_TEMP_CRITICAL_HYST
Definition: amdsmi.h:775
@ AMDSMI_TEMP_CRITICAL
greater than corresponding temp_max values.
Definition: amdsmi.h:773
@ AMDSMI_TEMP_OFFSET
Definition: amdsmi.h:791
@ AMDSMI_TEMP_EMERGENCY
Definition: amdsmi.h:778
@ AMDSMI_TEMP_LOWEST
temperature reading by the chip.
Definition: amdsmi.h:793
@ AMDSMI_TEMP_CRIT_MIN
Definition: amdsmi.h:785
@ AMDSMI_TEMP_EMERGENCY_HYST
Definition: amdsmi.h:782
@ AMDSMI_TEMP_CURRENT
Temperature current value.
Definition: amdsmi.h:762
@ AMDSMI_TEMP_MIN
Temperature min value.
Definition: amdsmi.h:766
@ AMDSMI_TEMP_HIGHEST
Historical maximum temperature.
Definition: amdsmi.h:794
@ AMDSMI_TEMP_CRIT_MIN_HYST
Definition: amdsmi.h:788
@ AMDSMI_TEMP_MIN_HYST
Definition: amdsmi.h:770
@ AMDSMI_TEMP_MAX_HYST
Definition: amdsmi.h:767
@ AMDSMI_TEMP_MAX
Temperature max value.
Definition: amdsmi.h:765
amdsmi_gpu_block_t
This enum is used to identify different GPU blocks.
Definition: amdsmi.h:857
@ AMDSMI_GPU_BLOCK_XGMI_WAFL
XGMI block.
Definition: amdsmi.h:869
@ AMDSMI_GPU_BLOCK_LAST
for supported blocks
Definition: amdsmi.h:877
@ AMDSMI_GPU_BLOCK_GFX
GFX block.
Definition: amdsmi.h:864
@ AMDSMI_GPU_BLOCK_INVALID
invalid block
Definition: amdsmi.h:858
@ AMDSMI_GPU_BLOCK_MP0
MP0 block.
Definition: amdsmi.h:873
@ AMDSMI_GPU_BLOCK_HDP
HDP block.
Definition: amdsmi.h:868
@ AMDSMI_GPU_BLOCK_ATHUB
ATHUB block.
Definition: amdsmi.h:866
@ AMDSMI_GPU_BLOCK_MP1
MP1 block.
Definition: amdsmi.h:874
@ AMDSMI_GPU_BLOCK_PCIE_BIF
PCIE_BIF block.
Definition: amdsmi.h:867
@ AMDSMI_GPU_BLOCK_SDMA
SDMA block.
Definition: amdsmi.h:863
@ AMDSMI_GPU_BLOCK_UMC
UMC block.
Definition: amdsmi.h:862
@ AMDSMI_GPU_BLOCK_FUSE
Fuse block.
Definition: amdsmi.h:875
@ AMDSMI_GPU_BLOCK_DF
DF block.
Definition: amdsmi.h:870
@ AMDSMI_GPU_BLOCK_MMHUB
MMHUB block.
Definition: amdsmi.h:865
@ AMDSMI_GPU_BLOCK_SMN
SMN block.
Definition: amdsmi.h:871
@ AMDSMI_GPU_BLOCK_SEM
SEM block.
Definition: amdsmi.h:872
amdsmi_status_t amdsmi_get_gpu_device_bdf(amdsmi_processor_handle processor_handle, amdsmi_bdf_t *bdf)
Returns BDF of the given device.
amdsmi_power_type_t
Power types.
Definition: amdsmi.h:972
@ AMDSMI_INVALID_POWER
Invalid / Undetected Power.
Definition: amdsmi.h:975
@ AMDSMI_CURRENT_POWER
Current / Instant Power.
Definition: amdsmi.h:974
@ AMDSMI_AVERAGE_POWER
Average Power.
Definition: amdsmi.h:973
amdsmi_temperature_type_t
This enumeration is used to indicate from which part of the device a temperature reading should be ob...
Definition: amdsmi.h:270
#define AMDSMI_MAX_NUM_FREQUENCIES
Guaranteed maximum possible number of supported frequencies.
Definition: amdsmi.h:576
amdsmi_counter_command_t
Definition: amdsmi.h:709
@ AMDSMI_CNTR_CMD_STOP
be used before reading.
Definition: amdsmi.h:711
@ AMDSMI_CNTR_CMD_START
Start the counter.
Definition: amdsmi.h:710
amdsmi_power_profile_preset_masks_t
Pre-set Profile Selections. These bitmasks can be AND'd with the amdsmi_power_profile_status_t....
Definition: amdsmi.h:838
@ AMDSMI_PWR_PROF_PRST_COMPUTE_MASK
Compute Saving Profile.
Definition: amdsmi.h:842
@ AMDSMI_PWR_PROF_PRST_POWER_SAVING_MASK
Power Saving Profile.
Definition: amdsmi.h:841
@ AMDSMI_PWR_PROF_PRST_VIDEO_MASK
Video Power Profile.
Definition: amdsmi.h:840
@ AMDSMI_PWR_PROF_PRST_BOOTUP_DEFAULT
Default Boot Up Profile.
Definition: amdsmi.h:847
@ AMDSMI_PWR_PROF_PRST_LAST
Invalid power profile.
Definition: amdsmi.h:848
@ AMDSMI_PWR_PROF_PRST_CUSTOM_MASK
Custom Power Profile.
Definition: amdsmi.h:839
@ AMDSMI_PWR_PROF_PRST_VR_MASK
VR Power Profile.
Definition: amdsmi.h:843
#define AMDSMI_MAX_NUM_GFX_CLKS
This should match MAX_NUM_GFX_CLKS.
Definition: amdsmi.h:1172
#define AMDSMI_NUM_VOLTAGE_CURVE_POINTS
The number of points that make up a voltage-frequency curve definition.
Definition: amdsmi.h:583
amdsmi_compute_partition_type_t
Compute Partition. This enum is used to identify various compute partitioning settings.
Definition: amdsmi.h:231
@ COMPUTE_PARTITION_TPX
Definition: amdsmi.h:239
@ COMPUTE_PARTITION_CPX
Definition: amdsmi.h:233
@ COMPUTE_PARTITION_DPX
Definition: amdsmi.h:237
@ COMPUTE_PARTITION_QPX
Definition: amdsmi.h:241
@ COMPUTE_PARTITION_SPX
Definition: amdsmi.h:235
#define AMDSMI_MAX_NUM_VCN
This should match MAX_NUM_VCN.
Definition: amdsmi.h:1157
amdsmi_status_t amdsmi_get_processor_handles(amdsmi_socket_handle socket_handle, uint32_t *processor_count, amdsmi_processor_handle *processor_handles)
Get the list of the processor handles associated to a socket.
amdsmi_status_t amdsmi_get_processor_type(amdsmi_processor_handle processor_handle, processor_type_t *processor_type)
Get the processor type of the processor_handle.
amdsmi_status_t amdsmi_get_socket_info(amdsmi_socket_handle socket_handle, size_t len, char *name)
Get information about the given socket.
amdsmi_status_t amdsmi_get_socket_handles(uint32_t *socket_count, amdsmi_socket_handle *socket_handles)
Get the list of socket handles in the system.
amdsmi_status_t amdsmi_get_processor_handle_from_bdf(amdsmi_bdf_t bdf, amdsmi_processor_handle *processor_handle)
Get processor handle with the matching bdf.
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.
amdsmi_status_t amdsmi_get_gpu_ecc_status(amdsmi_processor_handle processor_handle, amdsmi_gpu_block_t block, amdsmi_ras_err_state_t *state)
Retrieve the ECC status for a GPU block. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_ecc_count(amdsmi_processor_handle processor_handle, amdsmi_gpu_block_t block, amdsmi_error_count_t *ec)
Retrieve the error counts for a GPU block. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_ecc_enabled(amdsmi_processor_handle processor_handle, uint64_t *enabled_blocks)
Retrieve the enabled ECC bit-mask. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_set_gpu_event_notification_mask(amdsmi_processor_handle processor_handle, uint64_t mask)
Specify which events to collect for a device.
amdsmi_status_t amdsmi_stop_gpu_event_notification(amdsmi_processor_handle processor_handle)
Close any file handles and free any resources used by event notification for a GPU.
amdsmi_status_t amdsmi_init_gpu_event_notification(amdsmi_processor_handle processor_handle)
Prepare to collect event notifications for a GPU.
amdsmi_status_t amdsmi_get_gpu_event_notification(int timeout_ms, uint32_t *num_elem, amdsmi_evt_notification_data_t *data)
Collect event notifications, waiting a specified amount of time.
amdsmi_status_t amdsmi_topo_get_numa_node_number(amdsmi_processor_handle processor_handle, uint32_t *numa_node)
Retrieve the NUMA CPU node number for a device.
amdsmi_status_t amdsmi_topo_get_link_type(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, uint64_t *hops, amdsmi_io_link_type_t *type)
Retrieve the hops and the connection type between 2 GPUs.
amdsmi_status_t amdsmi_get_minmax_bandwidth_between_processors(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, uint64_t *min_bandwidth, uint64_t *max_bandwidth)
Retreive minimal and maximal io link bandwidth between 2 GPUs.
amdsmi_status_t amdsmi_is_P2P_accessible(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, bool *accessible)
Return P2P availability status between 2 GPUs.
amdsmi_status_t amdsmi_topo_get_link_weight(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, uint64_t *weight)
Retrieve the weight for a connection between 2 GPUs.
amdsmi_status_t amdsmi_get_gpu_subsystem_name(amdsmi_processor_handle processor_handle, char *name, size_t len)
Get the name string for the device subsytem.
amdsmi_status_t amdsmi_get_gpu_revision(amdsmi_processor_handle processor_handle, uint16_t *revision)
Get the device revision associated with the device.
amdsmi_status_t amdsmi_get_gpu_vendor_name(amdsmi_processor_handle processor_handle, char *name, size_t len)
Get the name string for a give vendor ID.
amdsmi_status_t amdsmi_get_gpu_id(amdsmi_processor_handle processor_handle, uint16_t *id)
Get the device id associated with the device with provided device handler.
amdsmi_status_t amdsmi_get_gpu_vram_vendor(amdsmi_processor_handle processor_handle, char *brand, uint32_t len)
Get the vram vendor string of a device.
amdsmi_status_t amdsmi_get_gpu_subsystem_id(amdsmi_processor_handle processor_handle, uint16_t *id)
Get the subsystem device id associated with the device with provided processor handle.
amdsmi_status_t amdsmi_shut_down(void)
Shutdown the AMD SMI library.
amdsmi_status_t amdsmi_init(uint64_t init_flags)
Initialize the AMD SMI library.
amdsmi_status_t amdsmi_get_gpu_memory_total(amdsmi_processor_handle processor_handle, amdsmi_memory_type_t mem_type, uint64_t *total)
Get the total amount of memory that exists.
amdsmi_status_t amdsmi_get_gpu_ras_block_features_enabled(amdsmi_processor_handle processor_handle, amdsmi_gpu_block_t block, amdsmi_ras_err_state_t *state)
Returns if RAS features are enabled or disabled for given block. It is not supported on virtual machi...
amdsmi_status_t amdsmi_get_gpu_bad_page_info(amdsmi_processor_handle processor_handle, uint32_t *num_pages, amdsmi_retired_page_record_t *info)
Get the bad pages of a processor. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_memory_reserved_pages(amdsmi_processor_handle processor_handle, uint32_t *num_pages, amdsmi_retired_page_record_t *records)
Get information about reserved ("retired") memory pages. It is not supported on virtual machine guest...
amdsmi_status_t amdsmi_get_gpu_memory_usage(amdsmi_processor_handle processor_handle, amdsmi_memory_type_t mem_type, uint64_t *used)
Get the current memory usage.
amdsmi_status_t amdsmi_get_gpu_ras_feature_info(amdsmi_processor_handle processor_handle, amdsmi_ras_feature_t *ras_feature)
Returns RAS features info.
amdsmi_status_t amdsmi_set_gpu_pci_bandwidth(amdsmi_processor_handle processor_handle, uint64_t bw_bitmask)
Control the set of allowed PCIe bandwidths that can be used. It is not supported on virtual machine g...
amdsmi_status_t amdsmi_get_gpu_topo_numa_affinity(amdsmi_processor_handle processor_handle, int32_t *numa_node)
Get the NUMA node associated with a device.
amdsmi_status_t amdsmi_get_gpu_pci_throughput(amdsmi_processor_handle processor_handle, uint64_t *sent, uint64_t *received, uint64_t *max_pkt_sz)
Get PCIe traffic information. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_pci_bandwidth(amdsmi_processor_handle processor_handle, amdsmi_pcie_bandwidth_t *bandwidth)
Get the list of possible PCIe bandwidths that are available. It is not supported on virtual machine g...
amdsmi_status_t amdsmi_get_gpu_pci_replay_counter(amdsmi_processor_handle processor_handle, uint64_t *counter)
Get PCIe replay counter.
amdsmi_status_t amdsmi_get_gpu_bdf_id(amdsmi_processor_handle processor_handle, uint64_t *bdfid)
Get the unique PCI device identifier associated for a device.
amdsmi_status_t amdsmi_get_gpu_available_counters(amdsmi_processor_handle processor_handle, amdsmi_event_group_t grp, uint32_t *available)
Get the number of currently available counters. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_gpu_read_counter(amdsmi_event_handle_t evt_handle, amdsmi_counter_value_t *value)
Read the current value of a performance counter.
amdsmi_status_t amdsmi_gpu_control_counter(amdsmi_event_handle_t evt_handle, amdsmi_counter_command_t cmd, void *cmd_args)
Issue performance counter control commands. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_gpu_counter_group_supported(amdsmi_processor_handle processor_handle, amdsmi_event_group_t group)
Tell if an event group is supported by a given device. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_gpu_destroy_counter(amdsmi_event_handle_t evnt_handle)
Deallocate a performance counter object.
amdsmi_status_t amdsmi_gpu_create_counter(amdsmi_processor_handle processor_handle, amdsmi_event_type_t type, amdsmi_event_handle_t *evnt_handle)
Create a performance counter object.
amdsmi_status_t amdsmi_set_gpu_perf_level(amdsmi_processor_handle processor_handle, amdsmi_dev_perf_level_t perf_lvl)
Set the PowerPlay performance level associated with the device with provided processor handle with th...
amdsmi_status_t amdsmi_set_gpu_overdrive_level(amdsmi_processor_handle processor_handle, uint32_t od)
Set the overdrive percent associated with the device with provided processor handle with the provided...
amdsmi_status_t amdsmi_set_clk_freq(amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, uint64_t freq_bitmask)
Control the set of allowed frequencies that can be used for the specified clock. It is not supported ...
amdsmi_status_t amdsmi_get_pcie_link_caps(amdsmi_processor_handle processor_handle, amdsmi_pcie_info_t *info)
Get max PCIe capabilities of the device with provided processor handle.
amdsmi_status_t amdsmi_get_gpu_metrics_info(amdsmi_processor_handle processor_handle, amdsmi_gpu_metrics_t *pgpu_metrics)
This function retrieves the gpu metrics information. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_power_profile_presets(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, amdsmi_power_profile_status_t *status)
Get the list of available preset power profiles and an indication of which profile is currently activ...
amdsmi_status_t amdsmi_get_gpu_pm_metrics_info(amdsmi_processor_handle processor_handle, amdsmi_name_value_t **pm_metrics, uint32_t *num_of_metrics)
Get the pm metrics table with provided device index.
amdsmi_status_t amdsmi_get_pcie_link_status(amdsmi_processor_handle processor_handle, amdsmi_pcie_info_t *info)
Get current PCIE info of the device with provided processor handle. It is not supported on virtual ma...
amdsmi_status_t amdsmi_get_utilization_count(amdsmi_processor_handle processor_handle, amdsmi_utilization_counter_t utilization_counters[], uint32_t count, uint64_t *timestamp)
Get coarse grain utilization counter of the specified device.
amdsmi_status_t amdsmi_reset_gpu(amdsmi_processor_handle processor_handle)
Reset the gpu associated with the device with provided processor handle. It is not supported on virtu...
amdsmi_status_t amdsmi_set_gpu_od_volt_info(amdsmi_processor_handle processor_handle, uint32_t vpoint, uint64_t clkvalue, uint64_t voltvalue)
This function sets 1 of the 3 voltage curve points. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_set_gpu_clk_range(amdsmi_processor_handle processor_handle, uint64_t minclkvalue, uint64_t maxclkvalue, amdsmi_clk_type_t clkType)
This function sets the clock range information. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_clk_freq(amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, amdsmi_frequencies_t *f)
Get the list of possible system clock speeds of device for a specified clock type....
amdsmi_status_t amdsmi_get_gpu_perf_level(amdsmi_processor_handle processor_handle, amdsmi_dev_perf_level_t *perf)
Get the performance level of the device. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_set_gpu_perf_determinism_mode(amdsmi_processor_handle processor_handle, uint64_t clkvalue)
Enter performance determinism mode with provided processor handle. It is not supported on virtual mac...
amdsmi_status_t amdsmi_get_gpu_od_volt_info(amdsmi_processor_handle processor_handle, amdsmi_od_volt_freq_data_t *odv)
This function retrieves the voltage/frequency curve information. It is not supported on virtual machi...
amdsmi_status_t amdsmi_get_gpu_od_volt_curve_regions(amdsmi_processor_handle processor_handle, uint32_t *num_regions, amdsmi_freq_volt_region_t *buffer)
This function will retrieve the current valid regions in the frequency/voltage space....
amdsmi_status_t amdsmi_get_gpu_reg_table_info(amdsmi_processor_handle processor_handle, amdsmi_reg_type_t reg_type, amdsmi_name_value_t **reg_metrics, uint32_t *num_of_metrics)
Get the register metrics table with provided device index and register type.
amdsmi_status_t amdsmi_get_gpu_overdrive_level(amdsmi_processor_handle processor_handle, uint32_t *od)
Get the overdrive percent associated with the device with provided processor handle....
amdsmi_status_t amdsmi_set_gpu_od_clk_info(amdsmi_processor_handle processor_handle, amdsmi_freq_ind_t level, uint64_t clkvalue, amdsmi_clk_type_t clkType)
This function sets the clock frequency information. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_set_gpu_fan_speed(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t speed)
Set the fan speed for the specified device with the provided speed, in RPMs. It is not supported on v...
amdsmi_status_t amdsmi_reset_gpu_fan(amdsmi_processor_handle processor_handle, uint32_t sensor_ind)
Reset the fan to automatic driver control. It is not supported on virtual machine guest.
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)
Get the temperature metric value for the specified metric, from the specified temperature sensor on t...
amdsmi_status_t amdsmi_get_gpu_fan_speed(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, int64_t *speed)
Get the fan speed for the specified device as a value relative to AMDSMI_MAX_FAN_SPEED....
amdsmi_status_t amdsmi_get_gpu_fan_speed_max(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t *max_speed)
Get the max. fan speed of the device with provided processor handle. It is not supported on virtual m...
amdsmi_status_t amdsmi_get_gpu_cache_info(amdsmi_processor_handle processor_handle, amdsmi_gpu_cache_info_t *info)
Returns gpu cache info.
amdsmi_status_t amdsmi_get_gpu_fan_rpms(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, int64_t *speed)
Get the fan speed in RPMs of the device with the specified processor handle and 0-based sensor index....
amdsmi_status_t amdsmi_get_gpu_volt_metric(amdsmi_processor_handle processor_handle, amdsmi_voltage_type_t sensor_type, amdsmi_voltage_metric_t metric, int64_t *voltage)
Get the voltage metric value for the specified metric, from the specified voltage sensor on the speci...
amdsmi_status_t amdsmi_set_gpu_power_profile(amdsmi_processor_handle processor_handle, uint32_t reserved, amdsmi_power_profile_preset_masks_t profile)
Set the power performance profile. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_set_power_cap(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t cap)
Set the maximum gpu power cap value. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_energy_count(amdsmi_processor_handle processor_handle, uint64_t *power, float *counter_resolution, uint64_t *timestamp)
Get the energy accumulator counter of the processor with provided processor handle....
amdsmi_status_t amdsmi_get_gpu_compute_process_info(amdsmi_process_info_t *procs, uint32_t *num_items)
Get process information about processes currently using GPU.
amdsmi_status_t amdsmi_get_gpu_compute_process_info_by_pid(uint32_t pid, amdsmi_process_info_t *proc)
Get process information about a specific process.
amdsmi_status_t amdsmi_get_gpu_compute_process_gpus(uint32_t pid, uint32_t *dv_indices, uint32_t *num_devices)
Get the device indices currently being used by a process.
amdsmi_status_t amdsmi_get_lib_version(amdsmi_version_t *version)
Get the build version information for the currently running build of AMDSMI.
amdsmi_status_t amdsmi_gpu_xgmi_error_status(amdsmi_processor_handle processor_handle, amdsmi_xgmi_status_t *status)
Retrieve the XGMI error status for a device. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_reset_gpu_xgmi_error(amdsmi_processor_handle processor_handle)
Reset the XGMI error status for a device. It is not supported on virtual machine guest.
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. It is not supported on virtual machine ...
amdsmi_status_t amdsmi_get_gpu_vram_info(amdsmi_processor_handle processor_handle, amdsmi_vram_info_t *info)
Returns vram info.
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 device.
amdsmi_status_t amdsmi_get_gpu_asic_info(amdsmi_processor_handle processor_handle, amdsmi_asic_info_t *info)
Returns the ASIC information for the device.
amdsmi_status_t amdsmi_get_xgmi_info(amdsmi_processor_handle processor_handle, amdsmi_xgmi_info_t *info)
Returns XGMI information for the GPU.
amdsmi_status_t amdsmi_set_gpu_compute_partition(amdsmi_processor_handle processor_handle, amdsmi_compute_partition_type_t compute_partition)
Modifies a selected device's compute partition setting.
amdsmi_status_t amdsmi_get_gpu_compute_partition(amdsmi_processor_handle processor_handle, char *compute_partition, uint32_t len)
Retrieves the current compute partitioning for a desired device.
amdsmi_status_t amdsmi_reset_gpu_compute_partition(amdsmi_processor_handle processor_handle)
Reverts a selected device's compute partition setting back to its boot state.
amdsmi_status_t amdsmi_get_gpu_total_ecc_count(amdsmi_processor_handle processor_handle, amdsmi_error_count_t *ec)
Returns the total number of ECC errors (correctable and uncorrectable) in the given GPU....
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 device.
amdsmi_status_t amdsmi_get_fw_info(amdsmi_processor_handle processor_handle, amdsmi_fw_info_t *info)
Returns the firmware versions running on the device.
amdsmi_status_t amdsmi_get_power_info(amdsmi_processor_handle processor_handle, amdsmi_power_info_t *info)
Returns the current power and voltage of the GPU. The voltage is in units of mV and the power in unit...
amdsmi_status_t amdsmi_get_gpu_vram_usage(amdsmi_processor_handle processor_handle, amdsmi_vram_usage_t *info)
Returns the VRAM usage (both total and used memory) in MegaBytes.
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 percentag...
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....
amdsmi_status_t amdsmi_is_gpu_power_management_enabled(amdsmi_processor_handle processor_handle, bool *enabled)
Returns is power management enabled.
amdsmi_status_t amdsmi_get_gpu_memory_partition(amdsmi_processor_handle processor_handle, char *memory_partition, uint32_t len)
Retrieves the current memory partition for a desired device.
amdsmi_status_t amdsmi_reset_gpu_memory_partition(amdsmi_processor_handle processor_handle)
Reverts a selected device's memory partition setting back to its boot state.
amdsmi_status_t amdsmi_set_gpu_memory_partition(amdsmi_processor_handle processor_handle, amdsmi_memory_partition_type_t memory_partition)
Modifies a selected device's current memory partition setting.
amdsmi_status_t amdsmi_get_gpu_metrics_pcie_replay_rover_count_acc(amdsmi_processor_handle processor_handle, uint64_t *pcie_count_acc_value)
Get the 'pcie_replay_rover_count_acc' (Rollover count) from the GPU metrics associated with the devic...
amdsmi_status_t amdsmi_get_gpu_metrics_energy_acc(amdsmi_processor_handle processor_handle, uint64_t *energy_acc_value)
Get the 'energy_acc' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_curr_dclk1(amdsmi_processor_handle processor_handle, uint16_t *current_dclk_value)
Get the 'curr_dclk1' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_indep_throttle_status(amdsmi_processor_handle processor_handle, uint64_t *throttle_status_value)
Get the 'indep_throttle_status' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_temp_vrgfx(amdsmi_processor_handle processor_handle, uint16_t *vrgfx_value)
Get the 'temp_vrgfx' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_xgmi_write_data(amdsmi_processor_handle processor_handle, gpu_metric_xgmi_write_data_acc_t *xgmi_write_data_acc_value)
Get the 'xgmi_write_data' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_temp_hbm(amdsmi_processor_handle processor_handle, gpu_metric_temp_hbm_t *temp_hbm_value)
Get the 'temp_hbm' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_avg_gfx_activity(amdsmi_processor_handle processor_handle, uint16_t *gfx_activity_value)
Get the 'avg_gfx_activity' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_temp_vrsoc(amdsmi_processor_handle processor_handle, uint16_t *vrsoc_value)
Get the 'temp_vrsoc' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_avg_gfx_clock_frequency(amdsmi_processor_handle processor_handle, uint16_t *clock_frequency_value)
Get the 'avg_gfx_clock_frequency' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_avg_vclock0_frequency(amdsmi_processor_handle processor_handle, uint16_t *clock_frequency_value)
Get the 'avg_vclock0_frequency' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_curr_dclk0(amdsmi_processor_handle processor_handle, gpu_metric_curr_dclk0_t *current_dclk_value)
Get the 'curr_dclk0' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_gfxclk_lock_status(amdsmi_processor_handle processor_handle, uint32_t *gfxclk_lock_status_value)
Get the 'gfxclk_lock_status' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_pcie_replay_count_acc(amdsmi_processor_handle processor_handle, uint64_t *pcie_count_acc_value)
Get the 'pcie_replay_count_acc' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_curr_gfxclk(amdsmi_processor_handle processor_handle, gpu_metric_curr_gfxclk_t *current_gfxclk_value)
Get the 'curr_gfxclk' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_pcie_l0_recov_count_acc(amdsmi_processor_handle processor_handle, uint64_t *pcie_count_acc_value)
Get the 'pcie_l0_recov_count_acc' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_temp_edge(amdsmi_processor_handle processor_handle, uint16_t *edge_value)
Get the 'temp_edge' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_pcie_link_width(amdsmi_processor_handle processor_handle, uint16_t *pcie_link_width_value)
Get the 'pcie_link_width' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_throttle_status(amdsmi_processor_handle processor_handle, uint32_t *throttle_status_value)
Get the 'throttle_status' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_volt_mem(amdsmi_processor_handle processor_handle, uint16_t *voltage_value)
Get the 'volt_mem' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_firmware_timestamp(amdsmi_processor_handle processor_handle, uint64_t *firmware_timestamp_value)
Get the 'firmware_timestamp' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_curr_socclk(amdsmi_processor_handle processor_handle, gpu_metric_curr_socclk_t *current_socclk_value)
Get the 'curr_socclk' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_xgmi_link_speed(amdsmi_processor_handle processor_handle, uint16_t *xgmi_link_speed_value)
Get the 'xgmi_link_speed' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_xcd_counter(amdsmi_processor_handle processor_handle, uint16_t *xcd_counter_value)
Get the 'xcd_counter' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_pcie_bandwidth_inst(amdsmi_processor_handle processor_handle, uint64_t *pcie_bandwidth_inst_value)
Get the 'pcie_bandwidth_inst' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_avg_dclock0_frequency(amdsmi_processor_handle processor_handle, uint16_t *clock_frequency_value)
Get the 'avg_dclock0_frequency' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_curr_vclk0(amdsmi_processor_handle processor_handle, gpu_metric_curr_vclk0_t *current_vclk_value)
Get the 'curr_vclk0' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_gfx_activity_acc(amdsmi_processor_handle processor_handle, uint32_t *gfx_activity_acc_value)
Get the 'gfx_activity_acc' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_temp_mem(amdsmi_processor_handle processor_handle, uint16_t *mem_value)
Get the 'temp_mem' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_header_info(amdsmi_processor_handle processor_handle, amd_metrics_table_header_t *header_value)
Get the 'metrics_header_info' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_volt_soc(amdsmi_processor_handle processor_handle, uint16_t *voltage_value)
Get the 'volt_soc' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_pcie_bandwidth_acc(amdsmi_processor_handle processor_handle, uint64_t *pcie_bandwidth_acc_value)
Get the 'pcie_bandwidth_acc' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_log(amdsmi_processor_handle processor_handle)
Get the log from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_curr_uclk(amdsmi_processor_handle processor_handle, uint16_t *uclk_value)
Get the 'curr_uclk' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_curr_vclk1(amdsmi_processor_handle processor_handle, uint16_t *current_vclk_value)
Get the 'curr_vclk1' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_volt_gfx(amdsmi_processor_handle processor_handle, uint16_t *voltage_value)
Get the 'volt_gfx' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_temp_hotspot(amdsmi_processor_handle processor_handle, uint16_t *hotspot_value)
Get the 'temp_hotspot' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_temp_vrmem(amdsmi_processor_handle processor_handle, uint16_t *vrmem_value)
Get the 'temp_vrmem' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_pcie_link_speed(amdsmi_processor_handle processor_handle, uint16_t *pcie_link_speed_value)
Get the 'pcie_link_speed' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_avg_mm_activity(amdsmi_processor_handle processor_handle, uint16_t *mm_activity_value)
Get the 'avg_mm_activity' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_avg_soc_clock_frequency(amdsmi_processor_handle processor_handle, uint16_t *clock_frequency_value)
Get the 'avg_soc_clock_frequency' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_xgmi_read_data(amdsmi_processor_handle processor_handle, gpu_metric_xgmi_read_data_acc_t *xgmi_read_data_acc_value)
Get the 'xgmi_read_data' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_xgmi_link_width(amdsmi_processor_handle processor_handle, uint16_t *xgmi_link_width_value)
Get the 'xgmi_link_width' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_avg_socket_power(amdsmi_processor_handle processor_handle, uint16_t *socket_power_value)
Get the 'avg_socket_power' from the GPU metrics associated with the device.
uint16_t gpu_metric_temp_hbm_t[AMDSMI_NUM_HBM_INSTANCES]
Definition: amdsmi.h:4255
amdsmi_status_t amdsmi_get_gpu_metrics_avg_dclock1_frequency(amdsmi_processor_handle processor_handle, uint16_t *clock_frequency_value)
Get the 'avg_dclock1_frequency' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_curr_socket_power(amdsmi_processor_handle processor_handle, uint16_t *socket_power_value)
Get the 'curr_socket_power' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_avg_uclock_frequency(amdsmi_processor_handle processor_handle, uint16_t *clock_frequency_value)
Get the 'avg_uclock_frequency' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_avg_vclock1_frequency(amdsmi_processor_handle processor_handle, uint16_t *clock_frequency_value)
Get the 'avg_vclock1_frequency' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_curr_fan_speed(amdsmi_processor_handle processor_handle, uint16_t *fan_speed_value)
Get the 'curr_fan_speed' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_vcn_activity(amdsmi_processor_handle processor_handle, gpu_metric_vcn_activity_t *vcn_activity_value)
Get the 'vcn_activity' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_mem_activity_acc(amdsmi_processor_handle processor_handle, uint32_t *mem_activity_acc_value)
Get the 'mem_activity_acc' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_avg_umc_activity(amdsmi_processor_handle processor_handle, uint16_t *umc_activity_value)
Get the 'avg_umc_activity' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_metrics_system_clock_counter(amdsmi_processor_handle processor_handle, uint64_t *system_clock_counter_value)
Get the 'system_clock_counter' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_process_list(amdsmi_processor_handle processor_handle, uint32_t *max_processes, amdsmi_process_handle_t *list)
Returns the list of processes running on a given GPU including itself.
amdsmi_status_t amdsmi_get_gpu_process_info(amdsmi_processor_handle processor_handle, amdsmi_process_handle_t process, amdsmi_proc_info_t *info)
Returns the process information of a given process. Engine usage show how much time the process spend...
amdsmi_status_t amdsmi_get_gpu_driver_info(amdsmi_processor_handle processor_handle, amdsmi_driver_info_t *info)
Returns the driver version information.
The following structures hold the gpu metrics values for a device.
Definition: amdsmi.h:1130
Definition: amdsmi.h:495
Definition: amdsmi.h:435
Definition: amdsmi.h:520
Definition: amdsmi.h:539
Definition: amdsmi.h:718
uint64_t time_enabled
Definition: amdsmi.h:720
uint64_t time_running
Definition: amdsmi.h:722
uint64_t value
Counter value.
Definition: amdsmi.h:719
Definition: amdsmi.h:514
Definition: amdsmi.h:547
This structure holds error counts.
Definition: amdsmi.h:1348
uint64_t uncorrectable_count
Accumulated uncorrectable errors.
Definition: amdsmi.h:1350
uint64_t correctable_count
Accumulated correctable errors.
Definition: amdsmi.h:1349
Definition: amdsmi.h:750
amdsmi_processor_handle processor_handle
Handler of device that corresponds to the event.
Definition: amdsmi.h:751
amdsmi_evt_notification_type_t event
Event type.
Definition: amdsmi.h:752
This structure holds 2 amdsmi_range_t's, one for frequency and one for voltage. These 2 ranges indica...
Definition: amdsmi.h:1090
amdsmi_range_t freq_range
The frequency range for this VDDC Curve point.
Definition: amdsmi.h:1091
amdsmi_range_t volt_range
The voltage range for this VDDC Curve point.
Definition: amdsmi.h:1092
This structure holds information about clock frequencies.
Definition: amdsmi.h:1025
uint32_t current
Definition: amdsmi.h:1039
uint32_t num_supported
Definition: amdsmi.h:1034
bool has_deep_sleep
Definition: amdsmi.h:1029
Definition: amdsmi.h:428
Definition: amdsmi.h:487
Definition: amdsmi.h:485
Definition: amdsmi.h:474
Definition: amdsmi.h:472
Definition: amdsmi.h:1175
This structure holds the name value pairs.
Definition: amdsmi.h:1319
uint64_t value
Use uint64_t to make it universal.
Definition: amdsmi.h:1321
This structure represents a point on the frequency-voltage plane.
Definition: amdsmi.h:1080
uint64_t frequency
Frequency coordinate (in Hz)
Definition: amdsmi.h:1081
uint64_t voltage
Voltage coordinate (in mV)
Definition: amdsmi.h:1082
Definition: amdsmi.h:1098
This structure holds the frequency-voltage values for a device.
Definition: amdsmi.h:1109
amdsmi_range_t curr_mclk_range
(upper bound only)
Definition: amdsmi.h:1111
amdsmi_range_t mclk_freq_limits
The range possible of MCLK values.
Definition: amdsmi.h:1114
uint32_t num_regions
The number of voltage curve regions.
Definition: amdsmi.h:1120
amdsmi_range_t curr_sclk_range
The current SCLK frequency range.
Definition: amdsmi.h:1110
amdsmi_range_t sclk_freq_limits
The range possible of SCLK values.
Definition: amdsmi.h:1113
amdsmi_od_volt_curve_t curve
The current voltage curve.
Definition: amdsmi.h:1119
This structure holds information about the possible PCIe bandwidths. Specifically,...
Definition: amdsmi.h:1053
amdsmi_frequencies_t transfer_rate
Definition: amdsmi.h:1057
This structure holds pcie info.
Definition: amdsmi.h:1367
Definition: amdsmi.h:444
Definition: amdsmi.h:529
This structure contains information about which power profiles are supported by the system for a give...
Definition: amdsmi.h:1005
amdsmi_bit_field_t available_profiles
Definition: amdsmi.h:1009
amdsmi_power_profile_preset_masks_t current
Definition: amdsmi.h:1014
uint32_t num_profiles
Definition: amdsmi.h:1019
Definition: amdsmi.h:560
Definition: amdsmi.h:565
Definition: amdsmi.h:556
This structure contains information specific to a process.
Definition: amdsmi.h:1378
uint64_t sdma_usage
SDMA usage in microseconds.
Definition: amdsmi.h:1382
uint32_t process_id
Process ID.
Definition: amdsmi.h:1379
uint32_t cu_occupancy
Compute Unit usage in percent.
Definition: amdsmi.h:1383
uint32_t pasid
PASID.
Definition: amdsmi.h:1380
uint64_t vram_usage
VRAM usage.
Definition: amdsmi.h:1381
This structure represents a range (e.g., frequencies or voltages).
Definition: amdsmi.h:408
uint64_t lower_bound
Lower bound of range.
Definition: amdsmi.h:409
uint64_t upper_bound
Upper bound of range.
Definition: amdsmi.h:410
This structure holds ras feature.
Definition: amdsmi.h:1338
uint32_t ecc_correction_schema_flag
ecc_correction_schema mask
Definition: amdsmi.h:1342
Reserved Memory Page Record.
Definition: amdsmi.h:989
uint64_t page_size
Page size.
Definition: amdsmi.h:991
amdsmi_memory_page_status_t status
Page "reserved" status.
Definition: amdsmi.h:992
uint64_t page_address
Start address of page.
Definition: amdsmi.h:990
The utilization counter data.
Definition: amdsmi.h:981
amdsmi_utilization_counter_type_t type
Utilization counter type.
Definition: amdsmi.h:982
uint64_t value
Utilization counter value.
Definition: amdsmi.h:983
Definition: amdsmi.h:453
This structure holds version information.
Definition: amdsmi.h:1069
uint32_t minor
Minor version.
Definition: amdsmi.h:1072
uint32_t major
Major version.
Definition: amdsmi.h:1071
const char * build
Full Build version string.
Definition: amdsmi.h:1074
uint32_t year
Last 2 digits of the Year released.
Definition: amdsmi.h:1070
uint32_t release
Patch, build or stepping version.
Definition: amdsmi.h:1073
Definition: amdsmi.h:507
Definition: amdsmi.h:422
Definition: amdsmi.h:414
Definition: amdsmi.h:434