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 {
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),
75  AMDSMI_INIT_AMD_APUS = (AMDSMI_INIT_AMD_CPUS | AMDSMI_INIT_AMD_GPUS) // Default option
77 
78 /* Maximum size definitions AMDSMI */
79 #define AMDSMI_MAX_MM_IP_COUNT 8
80 #define AMDSMI_MAX_DATE_LENGTH 32
81 #define AMDSMI_MAX_STRING_LENGTH 64
82 #define AMDSMI_NORMAL_STRING_LENGTH 32
83 #define AMDSMI_MAX_DEVICES 32
84 #define AMDSMI_MAX_NAME 32
85 #define AMDSMI_MAX_DRIVER_VERSION_LENGTH 80
86 #define AMDSMI_256_LENGTH 256
87 #define AMDSMI_MAX_CONTAINER_TYPE 2
88 #define AMDSMI_MAX_CACHE_TYPES 10
89 #define AMDSMI_MAX_NUM_XGMI_PHYSICAL_LINK 64
90 
91 #define AMDSMI_GPU_UUID_SIZE 38
92 
100 #define CENTRIGRADE_TO_MILLI_CENTIGRADE 1000
101 
105 #define AMDSMI_NUM_HBM_INSTANCES 4
106 
110 #define AMDSMI_MAX_NUM_VCN 4
111 
115 #define AMDSMI_MAX_NUM_CLKS 4
116 
120 #define AMDSMI_MAX_NUM_XGMI_LINKS 8
121 
125 #define AMDSMI_MAX_NUM_GFX_CLKS 8
126 
130 #define AMDSMI_MAX_AID 4
131 
135 #define AMDSMI_MAX_ENGINES 8
136 
140 #define AMDSMI_MAX_NUM_JPEG 32
141 
142 /* string format */
143 #define AMDSMI_TIME_FORMAT "%02d:%02d:%02d.%03d"
144 #define AMDSMI_DATE_FORMAT "%04d-%02d-%02d:%02d:%02d:%02d.%03d"
145 
151 #define AMDSMI_LIB_VERSION_YEAR 24
152 
154 #define AMDSMI_LIB_VERSION_MAJOR 6
155 
157 #define AMDSMI_LIB_VERSION_MINOR 3
158 
160 #define AMDSMI_LIB_VERSION_RELEASE 0
161 
162 #define AMDSMI_LIB_VERSION_CREATE_STRING(YEAR, MAJOR, MINOR, RELEASE) (#YEAR "." #MAJOR "." #MINOR "." #RELEASE)
163 #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)
164 #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)
165 
166 typedef enum {
167  AMDSMI_MM_UVD,
168  AMDSMI_MM_VCE,
169  AMDSMI_MM_VCN,
170  AMDSMI_MM__MAX
171 } amdsmi_mm_ip_t;
172 
173 typedef enum {
174  AMDSMI_CONTAINER_LXC,
175  AMDSMI_CONTAINER_DOCKER,
176 } amdsmi_container_types_t;
177 
180 typedef void *amdsmi_socket_handle;
181 #ifdef ENABLE_ESMI_LIB
182 typedef void *amdsmi_cpusocket_handle;
183 #endif
184 
191 typedef enum {
192  AMDSMI_PROCESSOR_TYPE_UNKNOWN = 0,
193  AMDSMI_PROCESSOR_TYPE_AMD_GPU,
194  AMDSMI_PROCESSOR_TYPE_AMD_CPU,
195  AMDSMI_PROCESSOR_TYPE_NON_AMD_GPU,
196  AMDSMI_PROCESSOR_TYPE_NON_AMD_CPU,
197  AMDSMI_PROCESSOR_TYPE_AMD_CPU_CORE,
198  AMDSMI_PROCESSOR_TYPE_AMD_APU
200 
204 // Please avoid status codes that are multiples of 256 (256, 512, etc..)
205 // Return values in the shell get modulo 256 applied, meaning any multiple of 256 ends up as 0
206 typedef enum {
208  // Library usage errors
228  // Device related errors
234  // Data and size errors
239  //esmi errors
252 
253  // General errors
254  AMDSMI_STATUS_MAP_ERROR = 0xFFFFFFFE,
257 
261 typedef enum {
263  AMDSMI_CLK_TYPE_FIRST = AMDSMI_CLK_TYPE_SYS,
264  AMDSMI_CLK_TYPE_GFX = AMDSMI_CLK_TYPE_SYS,
268  AMDSMI_CLK_TYPE_SOC,
269  AMDSMI_CLK_TYPE_MEM,
270  AMDSMI_CLK_TYPE_PCIE,
271  AMDSMI_CLK_TYPE_VCLK0,
272  AMDSMI_CLK_TYPE_VCLK1,
273  AMDSMI_CLK_TYPE_DCLK0,
274  AMDSMI_CLK_TYPE_DCLK1,
275  AMDSMI_CLK_TYPE__MAX = AMDSMI_CLK_TYPE_DCLK1
277 
282 typedef enum {
283  AMDSMI_COMPUTE_PARTITION_INVALID = 0,
295 
300 typedef enum {
301  AMDSMI_MEMORY_PARTITION_UNKNOWN = 0,
316 
321 typedef enum {
322  AMDSMI_TEMPERATURE_TYPE_EDGE,
323  AMDSMI_TEMPERATURE_TYPE_FIRST = AMDSMI_TEMPERATURE_TYPE_EDGE,
324  AMDSMI_TEMPERATURE_TYPE_HOTSPOT,
325  AMDSMI_TEMPERATURE_TYPE_JUNCTION = AMDSMI_TEMPERATURE_TYPE_HOTSPOT,
326  AMDSMI_TEMPERATURE_TYPE_VRAM,
327  AMDSMI_TEMPERATURE_TYPE_HBM_0,
328  AMDSMI_TEMPERATURE_TYPE_HBM_1,
329  AMDSMI_TEMPERATURE_TYPE_HBM_2,
330  AMDSMI_TEMPERATURE_TYPE_HBM_3,
331  AMDSMI_TEMPERATURE_TYPE_PLX,
332  AMDSMI_TEMPERATURE_TYPE__MAX = AMDSMI_TEMPERATURE_TYPE_PLX
334 
339 typedef enum {
340  AMDSMI_FW_ID_SMU = 1,
341  AMDSMI_FW_ID_FIRST = AMDSMI_FW_ID_SMU,
342  AMDSMI_FW_ID_CP_CE,
343  AMDSMI_FW_ID_CP_PFP,
344  AMDSMI_FW_ID_CP_ME,
345  AMDSMI_FW_ID_CP_MEC_JT1,
346  AMDSMI_FW_ID_CP_MEC_JT2,
347  AMDSMI_FW_ID_CP_MEC1,
348  AMDSMI_FW_ID_CP_MEC2,
349  AMDSMI_FW_ID_RLC,
350  AMDSMI_FW_ID_SDMA0,
351  AMDSMI_FW_ID_SDMA1,
352  AMDSMI_FW_ID_SDMA2,
353  AMDSMI_FW_ID_SDMA3,
354  AMDSMI_FW_ID_SDMA4,
355  AMDSMI_FW_ID_SDMA5,
356  AMDSMI_FW_ID_SDMA6,
357  AMDSMI_FW_ID_SDMA7,
358  AMDSMI_FW_ID_VCN,
359  AMDSMI_FW_ID_UVD,
360  AMDSMI_FW_ID_VCE,
361  AMDSMI_FW_ID_ISP,
362  AMDSMI_FW_ID_DMCU_ERAM, /*eRAM*/
363  AMDSMI_FW_ID_DMCU_ISR, /*ISR*/
364  AMDSMI_FW_ID_RLC_RESTORE_LIST_GPM_MEM,
365  AMDSMI_FW_ID_RLC_RESTORE_LIST_SRM_MEM,
366  AMDSMI_FW_ID_RLC_RESTORE_LIST_CNTL,
367  AMDSMI_FW_ID_RLC_V,
368  AMDSMI_FW_ID_MMSCH,
369  AMDSMI_FW_ID_PSP_SYSDRV,
370  AMDSMI_FW_ID_PSP_SOSDRV,
371  AMDSMI_FW_ID_PSP_TOC,
372  AMDSMI_FW_ID_PSP_KEYDB,
373  AMDSMI_FW_ID_DFC,
374  AMDSMI_FW_ID_PSP_SPL,
375  AMDSMI_FW_ID_DRV_CAP,
376  AMDSMI_FW_ID_MC,
377  AMDSMI_FW_ID_PSP_BL,
378  AMDSMI_FW_ID_CP_PM4,
379  AMDSMI_FW_ID_RLC_P,
380  AMDSMI_FW_ID_SEC_POLICY_STAGE2,
381  AMDSMI_FW_ID_REG_ACCESS_WHITELIST,
382  AMDSMI_FW_ID_IMU_DRAM,
383  AMDSMI_FW_ID_IMU_IRAM,
384  AMDSMI_FW_ID_SDMA_TH0,
385  AMDSMI_FW_ID_SDMA_TH1,
386  AMDSMI_FW_ID_CP_MES,
387  AMDSMI_FW_ID_MES_KIQ,
388  AMDSMI_FW_ID_MES_STACK,
389  AMDSMI_FW_ID_MES_THREAD1,
390  AMDSMI_FW_ID_MES_THREAD1_STACK,
391  AMDSMI_FW_ID_RLX6,
392  AMDSMI_FW_ID_RLX6_DRAM_BOOT,
393  AMDSMI_FW_ID_RS64_ME,
394  AMDSMI_FW_ID_RS64_ME_P0_DATA,
395  AMDSMI_FW_ID_RS64_ME_P1_DATA,
396  AMDSMI_FW_ID_RS64_PFP,
397  AMDSMI_FW_ID_RS64_PFP_P0_DATA,
398  AMDSMI_FW_ID_RS64_PFP_P1_DATA,
399  AMDSMI_FW_ID_RS64_MEC,
400  AMDSMI_FW_ID_RS64_MEC_P0_DATA,
401  AMDSMI_FW_ID_RS64_MEC_P1_DATA,
402  AMDSMI_FW_ID_RS64_MEC_P2_DATA,
403  AMDSMI_FW_ID_RS64_MEC_P3_DATA,
404  AMDSMI_FW_ID_PPTABLE,
405  AMDSMI_FW_ID_PSP_SOC,
406  AMDSMI_FW_ID_PSP_DBG,
407  AMDSMI_FW_ID_PSP_INTF,
408  AMDSMI_FW_ID_RLX6_CORE1,
409  AMDSMI_FW_ID_RLX6_DRAM_BOOT_CORE1,
410  AMDSMI_FW_ID_RLCV_LX7,
411  AMDSMI_FW_ID_RLC_SAVE_RESTORE_LIST,
412  AMDSMI_FW_ID_ASD,
413  AMDSMI_FW_ID_TA_RAS,
414  AMDSMI_FW_ID_TA_XGMI,
415  AMDSMI_FW_ID_RLC_SRLG,
416  AMDSMI_FW_ID_RLC_SRLS,
417  AMDSMI_FW_ID_PM,
418  AMDSMI_FW_ID_DMCU,
419  AMDSMI_FW_ID__MAX
421 
422 typedef enum {
423  AMDSMI_VRAM_TYPE_UNKNOWN = 0,
424  // HBM
425  AMDSMI_VRAM_TYPE_HBM = 1,
426  AMDSMI_VRAM_TYPE_HBM2 = 2,
427  AMDSMI_VRAM_TYPE_HBM2E = 3,
428  AMDSMI_VRAM_TYPE_HBM3 = 4,
429  // DDR
430  AMDSMI_VRAM_TYPE_DDR2 = 10,
431  AMDSMI_VRAM_TYPE_DDR3 = 11,
432  AMDSMI_VRAM_TYPE_DDR4 = 12,
433  // GDDR
434  AMDSMI_VRAM_TYPE_GDDR1 = 17,
435  AMDSMI_VRAM_TYPE_GDDR2 = 18,
436  AMDSMI_VRAM_TYPE_GDDR3 = 19,
437  AMDSMI_VRAM_TYPE_GDDR4 = 20,
438  AMDSMI_VRAM_TYPE_GDDR5 = 21,
439  AMDSMI_VRAM_TYPE_GDDR6 = 22,
440  AMDSMI_VRAM_TYPE_GDDR7 = 23,
441  AMDSMI_VRAM_TYPE__MAX = AMDSMI_VRAM_TYPE_GDDR7
442 } amdsmi_vram_type_t;
443 
444 typedef enum {
445  AMDSMI_VRAM_VENDOR__PLACEHOLDER0,
446  AMDSMI_VRAM_VENDOR__SAMSUNG,
447  AMDSMI_VRAM_VENDOR__INFINEON,
448  AMDSMI_VRAM_VENDOR__ELPIDA,
449  AMDSMI_VRAM_VENDOR__ETRON,
450  AMDSMI_VRAM_VENDOR__NANYA,
451  AMDSMI_VRAM_VENDOR__HYNIX,
452  AMDSMI_VRAM_VENDOR__MOSEL,
453  AMDSMI_VRAM_VENDOR__WINBOND,
454  AMDSMI_VRAM_VENDOR__ESMT,
455  AMDSMI_VRAM_VENDOR__PLACEHOLDER1,
456  AMDSMI_VRAM_VENDOR__PLACEHOLDER2,
457  AMDSMI_VRAM_VENDOR__PLACEHOLDER3,
458  AMDSMI_VRAM_VENDOR__PLACEHOLDER4,
459  AMDSMI_VRAM_VENDOR__PLACEHOLDER5,
460  AMDSMI_VRAM_VENDOR__MICRON,
461 } amdsmi_vram_vendor_type_t;
462 
466 typedef struct {
467  uint64_t lower_bound;
468  uint64_t upper_bound;
469  uint64_t reserved[2];
471 
472 typedef struct {
473  uint8_t xgmi_lanes;
474  uint64_t xgmi_hive_id;
475  uint64_t xgmi_node_id;
476  uint32_t index;
477  uint32_t reserved[9];
479 
480 typedef struct {
481  uint32_t vram_total;
482  uint32_t vram_used;
483  uint32_t reserved[2];
485 
486 typedef struct {
487  amdsmi_range_t supported_freq_range;
488  amdsmi_range_t current_freq_range;
489  uint32_t reserved[8];
491 
492 typedef union {
493  struct {
494  uint64_t function_number : 3;
495  uint64_t device_number : 5;
496  uint64_t bus_number : 8;
497  uint64_t domain_number : 48;
498  };
499  uint64_t as_uint;
500 } amdsmi_bdf_t;
501 
502 typedef enum {
503  AMDSMI_CARD_FORM_FACTOR_PCIE,
504  AMDSMI_CARD_FORM_FACTOR_OAM,
505  AMDSMI_CARD_FORM_FACTOR_CEM,
506  AMDSMI_CARD_FORM_FACTOR_UNKNOWN
507 } amdsmi_card_form_factor_t;
508 
509 typedef struct {
510  struct pcie_static_ {
511  uint16_t max_pcie_width;
512  uint32_t max_pcie_speed;
514  amdsmi_card_form_factor_t slot_type;
515  uint64_t reserved[10];
516  } pcie_static;
517  struct pcie_metric_ {
518  uint16_t pcie_width;
519  uint32_t pcie_speed;
520  uint32_t pcie_bandwidth;
521  uint64_t pcie_replay_count;
526  uint64_t reserved[13];
527  } pcie_metric;
528  uint64_t reserved[32];
530 
531 typedef struct {
532  uint64_t power_cap;
533  uint64_t default_power_cap;
534  uint64_t dpm_cap;
535  uint64_t min_power_cap;
536  uint64_t max_power_cap;
537  uint64_t reserved[3];
539 
540 typedef struct {
541  char name[AMDSMI_MAX_STRING_LENGTH];
542  char build_date[AMDSMI_MAX_DATE_LENGTH];
543  char part_number[AMDSMI_MAX_STRING_LENGTH];
544  char version[AMDSMI_NORMAL_STRING_LENGTH];
545  uint32_t reserved[16];
547 
551 typedef enum {
552  AMDSMI_CACHE_PROPERTY_ENABLED = 0x00000001,
553  AMDSMI_CACHE_PROPERTY_DATA_CACHE = 0x00000002,
554  AMDSMI_CACHE_PROPERTY_INST_CACHE = 0x00000004,
555  AMDSMI_CACHE_PROPERTY_CPU_CACHE = 0x00000008,
556  AMDSMI_CACHE_PROPERTY_SIMD_CACHE = 0x00000010,
558 
559 typedef struct {
560  uint32_t num_cache_types;
561  struct cache_ {
562  uint32_t cache_properties; // amdsmi_cache_property_type_t which is a bitmask
563  uint32_t cache_size; /* In KB */
564  uint32_t cache_level;
565  uint32_t max_num_cu_shared; /* Indicates how many Compute Units share this cache instance */
566  uint32_t num_cache_instance; /* total number of instance of this cache type */
567  uint32_t reserved[3];
568  } cache[AMDSMI_MAX_CACHE_TYPES];
569  uint32_t reserved[15];
571 
572 typedef struct {
573  uint8_t num_fw_info;
574  struct fw_info_list_ {
575  amdsmi_fw_block_t fw_id;
576  uint64_t fw_version;
577  uint64_t reserved[2];
578  } fw_info_list[AMDSMI_FW_ID__MAX];
579  uint32_t reserved[7];
581 
582 typedef struct {
583  char market_name[AMDSMI_256_LENGTH];
584  uint32_t vendor_id; //< Use 32 bit to be compatible with other platform.
585  char vendor_name[AMDSMI_MAX_STRING_LENGTH];
586  uint32_t subvendor_id; //< The subsystem vendor id
587  uint64_t device_id; //< The device id of a GPU
588  uint32_t rev_id;
589  char asic_serial[AMDSMI_NORMAL_STRING_LENGTH];
590  uint32_t oam_id; //< 0xFFFF if not supported
591  uint32_t reserved[18];
593 
594 typedef enum {
595  AMDSMI_LINK_TYPE_PCIE,
596  AMDSMI_LINK_TYPE_XGMI,
597  AMDSMI_LINK_TYPE_NOT_APPLICABLE,
598  AMDSMI_LINK_TYPE_UNKNOWN
599 } amdsmi_link_type_t;
600 
601 typedef struct {
602  uint32_t num_links;
603  struct _links {
604  amdsmi_bdf_t bdf;
605  uint32_t bit_rate;
606  uint32_t max_bandwidth;
607  amdsmi_link_type_t link_type;
608  uint64_t read;
609  uint64_t write;
610  uint64_t reserved[2];
611  } links[AMDSMI_MAX_NUM_XGMI_PHYSICAL_LINK];
612  uint64_t reserved[7];
614 
615 typedef struct {
616  amdsmi_vram_type_t vram_type;
617  amdsmi_vram_vendor_type_t vram_vendor;
618  uint64_t vram_size;
619  uint64_t reserved[6];
621 
622 
623 typedef struct {
624  char driver_version[AMDSMI_MAX_STRING_LENGTH];
625  char driver_date[AMDSMI_MAX_STRING_LENGTH];
626  char driver_name[AMDSMI_MAX_STRING_LENGTH];
628 
629 typedef struct {
630  char model_number[AMDSMI_256_LENGTH];
631  char product_serial[AMDSMI_NORMAL_STRING_LENGTH];
632  char fru_id[AMDSMI_NORMAL_STRING_LENGTH];
633  char product_name[AMDSMI_256_LENGTH];
634  char manufacturer_name[AMDSMI_MAX_STRING_LENGTH];
635  uint32_t reserved[32];
637 
638 typedef struct {
639  uint32_t current_socket_power;
640  uint32_t average_socket_power;
641  uint32_t gfx_voltage; // GFX voltage measurement in mV
642  uint32_t soc_voltage; // SOC voltage measurement in mV
643  uint32_t mem_voltage; // MEM voltage measurement in mV
644  uint32_t power_limit; // The power limit;
645  uint32_t reserved[11];
647 
648 typedef struct {
649  uint32_t clk;
650  uint32_t min_clk;
651  uint32_t max_clk;
652  uint8_t clk_locked;
653  uint8_t clk_deep_sleep;
654  uint32_t reserved[4];
656 
663 typedef struct {
664  uint32_t gfx_activity;
665  uint32_t umc_activity;
666  uint32_t mm_activity;
667  uint32_t reserved[13];
669 typedef uint32_t amdsmi_process_handle_t;
670 
671 
672 typedef struct {
673  char name[AMDSMI_NORMAL_STRING_LENGTH];
674  amdsmi_process_handle_t pid;
675  uint64_t mem;
676  struct engine_usage_ {
677  uint64_t gfx;
678  uint64_t enc;
679  uint32_t reserved[12];
680  } engine_usage;
681  struct memory_usage_ {
682  uint64_t gtt_mem;
683  uint64_t cpu_mem;
684  uint64_t vram_mem;
685  uint32_t reserved[10];
686  } memory_usage;
687  char container_name[AMDSMI_NORMAL_STRING_LENGTH];
688  uint32_t reserved[4];
690 
691 
693 #define AMDSMI_MAX_NUM_FREQUENCIES 33
694 
697 #define AMDSMI_MAX_FAN_SPEED 255
698 
700 #define AMDSMI_NUM_VOLTAGE_CURVE_POINTS 3
704 typedef enum {
706  AMDSMI_DEV_PERF_LEVEL_FIRST = AMDSMI_DEV_PERF_LEVEL_AUTO,
707 
722 
723  AMDSMI_DEV_PERF_LEVEL_LAST = AMDSMI_DEV_PERF_LEVEL_DETERMINISM,
724 
727 
740 typedef uintptr_t amdsmi_event_handle_t;
741 
748 typedef enum {
751  AMDSMI_EVNT_GRP_INVALID = 0xFFFFFFFF
753 
760 typedef enum {
761  AMDSMI_EVNT_FIRST = AMDSMI_EVNT_GRP_XGMI,
762 
763  AMDSMI_EVNT_XGMI_FIRST = AMDSMI_EVNT_GRP_XGMI,
764  AMDSMI_EVNT_XGMI_0_NOP_TX = AMDSMI_EVNT_XGMI_FIRST,
769 
782  // ie, Throughput = BEATS/time_running 10^9 bytes/sec
792 
793  AMDSMI_EVNT_XGMI_LAST = AMDSMI_EVNT_XGMI_1_BEATS_TX, // 5
794 
795  AMDSMI_EVNT_XGMI_DATA_OUT_FIRST = AMDSMI_EVNT_GRP_XGMI_DATA_OUT, // 10
796 
797  /*
798  * @brief Events in the AMDSMI_EVNT_GRP_XGMI_DATA_OUT group measure
799  * the number of beats sent on an XGMI link. Each beat represents
800  * 32 bytes. AMDSMI_EVNT_XGMI_DATA_OUT_n represents the number of
801  * outbound beats (each representing 32 bytes) on link n.<br><br>
802  *
803  * XGMI throughput can be calculated by multiplying a event
804  * such as ::AMDSMI_EVNT_XGMI_DATA_OUT_n by 32 and dividing by
805  * the time for which event collection occurred,
806  * ::amdsmi_counter_value_t.time_running (which is in nanoseconds). To get
807  * bytes per second, multiply this value by 10<sup>9</sup>.<br>
808  * <br>
809  * Throughput = BEATS/time_running * 10<sup>9</sup> (bytes/second)<br>
810  */
811  // ie, Throughput = BEATS/time_running 10^9 bytes/sec
812  AMDSMI_EVNT_XGMI_DATA_OUT_0 = AMDSMI_EVNT_XGMI_DATA_OUT_FIRST,
818  AMDSMI_EVNT_XGMI_DATA_OUT_LAST = AMDSMI_EVNT_XGMI_DATA_OUT_5,
819 
820  AMDSMI_EVNT_LAST = AMDSMI_EVNT_XGMI_DATA_OUT_LAST,
822 
826 typedef enum {
831 
835 typedef struct {
836  uint64_t value;
837  uint64_t time_enabled;
839  uint64_t time_running;
842 
846 typedef enum {
849  AMDSMI_EVT_NOTIF_FIRST = AMDSMI_EVT_NOTIF_VMFAULT,
850  AMDSMI_EVT_NOTIF_THERMAL_THROTTLE = 2,
851  AMDSMI_EVT_NOTIF_GPU_PRE_RESET = 3,
852  AMDSMI_EVT_NOTIF_GPU_POST_RESET = 4,
853  AMDSMI_EVT_NOTIF_RING_HANG = 5,
854 
855  AMDSMI_EVT_NOTIF_LAST = AMDSMI_EVT_NOTIF_RING_HANG
857 
861 #define AMDSMI_EVENT_MASK_FROM_INDEX(i) (1ULL << ((i) - 1))
862 
864 #define MAX_EVENT_NOTIFICATION_MSG_SIZE 64
865 
869 typedef struct {
874 
880 typedef enum {
882  AMDSMI_TEMP_FIRST = AMDSMI_TEMP_CURRENT,
883 
914 
915  AMDSMI_TEMP_LAST = AMDSMI_TEMP_HIGHEST
917 
923 typedef enum {
925 
926  AMDSMI_VOLT_FIRST = AMDSMI_VOLT_CURRENT,
934 
935  AMDSMI_VOLT_LAST = AMDSMI_VOLT_HIGHEST
937 
942 typedef enum {
943  AMDSMI_VOLT_TYPE_FIRST = 0,
944 
945  AMDSMI_VOLT_TYPE_VDDGFX = AMDSMI_VOLT_TYPE_FIRST,
947  AMDSMI_VOLT_TYPE_LAST = AMDSMI_VOLT_TYPE_VDDGFX,
948  AMDSMI_VOLT_TYPE_INVALID = 0xFFFFFFFF
950 
957 typedef enum {
963 
965  AMDSMI_PWR_PROF_PRST_3D_FULL_SCR_MASK = 0x20,
968 
970  AMDSMI_PWR_PROF_PRST_INVALID = 0xFFFFFFFFFFFFFFFF
972 
976 typedef enum {
977  AMDSMI_GPU_BLOCK_INVALID = 0x0000000000000000,
979  AMDSMI_GPU_BLOCK_FIRST = 0x0000000000000001,
980 
981  AMDSMI_GPU_BLOCK_UMC = AMDSMI_GPU_BLOCK_FIRST,
982  AMDSMI_GPU_BLOCK_SDMA = 0x0000000000000002,
983  AMDSMI_GPU_BLOCK_GFX = 0x0000000000000004,
984  AMDSMI_GPU_BLOCK_MMHUB = 0x0000000000000008,
985  AMDSMI_GPU_BLOCK_ATHUB = 0x0000000000000010,
986  AMDSMI_GPU_BLOCK_PCIE_BIF = 0x0000000000000020,
987  AMDSMI_GPU_BLOCK_HDP = 0x0000000000000040,
988  AMDSMI_GPU_BLOCK_XGMI_WAFL = 0x0000000000000080,
989  AMDSMI_GPU_BLOCK_DF = 0x0000000000000100,
990  AMDSMI_GPU_BLOCK_SMN = 0x0000000000000200,
991  AMDSMI_GPU_BLOCK_SEM = 0x0000000000000400,
992  AMDSMI_GPU_BLOCK_MP0 = 0x0000000000000800,
993  AMDSMI_GPU_BLOCK_MP1 = 0x0000000000001000,
994  AMDSMI_GPU_BLOCK_FUSE = 0x0000000000002000,
995  AMDSMI_GPU_BLOCK_MCA = 0x0000000000004000,
996  AMDSMI_GPU_BLOCK_VCN = 0x0000000000008000,
997  AMDSMI_GPU_BLOCK_JPEG = 0x0000000000010000,
998  AMDSMI_GPU_BLOCK_IH = 0x0000000000020000,
999  AMDSMI_GPU_BLOCK_MPIO = 0x0000000000040000,
1000 
1003  AMDSMI_GPU_BLOCK_RESERVED = 0x8000000000000000
1005 
1009 typedef enum {
1018 
1019  AMDSMI_RAS_ERR_STATE_LAST = AMDSMI_RAS_ERR_STATE_ENABLED,
1020  AMDSMI_RAS_ERR_STATE_INVALID = 0xFFFFFFFF
1022 
1026 typedef enum {
1027  AMDSMI_MEM_TYPE_FIRST = 0,
1028 
1029  AMDSMI_MEM_TYPE_VRAM = AMDSMI_MEM_TYPE_FIRST,
1032 
1033  AMDSMI_MEM_TYPE_LAST = AMDSMI_MEM_TYPE_GTT
1035 
1039 typedef enum {
1042  AMDSMI_FREQ_IND_INVALID = 0xFFFFFFFF
1044 
1048 typedef enum {
1049  AMDSMI_XGMI_STATUS_NO_ERRORS = 0,
1050  AMDSMI_XGMI_STATUS_ERROR,
1051  AMDSMI_XGMI_STATUS_MULTIPLE_ERRORS,
1053 
1057 typedef uint64_t amdsmi_bit_field_t;
1058 
1062 typedef enum {
1070 
1074 typedef enum {
1079  AMDSMI_IOLINK_TYPE_SIZE = 0xFFFFFFFF
1081 
1085 typedef enum {
1088  AMDSMI_COARSE_GRAIN_GFX_ACTIVITY = AMDSMI_UTILIZATION_COUNTER_FIRST,
1090  AMDSMI_UTILIZATION_COUNTER_LAST = AMDSMI_COARSE_GRAIN_MEM_ACTIVITY
1092 
1096 typedef enum {
1099  AMDSMI_INVALID_POWER = 0xFFFFFFFF
1101 
1105 typedef struct {
1107  uint64_t value;
1109 
1113 typedef struct {
1114  uint64_t page_address;
1115  uint64_t page_size;
1118 
1122 #define AMDSMI_MAX_NUM_POWER_PROFILES (sizeof(amdsmi_bit_field_t) * 8)
1123 
1129 typedef struct {
1134 
1139 
1143  uint32_t num_profiles;
1145 
1149 typedef struct {
1154 
1158  uint32_t num_supported;
1159 
1163  uint32_t current;
1164 
1169  uint64_t frequency[AMDSMI_MAX_NUM_FREQUENCIES];
1171 
1175 typedef struct {
1176  uint32_t policy_id;
1177  char policy_description[AMDSMI_MAX_NAME];
1179 
1180 #define AMDSMI_MAX_NUM_PM_POLICIES 32
1181 
1185 typedef struct {
1189  uint32_t num_supported;
1190 
1194  uint32_t current;
1195 
1200  amdsmi_dpm_policy_entry_t policies[AMDSMI_MAX_NUM_PM_POLICIES];
1202 
1208 typedef struct {
1213 
1220 
1224 typedef struct {
1225  uint32_t year;
1226  uint32_t major;
1227  uint32_t minor;
1228  uint32_t release;
1229  const char *build;
1231 
1235 typedef struct {
1236  uint64_t frequency;
1237  uint64_t voltage;
1239 
1245 typedef struct {
1249 
1253 typedef struct {
1260 
1264 typedef struct {
1270 
1275  uint32_t num_regions;
1277 
1285 typedef struct {
1286  // TODO(amd) Doxygen documents
1287  // Note: This should match: AMDGpuMetricsHeader_v1_t
1289  uint16_t structure_size;
1290  uint8_t format_revision;
1291  uint8_t content_revision;
1294 
1295 typedef struct {
1296  // TODO(amd) Doxygen documents
1297  // Note: This structure is extended to fit the needs of different GPU metric
1298  // versions when exposing data through the structure.
1299  // Depending on the version, some data members will hold data, and
1300  // some will not. A good example is the set of 'current clocks':
1301  // - current_gfxclk, current_socclk, current_vclk0, current_dclk0
1302  // These are single-valued data members, up to version 1.3.
1303  // For version 1.4 and up these are multi-valued data members (arrays)
1304  // and their counterparts;
1305  // - current_gfxclks[], current_socclks[], current_vclk0s[],
1306  // current_dclk0s[]
1307  // will hold the data
1309  amd_metrics_table_header_t common_header;
1310 
1311  /*
1312  * v1.0 Base
1313  */
1314  // Temperature (C)
1315  uint16_t temperature_edge;
1316  uint16_t temperature_hotspot;
1317  uint16_t temperature_mem;
1318  uint16_t temperature_vrgfx;
1319  uint16_t temperature_vrsoc;
1320  uint16_t temperature_vrmem;
1321 
1322  // Utilization (%)
1323  uint16_t average_gfx_activity;
1324  uint16_t average_umc_activity; // memory controller
1325  uint16_t average_mm_activity; // UVD or VCN
1326 
1327  // Power (W) /Energy (15.259uJ per 1ns)
1328  uint16_t average_socket_power;
1329  uint64_t energy_accumulator; // v1 mod. (32->64)
1330 
1331  // Driver attached timestamp (in ns)
1332  uint64_t system_clock_counter; // v1 mod. (moved from top of struct)
1333 
1334  // Average clocks (MHz)
1335  uint16_t average_gfxclk_frequency;
1336  uint16_t average_socclk_frequency;
1337  uint16_t average_uclk_frequency;
1338  uint16_t average_vclk0_frequency;
1339  uint16_t average_dclk0_frequency;
1340  uint16_t average_vclk1_frequency;
1341  uint16_t average_dclk1_frequency;
1342 
1343  // Current clocks (MHz)
1344  uint16_t current_gfxclk;
1345  uint16_t current_socclk;
1346  uint16_t current_uclk;
1347  uint16_t current_vclk0;
1348  uint16_t current_dclk0;
1349  uint16_t current_vclk1;
1350  uint16_t current_dclk1;
1351 
1352  // Throttle status
1353  uint32_t throttle_status;
1354 
1355  // Fans (RPM)
1356  uint16_t current_fan_speed;
1357 
1358  // Link width (number of lanes) /speed (0.1 GT/s)
1359  uint16_t pcie_link_width; // v1 mod.(8->16)
1360  uint16_t pcie_link_speed; // in 0.1 GT/s; v1 mod. (8->16)
1361 
1362 
1363  /*
1364  * v1.1 additions
1365  */
1366  uint32_t gfx_activity_acc; // new in v1
1367  uint32_t mem_activity_acc; // new in v1
1368  uint16_t temperature_hbm[AMDSMI_NUM_HBM_INSTANCES]; // new in v1
1369 
1370 
1371  /*
1372  * v1.2 additions
1373  */
1374  // PMFW attached timestamp (10ns resolution)
1375  uint64_t firmware_timestamp;
1376 
1377 
1378  /*
1379  * v1.3 additions
1380  */
1381  // Voltage (mV)
1382  uint16_t voltage_soc;
1383  uint16_t voltage_gfx;
1384  uint16_t voltage_mem;
1385 
1386  // Throttle status
1387  uint64_t indep_throttle_status;
1388 
1389 
1390  /*
1391  * v1.4 additions
1392  */
1393  // Power (Watts)
1394  uint16_t current_socket_power;
1395 
1396  // Utilization (%)
1397  uint16_t vcn_activity[AMDSMI_MAX_NUM_VCN];
1398 
1399  // Clock Lock Status. Each bit corresponds to clock instance
1400  uint32_t gfxclk_lock_status;
1401 
1402  // XGMI bus width and bitrate (in GB/s)
1403  uint16_t xgmi_link_width;
1404  uint16_t xgmi_link_speed;
1405 
1406  // PCIe accumulated bandwidth (GB/sec)
1407  uint64_t pcie_bandwidth_acc;
1408 
1409  // PCIe instantaneous bandwidth (GB/sec)
1410  uint64_t pcie_bandwidth_inst;
1411 
1412  // PCIE L0 to recovery state transition accumulated count
1413  uint64_t pcie_l0_to_recov_count_acc;
1414 
1415  // PCIE replay accumulated count
1416  uint64_t pcie_replay_count_acc;
1417 
1418  // PCIE replay rollover accumulated count
1419  uint64_t pcie_replay_rover_count_acc;
1420 
1421  // XGMI accumulated data transfer size (KB)
1422  uint64_t xgmi_read_data_acc[AMDSMI_MAX_NUM_XGMI_LINKS];
1423  uint64_t xgmi_write_data_acc[AMDSMI_MAX_NUM_XGMI_LINKS];
1424 
1425  // Current clock frequencies (MHz)
1426  uint16_t current_gfxclks[AMDSMI_MAX_NUM_GFX_CLKS];
1427  uint16_t current_socclks[AMDSMI_MAX_NUM_CLKS];
1428  uint16_t current_vclk0s[AMDSMI_MAX_NUM_CLKS];
1429  uint16_t current_dclk0s[AMDSMI_MAX_NUM_CLKS];
1430 
1431  /*
1432  * v1.5 additions
1433  */
1434  // JPEG activity % per AID
1435  uint16_t jpeg_activity[AMDSMI_MAX_NUM_JPEG];
1436 
1437  // PCIE NAK sent accumulated count
1438  uint32_t pcie_nak_sent_count_acc;
1439 
1440  // PCIE NAK received accumulated count
1441  uint32_t pcie_nak_rcvd_count_acc;
1444 
1445 
1446 #define MAX_AMDSMI_NAME_LENGTH 64
1447 
1451 typedef struct {
1452  char name[MAX_AMDSMI_NAME_LENGTH];
1453  uint64_t value;
1455 
1459 typedef enum {
1460  AMDSMI_REG_XGMI,
1461  AMDSMI_REG_WAFL,
1462  AMDSMI_REG_PCIE,
1463  AMDSMI_REG_USR,
1464  AMDSMI_REG_USR1,
1466 
1470 typedef struct {
1471  uint32_t ras_eeprom_version;
1472  // PARITY error(bit 0), Single Bit correctable (bit1),
1473  // Double bit error detection (bit2), Poison (bit 3).
1476 
1480 typedef struct {
1483  uint64_t deferred_count;
1484  uint64_t reserved[5];
1486 
1490 typedef struct {
1491  uint32_t process_id;
1492  uint32_t pasid;
1493  uint64_t vram_usage;
1494  uint64_t sdma_usage;
1495  uint32_t cu_occupancy;
1497 
1500 #define AMDSMI_DEFAULT_VARIANT 0xFFFFFFFFFFFFFFFF
1501 
1502 #ifdef ENABLE_ESMI_LIB
1506 typedef struct {
1507  uint8_t debug;
1508  uint8_t minor;
1509  uint8_t major;
1510  uint8_t unused;
1512 
1516 typedef struct {
1517  uint32_t max_bw;
1518  uint32_t utilized_bw;
1519  uint32_t utilized_pct;
1521 
1525 typedef struct {
1526  uint8_t range : 3;
1527  uint8_t ref_rate : 1;
1529 
1533 typedef struct {
1534  uint16_t power : 15;
1535  uint16_t update_rate : 9;
1536  uint8_t dimm_addr;
1538 
1542 typedef struct {
1543  uint16_t sensor : 11;
1544  uint16_t update_rate : 9;
1545  uint8_t dimm_addr;
1546  float temp;
1548 
1552 typedef enum {
1553  AGG_BW0 = 1,
1554  RD_BW0 = 2,
1555  WR_BW0 = 4
1557 
1565 typedef struct {
1567  char *link_name;
1569 
1574 typedef struct {
1575  uint8_t max_dpm_level;
1576  uint8_t min_dpm_level;
1578 
1582 typedef struct __attribute__((__packed__)){
1583  uint32_t accumulation_counter;
1584 
1585  /* TEMPERATURE */
1586  uint32_t max_socket_temperature;
1587  uint32_t max_vr_temperature;
1588  uint32_t max_hbm_temperature;
1589  uint64_t max_socket_temperature_acc;
1590  uint64_t max_vr_temperature_acc;
1591  uint64_t max_hbm_temperature_acc;
1592 
1593  /* POWER */
1594  uint32_t socket_power_limit;
1595  uint32_t max_socket_power_limit;
1596  uint32_t socket_power;
1597 
1598  /* ENERGY */
1599  uint64_t timestamp;
1600  uint64_t socket_energy_acc;
1601  uint64_t ccd_energy_acc;
1602  uint64_t xcd_energy_acc;
1603  uint64_t aid_energy_acc;
1604  uint64_t hbm_energy_acc;
1605 
1606  /* FREQUENCY */
1607  uint32_t cclk_frequency_limit;
1608  uint32_t gfxclk_frequency_limit;
1609  uint32_t fclk_frequency;
1610  uint32_t uclk_frequency;
1611  uint32_t socclk_frequency[4];
1612  uint32_t vclk_frequency[4];
1613  uint32_t dclk_frequency[4];
1614  uint32_t lclk_frequency[4];
1615  uint64_t gfxclk_frequency_acc[8];
1616  uint64_t cclk_frequency_acc[96];
1617 
1618  /* FREQUENCY RANGE */
1619  uint32_t max_cclk_frequency;
1620  uint32_t min_cclk_frequency;
1621  uint32_t max_gfxclk_frequency;
1622  uint32_t min_gfxclk_frequency;
1623  uint32_t fclk_frequency_table[4];
1624  uint32_t uclk_frequency_table[4];
1625  uint32_t socclk_frequency_table[4];
1626  uint32_t vclk_frequency_table[4];
1627  uint32_t dclk_frequency_table[4];
1628  uint32_t lclk_frequency_table[4];
1629  uint32_t max_lclk_dpm_range;
1630  uint32_t min_lclk_dpm_range;
1631 
1632  /* XGMI */
1633  uint32_t xgmi_width;
1634  uint32_t xgmi_bitrate;
1635  uint64_t xgmi_read_bandwidth_acc[8];
1636  uint64_t xgmi_write_bandwidth_acc[8];
1637 
1638  /* ACTIVITY */
1639  uint32_t socket_c0_residency;
1640  uint32_t socket_gfx_busy;
1641  uint32_t dram_bandwidth_utilization;
1642  uint64_t socket_c0_residency_acc;
1643  uint64_t socket_gfx_busy_acc;
1644  uint64_t dram_bandwidth_acc;
1645  uint32_t max_dram_bandwidth;
1646  uint64_t dram_bandwidth_utilization_acc;
1647  uint64_t pcie_bandwidth_acc[4];
1648 
1649  /* THROTTLERS */
1650  uint32_t prochot_residency_acc;
1651  uint32_t ppt_residency_acc;
1652  uint32_t socket_thm_residency_acc;
1653  uint32_t vr_thm_residency_acc;
1654  uint32_t hbm_thm_residency_acc;
1655  uint32_t spare;
1656 
1657  /* New items at the end to maintain driver compatibility */
1658  uint32_t gfxclk_frequency[8];
1659 } amdsmi_hsmp_metrics_table_t;
1660 
1664 static char* const amdsmi_hsmp_freqlimit_src_names[] = {
1665  "cHTC-Active",
1666  "PROCHOT",
1667  "TDC limit",
1668  "PPT Limit",
1669  "OPN Max",
1670  "Reliability Limit",
1671  "APML Agent",
1672  "HSMP Agent"
1673 };
1674 #endif
1675 
1676 /*****************************************************************************/
1703 amdsmi_status_t amdsmi_init(uint64_t init_flags);
1704 
1717 
1720 /*****************************************************************************/
1756  amdsmi_socket_handle* socket_handles);
1757 
1758 #ifdef ENABLE_ESMI_LIB
1786  amdsmi_cpusocket_handle* socket_handles);
1787 #endif
1788 
1807  amdsmi_socket_handle socket_handle,
1808  size_t len, char *name);
1809 
1810 #ifdef ENABLE_ESMI_LIB
1828  amdsmi_processor_handle processor_handle,
1829  size_t len, char *name);
1830 
1853  uint32_t* processor_count, uint32_t* nr_cpusockets,
1854  uint32_t* nr_cpucores, uint32_t* nr_gpus);
1855 
1875 amdsmi_status_t amdsmi_get_processor_handles_by_type(amdsmi_socket_handle socket_handle,
1876  processor_type_t processor_type,
1877  amdsmi_processor_handle* processor_handles,
1878  uint32_t* processor_count);
1879 #endif
1880 
1915 amdsmi_status_t amdsmi_get_processor_handles(amdsmi_socket_handle socket_handle,
1916  uint32_t *processor_count,
1917  amdsmi_processor_handle* processor_handles);
1918 
1919 #ifdef ENABLE_ESMI_LIB
1944 amdsmi_status_t amdsmi_get_cpucore_handles(amdsmi_cpusocket_handle socket_handle,
1945  uint32_t *processor_count,
1946  amdsmi_processor_handle* processor_handles);
1947 #endif
1948 
1967  processor_type_t* processor_type);
1968 
1985  amdsmi_processor_handle* processor_handle);
1986 
1989 /*****************************************************************************/
2021 
2038 
2073  size_t len);
2074 
2100  uint32_t len);
2101 
2124 
2159 amdsmi_get_gpu_subsystem_name(amdsmi_processor_handle processor_handle, char *name, size_t len);
2160 
2163 /*****************************************************************************/
2190  amdsmi_pcie_bandwidth_t *bandwidth);
2191 
2227 
2250  int32_t *numa_node);
2251 
2277  uint64_t *received, uint64_t *max_pkt_sz);
2278 
2301  uint64_t *counter);
2302 
2305 /*****************************************************************************/
2344  uint64_t bw_bitmask);
2345 
2348 /*****************************************************************************/
2384 amdsmi_get_energy_count(amdsmi_processor_handle processor_handle, uint64_t *power,
2385  float *counter_resolution, uint64_t *timestamp);
2386 
2389 /*****************************************************************************/
2415  amdsmi_set_power_cap(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t cap);
2416 
2437  amdsmi_set_gpu_power_profile(amdsmi_processor_handle processor_handle, uint32_t reserved,
2439 
2442 /*****************************************************************************/
2473  uint64_t *total);
2474 
2499  uint64_t *used);
2500 
2521 amdsmi_get_gpu_bad_page_info(amdsmi_processor_handle processor_handle, uint32_t *num_pages,
2523 
2537  amdsmi_processor_handle processor_handle, amdsmi_ras_feature_t *ras_feature);
2538 
2539 
2565  amdsmi_gpu_block_t block,
2566  amdsmi_ras_err_state_t *state);
2567 
2603  uint32_t *num_pages,
2604  amdsmi_retired_page_record_t *records);
2605 
2639  uint32_t sensor_ind, int64_t *speed);
2640 
2667  uint32_t sensor_ind, int64_t *speed);
2668 
2694  uint32_t sensor_ind, uint64_t *max_speed);
2695 
2726  amdsmi_temperature_type_t sensor_type,
2727  amdsmi_temperature_metric_t metric, int64_t *temperature);
2728 
2742  amdsmi_processor_handle processor_handle, amdsmi_gpu_cache_info_t *info);
2743 
2774  amdsmi_voltage_type_t sensor_type,
2775  amdsmi_voltage_metric_t metric, int64_t *voltage);
2776 
2779 /*****************************************************************************/
2800 amdsmi_status_t amdsmi_reset_gpu_fan(amdsmi_processor_handle processor_handle, uint32_t sensor_ind);
2801 
2825  uint32_t sensor_ind, uint64_t speed);
2826 
2829 /*****************************************************************************/
2864  amdsmi_utilization_counter_t utilization_counters[],
2865  uint32_t count,
2866  uint64_t *timestamp);
2867 
2890  amdsmi_dev_perf_level_t *perf);
2891 
2914 
2938  uint32_t *od);
2939 
2963 
2977 
3001 
3022 
3044  amdsmi_gpu_metrics_t *pgpu_metrics);
3045 
3078  amdsmi_processor_handle processor_handle,
3079  amdsmi_name_value_t** pm_metrics,
3080  uint32_t *num_of_metrics);
3081 
3116  amdsmi_processor_handle processor_handle,
3117  amdsmi_reg_type_t reg_type,
3118  amdsmi_name_value_t** reg_metrics,
3119  uint32_t *num_of_metrics);
3120 
3144  uint64_t minclkvalue,
3145  uint64_t maxclkvalue,
3146  amdsmi_clk_type_t clkType);
3147 
3171  amdsmi_freq_ind_t level,
3172  uint64_t clkvalue,
3173  amdsmi_clk_type_t clkType);
3174 
3197  uint32_t vpoint,
3198  uint64_t clkvalue,
3199  uint64_t voltvalue);
3200 
3239  uint32_t *num_regions, amdsmi_freq_volt_region_t *buffer);
3240 
3275  amdsmi_get_gpu_power_profile_presets(amdsmi_processor_handle processor_handle, uint32_t sensor_ind,
3277 
3280 /*****************************************************************************/
3308 
3348 
3384  amdsmi_clk_type_t clk_type, uint64_t freq_bitmask);
3385 
3404  amdsmi_dpm_policy_t* policy);
3405 
3426  uint32_t policy_id);
3427 
3446  amdsmi_dpm_policy_t* xgmi_plpd);
3447 
3468  uint32_t plpd_id);
3469 
3470 
3489  uint32_t* pisolate);
3490 
3509  uint32_t pisolate);
3510 
3528 
3531 /*****************************************************************************/
3553 
3556 /*****************************************************************************/
3589 
3617  uint64_t *enabled_blocks);
3618 
3644  amdsmi_gpu_block_t block,
3645  amdsmi_ras_err_state_t *state);
3646 
3663 amdsmi_status_code_to_string(amdsmi_status_t status, const char **status_string);
3664 
3667 /*****************************************************************************/
3788 
3817  amdsmi_event_handle_t *evnt_handle);
3818 
3835 
3857  amdsmi_counter_command_t cmd, void *cmd_args);
3858 
3879  amdsmi_counter_value_t *value);
3880 
3903  amdsmi_event_group_t grp, uint32_t *available);
3904 
3907 /*****************************************************************************/
3945 
3966 
3999 amdsmi_get_gpu_compute_process_gpus(uint32_t pid, uint32_t *dv_indices,
4000  uint32_t *num_devices);
4001 
4004 /*****************************************************************************/
4034 
4051 
4054 /*****************************************************************************/
4073  amdsmi_link_metrics_t *link_metrics);
4074 
4093 amdsmi_topo_get_numa_node_number(amdsmi_processor_handle processor_handle, uint32_t *numa_node);
4094 
4117  uint64_t *weight);
4118 
4144  amdsmi_processor_handle processor_handle_dst,
4145  uint64_t *min_bandwidth,
4146  uint64_t *max_bandwidth);
4147 
4174  amdsmi_processor_handle processor_handle_dst,
4175  uint64_t *hops, amdsmi_io_link_type_t *type);
4176 
4199  amdsmi_processor_handle processor_handle_dst,
4200  bool *accessible);
4201 
4204 /*****************************************************************************/
4243  char *compute_partition, uint32_t len);
4244 
4271  amdsmi_compute_partition_type_t compute_partition);
4272 
4291  // end of compute_partition
4293 
4294 /*****************************************************************************/
4333  char *memory_partition, uint32_t len);
4334 
4360  amdsmi_memory_partition_type_t memory_partition);
4361 
4382  // end of memory_partition
4384 
4385 /*****************************************************************************/
4409 
4440 
4480  uint32_t *num_elem, amdsmi_evt_notification_data_t *data);
4481 
4499 
4516 
4534 amdsmi_get_gpu_device_uuid(amdsmi_processor_handle processor_handle, unsigned int *uuid_length, char *uuid);
4535 
4536 /*****************************************************************************/
4560 
4563 /*****************************************************************************/
4587 
4601  amdsmi_processor_handle processor_handle, amdsmi_vram_info_t *info);
4602 
4617 
4634 amdsmi_get_power_cap_info(amdsmi_processor_handle processor_handle, uint32_t sensor_ind,
4635  amdsmi_power_cap_info_t *info);
4636 
4650  amdsmi_pcie_info_t *info);
4651 
4667 
4670 /*****************************************************************************/
4688 
4704 
4707 /*****************************************************************************/
4727 
4743 
4757 
4777 
4794 
4795 
4798 /*****************************************************************************/
4844  // Note: If the reserved size for processes is smaller than the number of
4845  // actual processes running. The AMDSMI_STATUS_OUT_OF_RESOURCES is
4846  // an indication the caller should handle the situation (resize).
4847  // The max_processes is always changed to reflect the actual size of
4848  // list of processes running, so the caller knows where it is at.
4849  //
4851 amdsmi_get_gpu_process_list(amdsmi_processor_handle processor_handle, uint32_t *max_processes, amdsmi_proc_info_t *list);
4852 
4855 /*****************************************************************************/
4876 
4880 #ifdef ENABLE_ESMI_LIB
4881 /*****************************************************************************/
4898  uint64_t *penergy);
4899 
4912  uint64_t *penergy);
4913 
4916 /*****************************************************************************/
4930 amdsmi_status_t amdsmi_get_threads_per_core(uint32_t *threads_per_core);
4931 
4943  amdsmi_smu_fw_version_t *amdsmi_smu_fw);
4944 
4956  uint32_t *proto_ver);
4957 
4970  uint32_t *prochot);
4971 
4986  uint32_t *fclk, uint32_t *mclk);
4987 
5000  uint32_t *cclk);
5001 
5016  uint16_t *freq, char **src_type);
5017 
5032  uint16_t *fmax, uint16_t *fmin);
5033 
5046  uint32_t *freq);
5047 
5050 /*****************************************************************************/
5067  uint32_t *ppower);
5068 
5081  uint32_t *pcap);
5082 
5095  uint32_t *pmax);
5096 
5109  uint32_t *power);
5110 
5123  uint32_t pcap);
5124 
5137  uint8_t mode);
5138 
5141 /*****************************************************************************/
5158  uint32_t *pboostlimit);
5159 
5172  uint32_t *pc0_residency);
5173 
5186  uint32_t boostlimit);
5187 
5200  uint32_t boostlimit);
5201 
5204 /*****************************************************************************/
5220  amdsmi_ddr_bw_metrics_t *ddr_bw);
5221 
5224 /*****************************************************************************/
5241  uint32_t *ptmon);
5242 
5245 /*****************************************************************************/
5262  uint8_t dimm_addr,
5264 
5277  uint8_t dimm_addr,
5278  amdsmi_dimm_power_t *dimm_pow);
5279 
5292  uint8_t dimm_addr,
5293  amdsmi_dimm_thermal_t *dimm_temp);
5294 
5297 /*****************************************************************************/
5313  uint8_t min, uint8_t max);
5314 
5317 /*****************************************************************************/
5334  uint8_t min_link_width, uint8_t max_link_width);
5335 
5338 /*****************************************************************************/
5353 
5366  uint8_t pstate);
5367 
5381  uint8_t nbio_id, uint8_t min, uint8_t max);
5382 
5395  uint8_t nbio_id, amdsmi_dpm_level_t *nbio);
5396 
5409  uint8_t rate_ctrl, uint8_t *prev_mode);
5410 
5423  uint8_t max_pstate, uint8_t min_pstate);
5424 
5427 /*****************************************************************************/
5444  amdsmi_link_id_bw_type_t link, uint32_t *io_bw);
5445 
5458  amdsmi_link_id_bw_type_t link, uint32_t *xgmi_bw);
5459 
5462 /*****************************************************************************/
5478  uint32_t *metrics_version);
5479 
5491  amdsmi_hsmp_metrics_table_t *metrics_table);
5492 
5495 /*****************************************************************************/
5512  uint32_t *pcore_ind);
5513 
5522 
5531 
5547 amdsmi_status_t amdsmi_get_esmi_err_msg(amdsmi_status_t status, const char **status_string);
5548 #endif
5550 #ifdef __cplusplus
5551 }
5552 #endif // __cplusplus
5553 #endif // INCLUDE_AMDSMI_H_
#define AMDSMI_MAX_DATE_LENGTH
Definition: amdsmi.h:80
amdsmi_evt_notification_type_t
Definition: amdsmi.h:846
@ AMDSMI_EVT_NOTIF_NONE
Not used.
Definition: amdsmi.h:847
@ AMDSMI_EVT_NOTIF_VMFAULT
VM page fault.
Definition: amdsmi.h:848
#define AMDSMI_MAX_NUM_CLKS
This should match MAX_NUM_CLKS.
Definition: amdsmi.h:115
#define AMDSMI_MAX_NUM_XGMI_LINKS
This should match MAX_NUM_XGMI_LINKS.
Definition: amdsmi.h:120
amdsmi_freq_ind_t
The values of this enum are used as frequency identifiers.
Definition: amdsmi.h:1039
@ AMDSMI_FREQ_IND_INVALID
An invalid frequency index.
Definition: amdsmi.h:1042
@ AMDSMI_FREQ_IND_MAX
Index used for the maximum frequency value.
Definition: amdsmi.h:1041
@ AMDSMI_FREQ_IND_MIN
Index used for the minimum frequency value.
Definition: amdsmi.h:1040
amdsmi_reg_type_t
This register type for register table.
Definition: amdsmi.h:1459
uintptr_t amdsmi_event_handle_t
Available clock types.
Definition: amdsmi.h:740
amdsmi_memory_type_t
Types of memory.
Definition: amdsmi.h:1026
@ AMDSMI_MEM_TYPE_VRAM
VRAM memory.
Definition: amdsmi.h:1029
@ AMDSMI_MEM_TYPE_VIS_VRAM
VRAM memory that is visible.
Definition: amdsmi.h:1030
@ AMDSMI_MEM_TYPE_GTT
GTT memory.
Definition: amdsmi.h:1031
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
Clock types.
Definition: amdsmi.h:261
@ AMDSMI_CLK_TYPE_SYS
System clock.
Definition: amdsmi.h:262
@ AMDSMI_CLK_TYPE_DCEF
Display Controller Engine clock.
Definition: amdsmi.h:267
@ AMDSMI_CLK_TYPE_DF
running on a separate clock)
Definition: amdsmi.h:265
#define MAX_EVENT_NOTIFICATION_MSG_SIZE
Maximum number of characters an event notification message will be.
Definition: amdsmi.h:864
amdsmi_io_link_type_t
Types for IO Link.
Definition: amdsmi.h:1074
@ AMDSMI_IOLINK_TYPE_SIZE
Max of IO Link types.
Definition: amdsmi.h:1079
@ AMDSMI_IOLINK_TYPE_UNDEFINED
unknown type.
Definition: amdsmi.h:1075
@ AMDSMI_IOLINK_TYPE_NUMIOLINKTYPES
Number of IO Link types.
Definition: amdsmi.h:1078
@ AMDSMI_IOLINK_TYPE_XGMI
XGMI.
Definition: amdsmi.h:1077
@ AMDSMI_IOLINK_TYPE_PCIEXPRESS
PCI Express.
Definition: amdsmi.h:1076
amdsmi_init_flags_t
Initialization flags.
Definition: amdsmi.h:69
@ AMDSMI_INIT_ALL_PROCESSORS
Initialize all processors.
Definition: amdsmi.h:70
#define AMDSMI_NUM_HBM_INSTANCES
This should match NUM_HBM_INSTANCES.
Definition: amdsmi.h:105
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:748
@ AMDSMI_EVNT_GRP_XGMI
Data Fabric (XGMI) related events.
Definition: amdsmi.h:749
@ AMDSMI_EVNT_GRP_XGMI_DATA_OUT
XGMI Outbound data.
Definition: amdsmi.h:750
amdsmi_ras_err_state_t
The current ECC state.
Definition: amdsmi.h:1009
@ AMDSMI_RAS_ERR_STATE_PARITY
ECC errors present, but type unknown.
Definition: amdsmi.h:1012
@ AMDSMI_RAS_ERR_STATE_SING_C
Single correctable error.
Definition: amdsmi.h:1013
@ AMDSMI_RAS_ERR_STATE_MULT_UC
Multiple uncorrectable errors.
Definition: amdsmi.h:1014
@ AMDSMI_RAS_ERR_STATE_POISON
page. Treat as uncorrectable.
Definition: amdsmi.h:1015
@ AMDSMI_RAS_ERR_STATE_ENABLED
ECC is enabled.
Definition: amdsmi.h:1017
@ AMDSMI_RAS_ERR_STATE_NONE
No current errors.
Definition: amdsmi.h:1010
@ AMDSMI_RAS_ERR_STATE_DISABLED
ECC is disabled.
Definition: amdsmi.h:1011
amdsmi_io_bw_encoding_t
xGMI Bandwidth Encoding types
Definition: amdsmi.h:1552
@ AGG_BW0
Aggregate Bandwidth.
Definition: amdsmi.h:1553
@ RD_BW0
Read Bandwidth.
Definition: amdsmi.h:1554
@ WR_BW0
Write Bandwdith.
Definition: amdsmi.h:1555
amdsmi_event_type_t
Event type enum. Events belonging to a particular event group amdsmi_event_group_t should begin enume...
Definition: amdsmi.h:760
@ AMDSMI_EVNT_XGMI_0_BEATS_TX
Data beats sent to neighbor 0; Each beat represents 32 bytes.
Definition: amdsmi.h:783
@ AMDSMI_EVNT_XGMI_DATA_OUT_3
Outbound beats to neighbor 3.
Definition: amdsmi.h:815
@ AMDSMI_EVNT_XGMI_0_NOP_TX
NOPs sent to neighbor 0.
Definition: amdsmi.h:764
@ AMDSMI_EVNT_XGMI_1_NOP_TX
NOPs sent to neighbor 1.
Definition: amdsmi.h:784
@ AMDSMI_EVNT_XGMI_0_RESPONSE_TX
neighbor 0
Definition: amdsmi.h:767
@ AMDSMI_EVNT_XGMI_1_BEATS_TX
Definition: amdsmi.h:789
@ AMDSMI_EVNT_XGMI_DATA_OUT_4
Outbound beats to neighbor 4.
Definition: amdsmi.h:816
@ AMDSMI_EVNT_XGMI_DATA_OUT_1
Outbound beats to neighbor 1.
Definition: amdsmi.h:813
@ AMDSMI_EVNT_XGMI_DATA_OUT_2
Outbound beats to neighbor 2.
Definition: amdsmi.h:814
@ AMDSMI_EVNT_XGMI_1_REQUEST_TX
neighbor 1
Definition: amdsmi.h:785
@ AMDSMI_EVNT_XGMI_DATA_OUT_5
Outbound beats to neighbor 5.
Definition: amdsmi.h:817
@ AMDSMI_EVNT_XGMI_0_REQUEST_TX
neighbor 0
Definition: amdsmi.h:765
@ AMDSMI_EVNT_XGMI_1_RESPONSE_TX
neighbor 1
Definition: amdsmi.h:787
processor_type_t
Processor types detectable by AMD SMI AMDSMI_PROCESSOR_TYPE_AMD_CPU - CPU Socket is a physical compon...
Definition: amdsmi.h:191
amdsmi_fw_block_t
The values of this enum are used to identify the various firmware blocks.
Definition: amdsmi.h:339
amdsmi_memory_page_status_t
Reserved Memory Page States.
Definition: amdsmi.h:1062
@ AMDSMI_MEM_PAGE_STATUS_UNRESERVABLE
Unable to reserve this page.
Definition: amdsmi.h:1068
@ AMDSMI_MEM_PAGE_STATUS_RESERVED
and not available for use
Definition: amdsmi.h:1063
@ AMDSMI_MEM_PAGE_STATUS_PENDING
Definition: amdsmi.h:1065
amdsmi_xgmi_status_t
XGMI Status.
Definition: amdsmi.h:1048
amdsmi_dev_perf_level_t
PowerPlay performance levels.
Definition: amdsmi.h:704
@ AMDSMI_DEV_PERF_LEVEL_STABLE_STD
clocks
Definition: amdsmi.h:714
@ AMDSMI_DEV_PERF_LEVEL_STABLE_PEAK
Stable power state with peak clocks.
Definition: amdsmi.h:716
@ AMDSMI_DEV_PERF_LEVEL_AUTO
Performance level is "auto".
Definition: amdsmi.h:705
@ AMDSMI_DEV_PERF_LEVEL_STABLE_MIN_SCLK
system clock
Definition: amdsmi.h:719
@ AMDSMI_DEV_PERF_LEVEL_STABLE_MIN_MCLK
memory clock
Definition: amdsmi.h:717
@ AMDSMI_DEV_PERF_LEVEL_DETERMINISM
Performance determinism state.
Definition: amdsmi.h:721
@ AMDSMI_DEV_PERF_LEVEL_LOW
regardless of workload
Definition: amdsmi.h:708
@ AMDSMI_DEV_PERF_LEVEL_HIGH
regardless of workload
Definition: amdsmi.h:710
@ AMDSMI_DEV_PERF_LEVEL_MANUAL
setting the AMDSMI_CLK_TYPE_SYS speed
Definition: amdsmi.h:712
@ AMDSMI_DEV_PERF_LEVEL_UNKNOWN
Unknown performance level.
Definition: amdsmi.h:725
amdsmi_utilization_counter_type_t
The utilization counter type.
Definition: amdsmi.h:1085
@ AMDSMI_COARSE_GRAIN_MEM_ACTIVITY
Memory Activity.
Definition: amdsmi.h:1089
@ AMDSMI_UTILIZATION_COUNTER_FIRST
GFX Activity.
Definition: amdsmi.h:1086
amdsmi_memory_partition_type_t
Memory Partitions. This enum is used to identify various memory partition types.
Definition: amdsmi.h:300
@ AMDSMI_MEMORY_PARTITION_NPS8
Definition: amdsmi.h:310
@ AMDSMI_MEMORY_PARTITION_NPS1
accross all 8 HBM stacks (all stacks/1).
Definition: amdsmi.h:302
@ AMDSMI_MEMORY_PARTITION_NPS2
Definition: amdsmi.h:304
@ AMDSMI_MEMORY_PARTITION_NPS4
Definition: amdsmi.h:307
amdsmi_voltage_metric_t
Voltage Metrics. This enum is used to identify various Volatge metrics. Corresponding values will be ...
Definition: amdsmi.h:923
@ AMDSMI_VOLT_LOWEST
Historical minimum voltage.
Definition: amdsmi.h:932
@ AMDSMI_VOLT_MAX_CRIT
Voltage critical max value.
Definition: amdsmi.h:930
@ AMDSMI_VOLT_HIGHEST
Historical maximum voltage.
Definition: amdsmi.h:933
@ AMDSMI_VOLT_MIN
Voltage min value.
Definition: amdsmi.h:929
@ AMDSMI_VOLT_AVERAGE
Average voltage.
Definition: amdsmi.h:931
@ AMDSMI_VOLT_CURRENT
Voltage current value.
Definition: amdsmi.h:924
@ AMDSMI_VOLT_MAX
Voltage max value.
Definition: amdsmi.h:927
@ AMDSMI_VOLT_MIN_CRIT
Voltage critical min value.
Definition: amdsmi.h:928
uint64_t amdsmi_bit_field_t
Bitfield used in various AMDSMI calls.
Definition: amdsmi.h:1057
amdsmi_voltage_type_t
This ennumeration is used to indicate which type of voltage reading should be obtained.
Definition: amdsmi.h:942
@ AMDSMI_VOLT_TYPE_INVALID
Invalid type.
Definition: amdsmi.h:948
@ AMDSMI_VOLT_TYPE_VDDGFX
voltage
Definition: amdsmi.h:945
void * amdsmi_processor_handle
opaque handler point to underlying implementation
Definition: amdsmi.h:179
amdsmi_cache_property_type_t
cache properties
Definition: amdsmi.h:551
amdsmi_status_t
Error codes returned by amdsmi functions.
Definition: amdsmi.h:206
@ AMDSMI_STATUS_NOT_INIT
Device not initialized.
Definition: amdsmi.h:231
@ AMDSMI_STATUS_NON_AMD_CPU
System has different cpu than AMD.
Definition: amdsmi.h:240
@ AMDSMI_STATUS_INVAL
Invalid parameters.
Definition: amdsmi.h:209
@ AMDSMI_STATUS_BUSY
Device busy.
Definition: amdsmi.h:229
@ AMDSMI_STATUS_UNKNOWN_ERROR
An unknown error occurred.
Definition: amdsmi.h:255
@ AMDSMI_STATUS_DRIVER_NOT_LOADED
Processor driver not loaded.
Definition: amdsmi.h:233
@ AMDSMI_STATUS_FILE_ERROR
Problem accessing a file.
Definition: amdsmi.h:222
@ AMDSMI_STATUS_DRM_ERROR
Error when call libdrm.
Definition: amdsmi.h:214
@ AMDSMI_STATUS_ARG_PTR_NULL
Parsed argument is invalid.
Definition: amdsmi.h:249
@ AMDSMI_STATUS_IO
I/O Error.
Definition: amdsmi.h:220
@ AMDSMI_STATUS_NO_HSMP_DRV
HSMP driver not found.
Definition: amdsmi.h:243
@ AMDSMI_STATUS_HSMP_TIMEOUT
HSMP message is timedout.
Definition: amdsmi.h:246
@ AMDSMI_STATUS_NO_DATA
No data was found for a given input.
Definition: amdsmi.h:235
@ AMDSMI_STATUS_RETRY
Retry operation.
Definition: amdsmi.h:217
@ AMDSMI_STATUS_UNEXPECTED_SIZE
An unexpected amount of data was read.
Definition: amdsmi.h:237
@ AMDSMI_STATUS_SETTING_UNAVAILABLE
Setting is not available.
Definition: amdsmi.h:251
@ AMDSMI_STATUS_FILE_NOT_FOUND
file or directory not found
Definition: amdsmi.h:248
@ AMDSMI_STATUS_INTERNAL_EXCEPTION
An internal exception was caught.
Definition: amdsmi.h:224
@ AMDSMI_STATUS_NO_HSMP_SUP
HSMP not supported.
Definition: amdsmi.h:244
@ AMDSMI_STATUS_MAP_ERROR
The internal library error did not map to a status code.
Definition: amdsmi.h:254
@ AMDSMI_STATUS_FAIL_LOAD_SYMBOL
Fail to load symbol.
Definition: amdsmi.h:213
@ AMDSMI_STATUS_INSUFFICIENT_SIZE
Not enough resources were available for the operation.
Definition: amdsmi.h:236
@ AMDSMI_STATUS_INIT_ERROR
An error occurred when initializing internal data structures.
Definition: amdsmi.h:226
@ AMDSMI_STATUS_OUT_OF_RESOURCES
Not enough memory.
Definition: amdsmi.h:223
@ AMDSMI_STATUS_NO_SLOT
No more free slot.
Definition: amdsmi.h:232
@ AMDSMI_STATUS_NO_MSR_DRV
MSR driver not found.
Definition: amdsmi.h:242
@ AMDSMI_STATUS_INTERRUPT
An interrupt occurred during execution of function.
Definition: amdsmi.h:219
@ AMDSMI_STATUS_SUCCESS
Call succeeded.
Definition: amdsmi.h:207
@ AMDSMI_STATUS_NO_ENERGY_DRV
Energy driver not found.
Definition: amdsmi.h:241
@ AMDSMI_STATUS_ADDRESS_FAULT
Bad address.
Definition: amdsmi.h:221
@ AMDSMI_STATUS_NOT_YET_IMPLEMENTED
Not implemented yet.
Definition: amdsmi.h:211
@ AMDSMI_STATUS_NO_DRV
No Energy and HSMP driver present.
Definition: amdsmi.h:247
@ AMDSMI_STATUS_NO_PERM
Permission Denied.
Definition: amdsmi.h:218
@ AMDSMI_STATUS_NOT_FOUND
Device Not found.
Definition: amdsmi.h:230
@ AMDSMI_STATUS_FAIL_LOAD_MODULE
Fail to load lib.
Definition: amdsmi.h:212
@ AMDSMI_STATUS_AMDGPU_RESTART_ERR
AMDGPU restart failed.
Definition: amdsmi.h:250
@ AMDSMI_STATUS_NOT_SUPPORTED
Command not supported.
Definition: amdsmi.h:210
@ AMDSMI_STATUS_UNEXPECTED_DATA
The data read or provided to function is not what was expected.
Definition: amdsmi.h:238
@ AMDSMI_STATUS_API_FAILED
API call failed.
Definition: amdsmi.h:215
@ AMDSMI_STATUS_TIMEOUT
Timeout in API call.
Definition: amdsmi.h:216
@ AMDSMI_STATUS_NO_HSMP_MSG_SUP
HSMP message/feature not supported.
Definition: amdsmi.h:245
@ AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS
The provided input is out of allowable or safe range.
Definition: amdsmi.h:225
@ AMDSMI_STATUS_REFCOUNT_OVERFLOW
An internal reference counter exceeded INT32_MAX.
Definition: amdsmi.h:227
#define AMDSMI_MAX_NUM_JPEG
This should match AMDSMI_MAX_NUM_JPEG (8*4=32)
Definition: amdsmi.h:140
amdsmi_temperature_metric_t
Temperature Metrics. This enum is used to identify various temperature metrics. Corresponding values ...
Definition: amdsmi.h:880
@ AMDSMI_TEMP_CRITICAL_HYST
Definition: amdsmi.h:894
@ AMDSMI_TEMP_CRITICAL
greater than corresponding temp_max values.
Definition: amdsmi.h:892
@ AMDSMI_TEMP_OFFSET
Definition: amdsmi.h:910
@ AMDSMI_TEMP_EMERGENCY
Definition: amdsmi.h:897
@ AMDSMI_TEMP_LOWEST
temperature reading by the chip.
Definition: amdsmi.h:912
@ AMDSMI_TEMP_CRIT_MIN
Definition: amdsmi.h:904
@ AMDSMI_TEMP_EMERGENCY_HYST
Definition: amdsmi.h:901
@ AMDSMI_TEMP_CURRENT
Temperature current value.
Definition: amdsmi.h:881
@ AMDSMI_TEMP_MIN
Temperature min value.
Definition: amdsmi.h:885
@ AMDSMI_TEMP_HIGHEST
Historical maximum temperature.
Definition: amdsmi.h:913
@ AMDSMI_TEMP_CRIT_MIN_HYST
Definition: amdsmi.h:907
@ AMDSMI_TEMP_MIN_HYST
Definition: amdsmi.h:889
@ AMDSMI_TEMP_MAX_HYST
Definition: amdsmi.h:886
@ AMDSMI_TEMP_MAX
Temperature max value.
Definition: amdsmi.h:884
amdsmi_gpu_block_t
This enum is used to identify different GPU blocks.
Definition: amdsmi.h:976
@ AMDSMI_GPU_BLOCK_XGMI_WAFL
XGMI block.
Definition: amdsmi.h:988
@ AMDSMI_GPU_BLOCK_LAST
Definition: amdsmi.h:1001
@ AMDSMI_GPU_BLOCK_GFX
GFX block.
Definition: amdsmi.h:983
@ AMDSMI_GPU_BLOCK_IH
IH block.
Definition: amdsmi.h:998
@ AMDSMI_GPU_BLOCK_VCN
VCN block.
Definition: amdsmi.h:996
@ AMDSMI_GPU_BLOCK_INVALID
Definition: amdsmi.h:977
@ AMDSMI_GPU_BLOCK_MP0
MP0 block.
Definition: amdsmi.h:992
@ AMDSMI_GPU_BLOCK_HDP
HDP block.
Definition: amdsmi.h:987
@ AMDSMI_GPU_BLOCK_MPIO
MPIO block.
Definition: amdsmi.h:999
@ AMDSMI_GPU_BLOCK_ATHUB
ATHUB block.
Definition: amdsmi.h:985
@ AMDSMI_GPU_BLOCK_MP1
MP1 block.
Definition: amdsmi.h:993
@ AMDSMI_GPU_BLOCK_PCIE_BIF
PCIE_BIF block.
Definition: amdsmi.h:986
@ AMDSMI_GPU_BLOCK_SDMA
SDMA block.
Definition: amdsmi.h:982
@ AMDSMI_GPU_BLOCK_JPEG
JPEG block.
Definition: amdsmi.h:997
@ AMDSMI_GPU_BLOCK_UMC
UMC block.
Definition: amdsmi.h:981
@ AMDSMI_GPU_BLOCK_FUSE
Fuse block.
Definition: amdsmi.h:994
@ AMDSMI_GPU_BLOCK_DF
DF block.
Definition: amdsmi.h:989
@ AMDSMI_GPU_BLOCK_MMHUB
MMHUB block.
Definition: amdsmi.h:984
@ AMDSMI_GPU_BLOCK_SMN
SMN block.
Definition: amdsmi.h:990
@ AMDSMI_GPU_BLOCK_SEM
SEM block.
Definition: amdsmi.h:991
@ AMDSMI_GPU_BLOCK_MCA
MCA block.
Definition: amdsmi.h:995
struct __attribute__((__packed__))
HSMP Metrics table (supported only with hsmp proto version 6).
Definition: amdsmi.h:1582
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:1096
@ AMDSMI_INVALID_POWER
Invalid / Undetected Power.
Definition: amdsmi.h:1099
@ AMDSMI_CURRENT_POWER
Current / Instant Power.
Definition: amdsmi.h:1098
@ AMDSMI_AVERAGE_POWER
Average Power.
Definition: amdsmi.h:1097
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:321
#define AMDSMI_MAX_NUM_FREQUENCIES
Guaranteed maximum possible number of supported frequencies.
Definition: amdsmi.h:693
amdsmi_counter_command_t
Definition: amdsmi.h:826
@ AMDSMI_CNTR_CMD_STOP
be used before reading.
Definition: amdsmi.h:828
@ AMDSMI_CNTR_CMD_START
Start the counter.
Definition: amdsmi.h:827
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:957
@ AMDSMI_PWR_PROF_PRST_COMPUTE_MASK
Compute Saving Profile.
Definition: amdsmi.h:961
@ AMDSMI_PWR_PROF_PRST_POWER_SAVING_MASK
Power Saving Profile.
Definition: amdsmi.h:960
@ AMDSMI_PWR_PROF_PRST_VIDEO_MASK
Video Power Profile.
Definition: amdsmi.h:959
@ AMDSMI_PWR_PROF_PRST_BOOTUP_DEFAULT
Default Boot Up Profile.
Definition: amdsmi.h:966
@ AMDSMI_PWR_PROF_PRST_LAST
Invalid power profile.
Definition: amdsmi.h:967
@ AMDSMI_PWR_PROF_PRST_CUSTOM_MASK
Custom Power Profile.
Definition: amdsmi.h:958
@ AMDSMI_PWR_PROF_PRST_VR_MASK
VR Power Profile.
Definition: amdsmi.h:962
#define AMDSMI_MAX_NUM_GFX_CLKS
This should match MAX_NUM_GFX_CLKS.
Definition: amdsmi.h:125
#define AMDSMI_NUM_VOLTAGE_CURVE_POINTS
The number of points that make up a voltage-frequency curve definition.
Definition: amdsmi.h:700
amdsmi_compute_partition_type_t
Compute Partition. This enum is used to identify various compute partitioning settings.
Definition: amdsmi.h:282
@ AMDSMI_COMPUTE_PARTITION_QPX
work together with shared memory
Definition: amdsmi.h:292
@ AMDSMI_COMPUTE_PARTITION_TPX
work together with shared memory
Definition: amdsmi.h:290
@ AMDSMI_COMPUTE_PARTITION_CPX
shared memory
Definition: amdsmi.h:284
@ AMDSMI_COMPUTE_PARTITION_SPX
together with shared memory
Definition: amdsmi.h:286
@ AMDSMI_COMPUTE_PARTITION_DPX
together with shared memory
Definition: amdsmi.h:288
#define AMDSMI_MAX_NUM_VCN
This should match MAX_NUM_VCN.
Definition: amdsmi.h:110
amdsmi_status_t amdsmi_get_processor_info(amdsmi_processor_handle processor_handle, size_t len, char *name)
Get information about the given processor.
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_cpucore_handles(amdsmi_cpusocket_handle socket_handle, uint32_t *processor_count, amdsmi_processor_handle *processor_handles)
Get the list of the cpu core handles associated to a cpu socket.
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_get_processor_handles_by_type(amdsmi_socket_handle socket_handle, processor_type_t processor_type, amdsmi_processor_handle *processor_handles, uint32_t *processor_count)
Get processor list as per processor type.
amdsmi_status_t amdsmi_get_cpusocket_handles(uint32_t *socket_count, amdsmi_cpusocket_handle *socket_handles)
Get the list of cpu socket handles in the system.
amdsmi_status_t amdsmi_get_processor_count_from_handles(amdsmi_processor_handle *processor_handles, uint32_t *processor_count, uint32_t *nr_cpusockets, uint32_t *nr_cpucores, uint32_t *nr_gpus)
Get respective processor counts from the processor handles.
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_get_link_metrics(amdsmi_processor_handle processor_handle, amdsmi_link_metrics_t *link_metrics)
Return link metric information.
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_get_hsmp_metrics_table(amdsmi_processor_handle processor_handle, amdsmi_hsmp_metrics_table_t *metrics_table)
Get HSMP metrics table.
amdsmi_status_t amdsmi_get_hsmp_metrics_table_version(amdsmi_processor_handle processor_handle, uint32_t *metrics_version)
Get HSMP metrics table version.
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_get_xgmi_plpd(amdsmi_processor_handle processor_handle, amdsmi_dpm_policy_t *xgmi_plpd)
Get the xgmi per-link power down policy parameter for the processor.
amdsmi_status_t amdsmi_clean_gpu_local_data(amdsmi_processor_handle processor_handle)
Clean up local data in LDS/GPRs.
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_get_soc_pstate(amdsmi_processor_handle processor_handle, amdsmi_dpm_policy_t *policy)
Get the soc pstate policy for the processor.
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_gpu_process_isolation(amdsmi_processor_handle processor_handle, uint32_t pisolate)
Enable/disable the system Process Isolation.
amdsmi_status_t amdsmi_set_soc_pstate(amdsmi_processor_handle processor_handle, uint32_t policy_id)
Set the soc pstate policy for the processor.
amdsmi_status_t amdsmi_get_gpu_process_isolation(amdsmi_processor_handle processor_handle, uint32_t *pisolate)
Get the status of the Process Isolation.
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_set_xgmi_plpd(amdsmi_processor_handle processor_handle, uint32_t plpd_id)
Set the xgmi per-link power down policy parameter for the processor.
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_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_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_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 overdrive GFX & MCLK information. If valid for the GPU it will also popul...
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. Power in units of uW....
amdsmi_status_t amdsmi_get_pcie_info(amdsmi_processor_handle processor_handle, amdsmi_pcie_info_t *info)
Returns the PCIe info for the GPU.
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_get_cpu_family(uint32_t *cpu_family)
Get CPU family.
amdsmi_status_t amdsmi_first_online_core_on_cpu_socket(amdsmi_processor_handle processor_handle, uint32_t *pcore_ind)
Get first online core on socket.
amdsmi_status_t amdsmi_get_cpu_model(uint32_t *cpu_model)
Get CPU model.
amdsmi_status_t amdsmi_get_esmi_err_msg(amdsmi_status_t status, const char **status_string)
Get a description of provided AMDSMI error status for esmi errors.
amdsmi_status_t amdsmi_get_cpu_current_io_bandwidth(amdsmi_processor_handle processor_handle, amdsmi_link_id_bw_type_t link, uint32_t *io_bw)
Get current input output bandwidth.
amdsmi_status_t amdsmi_get_cpu_current_xgmi_bw(amdsmi_processor_handle processor_handle, amdsmi_link_id_bw_type_t link, uint32_t *xgmi_bw)
Get current input output bandwidth.
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_cpu_ddr_bw(amdsmi_processor_handle processor_handle, amdsmi_ddr_bw_metrics_t *ddr_bw)
Get the DDR bandwidth data.
amdsmi_status_t amdsmi_get_cpu_dimm_power_consumption(amdsmi_processor_handle processor_handle, uint8_t dimm_addr, amdsmi_dimm_power_t *dimm_pow)
Get DIMM power consumption.
amdsmi_status_t amdsmi_get_cpu_dimm_temp_range_and_refresh_rate(amdsmi_processor_handle processor_handle, uint8_t dimm_addr, amdsmi_temp_range_refresh_rate_t *rate)
Get DIMM temperature range and refresh rate.
amdsmi_status_t amdsmi_get_cpu_dimm_thermal_sensor(amdsmi_processor_handle processor_handle, uint8_t dimm_addr, amdsmi_dimm_thermal_t *dimm_temp)
Get DIMM thermal sensor value.
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, uncorrectable and deferred) in the given GPU....
amdsmi_status_t amdsmi_get_cpu_socket_energy(amdsmi_processor_handle processor_handle, uint64_t *penergy)
Get the socket energy for a given socket.
amdsmi_status_t amdsmi_get_cpu_core_energy(amdsmi_processor_handle processor_handle, uint64_t *penergy)
Get the core energy for a given core.
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_set_cpu_gmi3_link_width_range(amdsmi_processor_handle processor_handle, uint8_t min_link_width, uint8_t max_link_width)
Set gmi3 link width range.
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_set_cpu_core_boostlimit(amdsmi_processor_handle processor_handle, uint32_t boostlimit)
Set the core boostlimit value.
amdsmi_status_t amdsmi_get_cpu_socket_c0_residency(amdsmi_processor_handle processor_handle, uint32_t *pc0_residency)
Get the socket c0 residency.
amdsmi_status_t amdsmi_set_cpu_socket_boostlimit(amdsmi_processor_handle processor_handle, uint32_t boostlimit)
Set the socket boostlimit value.
amdsmi_status_t amdsmi_get_cpu_core_boostlimit(amdsmi_processor_handle processor_handle, uint32_t *pboostlimit)
Get the core boost limit.
amdsmi_status_t amdsmi_get_cpu_socket_power_cap_max(amdsmi_processor_handle processor_handle, uint32_t *pmax)
Get the maximum power cap value for a given socket.
amdsmi_status_t amdsmi_set_cpu_socket_power_cap(amdsmi_processor_handle processor_handle, uint32_t pcap)
Set the power cap value for a given socket.
amdsmi_status_t amdsmi_get_cpu_socket_power(amdsmi_processor_handle processor_handle, uint32_t *ppower)
Get the socket power.
amdsmi_status_t amdsmi_get_cpu_socket_power_cap(amdsmi_processor_handle processor_handle, uint32_t *pcap)
Get the socket power cap.
amdsmi_status_t amdsmi_get_cpu_pwr_svi_telemetry_all_rails(amdsmi_processor_handle processor_handle, uint32_t *power)
Get the SVI based power telemetry for all rails.
amdsmi_status_t amdsmi_set_cpu_pwr_efficiency_mode(amdsmi_processor_handle processor_handle, uint8_t mode)
Set the power efficiency profile policy.
amdsmi_status_t amdsmi_get_gpu_process_list(amdsmi_processor_handle processor_handle, uint32_t *max_processes, amdsmi_proc_info_t *list)
Returns the list of processes running on a given GPU including itself.
amdsmi_status_t amdsmi_cpu_apb_disable(amdsmi_processor_handle processor_handle, uint8_t pstate)
Disable APB.
amdsmi_status_t amdsmi_set_cpu_socket_lclk_dpm_level(amdsmi_processor_handle processor_handle, uint8_t nbio_id, uint8_t min, uint8_t max)
Set NBIO lclk dpm level value.
amdsmi_status_t amdsmi_set_cpu_pcie_link_rate(amdsmi_processor_handle processor_handle, uint8_t rate_ctrl, uint8_t *prev_mode)
Set pcie link rate.
amdsmi_status_t amdsmi_get_cpu_socket_lclk_dpm_level(amdsmi_processor_handle processor_handle, uint8_t nbio_id, amdsmi_dpm_level_t *nbio)
Get NBIO LCLK dpm level.
amdsmi_status_t amdsmi_set_cpu_df_pstate_range(amdsmi_processor_handle processor_handle, uint8_t max_pstate, uint8_t min_pstate)
Set df pstate range.
amdsmi_status_t amdsmi_cpu_apb_enable(amdsmi_processor_handle processor_handle)
Enable APB.
amdsmi_status_t amdsmi_get_gpu_driver_info(amdsmi_processor_handle processor_handle, amdsmi_driver_info_t *info)
Returns the driver version information.
amdsmi_status_t amdsmi_get_cpu_fclk_mclk(amdsmi_processor_handle processor_handle, uint32_t *fclk, uint32_t *mclk)
Get Data fabric clock and Memory clock in MHz.
amdsmi_status_t amdsmi_get_cpu_prochot_status(amdsmi_processor_handle processor_handle, uint32_t *prochot)
Get normalized status of the processor's PROCHOT status.
amdsmi_status_t amdsmi_get_cpu_hsmp_proto_ver(amdsmi_processor_handle processor_handle, uint32_t *proto_ver)
Get HSMP protocol Version.
amdsmi_status_t amdsmi_get_cpu_smu_fw_version(amdsmi_processor_handle processor_handle, amdsmi_smu_fw_version_t *amdsmi_smu_fw)
Get SMU Firmware Version.
amdsmi_status_t amdsmi_get_cpu_socket_current_active_freq_limit(amdsmi_processor_handle processor_handle, uint16_t *freq, char **src_type)
Get current active frequency limit of the socket.
amdsmi_status_t amdsmi_get_cpu_core_current_freq_limit(amdsmi_processor_handle processor_handle, uint32_t *freq)
Get socket frequency limit of the core.
amdsmi_status_t amdsmi_get_threads_per_core(uint32_t *threads_per_core)
Get Number of threads Per Core.
amdsmi_status_t amdsmi_get_cpu_socket_freq_range(amdsmi_processor_handle processor_handle, uint16_t *fmax, uint16_t *fmin)
Get socket frequency range.
amdsmi_status_t amdsmi_get_cpu_cclk_limit(amdsmi_processor_handle processor_handle, uint32_t *cclk)
Get core clock in MHz.
amdsmi_status_t amdsmi_get_cpu_socket_temperature(amdsmi_processor_handle processor_handle, uint32_t *ptmon)
Get socket temperature.
amdsmi_status_t amdsmi_set_cpu_xgmi_width(amdsmi_processor_handle processor_handle, uint8_t min, uint8_t max)
Set xgmi width.
The following structures hold the gpu metrics values for a device.
Definition: amdsmi.h:1285
Definition: amdsmi.h:582
Definition: amdsmi.h:629
Definition: amdsmi.h:648
Definition: amdsmi.h:835
uint64_t time_enabled
Definition: amdsmi.h:837
uint64_t time_running
Definition: amdsmi.h:839
uint64_t value
Counter value.
Definition: amdsmi.h:836
DDR bandwidth metrics.
Definition: amdsmi.h:1516
uint32_t max_bw
DDR Maximum theoritical bandwidth in GB/s.
Definition: amdsmi.h:1517
uint32_t utilized_bw
DDR bandwidth utilization in GB/s.
Definition: amdsmi.h:1518
uint32_t utilized_pct
DDR bandwidth utilization in % of theoritical max.
Definition: amdsmi.h:1519
DIMM Power(mW), power update rate(ms) and dimm address.
Definition: amdsmi.h:1533
uint8_t dimm_addr
Dimm address[7:0](8 bit data)
Definition: amdsmi.h:1536
uint16_t update_rate
Time since last update[16:8](9 bit data)
Definition: amdsmi.h:1535
uint16_t power
Dimm power consumption[31:17](15 bits data)
Definition: amdsmi.h:1534
DIMM temperature(°C) and update rate(ms) and dimm address.
Definition: amdsmi.h:1542
uint16_t sensor
Dimm thermal sensor[31:21](11 bit data)
Definition: amdsmi.h:1543
float temp
temperature in degree celcius
Definition: amdsmi.h:1546
uint16_t update_rate
Time since last update[16:8](9 bit data)
Definition: amdsmi.h:1544
uint8_t dimm_addr
Dimm address[7:0](8 bit data)
Definition: amdsmi.h:1545
max and min LCLK DPM level on a given NBIO ID. Valid max and min DPM level values are 0 - 1.
Definition: amdsmi.h:1574
uint8_t min_dpm_level
Min LCLK DPM level[7:0](8 bit data)
Definition: amdsmi.h:1576
uint8_t max_dpm_level
Max LCLK DPM level[15:8](8 bit data)
Definition: amdsmi.h:1575
The dpm policy.
Definition: amdsmi.h:1175
This structure holds information about dpm policies.
Definition: amdsmi.h:1185
uint32_t num_supported
Definition: amdsmi.h:1189
uint32_t current
Definition: amdsmi.h:1194
Definition: amdsmi.h:623
Definition: amdsmi.h:663
This structure holds error counts.
Definition: amdsmi.h:1480
uint64_t uncorrectable_count
Accumulated uncorrectable errors.
Definition: amdsmi.h:1482
uint64_t correctable_count
Accumulated correctable errors.
Definition: amdsmi.h:1481
uint64_t deferred_count
Accumulated deferred errors.
Definition: amdsmi.h:1483
Definition: amdsmi.h:869
amdsmi_processor_handle processor_handle
Handler of device that corresponds to the event.
Definition: amdsmi.h:870
amdsmi_evt_notification_type_t event
Event type.
Definition: amdsmi.h:871
This structure holds 2 amdsmi_range_t's, one for frequency and one for voltage. These 2 ranges indica...
Definition: amdsmi.h:1245
amdsmi_range_t freq_range
The frequency range for this VDDC Curve point.
Definition: amdsmi.h:1246
amdsmi_range_t volt_range
The voltage range for this VDDC Curve point.
Definition: amdsmi.h:1247
This structure holds information about clock frequencies.
Definition: amdsmi.h:1149
uint32_t current
Definition: amdsmi.h:1163
uint32_t num_supported
Definition: amdsmi.h:1158
bool has_deep_sleep
Definition: amdsmi.h:1153
Definition: amdsmi.h:486
Definition: amdsmi.h:574
Definition: amdsmi.h:572
Definition: amdsmi.h:561
Definition: amdsmi.h:559
Definition: amdsmi.h:1295
This structure holds the name value pairs.
Definition: amdsmi.h:1451
uint64_t value
Use uint64_t to make it universal.
Definition: amdsmi.h:1453
This structure represents a point on the frequency-voltage plane.
Definition: amdsmi.h:1235
uint64_t frequency
Frequency coordinate (in Hz)
Definition: amdsmi.h:1236
uint64_t voltage
Voltage coordinate (in mV)
Definition: amdsmi.h:1237
Definition: amdsmi.h:1253
This structure holds the frequency-voltage values for a device.
Definition: amdsmi.h:1264
amdsmi_range_t curr_mclk_range
Definition: amdsmi.h:1266
amdsmi_range_t mclk_freq_limits
The range possible of MCLK values.
Definition: amdsmi.h:1269
uint32_t num_regions
The number of voltage curve regions.
Definition: amdsmi.h:1275
amdsmi_range_t curr_sclk_range
The current SCLK frequency range.
Definition: amdsmi.h:1265
amdsmi_range_t sclk_freq_limits
The range possible of SCLK values.
Definition: amdsmi.h:1268
amdsmi_od_volt_curve_t curve
The current voltage curve.
Definition: amdsmi.h:1274
This structure holds information about the possible PCIe bandwidths. Specifically,...
Definition: amdsmi.h:1208
amdsmi_frequencies_t transfer_rate
Definition: amdsmi.h:1212
Definition: amdsmi.h:517
uint64_t pcie_nak_received_count
total number of NAKs issued on the PCIe link by the receiver
Definition: amdsmi.h:525
uint64_t pcie_replay_count
total number of the replays issued on the PCIe link
Definition: amdsmi.h:521
uint16_t pcie_width
current PCIe width
Definition: amdsmi.h:518
uint32_t pcie_speed
current PCIe speed in MT/s
Definition: amdsmi.h:519
uint32_t pcie_bandwidth
current instantaneous PCIe bandwidth in Mb/s
Definition: amdsmi.h:520
uint64_t pcie_l0_to_recovery_count
total number of times the PCIe link transitioned from L0 to the recovery state
Definition: amdsmi.h:522
uint64_t pcie_nak_sent_count
total number of NAKs issued on the PCIe link by the device
Definition: amdsmi.h:524
uint64_t pcie_replay_roll_over_count
total number of replay rollovers issued on the PCIe link
Definition: amdsmi.h:523
Definition: amdsmi.h:510
uint16_t max_pcie_width
maximum number of PCIe lanes
Definition: amdsmi.h:511
amdsmi_card_form_factor_t slot_type
card form factor
Definition: amdsmi.h:514
uint32_t max_pcie_speed
maximum PCIe speed
Definition: amdsmi.h:512
uint32_t pcie_interface_version
PCIe interface version.
Definition: amdsmi.h:513
Definition: amdsmi.h:509
Definition: amdsmi.h:531
uint64_t power_cap
current power cap (uW)
Definition: amdsmi.h:532
uint64_t dpm_cap
dpm power cap (MHz)
Definition: amdsmi.h:534
uint64_t max_power_cap
maximum power cap (uW)
Definition: amdsmi.h:536
uint64_t default_power_cap
default power cap (uW)
Definition: amdsmi.h:533
uint64_t min_power_cap
minimum power cap (uW)
Definition: amdsmi.h:535
Definition: amdsmi.h:638
This structure contains information about which power profiles are supported by the system for a give...
Definition: amdsmi.h:1129
amdsmi_bit_field_t available_profiles
Definition: amdsmi.h:1133
amdsmi_power_profile_preset_masks_t current
Definition: amdsmi.h:1138
uint32_t num_profiles
Definition: amdsmi.h:1143
Definition: amdsmi.h:676
Definition: amdsmi.h:681
Definition: amdsmi.h:672
This structure contains information specific to a process.
Definition: amdsmi.h:1490
uint64_t sdma_usage
SDMA usage in microseconds.
Definition: amdsmi.h:1494
uint32_t process_id
Process ID.
Definition: amdsmi.h:1491
uint32_t cu_occupancy
Compute Unit usage in percent.
Definition: amdsmi.h:1495
uint32_t pasid
PASID.
Definition: amdsmi.h:1492
uint64_t vram_usage
VRAM usage.
Definition: amdsmi.h:1493
This structure represents a range (e.g., frequencies or voltages).
Definition: amdsmi.h:466
uint64_t lower_bound
Lower bound of range.
Definition: amdsmi.h:467
uint64_t upper_bound
Upper bound of range.
Definition: amdsmi.h:468
This structure holds ras feature.
Definition: amdsmi.h:1470
uint32_t ecc_correction_schema_flag
ecc_correction_schema mask
Definition: amdsmi.h:1474
Reserved Memory Page Record.
Definition: amdsmi.h:1113
uint64_t page_size
Page size.
Definition: amdsmi.h:1115
amdsmi_memory_page_status_t status
Page "reserved" status.
Definition: amdsmi.h:1116
uint64_t page_address
Start address of page.
Definition: amdsmi.h:1114
This structure holds SMU Firmware version information.
Definition: amdsmi.h:1506
uint8_t debug
SMU fw Debug version number.
Definition: amdsmi.h:1507
uint8_t major
SMU fw Major version number.
Definition: amdsmi.h:1509
uint8_t unused
reserved fields
Definition: amdsmi.h:1510
uint8_t minor
SMU fw Minor version number.
Definition: amdsmi.h:1508
temperature range and refresh rate metrics of a DIMM
Definition: amdsmi.h:1525
uint8_t range
temp range[2:0](3 bit data)
Definition: amdsmi.h:1526
uint8_t ref_rate
DDR refresh rate mode[3](1 bit data)
Definition: amdsmi.h:1527
The utilization counter data.
Definition: amdsmi.h:1105
amdsmi_utilization_counter_type_t type
Utilization counter type.
Definition: amdsmi.h:1106
uint64_t value
Utilization counter value.
Definition: amdsmi.h:1107
Definition: amdsmi.h:540
This structure holds version information.
Definition: amdsmi.h:1224
uint32_t minor
Minor version.
Definition: amdsmi.h:1227
uint32_t major
Major version.
Definition: amdsmi.h:1226
const char * build
Full Build version string.
Definition: amdsmi.h:1229
uint32_t year
Last 2 digits of the Year released.
Definition: amdsmi.h:1225
uint32_t release
Patch, build or stepping version.
Definition: amdsmi.h:1228
Definition: amdsmi.h:615
Definition: amdsmi.h:480
Definition: amdsmi.h:472
Definition: amdsmi.h:492